Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for correcting a magnetic field center error, so as to reduce the magnetic field center error of a magnet of a synchrotron in the related art at an initial installation stage.
The embodiment of the application provides a method for correcting a magnetic field center error, which comprises the following steps:
acquiring a current beam position parameter of a beam acted by a magnetic field of a magnet at a preset beam position, wherein the current beam position parameter is the offset of an actual beam position parameter relative to a reference beam position parameter, and the reference beam position parameter corresponds to the center position of a preset magnetic field;
and adjusting the magnet position parameter of the magnet according to the current beam position parameter so as to enable the magnetic field center error of the magnet to be smaller than a preset error threshold value, wherein the magnetic field center error is the deviation of the actual magnetic field center position relative to the preset magnetic field center position.
In an embodiment, the obtaining of the current beam position parameter of the beam at the preset beam position of the beam after the action of the magnetic field of the magnet further includes:
determining the relationship between the position parameters of the magnet and the beam position parameters of the beam at the preset beam position after the action of the magnetic field of the magnet;
the adjusting the magnet position parameter of the magnet according to the current beam position parameter to enable the magnetic field center error of the magnet to be smaller than a preset error threshold value comprises:
and adjusting the magnet position parameter of the magnet according to the current beam position parameter based on the relationship between the magnet position parameter and the beam position parameter of the beam acted by the magnetic field of the magnet at the preset beam position, so that the magnetic field center error of the magnet is smaller than a preset error threshold.
In an embodiment, the determining a relationship between the magnet position parameter and a beam position parameter of the beam at a preset beam position after the magnetic field of the magnet acts on the magnet includes:
establishing a trained physical model of the corresponding relation between the magnet position parameters and beam position parameters of the beam at a preset beam position after the action of the magnetic field of the magnet on the basis of machine learning;
the adjusting the magnet position parameter of the magnet according to the current beam position parameter to enable the magnetic field center error of the magnet to be smaller than a preset error threshold value comprises:
inputting the obtained current beam position parameter into the trained physical model;
and adjusting the magnet position parameters of the magnet according to the magnet position parameters output by the trained physical model, so that the magnetic field center error of the magnet is smaller than a preset error threshold value.
In an embodiment, the relationship between the position parameter of the magnet and the beam position parameter of the beam at the preset beam position after the magnetic field of the magnet acts on the magnet includes:
the relationship between the beam position parameter of the beam at the preset beam position after the action of the magnetic field of the magnet and the magnetic field center error of the magnet and the relationship between the magnet position parameter and the magnetic field center error of the magnet.
In an embodiment, the adjusting the magnet position parameter of the magnet according to the current beam position parameter to make the magnetic field center error of the magnet smaller than a preset error threshold includes:
determining a magnet magnetic field central error according to the current beam position parameter based on the relationship between the beam position parameter of the beam at the preset beam position after the action of the magnetic field of the magnet and the magnetic field central error of the magnet; or,
and determining a target magnet position parameter according to the magnetic field center error of the magnet based on the relationship between the magnet position parameter and the magnetic field center error of the magnet, and adjusting the magnet position to the target magnet position parameter.
In one embodiment, the magnet is a secondary magnet of a synchrotron.
The embodiment of the present application further provides a correction device for magnetic field center error, including:
the beam position parameter acquisition module is configured to acquire a current beam position parameter of a beam acted by a magnetic field of a magnet at a preset beam position, wherein the current beam position parameter is an offset of an actual beam position parameter relative to a reference beam position parameter, and the reference beam position parameter corresponds to a preset magnetic field center position;
and the adjusting module is used for adjusting the magnet position parameter of the magnet according to the current beam position parameter so as to enable the magnetic field center error of the magnet to be smaller than a preset error threshold value, wherein the magnetic field center error is the deviation of the actual magnetic field center position relative to the preset magnetic field center position.
An embodiment of the present application further provides an apparatus, including:
at least one processor;
a storage device configured to store at least one program;
when the at least one program is executed by the at least one processor, the at least one program causes the at least one processor to implement the method for correcting a magnetic field center error according to the first aspect.
Embodiments of the present application further provide a storage medium containing computer executable instructions, which when executed by a computer processor are configured to perform the method for correcting a magnetic field center error according to the first aspect.
According to the technical scheme of the correction method for the magnetic field center error, the current beam position parameter of the beam at the preset beam position after the magnetic field action of the magnet is obtained, wherein the beam position parameter is the offset of the actual beam position parameter relative to the reference beam position parameter, and the reference beam position parameter corresponds to the preset magnetic field center position; adjusting the magnet position parameters of the magnets according to the current beam position parameters to enable the magnetic field center errors of the magnets to be smaller than a preset error threshold value, wherein the magnetic field center errors are the deviations of the actual magnetic field center positions relative to the preset magnetic field center positions, the magnetic field center errors of the secondary magnets are deduced reversely through the current beam position parameters, and the target magnet position parameters are determined, so that the magnet position parameters are adjusted to the target magnet position parameters, and the magnetic field center errors of the magnets are smaller than the preset error threshold value; the orbital oscillation amplitude of the synchrotron is within a preset range due to the fact that the secondary magnet has small magnetic field center error, so that miniaturization of the synchrotron is facilitated, and the synchrotron has high beam flow quality.
Detailed Description
Fig. 1 is a flowchart of a method for correcting a magnetic field center error according to an embodiment of the present disclosure. The technical scheme of the embodiment is suitable for correcting the magnetic field center error of the magnet, for example, the magnetic field center error of the secondary magnet of the synchrotron at the initial installation stage is corrected. The method may be performed by the apparatus for correcting the magnetic field center error provided in the embodiment of the present application, and the apparatus may be implemented in at least one of software and hardware and configured to be applied in a processor. The method includes the following steps S101 to S102.
In S101, a current beam position parameter of the beam at the preset beam position after the magnetic field action of the magnet is obtained.
In an embodiment, the current beam position parameter is an offset of the actual beam position parameter relative to a reference beam position parameter, and the reference beam position parameter corresponds to a preset magnetic field center position.
This embodiment will be described by taking correction of the magnetic field center error of the secondary magnet of the synchrotron as an example. In the synchrotron, secondary magnets are used for deflecting particle beams, and a large number of particle beams move along a preset track in a synchronous ring due to the action of magnetic fields of a plurality of secondary magnets. Therefore, for a synchrotron, especially a small synchrotron, in order to make it compact and ensure that the particle beam can stably move and accelerate, it is generally required that the magnetic field center error of the secondary magnet is within an acceptable preset error threshold, otherwise the particle beam will have obvious orbital oscillation on the synchronizer ring. In order to suppress the orbital oscillation, the magnetic field center error needs to be corrected by a large number of correction magnets during later installation. And the more obvious orbital oscillation is, the bigger the sizes of the correcting magnet and the beam current pipeline are, and the larger the size of the beam current pipeline is, the price and the volume of all parts on the ring can be directly raised, so that the manufacturing cost of the whole accelerator is greatly increased, and the total volume is also increased.
The particle beam is a particle beam that can be accelerated by a synchrotron in the related art, such as a proton beam. In the present embodiment, the beam is hereinafter referred to as a particle beam.
Since the secondary magnets of the synchrotron act to deflect the beam, the deflection trajectory of the beam is related to the position of the magnetic field center of the secondary magnets for a given secondary magnet. That is, the magnetic field center position of the secondary magnet can be reversely deduced according to the beam trajectory. In order to increase the correction speed of the magnetic field center error, the present embodiment corrects the magnetic field center error by using the beam position parameter of the preset beam position. The preset beam position is a certain section range or a certain volume range of the accelerator track. In actual use, the preset beam position can be determined according to specific conditions, and then the current beam position parameter of the beam at the preset beam position after the secondary magnet deflection is obtained.
The current beam position parameter is the offset of the actual beam position parameter relative to a reference beam position parameter, and the reference beam position parameter corresponds to the preset magnetic field center position. And when the reference beam position parameter is the original position, the beam position parameter is an actual beam position parameter. The beam position parameter in this embodiment can be obtained by a beam position detection device in the related art, which is not limited in this embodiment.
The preset magnetic field center position may be a geometric center position of the secondary magnet in the current position state, a magnetic field center position estimated according to the related art, a magnetic field center position expected by a user, or the like. In actual use, the method can be determined according to specific situations. In addition, in order to increase the correction speed of the magnetic field center error, the current magnet position parameters may be set as the initial data, for example, the current magnet position parameters are all set to zero.
In S102, a magnet position parameter of the magnet is adjusted according to the current beam position parameter, so that a magnetic field center error of the magnet is smaller than a preset error threshold.
In one embodiment, the magnetic field center error is a deviation of an actual magnetic field center position from a predetermined magnetic field center position.
After the current beam position parameters of the beam current acted by the magnetic field of the magnet at the preset beam position are obtained, the magnetic field center error of the magnet can be determined according to the current beam position parameters, then the target position parameters of the magnet are determined according to the magnetic field center error, and then the magnet is adjusted to the target position parameters, so that the magnetic field center error of the magnet is smaller than the preset error threshold.
In the method for correcting the magnetic field center error provided by this embodiment, a current beam position parameter of a beam at a preset beam position after the action of a magnetic field of a magnet is obtained, where the beam position parameter is an offset of an actual beam position parameter relative to a reference beam position parameter, and the reference beam position parameter corresponds to a preset magnetic field center position; and adjusting the magnet position parameters of the magnet according to the current beam position parameters so as to enable the magnetic field center error of the magnet to be smaller than a preset error threshold value, wherein the magnetic field center error is the deviation of the actual magnetic field center position relative to the preset magnetic field center position. Reversely deducing the magnetic field center error of the secondary magnet through the current beam position parameter and determining a target magnet position parameter, adjusting the magnet position parameter to the target magnet position parameter, and enabling the magnetic field center error of the magnet to be smaller than a preset error threshold value; the orbital oscillation amplitude of the synchrotron is within a preset range due to the fact that the secondary magnet has small magnetic field center error, so that miniaturization of the synchrotron is facilitated, and the synchrotron has high beam flow quality.
Fig. 2 is a flowchart of a method for correcting an error of a center of a magnetic field according to another embodiment of the present application. As shown in fig. 2, the method includes S100 to S102.
In S100, a relationship between the magnet position parameter and a beam position parameter of the beam at the preset beam position after the magnetic field of the magnet acts on the magnet is determined.
To correct the magnet position parameter by the beam position parameter, it is usually necessary to determine the magnet position parameter of the magnet and the corresponding relationship between the beam position parameters of the beam deflected by the magnet at the preset beam position.
In one embodiment, in relation to the establishment of the correspondence between the magnet position parameter and the beam position parameter, a physical model of the beam position parameter and the magnet position parameter may be established based on machine learning. The physical model can be established by the following steps: acquiring sample data of a standard secondary magnet, wherein the sample data comprises preset number of magnetic field center errors, magnet position parameters acquired under each magnetic field center error, and beam position parameters corresponding to each magnet position parameter; then, the sample data is divided into training set sample data and correction set sample data. The physical model is trained through training set sample data, and the corresponding relation between the magnet position parameters and the beam position parameters is established, so that the physical model can output the target position parameters of the magnet or adjust the target parameters when the beam position parameters are input, wherein the adjusted target parameters are the position offset of the current magnet needing to be adjusted. In another embodiment, the physical model further outputs the magnetic field center error of the secondary magnet corresponding to the input beam position parameter. In order to improve the robustness of the physical model, the physical model is corrected through the sample data of the correction set, and a trained physical model is generated. When the physical model is used, the current beam position parameters of the beam after the action of the magnetic field of the magnet at the preset beam position can be output, and the target position parameters of the magnet or the target parameters can be adjusted.
In one embodiment, the standard secondary magnet in the present embodiment is a secondary magnet whose magnetic field center error is determined by a standard measuring means, wherein the standard measuring means is a measuring means whose measuring accuracy meets a preset accuracy requirement.
In an embodiment, the establishment of the correspondence between the magnet position parameter and the beam position parameter may first determine the correspondence between the beam position parameter and the magnetic field center error and the correspondence between the magnetic field center error and the magnet position parameter, and then determine the correspondence between the beam position parameter and the magnet position parameter according to the two correspondences.
In S101, a current beam position parameter of the beam at the preset beam position after the magnetic field action of the magnet is obtained.
In S102, based on the relationship between the magnet position parameter and the beam position parameter of the beam at the preset beam position after the action of the magnetic field of the magnet, the magnet position parameter of the magnet is adjusted according to the current beam position parameter, so that the magnetic field center error of the magnet is smaller than the preset error threshold.
After the relationship between the magnet position parameters and the beam position parameters is determined, the target magnet position parameters can be determined according to the current beam position parameters based on the relationship between the magnet position parameters and the beam position parameters, and the secondary magnet is adjusted to the target magnet position parameters, so that the magnetic field center error of the magnet is smaller than a preset error threshold value.
When the relationship between the magnet position parameter and the beam position parameter is expressed through a trained physical model, inputting the acquired current beam position parameter into the trained physical model; and adjusting the magnet position parameters of the magnet according to the magnet position parameters output by the trained physical model so as to enable the magnetic field center error of the magnet to be smaller than a preset error threshold value.
When the corresponding relation between the magnet position parameter and the beam position parameter is expressed by the corresponding relation between the beam position parameter and the magnetic field center error and the corresponding relation between the magnetic field center error and the magnet position parameter, determining the magnetic field center error of the magnet according to the current beam position parameter based on the relation between the beam position parameter and the magnetic field center error of the magnet; and determining a target magnet position parameter according to the magnet magnetic field center error based on the relationship between the magnet position parameter and the magnet magnetic field center error, and adjusting the magnet position to the target magnet position parameter so as to enable the magnet magnetic field center error to be smaller than a preset error threshold.
Fig. 3 is a schematic structural diagram of an adjusting bracket provided in an embodiment of the present application. As shown in fig. 3, since the secondary magnet of the synchrotron is generally fixed to a mounting bracket, the mounting bracket generally includes a base 21, and a plurality of first connection portions 211 provided on the base 21, and the first connection portions 211 are provided with height adjustment mechanisms 2111. The secondary magnet 22 is fixed on the mounting plate 221 through a connecting mechanism 222, and the connecting mechanism 222 can be a connecting plate with an L-shaped or [ -shaped cross section. The mounting plate 221 is provided with a second connection portion 2211 at a side facing the mounting bracket, and the first connection portion 211 and the second connection portion 2211 can be fixedly connected together. Therefore, after the second connection portion 2211 of the secondary magnet 22 is fixedly connected with the first connection portions 211 of the mounting bracket, the position parameters of the secondary magnet 22 can be adjusted by adjusting the height adjustment mechanism 2111 of one or more of the first connection portions 211.
The number of the first connecting parts and the second connecting parts is at least 4, and the number of the first connecting parts and the second connecting parts can be increased, for example, 7 according to specific situations, such as the accuracy of the magnetic field center error of the secondary magnet, in actual use.
In one embodiment, to improve the convenience and accuracy of the secondary magnet position adjustment, the mounting bracket of this embodiment further includes an automatic adjustment mechanism 212. The automatic adjustment mechanism 212 cooperates with the first connection portion 211 and the second connection portion 2211 to adjust the position parameters of the secondary magnet 22. The automatic adjusting mechanism 212 is a device capable of automatically adjusting the position parameter of the top end of the second connecting portion in the related art, that is, a device for adjusting the position parameter of the secondary magnet, such as a combination of a stepping motor and a cam.
In an embodiment, when the correspondence between the beam position parameter and the magnet position parameter of the secondary magnet is represented by a physical model, the physical model outputs an adjustment method of the target magnet position parameter at the same time of outputting the target magnet position parameter, for example, the first connection part numbered 1 needs to be adjusted to be raised by a first height, and the first connection part numbered 2 needs to be adjusted to be raised by a second height. Therefore, the secondary magnet can be adjusted to the position of the target magnet according to the adjusting method of the position parameter of the target magnet.
In one embodiment, the physical model is disposed on a control mechanism, the control mechanism is connected to the automatic adjustment mechanism 212 of the mounting bracket, and the control mechanism controls the automatic adjustment mechanism to operate according to an adjustment method of a target magnet position parameter output by the physical model, so as to automatically adjust the secondary magnet to a target magnet position.
The method for correcting the magnetic field center error provided by this embodiment determines a corresponding relationship between a magnet position parameter and a beam position parameter, determines a target magnet position parameter according to the determined corresponding relationship between the magnet position parameter and the beam position parameter and a current beam position parameter, and adjusts the magnet to the target position parameter, thereby realizing that an independent variable of the position parameter is reversely deduced by a dependent variable of the beam position parameter.
Fig. 4 is a block diagram illustrating a configuration of a device for correcting an error in a center of a magnetic field according to an embodiment of the present disclosure. The device is used for executing the correction method of the magnetic field center error provided by any of the above embodiments, and the device can be implemented by software or hardware. The device includes:
the beam position parameter acquiring module 11 is configured to acquire a current beam position parameter of a beam acted by a magnetic field of a magnet at a preset beam position, where the current beam position parameter is an offset of an actual beam position parameter relative to a reference beam position parameter, and the reference beam position parameter corresponds to a preset magnetic field center position.
The adjusting module 12 is configured to adjust a magnet position parameter of the magnet according to the current beam position parameter, so that a magnetic field center error of the magnet is smaller than a preset error threshold, where the magnetic field center error is a deviation of an actual magnetic field center position relative to the preset magnetic field center position.
The correction device for the magnetic field center error provided by this embodiment obtains a current beam position parameter of a beam at a preset beam position after the magnetic field action of a magnet, where the beam position parameter is an offset of an actual beam position parameter relative to a reference beam position parameter, and the reference beam position parameter corresponds to a preset magnetic field center position; adjusting the magnet position parameters of the magnets according to the current beam position parameters to enable the magnetic field center errors of the magnets to be smaller than a preset error threshold value, wherein the magnetic field center errors are the deviations of the actual magnetic field center positions relative to the preset magnetic field center positions, the magnetic field center errors of the secondary magnets are deduced reversely through the current beam position parameters, and the target magnet position parameters are determined, so that the magnet position parameters are adjusted to the target magnet position parameters, and the magnetic field center errors of the magnets are smaller than the preset error threshold value; the orbital oscillation amplitude of the synchrotron is within a preset range due to the fact that the secondary magnet has small magnetic field center error, so that miniaturization of the synchrotron is facilitated, and the synchrotron has high beam flow quality.
In one embodiment, the method further comprises: and determining a module.
The determination module is configured to: before the current beam position parameter of the beam current at the preset beam position after the magnetic field action of the magnet is obtained, determining the relationship between the magnet position parameter and the beam current position parameter of the beam current at the preset beam position after the magnetic field action of the magnet;
and the adjusting module is further arranged to:
and adjusting the magnet position parameter of the magnet according to the current beam position parameter based on the relationship between the magnet position parameter and the beam position parameter of the beam acted by the magnetic field of the magnet at the preset beam position, so that the magnetic field center error of the magnet is smaller than a preset error threshold.
In one embodiment, the determining module is further configured to:
establishing a trained physical model of the corresponding relation between the magnet position parameters and beam position parameters of the beam at a preset beam position after the action of the magnetic field of the magnet on the basis of machine learning;
and the adjusting module is further arranged to:
inputting the obtained current beam position parameter into the trained physical model; and adjusting the magnet position parameters of the magnet according to the magnet position parameters output by the trained physical model, so that the magnetic field center error of the magnet is smaller than a preset error threshold value.
In one embodiment, the determination module is further configured to: the relationship between the beam position parameter of the beam at the preset beam position after the action of the magnetic field of the magnet and the magnetic field center error of the magnet, and the relationship between the magnet position parameter and the magnetic field center error of the magnet.
In one embodiment, the adjusting module is further configured to:
determining a magnet magnetic field central error according to the current beam position parameter based on the relationship between the beam position parameter of the beam acted by the magnetic field of the magnet at the preset beam position and the magnetic field central error of the magnet; or,
and determining a target magnet position parameter according to the magnetic field center error of the magnet based on the relationship between the magnet position parameter and the magnetic field center error of the magnet, and adjusting the magnet position to the target magnet position parameter.
In one embodiment, the magnet is a secondary magnet of a synchrotron. The correction device for the magnetic field center error provided by the embodiment of the application can execute the correction method for the magnetic field center error provided by any embodiment of the application, and has corresponding functional modules and beneficial effects of the execution method.
Fig. 5 is a schematic structural diagram of an apparatus according to an embodiment of the present application, and as shown in fig. 5, the apparatus includes a processor 201, a memory 202, an input device 203, and an output device 204. The number of processors 201 in the device may be at least one, and one processor 201 is taken as an example in fig. 5; the processor 201, the memory 202, the input device 203 and the output device 204 in the apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 5.
The memory 202, as a computer-readable storage medium, may be configured to store a software program, a computer-executable program, and modules, such as program instructions/modules (e.g., the beam position parameter obtaining module 11 and the adjusting module 12) corresponding to the correction method of the magnetic field center error in the embodiment of the present application. The processor 201 executes various functional applications of the device and data processing by executing software programs, instructions and modules stored in the memory 202, that is, implements the above-described correction method for the magnetic field center error.
The memory 202 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 202 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 202 may include memory located remotely from the processor 201, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 203 may be configured to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus.
The output device 204 may include a display device such as a display screen, for example, of a user terminal.
An embodiment of the present application provides a storage medium containing computer executable instructions which, when executed by a computer processor, are configured to perform a method of correcting a magnetic field center error, the method comprising:
acquiring a current beam position parameter of a beam acted by a magnetic field of a magnet at a preset beam position, wherein the current beam position parameter is an offset of an actual beam position parameter relative to a reference beam position parameter, and the reference beam position parameter corresponds to a preset magnetic field center position;
and adjusting the magnet position parameter of the magnet according to the current beam position parameter so as to enable the magnetic field center error of the magnet to be smaller than a preset error threshold value, wherein the magnetic field center error is the deviation of the actual magnetic field center position relative to the preset magnetic field center position.
Of course, the storage medium provided in the embodiments of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform related operations in the method for correcting the magnetic field center error provided in any embodiments of the present application.
From the above description of the embodiments, it is obvious for those skilled in the art that the present application can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the method for correcting the magnetic field center error according to the embodiments of the present application.
It should be noted that, in the embodiment of the correction device for the magnetic field center error, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the application.
Industrial applicability
The embodiment of the application provides a method, a device, equipment and a storage medium for correcting a magnetic field center error, solves the technical problem that the magnetic field center error of a magnet of a synchrotron in the related art is large in an initial installation stage, and achieves the technical effect of reducing the magnetic field center error of the magnet of the synchrotron in the related art in the initial installation stage.