Method for transforming one-dimensional discrete axial magnetic field data points into a three-dimensional axisymmetric magnetic field

By using variable step-size 5-point numerical differentiation and spline curve fitting, the problems of low accuracy and error accumulation in the transformation from one-dimensional discrete axial magnetic field to three-dimensional axisymmetric magnetic field in the existing technology are solved, and higher accuracy three-dimensional magnetic field calculation is achieved.

CN115878948BActive Publication Date: 2026-05-01UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UNIV OF ELECTRONICS SCI & TECH OF CHINA
Filing Date
2022-12-19
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technologies suffer from low accuracy and error accumulation when transforming one-dimensional discrete axial magnetic field data points into three-dimensional axisymmetric magnetic fields. In particular, when calculating the approximate value of the first derivative, the variable step size 3-point numerical differentiation method used is not accurate enough, and the linear interpolation calculation has a large error, resulting in the final error superposition.

Method used

A method combining variable-step 5-point numerical differentiation with spline curve fitting is adopted. The axial magnetic field value of the point to be determined is obtained by linear interpolation, the approximate value of the first derivative is calculated by variable-step 5-point numerical differentiation, and the final approximate value of the derivative is obtained by spline curve fitting, thus avoiding the accumulation of errors.

Benefits of technology

It significantly improves the calculation accuracy of the radial component Br of the three-dimensional axisymmetric magnetic field, with a relative error of less than 6%, effectively avoiding error superposition and meeting practical needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115878948B_ABST
    Figure CN115878948B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of computational electromagnetics, specifically a method for transforming a one-dimensional axial magnetic field into a three-dimensional axisymmetric magnetic field. This invention uses two variable-step-size, four-point numerical differential calculations followed by averaging to approximate the first derivative at the point to be calculated. This avoids the problem that calculating four points once might not improve accuracy, and also avoids the overly complex formula of directly using five points. Furthermore, by using the approximate value of the first derivative at known coordinates combined with Spline curve fitting to estimate the approximate value of the first derivative at the point z to be calculated, the problem of error superposition is effectively avoided, resulting in a higher accuracy for the radial component B of the calculated three-dimensional axisymmetric magnetic field. r The results are closer to the theoretical values. This invention effectively solves the problems of low accuracy and error accumulation in the transformation from one-dimensional axial magnetic field to three-dimensional magnetic field, and provides strong support for magnetic field loading in the design of devices such as vacuum electronic devices, ion sources, and particle accelerators.
Need to check novelty before this filing date? Find Prior Art

Description

Transformation method from one-dimensional discrete axial magnetic field data points to three-dimensional axisymmetric magnetic field Technical Field

[0001] This invention belongs to the field of computational electromagnetics, specifically a method for transforming one-dimensional discrete axial magnetic field data points into a three-dimensional axisymmetric magnetic field, based on variable step size 5-point numerical differentiation and spline fitting. Background Technology

[0002] The interaction between charged particles and electromagnetic fields has always been a core issue in active electromagnetics, playing a crucial role in the design of devices such as vacuum electronic devices, ion sources, and particle accelerators. In studying this interaction, it is often necessary to introduce an external electromagnetic field to guide or constrain particle motion. A common method for applying magnetic fields involves obtaining a three-dimensional axisymmetric magnetic field distribution from a one-dimensional discrete axial magnetic field distribution during numerical simulation. However, this one-dimensional discrete axial magnetic field distribution is often derived from experimental measurements or calculations using electromagnetic calculation software. These discrete data points do not coincide with the grid points used in the numerical simulation. Therefore, transforming the known one-dimensional discrete axial magnetic field into a three-dimensional axisymmetric magnetic field at each grid point in three-dimensional space becomes a critical problem that must be solved during numerical simulation.

[0003] Based on the one-dimensional discrete axial magnetic field B z A conventional transformation method for solving the distribution of a three-dimensional axisymmetric magnetic field is as follows:

[0004] Step 1: Obtain the axial magnetic field B z Distribution along the z-axis. There are typically several methods:

[0005] (1) Obtained through experimental measurement results; (2) Obtained through calculation results from existing electromagnetic calculation software.

[0006] Let the known coordinates of the discrete data points (hereinafter referred to as known coordinates) be (z i B z (z i ), i = 0, 1, 2, ..., n, where z i Let B be the i-th known point on the z-axis. z (z i ) for z i One-to-one corresponding axial magnetic field values.

[0007] Step 2: Solve for the unknown point z, z∈[z0, z] using linear interpolation from the known coordinates obtained in Step 1. n The axial magnetic field value B at [location] z (z). The specific method is as follows:

[0008] Index the two known coordinates (z0, z0) adjacent to the point z0 using the magnitude of the point z0. i B z (z i )),(z i+1 B z (z i+1 The axial magnetic field value B at the point z to be determined can be calculated using equation (1). z (z).

[0009]

[0010] Step 3: Calculate the first derivative at the point z using the variable step-size 3-point numerical differentiation method. The approximate value is divided into the following two cases:

[0011] (1) z is an internal point to be determined.

[0012] When z is an interior point to be determined, the first derivative at that point can be calculated directly using the variable-step-size 3-point numerical differential. An approximation of z. The magnitude of z allows indexing two known coordinates adjacent to its position (zi). i B z (z i )),(z i+1 B z (z i+1 In addition to B calculated in step 2 z (z), the first derivative at the point z to be determined is calculated using equation (2). Approximate value.

[0013]

[0014] In equation (2) h i =zz i For z, z i The step size between, h i+1 =z i+1 -z is z i+1 The step size between z.

[0015] (2) z is the boundary point to be determined.

[0016] When z is a boundary point to be determined, the boundary point (z0, B) in the known coordinates is... z (z0)) or (z n B z (z n When the two points coincide, the corresponding formula in equation (3) is used to find the first derivative at point z. The approximate value is used to solve for the problem, where These represent the points z to be determined and the known coordinates (z0, B). z (z0)) and (z n B z (z n First derivative when they coincide Approximate value.

[0017]

[0018] Step 4: Apply the first derivative obtained in Step 3 at the point z to be determined. Substituting the approximate value into the divergence equation (4) of the magnetic field, we can obtain the magnitude of the radial component of the magnetic field at the point to be determined.

[0019]

[0020] B r Let be the radial component of the magnetic field vector B. The angular component of the magnetic field vector B is always 0; r, These are the radial coordinate variables and the angular coordinate variables in the cylindrical coordinate system, respectively.

[0021] This completes the calculation of the axial magnetic field B based on the known one-dimensional discrete magnetic field. z The goal of this method is to solve for the distribution of a three-dimensional axisymmetric magnetic field. The advantage of this method is that the formulas involved in the linear interpolation calculation method used in step 2 and the variable-step-size three-point numerical differentiation method used in step 3 are simple and easy to understand. However, this method has the following two disadvantages:

[0022] (1) The method calculates the first derivative in step 3. The variable step size 3-point numerical differentiation formula used when approximating the value only uses 3 points for numerical differentiation calculation. In most cases, the accuracy is not high enough and cannot meet the actual needs.

[0023] (2) In step 3, the method calculates the first derivative at the interior point. The approximation used the axial magnetic field value B at the point z to be determined, calculated in step 2. z (z), and the result calculated using linear interpolation in step 2 has a large error when the data exhibits nonlinear changes. Therefore, the final error in step 3 is the accumulation of the accuracy error of the numerical differentiation itself and the calculation error in step 2, resulting in a situation where the errors of steps 2 and 3 are superimposed, thus affecting the final obtained radial component B of the three-dimensional axisymmetric magnetic field. r The error is large. Summary of the Invention

[0024] To address the aforementioned problems and shortcomings, and to resolve the issues of low accuracy and error accumulation in existing methods for transforming one-dimensional discrete axial magnetic fields into three-dimensional magnetic fields, this invention provides a method for transforming one-dimensional discrete axial magnetic field data points into three-dimensional axisymmetric magnetic fields, based on a numerical differential calculation method using variable step-size 5-point numerical differentiation and spline fitting (as shown in Figure 1).

[0025] The transformation method from one-dimensional discrete axial magnetic field data points to a three-dimensional axisymmetric magnetic field involves the following steps:

[0026] Step 1: Obtain the axial magnetic field B z Distribution along the z-axis.

[0027] Let the known coordinates be (z) i B z (z i ), i = 0, 1, 2, ..., n, where z i Let B be the i-th known point on the z-axis. z (z i ) for z i One-to-one corresponding axial magnetic field values.

[0028] Step 2: Solve for the unknown point z, z∈[z0, z] using linear interpolation from the known coordinates obtained in Step 1. n The axial magnetic field value B at [location] z (z). The specific method is as follows:

[0029] Index the two known coordinates (z0, z0) adjacent to the point z0 using the magnitude of the point z0. i B z (z i )),(z i+1 B z (z i+1 The axial magnetic field value B at the point z to be determined is calculated using equation (1). z (z).

[0030]

[0031] Step 3: Calculate the z-axis in the known coordinates using the variable step size 5-point numerical differentiation method. i First derivative at i = 0, 1, 2, ..., n The approximate value is obtained by fitting a Spline curve to the point z to be determined. Approximate value.

[0032] (1)z i When the points are known internally, i.e., i = 2, 3, 4, ..., n-2.

[0033] First, use the known coordinates (z) i-2 B z (z i-2 )),(z i-1 B z (z i-1 )),(z i B z (z i )),(z i+1 B z (z i+1 z is calculated using equation (5). i First derivative approximation In the formula h i-2 =z i -z i-2 For z i ,z i-2 Step size; h i-1 =z i -z i-1 For z i ,z i-1 Step size; h i =z i+1 -z i For z i+1 , z i The step size between intervals.

[0034]

[0035] Then use the known coordinates (z) i-1 B z (z i-1 )),(z i B z (z i )),(z i+1 B z (z i+1 )),(z i+2 B z (z i+2 z is calculated using equation (6). i First derivative approximation In the formula h i-1 =z i -z i-1 For z i ,z i-1 Step size; h i =z i+1 -z i For z i+1 ,z iStep size; h i+1 =z i+2 -z i For z i+2 ,z i The step size between intervals.

[0036]

[0037] Finally, z is calculated using equation (7). i First derivative approximation

[0038]

[0039] (2)z i When the boundary points are known, i.e., i = 0, i = 1, i = n-1, i = n.

[0040] When i = 1, only equation (6) is used to calculate the first derivative at z1. approximation

[0041] When i = n-1, only equation (5) is used to calculate z. n-1 First derivative approximation

[0042] When i = 0, n, use the corresponding formula in equation (3) to calculate points z0, z1, z2, z3, z4, z5, z6, z7, z8, z9, z1, z1, z2, z1, z2, z3, z4, z5, z6, z7, z8, z9, z1, z2, z1, z2, z3, z4 ...3, z4, z3, z4, z3, z4, z3, z4, z3, z4, z3, z4, z3, z4, z3, z4, z3, z4, z3, z4, z3, z4, z n First derivative approximation

[0043]

[0044] (3) Then use the Spline curve to calculate the z-axis of the known coordinates. i First derivative at i = 0, 1, 2, ..., n The approximate value is fitted, and the first derivative at the point z is obtained by reverse calculation using the fitted curve. Approximate value.

[0045] Step 4: Apply the first derivative obtained in Step 3 at the point z to be determined. Substituting the approximate value into the divergence equation (4) of the magnetic field, we can obtain the magnitude of the radial component of the magnetic field at the coordinate point to be determined.

[0046]

[0047] B rLet be the radial component of the magnetic field vector B. The angular component of the magnetic field vector B is always 0, r, These are the radial coordinate variables and the angular coordinate variables in the cylindrical coordinate system, respectively.

[0048] This completes the calculation of the axial magnetic field B based on the known one-dimensional discrete magnetic field. z The distribution of data points is used to solve for the objective of three-dimensional axisymmetric magnetic field distribution.

[0049] Furthermore, in step 1, the axial magnetic field B is obtained. z The distribution along the z-axis is obtained through experimental measurements or through calculations using electromagnetic calculation software.

[0050] The significant advantages of this invention compared to existing technologies are:

[0051] (1) The ingenuity of this invention lies in the calculation of the first derivative. The variable-step 5-point numerical differentiation method used for approximation does not directly use all 5 points for calculation at once. Instead, it uses two variable-step 4-point numerical differentiation calculations and then takes the average as the first derivative at the point to be calculated. This approximation avoids the problem that calculating 4 points once might not improve accuracy, and also avoids the problem that directly using 5 points would make the formula too complicated.

[0052] (2) The first derivative is calculated in step 3 of this invention. The approximation did not use the axial magnetic field value B at the point z to be determined, which was calculated in step 2. z (z), but instead uses the first derivative at the known coordinates. The approximate value is combined with Spline curve fitting to estimate the first derivative at the point z to be determined. This approximates the value of B, so that no matter how large the calculation error is in step 2, the calculation result in step 3 will not be affected. In other words, it effectively avoids the error in B calculated in step 2. z The superposition of the error in (z) and the numerical differential error in step 3 results in the radial component B of the three-dimensional axisymmetric magnetic field calculated in step 4 being... r The result is closer to the theoretical value.

[0053] In summary, this invention effectively solves the problems of low accuracy and error accumulation when transforming existing one-dimensional discrete axial magnetic field data points into three-dimensional magnetic fields, providing strong support for magnetic field loading in the design of devices such as vacuum electronic devices, ion sources, and particle accelerators. Attached Figure Description

[0054] Figure 1 is a flowchart of the present invention;

[0055] Figure 2 shows the axial magnetic field B obtained in the embodiment. z Distribution along the z-axis;

[0056] Figure 3 shows the radial component B of the three-dimensional axisymmetric magnetic field obtained by analytical solution and conventional method in the embodiment. r Distribution comparison diagram and radial component B of the three-dimensional axisymmetric magnetic field solved by the two methods. r The relative error plot;

[0057] Figure 4 shows the radial component B of the three-dimensional axisymmetric magnetic field obtained by analytical solution and solution of the present invention in the embodiment. r Distribution comparison diagram and radial component B of the three-dimensional axisymmetric magnetic field solved by the two methods. r The relative error plot. Detailed Implementation

[0058] The present invention will now be described in further detail with reference to the embodiments and accompanying drawings.

[0059] The transformation method from one-dimensional discrete axial magnetic field data points to a three-dimensional axisymmetric magnetic field involves the following steps:

[0060] Step 1: Obtain the axial magnetic field B z Distribution along the z-axis.

[0061] This embodiment uses an analytical function to distribute and sample the axial magnetic field B. z The distribution along the z-axis is specifically a Gaussian-modulated cosine function. This facilitates the analysis of the reliability and accuracy of the calculations in this invention.

[0062] From the given Gaussian modulated cosine function, discrete data points with non-uniform step sizes are selected as known coordinates. The selected known coordinates (z...) i B z (z i The data points, i = 0, 1, 2, ..., n, are shown as circular data points in Figure 2, with a total of 121 coordinates, where n = 120. The x-coordinate of each circular data point is z. i Let B represent the i-th known point on the z-axis, with the corresponding ordinate B. z (z i ) indicates the relationship with z i One-to-one corresponding axial magnetic field value. For example: when i = 0 (z0, B z (z0))=(-24.993mm,-0.002916350122797T), when i=120 (z 120 B z (z 120 ))=(34.9835mm,0.003243320962793T).

[0063] Step 2: Solve for the unknown point z, z∈[z0, z2] using interpolation based on the known coordinates from Step 1. n The axial magnetic field value B at [location] z (z).

[0064] In this embodiment, z0 = -24.993 mm, z 120 = 34.9835mm, and the point z to be determined is one of 230 points randomly selected within the range of -24.993mm to 34.9835mm with a non-uniform step size. The axial magnetic field value B at point z is to be solved. z (z) is usually calculated using linear interpolation. The specific method is as follows:

[0065] Index the two known coordinates (z0, z0) adjacent to the point z0 using the magnitude of the point z0. i B z (z i )),(z i+1 B z (z i+1 The axial magnetic field value B at the point z to be determined is calculated using equation (1). z (z).

[0066] Step 3: Calculate the z-axis in the known coordinates using the variable step size 5-point numerical differentiation method. i First derivative at i = 0, 1, 2, ..., 120 The approximate value is obtained by fitting a Spline curve to the point z to be determined. Approximate value.

[0067] (1)z i When the points are known internally, i.e., i = 2, 3, 4, ..., 118.

[0068] First, use the known coordinates (z) i-2 B z (z i-2 )), (z i-1 B z (z i-1 )), (z i B z (z i )), (z i+1 B z (z i+1 z is calculated using equation (5). i First derivative approximation Then use the known coordinates (z) i-1 B z (z i-1 )), (zi B z (z i )), (z i+1 B z (z i+1 )), (z i+2 B z (z i+2 z is calculated using equation (6). i First derivative approximation Finally, z is calculated using equation (7). i First derivative approximation

[0069] (2)z i When the boundary points are known, i.e., i = 0, i = 1, i = 119, i = 120.

[0070] When i = 1, only equation (6) is used to calculate the first derivative at z1. approximation When i = 119, only equation (5) is used to calculate z. 119 First derivative approximation When i = 0, 120, use the corresponding formula in equation (3) to calculate points z0, z1, z2, z3 respectively. 120 First derivative approximation

[0071] Then, use a spline curve to calculate the z-axis of the known coordinates. i First derivative at i = 0, 1, 2, ..., 120 The approximate value is fitted, and the first derivative at the point z is obtained by reverse calculation using the fitted curve. Approximate value.

[0072] Step 4: Apply the first derivative obtained in Step 3 at the point z to be determined. Substituting the approximate value into the divergence equation (4) of the magnetic field, the magnitude of the radial component of the magnetic field at the coordinate point to be determined is obtained. Thus, the determination of the axial magnetic field B based on the known one-dimensional discrete value is achieved. z The objective is to solve for the distribution of a three-dimensional axisymmetric magnetic field.

[0073] Figure 3 shows the radial component B of the three-dimensional axisymmetric magnetic field obtained by analytical solution and conventional method in this embodiment. r Distribution comparison diagram and radial component B of the three-dimensional axisymmetric magnetic field solved by the two methods. r The relative error diagram; Figure 4 shows the radial component B of the three-dimensional axisymmetric magnetic field obtained by analytical solution and solution of the present invention in the embodiment.r Distribution comparison diagram and radial component B of the three-dimensional axisymmetric magnetic field solved by the two methods. r The relative error plot.

[0074] As shown in Figure 3, the radial component B of the three-dimensional axisymmetric magnetic field at the point to be determined, calculated using conventional methods in this embodiment, is... r The radial component B of the three-dimensional axisymmetric magnetic field calculated analytically. r In some areas, the relative error reached 200%, which clearly fails to meet the accuracy requirements. However, as shown in Figure 4, the radial component B of the three-dimensional axisymmetric magnetic field at the point to be determined using the present invention in this embodiment differs from the radial component B of the three-dimensional axisymmetric magnetic field calculated analytically. r It exhibits excellent consistency with very small relative error (maximum of 6%), significantly improving accuracy and effectively avoiding the influence of other component calculation results on radial component calculation results.

[0075] In summary, the effectiveness of this invention can be seen.

Claims

1. A method for transforming one-dimensional discrete axial magnetic field data points into a three-dimensional axisymmetric magnetic field, characterized in that, The specific steps are as follows: Step 1, Obtain the axial magnetic field exist Distribution of axes; assuming known coordinates are... ,in for On the axis A known point, To and One-to-one corresponding axial magnetic field values; Step 2: Solve for the unknown point using linear interpolation from the known coordinates in Step 1. Axial magnetic field value at Specifically, it means: through the point to be found The size index is used to find two known coordinates adjacent to its position. The point to be determined is calculated using equation (1). Axial magnetic field value at ; (1) Step 3: Calculate the known coordinates using the variable step size 5-point numerical differentiation method. First derivative The approximate value is obtained, and then the point to be found is obtained by fitting a Spline curve. First derivative Approximate value; (1) For known points inside, i.e. When; first use known coordinate points Calculate using equation (5) First derivative approximation In the formula for Step size; for Step size; for Step size; (5) Use the known coordinates again Calculate using equation (6) First derivative approximation In the formula for Step size; for Step size; for Step size; (6) Finally, calculate using equation (7) First derivative approximation ; (7)(2) For the known boundary points, i.e. When; when Only use equation (6) to calculate First derivative approximation ; when Only use equation (5) to calculate. First derivative approximation ; when Use the corresponding formula in equation (3) to calculate the points respectively. First derivative approximation , ; (3) Using the Spline curve to calculate the known coordinates First derivative Approximate values ​​are fitted, and the points to be found are obtained by reverse calculation using the fitted curve. First derivative Approximate value; Step 4: Apply the points to be determined obtained in Step 3 to the desired values. First derivative Substituting the approximate value into the divergence equation (4) of the magnetic field, we can obtain the magnitude of the radial component of the magnetic field at the coordinate point to be determined. (4) magnetic field vector radial component, magnetic field vector The angular component is always 0; 、 These are the radial coordinate variables and the angular coordinate variables in the cylindrical coordinate system, respectively.

2. The method for transforming one-dimensional discrete axial magnetic field data points into a three-dimensional axisymmetric magnetic field as described in claim 1, characterized in that: Obtaining the axial magnetic field in step 1 exist The distribution of the axes is obtained through experimental measurements or through calculations using electromagnetic calculation software.

Citation Information

Patent Citations

  • Rapid calculation method of axisymmetric electron optical system

    CN113821915A

  • Permanent magnet rotor static magnetic field measurement method, grating, tool and application thereof

    CN113945875A