Magnetic field feedback temperature compensation pencil beam scanning control system and control method

CN122745482APending Publication Date: 2026-09-15GUODIAN NUCLEAR POWER TECH (WUXI) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611046654.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-09-15

Smart Images

  • Figure CN122745482A_ABST
    Figure CN122745482A_ABST
Patent Text Reader

Abstract

The application discloses a magnetic field feedback temperature compensation pen-shaped beam scanning control system and a control method thereof. The system comprises a real-time controller, an input-output module, a scanning magnet, a magnetic field detection module, a current detection module and a temperature detection module. The real-time controller generates scanning track parameters according to a treatment plan, and determines a target magnetic field value according to a mapping relationship between a scanning position and the target magnetic field. The input-output I / O module controls a scanning magnet power supply to generate a scanning magnetic field, and the actual magnetic field intensity of the scanning magnet is acquired in real time through the magnetic field detection module. The temperature detection module collects working temperature parameters, and a temperature compensation unit corrects the magnetic field detection result according to the temperature parameters to obtain the actual magnetic field value after temperature compensation. A magnetic field closed-loop control unit adjusts the scanning magnet power supply driving signal according to the deviation between the target magnetic field value and the actual magnetic field value after temperature compensation, so that the actual magnetic field tracks the target magnetic field. The current fluctuation, magnetic hysteresis effect and magnetic field drift caused by temperature change are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of proton and heavy ion radiotherapy technology, specifically relating to a magnetic field feedback temperature-compensated pencil beam scanning control system and control method. Background Technology

[0002] Proton therapy, as an advanced radiotherapy technique, utilizes the Bragg peak characteristics of proton beams in human tissues to achieve precise dose deposition on tumor target areas. Among them, pencil beam scanning (PBS) technology generates changing magnetic fields by controlling scanning magnets in the X and Y directions, enabling a narrow beam of protons to scan the target area point by point and layer by layer according to the treatment plan. It is currently the most widely used beam delivery method in proton therapy systems.

[0003] Existing pencil beam scanning control systems typically generate a scanning trajectory based on the treatment plan and convert the target scanning position into the excitation current of the scanning magnet. Beam deflection is achieved by controlling the output current of the scanning magnet power supply. However, the actual magnetic field generated by the scanning magnet is not only related to the excitation current but is also affected by factors such as magnet core hysteresis, eddy current effect, power supply fluctuations, winding temperature rise, and changes in ambient temperature. This causes a deviation between the excitation current and the actual magnetic field, resulting in the actual beam deflection position deviating from the predetermined scanning position and affecting the accuracy of dose distribution.

[0004] Furthermore, existing control methods mostly employ current feedback or simple closed-loop regulation, lacking direct detection and feedback of the actual magnetic field state of the scanning magnet, making it difficult to correct magnetic field drift in a timely manner. Simultaneously, the magnetic field sensor itself exhibits temperature sensitivity; changes in its sensitivity and zero-point drift further reduce the accuracy of magnetic field measurements. Changes in the winding resistance of the scanning magnet with temperature also cause variations in the magnetic field generated under the same current conditions. Summary of the Invention

[0005] To address the aforementioned problems, this invention proposes a magnetic field feedback temperature-compensated pencil beam scanning control system and method. Its purpose is to solve the beam positioning deviation problem caused by the inconsistency between the excitation current and the actual magnetic field, magnetic field drift, and temperature changes in the existing pencil beam scanning system. It achieves high-precision dynamic tracking of the scanning magnetic field, and improves the proton beam scanning position accuracy, long-term stability, and accuracy of therapeutic dose distribution.

[0006] The first aspect of this invention provides a magnetic field feedback temperature-compensated pen beam scanning control system, the system comprising: The system includes a real-time controller, an input / output (I / O) module, a scanning magnet, a magnetic field detection module, a current detection module, and a temperature detection module. The real-time controller receives pencil beam scanning trajectory data, generates target magnetic field parameters for the scanning magnet based on the scanning trajectory data, and outputs these parameters to the I / O module.

[0007] The input / output (I / O) modules are connected to the real-time controller, scanning magnet, magnetic field detection module, current detection module, and temperature detection module, respectively, and are used to execute scanning magnet power control command output, feedback signal acquisition, and closed-loop control. The scanning magnet includes an X-axis scanning magnet and a Y-axis scanning magnet arranged orthogonally to each other, used to generate a two-dimensional scanning magnetic field that deflects the proton beam in the target plane. The magnetic field detection module is used to detect the actual magnetic field strength generated by the scanning magnet in real time and output a magnetic field feedback signal.

[0008] The temperature detection module is used to detect real-time temperature parameters of the scanning magnet, the magnetic field detection module, or their surrounding environment. The input / output module includes a magnetic field closed-loop control unit and a temperature compensation unit. The temperature compensation unit performs temperature drift correction on the magnetic field feedback signal based on the real-time temperature parameters to obtain the temperature-compensated actual magnetic field value. The magnetic field closed-loop control unit generates a magnetic field adjustment control quantity based on the deviation between the target magnetic field value and the temperature-compensated actual magnetic field value, and adjusts the scanning magnet power supply drive signal to make the actual magnetic field generated by the scanning magnet power supply track the target magnetic field.

[0009] According to one embodiment of the present invention, the real-time controller includes a scan trajectory parsing unit and a control command generation unit; The scan trajectory analysis unit is used to analyze the scan file sent by the treatment planning system to obtain at least the following information: scan layer number, scan point coordinates, beam energy, dwell time, target dose, and scan sequence. The control command generation unit calculates the corresponding target magnetic field value based on the scan point coordinates and beam energy using a pre-established position magnetic field calibration model, and generates the target excitation current of the scanning magnet according to the magnetic field-current calibration relationship.

[0010] According to one embodiment of the present invention, the position magnetic field calibration model is a two-dimensional calibration model used to establish the correspondence between the beam scanning position coordinates and the scanning magnetic field intensity. The magnetic field and current calibration relationship is established through scanning magnet calibration data, and the target excitation current corresponding to the target magnetic field is obtained by using a lookup table and interpolation algorithm.

[0011] According to one embodiment of the present invention, the magnetic field detection module includes at least one Hall magnetic field sensor. The Hall magnetic field sensor is disposed in the air gap region of the scanning magnet, the region near the beam channel, or the region near the magnetic pole, and is used to detect the actual magnetic field component generated by the scanning magnet.

[0012] According to one embodiment of the present invention, the temperature compensation unit includes a temperature magnetic field compensation parameter storage module. The temperature magnetic field compensation parameter storage module stores the following parameters under different temperature conditions: magnetic field sensor sensitivity coefficient, magnetic field sensor zero-point bias parameter, magnetic field temperature drift coefficient, and scanning magnet winding resistance parameter.

[0013] The temperature compensation unit calls the corresponding compensation parameters according to the real-time temperature parameters, and obtains the compensation parameters under the current temperature conditions through interpolation calculation.

[0014] According to one embodiment of the present invention, the temperature compensation unit compensates for the following parameters: the error caused by the change in the sensitivity of the magnetic field sensor with temperature; the error caused by the zero-point drift of the magnetic field sensor; and the error caused by the change in the relationship between the excitation current and the magnetic field due to the change in the resistance of the scanning magnet winding.

[0015] According to one embodiment of the present invention, the magnetic field closed-loop control unit uses a proportional-integral-derivative controller for closed-loop regulation; the magnetic field closed-loop control unit calculates the magnet drive voltage adjustment amount based on the magnetic field error between the target magnetic field value and the actual magnetic field value after temperature compensation.

[0016] According to one embodiment of the present invention, the magnetic field closed-loop control unit further includes a feedforward control module; the feedforward control module calculates the scanning magnet drive feedforward voltage based on the equivalent circuit model of the scanning magnet; the drive feedforward voltage is superimposed with the adjustment voltage output by the proportional-integral-derivative controller to serve as the scanning magnet drive voltage.

[0017] According to one embodiment of the present invention, the input / output module (I / O) further includes a safety interlock unit; The safety interlock unit is used to monitor magnetic field deviation, current deviation, temperature parameters, communication status, and scanning status in real time. When any monitored parameter exceeds a preset threshold, a protection control signal is output, causing the scanning magnet power supply to stop outputting or enter a safe state.

[0018] A second aspect of the present invention provides a pencil beam scanning control method based on the above-described system, comprising: S1: a real-time controller receives pencil beam scanning trajectory data, the pencil beam scanning trajectory data including scanning point position coordinates, beam energy, scanning layer information, and scanning time parameters; according to a pre-established mapping relationship between the scanning position and the target magnetic field, the position coordinates of the current scanning point are converted into the corresponding target magnetic field value, the target magnetic field value including the target magnetic field component in the X direction and the target magnetic field component in the Y direction.

[0019] S2: Based on the pre-established mapping relationship between the target magnetic field and the excitation current, determine the target excitation current corresponding to the target magnetic field value; based on the electrical characteristic parameters and dynamic response characteristics of the scanning magnet, calculate the feedforward driving quantity used to compensate for the response lag of the scanning magnet; combine the driving signal corresponding to the target excitation current with the feedforward driving quantity to generate the initial control signal of the scanning magnet.

[0020] S3: During the operation of the scanning magnet, the actual magnetic field strength generated by the scanning magnet is collected in real time through the magnetic field detection module; The actual excitation current of the scanning magnet is collected by the current detection module; the real-time temperature parameters of the scanning magnet, the magnetic field detection module, or their surrounding environment are collected by the temperature detection module.

[0021] S4: Based on the real-time collected temperature parameters, obtain the correspondence between the pre-stored temperature parameters and the magnetic field compensation parameters; Based on the temperature compensation parameters, the sensitivity change error and zero drift error in the output signal of the magnetic field detection module are corrected; at the same time, based on the correspondence between temperature change and the change in the resistance of the scanning magnet winding, the magnetic field deviation caused by the change in excitation state due to the change in winding resistance is corrected; and the actual magnetic field value after temperature compensation is obtained.

[0022] S5: Compare the target magnetic field value with the actual magnetic field value after temperature compensation to obtain the magnetic field control error of the scanning magnet in the X and Y directions.

[0023] S6: Input the magnetic field control error into the magnetic field closed-loop control module, and calculate the magnetic field correction amount through the closed-loop control algorithm; The magnetic field correction amount is fused with the feedforward drive amount to generate a scanning magnet drive adjustment signal; the excitation drive voltage of the scanning magnet is adjusted according to the drive adjustment signal so that the actual magnetic field generated by the scanning magnet tracks the target magnetic field value.

[0024] S7: In real time, determine whether the magnetic field error, temperature status, current status, and scanning time corresponding to the current scanning point meet the preset conditions; when the preset conditions are met, switch to the next scanning point and repeat steps S1 to S6 until the preset scanning trajectory is completed.

[0025] According to one embodiment of the present invention, the mapping relationship between the scanning position and the target magnetic field is established based on beam position calibration data under different beam energy conditions, and is used to describe the correspondence between the magnetic field strength generated by the scanning magnet and the deflection position of the proton beam in the target plane.

[0026] According to one embodiment of the present invention, the mapping relationship between the target magnetic field and the excitation current is obtained by scanning the magnet calibration process, and the target excitation current corresponding to the target magnetic field is determined by parameter table lookup, data interpolation or function fitting.

[0027] According to one embodiment of the present invention, the correspondence between the temperature parameters and the magnetic field compensation parameters includes at least: compensation parameters for the sensitivity of the magnetic field detection module as a function of temperature; compensation parameters for the zero-point offset of the magnetic field detection module as a function of temperature; and compensation parameters for the resistance of the scanning magnet winding as a function of temperature.

[0028] According to one embodiment of the present invention, the closed-loop control algorithm includes a proportional-integral-derivative (PID) control algorithm; the feedforward drive quantity is calculated based on the equivalent resistance, equivalent inductance of the scanning magnet, and the current excitation current variation trend.

[0029] According to one embodiment of the present invention, when the deviation between the actual magnetic field value and the target magnetic field value exceeds a preset threshold, or when the temperature parameter or current parameter exceeds the safe range, an abnormal protection control is triggered, and the corresponding scanning status information is recorded.

[0030] The technical effects achieved by this invention are as follows: First, by introducing a real-time feedback mechanism of the actual magnetic field of the scanning magnet, the magnetic field strength is used as the feedback quantity for closed-loop control, replacing the traditional method of control based solely on the excitation current. This effectively corrects the magnetic field deviation caused by factors such as hysteresis, eddy current, and power supply fluctuations of the scanning magnet, enabling the scanning magnetic field to track the target magnetic field more accurately and improving the accuracy and repeatability of the proton beam scanning position.

[0031] Secondly, by collecting information on the scanning magnet, magnetic field sensor, and ambient temperature, a temperature compensation model is established to adaptively correct magnetic field errors caused by magnetic field sensor sensitivity drift, zero-point offset, and changes in the winding resistance of the scanning magnet. This reduces the impact of ambient temperature changes on scanning accuracy and improves the magnetic field stability of the equipment during long-term operation.

[0032] Furthermore, the control method that combines closed-loop magnetic field control with feedforward control calculates the drive compensation amount in advance based on the changes in the target magnetic field and adjusts it in real time in conjunction with feedback error. This reduces response lag and overshoot during the scanning point switching process, improves the magnetic field establishment speed and dynamic tracking capability during millisecond-level scanning, and meets the requirements of high-precision pencil beam rapid scanning.

[0033] Finally, by collecting real-time information on magnetic field, current, temperature, and system status, and combining this with a safety interlock mechanism, abnormal deviations during the scanning process can be detected and protected. This allows for the timely detection of abnormal magnetic field, current, and temperature conditions, preventing beam position shifts caused by control deviations and improving the safety and reliability of the proton therapy system. Attached Figure Description

[0034] Figure 1 This is a block diagram of a magnetic field feedback temperature-compensated pen beam scanning control system disclosed in an embodiment of the present invention; Figure 2 This is a block diagram of a real-time magnetic field feedback and temperature adaptive compensation functional unit disclosed in an embodiment of the present invention; Figure 3 This is a flowchart of a magnetic field feedback temperature-compensated pen beam scanning control method disclosed in an embodiment of the present invention. Detailed Implementation

[0035] Unless otherwise expressly stated, throughout the specification and claims, the term "comprising" or its variations such as "including" or "comprises" shall be understood to include the stated elements or components without excluding other elements or other components.

[0036] The technical solution of the present invention is illustrated below through specific embodiments. It should be understood that the one or more steps mentioned in the present invention do not preclude the existence of other methods and steps before or after the combined steps, or that other methods and steps may be inserted between these explicitly mentioned steps. It should also be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Unless otherwise stated, the numbering of each method step is only for the purpose of identifying each method step, and not for limiting the order of each method or limiting the scope of the present invention. Changes or adjustments to their relative relationships, without substantial changes to the technical content, can also be considered as within the scope of the present invention.

[0037] The raw materials and instruments used in the examples are not subject to any specific restrictions on their source; they can be purchased from the market or prepared according to conventional methods known to those skilled in the art.

[0038] This invention aims to solve the problem in existing pencil beam scanning systems that rely solely on excitation current to control the scanning magnet, which fails to accurately reflect the actual magnetic field state and leads to beam scanning position drift. The invention proposes a closed-loop scanning control system and method that uses the actual magnetic field as feedback and incorporates temperature adaptive compensation.

[0039] The first aspect of this invention provides a magnetic field feedback temperature-compensated pen beam scanning control system, such as... Figure 1 As shown, it includes: a real-time controller, an input / output module, a scanning magnet, a magnetic field detection module, a current detection module, and a temperature detection module.

[0040] The real-time controller is used to receive pencil beam scanning trajectory data, generate target magnetic field parameters of the scanning magnet based on the scanning trajectory data, and output them to the input / output (I / O) module. The input / output (I / O) modules are respectively connected to the real-time controller, scanning magnet, magnetic field detection module, current detection module, and temperature detection module, and are used to execute control command output, feedback signal acquisition, and closed-loop control. The scanning magnets include an X-axis scanning magnet and a Y-axis scanning magnet arranged orthogonally to each other, which are used to generate a two-dimensional scanning magnetic field that deflects the proton beam in the target plane.

[0041] The magnetic field detection module is used to detect the actual magnetic field strength generated by the scanning magnet in real time and output a magnetic field feedback signal.

[0042] The temperature detection module is used to detect the real-time temperature parameters of the scanning magnet, the magnetic field detection module, or their surrounding environment.

[0043] The input / output (I / O) module includes a magnetic field closed-loop control unit and a temperature compensation unit.

[0044] The temperature compensation unit performs temperature drift correction on the magnetic field feedback signal based on real-time temperature parameters to obtain the actual magnetic field value after temperature compensation.

[0045] The magnetic field closed-loop control unit generates a magnetic field adjustment control quantity based on the deviation between the target magnetic field value and the actual magnetic field value after temperature compensation, and adjusts the scanning magnet drive signal to make the actual magnetic field generated by the scanning magnet track the target magnetic field.

[0046] The input / output I / O modules here include a scanning magnet drive unit, a magnetic field closed-loop control unit, a temperature compensation unit, and a safety interlock unit.

[0047] Among them, such as Figure 2 As shown, the real-time controller is communicatively connected to the input / output (I / O) module, which in turn is connected to the scanning magnet, magnetic field sensor, current sensor, and temperature sensor. The scanning magnet drive unit within the I / O module is connected to the scanning magnet power supply and outputs excitation current to the scanning magnet. The scanning magnet includes X-axis and Y-axis scanning magnets arranged orthogonally to generate X-axis and Y-axis deflection magnetic fields, respectively, to form a two-dimensional scanning trajectory for the proton beam in the isocentric plane. The magnetic field closed-loop control unit within the I / O module receives the current value and magnetic field strength of the scanning magnet power supply from the current sensor and magnetic field sensor; the temperature compensation unit receives the ambient temperature sampling value from the temperature sensor.

[0048] The real-time controller is built on a heterogeneous computing platform based on FPGA and ARM (such as Zynq MPSoC), runs an embedded Linux operating system, and performs tasks such as scan file reception, trajectory table parsing, task scheduling, data logging, and communication with the host computer. The real-time controller communicates with the I / O modules via Gigabit Ethernet, achieving a synchronization accuracy of less than 100 ns through IEEE 1588 PTP or an external synchronization clock.

[0049] The I / O module is built on an FPGA+ARM platform (such as Zynq), runs a bare core program or a lightweight real-time operating system, and is responsible for local logic control and data acquisition. Specifically, it converts the current command or control parameters generated by the real-time controller into analog or digital control signals that can be recognized by the scanning magnet drive unit, and acquires the current feedback, magnetic field feedback and temperature feedback of the scanning magnet power supply.

[0050] The I / O module includes: 1) at least two analog voltage output channels for outputting control signals for the X-axis and Y-axis scanning magnets respectively; 2) at least four analog voltage input channels for acquiring current feedback and magnetic field feedback signals for the X-axis and Y-axis scanning magnets; 3) at least one temperature acquisition channel for acquiring output signals from a temperature sensor; 4) at least one digital I / O channel for outputting power enable, reset, and safety interlock signals for the scanning magnets; and 5) at least one communication interface for data communication with the real-time controller.

[0051] The real-time controller receives scan files from the treatment planning system. These scan files indicate the location of the target scan points and mainly include the two-dimensional scan coordinates within the current scan layer. Scan layer number, beam energy Scan point dwell time Target dose or target charge Track table check code, etc., where i is the scan point number.

[0052] The scan trajectory parsing unit is used to receive and store a preset scan curve trajectory. This trajectory consists of multiple trajectory samples arranged in chronological order, with each trajectory sample corresponding to a scan point or the target state within a scan cycle. The preset scan curve trajectory is stored in the form of a trajectory table, and the fields included in the table are shown in Table 1.

[0053] Table 1 After receiving the trajectory table, the scan trajectory parsing unit performs an integrity check on it. If the check passes, the trajectory table is written into the real-time controller's DDR and loaded into the FPGA-side trajectory buffer before the scan begins.

[0054] The current command generation unit outputs current commands based on the target scan point position indicated in the scan file. Specifically, based on the target scan point coordinates xi,yi, the current beam energy Ei, the position-magnetic field calibration relationship, and the magnetic field-current calibration relationship, the target magnetic field strength and target excitation current of the scanning magnet in the X and Y directions are calculated respectively. A two-dimensional polynomial fitting model is used between the target scan point position and the target magnetic field strength: (1) in, and These represent the target magnetic field strengths in the X and Y directions, respectively. , The coefficients are obtained by fitting the beam position calibration data, and the coefficients are stored in the calibration parameter table according to the energy layer.

[0055] The relationship between the target magnetic field strength and the target current is calculated using a lookup table and interpolation algorithm. The lookup table includes multiple calibrated magnetic field values. and the corresponding excitation current value When the target magnetic field strength lie in and When the target current is between these two values, it is calculated using the following formula: (2) The real-time controller outputs current commands corresponding to each scan point position sequentially according to the preset scan curve trajectory. A synchronization trigger signal is generated by the FPGA for each scan cycle, and the I / O module updates the DAC output and synchronously acquires feedback signals under the action of the synchronization trigger signal.

[0056] The scanning magnet drive unit receives the current command and controls the output excitation current. The current command uses a 0~10V analog voltage signal, and the current setting ratio is... , This is the voltage-to-current conversion ratio.

[0057] The current sensor is used to detect the actual output current from the magnet power supply output to the scanning magnet. The current sensor is a closed-loop Hall effect current sensor, with an output of 4~20 mA current signal. The actual current is: (3) in, This is the actual output current. This is the current loop feedback value. and These represent the minimum and maximum output currents of the scanning magnet power supply, respectively. The output current signal is converted into a 0~10V analog voltage signal via IV and acquired by a high-precision ADC in the I / O module.

[0058] A magnetic field sensor is used to detect the actual magnetic field strength generated by the scanning magnet. It is installed in the air gap of the scanning magnet, near the beam channel, or near the magnetic poles of the scanning magnet. The magnetic field sensor is a Hall effect magnetic field sensor, used to detect the magnetic field components of the scanning magnet in the X and Y directions, respectively. Its output analog voltage signal is acquired by a high-precision ADC in the I / O module. The output model is as follows: (4) in, The output voltage of the Hall sensor. The sensitivity coefficient at temperature T. This represents the actual magnetic field strength. This is the zero-point bias voltage at temperature T. This is for sampling noise and quantization error.

[0059] The I / O module is equipped with a magnetic field closed-loop control unit, which is used to calculate the deviation between the target magnetic field strength and the actual magnetic field strength after temperature correction, and adjust the output voltage of the magnet power supply according to the deviation through a PID controller.

[0060] Specifically, in the nth scan cycle, the magnetic field closed-loop control unit acquires the target magnetic field strength. And obtain the actual magnetic field strength after temperature compensation. Calculate the magnetic field deviation: (5) The PID controller calculates the voltage regulation using the discrete PID algorithm. The formula for positional PID is: (6) in, This represents the voltage adjustment amount in the nth scan cycle. This is the proportionality coefficient. The integral coefficient is... These are the differential coefficients. This refers to the scan control cycle.

[0061] The magnetic field closed-loop control unit is equipped with feedforward control, and the feedforward voltage is calculated based on the equivalent circuit model of the scanning magnet. (7) in, Let T be the equivalent resistance of the scanning magnet winding at temperature T, and L be the equivalent inductance of the scanning magnet. This is the current command for the current scan cycle.

[0062] The target output voltage of the magnet power supply is: (8) The I / O module converts the target output voltage into an adjusted voltage signal and outputs an adjusted voltage across the scanning magnet, so that the actual magnetic field strength of the scanning magnet tracks the target magnetic field strength.

[0063] The temperature sensor is a PT1000, used to monitor the ambient temperature around the scanning magnet, the temperature of the scanning magnet windings, the temperature near the magnetic field sensor, or the temperature of the scanning magnet core. The I / O module excites the PT1000 through a constant current source and acquires the voltage across its terminals, calculating the temperature according to the following formula: (9) (10) in, This represents the resistance value of the platinum resistance thermometer at real-time temperature. This is the temperature sampling voltage. The excitation current of the constant current source is This is the nominal resistance value at 0℃. This is the temperature coefficient.

[0064] To reduce temperature sampling noise, the temperature compensation unit performs inertial filtering on the temperature sample values: (11) in, This is the filtered temperature value. This is the current temperature sample value. These are the filter coefficients.

[0065] The I / O module stores a temperature-magnetic field coefficient table, which contains the temperature coefficient of the magnetic field, the sensitivity coefficient of the magnetic field sensor, and the zero-point offset value at different temperatures. The temperature-magnetic field coefficient table includes the following fields, as shown in Table 2: Table 2 The temperature compensation unit adjusts the temperature based on the real-time monitored ambient temperature. Obtain the corresponding temperature compensation coefficient from the temperature-magnetic field coefficient table. Equal to a certain calibrated temperature point in the table When, directly read the compensation parameters corresponding to that temperature point; when Located at two adjacent calibration temperature points and When the time interval is between these intervals, linear interpolation is used to calculate the compensation parameters.

[0066] For example, the sensitivity coefficient of a magnetic field sensor is interpolated using the following formula: (12) The zero-point offset is interpolated according to the following formula: (13) The magnetic field temperature compensation coefficient is interpolated according to the following formula: (14) The temperature compensation unit applies the temperature compensation coefficient to the calculation of the magnetic field measurement data to obtain the temperature-corrected magnetic field strength.

[0067] If the output voltage of the magnetic field sensor is Then the temperature-corrected magnetic field strength is: (15) Taking into account both the temperature drift of the magnetic field sensor and the change in the resistance of the scanning magnet winding, the temperature-corrected magnetic field strength is: (16) Temperature-compensated magnetic field strength The data is input to the magnetic field closed-loop control unit for interaction with the target magnetic field strength. The comparison is performed to generate the voltage regulation amount.

[0068] Based on the above, the second aspect of the present invention provides a pencil beam scanning magnetic field control method for the system, such as... Figure 3 As shown, S1: The real-time controller receives pencil beam scanning trajectory data, which includes the scanning point position coordinates, beam energy, scanning layer information, and scanning time parameters; according to the pre-established mapping relationship between the scanning position and the target magnetic field, the position coordinates of the current scanning point are converted into the corresponding target magnetic field value, which includes the target magnetic field component in the X direction and the target magnetic field component in the Y direction.

[0069] S2: Based on the pre-established mapping relationship between the target magnetic field and the excitation current, determine the target excitation current corresponding to the target magnetic field value; based on the electrical characteristic parameters and dynamic response characteristics of the scanning magnet, calculate the feedforward driving quantity used to compensate for the response lag of the scanning magnet; combine the driving signal corresponding to the target excitation current with the feedforward driving quantity to generate the initial control signal of the scanning magnet.

[0070] S3: During the operation of the scanning magnet, the actual magnetic field strength generated by the scanning magnet is collected in real time through the magnetic field detection module; The actual excitation current of the scanning magnet is collected by the current detection module; the real-time temperature parameters of the scanning magnet, the magnetic field detection module, or their surrounding environment are collected by the temperature detection module.

[0071] S4: Based on the real-time collected temperature parameters, obtain the correspondence between the pre-stored temperature parameters and the magnetic field compensation parameters; Based on the temperature compensation parameters, the sensitivity change error and zero drift error in the output signal of the magnetic field detection module are corrected; at the same time, based on the correspondence between temperature change and the change in the resistance of the scanning magnet winding, the magnetic field deviation caused by the change in excitation state due to the change in winding resistance is corrected; and the actual magnetic field value after temperature compensation is obtained.

[0072] S5: Compare the target magnetic field value with the actual magnetic field value after temperature compensation to obtain the magnetic field control error of the scanning magnet in the X and Y directions.

[0073] S6: Input the magnetic field control error into the magnetic field closed-loop control module, and calculate the magnetic field correction amount through the closed-loop control algorithm; The magnetic field correction amount is fused with the feedforward drive amount to generate a scanning magnet drive adjustment signal; the excitation drive voltage of the scanning magnet is adjusted according to the drive adjustment signal so that the actual magnetic field generated by the scanning magnet tracks the target magnetic field value.

[0074] S7: In real time, determine whether the magnetic field error, temperature status, current status, and scanning time corresponding to the current scanning point meet the preset conditions; when the preset conditions are met, switch to the next scanning point and repeat steps S1 to S6 until the preset scanning trajectory is completed.

[0075] In another embodiment of the present invention, steps S1 to S13 are a detailed description of the specific implementation process of the control method described in the claims, wherein multiple steps jointly implement a single functional step in the claims. For example: steps S1 to S3 are used to determine the target magnetic field; steps S4 to S5 are used to generate the scanning magnet drive signal; steps S6 to S8 are used to acquire the actual magnetic field and perform temperature compensation; steps S9 to S11 are used to implement closed-loop control of the magnetic field; and step S13 is used to implement the scanning process propulsion control. The workflow includes the following steps: S1: Receive Scan File. The real-time controller receives the scan file from the treatment planning system, including the two-dimensional scan coordinates within the current scan layer. Scan layer number, beam energy Scan point dwell time Target dose or target charge The real-time controller performs an integrity check on the control signal. If the check passes, the target scan point position is written to the trajectory buffer.

[0076] S2: Parse the preset scan curve trajectory. The real-time controller reads the target scan point position and the corresponding scan parameters sequentially according to the scan point order recorded in the preset scan curve trajectory table.

[0077] S3: Calculate the target magnetic field strength based on the current scan point coordinates. and beam energy The target magnetic field strength is calculated using the position-magnetic field calibration relationship. and .

[0078] S4: Generate current command. Calculate the target current based on the target magnetic field strength and the magnetic field-current calibration model. and .

[0079] S5: Outputs current command and drives the scanning magnet. The I / O module converts the current command into an analog voltage signal. The scanning magnet drive unit controls the magnet power according to the current command to drive the output excitation current, so that the scanning magnet generates a magnetic field for deflecting the proton beam. When the system starts up or switches scanning layers, it first performs open-loop feedforward drive, and then switches to closed-loop regulation after the magnetic field feedback stabilizes.

[0080] S6: Acquires actual current and actual magnetic field. The current sensor detects the magnet power supply output current in real time and sends the current feedback signal to the I / O module. The magnetic field sensor detects the actual magnetic field strength of the scanning magnet in real time and sends the magnetic field feedback signal to the I / O module.

[0081] S7: Acquire ambient temperature. The temperature sensor monitors the ambient temperature around the scanning magnet, the temperature near the magnetic field sensor, or the temperature of the scanning magnet windings, and the I / O module acquires this ambient temperature value.

[0082] S8: Perform temperature compensation. The corresponding temperature compensation coefficient is obtained from the temperature-magnetic field coefficient table based on the real-time temperature. If the real-time temperature falls between two calibration temperature points, the compensation parameter at the current temperature is calculated using linear interpolation. The real-time controller applies the compensation parameter to the magnetic field measurement data to calculate the actual magnetic field strength after temperature correction. .

[0083] S9: Calculate the magnetic field deviation. Calculate the deviation between the target magnetic field strength and the actual magnetic field strength after temperature correction. The magnetic field deviations of the X-axis and Y-axis scanning magnets are calculated independently.

[0084] S10: Adjust the magnet power supply output voltage via a PID controller. Input the magnetic field deviation into the PID controller to calculate the voltage adjustment. Simultaneously, the real-time controller calculates the feedforward voltage based on the equivalent circuit model of the scanning magnet. The feedforward voltage is then superimposed with the PID voltage regulation to obtain the target output voltage. .

[0085] S11: Output the adjusted voltage signal. The I / O module outputs the adjusted voltage signal to adjust the voltage across the scanning magnet, making the actual magnetic field strength approach the target magnetic field strength.

[0086] S12: Safety Judgment and Anomaly Handling. Continuously monitor whether the magnetic field deviation, current deviation, temperature value, and communication status exceed preset thresholds. If they exceed, trigger a safety interlock and record fault information, including event timestamp, scan point sequence number, trajectory table element index, actual current, actual magnetic field, actual temperature, and error code.

[0087] S13: Complete the scan sequentially. If the current scan point reaches the preset dwell time, and the magnetic field deviation, current deviation, dose feedback, and beam position feedback are all within the allowable range, the real-time controller switches to the next scan point and repeats steps S2 to S12 until the current scan layer or the entire treatment plan is completed.

[0088] Compared with the prior art, the technical effects achieved by the present invention are as follows: First, by introducing a real-time feedback mechanism of the actual magnetic field of the scanning magnet, the magnetic field strength is used as the closed-loop control feedback quantity to replace the traditional method of control based solely on the excitation current. This can effectively correct the magnetic field deviation caused by factors such as hysteresis, eddy current, and power supply fluctuation of the scanning magnet, making the scanning magnetic field more accurately track the target magnetic field and improving the proton beam scanning position accuracy and repeatability.

[0089] Secondly, by collecting information on the scanning magnet, magnetic field sensor, and ambient temperature, a temperature compensation model is established to adaptively correct magnetic field errors caused by magnetic field sensor sensitivity drift, zero-point offset, and changes in the winding resistance of the scanning magnet. This reduces the impact of ambient temperature changes on scanning accuracy and improves the magnetic field stability of the equipment during long-term operation.

[0090] Furthermore, the control method that combines closed-loop magnetic field control with feedforward control calculates the drive compensation amount in advance based on the changes in the target magnetic field and adjusts it in real time in conjunction with feedback error. This reduces response lag and overshoot during the scanning point switching process, improves the magnetic field establishment speed and dynamic tracking capability during scanning, and meets the requirements of high-precision pencil beam rapid scanning.

[0091] Finally, by collecting real-time information on magnetic field, current, temperature, and system status, and combining this with a safety interlock mechanism, abnormal deviations during the scanning process can be detected and protected. This allows for the timely detection of abnormal magnetic field, current, and temperature conditions, preventing beam position shifts caused by control deviations and improving the safety and reliability of the proton therapy system.

[0092] The foregoing description of specific exemplary embodiments of the invention is for illustrative and explanatory purposes. These descriptions are not intended to limit the invention to the precise forms disclosed, and it will be apparent that many changes and variations can be made in accordance with the foregoing teachings. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application, thereby enabling those skilled in the art to implement and utilize various different exemplary embodiments of the invention, as well as various different choices and variations. The scope of the invention is intended to be defined by the claims and their equivalents.

Claims

1. A magnetic field feedback temperature-compensated pen beam scanning control system, characterized in that, The system includes: Real-time controller, input / output I / O module, scanning magnet, magnetic field detection module, current detection module, and temperature detection module; The real-time controller is used to receive pencil beam scanning trajectory and irradiation dose data, generate target magnetic field parameters of the scanning magnet based on the scanning trajectory data, and output them to the input / output I / O module. The input / output (I / O) modules are respectively connected to the real-time controller, the scanning magnet power supply, the magnetic field detection module, the current detection module, and the temperature detection module, and are used to execute the scanning magnet power supply control command output, feedback signal acquisition, and closed-loop control. The scanning magnets include an X-axis scanning magnet and a Y-axis scanning magnet arranged orthogonally to each other, which are used to generate a two-dimensional scanning magnetic field that deflects the proton beam in the target plane. The magnetic field detection module is used to detect the actual magnetic field strength generated by the scanning magnet in real time and output a magnetic field feedback signal. The temperature detection module is used to detect the real-time temperature parameters of the scanning magnet, the magnetic field detection module, or their surrounding environment. The input / output I / O module includes a magnetic field closed-loop control unit and a temperature compensation unit; The temperature compensation unit performs temperature drift correction on the magnetic field feedback signal based on real-time temperature parameters to obtain the actual magnetic field value after temperature compensation. The magnetic field closed-loop control unit generates a magnetic field adjustment control quantity based on the deviation between the target magnetic field value and the actual magnetic field value after temperature compensation, and adjusts the scanning magnet power supply drive signal to make the actual magnetic field generated by the scanning magnet power supply track the target magnetic field.

2. The system according to claim 1, characterized in that, The real-time controller includes a scan trajectory parsing unit and a control command generation unit; The scan trajectory parsing unit is used to parse the scan files sent by the treatment planning system to obtain at least the following information: Scan layer number, scan point coordinates, beam energy, dwell time, target dose, and scan sequence; The control command generation unit calculates the corresponding target magnetic field value based on the scanning point coordinates and beam energy using a pre-established position magnetic field calibration model, and generates the target excitation current of the scanning magnet according to the magnetic field-current calibration relationship.

3. The system according to claim 1, characterized in that, The position magnetic field calibration model adopts a two-dimensional calibration model to establish the correspondence between the beam scanning position coordinates and the scanning magnetic field intensity; The magnetic field and current calibration relationship is established by scanning the magnet calibration data, and the target excitation current corresponding to the target magnetic field is obtained by using a lookup table and interpolation algorithm.

4. The system according to claim 1, characterized in that, The magnetic field detection module includes at least one Hall magnetic field sensor; The Hall magnetic field sensor is located in the air gap region of the scanning magnet, the region near the beam channel, or the region near the magnetic pole, and is used to detect the actual magnetic field component generated by the scanning magnet.

5. The system according to claim 1, characterized in that, The temperature compensation unit includes a temperature magnetic field compensation parameter storage module; The temperature and magnetic field compensation parameter storage module stores parameters under different temperature conditions: Sensitivity coefficient of magnetic field sensor, zero-point bias parameter of magnetic field sensor, temperature drift coefficient of magnetic field, and resistance parameter of scanning magnet winding; The temperature compensation unit calls the corresponding compensation parameters according to the real-time temperature parameters, and obtains the compensation parameters under the current temperature conditions through interpolation calculation.

6. The system according to claim 5, characterized in that, The temperature compensation unit compensates according to the following parameters: Errors caused by temperature variations in the sensitivity of the magnetic field sensor; errors caused by zero-point drift in the magnetic field sensor; errors caused by changes in the relationship between the excitation current and the magnetic field due to variations in the resistance of the scanning magnet winding.

7. The system according to claim 1, characterized in that, The magnetic field closed-loop control unit uses a proportional-integral-derivative controller for closed-loop regulation; the magnetic field closed-loop control unit calculates the magnet drive voltage adjustment amount based on the magnetic field error between the target magnetic field value and the actual magnetic field value after temperature compensation.

8. The system according to claim 7, characterized in that, The magnetic field closed-loop control unit further includes a feedforward control module; the feedforward control module calculates the scanning magnet drive feedforward voltage based on the equivalent circuit model of the scanning magnet; the drive feedforward voltage is superimposed with the adjustment voltage output by the proportional-integral-derivative controller and used as the scanning magnet drive voltage.

9. The system according to claim 1, characterized in that, The input / output I / O module also includes a safety interlock unit; The safety interlock unit is used to monitor magnetic field deviation, current deviation, temperature parameters, communication status, and scanning status in real time. When any monitored parameter exceeds the preset threshold, a protection control signal is output, causing the scanning magnet power supply to stop outputting or enter a safe state.

10. A pencil beam scanning magnetic field control method based on the system described in any one of claims 1-9, characterized in that, include: S1: The real-time controller receives pencil beam scanning trajectory data, which includes the scanning point position coordinates, beam energy, scanning layer information, and scanning time parameters; based on the pre-established mapping relationship between the scanning position and the target magnetic field, the current scanning point position coordinates are converted into the corresponding target magnetic field value, which includes the target magnetic field component in the X direction and the target magnetic field component in the Y direction. S2: Based on the pre-established mapping relationship between the target magnetic field and the excitation current, determine the target excitation current corresponding to the target magnetic field value; based on the electrical characteristic parameters and dynamic response characteristics of the scanning magnet, calculate the feedforward driving quantity used to compensate for the response lag of the scanning magnet; combine the driving signal corresponding to the target excitation current with the feedforward driving quantity to generate the initial control signal of the scanning magnet. S3: During the operation of the scanning magnet, the actual magnetic field strength generated by the scanning magnet is collected in real time through the magnetic field detection module; The actual excitation current of the scanning magnet is collected through the current detection module; the real-time temperature parameters of the scanning magnet, the magnetic field detection module, or their surrounding environment are collected through the temperature detection module. S4: Based on the real-time collected temperature parameters, obtain the correspondence between the pre-stored temperature parameters and the magnetic field compensation parameters; Based on the temperature compensation parameters, the sensitivity change error and zero drift error in the output signal of the magnetic field detection module are corrected; at the same time, based on the correspondence between temperature change and the change in resistance of the scanning magnet winding, the magnetic field deviation caused by the change in excitation state due to the change in winding resistance is corrected. Obtain the actual magnetic field value after temperature compensation; S5: Compare the target magnetic field value with the actual magnetic field value after temperature compensation to obtain the magnetic field control error of the scanning magnet in the X and Y directions; S6: Input the magnetic field control error into the magnetic field closed-loop control module, and calculate the magnetic field correction amount through the closed-loop control algorithm; The magnetic field correction amount is fused with the feedforward drive amount to generate a scanning magnet drive adjustment signal; the excitation drive voltage of the scanning magnet is adjusted according to the drive adjustment signal so that the actual magnetic field generated by the scanning magnet tracks the target magnetic field value. S7: In real time, determine whether the magnetic field error, temperature status, current status, and scanning time corresponding to the current scanning point meet the preset conditions; when the preset conditions are met, switch to the next scanning point and repeat steps S1 to S6 until the preset scanning trajectory is completed.