Intelligent beam adjusting method and device for electron beam transport line, electronic equipment and medium
By establishing an electron beam transport line model and a reversible neural network model, the coupling problem in the beam transport line tuning process of the fourth-generation synchrotron radiation source was solved, achieving efficient and accurate beam control, reducing the use of beam information acquisition components, and improving the system's automation and stability.
Patent Information
- Application Number
- CN202510723027.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-10-28
AI Technical Summary
The beam transport line of the fourth-generation synchrotron radiation source has coupling problems in both horizontal and vertical beam tuning, and the existing neural network beam tuning method violates the physical angle of beam transmission, and a large number of beam cross-section detectors are used.
An electron beam transport line model was established, and a reversible neural network model was used to predict beam spot size information. The neural network was trained by an affine coupling layer module and a ReLU activation function. The adaptive moment estimation algorithm and the backpropagation algorithm were used to train the model, and a prediction accuracy evaluation scheme was generated. The prediction value of the quadrupole magnet was adjusted to optimize beam transmission.
This approach achieves the goal of avoiding the challenges of horizontal and vertical beam coupling while ensuring physical integrity, reducing the number of beam information acquisition components, improving beam tuning efficiency and quality, and enhancing the system's automation level.
Smart Images

Figure CN120850720A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of beam transport line technology, and in particular to an intelligent beam tuning method, apparatus, electronic device, and medium for electron beam transport lines. Background Technology
[0002] To develop advanced synchrotron radiation source technology, advance advanced synchrotron radiation experimental techniques, and expand the application and service areas of synchrotron radiation, a plan is underway to research and construct an advanced synchrotron radiation source. This advanced source, planned as a fourth-generation synchrotron radiation source, is designed to consist of a 1.5 GeV low-energy fourth-generation synchrotron radiation source and a 4.0 GeV medium-energy fourth-generation synchrotron radiation source. It will be able to generate synchrotron radiation with high brightness, high intensity, and high coherence in multiple energy regions, including ultraviolet, soft X-rays, and hard X-rays. This will support multidisciplinary scientific research and industrial R&D in various fields, such as biochemistry, life sciences, materials physics, optoelectronic devices, extreme ultraviolet lithography, novel screens, clean energy, and biomedicine.
[0003] For fourth-generation synchrotron radiation sources, based on current transport line designs for low-energy small rings (1.5 GeV), the design involves sending the beam from an underground linear accelerator tunnel, through a horizontal bend section, deflecting it to the same horizontal plane as the storage ring, while simultaneously completing a 6-meter vertical ascent. Finally, the beam passes through another horizontal bend section at the same horizontal plane, converging into the storage ring injection node, ensuring high-efficiency and high-quality particle beam transmission throughout this process. For this transmission process, the beam transport line is designed to be divided into three segments, each matched separately.
[0004] In actual installation, errors may arise in device mounting position, mounting angle, magnet processing, and beam injection from the linear accelerator. These errors can cause the electron beam to deviate from its intended trajectory and may even result in particle loss. Therefore, the beam needs to be recalibrated after the beam transport line is constructed. The advanced light source's beam transport line employs a unique "three-segment" design, consisting of a horizontal bend section, a vertical ramp section, and another horizontal bend section. Unlike conventional unidirectional beam transport lines, actual beam tuning for the advanced light source's beam transport line requires considering the challenges posed by bidirectional coupling in both the horizontal and vertical directions.
[0005] Neural networks hold promise for solving the practical beam tuning problem of advanced light source beam transport lines. This tuning method avoids the coupling challenges in the horizontal and vertical directions during tuning, and also eliminates concerns about the limited available beam information in real-world tuning scenarios. Since the model ultimately needs to achieve beam tuning of the beam transport line, the model's output data should be set to the K-value of a quadrupole magnet with adjustable current. However, from a physical perspective, changes in beam-related parameters should be caused by changes in the K-value of the quadrupole magnet. Therefore, defining the magnet K-value as the output data, while feasible from a machine learning algorithm perspective, contradicts the physical principles of beam transmission. Summary of the Invention
[0006] This application provides an intelligent beam tuning method, device, electronic device, and medium for electron beam transport lines to solve problems such as difficulty in horizontal and vertical beam coupling, large number of beam cross-section detectors, and neural networks violating the physical angles of beam transmission.
[0007] The first aspect of this application provides an intelligent beam tuning method for an electron beam transport line, comprising the following steps: establishing a transport line model of the electron beam and obtaining beam spot size information using the transport line model; establishing a reversible neural network model and generating a prediction accuracy evaluation scheme for the reversible neural network model based on the unidirectional transmission of the transport line and the reversible transmission of the reversible neural network model; training the reversible neural network model using a dataset composed of beam spot size information; selecting a quadrupole magnet prediction value distribution using the prediction accuracy evaluation scheme; inputting the quadrupole magnet prediction value distribution into the transport line model; adjusting the network parameters of the reversible neural network model based on the output results of the transport line model; and adjusting the electron beam injected into the transport line using the trained reversible neural network model.
[0008] Optionally, establishing a transport line model for the electron beam includes: acquiring device distribution data along the entire transport line of the electron beam; dividing the device distribution along the entire transport line into multiple segments based on the device distribution data; establishing multiple dispersive unit structures based on the multiple segments; and generating a transport line model for the electron beam based on the multiple dispersive unit structures.
[0009] Optionally, beam spot size information is obtained using a transport line model, including: placing a beam position detector, a correction magnet, and a beam cross section detector on the transport line model; calculating the magnet prediction value of the correction magnet using the beam position detected by the beam position detector; correcting the transport line model based on the magnet prediction value of the correction magnet; randomly adding or subtracting the magnet prediction value of a quadrupole magnet on the transport line model; and collecting beam spot size information using the beam cross section detector.
[0010] Optionally, the reversible neural network model includes multiple affine coupling layer modules, a ReLU activation function, and a loss function. The reversibility of the multiple affine coupling layer modules is used to achieve bidirectional transmission of the network. The adaptive moment estimation algorithm and the backpropagation algorithm are used to train the reversible neural network model, and the training loss is calculated using the loss function.
[0011] Optionally, the loss function is:
[0012] L all =ω MSE L MSE +ω r L r +ω α L α +ω k L k +ω I L I
[0013] Among them, L MSE The mean square error between the predicted beam spot size and the actual beam spot size; L α To compensate for the mean squared error of the dimension; L r For reconstruction error; L k The loss function used to ensure that the predicted values of the quadrupole magnets and the dataset follow the same distribution; L I ω is the loss function used to ensure that the latent space Z follows the desired distribution; MSE For L MSE The corresponding weights; ω r For L r The corresponding weights; ω α For L α The corresponding weights; ω k For L k The corresponding weights; ω I For L I The corresponding weights.
[0014] Optionally, the prediction accuracy evaluation scheme includes: identifying the true values of quadrupole magnet strength and beam spot size in the test set; inputting the true values of quadrupole magnet strength into a reversible neural network model, which performs forward prediction to obtain a forward predicted value of beam spot size, and calculating the forward prediction accuracy based on the true values of beam spot size and the forward predicted value of beam spot size; inputting the true values of beam spot size into the reversible neural network model, which performs inverse prediction to obtain an inverse predicted value of quadrupole magnet strength, and calculating the inverse prediction accuracy based on the true values of quadrupole magnet strength and the inverse predicted value of quadrupole magnet strength; and characterizing the effectiveness of the prediction values of the reversible neural network model based on the forward prediction accuracy and the inverse prediction accuracy.
[0015] A second aspect of this application provides an intelligent beam tuning device for an electron beam transport line, comprising: a first establishment module for establishing a transport line model of the electron beam and obtaining beam spot size information using the transport line model; a second establishment module for establishing a reversible neural network model and generating a prediction accuracy evaluation scheme for the reversible neural network model based on the unidirectional transport of the transport line and the reversible transport of the reversible neural network model; a training module for training the reversible neural network model using a dataset composed of beam spot size information, wherein the reversible neural network model selects a quadrupole magnet prediction value distribution using the prediction accuracy evaluation scheme, inputs the quadrupole magnet prediction value distribution into the transport line model, and adjusts the network parameters of the reversible neural network model based on the output results of the transport line model; and an adjustment module for adjusting the electron beam injected into the transport line using the trained reversible neural network model.
[0016] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the program to implement the intelligent beam modulation method for the electron beam transport line as described in the above embodiments.
[0017] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the intelligent beam modulation method for electron beam transport lines as described in the above embodiments.
[0018] The fifth aspect of this application provides a computer program product, which, when executed, is used to implement the intelligent beam modulation method for electron beam transport lines as described in the above embodiments.
[0019] Therefore, this application has the following beneficial effects:
[0020] This application embodiment establishes an electron beam transport line model to obtain beam spot size information, establishes a reversible neural network model, and generates a prediction accuracy evaluation scheme for the reversible neural network model based on the unidirectional transmission of the transport line and the reversible transmission of the reversible neural network model. The reversible neural network model is then trained using a dataset composed of beam spot size information. The model selects the quadrupole magnet prediction value distribution using the prediction accuracy evaluation scheme, inputs this prediction value distribution into the transport line model, adjusts the network parameters of the reversible neural network model based on the output results, and finally uses the trained reversible neural network model to adjust the electron beam injected into the transport line. Using the reversible neural network model avoids the difficulties of horizontal and vertical beam coupling and allows beam adjustment with fewer beam information acquisition elements. While ensuring physical integrity, it utilizes its reverse transmission process to predict the quadrupole magnet values of the input data. Therefore, it solves problems such as the difficulty of horizontal and vertical beam coupling, the large number of beam cross-section detectors used, and the neural network violating the physical angles of beam transmission.
[0021] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0022] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0023] Figure 1 This is a flowchart of an intelligent beam tuning method for an electron beam transport line according to an embodiment of this application;
[0024] Figure 2 This is a system block diagram provided according to one embodiment of the present application;
[0025] Figure 3 This is a 3D model diagram of an injection transport line provided according to an embodiment of this application;
[0026] Figure 4 This is a structural diagram of a reversible neural network model provided according to an embodiment of this application;
[0027] Figure 5 This is a diagram illustrating the forward learning process of an affine coupling layer according to an embodiment of this application.
[0028] Figure 6 This is a diagram illustrating the inverse learning process of an affine coupling layer according to an embodiment of this application;
[0029] Figure 7 This is a schematic diagram of the potential space Z according to an embodiment of this application;
[0030] Figure 8 This is a flowchart of a model accuracy evaluation scheme provided according to an embodiment of this application;
[0031] Figure 9 A flowchart for verifying prediction results according to an embodiment of this application;
[0032] Figure 10 This is a block diagram illustrating an intelligent beam tuning device for an electron beam transport line according to an embodiment of this application.
[0033] Figure 11 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0034] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0035] The following description, with reference to the accompanying drawings, outlines an intelligent beam-tuning method, apparatus, electronic device, and medium for electron beam transport lines according to embodiments of this application. To address the challenges of bidirectional beam coupling in both horizontal and vertical directions, the large number of beam cross-section detectors used, and the violation of physical angles in beam transmission by neural networks mentioned in the background, this application provides an intelligent beam tuning method for electron beam transport lines. This method involves establishing a transport line model of the electron beam, acquiring beam spot size information, and building a reversible neural network model. Based on the unidirectional transmission of the transport line and the reversible transmission of the reversible neural network model, a prediction accuracy evaluation scheme for the reversible neural network model is generated. The reversible neural network model is then trained using a dataset composed of beam spot size information. The model selects the quadrupole magnet prediction value distribution using the prediction accuracy evaluation scheme, inputs this distribution into the transport line model, adjusts the network parameters of the reversible neural network model based on the output results, and finally uses the trained reversible neural network model to adjust the electron beam injected into the transport line. Using the reversible neural network model avoids the difficulties of bidirectional beam coupling in both horizontal and vertical directions and allows beam tuning with fewer beam information acquisition components. While ensuring physical integrity, it utilizes the reverse transmission process to predict the K-value of the quadrupole magnet in the input data. This solves the problems of difficult horizontal and vertical beam coupling, large number of beam cross-section detectors, and neural networks violating the physical angles of beam transmission.
[0036] Specifically, Figure 1 This is a flowchart illustrating an intelligent beam tuning method for an electron beam transport line provided in an embodiment of this application.
[0037] like Figure 1 As shown, the intelligent beam tuning method for the electron beam transport line includes the following steps:
[0038] In step S101, a transport line model of the electron beam is established, and the beam spot size information is obtained using the transport line model.
[0039] Among them, the electron beam transport line model is a computer model that simulates and optimizes the behavior of the electron beam during transmission.
[0040] It is understood that the embodiments of this application first establish an electron beam transport line model, and use this model to calculate the beam spot size information of the electron beam, so as to analyze and optimize the efficiency and quality of beam transmission. The establishment of the electron beam transport line model is as follows:
[0041] In this embodiment of the application, establishing a transport line model of an electron beam includes: acquiring device distribution data on the entire transport line of the electron beam; dividing the device distribution on the entire transport line into multiple segments based on the device distribution data; establishing multiple dispersive unit structures based on the multiple segments; and generating a transport line model of the electron beam based on the multiple dispersive unit structures.
[0042] Among them, device distribution data refers to the specific location and parameter information of various devices installed along the electron beam transport line, such as magnets and detectors; the dispersive unit structure refers to the design of a specific part of the transport line, which aims to influence and adjust the dispersive characteristics of the particle beam by controlling factors such as magnetic fields. Dispersion refers to the path deviation phenomenon of particles of different energies in the particle beam due to the action of magnetic fields.
[0043] It is understood that the embodiments of this application first collect and analyze the device distribution data of the entire electron beam transport line, including the location and parameter information of all relevant devices. Then, based on this information, the entire transport line is divided into multiple parts, and the influence of its internal devices on the beam is considered in each part. A corresponding dispersive unit structure is created for each part, and these dispersive unit structures are integrated to generate a complete electron beam transport line model. This allows for accurate simulation and optimization of the behavior of the electron beam during transmission, ensuring that it can be transmitted to the target location efficiently and with high quality.
[0044] In this embodiment of the application, obtaining beam spot size information using a transport line model includes: placing a beam position detector, a correction magnet, and a beam cross section detector on the transport line model; calculating the magnet prediction value of the correction magnet using the beam position detected by the beam position detector; correcting the transport line model based on the magnet prediction value of the correction magnet; randomly adding or subtracting the magnet prediction value of a quadrupole magnet on the transport line model; and collecting beam spot size information using the beam cross section detector.
[0045] Among them, the beam position detector is a device used to accurately measure the position of the charged particle beam in a particle accelerator or transport line, which can help determine whether the beam has deviated from the predetermined trajectory; the correction magnet corrects the electron beam path by adjusting the magnetic field, so that it returns to the correct trajectory; the beam cross section detector is used to measure the beam spot size of the electron beam after passing through the transport line, that is, the degree of lateral spread of the electron beam at a certain position.
[0046] It is understood that, in this embodiment of the application, a beam position detector, a correction magnet, and a beam cross-section detector are installed on the transport line model. The data from the beam position detector is used to calculate the magnetic field strength or current value that the correction magnet needs to adjust, and the magnet prediction value is obtained to correct the beam trajectory in the transport line model. By randomly increasing or decreasing the magnet prediction value, different correction situations are simulated. The beam cross-section detector is used to collect beam spot size information under different conditions, effectively evaluating and optimizing the transport line model, and ensuring that the electron beam can be transmitted efficiently and with high quality.
[0047] In step S102, a reversible neural network model is established, and a prediction accuracy evaluation scheme for the reversible neural network model is generated based on the unidirectional transmission of the transport line and the reversible transmission of the reversible neural network model.
[0048] Among them, the reversible neural network model is a special neural network structure whose operation process is reversible, and can be traced back from the output to the input; unidirectional transport refers to the fact that the design of traditional beam transport lines is usually unidirectional, that is, the electron beam is accelerated and guided in one direction, without considering the possibility of reverse operation; the prediction accuracy evaluation scheme is used to evaluate the accuracy of the established reversible neural network model in predicting the magnet prediction value or beam spot size.
[0049] It is understood that, based on the unidirectional transmission of the electron beam transport line and the reversible transmission of the reversible neural network model, this application has designed and established a special reversible neural network model to simulate and optimize the adjustment of transport line parameters, and generated a prediction accuracy evaluation scheme based on the model to ensure that the model can effectively perform beam tuning tasks and provide reliable results.
[0050] In this embodiment, the prediction accuracy evaluation scheme includes: identifying the true values of quadrupole magnet strength and beam spot size in the test set; inputting the true values of quadrupole magnet strength into a reversible neural network model, which performs forward prediction to obtain a forward predicted value of beam spot size, and calculating the forward prediction accuracy based on the true values of beam spot size and the forward predicted value of beam spot size; inputting the true values of beam spot size into the reversible neural network model, which performs inverse prediction to obtain an inverse predicted value of quadrupole magnet strength, and calculating the inverse prediction accuracy based on the true values of quadrupole magnet strength and the inverse predicted value of quadrupole magnet strength; and characterizing the effectiveness of the prediction values of the reversible neural network model based on the forward prediction accuracy and the inverse prediction accuracy.
[0051] It is understood that the prediction accuracy evaluation scheme of this application embodiment is as follows: First, the true values of quadrupole magnet strength and beam spot size in the test set are identified. Then, the true value of quadrupole magnet strength is input into a reversible neural network model for forward prediction to obtain the predicted value of beam spot size. The accuracy of forward prediction is calculated based on the true value and the predicted value of beam spot size. Next, the true value of beam spot size is input into the same reversible neural network model to perform reverse prediction to obtain the reverse predicted value of quadrupole magnet strength. The accuracy of reverse prediction is calculated based on the true value and the reverse predicted value of quadrupole magnet strength. Finally, the effectiveness of the entire reversible neural network model and the reliability of its predicted values are evaluated by combining the accuracy of forward prediction and the accuracy of reverse prediction, thereby optimizing the beam transmission efficiency and quality.
[0052] In this embodiment, the reversible neural network model includes multiple affine coupling layer modules, a ReLU activation function, and a loss function. The reversibility of the multiple affine coupling layer modules is used to achieve bidirectional transmission of the network. The adaptive moment estimation algorithm and the backpropagation algorithm are used to train the reversible neural network model, and the training loss is calculated using the loss function.
[0053] Among them, the affine coupling layer module is one of the core components of the invertible neural network. It allows input data to generate output through a series of invertible transformations, ensuring that each step can undergo an inverse transformation while maintaining the consistency of the input and output data dimensions, enabling the network to achieve bidirectional transmission. ReLU (Rectified Linear Unit) is a commonly used activation function used to introduce nonlinear factors into the network to help learn complex data patterns. The adaptive moment estimation algorithm is a commonly used optimization algorithm used to accelerate and stabilize the training process. The backpropagation algorithm is used to calculate the gradient of the loss function with respect to the network weights in order to update the weights to minimize the loss.
[0054] It is understood that the reversible neural network model in this application embodiment utilizes multiple affine coupling layer modules with reversibility to realize the bidirectional data processing capability of the network, and uses the ReLU activation function to increase the nonlinear expression capability. The model is trained by combining the adaptive moment estimation algorithm with the backpropagation algorithm to optimize the network parameters. At the same time, a loss function is used to measure and reduce the prediction error, thereby ensuring that the model can not only predict the beam spot size from the quadrupole magnet strength, but also reverse the calculation of the appropriate quadrupole magnet strength setting from the desired beam spot size, so as to achieve efficient and accurate beam tuning tasks.
[0055] In this embodiment of the application, the loss function is:
[0056] L all =ω MSE L MSE +ωr L r +ω α L α +ω k L k +ω I L I
[0057] Among them, L MSE The mean square error between the predicted beam spot size and the actual beam spot size; L α To compensate for the mean squared error of the dimension; L r To mitigate reconstruction error and reduce the impact of minor disturbances during reverse transmission; L k The loss function used to ensure that the predicted values of the quadrupole magnets and the dataset follow the same distribution; L I ω is the loss function used to ensure that the latent space Z follows the desired distribution; MSE For L MSE The corresponding weights; ω r For L r The corresponding weights; ω α For L α The corresponding weights; ω k For L k The corresponding weights; ω I For L I The corresponding weights are defined as follows: the dataset is composed of beam spot size information, the true value of the quadrupole magnet is defined as the positive input data and also the negative output data, and the beam spot size collected by the beam cross section detector is defined as the positive output data and also the negative input data.
[0058] In step S103, a reversible neural network model is trained using a dataset composed of beam spot size information. The reversible neural network model selects the quadrupole magnet prediction value distribution using a prediction accuracy evaluation scheme, inputs the quadrupole magnet prediction value distribution into the transport line model, and adjusts the network parameters of the reversible neural network model based on the output of the transport line model.
[0059] It is understood that the embodiments of this application use a dataset containing beam spot size information to train a reversible neural network model, and then use a prediction accuracy evaluation scheme to select the most suitable quadrupole magnet prediction value prediction distribution. These predicted quadrupole magnet prediction values are used as input to the transport line model, and the parameters of the reversible neural network model are adjusted and optimized based on the output of the model to ensure its prediction accuracy and reliability. This enables accurate prediction and adjustment of the magnetic field gradient value of the quadrupole magnet to optimize the transmission efficiency and quality of the electron beam.
[0060] In step S104, the electron beam injected into the transport line is adjusted using the trained reversible neural network model.
[0061] It is understood that the embodiments of this application utilize a pre-trained reversible neural network model to adjust the injected electron beam in the transport line. Based on the predicted value of the quadrupole magnet by the model, the electron beam is precisely controlled, which can optimize the transmission path and characteristics of the electron beam in the transport line, such as reducing beam diffusion and improving focusing accuracy. This ensures that the electron beam can be transmitted efficiently and stably to the storage ring or other designated locations as required by the design. This not only improves the beam tuning efficiency but also reduces human intervention, enhances the automation and stability of the entire system, and allows the true value of the quadrupole magnet to be defined as input data. Under the premise of ensuring physical properties, the reverse transmission process can be used to predict the quadrupole magnet value of the input data.
[0062] According to the intelligent beam tuning method for electron beam transport lines proposed in this application, a transport line model of the electron beam is established to obtain beam spot size information. A reversible neural network model is then established. Based on the unidirectional transmission of the transport line and the reversible transmission of the reversible neural network model, a prediction accuracy evaluation scheme for the reversible neural network model is generated. The reversible neural network model is then trained using a dataset composed of beam spot size information. The model selects the quadrupole magnet prediction value distribution using the prediction accuracy evaluation scheme, inputs this prediction value distribution into the transport line model, adjusts the network parameters of the reversible neural network model based on the output results, and finally uses the trained reversible neural network model to adjust the electron beam injected into the transport line. Using the reversible neural network model avoids the problem of horizontal and vertical bidirectional beam tuning coupling and allows beam tuning with fewer beam information acquisition components. While ensuring physical properties, the reverse transmission process is used to predict the quadrupole magnet values of the input data.
[0063] The intelligent beam tuning method for electron beam transport lines is further described below through a specific embodiment.
[0064] The overall system flow in this embodiment is as follows: Figure 2 As shown, the transport line model is first created, and potential errors are loaded. A 3D schematic diagram of the transport line model is shown below. Figure 3As shown in the figure. Considering the actual construction situation of the transport line comprehensively, the possible types of errors are set as follows: the installation position error and angular deviation of the dipole magnet in the horizontal direction, as well as the installation position error and angular deviation in the vertical direction; the installation position error and angular deviation of the quadrupole magnet in the horizontal direction, as well as the installation position error and angular error in the vertical direction; at the entrance of the transport line, the injection position and angular error of the particle beam, the Beta function error, Alpha function error and dispersion function error of the particle beam. Among them, the Beta function describes the transverse expansion degree of the particle beam on its transmission path, defines the proportional relationship between the square of the transverse size of the particle beam at a given point and its local phase space density. The larger the Beta function, the more obvious the transverse expansion of the particle beam at that point; Alpha is a measure describing the rate of change of the transverse size of the particle beam during transmission, reflecting the change of the transverse size of the particle beam with position. By adjusting the Alpha function, the overall shape and stability of the particle beam can be affected; the dispersion function is used to describe the transverse offset of the particle beam caused by the particle energy difference.
[0065] Then, perform orbit pre-correction on the transport line model. According to Figure 2 As shown in the figure, for the pair of BPM (Beam Position Monitor) and HVC (High Precision Corrector Magnets) at position 1, calculate the beam position x1, then add perturbations to obtain x2 and x3, and calculate the response matrix based on these three values. The calculation method of the response matrix is as follows. Taking the horizontal direction x as an example:
[0066] Assume that there are n BPMs placed on the accelerator, and the orbital position measured by each BPM is u i (i < n), then the orbital distortion of the particle beam at the position of each BPM is Δu i (i < n). Assume that there are m correction magnets placed on the accelerator, then the orbital distortion angle of the particle beam caused by the current change of each correction magnet is Δθ j (j < m). The mathematical relationship between the two is:
[0067]
[0068] In the formula, R represents a response matrix with n rows and m columns, and the calculation formula is:
[0069]
[0070] In the formula, for the position of the i-th BPM, β i is the transverse motion amplitude function, is the transverse motion phase function; for the position of the j-th correction magnet, β jIt is the amplitude function of lateral motion. It is the phase function of the transverse motion. v represents the operating point. Therefore, the strength of the corrector magnet can be calculated as:
[0071] Δθ j =-R -1 Δu i
[0072] After calculating the six pairs of HVC and BPM in sequence, the pre-calibration of the track is completed.
[0073] Next, the K-value variation is input into the transport line, and the corresponding beam current information is collected to create a dataset. The dataset defines the quadrupole magnet K-value as both positive input and negative output data, and the beam spot size as both positive output and negative input data. As an example, the dataset contains 6400 samples in the training set, 1600 samples in the validation set, and 2000 samples in the test set, distributed in a 4:1:1.25 ratio.
[0074] Then, the designed reversible neural network model is used to learn from the prepared dataset. A schematic diagram of the designed reversible neural network model is shown below. Figure 4 As shown. Its core module is the affine coupling layer. Utilizing the reversibility of the affine coupling layer, bidirectional transmission of the network is achieved. The working principle of the affine coupling layer is as follows:
[0075] like Figure 5 The forward learning process of the affine coupling layer can be understood, and its mathematical expression is as follows:
[0076]
[0077] The affine coupling layer divides the input x into u1 and u2, which are then transmitted to the learning function s respectively. i and t i The module outputs v1 and v2, which together form the output y. This design ensures the reversibility of the entire network, allowing for inverse transformation at each step, while also maintaining the data dimensions of the output and input unchanged.
[0078] like Figure 6 The inverse learning process of the affine coupling layer can be understood, and its mathematical expression is as follows:
[0079]
[0080] The affine coupling layer splits the original output y into v1 and v2, which are then transmitted to the learning function s respectively. i and t iThe outputs u1 and u2 form the original input x. It's important to note that to ensure the network's reversibility, the dimensions of the input and output data must remain consistent. Furthermore, reversible neural networks are typically built on flow-based models, which also require the input and output data to maintain the same dimensions.
[0081] However, the solution to the inverse problem is usually not unique, which requires a selection mechanism to ensure that a unique output corresponds to a unique input. This is typically achieved by introducing a latent space Z, such as... Figure 7 As shown, the latent space Z plays a bridging role in reversible neural networks. It is an intermediate representation layer used to store and transform intermediate states during the process of input data X to output data Y. During forward propagation, input data X is mapped to the latent space Z through a series of reversible transformations, and then from Z back to output data Y. This design allows the network to manipulate data flexibly in high-dimensional space while ensuring its reversibility. During backward propagation, the latent space Z is used to reconstruct the input data X; that is, given the output Y and the latent space Z, the network can compute the original input X. By introducing the latent space Z, the network can perform complex data transformations and feature extraction without losing information; it is a core component for performing data compression, feature extraction, and generative models.
[0082] Accuracy evaluation and comparison were conducted using the designed evaluation scheme. See details of the evaluation scheme. Figure 8 Choose to use the coefficient of determination (R²). 2 Evaluate the quality of the model. R 2 The value of R ranges from 0 to 1, and the closer the value is to 1, the higher the accuracy of the model fit. 2 The calculation formula is:
[0083]
[0084] In the formula, y i Represents the true value. Indicates the predicted value. This represents the average of the predicted values.
[0085] The specific evaluation process is as follows:
[0086] (1) The model performs positive prediction on the test set data. Input the true value of the quadrupole magnet strength K. true The positive prediction value σ of the beam spot size is obtained. F-pre .
[0087] (2) Based on the true value of beam spot size σ in the test set true The beam spot size prediction σ given by the model after positive learningt-pre Calculate R 2 This result is used to characterize the accuracy of the positive learning process.
[0088] (3) The model performs inverse prediction on the test set data. Input the true value of the beam spot size σ. true The inverse prediction value K of the quadrupole magnet strength is obtained. I-pre .
[0089] (4) The inverse prediction value K of the quadrupole magnet strength I-pre The data is then fed back into the model for forward propagation to obtain the beam spot size value σ corresponding to the inverse prediction. I-pre Note that although forward transmission is being performed, this beam size is named the reverse prediction value because it is used to evaluate the accuracy of the reverse prediction.
[0090] (5) Based on the true value of beam spot size σ in the test set true The beam spot size σ obtained through processes (3) and (4) I-pre Calculate R 2 This result is used to characterize the accuracy of the reverse learning process.
[0091] For R 2 The calculated value is defined as the value of the positive learning process. Greater than 0.90, reverse learning process When the value is greater than 0.85, the model is considered a usable model, and the predicted values given by the model are valid.
[0092] Finally, based on the prediction results given by the model, verification and testing are performed, such as... Figure 9 As shown. The specific verification process is as follows:
[0093] (1) Input the final desired beam spot size σ i The model is based on the previously established input data (magnet K value) and output data (beam spot size σ). i A set of predicted K values for quadrupole magnets is given. I-pre .
[0094] (2) Predict the K value of the quadrupole magnet K I-pre Input the corrected beam transport line model.
[0095] (3) Compare the particle beam spot size, dispersion function, and other relevant parameters of the corrected model and the error-free ideal model. For ease of comparison, images are plotted for comparison.
[0096] (4) If the results are similar after comparison, it means that the model to be verified is usable; otherwise, if the results are significantly different, it means that the model to be verified is unusable. The model parameters need to be reset and the evaluation criteria for usable models need to be adjusted until a usable model is found.
[0097] Next, with reference to the accompanying drawings, the intelligent beam-tuning device for the electron beam transport line proposed according to the embodiments of this application is described.
[0098] Figure 10 This is a block diagram of an intelligent beam tuning device for an electron beam transport line according to an embodiment of this application.
[0099] like Figure 10 As shown, the intelligent beam tuning device 10 for the electron beam transport line includes: a first establishment module 201, a second establishment module 202, a training module 203, and an adjustment module 204.
[0100] The first establishment module 201 is used to establish a transport line model of the electron beam and obtain beam spot size information using the transport line model; the second establishment module 202 is used to establish a reversible neural network model and generate a prediction accuracy evaluation scheme for the reversible neural network model based on the unidirectional transport of the transport line and the reversible transport of the reversible neural network model; the training module 203 is used to train the reversible neural network model using a dataset composed of beam spot size information, and the reversible neural network model selects the quadrupole magnet prediction value distribution using the prediction accuracy evaluation scheme, inputs the quadrupole magnet prediction value distribution into the transport line model, and adjusts the network parameters of the reversible neural network model based on the output results of the transport line model; the adjustment module 204 is used to adjust the electron beam injected into the transport line using the trained reversible neural network model.
[0101] In this embodiment of the application, the first establishment module 201 is further configured to: acquire device distribution data on the entire transport line of the electron beam; divide the device distribution on the entire transport line into multiple segments based on the device distribution data; establish multiple dispersive unit structures based on the multiple segments; and generate an electron beam transport line model based on the multiple dispersive unit structures.
[0102] In this embodiment of the application, the first establishment module 201 is further configured to: place a beam position detector, a correction magnet, and a beam cross section detector on the transport line model; calculate the magnet prediction value of the correction magnet using the beam position detected by the beam position detector, and correct the transport line model based on the magnet prediction value of the correction magnet; randomly add or subtract the magnet prediction value of the quadrupole magnet on the transport line model, and collect beam spot size information using the beam cross section detector.
[0103] In this embodiment, the reversible neural network model includes multiple affine coupling layer modules, a ReLU activation function, and a loss function. The reversibility of the multiple affine coupling layer modules is used to achieve bidirectional transmission of the network. The adaptive moment estimation algorithm and the backpropagation algorithm are used to train the reversible neural network model, and the training loss is calculated using the loss function.
[0104] In this embodiment of the application, the loss function is:
[0105] L all =ω MSE L MSE +ω r L r +ω α L α +ω k L k +ω I L I
[0106] Among them, L MSE The mean square error between the predicted beam spot size and the actual beam spot size; L α To compensate for the mean squared error of the dimension; L r For reconstruction error; L k The loss function used to ensure that the predicted values of the quadrupole magnets and the dataset follow the same distribution; L I ω is the loss function used to ensure that the latent space Z follows the desired distribution; MSE For L MSE The corresponding weights; ω r For L r The corresponding weights; ω α For L α The corresponding weights; ω k For L k The corresponding weights; ω I For L I The corresponding weights.
[0107] In this embodiment, the prediction accuracy evaluation scheme includes: identifying the true values of quadrupole magnet strength and beam spot size in the test set; inputting the true values of quadrupole magnet strength into a reversible neural network model, which performs forward prediction to obtain a forward predicted value of beam spot size, and calculating the forward prediction accuracy based on the true values of beam spot size and the forward predicted value of beam spot size; inputting the true values of beam spot size into the reversible neural network model, which performs inverse prediction to obtain an inverse predicted value of quadrupole magnet strength, and calculating the inverse prediction accuracy based on the true values of quadrupole magnet strength and the inverse predicted value of quadrupole magnet strength; and characterizing the effectiveness of the prediction values of the reversible neural network model based on the forward prediction accuracy and the inverse prediction accuracy.
[0108] It should be noted that the foregoing explanation of the embodiment of the intelligent beam tuning method for electron beam transport lines also applies to the intelligent beam tuning device for electron beam transport lines in this embodiment, and will not be repeated here.
[0109] According to the intelligent beam tuning device for electron beam transport lines proposed in this application, a transport line model of the electron beam is established to obtain beam spot size information. A reversible neural network model is then established. Based on the unidirectional transmission of the transport line and the reversible transmission of the reversible neural network model, a prediction accuracy evaluation scheme for the reversible neural network model is generated. The reversible neural network model is then trained using a dataset composed of beam spot size information. The model selects the quadrupole magnet prediction value distribution using the prediction accuracy evaluation scheme, inputs this prediction value distribution into the transport line model, adjusts the network parameters of the reversible neural network model based on the output results, and finally uses the trained reversible neural network model to adjust the electron beam injected into the transport line. By using the reversible neural network model, the problem of horizontal and vertical bidirectional beam tuning coupling is avoided, and beam tuning can be performed with fewer beam information acquisition components. Under the premise of ensuring physicality, the reverse transmission process is used to predict the quadrupole magnet value of the input data.
[0110] Figure 11 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:
[0111] The memory 301, the processor 302, and the computer program stored on the memory 301 and capable of running on the processor 302.
[0112] When the processor 302 executes the program, it implements the intelligent beam tuning method for the electron beam transport line provided in the above embodiments.
[0113] Furthermore, electronic devices also include:
[0114] Communication interface 303 is used for communication between memory 301 and processor 302.
[0115] The memory 301 is used to store computer programs that can run on the processor 302.
[0116] The memory 301 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.
[0117] If the memory 301, processor 302, and communication interface 303 are implemented independently, then the communication interface 303, memory 301, and processor 302 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 11 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0118] Optionally, in a specific implementation, if the memory 301, processor 302, and communication interface 303 are integrated on a single chip, then the memory 301, processor 302, and communication interface 303 can communicate with each other through an internal interface.
[0119] Processor 302 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of this application.
[0120] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described intelligent beam modulation method for electron beam transport lines.
[0121] This application also provides a computer program product, including a computer program or instructions, which, when executed, implement the above-described intelligent beam modulation method for electron beam transport lines.
[0122] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0123] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0124] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0125] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.
[0126] Those skilled in the art will understand that all or part of the steps of the methods implementing the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0127] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for intelligent beam tuning of an electron beam transport line, characterized in that, Includes the following steps: Establish a transport line model for the electron beam and use the transport line model to obtain beam spot size information; A reversible neural network model is established, and based on the unidirectional transmission of the transport line and the reversible transmission of the reversible neural network model, a prediction accuracy evaluation scheme for the reversible neural network model is generated. The reversible neural network model is trained using a dataset composed of the beam spot size information. The reversible neural network model selects the quadrupole magnet prediction value distribution using the prediction accuracy evaluation scheme, inputs the quadrupole magnet prediction value distribution into the transport line model, and adjusts the network parameters of the reversible neural network model based on the output of the transport line model. The electron beam injected into the transport line is adjusted using a trained reversible neural network model.
2. The intelligent beam tuning method for electron beam transport lines according to claim 1, characterized in that, The establishment of the transport line model for the electron beam includes: Acquire device distribution data along the entire transport line of the electron beam; Based on the device distribution data, the device distribution on the entire transport line is divided into multiple segments; Multiple dispersive unit structures are established based on the multi-segment distribution, and the transport line model of the electron beam is generated based on the multiple dispersive unit structures.
3. The intelligent beam tuning method for electron beam transport lines according to claim 1, characterized in that, The step of obtaining beam spot size information using the transport line model includes: A beam position detector, a correction magnet, and a beam cross-section detector are placed on the transport line model. The predicted value of the correction magnet is calculated using the beam position detected by the beam position detector, and the transport line model is corrected based on the predicted value of the correction magnet. The predicted values of the quadrupole magnets are randomly added or subtracted from the transport line model, and the beam spot size information is collected using the beam cross-section detector.
4. The intelligent beam tuning method for electron beam transport lines according to claim 1, characterized in that, The reversible neural network model includes multiple affine coupling layer modules, a ReLU activation function, and a loss function. The reversibility of the multiple affine coupling layer modules enables bidirectional transmission of the network. The reversible neural network model is trained using an adaptive moment estimation algorithm and a backpropagation (BP) algorithm. The training loss is calculated using the loss function.
5. The intelligent beam tuning method for electron beam transport lines according to claim 4, characterized in that, The loss function is: L all =ω MSE L MSE +oh r L r +oh α L α +oh k L k +oh I L I Among them, L MSE The mean square error between the predicted beam spot size and the actual beam spot size; L α To compensate for the mean squared error of the dimension; L r For reconstruction error; L k The loss function used to ensure that the predicted values of the quadrupole magnets and the dataset follow the same distribution; L I ω is the loss function used to ensure that the latent space Z follows the desired distribution; MSE For L MSE The corresponding weights; ω r For L r The corresponding weights; ω α For L α The corresponding weights; ω k For L k The corresponding weights; ω I For L I The corresponding weights.
6. The intelligent beam tuning method for electron beam transport lines according to claim 4, characterized in that, The prediction accuracy evaluation scheme includes: Identify the true values of quadrupole magnet strength and beam spot size in the test set; The true value of the quadrupole magnet strength is input into the reversible neural network model, and the reversible neural network model performs forward prediction to obtain the forward prediction value of the beam spot size. The forward prediction accuracy is calculated based on the true value of the beam spot size and the forward prediction value of the beam spot size. The true value of the beam spot size is input into the reversible neural network model, and the reversible neural network model performs reverse prediction to obtain the reverse prediction value of the quadrupole magnet strength. The reverse prediction accuracy is calculated based on the true value of the quadrupole magnet strength and the reverse prediction value of the quadrupole magnet strength. The effectiveness of the predictions made by the reversible neural network model is characterized by the forward prediction accuracy and the backward prediction accuracy.
7. An intelligent beam tuning device for an electron beam transport line, characterized in that, include: The first establishment module is used to establish a transport line model of the electron beam and obtain beam spot size information using the transport line model; The second module is used to establish a reversible neural network model and generate a prediction accuracy evaluation scheme for the reversible neural network model based on the unidirectional transmission of the transport line and the reversible transmission of the reversible neural network model. The training module is used to train the reversible neural network model using a dataset composed of the beam spot size information. The reversible neural network model selects the quadrupole magnet prediction value distribution using the prediction accuracy evaluation scheme, inputs the quadrupole magnet prediction value distribution into the transport line model, and adjusts the network parameters of the reversible neural network model according to the output of the transport line model. The adjustment module is used to adjust the electron beam injected into the transport line using a trained reversible neural network model.
8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the intelligent beam tuning method for an electron beam transport line as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed, they implement the intelligent beam tuning method for electron beam transport lines as described in any one of claims 1-6.
10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed, they implement the intelligent beam tuning method for electron beam transport lines as described in any one of claims 1-6.