Real-time motion management for robotic treatment couch in proton therapy system

In proton therapy, robotic couch was used for patient positioning to achieve high precision in cancer treatment. However, no studies have focused on the real-time motion management system (MMS) for the robotic couch. This study was to develop the MMS and verify its feasibility. A real-time MMS was set up with a robotic couch, an NDI Vega optical tracking system, a Special Measurement Tool (SMT) and the developed software. A Leica laser tracker was adopted to verify the accuracy of the tests in this study. The stability and accuracy of the SMT in NDI Vega system were verified to guarantee the reliability of the results. The coordinate transformation was used to unify the measurement. 83 points inside the treatment volume were applied to verify the accuracy of the MMS, with the comparison of results measured by the laser tracker. The synchronism of the SMT in the MMS and Patient Positioning System (PPS) based on the reciprocating motion along axis z was tested to obtain the maximum time delay. Trajectory tracking was performed with different payloads on the couch top. A series of tests were conducted and the results demonstrated the feasibility of potential applications based on real-time motion capturing and monitoring.


Introduction
Proton therapy, which is efficient for cancer treatment by destroying the DNA of tumor cells, has a better dose distribution than the traditional therapy like electron and photon therapy [1][2][3], thanks to the Bragg-peak [4,5] of the proton beam.
In proton therapy treatment, Gantry with a beam nozzle can significantly reduce the side-effect (caused by the beam radiation) by rotating the Gantry and accurately positioning the tumor organs. Normally, the couch top for patient positioning in proton therapy is a high precise robotic couch [6,7], which is called the Patient Positioning System (PPS), is composed of a robotic arm with 6-degrees of freedom (DOF), a carbon fiber couch top, and the control system. PPS delivers the patient to the target position with the three directional laser positioning systems for rough positioning, and an image system, for example, Cone Beam Computerized Tomography (CBCT), for final precise positioning [8]. Then, the treatment control system (TCS) launches the beam to the target volume, with a full evaluation based on the imaging results, treatment plan, etc. The patient is positioned and immobilized on the couch top with a unique thermoplastic mark. During the treatment, any unexpected movement caused by the PPS or patient is forbidden, to protect the normal tissue from the accidental radiation. This is because the CBCT is used only for tumor imaging before the treatment, not for the entire treatment. If there is unexpected movement (e.g. the thermoplastics mask broken or failed, the unexpected movement caused by the PPS error.) during the treatment, the technicians may only get this movement visually via the video camera, and then press the Beam-Stop button to stop the treatment manually. These processes will take several seconds at least and may cause the irradiation to the normal tissue. And Even if the movement is not enough to be observed, the technicians cannot get the information of unexpected movement and do not stop the beam. Although the probability of occurrence is very low, these may cause medical negligence.
Furthermore, some treatment solutions (e.g. P-cure [9]) use the movement of the PPS to replace the rotation of the Gantry, to achieve the miniaturization by reducing the size and weight of the system. For these solutions, the integrated PPS should be more reliable to provide the accuracy and safety during its movement with the patient.
Some of the past studies have used imaging systems (X-ray or CBCT) to focus on the Quality Assurance (QA) of PPS by using special phantoms [10][11][12]. Some others have adopted laser trackers and infrared trackers to verify the movement performance of the 6-DOF robotic couch [13][14][15][16]. However, no studies have developed the real-time motion management (includes the accuracy, safety, synchronization, and trajectory tracking) for PPS.
Therefore, the purpose of this study was to develop a realtime motion management system (MMS) that could capture the unexpected movement, perform automatic calibration for the PPS, and could also trace the trajectory of the PPS in real-time.

System configuration
We setup the MMS with the configuration of a 6-DOF robotic PPS, a 3D optical tracking system, and a Special Measurement Tool (SMT), as shown in Fig. 1. We also used a Leica laser tracking system to verify the MMS. The MMS can be installed in the treatment room with the details of fixing the optical tracking system on the ceiling, and designing a special non-metallic tracking tool with several retroreflective marks. The laser tracking system is for the verification and calibration, will not be used during the treatment. All the tests of this study were performed in the treatment room of the SC200 proton therapy system [17,18], which was developed by Hefei CAS Ion Medical and Technical Devices Co., Ltd. (HFCIM, Hefei, China).
The PPS used by us was designed by LEONI CIA Cables System, France. This PPS is specifically designed for Proton Therapy System [19,20], with 6-DOF of serial robot's type, high manipulability and accuracy. The detailed specifications of this PPS are shown in Table 1.
The 3D Optical Tracking System is Polaris Vega ST from NDI, Canada. This tracking system can track the standard tools (offered by NDI) and customized tools made by several sphere markers with a retro-reflective coating. The SMT is a customized tool and passive type in this study, can be detected by the tracking system with the result of SMT's position (Tx, Ty, Tz) and orientation (Rx, Ry, Rz). NDI offers the application programming interface (API) to get the results with a sampling frequency of 30/60 Hz. The specific measurement volume of Polaris Vega ST is truncated cone, which can cover the treatment volume in our study. The Volumetric Accuracy (RMS, Root Mean Squared) of this tracking system was 0.12 mm inside of the pyramidshaped volume.
The SMT used in this study was designed by us. Two methods of measurement were integrated into the tool, with the infrared reflective (IR) markers and laser tracking markers/target holders, as shown in Fig. 2a. Four IR markers were located at the left of the SMT with the coordinate defined as SMTC, which can be configured by NDI 6D Architect (a software provided by NDI) and then can be identified and tracked by NDI Vega. Three laser tracking markers/target holders were located at the right of the SMT. They can be tracked by the Leica laser tracking system (we used the Leica Absolute Tracker AT960, from Hexagon Manufacturing, Great Britain) with the reflectors. With these three markers,  For the SMT, we defined the coordinate system of the IR markers and laser tracking markers as the same one, so the SMTC can also be identified by the laser tracking markers. Software (Graphical User Interface (GUI) written in python, algorithm written in C + +) was developed for the study, with the functions of the following: (a) Controlling the PPS with the movement of point to point and linear motion. Based on the API from LEONI, we developed the code of connecting to PPS and command interaction. We also defined the 3D test points inside the treatment volume and the motion path with this code. (b) Capturing the movement and providing the real-time graphics of the PPS and SMT. Based on the API from NDI and LEONI, we developed the code to achieve this function by obtaining the position coordinate of the PPS (room coordinates) and SMTC tracked by NDI Vega in real-time. These values were used for further processing. We also applied the visualization coordinate system on the GUI to show the points and trajectories in real-time. (c) Calculating the coordinate transformation matrices in real-time. As the coordinate systems of NDI Vega, laser tracking system and PPS/room were not the same in our system, coordinate transformation should be calculated to fulfill the unification. We recorded the positions of three unique points tracked by NDI Vega, laser tracking system and PPS/room, and then our software could calculate the transformation matrices among them automatically. Finally, all the points tracked by NDI Vega were translated to the corresponding positions in the laser tracking coordinate system and room coordinate system in real-time. These positions and trajectories can be graphed on the GUI in real-time. (d) Calculating the real-time errors between NDI Vega and PPS. By capturing the coordinate of the SMT in NDI Vega and PPS/room, the software calculated the discrepancies automatically and showed the results on the GUI. (e) Tracking different tools. This function provided the possibility of multi-object tracking in real-time during the treatment. This is efficient for users who want to track several targets simultaneously, such as the detection of the patients' movement, the value of couch sagging and the trajectory of the PPS. Figure 3 shows the GUI of the software developed for this study. Figure 4 shows the brief framework of the software. All the data are real-time and can be exported for further processing.

Coordinate transformation
In this study, the coordinate transformation should be considered between NDI Vega, laser tracker and PPS, which were the transformation matrices T m1 , T m2 , to convert SMTC from the NDI Vega coordinate system to PPS coordinate system (room coordinate system), and from the laser tracker coordinate system to PPS coordinate system, respectively. T m1 and T m2 were calculated using Singular Value Decomposition (SVD). The transformation description is shown in Eqs. (1) and (2). where P represents the description of the target position in room coordinates and the S represents the description of the target position in NDI Vega/laser tracker coordinates. R, t represents the rotation and translation from NDI Vega/laser tracker coordinates to Room coordinates, respectively. We used three unique points to calculate the R and t, and used 48 unique points to calculate the errors of the transformation matrix T m .

Verification of MMS
In our study, the most important procedure of the development was to verify the MMS, as all functions and outputs were based on the accuracy of the MMS. The methods to verify the MMS are listed below: The accuracy of the MMS was impacted by a lot of factors, including the processing and assembly errors of the SMT, the inherent error of NDI Vega track-ing system, the environment of the treatment room (such as vibration and temperature), the accuracy of the transformation matrix and so on. In this study, we verified the accuracy of the MMS with these factors by comparing the position data of the SMT measured by NDI Vega tracking system and laser tracking system. 83 points distributed inside the treatment volume were adopted, the step sizes on axis x, y, z were 25 mm, 25 mm, 20 mm, respectively. The treatment volume was defined from the isocenter coordinate system as follows: ± 250 mm, ± 500 mm, − 100 to 300 mm along axis x, y, z, respectively. For pitch, yaw and roll, the step sizes were 1°, 1° and 5°, respectively. (d) Verify the synchronism/response time of the MMS.
To verify the feasibility of gating treatment and accident prevention caused by the unexpected movement, a test plan with the reciprocating motion for the PPS was designed and executed. The details were planned a one-minute reciprocation motion along axis z with a distance of ± 10 mm and set the threshold value to 8 mm to trigger the simulation of gating. For the result, we used the values of 0, − 1, 1 to denote inside of, out

Trajectory tracking
The trajectory of the SMT can represent the target movement by placing it at any desired position, e.g., the isocenter for system QA, near the chest and abdomen for respiratory capture, someplace on the couch top for couch sagging. We placed the SMT at the isocenter position to track its trajectories with different payloads (0 kg, 30 kg, 60 kg, 90 kg, 120 kg, 150 kg) on the couch top. To capture the obvious offset of the SMT, the motion compensation was not used in this study.

Stability and accuracy of SMT in NDI Vega tracking system
For the stability verification, the results showed that the mean ± SD of all these 60 points on axis x, y, z, and Rx, Ry, Rz was 0.011 ± 0.004 mm, 0.013 ± 0.005 mm, 0.014 ± 0.005 mm, 0.010 ± 0.003°, 0.013 ± 0.005°, 0.008 ± 0.007°, respectively. These results indicated that the MMS had high stability in our study. Based on the measured data, we calculated the accuracy of SMT by comparing the measured data between NDI tracking system and laser tracking system for each of the 83 points mentioned above, the mean ± SD of accuracy was 0.25 ± 0.09 mm. This value showed the real accuracy of the SMT in NDI Vega tracking system, without the other factors, e.g., the accuracy of robotic PPS and the sagging of the couch top.

Accuracy of transformation matrix T m
The means ± SD of all 48 points on axis x, y, z were 0.0057 ± 0.0036 mm, 0.0005 ± 0.0004 mm, 0.0032 ± 0.0022 mm. The deviation was caused by the precision of the CAD software (in our case, the CAD provided three digits after the decimal point, for example, x = 469.427 mm). For the theoretical T m , we also compared it with a designed transformation matrix by coding in python, and the Root Mean Square Error (RMSE) was about 4E − 16. These results indicate the high accuracy of the T m .

Accuracy of MMS
Based on the accuracy of the SMT in NDI Vega tracking system, the measured data of the MMS and the additional laser tracking system were summarized and analyzed. Table 2 shows the details of the result data on axis x. The mean ± SD of the 21 points along axis x was 0.24 ± 0.09 mm, 41 points along axis y was 0.31 ± 0.12 mm, 21 points along axis z was 0.18 ± 0.06 mm, captured by MMS. The mean ± SD of the 21 points along axis x was 0.12 ± 0.03 mm, 41 points along axis y was 0.10 ± 0.03 mm, 21 points along axis z was 0.14 ± 0.05 mm, captured by laser tracking system. Table 3 shows the accuracy of the pitch, yaw and roll rotation of the MMS. The mean ± SD measured by the MMS was 0.027 ± 0.017º, 0.034 ± 0.029º, 0.053 ± 0.018º, for pitch, yaw and roll, respectively.

Response time of MMS
With a 60 s tracking of the SMT motion along axis z, the results are shown in Fig. 5. Figure 5a shows the real-time movement of the SMT (in the MMS) and PPS. Figure 5b shows a part of the detailed deviation between them. To simulate the gating treatment, Fig. 5c shows the gate signals of − 1 and 1 during the motion capture. Figure 5d shows the max time delay of the PPS-gate and NDI Vega /SMT-gate, with a value of about 110 ms. In this study, we just carried out the motion tracking, further predicted method to reduce this delay time will be developed.

Trajectory tracking using MMS
In this study, we used the MMS to track the trajectories of the PPS in real-time during the movement. Figure 6 shows the trajectories of the SMT placed on the PPS, the left curve (Blue) is the trajectory of the SMT in NDI Vega coordinate system, the middle curve (Red) is the trajectory of the command position of the PPS in room coordinate system, the right curves are the combined trajectories of the SMT and PPS in room coordinate system, with the coordinate transformation for SMT from NDI Vega coordinate system to room coordinate system.
The mean deviations/offsets between the SMT and PPS were 0.87 mm, 4.2 mm, 7.64 mm, 9.44 mm, 11.4 mm, 14.25 mm with the payloads of 0 kg, 30 kg, 60 kg, 90 kg, 120 kg, 150 kg, respectively (Fig. 6a). The results showed that the PPS had the different offsets with different payloads and at different position. Figure 6b shows the real-time  Mean and SD = 0.12 ± 0.03 combined curves for the payloads of 150 kg on the couch top. The MMS could provide an exact function of capturing and recording the trajectories, this will help the users conduct further studies based on these original data.
In our study, the motion compensation of the robotic PPS was not applied. In the future, the motion compensation based on the MMS will be launched, to verify the feasibility of real-time error compensation and to achieve better accuracy.

Discussion and conclusion
In this study, a real-time MMS was used for motion management based on a 6-DOF robotic patient positioning system. We performed a series of tests to verify the accuracy and performance of the MMS, and the results indicated its feasibility.
The stability of the SMT tracked by NDI Vega showed a lower deviation. The accuracy of the SMT in NDI Vega coordinate system and laser tracker coordinate system showed the real deviation value without the factors caused by the robotic PPS. These guaranteed the reliability of our study. The accuracy value of the MMS indicated that it could provide a high precise motion management in the proton therapy with submillimeter accuracy.
The trajectory tracking test verified the feasibility of automatic calibration of the PPS. Nowadays, in the treatment room, the common method to calibrate the PPS is using a laser tracker, or a special phantom with an imaging system. But these methods are offline for cancer treatment, or time consuming. In our study, the trajectory tracking was in realtime and highly efficient. A calibration plan with predefined trajectories can be imported to the software, and the result can be obtained in several minutes (depend on the calibration plan).
Trajectory tracking in real-time in this study also showed the feasibility of dynamic accuracy treatment by using the movement of the PPS to replace the Gantry rotation. This will contribute to the miniaturization of proton therapy device, which will make the proton treatment more popular, save money and life for cancer patients in the end.
The test of response time of the MMS showed the feasibility of the usage in gating treatment and accident prevention by setting the threshold value. For gating treatment, this study showed the feasibility of capturing the breathing movement, which would be translated to the respiratory phase by further algorithm. For accident prevention, an emergency command of stopping beam would be sent to the TCS immediately while capturing any movement that exceeds the limit.
Moreover, all the data mentioned in this study can be exported from the software we developed. This will help Table 3 The Mean + SD = 0.053 ± 0.018 Mean + SD = 0.03 ± 0.018 the users of our proton therapy devices review the data and obtain the original data of any interesting case, such as unexpected motion, out of treatment volume, couch sagging, or even accident.
In this study, the SMT was combined with laser tracking marker holders, this was because we had to calculate the transformation matrix each time as NDI Vega tracking camera was not fixed on the same position precisely for each test. In the future, we will install NDI Vega on the ceiling near the PPS, then we will design a special calibration tool (based on the SMT) to calculate the transformation matrix after the installation and calibrate NDI Vega tracking system regularly according to the requirements of System QA. And tools will be designed for different functions, e.g., trajectory tracking, gating treatment, automatic QA for the PPS, accident prevention and other potential applications.