Accelerator beam position control method based on PID (Proportion Integration Differentiation) control algorithm and electronic equipment

By applying a beam current position control method based on PID control algorithm in the accelerator, the operating parameters of the quadrupole magnet are adjusted using the deviation value and the deviation change rate, the problem of beam current position offset of the accelerator is solved, and high-precision automatic control is achieved.

CN120103697APending Publication Date: 2025-06-06NEUTRON TIMES (QINGDAO) INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510245829.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

During the operation of the accelerator, due to environmental factors, equipment accuracy and human operation, the beam position may be offset, resulting in reduced beam quality and safety hazards. The traditional manual calibration method has low automation degree and limited accuracy.

Method used

The accelerator beam current position control method based on the PID control algorithm is adopted. By obtaining the beam current position at three consecutive times, calculating the deviation value and deviation change rate, and adjusting the PID control parameters of the quadrupole magnet PID controller to realize dynamic real-time adjustment and adaptive control of the beam current position.

Benefits of technology

The automation and precise control of the accelerator beam position is realized, the degree of automation and control accuracy is improved, labor costs are reduced, and uncertainty brought about by human operation factors is overcome.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120103697A_ABST
    Figure CN120103697A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of accelerator control, particularly provides an accelerator beam position control method based on a PID control algorithm and electronic equipment, and aims to solve the problem of how to automatically control the beam position in the operation process of an accelerator. In order to achieve the purpose, the accelerator beam position control method based on the PID control algorithm comprises the steps of obtaining a first beam position of an accelerator at a first moment; acquiring a second beam position of the accelerator at a second moment, and calculating a first deviation value; acquiring a third beam position of the accelerator at a third moment, calculating a second deviation value, and calculating a deviation change rate according to the first deviation value and the second deviation value; according to the first deviation value, the second deviation value and the deviation change rate, PID control parameters of a quadrupole magnet PID controller of the accelerator are adjusted so as to change operation parameter values of a quadrupole magnet, and the beam position of the accelerator is adjusted to a preset position. According to the invention, the beam position can be dynamically adjusted in real time, and the control precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of accelerator control, and specifically provides an accelerator beam position control method and electronic equipment based on a PID control algorithm. Background Art

[0002] During the actual operation of large-scale particle accelerators, various factors such as environmental factors, equipment accuracy, and human operation may cause abnormal magnetic field components, thereby causing the beam position to shift, reducing the beam quality, and even causing safety hazards.

[0003] Therefore, during the operation of the accelerator, it is generally necessary to calibrate the beam position. In some related technologies in this field, manual calibration is usually adopted, that is, the technician observes the movement of the beam position to adjust the magnitude of the quadrupole magnet current to change the beam position. However, this method, which relies on the technician's experience to make judgments and operations, has low automation and work efficiency on the one hand, and is heavily dependent on the technician's professional level on the other hand. It is greatly affected by human operation factors and has limited control accuracy of the beam position.

[0004] Accordingly, the art needs a new technical solution to solve the above problems. Summary of the invention

[0005] The present application aims to solve the above technical problem, that is, to solve the problem of how to automatically control the beam position during the operation of the accelerator.

[0006] In a first aspect, the present application provides an accelerator beam position control method based on a PID control algorithm, comprising:

[0007] Obtaining a first beam position of the accelerator at a first moment;

[0008] Acquiring a second beam position of the accelerator at a second moment, and calculating a first deviation value of the second beam position relative to the first beam position;

[0009] Acquiring a third beam position of the accelerator at a third moment, calculating a second deviation value of the third beam position relative to the second beam position, and calculating a deviation change rate according to the first deviation value and the second deviation value;

[0010] The PID control parameters of the quadrupole magnet PID controller of the accelerator are adjusted according to the first deviation value, the second deviation value and the deviation change rate to change the operating parameter value of the quadrupole magnet and adjust the accelerator beam position to a preset position.

[0011] In a technical solution of the above control method, the step of "adjusting the PID control parameters of the quadrupole magnet PID controller of the accelerator according to the first deviation value, the second deviation value and the deviation change rate" includes:

[0012] The integral term in the PID output of the quadrupole magnet PID controller is reset according to the first deviation value, the second deviation value and the deviation change rate.

[0013] In a technical solution of the above control method, the step of “resetting the integral term in the PID output of the quadrupole magnet PID controller according to the first deviation value, the second deviation value and the deviation change rate” includes:

[0014] When the absolute value of the first deviation value and / or the absolute value of the second deviation value is greater than a first preset value, determining whether the deviation change rate is positive or negative;

[0015] When the deviation change rate is a positive value, the sign of the integral term is reversed;

[0016] When the deviation change rate is a negative value, adjusting the integral term according to the absolute value of the deviation change rate;

[0017] When the absolute value of the first deviation value and the absolute value of the second deviation value are both less than or equal to a first preset value, the integral term is kept unchanged.

[0018] In a technical solution of the above control method, the step of “adjusting the integral term according to the absolute value of the deviation change rate” includes:

[0019] Determining whether the absolute value of the deviation change rate is greater than a second preset value;

[0020] When the absolute value of the deviation change rate is greater than the second preset value, keeping the integral term unchanged;

[0021] When the absolute value of the deviation change rate is less than or equal to the second preset value, the integral term is adjusted according to the absolute value of the first deviation value, the absolute value of the second deviation value, and the absolute value of the deviation change rate.

[0022] In a technical solution of the above control method, the step of "adjusting the PID control parameters of the quadrupole magnet PID controller of the accelerator according to the first deviation value, the second deviation value and the deviation change rate" includes:

[0023] The Kp coefficient, Ki coefficient and / or Kd coefficient of the quadrupole magnet PID controller of the accelerator are reset according to the first deviation value, the second deviation value and the deviation change rate.

[0024] In a technical solution of the above control method, the step of "adjusting the PID control parameters of the quadrupole magnet PID controller of the accelerator according to the first deviation value, the second deviation value and the deviation change rate" includes:

[0025] The total output of the quadrupole magnet PID controller of the accelerator is reset according to the first deviation value, the second deviation value and the deviation change rate.

[0026] In a technical solution of the above control method, the step of "adjusting the PID control parameters of the quadrupole magnet PID controller of the accelerator according to the first deviation value, the second deviation value and the deviation change rate" includes:

[0027] The integral limit of the quadrupole magnet PID controller of the accelerator is reset according to the first deviation value, the second deviation value and the deviation change rate.

[0028] In a technical solution of the above control method, the interval between the first moment and the second moment is equal to the interval between the second moment and the third moment.

[0029] In a technical solution of the above control method, the operating parameter value of the quadrupole magnet includes the coil current value of the quadrupole magnet.

[0030] In a second aspect, the present application provides an electronic device, comprising:

[0031] one or more processors;

[0032] A storage device for storing one or more programs;

[0033] When the one or more programs are executed by the one or more processors, the one or more processors can implement the control method as described in any one of the first aspects.

[0034] In the case of adopting the above technical solution, during the operation of the accelerator, the present application obtains the beam positions at three consecutive moments, and calculates the beam position deviation value and the deviation change rate according to the beam position to adjust the quadrupole magnet operating parameters at the current moment (the current moment refers to the third moment) to correct the beam position. This process is repeated, and dynamic real-time adjustment of the beam position can be achieved during the operation of the accelerator, and adaptive control of beam position feedback tracking can be achieved, and the beam position deviation phenomenon caused by system errors, environmental disturbances and other factors can be improved. Compared with the traditional manual adjustment method, it not only saves labor costs and improves automatic control, but also can overcome the uncertainty caused by human operation factors and improve the control accuracy of the beam position. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The preferred embodiments of the present application are described below in conjunction with the accompanying drawings, in which:

[0036] Figure 1 It is a flowchart of the main steps of an accelerator beam position control method based on a PID control algorithm according to an embodiment of the present application;

[0037] Figure 2 It is a detailed step flow chart of an accelerator beam position control method based on a PID control algorithm according to an embodiment of the present application. DETAILED DESCRIPTION

[0038] The preferred embodiments of the present application are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present application and are not used to limit the scope of protection of the present application. Those skilled in the art can make adjustments to them as needed to adapt to specific application scenarios.

[0039] It should be noted that in the description of this application, the terms "upper", "lower", "left", "right", "inner", "outer", etc., which indicate directions or positional relationships, are based on the directions or positional relationships shown in the drawings. This is only for the convenience of description, and does not indicate or imply that the relevant devices or components must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on this application. In addition, the ordinal numbers "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0040] In addition, it should be noted that in the description of this application, unless otherwise clearly specified and limited, the terms "installation" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium. For those skilled in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0041] In order to facilitate understanding of the technical solution of the present application, the composition and principle of the accelerator are briefly introduced first. An accelerator is a device that uses an electromagnetic field to accelerate charged particles to high energy. Its core principle is to use the electromagnetic field to exert force on the charged particle beam to accelerate it along the direction of the electric field, and then make the particle beam bombard the target. The quadrupole magnet is an important component of the accelerator. It focuses or defocuses the particle beam by generating a specific magnetic field gradient, thereby controlling the lateral size and stability of the beam. The quadrupole magnet is usually composed of four poles, each of which is wound with a coil. The magnetic field strength can be controlled by adjusting the current of the quadrupole magnet coil, thereby adjusting the center position of the beam.

[0042] Reference Figure 1, is a flowchart of the main steps of an accelerator beam position control method based on a PID control algorithm according to an embodiment of the present application, which includes:

[0043] S101: Acquire a first beam position of an accelerator at a first moment.

[0044] The beam position of the accelerator can be obtained by a beam position detector and other devices, which is a well-known technology in the art and will not be elaborated in this application. It should be noted that the beam position of the accelerator can be reflected in the beam target coordinate value, so the beam position includes the X-axis coordinate value and the Y-axis coordinate value in the two-dimensional plane. Correspondingly, the first beam position can be recorded as (x 1 ,y 1 ).

[0045] S102: Acquire a second beam position of the accelerator at a second moment, and calculate a first deviation value of the second beam position relative to the first beam position.

[0046] Accordingly, the second beam position in the above step S102 can be recorded as (x 2 ,y 2 ), the "deviation value" in this application includes the X-direction deviation value ΔX and the Y-direction deviation value ΔY, that is, for the first deviation value, ΔX 1 =x 2 -x 1 , ΔY 1 =y 2 -y 1 .

[0047] It should be noted that the first deviation value is signed. For example, if the right direction of the X axis of the two-dimensional coordinate system is the positive direction, then when the beam position in the X direction at the second moment moves to the right, x 2 -x 1 is a positive value. Similarly, when the beam position in the X direction moves to the left at the second moment, x 2 -x 1 It is a negative value. Or it can be understood that the deviation value includes the offset direction and phase, the direction represents the positive and negative sign, and the phase represents the numerical value of the deviation value. The Y-direction deviation value can also be set in accordance with the above method, and this application will not elaborate on it here.

[0048] S103: Obtain a third beam position of the accelerator at a third moment, calculate a first deviation value of the third beam position relative to the second beam position, and calculate a deviation change rate according to the first deviation value and the second deviation value.

[0049] Similarly, the position of the third beam can be recorded as (x 3 ,y 3 ), the second deviation values ​​are ΔX 1 =x3 -x 2 , ΔY 2 =y 3 -y 2 The deviation change rate is the derivative of the difference between the first deviation value and the second deviation value with respect to time (the interval between adjacent moments). Therefore, in the embodiment of the present application, the interval between the first moment and the second moment is equal to the interval between the second moment and the third moment.

[0050] S104: adjusting the PID control parameters of the quadrupole magnet PID controller of the accelerator according to the first deviation value, the second deviation value and the deviation change rate to change the operating parameter value of the quadrupole magnet and adjust the accelerator beam position to a preset position.

[0051] It should be noted that, since the control method of the present application is based on the PID control algorithm, the above-mentioned PID controller is connected in communication with the control system of the quadrupole magnet to adjust the operating parameter value of the quadrupole magnet. The above-mentioned PID control parameters include but are not limited to the integral term in the PID controller, the Kp coefficient, Ki coefficient and Kd coefficient of the PID controller, the total output of the PID controller, the integral limit of the PID controller, etc. The operating parameter value of the above-mentioned quadrupole magnet can be selected as the coil current value of the quadrupole magnet.

[0052] It should also be noted that the preset position mentioned above can be the beam position at the first moment, that is, the beam position is feedback-adjusted by the beam position deviation values ​​and deviation change rates at three moments. It can be understood that when the first moment is the initial moment of the accelerator operation, the first beam position is the ideal position of the beam, that is, the center position of the target.

[0053] Reference Figure 2 , is a detailed step flow chart of an accelerator beam position control method based on a PID control algorithm according to an embodiment of the present application. In this embodiment, step S104 includes: resetting the integral term in the PID output of the quadrupole magnet PID controller according to the first deviation value, the second deviation value and the deviation change rate, as follows:

[0054] First, determine whether to reset the integral term according to the absolute value of the first deviation value and the absolute value of the second deviation value. When the absolute values ​​of the first deviation value and the second deviation value are too small, it means that the beam position does not change much during the period from the first moment to the third moment, and the offset of the beam position is within the allowable deviation range, so there is no need to adjust the integral term. When any of the absolute values ​​of the first deviation value and the second deviation value is greater than the first preset value, it means that the beam position has a large deviation for at least a period of time. At this time, the positive or negative of the deviation change rate can be judged. When the deviation change rate is a positive value, it means that the beam position continues to deviate along a certain direction. At this time, the sign of the integral term should be directly reversed. When the deviation change rate is a negative value, it means that the offset direction of the beam position during the period from the first moment to the second moment is opposite to the offset direction of the beam position during the period from the second moment to the third moment. At this time, the integral term can be adjusted according to the absolute value of the deviation change rate.

[0055] The above steps can be summarized as follows:

[0056] First, the absolute value of the first deviation value and the absolute value of the second deviation value are compared with the first preset value.

[0057] When the absolute value of the first deviation value and the absolute value of the second deviation value are both less than or equal to the first preset value, the integral term is kept unchanged.

[0058] When the absolute value of the first deviation value and / or the absolute value of the second deviation value is greater than the first preset value, the sign of the deviation change rate is determined.

[0059] When the rate of change of the deviation is positive, the sign of the integral term is reversed.

[0060] When the deviation change rate is a negative value, the integral term is adjusted according to the absolute value of the deviation change rate. Specifically, when the absolute value of the deviation change rate is greater than the second preset value, the integral term is kept unchanged; when the absolute value of the deviation change rate is less than or equal to the second preset value, the size of the integral term is adjusted according to the absolute value of the first deviation value, the absolute value of the second deviation value and the absolute value of the deviation change rate. For example, in general, a larger value is added to the integral, or added to the PID parallel compensation to increase the control amount.

[0061] It should be noted that the first preset value and the second preset value mentioned above can be determined according to actual conditions and experience, and are not fixed values, and those skilled in the art can make adaptive adjustments to them.

[0062] It should also be noted that, since the deviation values ​​in the present application include ΔX and ΔY, the deviation change rate also includes the change rate epX in the X direction and the change rate epY in the Y direction, and the integral terms should be reset corresponding to the above ΔX and epX and ΔY and epY respectively.

[0063] Based on the above step S104, after the integral term is reset, the coil current value of the quadrupole magnet is changed accordingly, thereby adjusting the strength of the magnetic lens of the quadrupole magnet and correcting the beam position.

[0064] As described above, in the case of adopting the above technical solution, during the operation of the accelerator, the present application obtains the beam position at three consecutive moments, and calculates the beam position deviation value and the deviation change rate according to the beam position to adjust the quadrupole magnet operating parameters at the current moment (the current moment refers to the third moment) to correct the beam position. This process is repeated, and dynamic real-time adjustment of the beam position can be achieved during the operation of the accelerator, and adaptive control of beam position feedback tracking can be achieved, and the beam position deviation phenomenon caused by system errors, environmental disturbances and other factors can be improved. Compared with the traditional manual adjustment method, it not only saves labor costs and improves automatic control, but also can overcome the uncertainty caused by human operation factors and improve the control accuracy of the beam position.

[0065] In addition, the present application resets the integral term of the PID controller according to the first deviation value, the second deviation value and the deviation change rate, and resets the corresponding excessively accumulated integral term in time, which can effectively reduce the response time of the system and improve the system stability.

[0066] It should be noted that, although in the above embodiments of the present application, "resetting the integral term of the quadrupole magnet PID controller" is used as an example for illustrative explanation, it does not constitute a limitation to the present application. In some implementations, other control methods can also be used to adjust the PID control parameters.

[0067] Optionally, in one implementation, the step of "adjusting the PID control parameters of the accelerator's quadrupole magnet PID controller according to the first deviation value, the second deviation value and the deviation change rate" can also be: dynamically adjusting the Kp coefficient and / or Ki coefficient and / or Kd coefficient of the accelerator's quadrupole magnet PID controller according to the first deviation value, the second deviation value and the deviation change rate.

[0068] For example, when the first deviation value and the second deviation value are large and the deviation change rate is small, Kp will increase according to the calibration map output to reduce / eliminate the error; when the deviation is large, the deviation change rate is small and the cumulative calculation step exceeds the calibration value, Ki will increase to eliminate the steady-state error; when the deviation is small and the deviation change rate is large, Kd will automatically adjust according to the calibration map to reduce the impact of disturbances.

[0069] Optionally, in one implementation, the step of "adjusting the PID control parameters of the accelerator's quadrupole magnet PID controller according to the first deviation value, the second deviation value and the deviation change rate" can also be: resetting the integral limit of the accelerator's quadrupole magnet PID controller according to the first deviation value, the second deviation value and the deviation change rate.

[0070] For example, when any one of the absolute values ​​of the first deviation value and the second deviation value is greater than the first preset value, and the deviation change rate is a negative value, the integral term / integral reset value should be inverted.

[0071] Optionally, in one implementation, the step of "adjusting the PID control parameters of the accelerator's quadrupole magnet PID controller according to the first deviation value, the second deviation value and the deviation change rate" can also be: resetting the total output of the accelerator's quadrupole magnet PID controller according to the first deviation value, the second deviation value and the deviation change rate.

[0072] As can be seen above, the present application adjusts the PID control parameters of the quadrupole magnet PID controller based on the first deviation value, the second deviation value and the deviation change rate to output a quadrupole magnet coil current control signal, adjust the coil current value of the quadrupole magnet, and the coil current value changes the magnetic lens strength, thereby being able to change the beam position.

[0073] The present application also discloses an electronic device, which includes one or more processors and a storage device, wherein the storage device is used to store one or more programs, and when the first or more programs are executed by the one or more processors, the one or more processors can implement the control method in any of the above embodiments.

[0074] The processor may be a central processing unit, a microprocessor, a digital signal processor or any other suitable processor, which may be implemented in software, hardware or a combination of the two. In practical applications, it may be a dedicated processor for an accelerator, or a processor for a device or system to which an accelerator is applied, such as a master processor for a neutron source. Such adjustments to the processor form and application level do not deviate from the principles and scope of the present application.

[0075] Similarly, the storage device can be any suitable medium that can store program code, such as a disk, hard disk, optical disk, flash memory, read-only memory, random access memory, etc., and the present application does not impose any restrictions on its form. Similarly, in practical applications, it can be a dedicated storage device for the accelerator, or it can be a higher-level storage device of the device or system using the accelerator.

[0076] Similarly, in practical applications, the electronic device can be in any suitable form. For example, it can be a dedicated controller for the accelerator, or a host controller for a device or system using the accelerator, such as a master controller of a neutron source, or a combination of an accelerator controller and a host computer controller. Such adjustments do not deviate from the principles of the present application and therefore fall within the scope of the present application.

[0077] So far, the technical solutions of the present application have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.

Claims

1. A method for controlling the position of an accelerator beam based on a PID control algorithm, characterized in that: include: Obtaining a first beam position of the accelerator at a first moment; Acquiring a second beam position of the accelerator at a second moment, and calculating a first deviation value of the second beam position relative to the first beam position; Acquiring a third beam position of the accelerator at a third moment, calculating a second deviation value of the third beam position relative to the second beam position, and calculating a deviation change rate according to the first deviation value and the second deviation value; The PID control parameters of the quadrupole magnet PID controller of the accelerator are adjusted according to the first deviation value, the second deviation value and the deviation change rate to change the operating parameter value of the quadrupole magnet and adjust the accelerator beam position to a preset position.

2. The control method according to claim 1, characterized in that: The step of “adjusting the PID control parameters of the quadrupole magnet PID controller of the accelerator according to the first deviation value, the second deviation value and the deviation change rate” includes: The integral term in the PID output of the quadrupole magnet PID controller is reset according to the first deviation value, the second deviation value and the deviation change rate.

3. The control method according to claim 2, characterized in that: The step of “resetting the integral term in the PID output of the quadrupole magnet PID controller according to the first deviation value, the second deviation value and the deviation change rate” includes: When the absolute value of the first deviation value and / or the absolute value of the second deviation value is greater than a first preset value, determining whether the deviation change rate is positive or negative; When the deviation change rate is a positive value, the sign of the integral term is reversed; When the deviation change rate is a negative value, adjusting the integral term according to the absolute value of the deviation change rate; When the absolute value of the first deviation value and the absolute value of the second deviation value are both less than or equal to a first preset value, the integral term is kept unchanged.

4. The control method according to claim 3, characterized in that: The step of "adjusting the integral term according to the absolute value of the deviation change rate" includes: Determining whether the absolute value of the deviation change rate is greater than a second preset value; When the absolute value of the deviation change rate is greater than the second preset value, keeping the integral term unchanged; When the absolute value of the deviation change rate is less than or equal to the second preset value, the integral term is adjusted according to the absolute value of the first deviation value, the absolute value of the second deviation value, and the absolute value of the deviation change rate.

5. The control method according to claim 1, characterized in that: The step of “adjusting the PID control parameters of the quadrupole magnet PID controller of the accelerator according to the first deviation value, the second deviation value and the deviation change rate” includes: The Kp coefficient, Ki coefficient and / or Kd coefficient of the quadrupole magnet PID controller of the accelerator are reset according to the first deviation value, the second deviation value and the deviation change rate.

6. The control method according to claim 1, characterized in that: The step of “adjusting the PID control parameters of the quadrupole magnet PID controller of the accelerator according to the first deviation value, the second deviation value and the deviation change rate” includes: The total output of the quadrupole magnet PID controller of the accelerator is reset according to the first deviation value, the second deviation value and the deviation change rate.

7. The control method according to claim 1, characterized in that: The step of “adjusting the PID control parameters of the quadrupole magnet PID controller of the accelerator according to the first deviation value, the second deviation value and the deviation change rate” includes: The integral limit of the quadrupole magnet PID controller of the accelerator is reset according to the first deviation value, the second deviation value and the deviation change rate.

8. The control method according to claim 1, characterized in that: The interval between the first moment and the second moment is equal to the interval between the second moment and the third moment.

9. The control method according to claim 1, characterized in that: The operating parameter value of the quadrupole magnet includes a coil current value of the quadrupole magnet.

10. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors can implement the control method according to any one of claims 1 to 9.