A method for simultaneously correcting the average field and first harmonic errors of a cyclotron

By combining the finite element model and the minimum orthogonalization method, the isochronous and first harmonic errors of the main magnetic field of the cyclotron were simultaneously compensated, solving the problem of repeated operations in the existing technology and improving the compensation efficiency and accuracy.

CN116579210BActive Publication Date: 2026-06-05CHINA INSTITUTE OF ATOMIC ENERGY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA INSTITUTE OF ATOMIC ENERGY
Filing Date
2023-05-15
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies cannot simultaneously and efficiently compensate for both the isochronous magnetic field error and the first harmonic magnetic field error of a cyclotron, requiring repeated operations to complete, which affects the mass production of high-current cyclotrons.

Method used

A cyclotron main magnetic field padding algorithm based on multiple linear regression is adopted. The padding matrix A is calculated by finite element model simulation and combined with the minimum orthogonalization method to simultaneously pad the isochronous magnetic field error and the first harmonic magnetic field error at each cutting point.

Benefits of technology

It improves the efficiency of padding, reducing the number of iterations from five or six in the existing technology to only one or two, significantly improving the efficiency and accuracy of padding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116579210B_ABST
    Figure CN116579210B_ABST
Patent Text Reader

Abstract

The application provides a method for simultaneously compensating average field and first harmonic error of a cyclotron, which comprises the following steps: calculating a main magnetic field compensation matrix A of the cyclotron through finite element model simulation, wherein the A is a compensation matrix A covering all functions of isochronous error and first harmonic error caused by cutting each cutting point of each magnetic pole based on finite element model calculation; solving a compensation equation: wherein a total error matrix b comprises an average field change matrix and a first harmonic change matrix β of each cutting point; the compensation matrix A is a compensation matrix A of a function relationship of magnetic field change caused by cutting each cutting point of each main magnetic pole according to finite element model calculation; and X is a cutting amount matrix, which is a matrix of required cutting amount of each cutting point of each main magnetic pole calculated according to the known b and the known A. The application simultaneously compensates isochronous magnetic field error and first harmonic magnetic field error of each cutting point, and effectively improves the compensation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of cyclotrons, and particularly relates to a method for simultaneously compensating for the mean field and first harmonic error of a cyclotron. Background Technology

[0002] Padding the main magnetic field of a cyclotron is the only way to ensure that its distribution matches the physical design. Therefore, to build a high-performance high-current cyclotron, precise padding of the magnetic field of the main magnet is essential.

[0003] In actual main magnet engineering processing, there are isochronous magnetic field errors and first harmonic magnetic field errors: the main magnetic field after preliminary processing often deviates from the theoretical isochronous magnetic field, which will cause the cyclotron frequency of the particles to be out of tune with the high frequency during acceleration. Sometimes, the particles may even enter the deceleration zone and be lost in the accelerator, and ultimately the particles cannot be extracted normally. At the same time, due to the existence of some main magnet processing or installation errors, these mechanical distortions will cause the magnetic field to introduce a first harmonic component, which will increase the transverse oscillation amplitude of the particles and rapidly increase the cyclic emittance of the beam, resulting in beam loss.

[0004] Currently, existing theoretical methods can only effectively compensate for isochronous errors in the magnetic field, ensuring that the compensated magnetic field meets the isochronous requirements for ions. However, for first harmonic compensation, although theoretical calculation methods exist, these methods can only compensate for the first harmonic based on engineering experience after most of the isochronous errors in the magnetic field have been eliminated through compensation. They cannot simultaneously and accurately compensate for both isochronous and first harmonic errors, and this method results in a large number of iterations for magnetic field compensation. This is unacceptable for the current mass production of high-current cyclotron accelerators.

[0005] The reason why existing technologies can only rely on some engineering experience for padding is that conventional padding experience for first harmonics is not feasible: conventional padding experience for first harmonics, such as... Figure 4As shown, without altering the isochronism of the main magnet, an artificially introduced first harmonic in the opposite direction will cancel each other out, thus eliminating the first harmonic of the magnetic field. The method for introducing this reverse first harmonic is as follows: For a four-sector cyclotron accelerator, two magnetic poles symmetrically arranged at 180 degrees are grouped together. For any group of magnetic poles, to avoid changing the average field, taking the horizontally symmetrical 180-degree poles as an example, a raised padding structure is added to the side of the right pole, while the same padding is removed from the left pole to create a concave structure. The magnetic field on one side strengthens, while the magnetic field on the other side weakens; since the changes are the same, the average field of the magnetic field is the same as before the cutting, because a first harmonic in the opposite direction has been introduced. Similarly, the other group of magnetic poles symmetrically arranged at 180 degrees in the vertical direction can be operated on. By coupling the first harmonics introduced from the two groups of magnetic poles, the original first harmonic of the magnetic field can be canceled out. Following this principle of introducing the first harmonic, not only is the isochronism of the magnetic field not affected, but the harmonics are also effectively eliminated.

[0006] Unfortunately, in actual machining, when using a milling cutter to change the shape of the insert, the machining of the insert can only be done by cutting. It's impossible to attach padding blocks to the magnetic poles because it's difficult to guarantee that the material of the subsequently attached padding blocks is consistent with the original material. Inconsistent materials make it difficult to guarantee the uniformity of the magnetic field. Due to material consistency concerns, in engineering, padding for magnetic poles can only be done by cutting, not adding padding blocks. To solve the problem of "padding for magnetic poles can only be done by cutting, not adding padding blocks," an engineering experience-based method is adopted. This method involves making an appropriate cut when padding the isochronous magnetic field. The "appropriate cut" is based on the principle that the error of the isochronous magnetic field is much larger than the error of the first harmonic. For example, if the isochronous magnetic field error is 1000 Gauss, the error of the first harmonic magnetic field is only tens of Gauss. Since the error of the first harmonic magnetic field is much smaller than the error of the isochronous magnetic field, when it is necessary to attach a first harmonic padding block to the magnetic pole, the method of cutting less of the isochronous error padding block is used to indirectly achieve the purpose of "attaching a first harmonic padding block to the magnetic pole."

[0007] However, this method of "cutting appropriately" based on engineering experience is inefficient at compensating for the first harmonic, often requiring five or six repetitions to complete the compensation for both isochronous magnetic field errors and the first harmonic magnetic field errors. The reason for this repetition is that the compensation for isochronous and first harmonic magnetic field errors occurs at different times: the isochronous magnetic field error is compensated first, followed by the first harmonic magnetic field error. Therefore, the isochronous magnetic field error compensation cannot be completed in one cut; a smaller cut must be made to compensate for the first harmonic. The reason for this smaller cut, rather than a larger one, is that cutting too much would render the entire magnetic pole unusable. To avoid cutting too much, multiple trials are necessary until the current cut meets the requirements for both isochronous and first harmonic compensation. Therefore, five or six repetitions are required to complete the compensation. Summary of the Invention

[0008] To address the problems of existing technologies, this invention proposes a method for simultaneously compensating for the average field and first harmonic error of a cyclotron. The aim is to solve the problem that existing technologies do not simultaneously compensate for isochronous magnetic field error and first harmonic magnetic field error, requiring five or six repetitions to complete the compensation for both errors.

[0009] To solve its technical problem, the present invention adopts the following technical solution:

[0010] A cyclotron main magnetic field padding algorithm based on multiple linear regression is characterized by the following steps:

[0011] Step 1: Calculate the corresponding cyclotron main magnetic field padding matrix A through finite element model simulation. The padding matrix A is a padding matrix A that covers the isochronous error and first harmonic error function relationship caused by cutting each cutting point of each magnetic pole based on the finite element model calculation.

[0012] Step 2: Solve the padding equation: b = A·X + ε, where b is the total magnetic field error matrix, which is obtained by comparing the actual measured magnetic field of the main magnetic pole at each cutting point radius with the physically designed magnetic field at that radius. This total error matrix includes the average field change matrix and the first harmonic change matrix β at each cutting point; A is the padding matrix A, which is the padding matrix A calculated based on the finite element model to reflect the magnetic field change function caused by cutting at each cutting point of the main magnetic pole; X is the cutting amount matrix, which is the matrix of the cutting amount required for each cutting point of each main magnetic pole calculated based on the known b and known A in order to eliminate the actual accelerator magnetic field error; ε is a perturbation of the equation, whose expected value is zero, and is considered to be zero when solving the equation.

[0013] The cutting point, each cutting point, or every cutting point refers to a cutting point at the same radius on the two sides of the current magnetic pole.

[0014] Furthermore, the specific process of step one is as follows:

[0015] 1) Divide the two sides of each main magnetic pole into m cutting points along the radius;

[0016] 2) Using finite element model simulation, m accelerator models are established by individually cutting the same unit thickness at m cutting points on the two sides of the first magnetic pole. At this time, the magnetic poles of the model no longer have symmetry after cutting, which will introduce mean field error and first harmonic error. The magnetic field of each of the m cut models is calculated and compared with the magnetic field of the model without cutting. The mean field error and first harmonic error introduced by cutting a unit thickness at each of the m cutting points can be calculated.

[0017] 3) The finite element model calculation process is as follows: For example, after cutting a unit thickness at the first cutting point of the first magnetic pole, a new magnetic field distribution is calculated and compared with the magnetic field distribution when the model is not cut, resulting in an average field error matrix and a first harmonic error matrix; similarly, after cutting the same unit thickness at the second cutting point, the magnetic field distribution is calculated and compared with the magnetic field distribution when it is not cut, resulting in the total error matrix b corresponding to the second cutting point. So, for the m cutting points of the first magnetic pole, a total of m error matrices b are obtained after calculation.

[0018] This mean field difference matrix is ​​represented by:

[0019]

[0020] This represents the average field error value at the radius of the first cutting point. The average field difference matrix has a total of m elements, and the superscript T in the matrix brackets indicates the transpose of the matrix.

[0021] Since the first harmonic has both magnitude and direction, phase decomposition is necessary to represent it. This first harmonic decomposition matrix is ​​represented by the first harmonic matrix β:

[0022] β=[β1sinφ1,β2sinφ2,…,β m sinφ m ,β1cosφ1,β2cosφ2,…,β m cosφ m ] T (2)

[0023] The first harmonic amplitude and phase at the first cutting point represent the first harmonic phase at the first cutting point. That is, each cutting point corresponds to two elements of the first harmonic error matrix. The subscript m indicates different radii. The first harmonic error matrix has a total of 2m elements. The upper right subscript T in the matrix brackets indicates the transpose of the matrix.

[0024] The mean field error matrix and the first harmonic error matrix are coupled to form a total error matrix b. This total error matrix b is the total error matrix corresponding to the unit thickness cut by the first radius of the first magnetic pole. b is expressed as:

[0025]

[0026] The superscript T denotes the transpose of the matrix, and the total error matrix b contains 3m elements.

[0027] 4) Repeat steps 2) and 3) to cut each cutting point of the second, third, and fourth magnetic poles individually. For each magnetic pole, establish 3m models, calculate the magnetic field, and compare them with the uncut models to obtain the total error matrix b for each model. In total, you will get 4m total error matrices b calculated after cutting each of the 4m cutting points of the four magnetic poles individually. These 4m total error matrices b correspond one-to-one with the 4m cutting amount matrices X after cutting each cutting point of the four magnetic poles individually, and will be used to solve for the padding matrix A.

[0028] 5) The padding amount matrix is ​​represented by X: the cutting amount of different padding blocks is represented by , where p refers to the p-th magnetic pole, m refers to the index of the padding cutting point, and the superscript T indicates the transpose of the matrix. Then the total cutting amount matrix of the four magnetic poles can be represented as:

[0029]

[0030] For example, for a finite element simulation model where a unit thickness is cut at the first cutting point of the first magnetic pole, its padding matrix X is represented as:

[0031] X = [1, 0, 0, ...] T (5)

[0032] Except for the first element which is a unit 1, the remaining 4m-1 elements are all 0. This is because in this model, only the first cutting point of the first magnetic pole is cut off. Therefore, the cutting amount matrix X of the above 4m model can be represented separately, resulting in a total of 4m cutting amount matrices X.

[0033] 6) Substitute the 4m padding amount matrices X and their corresponding 4m total magnetic field error matrices b obtained from the finite element model into the following padding equations, resulting in a total of 4m sets of equations. Through linear algebra calculations, all elements within the padding matrix A can be solved, thus obtaining the total padding matrix A of the main magnetic poles:

[0034]

[0035] Furthermore, the specific process of step two is as follows:

[0036] 1) Establish the padding equation, the padding equation is as follows:

[0037] b=A·X+ε (7)

[0038] Where b is the total error matrix obtained by measuring the magnetic field of the actual accelerator using a magnetic field measuring device. This total error matrix b is the total error matrix obtained by coupling the average field error matrix and the first harmonic error matrix of each cutting point of the main magnetic pole. A is the padding matrix A, which is the padding matrix A calculated based on the finite element model. X is the cutting amount matrix, which represents the cutting amount required by the actual accelerator at each radius of each magnetic pole in order to eliminate its magnetic field error. Based on the padding equation, the padding amount X at different radii of different magnetic fields is solved based on the known b and A.

[0039] 2) Measure the current magnetic field of each of the main magnetic poles along the radius at each cutting point;

[0040] 2) Calculate the difference between the actual measured magnetic field at each cutting point and the theoretically designed magnetic field to obtain the average field difference value of the actual measured magnetic field at each cutting point;

[0041] 3) Use the first harmonic magnetic field error actually measured at each cutting point as the final first harmonic magnetic field error at that cutting point;

[0042] 4) The total magnetic field variation matrix b of the main magnetic pole is composed of the average field difference value of each cutting point of the main magnetic pole measured in actual measurements and the first harmonic magnetic field error of each cutting point;

[0043] 5) Given b and A, calculate the padding amount at different radii in different magnetic fields:

[0044] X = (A T A) -1 A T b (8)

[0045] At this point, we have: b: 3m, a first-order matrix; b: 4, a first-order matrix. Since: 4m, the system of equations is now an underdetermined system of equations, and the equations have infinitely many solutions; where the superscript T indicates the transpose of the matrix.

[0046] 6) The minimum orthogonalization method is used to solve the underdetermined equation system. Among all the solutions, only one is closest to the origin, which is the solution we are looking for. Therefore, the cutting padding amount X at different magnetic poles and different radii can be calculated.

[0047] Advantages and effects of the present invention

[0048] This invention achieves simultaneous compensation of isochronous magnetic field error and first harmonic magnetic field error at each cutting point of the main magnetic pole using a finite element model, a method that cuts only one cutting point of a magnetic pole using a finite element model while restoring other cutting points to an uncut state, and a method that finds a unique solution by solving an underdetermined system of equations based on the minimum orthogonalization method. This significantly improves the compensation efficiency, reducing the compensation efficiency from five or six iterations required by existing technologies to a maximum of only two iterations. Attached Figure Description

[0049] Figure 1 This is a schematic diagram illustrating the cutting of only the first magnetic pole in this invention;

[0050] Figure 2 This refers to the amplitude and phase of the first harmonic introduced at each radius after the unit pad block is cut at R1 of the first magnetic pole in this invention.

[0051] Figure 3 This is a schematic diagram illustrating the same treatment applied to the second, third, and fourth magnetic poles in this invention.

[0052] Figure 4 A schematic diagram illustrating the limitations of existing first harmonic compensation methods;

[0053] Figure 5 This is a flowchart of the processing method of the present invention; Detailed Implementation

[0054] Design principle of the invention

[0055] 1. Innovation of this invention: In engineering, it simultaneously performs precise isochronous magnetic field compensation and precise first harmonic magnetic field compensation. Because the compensation is done simultaneously, the compensation efficiency is very high, requiring only 1-2 steps to complete the compensation of the current cutting point. In contrast, existing technologies require five or six steps to complete the compensation of a single cutting point.

[0056] 2. Design Principles

[0057] First, a finite element model is used to find the functional relationship A between the isochronous error and the first harmonic error at each cutting point on the main magnetic pole and the cutting amount of the padding block. With this functional relationship A, the cutting amount of the padding block in the actual magnetic field can be calculated. The difference between this invention and the prior art is that this functional relationship A simultaneously covers the isochronous error and the first harmonic error at each cutting point of the main magnetic pole. Therefore, when the cutting amount of the padding block is calculated according to this functional relationship, the padding block is cut in one stroke, simultaneously padding the isochronous magnetic field error and the first harmonic magnetic field error at the current cutting point, rather than first padding only the isochronous magnetic field error in one stroke and then padding the first harmonic magnetic field error in another stroke.

[0058] Second, the design of the finite element model: ① At any given time, only one cutting point of a single magnetic pole is cut, while all other cutting points are restored to their uncut state. For example... Figure 1 , Figure 3 As shown, the finite element model design method of this invention is as follows: after cutting a unit thickness at the first cutting point of the first magnetic pole, a new magnetic field distribution is calculated, which is then compared with the magnetic field distribution when the model is not cut to obtain an average field error matrix. And obtain a first harmonic error matrix β; similarly, calculate the magnetic field distribution after cutting the same unit thickness at the second cutting point, compare it with the magnetic field distribution before cutting, and obtain the total error matrix b corresponding to the second cutting point. It is worth noting that, as Figure 3 As shown in the first figure on the left, when cutting at the second cutting point, Figure 3In the first diagram on the left, the first magnetic pole 1 returns to the state of no cutting. When cutting is performed on the cutting point of the third magnetic pole, the first and second magnetic poles return to the state of no cutting. Assuming that each magnetic pole has 50 cutting points along the radius, the four magnetic poles have a total of 200 cutting points. When cutting is performed on the 200th cutting point, the previous 199 cutting points return to the state of no cutting. ② The principle of simultaneously introducing isochronous magnetic field error and first harmonic error to the current cutting point: The principle of isochronous magnetic field error generated by "cutting": The isochronous magnetic field refers to the average magnetic field error of one revolution. When only one magnetic pole is cut by the pad block, although only one point of the magnetic pole is cut, the average magnetic field of the whole revolution at that radius is also weakened. When the average magnetic field of the whole revolution that was not cut is compared with the current one, the isochronous magnetic field error appears. The principle of simultaneously generating first harmonic magnetic field error by "cutting": Since only the current cutting point is cut each time, and the other cutting points are in an uncut state, a first harmonic magnetic field error will inevitably be generated. Before cutting, the four magnetic poles are uniformly symmetrical and no first harmonic will be generated. After cutting, the original symmetry becomes asymmetric, so a first harmonic will definitely be generated. The existing technology uses the method of cutting the cutting points of the four magnetic poles at the same radius together. Although it can produce isochronous magnetic field error, since the four magnetic poles are cut together, the four magnetic poles are still symmetrical at the same radius after cutting because the size of the cutting block is the same. Therefore, this method will definitely not produce first harmonics.

[0059] Third, the underdetermined equations present a design challenge and a solution. Existing finite element models are designed only for isochronous magnetic field errors, involving simultaneous cutting of all four magnetic poles. Each revolution has only one isochronous magnetic field error change. Assuming each magnetic pole has 50 cutting points, resulting in 50 isochronous magnetic field error changes, and since X represents the X of one revolution rather than just one magnetic pole, the number of unknowns in X is also 50. In the padding equations…

[0060] b = A·X + ε

[0061] The number of equations, b, and the number of unknowns, cutting amount X, are both 50. Since the number of equations and unknowns are the same, this equation is easy to solve. This invention generates three magnetic field error changes instead of one with each "cut." These three magnetic field error changes include one average field magnetic field error change and two first harmonic component magnetic field changes. This results in 150 magnetic field changes in the padding equation (b). Each of the four magnetic poles has 50 cutting points. Since the first harmonic component is calculated per cutting point per pole, not per complete circle of cutting points across all four poles, this invention has 200 unknowns X for the four poles. Therefore, since the number of equations, b, is less than 200 unknowns, it is an underdetermined equation. This invention uses a minimum orthogonalization method to solve the underdetermined equation system. Among all solutions, only one is closest to the origin, which is the solution we are looking for. Therefore, the cutting padding amount X at different radii of different magnetic poles can be calculated.

[0062] The principle for solving underdetermined systems of equations can be found in the paper:

[0063] [1] Cheng Xiaoliang, Zheng Xuan, Han Weimin. Algorithm for solving sparse solutions of underdetermined linear equation systems [J]. Journal of Applied Mathematics of Chinese Universities: Series A, 2013(2):14.

[0064] Based on the above principles, this invention designs a method for simultaneously compensating for the mean field and first harmonic error of a cyclotron accelerator, as follows: Figure 5 As shown, its characteristics include the following steps:

[0065] Step 1: Calculate the corresponding cyclotron main magnetic field padding matrix A through finite element model simulation. The padding matrix A is a padding matrix A that covers the isochronous error and first harmonic error function relationship caused by cutting each cutting point of each magnetic pole based on the finite element model calculation.

[0066] Supplementary Note 1:

[0067] ① The “finite element model” refers to each cutting point as a model, and “covering all finite element models” means covering 3m*4n finite element models, where 3m is the number of rows and 4n is the number of columns. In this embodiment, the step size of the magnetic field variable and the step size of the cutting point are set to the same step size, so the values ​​of m and n are both 50. Thus, the padding matrix A has a total of 150 rows and 200 columns.

[0068] ②The total magnetic field change of the 3m main magnetic pole. Assuming each magnetic pole has 50 cutting points, there are 50 average field changes and 50 first harmonic component changes (βsinφ, βcosφ), for a total of 100 first harmonic component changes. The average field change refers to the change compared to the average field when it is not being cut, and the first harmonic component change refers to the change compared to the ideal magnetic field design. The ideal magnetic field design has no first harmonics. Therefore, when a cutting point is cut, the first harmonic change or the first harmonic component change is itself.

[0069] ③ The 150 magnetic field changes are the total average field change of the four magnetic poles of the main magnetic field (50) and the total first harmonic component change of the four magnetic poles of the main magnetic field. Although there are four magnetic poles, only one of the four magnetic poles in a circle at each radius is cut at the current cutting point, while the other three magnetic poles are not cut at the current radius. Therefore, the magnetic field changes of the four magnetic poles and the magnetic field changes of one magnetic pole are the same, both being 150.

[0070] Step 2: Solve the padding equation: b = A·X + ε, where b is the total magnetic field error matrix, which is obtained by comparing the actual measured magnetic field of the main magnetic pole at each cutting point radius with the physically designed magnetic field at that radius. The total error matrix includes the average field change matrix and the first harmonic change matrix β at each cutting point; A is the padding matrix A, which is the padding matrix A calculated based on the finite element model to reflect the magnetic field change function relationship caused by cutting at each cutting point of the main magnetic pole; X is the cutting amount matrix, which is the matrix of the cutting amount required for each cutting point of each main magnetic pole calculated based on the known b and known A in order to eliminate the actual accelerator magnetic field error; ε is a perturbation of the equation, whose expected value is zero, and is considered to be zero when solving the equation.

[0071] Furthermore, the specific process of step one is as follows:

[0072] 1) Divide the two sides of each main magnetic pole into m cutting points along the radius;

[0073] 2) Using finite element model simulation, m accelerator models are established by individually cutting the same unit thickness at m cutting points on the two sides of the first magnetic pole. At this time, the magnetic poles of the model no longer have symmetry after cutting, which will introduce mean field error and first harmonic error. The magnetic field of each of the m cut models is calculated and compared with the magnetic field of the model without cutting. The mean field error and first harmonic error introduced by cutting a unit thickness at each of the m cutting points can be calculated.

[0074] The cutting point, each cutting point, or every cutting point refers to the cutting point at the same radius on the two sides of the current magnetic pole.

[0075] 3) The finite element model calculation process is as follows: For example, after cutting a unit thickness at the first cutting point of the first magnetic pole, a new magnetic field distribution is calculated and compared with the magnetic field distribution when the model is not cut, resulting in an average field error matrix and a first harmonic error matrix; similarly, after cutting the same unit thickness at the second cutting point, the magnetic field distribution is calculated and compared with the magnetic field distribution when it is not cut, resulting in the total error matrix b corresponding to the second cutting point. So, for the m cutting points of the first magnetic pole, a total of m error matrices b are obtained after calculation.

[0076] This mean field difference matrix is ​​represented by:

[0077]

[0078] This represents the average field error value at the radius of the first cutting point. The average field difference matrix has a total of m elements, and the superscript T in the matrix brackets indicates the transpose of the matrix.

[0079] Since the first harmonic has both magnitude and direction, phase decomposition is necessary to represent it. This first harmonic decomposition matrix is ​​represented by the first harmonic matrix β:

[0080] β=[β1sinφ1,β2sinφ2,…,β m sinφ m ,β1cosφ1,β2cosφ2,…,β m cosφ m ] T (2)

[0081] The first harmonic amplitude and phase at the first cutting point represent the first harmonic phase at the first cutting point. That is, each cutting point corresponds to two elements of the first harmonic error matrix. The subscript m indicates different radii. The first harmonic error matrix has a total of 2m elements. The upper right subscript T in the matrix brackets indicates the transpose of the matrix.

[0082] The mean field error matrix and the first harmonic error matrix are coupled to form a total error matrix b. This total error matrix b is the total error matrix corresponding to the unit thickness cut by the first radius of the first magnetic pole. b is expressed as:

[0083]

[0084] The superscript T denotes the transpose of the matrix, and the total error matrix b contains 3m elements.

[0085] 4) Repeat steps 2) and 3) to cut each cutting point of the second, third, and fourth magnetic poles individually. For each magnetic pole, establish 3m models, calculate the magnetic field, and compare them with the uncut models to obtain the total error matrix b for each model. In total, you will get 4m total error matrices b calculated after cutting each of the 4m cutting points of the four magnetic poles individually. These 4m total error matrices b correspond one-to-one with the 4m cutting amount matrices X after cutting each cutting point of the four magnetic poles individually, and will be used to solve for the padding matrix A.

[0086] 5) The padding amount matrix is ​​represented by X: the cutting amount of different padding blocks is represented by , where p refers to the p-th magnetic pole, m refers to the index of the padding cutting point, and the superscript T indicates the transpose of the matrix. Then the total cutting amount matrix of the four magnetic poles can be represented as:

[0087]

[0088] For example, for a finite element simulation model where a unit thickness is cut at the first cutting point of the first magnetic pole, its padding matrix X is represented as:

[0089] X = [1, 0, 0, ...] T (5)

[0090] Except for the first element which is a unit 1, the remaining 4m-1 elements are all 0. This is because in this model, only the first cutting point of the first magnetic pole is cut off. Therefore, the cutting amount matrix X of the above 4m model can be represented separately, resulting in a total of 4m cutting amount matrices X.

[0091] 6) Substitute the 4m padding amount matrices X and their corresponding 4m total magnetic field error matrices b obtained from the finite element model into the following padding equations, resulting in a total of 4m sets of equations. Through linear algebra calculations, all elements within the padding matrix A can be solved, thus obtaining the total padding matrix A of the main magnetic poles:

[0092]

[0093] Furthermore, the specific process of step two is as follows:

[0094] 1) Establish the padding equation, the padding equation is as follows:

[0095] b=A·X+ε (7)

[0096] Where b is the total error matrix obtained by measuring the magnetic field of the actual accelerator using a magnetic field measuring device. This total error matrix b is the total error matrix obtained by coupling the average field error matrix and the first harmonic error matrix of each cutting point of the main magnetic pole. A is the padding matrix A, which is the padding matrix A calculated based on the finite element model. X is the cutting amount matrix, which represents the cutting amount required by the actual accelerator at each radius of each magnetic pole in order to eliminate its magnetic field error. Based on the padding equation, the padding amount X at different radii of different magnetic fields is solved based on the known b and A.

[0097] 2) Measure the current magnetic field of each of the main magnetic poles along the radius at each cutting point;

[0098] 2) Calculate the difference between the actual measured magnetic field at each cutting point and the theoretically designed magnetic field to obtain the average field difference value of the actual measured magnetic field at each cutting point;

[0099] 3) Use the first harmonic magnetic field error actually measured at each cutting point as the final first harmonic magnetic field error at that cutting point;

[0100] 4) The total magnetic field variation matrix b of the main magnetic pole is composed of the average field difference value of each cutting point of the main magnetic pole measured in actual measurements and the first harmonic magnetic field error of each cutting point;

[0101] 5) Given b and A, calculate the padding amount at different radii in different magnetic fields:

[0102] X = (A T A) -1 A T b (8)

[0103] At this point, we have: b: 3m, a first-order matrix; b: 4, a first-order matrix. Since: 4m, the system of equations is now an underdetermined system of equations, and the equations have infinitely many solutions; where the superscript T indicates the transpose of the matrix.

[0104] 6) The minimum orthogonalization method is used to solve the underdetermined equation system. Among all the solutions, only one is closest to the origin, which is the solution we are looking for. Therefore, the cutting padding amount Z at different magnetic poles and different radii can be calculated.

[0105] Supplementary Note 2: Proof of the solution principle based on minimum orthogonality

[0106] The principle of solving underdetermined systems of equations can be found in the paper: [1] Cheng Xiaoliang, Zheng Xuan, Han Weimin. Algorithm for solving sparse solutions of underdetermined linear systems of equations [J]. Journal of Applied Mathematics of Chinese Universities: Series A, 2013(2): 14.

[0107] This embodiment will not be explained in detail; a simple proof is as follows:

[0108] Consider the system of linear equations AX = b, where, m≤n, rank(A)=m. The number of equations is no greater than the number of unknowns. Therefore, this system of equations may have infinitely many solutions. However, we will find that there is only one solution closest to the origin, that is, the x with the smallest norm ||x|| among the solutions of AX=b. Let x * This solution indicates that Ax * =b, and for any x satisfying AZ = b, we have ||x|| * ||≤||x||. That is to say, x * Here is the solution to the following optimization problem:

[0109] minimize ||x||

[0110] subject to Ax=b

[0111] The conclusion is given directly: the minimum norm solution of the system of equations is: x * =A T (AA T ) -1 b

[0112] prove:

[0113] Let the above solution be x * =A T (AA T ) -1 b, has

[0114] ||x|| 2 =||(xx) * )+x * || 2

[0115] =((xx) * )+x * ) T ((xx * )+x * )

[0116] =||xx * || 2 +||x * || 2 +2x *T (xx * )

[0117] because

[0118] x *T (xx * )=[A T (AAT ) -1 b] T [xA T (AA T ) -1 b]

[0119] =b T (AA T ) -1 [Ax-(AA T (AA) T ) -1 b]

[0120] =b T (AA T ) -1 (bb)

[0121] =0

[0122] Since for all x ≠ x * All of them have ||xx * || 2 >0 holds true, therefore for all x * ≠x, both have ||x|| 2 >||x * || 2 That is: ||x|| > ||x * ||, then obviously x * It is unique.

[0123] The proof is complete.

[0124] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention is also intended to include these modifications and variations.

Claims

1. A method for simultaneously compensating for the mean field and first harmonic error of a cyclotron, characterized in that... Includes the following steps: Step 1: Calculate the corresponding cyclotron main magnetic field padding matrix A through finite element model simulation. The padding matrix A is a padding matrix A that covers the isochronous error and first harmonic error function relationship caused by cutting each cutting point of each magnetic pole based on the finite element model calculation. Step 2: Solve the padding equation: The total magnetic field error matrix is ​​obtained by comparing the actual measured magnetic field of the main magnetic pole at each cutting point radius with the physically designed magnetic field at that radius. This total error matrix includes the average field variation matrix at each cutting point. The first harmonic variation matrix β; A is the padding matrix A, which is the padding matrix A calculated based on the functional relationship of the magnetic field change caused by cutting at each cutting point of the main magnetic pole according to the finite element model; X is the cutting amount matrix, which is the matrix of the cutting amount required for each cutting point of each main magnetic pole calculated based on the known b and known A in order to eliminate the actual accelerator magnetic field error; ε is a perturbation of the equation, whose mathematical expectation is zero, and is considered to be zero when solving the equation; The cutting point, each cutting point, or every cutting point refers to the cutting point at the same radius on the two sides of the current magnetic pole. The specific process of step one is as follows: 1) Divide each of the two sides of the main magnetic pole into m cutting points along the radius; 2) Using finite element model simulation, m accelerator models are established by individually cutting the same unit thickness at m cutting points on the two sides of the first magnetic pole. At this time, the magnetic poles of the model no longer have symmetry after cutting, which will introduce mean field error and first harmonic error. The magnetic field of each of the m cut models is calculated and compared with the magnetic field of the model without cutting. The mean field error and first harmonic error introduced by cutting a unit thickness at each of the m cutting points can be calculated. 3) The finite element model calculation process is as follows: After cutting a unit thickness at the first cutting point of the first magnetic pole, a new magnetic field distribution is calculated. This new distribution is then compared with the magnetic field distribution before cutting, resulting in an average field error matrix. And obtain a first harmonic error matrix. Similarly, after cutting the same unit thickness at the second cutting point, the magnetic field distribution is calculated and compared with the magnetic field distribution before cutting to obtain the total error matrix b corresponding to the second cutting point. Then, for the m cutting points of the first magnetic pole, a total of m total error matrices b are obtained after calculation. This mean field difference matrix is ​​used express: ; The mean field error value is represented by the mean field difference matrix at the radius of the first cutting point. There are a total of m elements in the matrix, and the superscript T in the matrix brackets indicates the transpose of the matrix; Since the first harmonic has both magnitude and direction, phase decomposition is required to represent it; this first harmonic decomposition matrix is ​​represented by the first harmonic matrix β: ; This represents the amplitude of the first harmonic at the first cutting point. and This represents the first harmonic phase at the first cutting point, which is also the two elements of the first harmonic error matrix corresponding to each cutting point. The subscript m represents the first harmonic error matrix at different radii. There are a total of 2m elements, and the superscript T in the matrix brackets indicates the transpose of the matrix; Mean field error matrix and the first harmonic error matrix Coupling is represented by a total error matrix b, which is the total error matrix corresponding to the unit thickness cut by the first radius of the first magnetic pole. b is expressed as: (3); The superscript T denotes the transpose of the matrix, and the total error matrix b contains 3m elements; 4) Repeat steps 2) and 3) to cut each cutting point of the second, third, and fourth magnetic poles individually. Establish a total of 3m models for the three magnetic poles, calculate the magnetic field for each model, and compare it with the uncut model to obtain the total error matrix b for each model. Then, a total of 4m total error matrices b are obtained after cutting each of the four magnetic poles individually. These 4m total error matrices b correspond one-to-one with the 4m cutting amount matrices X after cutting each cutting point on the four magnetic poles individually, and will be used to solve the padding matrix A. 5) The cutting amount matrix X represents: the cutting amount of different padding blocks is represented by... Let p represent the p-th magnetic pole, m represent the index of the padding cutting point, and the superscript T denotes the transpose of the matrix. Then the total cutting amount matrix for the four magnetic poles can be represented as: ; For a finite element simulation model where a unit thickness is cut at the first cutting point of the first magnetic pole, its cutting amount matrix X is expressed as: ; Except for the first element which is a unit 1, the remaining 4m-1 elements are all 0. This is because in this model, only the first cutting point of the first magnetic pole is cut off. Therefore, the cutting amount matrix X of the above 4m model can be expressed separately, resulting in a total of 4m cutting amount matrices X. 6) Substitute the 4m cutting quantity matrices X and their corresponding 4m total error matrices b obtained from the finite element model into the following padding equations, resulting in a total of 4m sets of equations. Using linear algebra, all elements within the padding matrix A can be solved, thus obtaining the total padding matrix A of the main magnetic poles.

2. The method for simultaneously compensating for the mean field and first harmonic error of a cyclotron accelerator according to claim 1, characterized in that, The specific process of step two is as follows: 1) Establish the padding equation, the padding equation is as follows: ; Where b is the total error matrix obtained by measuring the magnetic field of the actual accelerator using a magnetic field measuring device. This total magnetic field error matrix b is the total error matrix obtained by coupling the average field error matrix and the first harmonic error matrix of each cutting point of the main magnetic pole. A is the padding matrix A, which is the padding matrix A calculated based on the finite element model. X is the cutting amount matrix, which represents the cutting amount required by the actual accelerator at each radius of each magnetic pole in order to eliminate its magnetic field error. Based on the padding equation, the cutting amount matrix X at different radii of different magnetic fields is solved based on the known b and A. 2) Measure the current magnetic field of each of the main magnetic poles along the radius at each cutting point; 3) Calculate the difference between the actual measured magnetic field at each cutting point and the theoretically designed magnetic field to obtain the average field difference value of the actual measured magnetic field at each cutting point; 4) The first harmonic magnetic field error actually measured at each cutting point is taken as the final first harmonic magnetic field error at that cutting point; 5) The total error matrix b of the main magnetic pole is composed of the average field difference value of each cutting point of the main magnetic pole measured in actual measurements and the first harmonic magnetic field error of each cutting point; 6) Given b and A, calculate the padding amount at different radii in different magnetic fields: ; At this point, we have: b: 3m 1st order matrix, :4 A first-order matrix, since: At this point, the system of equations is an underdetermined system of equations, and the equations have infinitely many solutions; where the superscript T indicates the transpose of the matrix; 7) The minimum orthogonalization method is used to solve the underdetermined equation system. Among all the solutions, only one is closest to the origin, which is the solution we are looking for. Therefore, the cutting amount matrix X at different magnetic poles and radii can be calculated.