Synchrotron motion control system and method with redundant position feedback

By introducing four sets of grating rulers, four sets of servo motors, and multiple limit protections into the undulator motion control system, the problems of inconvenient maintenance and mechanical damage caused by grating ruler failure are solved, and highly reliable and safe redundant position feedback control is achieved.

CN116893694BActive Publication Date: 2026-06-30SHANGHAI ADVANCED RES INST CHINESE ACADEMY OF SCI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI ADVANCED RES INST CHINESE ACADEMY OF SCI
Filing Date
2023-06-14
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

The existing undulator motion control system has difficulty in achieving redundant position feedback when the grating ruler fails, which makes operation and maintenance inconvenient. In addition, the grating ruler is close to the beam position and is easily affected by radiation. It cannot achieve simultaneous movement of the upper and lower magnetic pole beams, which poses a risk of mechanical damage.

Method used

It employs four sets of linear encoders and four sets of servo motors, each with a built-in motor encoder. Combined with two sets of inclinometers and multiple limit protections, it achieves full closed-loop control with dual position feedback through a PLC controller. The linear encoders serve as the primary feedback, while the motor encoders serve as redundant feedback, adding tilt monitoring and limit protection.

Benefits of technology

It achieves fast-response, high-precision undulator motion control, prevents mechanical damage, simplifies operation and maintenance, and improves system reliability and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116893694B_ABST
    Figure CN116893694B_ABST
Patent Text Reader

Abstract

The application provides a synchrotron motion control system with redundant position feedback, comprising: four sets of grating rulers, four sets of servo motors, two sets of inclinometers, installed at each end of the synchrotron; photoelectric limit, electromechanical limit, hard limit, emergency stop button, alarm and indicator light; slave control cabinet, comprising a PLC controller, which is provided with a motion control module and a logic control module; servo driver, connected with the servo motor and the motion control module; position input module, connected with the grating ruler and the motion control module; analog input module, connected with the inclinometer and the logic control module; digital input module, connected with the photoelectric limit, electromechanical limit, emergency stop button and the logic control module; digital output module, connected with the indicator light, alarm and the logic control module. The application also provides corresponding methods. The system has fast response speed, high dynamic performance, high control precision, and redundant position feedback and protection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of motion control technology, specifically relating to a redundant position feedback undulator motion control system and method. Background Technology

[0002] Undulators are the primary light-emitting devices in advanced synchrotron radiation sources and free-electron lasers. The electron beam must pass through alternating magnetic blocks inside the undulator to emit high-brightness light. The motion control system is an indispensable component of the undulator, its main task being to perform high-precision motion adjustments, including the gap between the upper and lower magnetic poles (GAP) and the taper angle between the upper and lower magnetic poles, thereby regulating the wavelength of the radiated light. Undulator motion control plays a crucial role in the magnetic pole movement of synchrotron radiation sources and free-electron lasers, as well as in their subsequent operation and maintenance. Therefore, developing a highly reliable, safe, high-precision undulator motion control system with multiple protection mechanisms is of great significance.

[0003] This study investigated undulators used in various particle accelerator sources both domestically and internationally. Internationally, the main representatives are the European X-ray Free Electron Laser Facility (EUROPEAN XFEL) and the Stanford Linear Accelerator Coherent Source II (LCLS II). Domestically, the main representatives are the undulators developed by the Shanghai Synchrotron Radiation Facility (SSRF) and the Institute of High Energy Physics in Beijing. The study found that the movement of the magnetic pole gap (GAP) and the taper angle between the upper and lower magnetic poles is mainly achieved by controlling four sets of transmission mechanisms. Common motion control modes for undulators include: GAP mode, Taper mode, Center mode, and maintenance mode. Figures 1A-1D As shown. The four-axis motion undulator developed by the European X-ray Free Electron Laser Facility (EUROPEAN XFEL) is referenced in [THE UNDULATOR CONTROL SYSTEM FOR THE EUROPEAN XFEL, Proceedings of IPAC2012, New Orleans, Louisiana, USA]. The four-axis motion undulator developed by the Linear Accelerator Coherent Light Source II (LCLSII) at Stanford University is referenced in [LCLS-II UNDULATOR MOTION CONTROL, 16th Int. Conf. on Accelerator and Large Experimental Control Systems ICALEPCS2017, Barcelona, ​​Spain JACoW Publishing].

[0004] The local motion control system for both the EUROPEAN XFEL and LCLS II undulators adopts an architecture consisting of a control chassis, four servo motors, two linear encoders, and two inclinometers. The structural configuration layout of the undulator's local motion control system is as follows: Figure 2 As shown, two sets of grating rulers are respectively installed at the inlet and outlet ends of the undulator. This local motion control system for the undulator may encounter the following problems during its operation:

[0005] (1) Because the installed grating ruler is close to the beam position, the probability of the beam hitting the grating ruler increases during the beam adjustment process;

[0006] (2) Because the installed grating ruler is close to the beam position, the radiation generated may cause the grating ruler to "freeze" or the "reading value" to jump;

[0007] (3) Since there are only two sets of grating rulers, when using grating rulers as position feedback, it is not possible to make the upper and lower magnetic pole beams of the undulator move upward or downward simultaneously (center mode).

[0008] (4) If the inlet and outlet grating rulers are used as feedback, then as follows Figure 2 The drive shafts two and four of the lower magnetic pole beam drive the beam to translate along the y-axis, which is vertical. The two drive shafts of the lower magnetic pole beam use the correction value of the motor encoder inside the servo motor as feedback. However, the movement of drive shafts one and three of the upper magnetic pole beam along the y-axis is controlled by the reading of the grating ruler. The grating ruler can only provide feedback on the position values ​​of the upper magnetic pole beam's inlet and outlet along the y-axis. Therefore, adjusting the upper and lower magnetic pole gap (GAP) and the upper and lower magnetic pole angle (Taper) of the oscillator cannot be entirely adjusted using grating ruler feedback. Specifically, as... Figure 2 The lower magnetic pole beam has two drive shafts, drive shaft two and drive shaft four, while the upper magnetic pole beam has two drive shafts, drive shaft one and drive shaft three. Drive shaft one drives the upper magnetic pole beam at the inlet end, and drive shaft three drives the upper magnetic pole beam at the outlet end. Drive shaft two drives the lower magnetic pole beam at the inlet end, and drive shaft four drives the lower magnetic pole beam at the outlet end. Therefore, by controlling the movement of the beams driven by the drive shafts, the GAP and Taper can be adjusted. Figure 2 and Figure 1A As shown, drive shafts one and three drive the upper magnetic pole beam to move in the positive y-axis direction, while drive shafts two and four drive the lower magnetic pole beam to move in the negative y-axis direction, thus increasing the gap. Figure 2 and Figure 1BAs shown, drive shafts one and two remain stationary, drive shaft three drives the upper magnetic pole beam at the outlet to move in the positive y-axis direction, and drive shaft four drives the lower magnetic pole beam at the outlet to move in the negative y-axis direction, thus increasing Taper. The GAP at the inlet is the sum of the readings of one set of grating rulers and one set of motor encoders (or two sets of motor encoders) at the inlet, and the GAP at the outlet is the sum of the readings of one set of grating rulers and one set of motor encoders (or two sets of motor encoders) at the outlet. Taper adjustment is one of the practical motion requirements of the oscillator. By keeping the inlet drive shafts one and two stationary, while drive shafts three and four drive the upper and lower magnetic pole beam outlets in opposite directions along the y-axis, the taper angle (typically 0° to 0.005°) can be adjusted. Two inclinometers read the tilt angles of the upper and lower magnetic pole beams. The logic control module requires that the tilt angle of the upper and lower magnetic pole beams not exceed 0.01° to prevent beam deformation and mechanical damage. Therefore, the inclinometers are used to prevent the beam from tilting more than 0.01°, protecting the magnetic pole beams. Figure 2 As shown, the four-axis oscillators of EUROPEAN XFEL and LCLS II only have two sets of grating rulers. Therefore, when using grating ruler feedback, the grating ruler can only be used to feedback and monitor the position of the upper magnetic beam inlet and outlet. The position of the lower magnetic beam inlet and outlet needs to be fed back and monitored using a motor encoder. Alternatively, motor encoders can be used to monitor and feed back the position of the upper beam inlet and outlet, and the position of the lower magnetic beam inlet and outlet, respectively.

[0009] like Figure 3 As shown, the four-axis motion CPMU undulator developed by the Beijing Institute of High Energy Physics is described in the reference [Research on the HEPS Insert Control System of High Energy Synchrotron Radiation Source, Zhao Shutao, December 2021]. Its motion control architecture consists of a control cabinet, four servo motors with built-in rotary transformers, and four sets of grating rulers. The four grating rulers are located near the upper end of the undulator's inlet, upper end of the outlet, lower end of the inlet, and lower end of the outlet, respectively. The CPMU servo motors contain rotary transformers to provide feedback on motor speed. The CPMU lacks tilting instruments to prevent beam deformation. This control scheme has the following shortcomings during undulator operation:

[0010] (1) The inclinometer is not redundantly protected. When the grating ruler feedback position fails, the motor movement may cause the magnetic pole beam to tilt and even deform.

[0011] (2) The rotary transformer in the servo motor is used for motor speed feedback control. Since there is no motor encoder for motor position and speed feedback control, there is no redundant position feedback and position monitoring protection.

[0012] To address the aforementioned issues, existing technologies typically require personnel to power off and restart the grating ruler at the undulator's local control cabinet to restore its normal operation if it malfunctions (e.g., "freezing" or "reading value jumps"). If the grating ruler is damaged, the accelerator tunnel needs to be opened to replace it. Therefore, existing technologies are time-consuming and labor-intensive, hindering the rapid and efficient resolution of problems and causing inconvenience to the operation and maintenance of synchrotron radiation sources or free-electron laser devices, thus affecting the user's optical supply time.

[0013] However, with the increasing demands of users for light quality and timing, and the need to build next-generation light sources, the length of accelerator facilities has increased from the hundreds of meters to the kilometers. For example, the Shanghai Hard X-ray Free Electron Laser Facility, currently under construction, is 3.11 km long and 29 meters deep. This poses a great challenge to the operation and maintenance of undulators, and even the operation and maintenance of the accelerator itself. Therefore, it is of great significance to optimize the existing undulator motion control technology and develop a undulator motion control system with high reliability, high safety, high precision, multiple protections, and redundant position feedback. Summary of the Invention

[0014] The purpose of this invention is to provide a redundant position feedback undulator motion control system and method, which can be used in the Shanghai Hard X-ray Free Electron Laser Facility (SHINE Project) or advanced particle accelerator light source under construction to achieve redundant position feedback and protection.

[0015] To achieve the above objectives, the present invention provides a redundant position feedback undulator motion control system, comprising:

[0016] Four sets of grating rulers are respectively installed at the upper end of the inlet, the lower end of the inlet, the upper end of the outlet, and the lower end of the outlet of the undulator.

[0017] Four servo motors are installed at the upper and lower ends of the undulator's inlet, the upper and lower ends of the inlet, the upper and lower ends of the outlet, and each has a motor encoder. They are connected to the undulator via a drive shaft.

[0018] Two inclinometers are installed near the upper end of the undulator's outlet and near the lower end of the undulator's outlet, respectively.

[0019] Photoelectric limit switches, electromechanical limit switches, hard limit switches, emergency stop buttons, alarms, and indicator lights; and

[0020] The slave control chassis includes a PLC controller, and a servo driver, a position input module, an analog input module, a digital input module, and a digital output module connected to the PLC controller. The PLC controller has a motion control module and a logic control module. The servo driver is connected to the servo motor and to the motion control module via an NC controller. The position input module is connected to four sets of linear encoders and to the motion control module via the NC controller. The analog input module is connected to two sets of inclinometers and to the logic control module. The digital input module is connected to photoelectric limit switches, electromechanical limit switches, and emergency stop buttons, and to the logic control module. The digital output module is connected to indicator lights and alarms, and to the logic control module.

[0021] The photoelectric limit, electromechanical limit, and hard limit are all installed near the entrance of the upper magnetic pole beam, near the exit of the upper magnetic pole beam, near the entrance of the lower magnetic pole beam, and near the exit of the lower magnetic pole beam, for triple limit protection when the undulator moves to the maximum gap position and the minimum gap position.

[0022] The redundant position feedback undulator motion control system also includes a master station control cabinet, which is installed in the technical corridor. In local mode, it can be used to send control commands to the slave control cabinet and read the status of the slave control cabinet. In remote mode, the master station control cabinet is set to interact with the central control room.

[0023] The motion control module is configured to send commands to the servo driver to control the movement of the servo motor, and the logic control module is configured to implement tilt angle logic protection method, indicator light display motion status method, alarm fault alarm method, limit switch limit protection method, and emergency stop button emergency stop protection method.

[0024] The number of servo drives is two, and each servo drive is connected to two sets of servo motors. The servo drives are configured to respond to the position and speed commands sent by the motion control module to the servo drives and the position, speed and torque signals fed back to the servo drives by the motor encoders, control the position, speed and torque of the servo motors, and send the position, speed and torque signals fed back to the servo drives by the motor encoders to the motion control module as input variables for the motion control module.

[0025] The position input module is configured to acquire the grating ruler reading and then transmit the grating ruler reading to the motion control module via the NC controller as the input variable of the motion control module.

[0026] The digital output module is configured to convert the output variables of the logic control module into switching quantities and transmit them to the indicator lights and alarms, so as to realize the method of the indicator lights displaying the motion status and the method of the alarms malfunctioning.

[0027] The methods for indicator lights to display motion status and alarm devices to detect faults include: when a fault occurs, the signal value of the output variable of the logic control module is set to 1. The digital output module converts the output variable of the logic control module with a signal value of 1 into a switching quantity indicating conduction and transmits it to the indicator light and the alarm, causing the indicator light to display red and the alarm to issue a fault alarm; otherwise, the signal value of the output variable of the logic control module is set to 0. The digital output module converts the output variable of the logic control module with a signal value of 0 into a switching quantity indicating deactivation and transmits it to the indicator light and the alarm, causing the indicator light to turn off and the alarm to stop issuing fault alarms.

[0028] The analog input module is configured to acquire data from the inclinometer and then transmit the inclinometer data to the logic control module, which uses the data as a variable to execute the inclinometer logic protection method.

[0029] The tilt angle logic protection method includes: the tilt meter monitors the tilt angle of the oscillator beam, then the analog input module obtains the tilt meter reading and sends it to the logic control module. In the logic control module, the tilt angle value of the oscillator beam is not allowed to exceed the maximum tilt angle value. Once the maximum tilt angle value is exceeded, it indicates a fault. The motion control module sends a stop command to the servo driver to stop the servo motor. At the same time, the signal value of the output variable of the logic control module is set to 1. The digital output module converts the output variable of the logic control module with a signal value of 1 into a switch quantity indicating conduction and transmits it to the indicator light and the alarm, so that the indicator light displays red and the alarm issues a fault alarm. Until the tilt angle of the oscillator beam is less than or equal to the maximum tilt angle value, the motion control module sends a recovery command to the servo driver to resume the movement of the servo motor. At the same time, the signal value of the output variable of the logic control module is set to 0. The digital output module converts the output variable of the logic control module with a signal value of 0 into a switch quantity indicating deactivation and transmits it to the indicator light and the alarm, so that the indicator light turns off and the alarm stops issuing fault alarms.

[0030] The digital input module is configured to convert the trigger signals of the photoelectric limit switch and the electromechanical limit switch in the limit switch, and the switch quantity signal indicating conduction of the emergency stop button into digital input signals, and then transmit the digital input signals to the logic control module of the PLC controller as input variables of the logic control module, so as to realize the limit switch limit protection method and the emergency stop button emergency stop protection method.

[0031] The limit switch limit protection method includes: when the photoelectric limit switch and the electromechanical limit switch are triggered, the trigger signal of the photoelectric limit switch and the electromechanical limit switch is converted into a digital input signal with a signal value of 1 through the digital input module, and the digital input signal with a signal value of 1 is sent to the logic control module of the PLC controller as the input variable of the logic control module. The input variable of the logic control module is 1, which causes the logic control module to send a stop command to the servo driver to stop the servo motor; at the same time, the signal value of the output variable of the logic control module is set to 1, and the output variable of the logic control module with a signal value of 1 is converted into a switch quantity indicating conduction through the digital output module and transmitted to the indicator light and the alarm, so that the indicator light displays red and the alarm sounds a fault alarm.

[0032] The emergency stop button emergency stop protection method is used for emergency stopping of the oscillator during operation, including: pressing the emergency stop button to send a switching signal indicating conduction, converting the switching signal of the emergency stop button into a digital input signal with a signal value of 1 through a digital input module, and sending the digital input signal to the logic control module of the PLC controller as an input variable of the logic control module. The input variable of the logic control module being 1 causes the logic control module to send a stop command to the servo driver to stop the servo motor.

[0033] On the other hand, the present invention provides a method for controlling the motion of an undulator with redundant position feedback, comprising:

[0034] S0: The undulator motion control system that provides redundant position feedback as described above uses the grating ruler as the first position feedback system and the motor encoder of the servo motor as the second position feedback system.

[0035] Step S1: The PLC controller uses a grating ruler to monitor the position value of the oscillator beam to obtain the grating ruler reading;

[0036] Step S2: Use a motor encoder to monitor the position value of the undulator beam to obtain the motor encoder reading;

[0037] Step S3: Determine whether at least some of the grating rulers are faulty; if none of the grating rulers are faulty, assign the grating ruler readings to the corresponding intermediate variables; otherwise, it indicates that at least some of the grating rulers are faulty, and assign the motor encoder readings to the corresponding intermediate variables instead of the grating ruler readings of the faulty grating rulers.

[0038] Step S4: Execute the corresponding large soft limit protection method, small soft limit protection method, intermediate variable comparison protection method, and intermediate variable and motor encoder reading difference comparison protection method according to the intermediate variable and motor encoder reading;

[0039] Step S5: Determine the GAP value of the current inlet based on the intermediate variables, and determine the displacement GVL.MOVE_GAP_C that the drive shaft needs to move based on the GAP setting value and the GAP value of the current inlet, as the target value;

[0040] Step S6: Adjust the motion of the servo motor according to the real-time motion displacement feedback from the motor encoder until the total motion displacement of the drive shaft connected to the servo motor reaches the target value; or, determine the current motion displacement required by the drive shaft in real time, and adjust the motion of the servo motor according to the current motion displacement required by the drive shaft until the absolute value of the current motion displacement required by the drive shaft is less than a precision threshold.

[0041] Before obtaining the grating ruler reading, the process also includes: measuring the GAP gap values ​​at the inlet and outlet of the undulator using a high-precision external measuring instrument, and then using the GAP gap values ​​at the inlet and outlet to calibrate the grating ruler reading that has not yet been calibrated, thereby obtaining the corresponding grating ruler offset.

[0042] Obtaining the grating ruler reading specifically includes: obtaining the calibrated grating ruler reading based on the grating ruler offset and the uncalibrated grating ruler reading, which is then used as the final grating ruler reading;

[0043] Before obtaining the motor encoder reading, the process also includes: obtaining the difference between the calibrated grating ruler reading and the uncalibrated motor encoder reading when the oscillator moves to different positions, fitting the difference function curve according to the correspondence between the difference and the uncalibrated motor encoder reading, and then storing the function curve in the motion control module to obtain the motor encoder bias corresponding to the uncalibrated motor encoder reading.

[0044] Obtaining the motor encoder reading specifically includes: obtaining the calibrated motor encoder reading based on the motor encoder bias and the uncalibrated motor encoder reading, which is then used as the final motor encoder reading.

[0045] The large soft limit protection method includes: determining whether the following formulas are simultaneously true; if true, the PLC controller enables the servo drive to operate normally; otherwise, a fault has occurred, the PLC controller sends a stop command to the servo drive to stop the corresponding servo motor, the signal value of the output variable of the logic control module is set to 1, and the digital output module converts the output variable of the logic control module with a signal value of 1 into a switching quantity indicating conduction. The switching quantity indicating conduction causes the indicator light to display red, and the alarm sounds a fault alarm.

[0046] (GVL.EnDn_Encoder-(MaxGap_Limit / 2))≤Soft_limit_Value

[0047] (GVL.ExUp_Encoder-MaxGap_Limit / 2)≤Soft_limit_Value

[0048] (GVL.EnDn_Encoder-MaxGap_Limit / 2)≤Soft_limit_Value

[0049] (GVL.ExUp_Encoder-MaxGap_Limit / 2)≤Soft_limit_Value,

[0050] Among them, GVL.EnUp_Encoder is the intermediate variable for the upper position at the inlet, GVL.EnDn_Encoder is the intermediate variable for the lower position at the inlet, GVL.ExUp_Encoder is the intermediate variable for the upper position at the outlet, GVL.ExDn_Encoder is the intermediate variable for the lower position at the outlet, Soft_limit_Value is the soft limit value, and MaxGap_Limit is the maximum GAP limit value;

[0051] The soft limit protection method includes: determining whether the following formulas are true simultaneously. If true, the PLC controller enables the servo drive to operate normally; otherwise, a fault has occurred. The PLC controller sends a stop command to the servo drive to stop the corresponding servo motor. The signal value of the output variable of the logic control module is set to 1. The digital output module converts the output variable of the logic control module with a signal value of 1 into a switching quantity indicating conduction. The switching quantity indicating conduction causes the indicator light to turn red, and the alarm sounds a fault alarm.

[0052] (MinGap_Limit / 2-GVL.EnDn_Encoder)≤Soft_limit_Value

[0053] (MinGap_Limit / 2-GVL.ExUp_Encoder)≤Soft_limit_Value

[0054] (MinGap_Limit / 2-GVL.EnDn_Encoder)≤Soft_limit_Value

[0055] (MinGap_Limit / 2-GVL.ExUp_Encoder)≤Soft_limit_Value,

[0056] MinGap_Limit is the minimum gap limit value;

[0057] The intermediate variable comparison protection method includes: determining whether the following formulas are simultaneously true. If true, the PLC controller enables the servo drive to operate normally; otherwise, a fault has occurred. The PLC controller sends a stop command to the servo drive to stop the corresponding servo motor. The signal value of the output variable of the logic control module is set to 1. The digital output module converts the output variable of the logic control module with a signal value of 1 into a switching quantity indicating conduction. The switching quantity indicating conduction causes the indicator light to turn red, and the alarm sounds a fault alarm.

[0058] |GVL.EnUp._Encoder-GVL.ExUp_Encoder|≤GVL.SET_DIFF

[0059] |GVL.EnDn._Encoder-GVL.ExDn_Encoder|≤GVL.SET_DIFF

[0060] |GVL.EnUp._Encoder-GVL.EnDn_Encoder|≤GVL.SET_DIFF,

[0061] Wherein, GVL.SET_DIFF is the position comparison limit threshold;

[0062] The protection method comparing the difference between the intermediate variable and the motor encoder reading is executed when at least one grating ruler is fault-free. It includes: determining whether the following formulas are simultaneously true; if true, the PLC controller enables the servo drive to operate normally; otherwise, a fault has occurred, the PLC controller sends a stop command to the servo drive to stop the corresponding servo motor, the signal value of the logic control module's output variable is set to 1, and the digital output module converts the logic control module's output variable with a signal value of 1 into a switching quantity indicating conduction. The switching quantity indicating conduction causes the indicator light to display red, and the alarm sounds a fault alarm.

[0063] |GVL.EnUp_Encoder-GVL.EnUp.Rotary_Encoder|≤GVL.SET_DIFF

[0064] |GVL.ExUp_Encoder-GVL.ExUp.Rotary_Encoder|≤GVL.SET_DIFF

[0065] |GVL.EnDn_Encoder-GVL.EnDn.Rotary_Encoder|≤GVL.SET_DIFF

[0066] |GVL.ExDn_Encoder-GVL.ExDn.Rotary_Encoder|≤GVL.SET_DIFF.

[0067] The redundant position feedback undulator motion control system of this invention adopts dual position feedback full closed-loop control, which has fast response speed, high dynamic performance, and high control accuracy. Because a grating ruler is used as the position feedback for full closed-loop control, the four position values ​​of the feedback beam (GVL.EnUp_Encoder, GVL.ExUp_Encoder, GVL.EnDn_Encoder, GVL.ExUp_Encoder) are directly monitored and fed back. The calculated drive shaft displacement GVL.MOVE_GAP_C is used as the target value for the servo driver to control the servo motor. Finally, the servo motor adjusts the drive shaft displacement according to the position feedback from the motor encoder to achieve the target value.

[0068] Furthermore, the motor encoders inside the servo motors used in this invention can serve as redundant position feedback protection for the main beam. Normally, the undulator preferentially uses a linear encoder as the position feedback for closed-loop control to directly monitor and feedback the four position values ​​of the main beam. However, the motor encoders inside the four servo motors serve as redundant position feedback, indirectly monitoring and feedback the four position values ​​of the main beam. Therefore, even if the linear encoder fails, the motor encoders, as redundant position feedback, can prevent the motor from continuing to rotate, thus preventing problems such as single beam tilt angle, single beam deviation, single axis deviation, GAP deviation, and Taper deviation.

[0069] The motor encoder inside the servo motor used in this invention can also serve as a position feedback element for closed-loop control. When the grating ruler malfunctions, the motor encoder can be operated remotely to replace the grating ruler, serving as position feedback for the undulator's closed-loop motion control and immediately restoring the normal operation of the undulator's motion control.

[0070] The present invention employs a torque logic protection method for the undulator. When the undulator's magnetic pole beam tilts, the torque of one end of the drive shaft will increase. The motor output torque read by the driver in real time is not allowed to exceed the permissible torque value in the control logic program, thereby preventing the beam from deforming and breaking. At the same time, it can also prevent the undulator from engaging in destructive collisions with hard limits when the maximum gap and minimum gap exceed the tolerance.

[0071] This invention provides a simple, safe, and reliable remote operation method, facilitating the operation and maintenance of undulator motion control for synchrotron radiation sources or free electron laser devices. Attached Figure Description

[0072] Figures 1A-1D This is a schematic diagram of a typical undulator motion control mode;

[0073] Figure 2This is a structural configuration layout diagram of the existing EUROPEAN XFEL and LCLS II four-axis undulator local motion control system;

[0074] Figure 3 This is a structural configuration layout diagram of the motion control system of the CPMU undulator developed by the Beijing Institute of High Energy Physics.

[0075] Figure 4 This is a structural configuration layout diagram of the redundant position feedback undulator motion control system of the present invention.

[0076] Figure 5 Is it like this? Figure 4 The diagram shows the module composition and connection relationship of the slave control cabinet of the redundant position feedback undulator motion control system.

[0077] Figure 6 Is it like this? Figure 4 The diagram shows the connection relationships and data flow of each module in the slave control chassis of the redundant position feedback undulator motion control system.

[0078] Figure 7 This is a schematic diagram illustrating the working principle of the redundant position feedback undulator motion control method of the present invention.

[0079] Figure label:

[0080] 1, 6, 11, 20 - Servo motors; 2, 5, 12, 16 - Gratings; 3 - Lower main beam magnetic poles; 4 - Upper main beam magnetic poles; 7, 10, 21, 25 - Reducers; 8, 9, 22, 24 - Drive shafts; 13, 15 - Inclinometers; 14 - Master station control cabinet; 17 - Hard limit switches; 18 - Electromechanical limit switches; 19 - Photoelectric limit switches; 23 - Slave station control cabinets; 26, 27 - Servo drivers; 28 - PLC controllers; 29 - Position input modules; 30 - Analog input modules; 31 - Digital output modules; 32 - Digital input modules; 33 - Emergency stop buttons; 34 - Alarms; 35 - Indicator lights. Detailed Implementation

[0081] The preferred embodiments of the present invention are given below with reference to the accompanying drawings and described in detail.

[0082] Example 1: A Redundant Position Feedback Oscillator Motion Control System

[0083] like Figure 4 , Figure 5 , Figure 6The diagram shows a redundant position feedback undulator motion control system according to an embodiment of the present invention. The redundant position feedback undulator motion control system is used for an undulator and includes: a master station control cabinet 14, a slave station control box 23, four sets of grating rulers 2, 5, 12, 16, four sets of servo motors 1, 6, 11, 20 with motor encoders, and two sets of inclinometers 13, 15, limit switches 17, 18, 19, an emergency stop button 33, an alarm 34, and an indicator light 35.

[0084] The master station control cabinet 14 is installed in the technical corridor. In local mode, it can be used to send control commands to the slave control cabinet 23 and read the status of the slave control cabinet 23. In remote mode, the master station control cabinet 14 is set to interact with the central control room.

[0085] The slave control box 23 is installed near the undulator frame inside the tunnel. By controlling the output torque of the servo motor, it drives the movement of the four drive shafts, thereby adjusting the upper and lower magnetic pole gap (GAP) and the upper and lower magnetic pole angle (Taper) of the undulator.

[0086] like Figure 4 As shown, the four sets of grating rulers 2, 5, 12, and 16 include the first grating ruler 5 at the upper end of the undulator's inlet, the second grating ruler 2 at the lower end of the inlet, the third grating ruler 12 at the upper end of the outlet, and the fourth grating ruler 16 at the lower end of the outlet. They are used to detect and read the upper position value at the inlet, the lower position value at the inlet, the upper position value at the outlet, and the lower position value at the outlet (i.e., the positions of the upper magnetic beam inlet, the upper magnetic beam outlet, the lower magnetic beam inlet, and the lower magnetic beam outlet in the y-axis direction).

[0087] Four sets of servo motors 1, 6, 11, and 20, each equipped with a motor encoder, include a first servo motor 6 at the upper end of the oscillator's inlet, a second servo motor 1 at the lower end of the inlet, a third servo motor 13 at the upper end of the outlet, and a fourth servo motor 20 at the lower end of the outlet. These motors are connected to the upper and lower magnetic pole beams of the oscillator via drive shafts. The servo motors act as actuators, transmitting torque to drive the movement of the upper and lower magnetic pole beams. They also have built-in motor encoders for position feedback during motor movement.

[0088] like Figure 4 As shown, two sets of inclinometers 13 and 15 are installed near the upper end of the outlet of the undulator and near the lower end of the outlet of the undulator, respectively, to monitor the inclination angle of the upper and lower magnetic pole beams of the undulator, as a redundant position protection system to prevent damage to the mechanical device.

[0089] like Figure 4As shown, photoelectric limiters 19, electromechanical limiters 18, and hard limiters 17 are installed near the upper magnetic beam inlet, the upper magnetic beam outlet, the lower magnetic beam inlet, and the lower magnetic beam outlet to provide triple limit protection for the undulator when it moves to the maximum and minimum gap positions.

[0090] like Figure 5 and Figure 6 As shown, the slave control chassis 23 includes a PLC controller 28, and servo drives 26 and 27, a position input module 29, an analog input module 30, a digital input module 32, and a digital output module 31 connected to the PLC controller 28.

[0091] Among them, (1) the PLC controller 28 is configured to input and set the GAP value, set the Taper value, and send commands such as the position and speed of the motion to the servo drives 26 and 27. The PLC controller 28 is equipped with a motion control module and a logic control module. The motion control module is configured to send commands of the position and speed of the motion to the servo drives 26 and 27 to control the motion of the servo motor. The logic control module is configured to implement the tilt angle logic protection method, the indicator light display motion status method, the alarm fault alarm method, the limit switch limit protection method, and the emergency stop button emergency stop protection method.

[0092] (2) There are two servo drives 26 and 27. Each servo drive is connected to two servo motors and is connected to the motion control module of the PLC controller 28 through an NC controller (Numerical Control). The servo drive is configured to respond to the position and speed commands sent to the servo drive by the motion control module of the PLC controller 28, as well as the position, speed, and torque signals fed back to the servo drive by the motor encoder, to control the position, speed, and torque of the servo motor, and thus realize the movement of the oscillator by controlling the movement of the servo motor; and send the position, speed, and torque signals fed back to the servo drive by the motor encoder to the motion control module as input variables for the motion control module.

[0093] The servo driver is also configured to provide overload, short circuit, and undervoltage protection for the motor. Specifically, when an overload, short circuit, or undervoltage fault occurs, the servo driver sends the corresponding error message to the PLC controller 28. The PLC controller 28 then performs fault diagnosis based on the error message and converts the output variable of the logic control module into a switching signal via the digital output module 31, which is then transmitted to the indicator light 35 and the alarm 34. Specifically, when a fault occurs, the signal value of the logic control module's output variable is 1 (i.e., high level), corresponding to a conducting switching signal. This conducting signal causes the indicator light 35 to display red, and the alarm 34 to issue a fault alarm. Conversely, when the signal value of the logic control module's output variable is 0 (i.e., low level), corresponding to a deactivated switching signal, this deactivated switching signal causes the indicator light 35 to turn off, and the alarm 34 to stop issuing fault alarms.

[0094] (3) The position input module 29 is connected to the four sets of grating rulers 2, 5, 12 and 16, and is connected to the motion control module of the PLC controller 28 through the NC controller. It is set to obtain the grating ruler readings and then transmit the grating ruler readings to the motion control module of the PLC controller 28 through the NC controller as input variables of the motion control module, so that they can be assigned to the corresponding intermediate variables after processing.

[0095] (4) The analog input module 30 is connected to two sets of inclinometers 13 and 15, and also to the logic control module. The analog input module 30 is configured to acquire data from the inclinometers and then transmit the data to the logic control module of the PLC controller 28, using it as a variable to execute the inclinometer logic protection method. Thus, the inclinometers 13 and 15 act as a redundant position protection system, ensuring that the inclinometer value fed back to the logic control module is not allowed to exceed the maximum inclinometer value, preventing damage to the mechanical device.

[0096] Specifically, the tilt angle logic protection method includes: two sets of tilt gauges 13 and 15 monitor the tilt angle of the oscillator beam; then, the analog input module 30 acquires the readings of the tilt gauges 13 and 15 and sends them to the logic control module. In the logic control module, the tilt angle value of the oscillator beam is not allowed to exceed the maximum tilt angle value. Once the maximum tilt angle value is exceeded, it indicates a fault. At this time, the motion control module of the PLC controller 28 sends a stop command to the servo driver to stop the servo motor. Simultaneously, the signal value of the output variable of the logic control module is set to 1. The digital output module 31 converts the output variable of the logic control module with a signal value of 1 into a signal indicating conduction. The switching signal is transmitted to indicator light 35 and alarm 34, causing indicator light 35 to turn red and alarm 34 to issue a fault alarm. Until the tilt angle of the monitored undulator beam is less than or equal to the maximum tilt angle (i.e., returned to normal), the motion control module of PLC controller 28 sends a recovery command to the servo driver to resume the servo motor's movement. Simultaneously, the signal value of the output variable of the logic control module is 0. The digital output module 31 converts the output variable of the logic control module with a signal value of 0 into a switching signal indicating shutdown and transmits it to indicator light 35 and alarm 34, causing indicator light 35 to turn off and alarm 34 to stop issuing fault alarms. Furthermore, the tilt angle logic protection method also includes: disabling the tilt gauges when tilt gauges 13 and 15 malfunction.

[0097] (5) The digital input module 32 is connected to the photoelectric limit switch 19, the electromechanical limit switch 18, and the emergency stop button 33, and is also connected to the logic control module. The digital input module 32 is configured to convert the trigger signals of the photoelectric limit switch 19 and the electromechanical limit switch 18 in the limit switch, and the switch quantity signal indicating conduction of the emergency stop button 33 into digital input signals, and then transmit the digital input signals to the PLC controller 28 as input variables of the logic control module, so as to realize the limit switch limit protection method and the emergency stop button emergency stop protection method.

[0098] The limit switch limit protection method includes: when the photoelectric limit switch and the electromechanical limit switch are triggered, the trigger signals of the photoelectric limit switch 19 and the electromechanical limit switch 18 are converted into digital input signals with a signal value of 1 through the digital input module 32, and the digital input signals with a signal value of 1 are sent to the logic control module of the PLC controller 28 as input variables of the logic control module. The input variable of the logic control module is 1, which causes the PLC controller 28 to send a stop command to the servo driver to stop the servo motor. At the same time, the signal value of the output variable of the logic control module is set to 1, and the output variable of the logic control module with a signal value of 1 is converted into a switch quantity indicating conduction through the digital output module 31 and transmitted to the indicator light 35 and the alarm 34, so that the indicator light 35 displays red and the alarm 34 issues a fault alarm.

[0099] The emergency stop button emergency stop protection method is used for emergency stop of the oscillator during operation, including: pressing the emergency stop button 33 to send a switching signal indicating conduction (i.e., a "24V" switching signal), converting the switching signal of the emergency stop button 33 into a digital input signal with a signal value of 1 through the digital input module, and sending the digital input signal to the logic control module of the PLC controller 28 as an input variable of the logic control module. The input variable of the logic control module being 1 causes the PLC controller 28 to send a stop command to the servo driver to stop the servo motor.

[0100] Conversely, if the photoelectric limit switch 19 and the electromechanical limit switch 18 do not issue trigger signals and the emergency stop button 33 does not issue a switch signal indicating conduction, the value of the digital input signal provided by the digital input module 32 remains 0, and the digital input signal with a signal value of 0 is sent to the logic control module of the PLC controller 28 as an input variable of the logic control module. The input variable of the logic control module being 0 causes the PLC controller 28 to send a recovery command to the servo driver to restore the servo motor's movement.

[0101] Therefore, the emergency stop button 33 is used to stop the oscillator in an emergency during its movement. When the emergency stop button 33 is pressed, the motion control system causes the oscillator to stop moving.

[0102] (6) The digital output module 31 is connected to the indicator light 35 and the alarm 34, and also to the logic control module. The digital output module 31 is configured to convert the output variables of the logic control module (which typically include "0" or "1") into switching signals and transmit them to the indicator light 35 and the alarm 34, thereby realizing the method of the indicator light displaying the motion status and the alarm 34 providing fault alarms. The indicator light 35 is installed on the main station control cabinet 14 and is used to display the operating status of the motion control system and the motion status of the servo motor. The alarm 34 is installed on the main station control cabinet 14 and is used to transmit fault information of the motion control system. When a fault occurs, the signal value of the output variable of the logic control module is 1 (i.e., high level), and the corresponding switching signal is a conducting switching signal (i.e., a 24V switching signal). This conducting switching signal causes the indicator light 35 to display red, and the alarm 34 to issue a fault alarm. Thus, the method of the indicator light displaying the motion status and the alarm 34 providing fault alarms are realized through the output variables of the logic control module.

[0103] like Figure 7 As shown, the undulator motion control method based on the redundant position feedback described above specifically includes the following steps:

[0104] Step S0: Provide the undulator motion control system with redundant position feedback as described above, using grating rulers 2, 5, 12, and 16 as the first position feedback system and the motor encoders of servo motors 1, 6, 11, and 20 as the second position feedback system.

[0105] This achieves full closed-loop control with dual position feedback. The first position feedback system, composed of a linear encoder, is used preferentially as the position feedback system for full closed-loop control. However, if the linear encoder malfunctions, a second position feedback system, composed of a motor encoder, can be used to replace the first position feedback system to achieve position feedback.

[0106] In addition, step S0 may also include: initializing the variable names of the undulator motion control system.

[0107] The variable names of the undulator motion control system include at least the intermediate variable for upper inlet position GVL.EnUp_Encoder, the intermediate variable for lower inlet position GVL.EnDn_Encoder, the intermediate variable for upper outlet position GVL.ExUp_Encoder, and the intermediate variable for lower outlet position GVL.ExDn_Encoder.

[0108] In this embodiment, the meanings of all variable names in the undulator motion control system that is being initialized are shown in Table 1.

[0109] Table 1. Meaning of Variable Names

[0110]

[0111]

[0112]

[0113] Among them, motor encoders are more accurate than rotary transformers. Motor encoders use pulse counting and output square waves, while rotary transformers do not use pulse counting but analog feedback and output sine and cosine modes; (2) Rotary transformers are generally used for motor speed feedback control, while motor encoders are generally used for motor position and speed feedback control.

[0114] Step S1: The PLC controller 28 uses grating rulers 2, 5, 12, and 16 to monitor the position value of the oscillator beam in order to obtain the grating ruler readings;

[0115] Before obtaining the grating ruler reading, the process includes: pre-measuring the GAP gap values ​​at the inlet and outlet of the oscillator using a high-precision external measuring instrument; then using the inlet and outlet GAP gap values ​​to calibrate the uncalibrated grating ruler reading, obtaining the corresponding grating ruler offsets; obtaining the grating ruler reading specifically includes: obtaining the calibrated grating ruler reading based on the grating ruler offset and the uncalibrated grating ruler reading, which serves as the final grating ruler reading. Thus, the calibrated grating ruler reading is subsequently assigned to the corresponding intermediate variables.

[0116] Therefore, the GAP gap values ​​at the inlet and outlet of the upper and lower magnetic pole beams can be obtained.

[0117] Among them, the uncalibrated grating ruler readings are the uncalibrated grating ruler readings (i.e., NC axis grating ruler variables) acquired by the PLC controller. The NC axis is the virtualized digital axis of the NC controller, and the uncalibrated grating ruler readings serve as input variables for the motion control module. The uncalibrated grating ruler readings include the upper NC axis grating ruler variable GVL.EnUp_LAE.ST_Axis.NcToPlc.ActPos at the inlet, the lower NC axis grating ruler variable GVL.EnDn_LAE.ST_Axis.NcToPlc.ActPos at the outlet, the upper NC axis grating ruler variable GVL.ExUp_LAE.ST_Axis.NcToPlc.ActPos at the outlet, and the lower NC axis grating ruler variable GVL.ExDn_LAE.ST_Axis.NcToPlc.ActPos at the outlet.

[0118] The calibrated grating ruler readings include the grating ruler readings at the entrance.

[0119] GVL.EnUp.SSI_Encoder, inlet lower grating ruler reading GVL.EnDn.SSI_Encoder, outlet upper grating ruler reading GVL.ExUp.SSI_Encoder, outlet lower grating ruler reading GVL.ExDn.SSI_Encoder;

[0120] The grating ruler offsets include the upper grating ruler offset at the inlet (GVL.EnUp_Encoder_Offset), the lower grating ruler offset at the inlet (GVL.EnDn_Encoder_Offset), and the upper grating ruler offset at the outlet.

[0121] GVL.ExUp_Encoder_Offset and the output grating ruler offset GVL.ExDn_Encoder_Offset.

[0122] Specifically, the readings of the grating ruler are as follows:

[0123] GVL.EnUp.SSI_Encoder=GVL.EnUp_LAE.ST_Axis.NcToPlc.ActPos+GV L.EnUp_Encoder_Offset;

[0124] GVL.EnDn.SSI_Encoder=GVL.EnDn_LAE.ST_Axis.NcToPlc.ActPos+GV L.EnDn_Encoder_Offset;

[0125] GVL.ExUp.SSI_Encoder=GVL.ExUp_LAE.ST_Axis.NcToPlc.ActPos+GV L.ExUp_Encoder_Offset;

[0126] GVL.ExDn.SSI_Encoder=GVL.ExDn_LAE.ST_Axis.NcToPlc.ActPos+GV L.ExDn_Encoder_Offset;

[0127] Among them, GVL.EnUp_LAE.ST_Axis.NcToPlc.ActPos is the upper NC axis grating scale variable at the inlet, GVL.EnDn_LAE.ST_Axis.NcToPlc.ActPos is the lower NC axis grating scale variable at the inlet, GVL.ExUp_LAE.ST_Axis.NcToPlc.ActPos is the upper NC axis grating scale variable at the outlet, and GVL.ExDn_LAE.ST_Axis.NcToPlc.ActPos is the lower NC axis grating scale variable at the outlet;

[0128] GVL.EnUp_Encoder_Offset is the offset of the upper grating ruler at the inlet; GVL.EnDn_Encoder_Offset is the offset of the lower grating ruler at the inlet; GVL.ExUp_Encoder_Offset is the offset of the upper grating ruler at the outlet; GVL.ExDn_Encoder_Offset is the offset of the lower grating ruler at the outlet; GVL.EnUp.SSI_Encoder is the reading of the upper grating ruler at the inlet; GVL.EnDn.SSI_Encoder is the reading of the lower grating ruler at the inlet; GVL.ExUp.SSI_Encoder is the reading of the upper grating ruler at the outlet; GVL.ExDn.SSI_Encoder is the reading of the lower grating ruler at the outlet.

[0129] Step S2: Use a motor encoder to monitor the position value of the oscillator beam to obtain the motor encoder reading.

[0130] Before obtaining the motor encoder reading, the process includes: comparing the difference between the calibrated grating ruler reading and the uncalibrated motor encoder reading when the oscillator moves to different positions; fitting a difference function curve based on the correspondence between the difference and the uncalibrated motor encoder reading; and then storing the function curve in the motion control module to obtain the motor encoder bias corresponding to the uncalibrated motor encoder reading, which is used as feedforward correction. Obtaining the motor encoder reading specifically includes: obtaining the calibrated motor encoder reading based on the motor encoder bias and the uncalibrated motor encoder reading, which is then used as the final motor encoder reading. Thus, the calibrated motor encoder reading provides a closed-loop feedback signal by tracking the position of the motor shaft, correcting the motor operation, thereby moving the magnetic pole beam to the target value, and is used to assign corresponding intermediate variables later.

[0131] The uncalibrated motor encoder readings include the inlet upper NC-axis motor encoder variable GVL.EnUp.ST_Axis.NcToPlc.ActPos, the inlet lower NC-axis motor encoder variable GVL.EnDn.ST_Axis.NcToPlc.ActPos, the outlet upper NC-axis motor encoder variable GVL.ExUp.ST_Axis.NcToPlc.ActPos, and the outlet lower NC-axis motor encoder variable GVL.ExDn.ST_Axis.NcToPlc.ActPos. The motor encoder offsets include the inlet upper motor encoder offset GVL.EnUp_Rotary_Encoder_Offset and the inlet lower motor encoder offset.

[0132] GVL.EnDn.Rotary_Encoder_Offset, Offset of the encoder on the output motor.

[0133] GVL.ExUp.Rotary_Encoder_Offset and the motor encoder offset at the output.

[0134] GVL.ExDn.Rotary_Encoder_Offset. The calibrated motor encoder readings include the upper inlet motor encoder reading GVL.EnUp.Rotary_Encoder and the lower inlet motor encoder reading.

[0135] GVL.EnDn.Rotary_Encoder, output motor encoder reading GVL.ExUp.Rotary_Encoder, and output motor encoder reading GVL.ExDn.Rotary_Encoder.

[0136] Specifically, the motor encoder readings are as follows:

[0137] GVL.EnUp.Rotary_Encoder=GVL.EnUp.ST_Axis.NcToPlc.ActPos+GVL.EnUp_Rotary_Encoder_Offset;

[0138] GVL.EnDn.Rotary_Encoder=GVL.EnDn.ST_Axis.NcToPlc.ActPos+GVL.EnDn.Rotary_Encoder_Offset;

[0139] GVL.ExUp.Rotary_Encoder=GVL.ExUp.ST_Axis.NcToPlc.ActPos+GVL.ExUp.Rotary_Encoder_Offset;

[0140] GVL.ExDn.Rotary_Encoder=GVL.ExDn.ST_Axis.NcToPlc.ActPos+GVL.ExDn.Rotary_Encoder_Offset.

[0141] Step S3: Determine whether at least some of the grating rulers are faulty; if none of the grating rulers 2, 5, 12, and 16 are faulty, then assign the grating ruler readings to the corresponding intermediate variables respectively; otherwise, it indicates that at least some of the grating rulers are faulty, and assign the motor encoder readings to the corresponding intermediate variables instead of the grating ruler readings of the faulty grating rulers.

[0142] The intermediate variables include the inlet upper position intermediate variable GVL.EnUp_Encoder, the inlet lower position intermediate variable GVL.EnDn_Encoder, the outlet upper position intermediate variable GVL.ExUp_Encoder, and the outlet lower position intermediate variable GVL.ExDn_Encoder.

[0143] GVL.ExUp_Encoder and the intermediate variable GVL.ExDn_Encoder for the lower exit position represent the upper inlet position, lower inlet position, upper outlet position, and lower outlet position of the oscillator, respectively. In this embodiment, the intermediate variables are all calibrated measurement results, so their magnitudes are independent of the measurement method.

[0144] Step S4: Execute the corresponding large soft limit protection method, small soft limit protection method, intermediate variable comparison protection method, and intermediate variable and motor encoder reading difference comparison protection method based on the intermediate variable and motor encoder reading.

[0145] The large soft limit protection method includes: determining whether the following formulas are true simultaneously. If true, the PLC controller 28 enables the servo drive to work normally; otherwise, a fault occurs, the PLC controller 28 sends a stop command to the servo drive to stop the corresponding servo motor, sets the signal value of the output variable of the logic control module to 1, and uses the digital output module 31 to convert the output variable of the logic control module with a signal value of 1 into a switching quantity indicating conduction. The switching quantity indicating conduction causes the indicator light 35 to display red, and the alarm 34 issues a fault alarm.

[0146] (GVL.EnDn_Encoder-(MaxGap_Limit / 2))≤Soft_limit_Value

[0147] (GVL.ExUp_Encoder-MaxGap_Limit / 2)≤Soft_limit_Value

[0148] (GVL.EnDn_Encoder-MaxGap_Limit / 2)≤Soft_limit_Value

[0149] (GVL.ExUp_Encoder-MaxGap_Limit / 2)≤Soft_limit_Value,

[0150] Among them, GVL.EnUp_Encoder is the intermediate variable for the upper position at the inlet, GVL.EnDn_Encoder is the intermediate variable for the lower position at the inlet, GVL.ExUp_Encoder is the intermediate variable for the upper position at the outlet, GVL.ExDn_Encoder is the intermediate variable for the lower position at the outlet, Soft_limit_Value is the soft limit value, and MaxGap_Limit is the maximum GAP limit value.

[0151] Therefore, the large soft limit is not a hardware structure, but a software limit protection mechanism of the motion control module. During the GAP adjustment process, if any intermediate variable (i.e., position value) of the oscillator in the motion control module exceeds half of the maximum GAP limit value (i.e., MaxGap_Limit / 2), the motion control software logic requires the servo motor to stop moving, thus achieving the large soft limit protection. Conversely, if none of the values ​​exceed half of the maximum GAP limit value, normal operation continues.

[0152] The small soft limit protection method includes: determining whether the following formulas are true simultaneously. If true, the PLC controller 28 enables the servo drive to work normally; otherwise, a fault has occurred. The PLC controller 28 sends a stop command to the servo drive to stop the corresponding servo motor. The signal value of the output variable of the logic control module is set to 1. The digital output module 31 converts the output variable of the logic control module with a signal value of 1 into a switching quantity indicating conduction. The switching quantity indicating conduction causes the indicator light 35 to display red, and the alarm 34 issues a fault alarm.

[0153] (MinGap_Limit / 2-GVL.EnDn_Encoder)≤Soft_limit_Value

[0154] (MinGap_Limit / 2-GVL.ExUp_Encoder)≤Soft_limit_Value

[0155] (MinGap_Limit / 2-GVL.EnDn_Encoder)≤Soft_limit_Value

[0156] (MinGap_Limit / 2-GVL.ExUp_Encoder)≤Soft_limit_Value,

[0157] Among them, GVL.EnUp_Encoder is the intermediate variable for the upper position at the inlet, GVL.EnDn_Encoder is the intermediate variable for the lower position at the inlet, GVL.ExUp_Encoder is the intermediate variable for the upper position at the outlet, GVL.ExDn_Encoder is the intermediate variable for the lower position at the outlet, Soft_limit_Value is the soft limit value, and MinGap_Limit is the minimum GAP limit value.

[0158] Therefore, the small soft limit is not a hardware structure, but a software limit protection of the motion control module. During the motion adjustment GAP movement, if the position values ​​of the upper and lower beams at the entrance, exit, entrance, and exit in the motion control software are less than 1 / 2 of the minimum GAP limit value (i.e., MinGap_Limit / 2), a soft limit limit value, the motion control module requires the servo motor to stop moving, thereby realizing the small soft limit protection.

[0159] The intermediate variable comparison protection method includes: determining whether the following formulas are simultaneously true. If true, the PLC controller 28 enables the servo drive to operate normally; otherwise, a fault occurs, and the PLC controller 28 sends a stop command to the servo drive to stop the corresponding servo motor. The signal value of the output variable of the logic control module is set to 1. The digital output module 31 converts the output variable of the logic control module with a signal value of 1 into a switching quantity indicating conduction. The switching quantity indicating conduction causes the indicator light 35 to display red, and the alarm 34 issues a fault alarm.

[0160] |GVL.EnUp._Encoder-GVL.ExUp_Encoder|≤GVL.SET_DIFF

[0161] |GVL.EnDn._Encoder-GVL.ExDn_Encoder|≤GVL.SET_DIFF

[0162] |GVL.EnUp._Encoder-GVL.EnDn_Encoder|≤GVL.SET_DIFF

[0163] Among them, GVL.EnUp_Encoder is the intermediate variable for the upper position at the inlet, GVL.EnDn_Encoder is the intermediate variable for the lower position at the inlet, GVL.ExUp_Encoder is the intermediate variable for the upper position at the outlet, GVL.ExDn_Encoder is the intermediate variable for the lower position at the outlet, and GVL.SET_DIFF is the position comparison limit threshold.

[0164] Here, |GVL.EnUp._Encoder-GVL.ExUp_Encoder|≤GVL.SET_DIFF means that the absolute value of the difference between the position values ​​at the entrance and exit of the beam monitored by the grating ruler is less than or equal to the position comparison limit threshold GVL.SET_DIFF, that is, the absolute value of the difference between the position values ​​at both ends of the magnetic pole beam monitored by the grating ruler is less than or equal to the position comparison limit threshold GVL.SET_DIFF;

[0165] |GVL.EnDn._Encoder-GVL.ExDn_Encoder|≤GVL.SET_DIFF means that the absolute value of the difference between the position values ​​at the entrance and exit of the beam monitored by the grating ruler is less than or equal to the position comparison limit threshold GVL.SET_DIFF, that is, the absolute value of the difference between the position values ​​at both ends of the magnetic pole beam monitored by the grating ruler is less than or equal to the position comparison limit threshold GVL.SET_DIFF; |GVL.EnUp._Encoder-GVL.EnDn_Encoder|≤GVL.SET_DIFF means that the absolute value of the difference between the position values ​​at the entrance and below the entrance of the beam monitored by the grating ruler is less than or equal to the position comparison limit threshold GVL.SET_DIFF. If the above formulas are not satisfied, the system of the present invention will correspondingly execute the servo motor stop operation.

[0166] The protection method comparing the difference between the intermediate variable and the motor encoder reading is executed when at least one grating ruler is fault-free. It includes: determining whether the following formulas are simultaneously true; if true, the PLC controller 28 enables the servo drive to operate normally; otherwise, a fault has occurred, the PLC controller 28 sends a stop command to the servo drive to stop the corresponding servo motor, the signal value of the logic control module's output variable is set to 1, and the digital output module 31 converts the logic control module's output variable with a signal value of 1 into a switching quantity indicating conduction. The switching quantity indicating conduction causes the indicator light 35 to display red, and the alarm 34 issues a fault alarm.

[0167] |GVL.EnUp_Encoder-GVL.EnUp.Rotary_Encoder|≤GVL.SET_DIFF

[0168] |GVL.ExUp_Encoder-GVL.ExUp.Rotary_Encoder|≤GVL.SET_DIFF

[0169] |GVL.EnDn_Encoder-GVL.EnDn.Rotary_Encoder|≤GVL.SET_DIFF

[0170] |GVL.ExDn_Encoder-GVL.ExDn.Rotary_Encoder|≤GVL.SET_DIFF

[0171] GVL.SET_DIFF represents the position comparison limit threshold, where

[0172] |GVL.EnUp_Encoder-GVL.EnUp.Rotary_Encoder|≤GVL.SET_DIFF indicates that the absolute value of the difference between the intermediate variable at the inlet and the position value monitored by the motor encoder at the inlet is less than or equal to the position comparison limit threshold GVL.SET_DIFF; |GVL.ExUp_Encoder-GVL.ExUp.Rotary_Encoder|≤GVL.SET_DIFFF indicates that the absolute value of the difference between the intermediate variable at the outlet and the position value monitored by the motor encoder at the outlet is less than or equal to the position comparison limit threshold GVL.SET_DIFF.

[0173] |GVL.EnDn_Encoder-GVL.EnDn.Rotary_Encoder|≤GVL.SET_DIFF means that the absolute value of the difference between the intermediate variable at the inlet and the position value monitored by the motor encoder at the inlet is less than or equal to the position comparison limit threshold GVL.SET_DIFF, and |GVL.ExDn_Encoder-GVL.ExDn.Rotary_Encoder|≤GVL.SET_DIFF means that the absolute value of the difference between the intermediate variable at the outlet and the position value monitored by the motor encoder at the outlet is less than or equal to the position comparison limit threshold GVL.SET_DIFF. If the above formulas are not satisfied, the system of the present invention will correspondingly execute the servo motor stop operation.

[0174] Step S5: Determine the GAP value of the current inlet based on the intermediate variables, and determine the displacement GVL.MOVE_GAP_C that the drive shaft needs to move based on the GAP setting value and the GAP value of the current inlet, as the target value;

[0175] This is because when the four axes move synchronously, the GAP value at the outlet is also adjusted with reference to the GAP value at the inlet. Therefore, the displacement GVL.MOVE_GAP_C that the drive shaft needs to move can be determined based on the current GAP value at the inlet.

[0176] The required displacement GVL.MOVE_GAP_C for the drive shaft is:

[0177] GVL.MOVE_GAP_C=

[0178] (GVL.COMMAND_GAP-GVL.CURRENT_EnGAP) / 2

[0179] Among them, GVL.COMMAND_GAP is the GAP setting value, GVL.CURRENT_EnGAP is the GAP value of the current entry point, and GVL.MOVE_GAP_C is the displacement that the drive shaft needs to move.

[0180] The current entry point's GAP value, GVL.CURRENT_EnGAP, is:

[0181] GVL.CURRENT_EnGAP=GVL.EnUp._Encoder+GVL.EnDn._Encoder;

[0182] The current export GAP value, GVL.CURRENT_ExGAP, is:

[0183] GVL.CURRENT_ExGAP=GVL.ExUp._Encoder+GVL.ExDn._Encoder;

[0184] Among them, GVL.EnUp_Encoder is the intermediate variable for the upper position at the inlet, GVL.EnDn_Encoder is the intermediate variable for the lower position at the inlet, GVL.ExUp_Encoder is the intermediate variable for the upper position at the outlet, and GVL.ExDn_Encoder is the intermediate variable for the lower position at the outlet.

[0185] Step S6: Adjust the motion of the servo motor according to the real-time motion displacement feedback from the motor encoder until the total motion displacement of the drive shaft connected to the servo motor reaches the target value; or, determine the current required motion displacement GVL.MOVE_GAP_C of the drive shaft in real time, and adjust the motion of the servo motor according to the current required motion displacement GVL.MOVE_GAP_C of the drive shaft until the absolute value of the current required motion displacement GVL.MOVE_GAP_C of the drive shaft is less than a precision threshold.

[0186] That is, GVL.MOVE_GAP_C satisfies the following conditions:

[0187] |(GVL.MOVE_GAP_C|<=Accuracy, where Accuracy is the accuracy threshold.

[0188] At this point, the GAP value at the oscillator inlet and the GAP value at the oscillator outlet are adjusted.

[0189] In the entire process of adjusting the motion of the servo motor based on the real-time feedback of the motion displacement from the motor encoder until the total motion displacement of the drive shaft connected to the servo motor reaches the target value, the servo driver and the motor encoder form a closed-loop control. The servo motor continuously adjusts the motion of the servo driver based on the position feedback from the motor encoder, and then adjusts the motion of the drive shaft until the actual motion displacement of the drive shaft reaches the target value GVL.MOVE_GAP_C.

[0190] The motion control module adjusts the servo motor's movement based on the required displacement GVL.MOVE_GAP_C of the current drive shaft until the absolute value of GVL.MOVE_GAP_C is less than a precision threshold. The module calculates the required displacement GVL.MOVE_GAP_C and sends it to the NC controller. The NC controller then transmits this displacement to the servo driver via the NC axis. Finally, the servo driver drives the servo motor to adjust the magnetic pole gap between the upper and lower beams of the oscillator. This adjustment of the servo motor's movement thus affects the required displacement GVL.MOVE_GAP_C of the current drive shaft.

[0191] Preferably, in step S6, if the grating ruler malfunctions, the motion of the servo motor is adjusted according to the real-time motion displacement fed back by the motor encoder corresponding to the grating ruler until the total motion displacement of the transmission shaft connected to the servo motor reaches the target value; if the grating ruler does not malfunction, the current required motion displacement GVL.MOVE_GAP_C of the transmission shaft is determined in real time, and the motion of the servo motor is adjusted according to the current required motion displacement GVL.MOVE_GAP_C of the transmission shaft until the absolute value of the current required motion displacement GVL.MOVE_GAP_C of the transmission shaft is less than a precision threshold.

[0192] The displacement of the drive shaft refers to the displacement in the vertical direction. For example... Figure 4 As shown, the upper magnetic pole beam has drive shafts 8 and 9, and the lower magnetic pole beam has drive shafts 22 and 24. A grating ruler 5 is used to monitor the displacement of drive shaft 8 (also referring to its position at the beam inlet), a grating ruler 12 is used to monitor the displacement of drive shaft 9 (also referring to its position at the beam outlet), a grating ruler 2 is used to monitor the displacement of drive shaft 24 (also referring to its position below the beam inlet), and a grating ruler 16 is used to monitor the displacement of drive shaft 22 (also referring to its position below the beam outlet).

[0193] In addition, step S7 may be included: continuously executing the tilt angle logic protection method and the limit switch limit protection method using the logic control module to achieve redundant position protection.

[0194] The tilt angle logic protection method includes: two sets of tilt gauges 13 and 15 monitor the tilt angle of the oscillator beam. Then, the analog input module 30 acquires the readings of the tilt gauges 13 and 15 and sends them to the logic control module. In the logic control module, the tilt angle value of the oscillator beam is not allowed to exceed the maximum tilt angle value. Once the maximum tilt angle value is exceeded, it indicates a fault. At this time, the PLC controller 28 sends a stop command to the servo driver to stop the servo motor. Simultaneously, the signal value of the output variable of the logic control module is 1. The digital output module 31 converts the output variable of the logic control module with a signal value of 1 into a switch indicating conduction. The signal is transmitted to indicator light 35 and alarm 34, causing indicator light 35 to turn red and alarm 34 to issue a fault alarm. When the tilt angle of the monitored undulator beam is less than or equal to the maximum tilt angle (i.e., returned to normal), PLC controller 28 sends a recovery command to the servo driver to resume servo motor movement. Simultaneously, the signal value of the output variable of the logic control module is 0. The digital output module 31 converts the output variable of the logic control module with a signal value of 0 into a switch quantity indicating shutdown and transmits it to indicator light 35 and alarm 34, causing indicator light 35 to turn off and alarm 34 to stop issuing fault alarms. Furthermore, the tilt angle logic protection method also includes: disabling the tilt gauges when tilt gauges 13 and 15 malfunction.

[0195] The limit switch limit protection method includes: when the photoelectric limit switch 19 and the electromechanical limit switch 18 are triggered, the trigger signals of the photoelectric limit switch 19 and the electromechanical limit switch 18 are converted into digital input signals with a signal value of 1 through the digital input module 32, and the digital input signals with a signal value of 1 are sent to the logic control module of the PLC controller 28 as input variables of the logic control module. The input variable of the logic control module is 1, which causes the PLC controller 28 to send a stop command to the servo driver to stop the servo motor.

[0196] In another embodiment, after the PLC controller 28 sends a stop command to the servo driver to stop the servo motor, the method further includes: after the photoelectric limit 19 or electromechanical limit 18 at the maximum GAP position is triggered, the PLC controller 28 sends a first unidirectional limit instruction to the servo driver, which prevents the servo motor from moving in the direction of increasing GAP value but allows it to move in the direction of decreasing GAP value; after the photoelectric limit 19 or electromechanical limit 18 at the minimum GAP position is triggered, the PLC controller 28 sends a second unidirectional limit instruction to the servo driver, which prevents the servo motor from moving in the direction of decreasing GAP value but allows it to move in the direction of increasing GAP value.

[0197] If the hard limit switch 17 is touched, the motor torque increases, and the torque value is sent to the logic control module of the PLC controller through the servo driver. When the maximum torque allowable value is exceeded, the PLC controller 28 sends a stop command to the servo driver to stop the servo motor, thereby completing the torque logic protection method. Specifically, during the adjustment of the oscillator's movement, the servo driver can read the torque value of the servo motor and then send it to the logic control module of the PLC controller 28. This torque value is compared with the maximum permissible torque value in the logic control module. If the maximum gap is exceeded and the magnetic beam touches the hard limit 17 at the maximum gap, the servo motor torque suddenly increases. If the maximum permissible torque value is exceeded, the servo motor will stop moving, implementing a torque logic protection method to prevent the magnetic beam from colliding and deforming. Similarly, during the adjustment of the gap, if the minimum gap is exceeded and the magnetic beam touches the hard limit 17 at the minimum gap, the servo motor torque suddenly increases. If the maximum permissible torque value is exceeded, the servo motor will stop moving, completing the torque logic protection method to prevent the magnetic beam from colliding and deforming. Furthermore, during the adjustment of the gap, if the magnetic beam exhibits a large tilt angle, the servo motor torque value will also suddenly increase, exceeding the maximum permissible torque value, causing the servo motor to stop moving, completing the torque logic protection method to prevent the magnetic beam from deforming.

[0198] In addition, combined Figures 1A-1D and Figure 4 The specific operation of four motion control modes of a redundant position feedback undulator motion control system according to an embodiment of the present invention is described as follows:

[0199] (1) Gap mode

[0200] like Figure 4 As shown, by controlling the movement of servo motors 1, 6, 11, and 20, the torque is transmitted to drive shafts 8, 9, 22, and 24, thereby realizing the lower main beam magnetic pole 3 and the upper main beam 4, and thus increasing or decreasing the gap.

[0201] (2) Center Model

[0202] like Figure 4 As shown, when the foundation experiences slight subsidence, the upper magnetic pole beam 4 can be moved by controlling the drive shafts 8 and 9, and the lower magnetic pole beam 3 can be moved upward by controlling the transmission mechanisms 22 and 24, thereby achieving the upward movement of the center of the entire GAP.

[0203] (3) Taper mode

[0204] like Figure 4 As shown, taking the entry point in the diagram as the reference, Taper is calculated as follows:

[0205] Taper=(GVL.ExUp_Encoder+GVL.ExUp_Encoder)-

[0206] (GVL.EnUp_Encoder+GVL.EnDn_Encoder)

[0207] The two inlet position values ​​remain unchanged. The Taper is increased or decreased by controlling the movement of the two servo motors 11 and 20 at the outlet. That is, the inlet size remains unchanged, but the outlet size is changed. When the gap is already at its maximum, a positive Taper cannot be input to further increase the Taper, and when the gap is at its minimum, a negative Taper cannot be input to further decrease the Taper.

[0208] (4) Maintenance Mode

[0209] like Figure 4 As shown, if the synchronous movement of the four servo motors fails, the four position values ​​of the lower main beam magnetic pole 3 and the upper magnetic pole beam 4 will exceed the tolerance (i.e., the pairwise difference between the four position values ​​of the lower main beam magnetic pole 3 and the upper magnetic pole beam 4 exceeds the position comparison limit threshold GVL.SET_DIFF). In this case, maintenance mode should be used to control the movement of individual motors, which can achieve fine adjustment of the lower main beam magnetic pole 3 and the upper magnetic pole beam 4.

[0210] While specific embodiments of the present invention have been described above, they are not intended to limit the scope of the invention. They are merely illustrative examples. Other changes can be made to these embodiments without departing from the essence of the invention. Therefore, the scope of protection of the present invention is defined by the appended claims.

Claims

1. A synchrotron motion control system with redundant position feedback, characterized by, include: Four sets of grating rulers are respectively installed at the upper end of the inlet, the lower end of the inlet, the upper end of the outlet, and the lower end of the outlet of the undulator. Four servo motors are installed at the upper end of the inlet, lower end of the inlet, upper end of the outlet, and lower end of the outlet of the undulator, and each has a motor encoder. They are connected to the undulator via a drive shaft. Two inclinometers are installed near the upper end of the undulator's outlet and near the lower end of the undulator's outlet, respectively. Photoelectric limit switches, electromechanical limit switches, hard limit switches, emergency stop buttons, alarms, and indicator lights; as well as The slave control chassis includes a PLC controller, and a servo driver, a position input module, an analog input module, a digital input module, and a digital output module connected to the PLC controller. The PLC controller has a motion control module and a logic control module. The servo driver is connected to the servo motor and to the motion control module via an NC controller. The position input module is connected to four sets of linear encoders and to the motion control module via the NC controller. The analog input module is connected to two sets of inclinometers and to the logic control module. The digital input module is connected to photoelectric limit switches, electromechanical limit switches, and emergency stop buttons, and to the logic control module. The digital output module is connected to indicator lights and alarms, and to the logic control module. The motor encoder is used to monitor the position value of the oscillator beam in order to obtain the motor encoder reading; The undulator motion control system determines whether at least some of the grating rulers are faulty; if none of the grating rulers are faulty, the grating ruler readings are assigned to the corresponding intermediate variables; otherwise, it indicates that at least some of the grating rulers are faulty, and the motor encoder readings are used to replace the grating ruler readings of the faulty grating rulers and are assigned to the corresponding intermediate variables.

2. The redundant position feedback synchrotron motion control system of claim 1, wherein, The photoelectric limit, electromechanical limit, and hard limit are all installed near the entrance of the upper magnetic pole beam, near the exit of the upper magnetic pole beam, near the entrance of the lower magnetic pole beam, and near the exit of the lower magnetic pole beam, for triple limit protection when the undulator moves to the maximum gap position and the minimum gap position.

3. The redundant position feedback synchrotron motion control system of claim 1, wherein, It also includes a master station control cabinet, which is installed in the technical corridor. In local mode, it can be used to send control commands to control slave control boxes and read the status of slave control boxes. In remote mode, the master station control cabinet is set to interact with the central control room.

4. The redundant position feedback synchrotron motion control system of claim 1, wherein, The motion control module is configured to send commands to the servo driver to control the movement of the servo motor, and the logic control module is configured to implement tilt angle logic protection method, indicator light display motion status method, alarm fault alarm method, limit switch limit protection method, and emergency stop button emergency stop protection method.

5. The redundant position feedback synchrotron motion control system of claim 4, wherein, The number of servo drives is two, and each servo drive is connected to two sets of servo motors. The servo drives are configured to respond to the position and speed commands sent by the motion control module to the servo drives and the position, speed and torque signals fed back to the servo drives by the motor encoders, control the position, speed and torque of the servo motors, and send the position, speed and torque signals fed back to the servo drives by the motor encoders to the motion control module as input variables for the motion control module.

6. The redundant position feedback synchrotron motion control system of claim 4, wherein, The position input module is configured to acquire the grating ruler reading and then transmit the grating ruler reading to the motion control module via the NC controller as the input variable of the motion control module.

7. The undulator motion control system with redundant position feedback according to claim 4, characterized in that, The digital output module is configured to convert the output variables of the logic control module into switching quantities and transmit them to the indicator lights and alarms, so as to realize the method of the indicator lights displaying the motion status and the method of the alarms malfunctioning. The methods for indicator lights to display motion status and alarm devices to detect faults include: when a fault occurs, the signal value of the output variable of the logic control module is set to 1. The digital output module converts the output variable of the logic control module with a signal value of 1 into a switching quantity indicating conduction and transmits it to the indicator light and the alarm, causing the indicator light to display red and the alarm to issue a fault alarm; otherwise, the signal value of the output variable of the logic control module is set to 0. The digital output module converts the output variable of the logic control module with a signal value of 0 into a switching quantity indicating deactivation and transmits it to the indicator light and the alarm, causing the indicator light to turn off and the alarm to stop issuing fault alarms.

8. The undulator motion control system with redundant position feedback according to claim 7, characterized in that, The analog input module is configured to acquire data from the inclinometer and then transmit the inclinometer data to the logic control module, which uses the data as a variable to execute the inclinometer logic protection method. The tilt angle logic protection method includes: the tilt meter monitors the tilt angle of the oscillator beam, then the analog input module obtains the tilt meter reading and sends it to the logic control module. In the logic control module, the tilt angle value of the oscillator beam is not allowed to exceed the maximum tilt angle value. Once the maximum tilt angle value is exceeded, it indicates a fault. The motion control module sends a stop command to the servo driver to stop the servo motor. At the same time, the signal value of the output variable of the logic control module is set to 1. The digital output module converts the output variable of the logic control module with a signal value of 1 into a switch quantity indicating conduction and transmits it to the indicator light and the alarm, so that the indicator light displays red and the alarm issues a fault alarm. Until the tilt angle of the oscillator beam is less than or equal to the maximum tilt angle value, the motion control module sends a recovery command to the servo driver to resume the movement of the servo motor. At the same time, the signal value of the output variable of the logic control module is set to 0. The digital output module converts the output variable of the logic control module with a signal value of 0 into a switch quantity indicating deactivation and transmits it to the indicator light and the alarm, so that the indicator light turns off and the alarm stops issuing fault alarms. The digital input module is configured to convert the trigger signals of the photoelectric limit switch and the electromechanical limit switch in the limit switch, and the switch quantity signal indicating conduction of the emergency stop button into digital input signals, and then transmit the digital input signals to the logic control module of the PLC controller as input variables of the logic control module, so as to realize the limit switch limit protection method and the emergency stop button emergency stop protection method. The limit switch limit protection method includes: when the photoelectric limit switch and the electromechanical limit switch are triggered, the trigger signal of the photoelectric limit switch and the electromechanical limit switch is converted into a digital input signal with a signal value of 1 through the digital input module, and the digital input signal with a signal value of 1 is sent to the logic control module of the PLC controller as the input variable of the logic control module. The input variable of the logic control module is 1, which causes the logic control module to send a stop command to the servo driver to stop the servo motor; at the same time, the signal value of the output variable of the logic control module is set to 1, and the output variable of the logic control module with a signal value of 1 is converted into a switch quantity indicating conduction through the digital output module and transmitted to the indicator light and the alarm, so that the indicator light displays red and the alarm sounds a fault alarm. The emergency stop button emergency stop protection method is used for emergency stopping of the oscillator during operation, including: pressing the emergency stop button to send a switching signal indicating conduction, converting the switching signal of the emergency stop button into a digital input signal with a signal value of 1 through a digital input module, and sending the digital input signal to the logic control module of the PLC controller as an input variable of the logic control module. The input variable of the logic control module being 1 causes the logic control module to send a stop command to the servo driver to stop the servo motor.

9. A method for controlling the motion of an undulator with redundant position feedback, characterized in that, include: Step S0: Provide an undulator motion control system with redundant position feedback as described in any one of claims 1-8, using a grating ruler as the first position feedback system and a motor encoder of a servo motor as the second position feedback system. Step S1: The PLC controller uses a grating ruler to monitor the position value of the oscillator beam to obtain the grating ruler reading; Step S2: Use a motor encoder to monitor the position value of the undulator beam to obtain the motor encoder reading; Step S3: Determine whether at least some of the grating rulers are faulty; if none of the grating rulers are faulty, assign the grating ruler readings to the corresponding intermediate variables; otherwise, it indicates that at least some of the grating rulers are faulty, and assign the motor encoder readings to the corresponding intermediate variables instead of the grating ruler readings of the faulty grating rulers. Step S4: Execute the corresponding large soft limit protection method, small soft limit protection method, intermediate variable comparison protection method, and intermediate variable and motor encoder reading difference comparison protection method according to the intermediate variable and motor encoder reading; Step S5: Determine the GAP value of the current inlet based on the intermediate variables, and determine the displacement GVL.MOVE_GAP_C that the drive shaft needs to move based on the GAP setting value and the GAP value of the current inlet, as the target value; Step S6: Adjust the motion of the servo motor according to the real-time motion displacement feedback from the motor encoder until the total motion displacement of the drive shaft connected to the servo motor reaches the target value; or, determine the current motion displacement required by the drive shaft in real time, and adjust the motion of the servo motor according to the current motion displacement required by the drive shaft until the absolute value of the current motion displacement required by the drive shaft is less than a precision threshold.

10. The undulator motion control method with redundant position feedback according to claim 9, characterized in that, Before obtaining the grating ruler reading, the process also includes: measuring the GAP gap values ​​at the inlet and outlet of the undulator using a high-precision external measuring instrument, and then using the GAP gap values ​​at the inlet and outlet to calibrate the grating ruler reading that has not yet been calibrated, thereby obtaining the corresponding grating ruler offset. Obtaining the grating ruler reading specifically includes: obtaining the calibrated grating ruler reading based on the grating ruler offset and the uncalibrated grating ruler reading, which is then used as the final grating ruler reading; Before obtaining the motor encoder reading, the process also includes: obtaining the difference between the calibrated grating ruler reading and the uncalibrated motor encoder reading when the oscillator moves to different positions, fitting the difference function curve according to the correspondence between the difference and the uncalibrated motor encoder reading, and then storing the function curve in the motion control module to obtain the motor encoder bias corresponding to the uncalibrated motor encoder reading. Obtaining the motor encoder reading specifically includes: obtaining the calibrated motor encoder reading based on the motor encoder bias and the uncalibrated motor encoder reading, which is then used as the final motor encoder reading.

11. The undulator motion control method with redundant position feedback according to claim 9, characterized in that, The large soft limit protection method includes: determining whether the following formulas are simultaneously true; if true, the PLC controller enables the servo drive to operate normally; otherwise, a fault has occurred, the PLC controller sends a stop command to the servo drive to stop the corresponding servo motor, the signal value of the output variable of the logic control module is set to 1, and the digital output module converts the output variable of the logic control module with a signal value of 1 into a switching quantity indicating conduction. The switching quantity indicating conduction causes the indicator light to display red, and the alarm sounds a fault alarm. (GVL.EnDn_Encoder-(MaxGap_Limit / 2))≤Soft_limit_Value (GVL.ExUp_Encoder-MaxGap_Limit / 2)≤Soft_limit_Value (GVL.EnDn_Encoder-MaxGap_Limit / 2)≤Soft_limit_Value (GVL.ExUp_Encoder-MaxGap_Limit / 2)≤Soft_limit_Value, Among them, GVL.EnUp_Encoder is the intermediate variable for the upper position at the inlet, GVL.EnDn_Encoder is the intermediate variable for the lower position at the inlet, GVL.ExUp_Encoder is the intermediate variable for the upper position at the outlet, GVL.ExDn_Encoder is the intermediate variable for the lower position at the outlet, Soft_limit_Value is the soft limit value, and MaxGap_Limit is the maximum GAP limit value; The soft limit protection method includes: determining whether the following formulas are true simultaneously. If true, the PLC controller enables the servo drive to operate normally; otherwise, a fault has occurred. The PLC controller sends a stop command to the servo drive to stop the corresponding servo motor. The signal value of the output variable of the logic control module is set to 1. The digital output module converts the output variable of the logic control module with a signal value of 1 into a switching quantity indicating conduction. The switching quantity indicating conduction causes the indicator light to turn red, and the alarm sounds a fault alarm. (MinGap_Limit / 2-GVL.EnDn_Encoder)≤Soft_limit_Value (MinGap_Limit / 2-GVL.ExUp_Encoder)≤Soft_limit_Value (MinGap_Limit / 2-GVL.EnDn_Encoder)≤Soft_limit_Value (MinGap_Limit / 2-GVL.ExUp_Encoder)≤Soft_limit_Value, MinGap_Limit is the minimum gap limit value; The intermediate variable comparison protection method includes: determining whether the following formulas are simultaneously true. If true, the PLC controller enables the servo drive to operate normally; otherwise, a fault has occurred. The PLC controller sends a stop command to the servo drive to stop the corresponding servo motor. The signal value of the output variable of the logic control module is set to 1. The digital output module converts the output variable of the logic control module with a signal value of 1 into a switching quantity indicating conduction. The switching quantity indicating conduction causes the indicator light to turn red, and the alarm sounds a fault alarm. |GVL.EnUp._Encoder-GVL.ExUp_Encoder|≤GVL.SET_DIFF |GVL.EnDn._Encoder-GVL.ExDn_Encoder|≤GVL.SET_DIFF |GVL.EnUp._Encoder-GVL.EnDn_Encoder|≤GVL.SET_DIFF, Wherein, GVL.SET_DIFF is the position comparison limit threshold; The protection method comparing the difference between the intermediate variable and the motor encoder reading is executed when at least one grating ruler is fault-free. It includes: determining whether the following formulas are simultaneously true; if true, the PLC controller enables the servo drive to operate normally; otherwise, a fault has occurred, the PLC controller sends a stop command to the servo drive to stop the corresponding servo motor, the signal value of the logic control module's output variable is set to 1, and the digital output module converts the logic control module's output variable with a signal value of 1 into a switching quantity indicating conduction. The switching quantity indicating conduction causes the indicator light to display red, and the alarm sounds a fault alarm. |GVL.EnUp_Encoder-GVL.EnUp.Rotary_Encoder|≤GVL.SET_DIFF |GVL.ExUp_Encoder-GVL.ExUp.Rotary_Encoder|≤GVL.SET_DIFF |GVL.EnDn_Encoder-GVL.EnDn.Rotary_Encoder|≤GVL.SET_DIFF |GVL.ExDn_Encoder-GVL.ExDn.Rotary_Encoder|≤GVL.SET_DIFF, Among them, EnUp.Rotary_Encoder is the inlet motor encoder reading, GVL.ExUp.Rotary_Encoder is the outlet motor encoder reading, GVL.EnDn.Rotary_Encoder is the inlet motor encoder reading, and GVL.ExDn.Rotary_Encoder is the outlet motor encoder reading.