Excitation Curve Conversion System for Floating Power Supply I / B Conversion
By designing an excitation curve conversion system for accelerator, the problems of I/B conversion complexity and difficulty in maintaining EPICS recording files in the prior art are solved, real-time conversion of quadrupole magnet pulse power supply and its floating power supply and automatic generation of EPICS recording files are realized, and the compatibility and ease of use of the system are improved.
Patent Information
- Application Number
- CN202310672376.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-02
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2041-07-02
AI Technical Summary
The prior art is difficult to effectively solve the complexity of excitation curve I/B conversion in the accelerator, which leads to the huge workload of manual writing of EPICS recording files and is prone to errors. When the program logic or calculation data changes, all DB files need to be rewrite.
Design an excitation curve conversion system for floating power supply I/B conversion, including the IBConvert program module and the EpicsDBGenerator program module. The IBConvert program module implements real-time conversion of I and B. The EpicsDBGenerator program module is used to generate the DB files required by the IBConvert program. When the power quantity, name or excitation curve fit coefficient changes, a new DB file is automatically generated.
Real-time I/B conversion of quadrupole magnet pulse power supply and its floating power supply is realized, simplifying the generation and maintenance of EPICS record files, and improving system compatibility and installation and use simplicity.
Smart Images

Figure CN116699486B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of excitation curve conversion, and particularly to an excitation curve conversion system for floating power supply I / B conversion. Background Art
[0002] In the field of accelerators, a magnetic field is usually used to confine the movement of charged particles in a vacuum pipe. According to whether the charged particles move in a straight line or a circular motion and the different particle energies, the required magnetic field lines and magnetic field intensity are also different. The generation of various magnetic fields is achieved by providing the required current for the coil through a DC, AC or pulsed power supply, and the excitation curve is obtained through actual magnetic measurement. What the power supply system can provide is the real-time current value I, while the magnetic field value B is used in the physical beam tuning software. Therefore, an IOC program is needed to convert I and B in real time to achieve the adjustment and monitoring of the running orbit of charged particles. The most important part of the design of the IOC program is to design the runtime database - the EPICS record file. The logic and calculation formula for the mutual conversion of I and B are relatively complex, and there are many measurement coefficients that need to be substituted into the formula for calculation. If the EPICS record file is written manually, the workload will be extremely large and it is easy to make mistakes. If the program logic or measurement data is changed, the EPICS record file needs to be rewritten completely. The pulsed power supply for quadrupole magnets and its floating power supply are commonly used power supplies in various accelerators. Therefore, in the field of accelerator technology, especially in the system for accelerator excitation curve conversion, it is very necessary to design a system and method that can generate EPICS records and realize the automatic conversion of I and B for the pulsed power supply for quadrupole magnets and its floating power supply. Summary of the Invention
[0003] Aiming at the technical requirements of accelerators, the present invention aims to provide an excitation curve conversion system for floating power supply I / B conversion.
[0004] The technical solution adopted by the present invention is as follows: an excitation curve conversion system for floating power supply I / B conversion, which 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 whole system includes two parts: the IBConvert program module and the EpicsDBGenerator program module. Among them, the IBConvert program is a standard EPICS software IOC and needs to run continuously to achieve the real-time conversion of I and B; the EpicsDBGenerator program module is used to generate the DB file required by the IBConvert program. When the number of power supplies, names, and excitation curve fitting coefficients change, this program needs to be run to generate a new DB file; when the system is used for the pulsed power supply for quadrupole magnets and its floating power supply, the method for I / B conversion includes the following steps:
[0005] When converting from B to I, first set the total magnetic field value QD-PS:B-SET of the main pulse power supply, calculate the total current set value QD-PS:SetI according to the fitting coefficients of the average excitation curve, and then calculate the magnetic field value set values QD01-FPS01:B-SET_All of each main quadrupole magnet by back-calculation based on this current and their respective fitting coefficients. After superimposing the magnetic field set value of the floating power supply, obtain the new magnetic field value QD01-FPS01:B-SET_Total, and then calculate the total current value according to their respective fitting coefficients. Subtract the current value QD-PS:SetI of the main magnet power supply to obtain the floating power supply current set value QD01-FPS01:SetI and send it to the power remote control program. The current value of QD01-FPS02 is obtained from QD01-FPS01 and always remains the same;
[0006] When converting from I to B, first read back the real-time current acquisition values R:MG:QD-PS:GetI and QD01-FPS01:GetI of the main magnet power supply and the floating power supply at a certain period of 1 second, and after superimposing, obtain the total current acquisition value QD01-FPS01:GetI_Total. Calculate the total magnetic field acquisition value according to the fitting coefficients of their respective excitation curves, and subtract their respective main magnetic field acquisition values QD01:B to obtain the magnetic field acquisition value QD01-FPS02:B of the floating power supply.
[0007] When the floating power supply performs excitation curve conversion, first set the preset value of the main magnetic field and then set the magnetic field set value of the floating power supply.
[0008] Advantages of the present invention: The system of the present invention can be applied to large scientific installations, has strong compatibility, is simple to install and use, can perform real-time conversion on the quadrupole magnet pulse power supply and its floating power supply, and can generate EPICS records for the quadrupole magnet pulse power supply and its floating power supply and realize a system for automatic conversion between I and B. Description of the Drawings
[0009] Figure 1 is a schematic diagram of the overall logical connection structure of the excitation curve conversion system in the present invention.
[0010] Figure 2 is a schematic logical diagram of the excitation curve conversion of the DC power supply in the first embodiment.
[0011] Figure 3 is a schematic logical diagram of the pulse waveform data conversion in the second embodiment.
[0012] Figure 4 is a schematic logical diagram of the excitation curve conversion of the floating power supply in the fourth embodiment Detailed Embodiments
[0013] AsFigures 1-4 As shown in the figure, a system for accelerator excitation curve conversion is used to convert the physically set magnetic field value into the current value required by the power supply or convert the current value of the power supply into the corresponding magnetic field value in the accelerator. The entire system includes two parts: the IBConvert program module and the EpicsDBGenerator program module. Among them, the IBConvert program is a standard EPICS soft IOC and needs to run continuously to achieve real-time conversion of I (current) and B (magnetic field); the EpicsDBGenerator 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, names, and excitation curve fitting coefficients change, this program needs to be run to generate a new DB file.
[0014] The IBConvert program module in the present invention is designed according to the EPICS specification, mainly including the design of EPICS (EPICS stands for "Experimental Physics and Industrial Control System". The two basic mechanisms in the EPICS software system are channel access and distributed dynamic database.) records and the design of functions for processing waveform data. Among them, the EPICS record is the core for realizing the conversion of I and B. According to the conversion requirements in the technical agreement and the types of magnet power supplies, it can be divided into four types of power supplies: DC power supply, pulsed power supply with a preset value, pulsed power supply for injection bump without a preset value, and pulsed power supply with a floating power supply. The design of EPICS records is also carried out according to the classification of power supplies. The designed DB files include: DC.db file, which is used to realize the I / B conversion of DC power supplies, excluding floating power supplies; PulseWithDC.db file, which is used for the I / B conversion of pulsed power supplies with a preset value, excluding quadrupole magnet pulsed power supplies; InjectionBump.db file, which is used for the I / B conversion of pulsed power supplies for injection bump without a preset value; Quadrupole.db file, which is used for the I / B conversion of quadrupole magnet pulsed power supplies and their floating power supplies; EnergyFactor.db file, which is used to realize calculations related to energy factors and parameter settings; iocAdminSoft.db file, which is derived from the software package devIocStats and is used to monitor the operating status of the IOC.
[0015] Embodiment 1: I / B conversion for DC power supply
[0016] The DC power supply in this embodiment includes MEBT (Medium Energy Beam Transport line), HEBT (High Energy Beam Transport line), and the ring DC power supply, excluding the floating power supply because its calculation method is different. The magnetic fields of MEBT and HEBT need to consider energy correction. MEBT needs to use the rest energy of negative hydrogen ions, and HEBT needs to use the rest energy of protons. To facilitate the development of the JAVA program for generating EPICS DB, an energy factor is also introduced for the magnetic field on 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 Figure 1 shown:
[0018] When converting from B to I, first set the theoretical magnetic field value B-SET, calculate the actual magnetic field set value B-SET_Actual according to the energy factor Energy_Factor, and then calculate the current set value SetI according to the excitation curve fitting coefficient and send it to the power supply remote control program.
[0019] When converting from I to B, first read back the real-time current acquisition value GetI at a certain period, such as 1 second (the period can be modified in st.cmd), calculate the actual magnetic field acquisition value B_Actual according to the excitation curve fitting coefficient, and then calculate the theoretical magnetic field acquisition value B according to the energy factor Energy_Factor. For a magnet with independent power supply, the calculated theoretical magnetic field acquisition values include PID:B and MID:B, and their values are exactly equal. For the case where one power supply supplies multiple magnets, both PID:B and MID:B are calculated using the real-time acquired current value GetI. The difference is that PID:B is calculated using the average excitation curve fitting coefficient, and MID:B is calculated using their respective excitation curve fitting coefficients.
[0020] In this embodiment, when performing I / B conversion, it is necessary to set the theoretical kinetic energy, actual kinetic energy, and the rest energy parameters of particles for MEBT and HEBT, and there are no special requirements for the setting order and timing.
[0021] Embodiment 2: I / B Conversion for a Pulse Power Supply with Preset Values
[0022] The pulse power supply with preset values includes dipole magnets, quadrupole magnets, sextupole magnets, and correction magnet pulse power supplies on the synchronous ring. Such power supplies need to convert the magnetic field preset values and the total 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 I / B conversion logic of the DC power supply in Embodiment 1 and will not be repeated here. The conversion of the pulse waveform data is as Figure 2 shown.
[0024] When converting from B to I, first, based on the preset magnetic field value B-SET, calculate the preset current value SetI_Tmp, the effective length BT-Length of the magnetic field waveform data, and the magnetic field waveform data BT-SET. Calculate 200,000 points of current waveform data SetWaveI_Raw according to the excitation curve fitting coefficients. Then, set the effective data length SetWaveI_Out.NUSE output to SetWaveI according to BT-Length. Finally, output the data in SetWaveI_Raw to SetWaveI according to the effective data length and trigger the power remote control program WFCreate to send the waveform data.
[0025] When converting from I to B, first, read back the real-time current curve acquisition value GetWaveI at a certain period, such as 5 seconds (the period can be modified in st.cmd). Calculate the magnetic field waveform acquisition value BT according to the excitation curve fitting coefficients. For a magnet with independent power supply, the calculated magnetic field waveform acquisition values include PID:BT and MID:BT, and their values are exactly equal. For the case where one power supply supplies multiple magnets, both PID:BT and MID:BT are calculated using the real-time acquired current value GetWaveI. The difference is that PID:BT is calculated using the average excitation curve fitting coefficients, and MID:BT is calculated using their respective excitation curve fitting coefficients.
[0026] In this embodiment, when converting the magnetic field waveform data into current waveform data, it is necessary to first set the preset magnetic field value B-SET, then set the waveform effective length BT-Length, and finally set the magnetic field waveform data BT-SET. This setting order is determined by the need for SetI and BT-Length to participate in the operation and the program design logic. No matter which setting value is modified, it is ultimately necessary to reset the magnetic field waveform data BT-SET for it to take effect.
[0027] Embodiment 3: I / B Conversion for a Convex Rail Pulse Power Supply without Preset Values
[0028] The two convex rail pulse power supplies on the synchronous ring have no preset values. The conversion of the pulse waveform data is the same as the conversion method described in Embodiment 2 and will not be repeated here.
[0029] In this embodiment, when converting the magnetic field waveform data into current waveform data, it is necessary to first set the waveform effective length BT-Length, and then set the magnetic field waveform data BT-SET. This setting order is determined by the need for BT-Length to participate in the operation and the program design logic. No matter which setting value is modified, it is ultimately necessary to reset the magnetic field waveform data BT-SET for it to take effect.
[0030] Example 4: I / B Conversion for the 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 the floating power supplies R:MG:QD01 - FPS01 and R:MG:QD01 - FPS02 as examples, the I / B conversion logic is as Figure 3 shown.
[0033] When converting from B to I, first set the total magnetic field value QD - PS:B - SET of the main pulse power supply. Calculate the total current set value QD - PS:SetI according to the average excitation curve fitting coefficient. Then, based on this current and their respective fitting coefficients, calculate the magnetic field value set values QD01 - FPS01:B - SET_All of each main quadrupole magnet in reverse. After superimposing the magnetic field set value of the floating power supply, obtain the new magnetic field value QD01 - FPS01:B - SET_Total. Then, calculate the total current value according to their respective fitting coefficients. Subtract the current value QD - PS:SetI of the main magnet power supply to obtain the floating power supply current set value QD01 - FPS01:SetI and send it to the power remote control program. The current value of QD01 - FPS02 is obtained from QD01 - FPS01 and always remains the same.
[0034] When converting from I to B, first read back the real - time current acquisition values R:MG:QD - PS:GetI and QD01 - FPS01:GetI of the main magnet power supply and the floating power supply at a certain period, such as 1 second (the period can be modified in st.cmd). After superimposing, obtain the total current acquisition value QD01 - FPS01:GetI_Total. Calculate the total magnetic field acquisition value according to their respective excitation curve fitting coefficients, and subtract their respective main magnetic field acquisition values QD01:B to obtain the magnetic field acquisition value QD01 - FPS02:B of the floating power supply.
[0035] In this embodiment, the precautions for the excitation curve conversion of the main quadrupole magnet pulse power supply are the same as those described in Example 2. When performing the excitation curve conversion for the floating power supply, it is necessary to note that the preset value of the main magnetic field should be set first and then the magnetic field set value of the floating power supply should be set. Since the MID of the floating power supply is the same as that of the main quadrupole magnet pulse power supply, the MID:B of the floating power supply is not converted anymore.
[0036] In the present invention, when the pulse magnet power supply performs excitation curve conversion, waveform data needs to be processed, that is, each magnetic field waveform data or current waveform data needs to be calculated according to the excitation curve fitting coefficient. In addition, the calculation methods for pulse power supplies with preset values and those without preset values during I / B conversion are different. To achieve this function, the Array Subroutine (aSub) record of EPICS needs to be used. Different C programs can be called through this record, and the conversion of waveform data is completed in the C program.
[0037] When installing the IBConvert program module in the present invention, the computer requirements are as follows: a physical PC, a workstation, or a virtual machine can all be used; the memory is at least 4G; the Linux operating system, preferably Redhat or Centos, with a version of 6.0 or higher; software version requirements: the EPICS base version is 3.14 or 3.15; the synApps version is 5.6 or higher.
[0038] The steps for installing the IBConvert program module are as follows:
[0039] S1. Unzip the IBConvert program package to any user directory as needed.
[0040] S2. Modify the IBConvert / configure / RELEASE file to specify the absolute installation paths of EPICS_BASE, AUTOSAVE, IOCADMIN, and CALC.
[0041] S3. Execute make clean&&make in the IBConvert directory.
[0042] When the present invention is used in combination with third-party software, after the IBConvert program module runs normally, it can be used in combination with third-party graphical software containing the EPICS channel access protocol, such as ControlSystem Studio (CSS), Open XAL software, etc. Here, Open XAL software is recommended. This software is an open-source, cross-platform pure Java program that can provide rich upper-layer application programs for accelerator physical beam tuning. Currently, this software is widely used in large scientific installations at home and abroad.
[0043] The usage method of the EpicsDBGenerator program module in the present invention. The EpicsDBGenerator program module is used to read the excitation curve coefficients saved in Excel and automatically generate an EPICS DB file for I and B conversion. EpicsDBGenerator is developed using the Java language, and the compilation and running environment requires JDK7 or above. The jxl package is used to read the Excel table. Therefore, the Excel file needs to be converted into a file with the suffix of xls.
[0044] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. An excitation curve conversion system for floating power supply I / B conversion, characterized in that: 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 whole system includes two parts: the IBConvert program module and the EpicsDBGenerator program module. Among them, the IBConvert program is a standard EPICS software IOC and needs to run continuously to achieve real-time conversion of I and B; the EpicsDBGenerator program module is used to generate the DB file required by the IBConvert program. When the number, name, and excitation curve fitting coefficient of the power supply change, this program needs to be run to generate a new DB file; When the system is used for the quadrupole magnet pulse power supply and its floating power supply, the method of I / B conversion includes the following steps: When performing B->I conversion, first set the total magnetic field value QD-PS:B-SET of the main pulse power supply, calculate the total current set value QD-PS:SetI according to the average excitation curve fitting coefficient, and then calculate the magnetic field value set values QD01-FPS01:B-SET_All of each main quadrupole magnet by back-calculation based on this current and their respective fitting coefficients. After superimposing the magnetic field set value of the floating power supply, a new magnetic field value QD01-FPS01:B-SET_Total is obtained, and then calculate the total current value according to their respective fitting coefficients. After subtracting the current value QD-PS:SetI of the main magnet power supply, the floating power supply current set value QD01-FPS01:SetI is obtained and sent to the power remote control program. The current value of QD01-FPS02 is obtained from QD01-FPS01 and always remains the same; When performing I->B conversion, first read the real-time current acquisition values R:MG:QD-PS:GetI and QD01-FPS01:GetI of the main magnet power supply and the floating power supply at a certain period of 1 second, and after superimposing, the total current acquisition value QD01-FPS01:GetI_Total is obtained. Calculate the total magnetic field acquisition value according to their respective excitation curve fitting coefficients, and subtract their respective main magnetic field acquisition values QD01:B to obtain the magnetic field acquisition value QD01-FPS02:B of the floating power supply.
2. The excitation curve conversion system for floating power supply I / B conversion according to claim 1, characterized in that: When performing excitation curve conversion, the floating power supply first sets the preset value of the main magnetic field and then sets the magnetic field set value of the floating power supply.
Citation Information
Patent Citations
Magnetic field stability control system and method
CN112996214A
Control system of tokamak monitoring system
KR1020130075411A