Excitation curve conversion system for I / B conversion of pulsed power with preset values
By designing the IBConvert and EpicsDBGenerator program modules, the automated I/B conversion of the excitation curve conversion system was realized, solving the problems of complex and error-prone manual operation in the existing technology, and improving the real-time performance and compatibility of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INST OF HIGH ENERGY PHYSICS CHINESE ACAD OF SCI
- Filing Date
- 2021-07-02
- Publication Date
- 2026-04-21
AI Technical Summary
In the existing technology, the excitation curve conversion system requires manual writing of EPICS record files, which is labor-intensive and prone to errors. Furthermore, the entire system needs to be rewritten when the logic or data is changed, and there is a lack of automated I/B conversion systems.
Design an excitation curve conversion system for pulse power supply I/B conversion with preset values, including IBConvert program module and EpicsDBGenerator program module, to realize real-time conversion of I and B, and generate a new DB file when the number of power supplies or parameters change.
It realizes automated I/B conversion of pulse power supply with preset values, simplifies system installation and use, improves the real-time performance and compatibility of conversion, and is suitable for large scientific facilities.
Smart Images

Figure CN117388777B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of excitation curve conversion technology, and more particularly to an excitation curve conversion system for pulse power supply I / B conversion with preset values. Background Technology
[0002] In the field of accelerators, magnetic fields are typically used to confine the motion of charged particles within a vacuum tube. The required magnetic field lines and strength vary depending on whether the charged particles are moving in a straight line or circular path, and the particle's energy. Various magnetic fields are generated by supplying the coils with the necessary current using DC, AC, or pulsed power supplies. The excitation curve is obtained through actual magnetic measurements. The power supply system provides a real-time current value (I), while the physics beam tuning software uses a magnetic field value (B). This necessitates an IOC (Inversion of Control) program to convert between I and B in real time, enabling the adjustment and monitoring of the charged particle's trajectory. The design of the IOC program primarily involves designing the runtime database—the EPICS log file. The logic and calculation formulas for the conversion between I and B are complex, requiring numerous calculation coefficients. Manually writing the EPICS log file would be extremely labor-intensive and prone to errors. Furthermore, if the program logic or calculation data is changed, the entire EPICS log file would need to be rewritten. Pulse power supplies with preset values are commonly used in various accelerators. Therefore, in the field of accelerator technology, especially in systems used for accelerator excitation curve conversion, it is essential to design a system and method that can generate EPICS records and realize automatic I and B conversion of pulse power supplies with preset values. Summary of the Invention
[0003] This invention addresses the technical requirements of accelerators by providing an excitation curve conversion system for pulse power supply I / B conversion with preset values.
[0004] The technical solution adopted in this invention is: an excitation curve conversion system for I / B conversion of pulse power supplies with preset values. This system converts the physically set magnetic field value in the accelerator into the current value required by the power supply, or converts the current value of the power supply into the corresponding magnetic field value. The entire system includes two parts: an IBConvert program module and an EpisDBGenerator program module. The IBConvert program is a standard EPICS software IOC that needs to run continuously to achieve real-time I / B conversion. The EpisDBGenerator program module is used to generate the DB file required by the IBConvert program. When the number of power supplies, their names, or the excitation curve fitting coefficients change, this program needs to be run to generate a new DB file. When the system is used for I / B conversion of pulse power supplies with preset values, the method includes the following steps:
[0005] When B->I conversion occurs, the preset current value SetI_Tmp, the effective length of the magnetic field waveform data BT-Length, and the magnetic field waveform data BT-SET are first calculated based on the preset magnetic field value B-SET. Then, 200,000 point current waveform data SetWaveI_Raw are calculated based on the excitation curve fitting coefficient. Next, the effective data length SetWaveI_Out.NUSE is set according to BT-Length. Finally, the data in SetWaveI_Raw is output to SetWaveI according to the effective data length, and the power remote control program WFCreate is triggered to send waveform data.
[0006] When I->B conversion occurs, the real-time current curve sampling value GetWaveI is read back every 5 seconds at a certain period. The magnetic field waveform sampling value BT is then calculated based on the excitation curve fitting coefficient.
[0007] The pulse power supply with preset values includes a two-pole iron, a four-pole iron, a six-pole iron, and a correction iron pulse power supply on the synchronization ring.
[0008] The beneficial effects of this invention are: the system of this invention can be applied to large scientific facilities, has strong compatibility, is simple to install and use, can perform real-time conversion of pulse power supplies with preset values, can generate EPICS records for pulse power supplies with preset values, and can realize automatic I and B conversion. Attached Figure Description
[0009] Figure 1 This is a schematic diagram of the overall logical connection structure of the excitation curve conversion system in this invention.
[0010] Figure 2 This is a logic diagram illustrating the conversion of the DC power supply excitation curve in this embodiment.
[0011] Figure 3 This is a schematic diagram of the logic for converting pulse waveform data in this embodiment 2.
[0012] Figure 4 This is a schematic diagram of the logic for converting the excitation curve of the floating power supply in Embodiment 4. Detailed Implementation
[0013] like Figure 1-4As shown, a system for accelerator excitation curve conversion is used in accelerators to convert physically set magnetic field values into current values required by the power supply, or to convert the current value of the power supply into the corresponding magnetic field value. The entire system consists of two parts: the IBConvert program module and the EpisDBGenerator program module. The IBConvert program is a standard EPICS software IOC that needs to run continuously to achieve real-time conversion between I (current) and B (magnetic field). The EpisDBGenerator program module is a Java application used to generate the DB (runtime database) file required by the IBConvert program. When the number of power supplies, their names, or the excitation curve fitting coefficients change, this program needs to be run to generate a new DB file.
[0014] The IBConvert program module in this invention is designed according to the EPICS specification, mainly including the design of EPICS (Experimental Physics and Industrial Control System) records and the design of functions for processing waveform data. Among these, the EPICS record is the core of realizing I / O conversion. Based on the conversion requirements in the technical protocol and the type of magnet power supply, power supplies can be divided into four categories: DC power supply, pulse power supply with preset values, convex rail pulse power supply without preset values, and pulse power supply with floating power supply. The design of EPICS records is also based on the classification of power sources. The designed DB files include: DC.db file, which implements DC power source I / B conversion, except for floating power sources; PulseWithDC.db file, which implements pulse power source I / B conversion with preset values, except for quadrupole magnet pulse power sources; InjectionBump.db file, which implements convex rail magnet pulse power source I / B conversion without preset values; Quadrupole.db file, which implements quadrupole magnet pulse power source I / B conversion and its floating power source I / B conversion; EnergyFactor.db file, which implements energy factor related calculations and parameter settings; and iocAdminSoft.db file, which comes from the devIocStats software package and is used to monitor the IOC operating status.
[0015] Example 1: I / B Conversion for DC Power Supply
[0016] In this embodiment, the DC power sources include MEBT (Medium Energy Beam Transmission Line), HEBT (High Energy Beam Transmission Line), and a ring DC power source, excluding the floating power source because the calculation method for the floating power source is different. The magnetic fields of MEBT and HEBT need to consider energy correction; MEBT requires the rest energy of negative hydrogen ions, and HEBT requires the rest energy of protons. To facilitate the development of the JAVA program for generating EPICS DB, an energy factor is also introduced into the magnetic field of the ring, but its value is always 1 and does not affect the calculation results.
[0017] Taking the DC power supply M:MG:HC01-PS as an example, the I / B conversion logic is as follows: Figure 1 As shown:
[0018] When converting from B to I, the theoretical magnetic field value B-SET is first set, the actual magnetic field setting value B-SET_Actual is calculated based on the energy factor Energy_Factor, and the current setting value SetI is calculated based on the excitation curve fitting coefficient and sent to the power supply remote control program.
[0019] During I->B conversion, the real-time current sampling value GetI is first read back at a certain period, such as 1 second (the period can be modified in st.cmd). The actual magnetic field sampling value B_Actual is calculated based on the excitation curve fitting coefficient. Then, the theoretical magnetic field sampling value B is calculated based on the energy factor Energy_Factor. For a separately powered magnet, the calculated theoretical magnetic field sampling value includes PID:B and MID:B, which are completely equal. For a single power supply powering multiple magnets, both PID:B and MID:B are calculated using the real-time current sampling value GetI. The difference is that PID:B is calculated using the average excitation curve fitting coefficient, while MID:B is calculated using its own individual excitation curve fitting coefficient.
[0020] In this embodiment, during I / B conversion, it is necessary to set the theoretical kinetic energy, actual kinetic energy, and rest energy parameters of the MEBT and HEBT, and there are no special requirements for the order and timing of setting these parameters.
[0021] Example 2: I / B Conversion for Pulse Power Supply with Preset Values
[0022] Pulse power supplies with preset values include diode, tetrapole, hexapole, and correction iron pulse power supplies on the synchronization ring. These power supplies require conversion of the preset magnetic field value and the overall magnetic field waveform data.
[0023] Taking the pulse power supply R:MG:VC01 as an example, the conversion of the preset value is exactly the same as the DC power supply I / B conversion logic in Embodiment 1, which will not be repeated here. The conversion of pulse waveform data is as follows: Figure 2 As shown.
[0024] During the B->I conversion, the preset current value SetI_Tmp, the effective length of the magnetic field waveform data BT-Length, and the magnetic field waveform data BT-SET are first calculated based on the preset magnetic field value B-SET. Then, 200,000 point current waveform data SetWaveI_Raw are calculated based on the excitation curve fitting coefficient. Next, the effective data length SetWaveI_Out.NUSE is set according to BT-Length. Finally, the data in SetWaveI_Raw is output to SetWaveI according to the effective data length, and the power remote control program WFCreate is triggered to send waveform data.
[0025] During I->B conversion, the real-time current curve retrieval value GetWaveI is first read back at a certain period, such as 5 seconds (the period can be modified in st.cmd). The magnetic field waveform retrieval value BT is then calculated based on the excitation curve fitting coefficient. For a separately powered magnet, the calculated magnetic field waveform retrieval values include PID:BT and MID:BT, which are completely equal. For a single power supply powering multiple magnets, both PID:BT and MID:BT are calculated using the real-time retrieval current value GetWaveI. The difference is that PID:BT is calculated using the average excitation curve fitting coefficient, while MID:BT is calculated using its own individual excitation curve fitting coefficient.
[0026] In this embodiment, when converting magnetic field waveform data into current waveform data, it is necessary to first set the magnetic field preset value B-SET, then set the effective waveform length BT-Length, and finally set the magnetic field waveform data BT-SET. This setting order is determined by the fact that SetI and BT-Length need to participate in the calculation and the program design logic. Regardless of which setting value is modified, the magnetic field waveform data BT-SET must be reset for it to take effect.
[0027] Example 3: I / B Conversion for a Convex Rail Pulse Power Supply Without Preset Values
[0028] The two convex rail pulse power supplies on the synchronization ring have no preset values. The conversion of pulse waveform data is the same as the conversion method described in Example 2, and will not be repeated here.
[0029] In this embodiment, when converting magnetic field waveform data into current waveform data, the effective waveform length BT-Length needs to be set first, followed by the magnetic field waveform data BT-SET. This setting order is determined by the fact that BT-Length needs to participate in the calculation and the program design logic. Regardless of which setting value is modified, the magnetic field waveform data BT-SET must be reset for it to take effect.
[0030] Example 4: I / B Conversion for Quadrupole Magnet Pulse Power Supply and its Floating Power Supply
[0031] The conversion method of the quadrupole magnet pulse power supply is exactly the same as that of the pulse power supply with preset values described in Example 2. The floating power supply is related to its corresponding main magnet power supply.
[0032] Taking floating power supplies R:MG:QD01-FPS01 and R:MG:QD01-FPS02 as examples, the I / B conversion logic is as follows: Figure 3 As shown.
[0033] When performing the B->I conversion, the total magnetic field value of the main pulse power supply should first be set to QD-PS:B-SET. The total current setting value QD-PS:SetI is calculated based on the average excitation curve fitting coefficient. Then, based on this current and their respective fitting coefficients, the magnetic field setting values QD01-FPS01:B-SET_All of each main quadrupole magnet are calculated. After superimposing the magnetic field setting value of the floating power supply, a new magnetic field value QD01-FPS01:B-SET_Total is obtained. The total current value is then calculated based on their respective fitting coefficients. The current value of the main magnet power supply QD-PS:SetI is subtracted to obtain the current setting value QD01-FPS01:SetI of the floating power supply, which is then sent to the power supply remote control program. The current values of QD01-FPS02 are obtained from QD01-FPS01 and remain consistent throughout.
[0034] When I->B conversion occurs, the real-time current sampling values R:MG:QD-PS:GetI and QD01-FPS01:GetI of the main magnet power supply and floating power supply are read back at a certain period, such as 1 second (the period can be modified in st.cmd). After being superimposed, the total current sampling value QD01-FPS01:GetI_Total is obtained. The total magnetic field sampling value is calculated according to the fitting coefficient of their respective excitation curves. The magnetic field sampling value QD01:B of the main magnetic field is subtracted to obtain the magnetic field sampling value QD01-FPS02:B of the floating power supply.
[0035] In this embodiment, the precautions for converting the excitation curve of the main quadrupole magnet pulse power supply are the same as those described in Embodiment 2. When converting the excitation curve of the floating power supply, it is important to first set the preset value of the main magnetic field and then set the magnetic field setting value of the floating power supply. Since the MID of the floating power supply and the MID of the main quadrupole magnet pulse power supply are the same, the MID:B of the floating power supply will not be converted.
[0036] In this invention, the pulse magnet power supply needs to process waveform data during excitation curve conversion. Specifically, it needs to calculate the fitting coefficients for each magnetic field waveform or current waveform data according to the excitation curve. Furthermore, the calculation methods for I / B conversion differ between pulse power supplies with and without preset values. To achieve this functionality, the EPICS Array Subroutine (aSub) record is used. This record allows the calling of different C programs, and the waveform data conversion is completed within the C program.
[0037] When installing the IBConvert program module in this invention, the computer requirements are as follows: a physical PC, workstation, or virtual machine is acceptable; at least 4GB of memory; Linux operating system, preferably Red Hat or CentOS, version 6.0 or above; software version requirements: EPICS base version 3.14 or 3.15; synApps version 5.6 or above.
[0038] The steps to install the IBConvert program module are as follows:
[0039] S1. Extract the IBConvert package to any user directory as needed.
[0040] S2. Modify the IBConvert / configure / RELEASE file to specify the absolute installation paths for EPICS_BASE, AUTOSAVE, IOCADMIN, and CALC.
[0041] S3. Execute `make clean && make` in the IBConvert directory.
[0042] When this invention is used in conjunction with third-party software, after the IBConvert program module is running normally, it can be used with third-party graphical software containing the EPICS channel access support protocol, such as ControlSystem Studio (CSS), Open XAL software, etc. Open XAL software is recommended here. This software is an open-source, cross-platform pure Java program that can provide rich upper-level applications for accelerator physics beam tuning. Currently, this software is widely used in large scientific facilities at home and abroad.
[0043] This invention describes the usage of the EpicsDBGenerator program module. The EpicsDBGenerator module reads the excitation curve coefficients stored in an Excel file and automatically generates an EPICS DB file for I / B conversion. EpicsDBGenerator is developed using Java, requiring JDK7 or higher for compilation and runtime. The jxl package is used to read the Excel spreadsheet. Therefore, the Excel file needs to be converted to a file with the .xls extension.
[0044] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A field curve conversion system for I / B conversion of a pulsed power supply with preset values, characterized by: The system converts the physically set magnetic field value in the accelerator into the current value required by the power supply, or converts the current value of the power supply into the corresponding magnetic field value. The entire system consists of two parts: the IBConvert program module and the EpisDBGenerator program module. The IBConvert program is a standard EPICS software IOC that needs to run continuously to achieve real-time I / B conversion. The EpisDBGenerator program module is used to generate the DB file required by the IBConvert program. When the number of power supplies, their names, or the excitation curve fitting coefficients change, this program needs to be run to generate a new DB file. When the system is used with a pulse power supply with preset values, the I / B conversion method includes the following steps: When B->I conversion occurs, the preset current value SetI_Tmp, the effective length of the magnetic field waveform data BT-Length, and the magnetic field waveform data BT-SET are first calculated based on the preset magnetic field value B-SET. Then, 200,000 point current waveform data SetWaveI_Raw are calculated based on the excitation curve fitting coefficient. Next, the effective data length SetWaveI_Out.NUSE is set according to BT-Length. Finally, the data in SetWaveI_Raw is output to SetWaveI according to the effective data length, and the power remote control program WFCreate is triggered to send waveform data. When I->B conversion occurs, the real-time current curve sampling value GetWaveI is read back every 5 seconds at a certain period. The magnetic field waveform sampling value BT is then calculated based on the excitation curve fitting coefficient.
2. The field curve conversion system for pulsed power I / B conversion with preset values according to claim 1, characterized in that: The pulse power supply with preset values includes a two-pole iron, a four-pole iron, a six-pole iron, and a correction iron pulse power supply on the synchronization ring.
Citation Information
Patent Citations
Magnetic field analysis program and magnetic field analysis method
CN103718180A
Magnetic field generation method, synchrotron, storage medium and equipment
CN111462975A