A digital controller control method for beam line magnet power supply
By using the digital controller's DDS communication module, multiple sets of PID parameters, and dual closed-loop control methods, the problems of slow and inconsistent dynamic response of the beamline magnet power supply in the proton therapy system were solved, achieving a fast and stable response of the beamline magnetic field.
Patent Information
- Application Number
- CN202211297351.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2042-10-21
AI Technical Summary
In proton therapy systems, the dynamic response speed of the beam line magnet power supply is slow, and it is difficult to ensure that the dynamic response speed meets the standard across the entire energy range. In particular, there are problems of inconsistent response speed and overshoot during high-to-low energy conversion.
A digital controller control method is adopted, synchronous command reception is realized through the DDS communication module, multiple sets of PID adjustment parameters are configured, the PID parameters are refined, and the feedforward control of the current loop and voltage loop is combined to form a dual closed-loop control system, and the PID parameters are finely adjusted to match the dynamic process of different energy steps.
The rapid dynamic response of the beam line magnetic field during proton therapy is achieved, the dynamic response time is shortened, the stability and response speed of the system are improved, and overshoot and lag caused by communication delay and PID parameter mismatch are avoided.
Smart Images

Figure CN115547615B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of beam line magnet power supply control in proton therapy, and more particularly, relates to a digital controller control method for a beam line magnet power supply. Background Art
[0002] In cyclotron-based proton therapy systems, the proton beam energy ranges from 70 to 240 MeV on the beamline. During the course of patient treatment, the proton beam energy will change from high to low as the treatment thickness changes from deep to shallow.
[0003] The beam line magnets are arranged at intervals starting from the energy degrader outlet and ending at the treatment head, playing the role of guiding and controlling the beam; the beam track in the beam line is unique;
[0004]
[0005] In the above formula, ρ is the radius of the deflection part of the beam orbit, B is the magnetic field value of the deflection magnet, E is the beam energy, and E r is equal to 938MeV. It can be seen from the formula that when the beam energy (E) changes, in order to ensure that the beam deflection orbit radius (ρ) remains unchanged, the magnetic field of each deflection magnet on the beam line must be changed. The method of changing the magnetic field of each deflection magnet is to change the output current of each deflection magnet power supply.
[0006] The magnet power supply is a constant current source that provides excitation current to the beamline magnets, generating a magnetic field that controls the beam's trajectory. As the proton beam energy varies with treatment thickness, the output current of the beamline magnet power supply must be adjusted accordingly to ensure that the beamline magnetic field matches the beam energy changes, ensuring the correct beam trajectory.
[0007] The difficulties in controlling the output current of the magnet power supplies in the beam lines of proton therapy systems are: the communication time required to send the instructions to the power supplies is long, the synchronization of the responses between the power supplies is affected, and the dynamic response speed cannot be guaranteed to meet the requirements at any part of the entire energy range.
[0008] The reasons why the communication time required to send these commands to the power supplies is long and affects the synchronization of responses between the power supplies are: first, beamline energy control is the energy control of the entire beamline. This energy control requires dozens or even hundreds of magnets distributed from the beamline's starting point to its end point. This is a very demanding requirement: regardless of the number of beamline magnets, only when all magnet power supplies complete the dynamic process of output current change within the specified time can the entire beamline complete energy reduction within the specified time. Second, current proton therapy systems control beamline magnet power supplies using a serial command method: commands are sent to multiple magnets one by one. When a large number of power supplies need to be controlled, the communication time is significantly increased. This communication time is superimposed on the dynamic response time, slowing down the dynamic response. Furthermore, there is a long time interval between the first and last magnet power supplies to receive a command, resulting in asynchronous responses between the power supplies.
[0009] The reason why it cannot guarantee that the dynamic response speed in any section of the entire energy range can meet the standard is: at this stage, the control of the power supply is mainly based on a set of PID parameter control methods. Since the beam line magnet is a large inductive load, the inductive energy storage and hysteresis will affect the dynamic response. Since the energy storage of the magnet is different under different currents, the degree of its influence on the dynamic response is also different: in the case of high beam energy, the required magnetic field value is large, so the magnet energy storage is large, and the resistance caused by the magnet energy storage to the descent process is large, and the descent speed will be slower, and the expected energy reduction position is often not reached within the set time range; while in the case of low beam energy, the required magnetic field value is small, so the magnet energy storage is small, and the resistance caused by the magnet energy storage to the descent process is small, and the magnetic field response may exceed the expected energy reduction position and produce overshoot; if the PID parameters suitable for high beam energy are selected, the high beam energy can be accelerated. The magnetic field response changes at different energies. The magnetic field response at low beam energy will overshoot, and the overshoot recovery process is generally slow, resulting in the response time at low energy exceeding the requirement. If PID parameters suitable for low beam energy are selected to prevent the magnetic field response from overshooting at low beam energy, the magnetic field response speed at high beam energy will be even slower, resulting in the response time at high energy exceeding the requirement. The above results in a set of PID parameters being difficult to apply to the entire wide energy range of proton therapy (70-240MeV), and it cannot be guaranteed that the dynamic response speed in any section of the entire energy range can meet the requirements. Summary of the Invention
[0010] To solve the problems existing in the prior art, the present invention proposes a digital controller control method for a beam line magnet power supply. The purpose is to solve the problems of the prior art proton therapy system beam line magnet power supply having a slow dynamic response speed from the starting point to the end point and an inability to ensure that the dynamic response speed in any section of the entire energy range can meet the standard.
[0011] The present invention proposes the following technical solutions to solve the technical problems:
[0012] A method for controlling a beamline magnet power supply using a digital controller is disclosed. The method is based on a digital control unit for a proton therapy beamline magnet power supply. The digital control unit is disposed in a magnet power supply control system for each of a plurality of magnets in the proton therapy beamline. The magnets are spaced from the start point to the end point of a proton therapy accelerator system beamline. The magnet power supply for each magnet includes a magnet master power supply and a magnet slave power supply. The digital control unit includes a magnet master power supply digital control unit and a magnet slave power supply digital control unit.
[0013] The magnet main power digital control unit includes a DDS communication / command module, a table lookup module, a current distribution and parameter forwarding module, and a power control algorithm module; the magnet slave power digital control unit includes a power control algorithm module, the input end of which is connected to the current distribution and parameter forwarding module of the magnet main power supply, and the output end is connected to the magnet power supply;
[0014] The DDS communication / command module of the magnet main power supply has an input end externally connected to the treatment head system and an output end internally connected to the lookup table module; the DDS communication / command module enables the digital control unit of each magnet power supply to simultaneously subscribe to the DDS data published by the treatment head when it is in the same communication domain as the treatment head, and can simultaneously obtain the required beam energy value from the DDS data;
[0015] The table of the magnet main power supply lookup module is differentiated according to the type of magnets on the beam line. Magnets of the same type have the same table. The table stores multiple sets of control parameter information of different energies for a certain type of magnet. Each energy corresponds to a set of control parameters. Each set of control parameters includes energy parameters, current parameters, PID parameters, feedforward parameters, and magnetic field response standard value parameters. Among them, the energy parameters, PID parameters, feedforward parameters, and magnetic field response standard value parameters are shared parameters of the magnet main power supply and the magnet slave power supply; the current parameters are distributed from the magnet main power supply to the magnet slave power supply.
[0016] The table lookup module of the magnet main power supply performs a table lookup according to the parameters of "energy-current-PID and feedforward parameters-magnetic field response standard value" based on the beam energy information sent by the DDS communication / command module of each magnet main power supply digital control unit, obtains the corresponding current, PID and feedforward parameter setting values, and magnetic field response standard value, and sends the table lookup result to the current distribution and parameter forwarding module;
[0017] The current distribution and parameter forwarding module of the magnet main power supply performs current distribution between the main power supply and the slave power supply, and then sends the current distribution results and the energy parameters, PID parameters, feedforward parameters, and magnetic field response standard value parameters obtained by lookup table to the magnet main power supply and the power control algorithm module of the magnet slave power supply, respectively, as the basis for each power control algorithm module to control the power supply.
[0018] It is characterized in that: the digital control method comprises the following steps:
[0019] Step 1: Set multiple sets of magnet power control parameters for different proton therapy energy requirements;
[0020] The multiple sets of magnet power supply control parameters include multiple sets of current parameter values, multiple sets of PID adjustment parameter values, multiple sets of current and voltage feedforward parameter values, and multiple sets of magnetic field response standard values;
[0021] Step 2: Set multiple magnet power supplies on the proton therapy beam line and the current treatment head to be in the same communication domain;
[0022] Step 3: The digital control units of all magnet power supplies in the same communication domain receive the DDS instruction at the same time and obtain the beam energy value from the DDS instruction;
[0023] Step 4: The digital control unit of each magnet power supply obtains the relevant current parameter value, PID adjustment parameter value, current and voltage feedforward parameter value, and magnetic field response standard value based on the current beam energy value;
[0024] Step 5. The digital control unit of each magnet power supply configures the PID link and feedforward link of the current loop and the PID link and feedforward link of the voltage loop in the dual-loop current control loop according to the relevant magnet power supply control parameters obtained from the table, and controls the output current based on the current set value.
[0025] Furthermore, all magnet power supply controllers in the same communication domain of step 3 simultaneously receive the DDS instruction and obtain the beam energy value from the DDS instruction. The specific process is as follows:
[0026] 1) Multiple magnet power supplies are deployed along the proton therapy accelerator beam line from the starting point to the end point;
[0027] The multiple magnet power supplies are used to achieve synchronous changes in beam energy from the starting point to the end point of the beam line;
[0028] 2) In the DDS communication module of each magnet power supply, set the magnet power supply itself and the treatment head system as the same communication domain;
[0029] 3) The treatment head system sends a DDS data packet containing instructions to the digital control units of all magnet power supplies in the communication domain;
[0030] 4) The digital control units of all magnet power supplies in the same communication domain receive the DDS command at the same time;
[0031] 5) Obtain the beam energy value from the DDS instruction.
[0032] Furthermore, the digital control unit of each magnet power supply in step 5 configures the PID link, feedforward link of the current loop and the PID link and feedforward link of the voltage loop in the current control algorithm according to the relevant magnet power supply control parameters obtained by looking up the table, and controls the output current based on the current set value. The specific process is as follows:
[0033] (1) Obtain the current parameters, PID parameters, and feedforward parameters for the current beam energy by looking up the table; the current parameter is the output current value of the magnet power supply / A; the PID parameters are the proportional coefficient KP1, integral coefficient KI1, and differential coefficient KD1 of the current control loop, and the proportional coefficient KP2, integral coefficient KI2, and differential coefficient KD2 of the voltage control loop; the feedforward parameters are the feedforward link parameters of the dual-loop current control loop and the feedforward link parameters of the voltage control loop; the current parameters serve as the current set value in the dual-loop current control algorithm;
[0034] (2) The current set value signal is input into the current control loop and the difference between it and the collected output current feedback value is used to obtain the current error value. The current error value generates an action result signal after the current loop PID controller acts on it. At the same time, the current set value signal also obtains an action result signal through the current loop feedforward link. The action result signals of these two control links are added together and used as the input signal of the voltage control loop.
[0035] (3) The voltage control loop input signal is subtracted from the collected load voltage feedback value to obtain a voltage error value. The voltage error value generates an action result signal after the voltage loop PID controller acts on it. At the same time, the voltage control loop input signal also obtains an action result signal through the voltage loop feedforward link. The action result signals of these two control links are added together to become the final control signal to control the main circuit of the power supply. The final control signal is in the form of a PWM wave with a variable duty cycle. The larger the duty cycle, the greater the final output current.
[0036] Furthermore, the specific control method of the current loop PID controller or the voltage loop PID controller is as follows:
[0037] A. The dynamic process for the current treatment energy is further divided into at least three refined dynamic processes, thereby achieving fine control of the dynamic process and improving response speed and performance; the dynamic process for each treatment energy is a dynamic energy reduction or energy increase process for each treatment energy;
[0038] B. The current loop PID controller or voltage loop PID controller is set to a parallel connection of a proportional link, an integral link, and a differential link. The coefficient of the proportional link is KP, the coefficient of the integral link is KI, and the coefficient of the differential link is KD.
[0039] C. Obtain the proportional coefficient KP1, integral coefficient KI1 and differential coefficient KD1 of the current control loop, and the proportional coefficient KP2, integral coefficient KI2 and differential coefficient KD2 of the voltage control loop for each treatment energy by looking up the table;
[0040] D. Continuously monitor the magnetic field value of the load magnet during each dynamic process, and automatically adjust and modify the PID parameters of the two control loops based on the difference between the magnetic field value and the target value, so that the PID parameters can always match the dynamic process well, speed up the response speed, reduce overshoot, and eliminate the influence of hysteresis;
[0041] Furthermore, the method D automatically adjusts and modifies the PID parameters of the two control loops according to the difference between the magnetic field value and the standard value. The specific steps are as follows:
[0042] 1) Using the magnetic field response standard value obtained from the table and the magnetic field value collected in real time as a reference, calculate the degree of completion of the dynamic process; the calculation formula is:
[0043] Dynamic process completion degree (%) = (B 磁场响应达标值 -B Realtime 磁场值 ) / (B 磁场响应达标值 -B 磁场初始值 )
[0044] The initial value of the magnetic field in the formula is the magnetic field value before the dynamic response, and can be approximately replaced by the standard value of the magnetic field response of the previous dynamic process;
[0045] 2) When the dynamic process of the current treatment energy reaches 50% completion, the proportional coefficients KP1 and KP2 in the two-loop PID controller parameters are increased by 20% each;
[0046] 3) When the dynamic process of the current treatment energy reaches 80% completion, the integral coefficients KI1 and KI2 in the two-loop PID controller parameters are increased by 20%;
[0047] Furthermore, the table lookup is performed according to the parameters of "energy-current-PID and feedforward parameters-magnetic field response standard value", the energy parameter is the beam energy value / MeV, the current parameter is the magnet power supply output current value / A, and the magnet magnetic field is controlled by the power supply output current value / A; the PID parameters are the proportional coefficient KP1, integral coefficient KI1 and differential coefficient KD1 of the current control loop, and the proportional coefficient KP2, integral coefficient KI2 and differential coefficient KD3 of the voltage control loop; the feedforward parameters are the feedforward link parameters of the current control loop and the feedforward link parameters of the voltage control loop; the PID current loop proportional coefficient KP1, integral coefficient KI1 and differential coefficient KD1 are used to control the dynamic energy reduction or increase process for the current energy within a specified time, and the specified time includes 80 milliseconds; the PID voltage loop proportional coefficient KP2, integral coefficient KI2 and differential coefficient KD2 are used to control the dynamic energy reduction or increase process for the current energy within a specified time, and the specified time includes 80 milliseconds.
[0048] Furthermore, the power supply control algorithm module includes a current and voltage dual closed-loop PID algorithm, a feedforward algorithm, and a dynamic process fine PID parameter adjustment algorithm; the parameter configuration in the current and voltage dual closed-loop PID algorithm is obtained based on a lookup table, and the configured parameter values are different under different energy steps; in this way, the PID parameters configured in the high energy reduction step and the low energy reduction step within the entire energy range are all optimal, so that the energy reduction speed, stability, and accuracy of each energy reduction step can all reach the optimal level; the dynamic process fine PID parameter adjustment algorithm further subdivides the dynamic process of magnetic field change corresponding to each energy step into multiple refined dynamic process segments, and adjusts the response speed and response state of each refined dynamic process segment, thereby further improving the response speed of each energy step.
[0049] Furthermore, the current-voltage dual closed-loop PID algorithm has two closed-loop control loops: the first loop is a current loop, and the feedback quantity and control object of the current loop are the output current; the second loop is a voltage loop, and the feedback quantity and control object of the voltage loop are the load voltage. The output of the loop is a PWM wave with a variable duty cycle, which drives the H-bridge in the main circuit of the power supply, thereby controlling the output current of the power supply; the second loop is nested in the first loop, and the output signal of the first loop serves as the input of the second loop; both the first and second loops contain PID control links, whose function is to improve the dynamic performance of the power supply and system stability, and to speed up the response speed; the feedforward algorithm refers to adding a feedforward link in each of the current loop and the voltage loop, which works together with the PID controller to achieve greatly accelerated response speed and compensation for the lag and damping of the controlled system on the basis of ensuring system stability and accuracy.
[0050] Furthermore, the dynamic process fine PID parameter adjustment algorithm refers to dividing the dynamic process of output current change into multiple segments, and automatically adjusting the PID parameters according to the magnetic field response of the load magnet; the specific method is: continuously monitoring the magnetic field value of the load magnet in each segment, and automatically adjusting the PID parameters of the two control loops in each segment according to the size of the gap between the magnetic field value and the standard value, so that the PID parameters can always match the dynamic process well, speed up the response speed and reduce overshoot, and eliminate the influence of hysteresis. The dynamic process is divided into multiple segments, at least three segments.
[0051] Advantages and effects of the present invention
[0052] The present invention combines the DDS communication module, multiple sets of PID adjustment parameters, refined PID adjustment parameters, and a dual-loop + feedforward closed-loop control method, and progresses step by step from the above four aspects and five levels, ultimately solving the problem of rapid dynamic response of the beam line magnetic field during proton therapy. The DDS communication module enables dozens or even hundreds of magnet power supplies to receive commands and respond at the same time, avoiding the problem of increasing the total time of the dynamic process due to excessive communication time between magnet power supplies. This method solves the problem of rapid dynamic response of the proton therapy beam line magnetic field from the first aspect; multiple sets of PID adjustment parameters solve the problem of inconsistent dynamic processes of different energies (or energy reduction lag or energy reduction overshoot), and gives different PID adjustment parameters for high energy steps and low energy steps, thereby adapting to the energy reduction characteristics of different energies. This method solves the problem of rapid dynamic response of the proton therapy beam line magnetic field from the second aspect. The problem of rapid dynamic response of streamline magnetic fields; refining PID adjustment parameters solves the problem of inconsistent dynamic processes within an energy step (fast in the first half, slow in the second half). By further subdividing each energy step into multiple segments and adjusting the PID parameters in the middle and final segments, the problem of inconsistent dynamic processes within an energy step is solved. This method solves the problem of rapid dynamic response of the proton therapy beamline magnetic field from the third aspect. The closed-loop control method of dual loop + feedforward, in which the current loop feedforward and voltage loop feedforward further shorten the dynamic response time from tens of milliseconds to a few seconds, solves the problem of rapid dynamic response of the proton therapy beamline magnetic field from the fourth aspect. The current loop + voltage loop directly solves voltage disturbances within the voltage loop, avoiding the problem of slow response of a single current control loop to voltage disturbances. This method solves the problem of rapid dynamic response of the proton therapy beamline magnetic field from the fifth aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1-1 This is a schematic diagram of the magnet power supply layout for the proton therapy accelerator beam line;
[0054] Figure 1-2 This is a schematic diagram of a digital control unit for the main power supply of the accelerator beam line magnet of the present invention;
[0055] Figure 1-3 A schematic diagram of a digital control unit for a power supply of an accelerator beam line magnet according to the present invention;
[0056] Figure 2 This is a schematic block diagram of the current control algorithm of the digital control unit of the present invention;
[0057] Figure 3 This is a schematic diagram of the hardware circuit structure of the beam line magnet power supply control system of the present invention;
[0058] Figure 4-1 The dynamic process response effect diagram of the present invention before and after the improvement of the magnet power supply of the same type of current treatment energy;
[0059] Figure 4-2 This is a diagram showing the dynamic process response of the present invention after improving the power supply of different types of magnets for current treatment energy;
[0060] Figure 5 This is a flow chart of the control method of the digital controller based on the beam line magnet power supply of the present invention. DETAILED DESCRIPTION
[0061] The present invention will be further explained below with reference to the accompanying drawings:
[0062] Design principle of the present invention
[0063] 1. Problems with the existing technology: First, when the beam line is longer and the number of magnet power supplies is more (dozens or even hundreds), it is actually very difficult to make the last magnet power supply on the beam line to receive the energy reduction instruction achieve the same dynamic process response time as the first magnet power supply to receive the energy reduction instruction, for example, 80 milliseconds. The last magnet power supply to receive the instruction will have a response lag or even timeout. The reason is that according to the traditional method, the energy change command is transmitted one by one from the control system of the first magnet power supply. Although the dynamic change process time of the previous magnet power supply and the next magnet power supply for the current treatment energy is not connected end to end but there is a temporal superposition before and after, when the beam line is very long and the number of magnets from the starting point to the end point is as many as dozens or even hundreds, the problem of delayed response of the end magnet power supply will be highlighted; Second, the energy change range is 70-240MeV. When the energy change range is 70-240MeV, the energy change time of the end magnet power supply will be delayed. When the energy in the high energy region is reduced, for example, from 240MeV to 238MeV, the energy is reduced relatively slowly per unit time, while when the energy is reduced from 72MeV to 70MeV in the low energy region, the energy is reduced relatively quickly per unit time. The traditional method uses a set of PID parameters for both high and low energies. The PID parameters are used to control the speed, accuracy, and stability of a certain energy change dynamic process. According to the traditional method, only one set of PID parameters is used. If the parameters are suitable for high beam energy, the magnetic field response at low beam energy will overshoot and fall below the magnetic field standard value. The overshoot recovery process is generally slow, resulting in the response time at low energy exceeding the requirement. If the parameters are suitable for low beam energy, the magnetic field response at low beam energy will not overshoot, but the magnetic field response speed at high beam energy will be very slow, and the response time will exceed the requirement.
[0064] 2. Design Difficulties of the Present Invention: One difficulty is that proton therapy is a continuous process, and tumors at different locations vary in thickness and area. First, as the thickness of a tumor changes from one thickness to the next, the treatment energy must also change accordingly. There is a prescribed time for each energy level change, for example, 80 milliseconds to complete the transition from one energy level to the next. Second, when the treatment energy reaches the required level, the duration of the treatment at that energy level must also meet the required level, as the tumor area at the current thickness must be scanned and treated. The treatment time determines the area of the tumor that the treatment head scans. The energy ramp-down time and treatment time complement each other. If the energy ramp-down time exceeds the specified requirement (e.g., 80 milliseconds), the excess time will take up the treatment time (because the treatment time for the tumor area at that thickness is predetermined), resulting in a one-minute scan and treatment time that is less than one minute. Consequently, the treatment of the tumor area at the current thickness is not fully treated before the next level is jumped to the next level, leaving part of the tumor area untreated and missing the opportunity for treatment. The reason why the energy reduction time exceeds the expected time is because the time when the magnet power supply at the end receives the command is delayed compared to the time when the dozens of magnet power supplies in front receive the command. If the time of receiving the command is delayed, the energy reduction time of the entire beam line will be delayed. If the energy reduction time of the entire beam line is delayed, the delayed time will occupy the time for treatment with that energy. The second difficulty: Not only are the energy reduction speeds between the high energy ladder and the low energy ladder different (energy storage effect), but also the energy reduction rate within each energy ladder is inconsistent. For example, from 240MeV to 238MeV, the energy reduction rate of the same dynamic process is not uniform. It starts fast, slows down in the middle, and slows down even more at the end. For example, when the energy is reduced to 50%, the reduction rate will slow down. Therefore, if we only improve from using one set of PID parameters for multiple energies to using multiple sets of PID control parameters for multiple energies, we still cannot completely solve the problem, and the response speed still has room for improvement. Difficulty 3. Voltage disturbances in closed-loop control circuits will affect current. If voltage fluctuations occur somewhere in the circuit due to temperature changes, this will in turn affect the output current. If only current loop feedback control is used, the voltage will still fluctuate, which only treats the symptoms but not the root cause, resulting in decreased system stability. Moreover, converting voltage errors into current errors and then controlling them based on the output current error value involves many steps and is time-consuming. The fourth difficulty is that if a voltage loop is added after the current loop PID, the voltage loop can be used to promptly correct errors caused by voltage disturbances, reducing the delay time of the current loop PID in correcting current errors. However, since feedback control is a hysteresis control, using only feedback control can only ensure a dynamic response time of tens of milliseconds, making it difficult to further improve the response speed.
[0065] 3. The solution of the present invention: First, a DDS communication module is adopted to solve the problem of delay in receiving commands by the magnet power supply at the end of the beam line by synchronously receiving commands; second, a method of adjusting multiple sets of PID parameters is adopted to set the PID parameters corresponding to different treatment energies according to empirical values and store them in a table. When in use, the PID parameters of the corresponding energy are obtained by looking up the table; third, a fine PID adjustment method within an energy ladder is adopted to divide an energy ladder into at least three sections. When the magnetic field value of the magnet exceeds 50% of the expected value, the PID control parameters are adjusted to solve the speed slowdown problem. When the magnetic field of the magnet exceeds 80% of the expected value, the PID control parameters are adjusted again to further solve the response slowdown problem; fourth, the current loop + current loop feedforward and voltage loop + voltage loop feedforward methods are adopted to greatly shorten the dynamic response time of the magnetic field through the feedforward method.
[0066] Based on the above invention principle, the present invention designs a digital controller control method for beam line magnet power supply as follows Figure 5 As shown, the control method is based on a digital control unit for a proton therapy beam line magnet power supply. Figure 1-1 、 1-2 、1-3、 Figure 2 、 Figure 3 As shown, the digital control unit is respectively arranged in the magnet power supply control system of each of the multiple magnets in the proton therapy beam line; the multiple magnets are arranged at intervals along the starting point to the end point of the proton therapy accelerator system beam line, characterized in that:
[0067] The magnet power supply of each magnet includes a magnet main power supply and a magnet slave power supply; the digital control unit includes a magnet main power supply digital control unit and a magnet slave power supply digital control unit;
[0068] The magnet main power digital control unit includes a DDS communication / command module, a table lookup module, a current distribution and parameter forwarding module, and a power control algorithm module; the magnet slave power digital control unit includes a power control algorithm module, the input end of which is connected to the current distribution and parameter forwarding module of the magnet main power supply, and the output end is connected to the magnet power supply;
[0069] The DDS communication / command module of the magnet main power supply has an input end externally connected to the treatment head system and an output end internally connected to the lookup table module; the DDS communication / command module enables the digital control unit of each magnet power supply to simultaneously subscribe to the DDS data published by the treatment head when it is in the same communication domain as the treatment head, and can simultaneously obtain the required beam energy value from the DDS data;
[0070] The table of the magnet main power supply lookup module is differentiated according to the type of magnets on the beam line. Magnets of the same type have the same table. The table stores multiple sets of control parameter information of different energies for a certain type of magnet. Each energy corresponds to a set of magnet current control parameters. Each set of magnet current control parameters includes energy parameters, current parameters, PID parameters, feedforward parameters, and magnetic field response standard value parameters. Among them, the energy parameters, PID parameters, feedforward parameters, and magnetic field response standard value parameters are shared parameters of the magnet main power supply and the magnet slave power supply; the current parameters are distributed from the magnet main power supply to the magnet slave power supply.
[0071] The table lookup module of the magnet main power supply performs a table lookup according to the parameters of "energy-current-PID and feedforward parameters-magnetic field response standard value" based on the beam energy information sent by the DDS communication / command module of each magnet main power supply digital control unit, obtains the corresponding current, PID and feedforward parameter setting values, and magnetic field response standard value, and sends the table lookup result to the current distribution and parameter forwarding module;
[0072] The current distribution and parameter forwarding module of the magnet main power supply performs current distribution between the main power supply and the slave power supply, and then sends the current distribution results and the energy parameters, PID parameters, feedforward parameters, and magnetic field response standard value parameters obtained by lookup table to the magnet main power supply and the power control algorithm module of the magnet slave power supply, respectively, as the basis for each power control algorithm module to control the power supply.
[0073] Its characteristics are: the digital control method comprises the following steps:
[0074] Step 1: Set multiple sets of magnet power control parameters for different proton therapy energy requirements;
[0075] The multiple sets of magnet power supply control parameters include multiple sets of current parameter values, multiple sets of PID adjustment parameter values, multiple sets of current and voltage feedforward parameter values, and multiple sets of magnetic field response standard values;
[0076] Step 2: Set multiple magnet power supplies on the proton therapy beam line and the current treatment head to be in the same communication domain;
[0077] Step 3: The digital control units of all magnet power supplies in the same communication domain receive the DDS instruction at the same time and obtain the beam energy value from the DDS instruction;
[0078] Step 4: The digital control unit of each magnet power supply obtains the relevant current parameter value, PID adjustment parameter value, current and voltage feedforward parameter value, and magnetic field response standard value based on the current beam energy value;
[0079] Step 5. The digital control unit of each magnet power supply configures the PID link and feedforward link of the current loop and the PID link and feedforward link of the voltage loop in the dual-loop current control loop according to the relevant magnet power supply control parameters obtained from the table, and controls the output current based on the current set value.
[0080] Furthermore, all magnet power supply controllers in the same communication domain of step 3 simultaneously receive the DDS instruction and obtain the beam energy value from the DDS instruction. The specific process is as follows:
[0081] 1) Multiple magnet power supplies are deployed along the proton therapy accelerator beam line from the starting point to the end point;
[0082] The multiple magnet power supplies are used to achieve synchronous changes in beam energy from the starting point to the end point of the beam line;
[0083] 2) In the DDS communication module of each magnet power supply, set the magnet power supply itself and the treatment head system as the same communication domain;
[0084] 3) The treatment head system sends a DDS data packet containing instructions to the digital control units of all magnet power supplies in the communication domain;
[0085] 4) The digital control units of all magnet power supplies in the same communication domain receive the DDS command at the same time;
[0086] 5) Obtain the beam energy value from the DDS instruction.
[0087] Furthermore, the digital control unit of each magnet power supply in step 5 configures the PID link, feedforward link of the current loop and the PID link and feedforward link of the voltage loop in the current control algorithm according to the relevant magnet power supply control parameters obtained by looking up the table, and controls the output current based on the current set value. The specific process is as follows:
[0088] (1) Obtain the current parameters, PID parameters, and feedforward parameters for the current beam energy by looking up the table; the current parameter is the output current value of the magnet power supply / A; the PID parameters are the proportional coefficient KP1, integral coefficient KI1, and differential coefficient KD1 of the current control loop, and the proportional coefficient KP2, integral coefficient KI2, and differential coefficient KD3 of the voltage control loop; the feedforward parameters are the feedforward link parameters of the dual-loop current control loop and the feedforward link parameters of the voltage control loop; the current parameters serve as the current set value in the dual-loop current control algorithm;
[0089] (2) The current set value signal is input into the current control loop and the difference between it and the collected output current feedback value is used to obtain the current error value. The current error value generates an action result signal after the current loop PID controller acts on it. At the same time, the current set value signal also obtains an action result signal through the current loop feedforward link. The action result signals of these two control links are added together and used as the input signal of the voltage control loop.
[0090] (3) The voltage control loop input signal is subtracted from the collected load voltage feedback value to obtain a voltage error value. The voltage error value generates an action result signal after the voltage loop PID controller acts on it. At the same time, the voltage control loop input signal also obtains an action result signal through the voltage loop feedforward link. The action result signals of these two control links are added together to become the final control signal to control the main circuit of the power supply. The final control signal is in the form of a PWM wave with a variable duty cycle. The larger the duty cycle, the greater the final output current.
[0091] Furthermore, the specific control method of the current loop PID controller or the voltage loop PID controller is as follows:
[0092] A. The dynamic process for the current treatment energy is further divided into at least three refined dynamic processes, thereby achieving fine control of the dynamic process and improving response speed and performance; the dynamic process for each treatment energy is a dynamic energy reduction or energy increase process for each treatment energy;
[0093] B. The current loop PID controller or voltage loop PID controller is set to a parallel connection of a proportional link, an integral link, and a differential link. The coefficient of the proportional link is KP, the coefficient of the integral link is KI, and the coefficient of the differential link is KD.
[0094] C. Obtain the proportional coefficient KP1, integral coefficient KI1 and differential coefficient KD1 of the current control loop, and the proportional coefficient KP2, integral coefficient KI2 and differential coefficient KD3 of the voltage control loop for each treatment energy by looking up the table;
[0095] D. Continuously monitor the magnetic field value of the load magnet during each dynamic process, and automatically adjust and modify the PID parameters of the two control loops based on the difference between the magnetic field value and the target value, so that the PID parameters can always match the dynamic process well, speed up the response speed, reduce overshoot, and eliminate the influence of hysteresis;
[0096] Furthermore, the method D automatically adjusts and modifies the PID parameters of the two control loops according to the difference between the magnetic field value and the standard value. The specific steps are as follows:
[0097] 1) Using the magnetic field response standard value obtained from the table and the magnetic field value collected in real time as a reference, calculate the degree of completion of the dynamic process; the calculation formula is:
[0098] Dynamic process completion degree (%) = (B 磁场响应达标值 -B Realtime 磁场值 ) / (B 磁场响应达标值 -B 磁场初始值 )
[0099] The initial value of the magnetic field in the formula is the magnetic field value before the dynamic response, and can be approximately replaced by the standard value of the magnetic field response of the previous dynamic process;
[0100] 2) When the dynamic process of the current treatment energy reaches 50% completion, the proportional coefficients KP1 and KP2 in the two-loop PID controller parameters are increased by 20% each;
[0101] 3) When the dynamic process of the current treatment energy reaches 80% completion, the integral coefficients KI1 and KI2 in the two-loop PID controller parameters are increased by 20%;
[0102] Furthermore, the table lookup is performed according to the parameters of "energy-current-PID and feedforward parameters-magnetic field response standard value", the energy parameter is the beam energy value / MeV, the current parameter is the magnet power supply output current value / A, and the magnet magnetic field is controlled by the power supply output current value / A; the PID parameters are the proportional coefficient KP1, integral coefficient KI1 and differential coefficient KD1 of the current control loop, and the proportional coefficient KP2, integral coefficient KI2 and differential coefficient KD3 of the voltage control loop; the feedforward parameters are the feedforward link parameters of the current control loop and the feedforward link parameters of the voltage control loop; the PID current loop proportional coefficient KP1, integral coefficient KI1 and differential coefficient KD1 are used to control the dynamic energy reduction or increase process for the current energy within a specified time, and the specified time includes 80 milliseconds; the PID voltage loop proportional coefficient KP2, integral coefficient KI2 and differential coefficient KD2 are used to control the dynamic energy reduction or increase process for the current energy within a specified time, and the specified time includes 80 milliseconds.
[0103] Furthermore, the power supply control algorithm module includes a current and voltage dual closed-loop PID algorithm, a feedforward algorithm, and a dynamic process fine PID parameter adjustment algorithm; the parameter configuration in the current and voltage dual closed-loop PID algorithm is obtained based on a lookup table, and the configured parameter values are different under different energy steps; in this way, the PID parameters configured in the high energy reduction step and the low energy reduction step within the entire energy range are all optimal, so that the energy reduction speed, stability, and accuracy of each energy reduction step can all reach the optimal level; the dynamic process fine PID parameter adjustment algorithm further subdivides the dynamic process of magnetic field change corresponding to each energy step into multiple refined dynamic process segments, and adjusts the response speed and response state of each refined dynamic process segment, thereby further improving the response speed of each energy step.
[0104] Furthermore, the current-voltage dual closed-loop PID algorithm has two closed-loop control loops: the first loop is a current loop, and the feedback quantity and control object of the current loop are the output current; the second loop is a voltage loop, and the feedback quantity and control object of the voltage loop are the load voltage. The output of the loop is a PWM wave with a variable duty cycle, which drives the H-bridge in the main circuit of the power supply, thereby controlling the output current of the power supply; the second loop is nested in the first loop, and the output signal of the first loop serves as the input of the second loop; both the first and second loops contain PID control links, whose function is to improve the dynamic performance of the power supply and system stability, and to speed up the response speed; the feedforward algorithm refers to adding a feedforward link in each of the current loop and the voltage loop, which works together with the PID controller to achieve greatly accelerated response speed and compensation for the lag and damping of the controlled system on the basis of ensuring system stability and accuracy.
[0105] Furthermore, the dynamic process fine PID parameter adjustment algorithm refers to dividing the dynamic process of output current change into multiple segments, and automatically adjusting the PID parameters according to the magnetic field response of the load magnet; the specific method is: continuously monitoring the magnetic field value of the load magnet in each segment, and automatically adjusting the PID parameters of the two control loops in each segment according to the size of the gap between the magnetic field value and the standard value, so that the PID parameters can always match the dynamic process well, speed up the response speed and reduce overshoot, and eliminate the influence of hysteresis. The dynamic process is divided into multiple segments, at least three segments.
[0106] Example 1
[0107] Take the beam line magnet power controller of CYCIAE-230 as an example
[0108] The present invention provides a digital control system for a proton therapy beam line magnet power supply, comprising a DDS communication / command module, a table lookup module, and a power control algorithm module. Figure 1-1 The figure shows the power supply of each beamline magnet of different types. Figure 1-1 Although only 2 types and 10 magnets are shown, this embodiment actually uses 5 types and 34 beamline magnets that need to use power supplies controlled by this system.
[0109] 1. Hardware Connection: The digital controller of each of the 34 power supplies is connected to the treatment head via a network cable. Each power supply uses the DDS communication / command module in the digital control system to set itself and the treatment head in the same communication domain.
[0110] 2. Take the 60° deflection magnet as an example during the process of reducing the beam energy from 237.71MeV to 236.816MeV: The 60° deflection magnet power supply consists of a distributed architecture with one master power supply and three slave power supplies. Their models, rated voltages, and current output performance are exactly the same.
[0111] The DDS command signal is sent from the treatment head, containing the information of 236.816 MeV. Because the magnet power supplies are in the same communication domain as the treatment head, they receive this DDS command signal at the same time and obtain the information of the new beam energy value from it.
[0112] Subsequently, the DDS communication / command module of the digital control unit of the main power supply of the magnet sends this 236.816MeV to the table lookup module. The table lookup module uses the "energy-current-PID and feedforward parameters-magnetic field response standard value" lookup table as the basis to find out that the current setting value corresponding to this energy is 436.8A, and the PID and feedforward parameters corresponding to this dynamic process are: current loop: proportional coefficient KP1=2.75, integral coefficient KI1=17.4e-05 and differential coefficient KD1=0, and the proportional coefficient KP2=2.1e-05, integral coefficient KI2=3e-05 and differential coefficient KD2=0.0003 of the voltage control loop; the current loop feedforward parameter is 0.9, and the voltage loop feedforward parameter is 0.55; the magnetic field response standard value under 236.816MeV is 1.6488T.
[0113] For different magnet power supplies, such as 30° deflection magnet power supply, 75° deflection magnet power supply, quadrupole magnet power supply, and thin quadrupole magnet power supply, the above parameters will be different.
[0114] The energy, current, PID, and feedforward parameters for the beamline magnet power supply for the CYCIAE-230 were obtained through joint debugging experiments, compiled, and stored in the control circuit's FPGA for easy recall. The lookup table for different magnet power supplies shows different current, PID, and feedforward parameters (i.e., magnetic field target values) for the same beam energy.
[0115] The master power supply divides the set current of 438.6A into four equal parts, each of 109.65A, which serve as the set currents for the master power supply and three slave power supplies. The master power supply distributes this 109.65A current setting and the other parameters mentioned above to the three slave power supplies via a parameter forwarding module. After configuring the PID loop and feedforward loop of the current loop and the PID loop and feedforward loop of the voltage loop in their respective dual-loop current control loops according to the aforementioned parameters, the four power supplies control the output current based on the current setting of 109.65A. Finally, the master power supply and the three slave power supplies are connected in parallel to output a current of 436.8A.
[0116] In the dynamic process, in order to make the response faster, the dynamic process fine PID adjustment algorithm is used; the specific steps are as follows:
[0117] 1) Using the magnetic field response standard value of 1.6488T obtained from the table and the magnetic field value collected in real time as a reference, calculate the degree of completion of the dynamic process; the calculation formula is:
[0118] Completion degree of dynamic process (%) = (B magnetic field response standard value - B real-time magnetic field value) / (B magnetic field response standard value - B magnetic field initial value)
[0119] The initial value of the magnetic field in the formula is the magnetic field value before the dynamic response, which can be approximately replaced by the standard value of the magnetic field response of the previous dynamic process, 1.6523T;
[0120] 2) When the degree of completion of the dynamic process reaches 50% (i.e., when the magnetic field reaches 1.6505T), the proportional coefficients KP1 and KP2 in the two-loop PID controller parameters are increased by 20% each (i.e., KP1 = 3.3, KP2 = 2.1e-05);
[0121] 3) When the degree of completion of the dynamic process reaches 80% (i.e., when the magnetic field reaches 1.6516T), the integral coefficients KI1 and KI2 in the two-loop PID controller parameters are increased by 20% (i.e., KI1 = 20.88e-05, KI2 = 3.6e-05);
[0122] The safety interlock system in the power digital control system in this embodiment includes: internal interlocks including: (1) the power supply temperature is too high (over 40°C), the power supply leakage current is too large (greater than 0.1A), the output exceeds the rated value, and the energy information in the DDS instruction is incorrect (for example, not within the proton therapy energy range). When the above situations occur, the digital controller should control the power supply to shut down immediately or maintain the current state unchanged. (2) The external interlock has 5 interfaces, one of which is used to connect the magnetic relay that detects whether the load magnet is overheated, and the other 4 are reserved for subsequent development. If any of the safety interlocks is triggered, the power supply will immediately stop output and shut down.
[0123] like Figure 2 The following is a block diagram of the current output control program in this embodiment. The two PID parameters and feedforward parameters of the dual-loop are determined through experimental testing to ensure optimal dynamic response for each energy range. These values are stored in a lookup table called "Energy - Current - PID and Feedforward Parameters - Magnetic Field Response Standard Values."
[0124] like Figure 3 The following is a block diagram of the digital controller hardware circuitry in this embodiment. The ZYNQ chip is an ARM-based model with an integrated Linux system to better control and monitor the power supply's output, communication, and problem diagnosis processes. This also facilitates the development of a visual interface for the power supply.
[0125] The ZYNQ chip integrates a DDS command response program and digital control algorithm, storing a lookup table for energy, current, PID and feedforward parameters, and magnetic field response target values. After current control is complete, the DSP generates a PWM waveform, driving the power supply's main circuit and generating output current.
[0126] In this embodiment, to ensure high precision, the current feedback module adopts DCCT, and the precision of the AD conversion module is 24 bits.
[0127] The lookup table of the present invention includes PID parameters and feedforward parameters, which allow different parameters to be used in the dynamic process of different energy steps (e.g., from 237.71 MeV to 236.816 MeV and from 71.73 MeV to 70 MeV). This is to ensure that the PID parameters configured in the high-energy and low-energy de-escalation steps within the entire energy range are optimized, thereby achieving optimal energy de-escalation speed, stability, and accuracy for each energy de-escalation step.
[0128] The differences in current parameters, PID and feedforward parameters between power supplies for different types of magnets are due to the different magnet types, which is essentially different from the different PID and feedforward parameters between different energy steps described in the previous paragraph.
[0129] like Figure 4-1 The magnetic field response comparison diagram provided for an embodiment of the present invention takes the magnetic field response of a 60° magnet under a current of 307A as an example to illustrate the superiority of the method of this article. In the CYCIAE-230 proton therapy system, the dynamic response time of the magnetic field is required to be less than 80ms. If the method of the present invention is not used, that is, when a set of PID parameters are used for different energy segments, the dynamic response at a current of 307A will overshoot, resulting in a response time of up to 273.5ms. Using the digital control method proposed in this article to improve the response can eliminate the overshoot and reduce the response time from 273.5ms to 50.67ms, meeting the requirement of less than 80ms. The superiority of the method of this article is demonstrated through comparison.
[0130] like Figure 4-2 A comparison of the magnetic field response times of four types of magnets provided in one embodiment of the present invention shows that the fastest response time for each magnet is 27ms, while the slowest is 67ms, all meeting the requirement of less than 80ms. This demonstrates that the patented method is applicable to all types of magnets and magnet power supplies.
[0131] It should be emphasized that the above specific embodiments are merely explanations of the present invention and are not limitations of the present invention. After reading this specification, those skilled in the art may make non-creative modifications to the above embodiments as needed, but as long as they are within the scope of the claims of the present invention, they are protected by patent law.
Claims
1. A method for controlling a digital controller of a beamline magnet power supply, the method being based on a digital control unit for a proton therapy beamline magnet power supply, the digital control unit being disposed in a magnet power supply control system for each of a plurality of magnets in the proton therapy beamline; the plurality of magnets being disposed at intervals along the beamline of a proton therapy accelerator system from a starting point to an end point, the method being characterized in that: The magnet power supply of each magnet includes a magnet main power supply and a magnet slave power supply; the digital control unit includes a magnet main power supply digital control unit and a magnet slave power supply digital control unit; The magnet main power digital control unit includes a DDS communication / command module, a table lookup module, a current distribution and parameter forwarding module, and a power control algorithm module; the magnet slave power digital control unit includes a power control algorithm module, the input end of which is connected to the current distribution and parameter forwarding module of the magnet main power supply, and the output end is connected to the magnet power supply; The DDS communication / command module of the magnet main power supply has an input end externally connected to the treatment head system and an output end internally connected to the lookup table module; the DDS communication / command module enables the digital control unit of each magnet power supply to simultaneously subscribe to the DDS data published by the treatment head when it is in the same communication domain as the treatment head, and can simultaneously obtain the required beam energy value from the DDS data; The table of the magnet main power supply lookup module is differentiated according to the type of magnets on the beam line. Magnets of the same type have the same table. The table stores multiple sets of control parameter information of different energies for a certain type of magnet. Each energy corresponds to a set of magnetic field control parameters. Each set of magnetic field control parameters includes energy parameters, current parameters, PID parameters, feedforward parameters, and magnetic field response standard value parameters. Among them, the energy parameters, PID parameters, feedforward parameters, and magnetic field response standard value parameters are shared parameters of the magnet main power supply and the magnet slave power supply; the current parameters are distributed from the magnet main power supply to the magnet slave power supply. The table lookup module of the magnet main power supply performs a table lookup according to the parameters of "energy-current-PID and feedforward parameters-magnetic field response standard value" based on the beam energy information sent by the DDS communication / command module of each magnet main power supply digital control unit, obtains the corresponding current, PID and feedforward parameter setting values, and magnetic field response standard value, and sends the table lookup result to the current distribution and parameter forwarding module; The current distribution and parameter forwarding module of the magnet main power supply performs current distribution between the main power supply and the slave power supply, and then sends the current distribution result and the energy parameters, PID parameters, feedforward parameters, and magnetic field response standard value parameters obtained by looking up the table to the magnet main power supply and the power control algorithm module of the magnet slave power supply as the basis for each power control algorithm module to control the power supply; The digital control method comprises the following steps: Step 1: Set multiple sets of magnet power control parameters for different proton therapy energy requirements; The multiple sets of magnet power supply control parameters include multiple sets of current parameter values, multiple sets of PID adjustment parameter values, multiple sets of current and voltage feedforward parameter values, and multiple sets of magnetic field response standard values; Step 2: Set multiple magnet power supplies on the proton therapy beam line and the current treatment head to be in the same communication domain; Step 3: The digital control units of all magnet power supplies in the same communication domain receive the DDS instruction at the same time and obtain the beam energy value from the DDS instruction; Step 4: The digital control unit of each magnet power supply obtains the relevant current parameter value, PID adjustment parameter value, current and voltage feedforward parameter value, and magnetic field response standard value based on the current beam energy value; Step 5. The digital control unit of each magnet power supply configures the PID link and feedforward link of the current loop and the PID link and feedforward link of the voltage loop in the dual-loop current control loop according to the relevant magnet power supply control parameters obtained from the table, and controls the output current based on the current set value.
2. A digital controller control method for a beam line magnet power supply according to claim 1, characterized in that All magnet power supply controllers in the same communication domain of step 3 receive the DDS instruction at the same time and obtain the beam energy value from the DDS instruction. The specific process is as follows: 1) Multiple magnet power supplies are deployed along the proton therapy accelerator beam line from the starting point to the end point; The multiple magnet power supplies are used to achieve synchronous changes in beam energy from the starting point to the end point of the beam line; 2) In the DDS communication module of each magnet power supply, set the magnet power supply itself and the treatment head system as the same communication domain; 3) The treatment head system sends a DDS data packet containing instructions to the digital control units of all magnet power supplies in the communication domain; 4) The digital control units of all magnet power supplies in the same communication domain receive the DDS command at the same time; 5) Obtain the beam energy value from the DDS instruction.
3. The digital controller control method for a beam line magnet power supply according to claim 1, characterized in that : The digital control unit of each magnet power supply in step 5 configures the PID link, feedforward link of the current loop and the PID link and feedforward link of the voltage loop in the current control algorithm according to the relevant magnet power supply control parameters obtained by looking up the table, and controls the output current based on the current set value. The specific process is as follows: (1) Obtain the current parameters, PID parameters, and feedforward parameters for the current beam energy by looking up the table; the current parameter is the output current value of the magnet power supply / A; the PID parameters are the proportional coefficient KP1, integral coefficient KI1, and differential coefficient KD1 of the current control loop, and the proportional coefficient KP2, integral coefficient KI2, and differential coefficient KD2 of the voltage control loop; the feedforward parameters are the feedforward link parameters of the dual-loop current control loop and the feedforward link parameters of the voltage control loop; the current parameters serve as the current set value in the dual-loop current control algorithm; (2) The current set value signal is input into the current control loop and the difference between it and the collected output current feedback value is used to obtain the current error value. The current error value generates an action result signal after the current loop PID controller acts on it. At the same time, the current set value signal also obtains an action result signal through the current loop feedforward link. The action result signals of these two control links are added together and used as the input signal of the voltage control loop. (3) The voltage control loop input signal is subtracted from the collected load voltage feedback value to obtain a voltage error value. The voltage error value generates an action result signal after the voltage loop PID controller acts on it. At the same time, the voltage control loop input signal also obtains an action result signal through the voltage loop feedforward link. The action result signals of these two control links are added together to become the final control signal to control the main circuit of the power supply. The final control signal is in the form of a PWM wave with a variable duty cycle. The larger the duty cycle, the greater the final output current.
4. A digital controller control method for a beam line magnet power supply according to claim 3, characterized in that The specific control method of the current loop PID controller or the voltage loop PID controller is as follows: A. The dynamic process for the current treatment energy is further divided into at least three refined dynamic processes, thereby achieving fine control of the dynamic process and improving response speed and performance; the dynamic process for each treatment energy is a dynamic energy reduction or energy increase process for each treatment energy; B. The current loop PID controller or voltage loop PID controller is set to a parallel connection of a proportional link, an integral link, and a differential link. The coefficient of the proportional link is KP, the coefficient of the integral link is KI, and the coefficient of the differential link is KD. C. Obtain the proportional coefficient KP1, integral coefficient KI1 and differential coefficient KD1 of the current control loop, and the proportional coefficient KP2, integral coefficient KI2 and differential coefficient KD2 of the voltage control loop for each treatment energy by looking up the table; D. Continuously monitor the magnetic field value of the load magnet in each refined dynamic process, and automatically adjust and modify the PID parameters of the two control loops according to the size of the gap between the magnetic field value and the standard value, so that the PID parameters can always match the dynamic process well, speed up the response speed, reduce overshoot, and eliminate the influence of hysteresis.
5. A digital controller control method for a beam line magnet power supply according to claim 4, characterized in that The method D automatically adjusts and modifies the PID parameters of the two control loops according to the difference between the magnetic field value and the standard value. The specific steps are as follows: 1) Using the magnetic field response standard value obtained from the table and the magnetic field value collected in real time as a reference, calculate the degree of completion of the dynamic process; the calculation formula is: Dynamic process completion degree (%) = (B 磁场响应达标值 -B Realtime 磁场值 ) / (B 磁场响应达标值 -B 磁场初始值 ) The initial value of the magnetic field in the formula is the magnetic field value before the dynamic response, and can be approximately replaced by the standard value of the magnetic field response of the previous dynamic process; 2) When the dynamic process of the current treatment energy reaches 50% completion, the proportional coefficients KP1 and KP2 in the two-loop PID controller parameters are increased by 20% each; 3) When the degree of completion of the dynamic process of the current treatment energy reaches 80%, the integral coefficients KI1 and KI2 in the two-loop PID controller parameters are increased by 20%.
6. The digital controller control method for a beam line magnet power supply according to claim 1, characterized in that: The table lookup is performed according to the parameters of "energy-current-PID and feedforward parameters-magnetic field response standard value". The energy parameter is the beam energy value / MeV, the current parameter is the magnet power supply output current value / A, and the magnet magnetic field is controlled by the power supply output current value / A; the PID parameters are the proportional coefficient KP1, integral coefficient KI1, and differential coefficient KD1 of the current control loop, and the proportional coefficient KP2, integral coefficient KI2, and differential coefficient KD2 of the voltage control loop; the feedforward parameters are the feedforward link parameters of the current control loop and the feedforward link parameters of the voltage control loop; the PID current loop proportional coefficient KP1, integral coefficient KI1, and differential coefficient KD1 are used to control the dynamic energy reduction or increase process for the current energy within a specified time, wherein the specified time is 80 milliseconds; the PID voltage loop proportional coefficient KP2, integral coefficient KI2, and differential coefficient KD2 are used to control the dynamic energy reduction or increase process for the current energy within a specified time, wherein the specified time is 80 milliseconds.
7. The digital controller control method for a beam line magnet power supply according to claim 1, characterized in that: The power supply control algorithm module includes a current and voltage dual closed-loop PID algorithm, a feedforward algorithm, and a dynamic process fine PID parameter adjustment algorithm; the parameter configuration in the current and voltage dual closed-loop PID algorithm is obtained based on a lookup table, and the configured parameter values are different under different energy steps; in this way, the PID parameters configured in the high-energy and low-energy energy reduction steps within the entire energy range are all optimal, so that the energy reduction speed, stability, and accuracy of each energy reduction step can all reach the optimal level; the dynamic process fine PID parameter adjustment algorithm further subdivides the dynamic process of magnetic field change corresponding to each energy step into multiple refined dynamic process segments, adjusts the response speed and response state of each refined dynamic process segment, thereby further improving the response speed of each energy step.
8. The digital controller control method for a beam line magnet power supply according to claim 7, characterized in that: The current-voltage dual closed-loop PID algorithm has two closed-loop control loops: the first loop is a current loop, and the feedback quantity and control object of the current loop are the output current; the second loop is a voltage loop, and the feedback quantity and control object of the voltage loop are the load voltage. The output of the loop is a PWM wave with a variable duty cycle, which drives the H-bridge in the main circuit of the power supply and thereby controls the output current of the power supply; the second loop is nested in the first loop, and the output signal of the first loop serves as the input of the second loop; both the first and second loops contain PID control links, which are used to improve the dynamic performance of the power supply and system stability and speed up the response speed; the feedforward algorithm refers to adding a feedforward link in each of the current loop and the voltage loop, which works together with the PID controller to achieve greatly accelerated response speed and compensate for the hysteresis and damping of the controlled system while ensuring system stability and accuracy.
9. The digital controller control method for a beam line magnet power supply according to claim 7, characterized in that: The dynamic process fine PID parameter adjustment algorithm refers to dividing the dynamic process of output current change into multiple segments and automatically adjusting the PID parameters according to the magnetic field response of the load magnet; the specific method is: continuously monitoring the magnetic field value of the load magnet in each segment, and automatically adjusting the PID parameters of the two control loops in each segment according to the size of the gap between the magnetic field value and the standard value, so that the PID parameters can always be well matched to the dynamic process, speeding up the response speed and reducing overshoot, eliminating the influence of hysteresis. The dynamic process is divided into multiple segments, at least three segments.
Citation Information
Patent Citations
Operation method for eliminating hysteresis effect influence of synchronous accelerator
CN102548182A
Device and method for synchronously switching current of beam transport line magnet power supply
CN111506142A