A defect leakage magnetic field detection method based on discretized magnetic charge density field calculation

Through the discrete magnetic charge density field calculation method, complex defects are divided and magnetic charge density value calculation are eliminated to eliminate the impact of surface leakage, solving the problem of low detection efficiency and accuracy of complex defects in the prior art, and achieving fast and accurate magnetic leakage signal calculation.

CN117709054BActive Publication Date: 2025-08-22SHANGHAI UNIVERSITY OF ELECTRIC POWER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311469579.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-07
Publication Date
2025-08-22
Estimated Expiration
2043-11-07

AI Technical Summary

Technical Problem

The prior art is difficult to quickly and accurately calculate the leakage magnetic signals of complex irregular defects, resulting in low efficiency and accuracy of complex defect detection.

Method used

The discrete magnetic charge density field calculation method is used to separate the defects of any shape in three-dimensional form, forming N×N rectangular groove units magnetic dipole bands, calculate the magnetic charge density values ​​of each magnetic dipole band, and eliminate the influence of surface leakage. Finally, the leakage magnetic field is superimposed on the sampling plane to obtain the leakage magnetic field of the entire defect.

Benefits of technology

It realizes the rapid and accurate calculation of the leakage magnetic signals of complex defects, reduces the calculation amount, improves detection efficiency and accuracy, and reduces the impact of surface leakage on the calculation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117709054B_ABST
    Figure CN117709054B_ABST
Patent Text Reader

Abstract

The present invention relates to a defect leakage magnetic field detection method based on discretized magnetic charge density field calculation, comprising the following steps: segmenting a three-dimensional defect of arbitrary shape to obtain N×N rectangular slot unit magnetic dipole strips; forming the defect's magnetic charge density field from each magnetic dipole strip, and calculating the magnetic charge density value corresponding to each magnetic dipole strip; eliminating the influence of surface leakage on the calculated result of the defect's magnetic charge density field to obtain the magnetic charge density field of the entire defect; and combining a unit magnetic dipole strip superposition model to superimpose the leakage magnetic fields of the N×N magnetic dipole strips at each point on a sampling plane to obtain the leakage magnetic field of the entire defect. Compared with the prior art, the present invention addresses the complexity of calculating magnetic charge density in complex defect leakage magnetic field signals by discretizing the defect's magnetic charge density field, with each unit magnetic dipole strip corresponding to a magnetic charge density value. This discretized magnetic charge density field calculation not only effectively reduces the computational effort but also enables rapid and accurate calculation of the complex defect's magnetic leakage magnetic field signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of nondestructive testing, and in particular to a defect leakage magnetic field detection method based on discrete magnetic charge density field calculation. Background Art

[0002] Nondestructive testing uses the acoustic, optical, magnetic and electrical properties of matter to detect whether there are defects or unevenness in the object being tested, and provide information such as the size, location, nature and quantity of the defects without damaging or affecting the performance of the object being tested.

[0003] At present, the forward modeling research for non-destructive detection of irregular defects is mainly divided into two categories: finite element model and magnetic dipole analytical model. Finite element modeling is suitable for boundary conditions of complex geometric shapes and material defects, with high accuracy, but with long calculation time and high cost. Magnetic dipole analytical model is a commonly used mathematical technique used to simulate the leakage magnetic signal of defects. It requires solving Maxwell's equations with appropriate boundary conditions. This method has fast calculation speed and low cost, but has low accuracy and cannot be used to calculate defects with complex shapes.

[0004] When the magnetic dipole analytical model is used for regular defects, it mainly involves the calculation of the magnetic charge density of slot-shaped regular defects. Usually, when a magnetic field is applied in the axial direction, the magnetic charge density is assumed to be a constant value, and the magnetic charge density calculation formula is given by the width and depth of the defect. In terms of the application of complex defects, the analytical model of complex defect leakage detection, for the calculation of magnetic charge density, mostly simply approximates the magnetic charge in the non-defect area to be a constant, and assumes that the magnetic charge density accumulated on the defect surface near the defect is a constant, which makes the signal calculation error larger. In addition, existing studies have also proposed an improved magnetic dipole model and designed a calculation formula for the induced magnetic charge density, but the calculation formula is in integral form, and the calculation process is difficult to implement in practical applications.

[0005] In summary, when faced with complex irregular defects, existing technologies find it difficult to quickly and accurately calculate the corresponding magnetic flux leakage signals, and therefore cannot detect complex defects efficiently and accurately. Summary of the Invention

[0006] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a defect leakage magnetic field detection method based on discretized magnetic charge density field calculation, which can quickly and accurately calculate the leakage magnetic field signal of complex defects, thereby improving the efficiency and accuracy of complex defect detection.

[0007] The object of the present invention can be achieved by the following technical solution: A defect leakage magnetic field detection method based on discretized magnetic charge density field calculation comprises the following steps:

[0008] S1. Divide the three-dimensional arbitrary shape defect to obtain N×N rectangular slot unit magnetic dipole strips;

[0009] S2. Calculate the magnetic charge density value corresponding to each magnetic dipole band based on the defect magnetic charge density field formed by each magnetic dipole band;

[0010] S3. Eliminate the influence of surface leakage on the calculation results of the magnetic charge density field of the defect and obtain the magnetic charge density field of the entire defect;

[0011] S4. Combined with the unit magnetic dipole strip superposition model, the leakage magnetic field of N×N magnetic dipole strips is superimposed at each point on the sampling plane to obtain the leakage magnetic field of the entire defect.

[0012] Furthermore, in step S1 , each magnetic dipole strip is represented by its center point.

[0013] Furthermore, the specific process of step S1 is as follows:

[0014] The three-dimensional arbitrary shape defect is divided into N×N rectangular slot unit magnetic dipole strips, each magnetic dipole strip corresponds to a depth value, and the outline of the complex defect forms an N×N depth matrix D:

[0015]

[0016] The center point of each unit magnetic dipole strip is used as its replacement, and the sampling plane is divided into N×N unit grids accordingly.

[0017] Furthermore, the step S2 specifically calculates the magnetic charge density value corresponding to each magnetic dipole band using the center point coordinates.

[0018] Furthermore, step S2 includes the following steps:

[0019] S21. Convert the depth matrix D from an N×N matrix to a 1×N matrix 2 vector d;

[0020] S22, set the magnetization intensity along the axial direction and determine the unit vector The axial component I x ;

[0021] S23. Combined unit vectors The axial component I x , and the set magnetization intensity value applied to the magnetic dipole strip, the magnetic charge density value corresponding to the magnetic dipole strip is calculated.

[0022] Furthermore, the calculation formula for the magnetic charge density corresponding to the magnetic dipole band in step S23 is:

[0023] δ'=I x M x

[0024]

[0025]

[0026] Among them, (x' m ,y' m ,z' m ) is the coordinate of the mth sampling point, d k is the depth of the kth magnetic dipole zone, and the range of m and k is (1~N 2 ), M is the applied magnetization.

[0027] Furthermore, the step S3 specifically subtracts the magnetic charge density value existing on the surface of the sample when there is no defect from the magnetic charge density value corresponding to the magnetic dipole band, so as to eliminate the influence of surface leakage on the calculation result of the magnetic charge density field of the defect.

[0028] Furthermore, the calculation formula of the magnetic charge density field of the entire defect in step S3 is:

[0029] δ=δ'-δ0

[0030] δ0=I 0x M x

[0031]

[0032]

[0033] Where δ0 is the magnetic charge density on the surface of the sample when there is no defect, I 0x is the axial component of the unit vector of each magnetic dipole band to each sampling point when the defect depth is 0.

[0034] Furthermore, the specific process of step S4 is as follows:

[0035] The leakage magnetic field of each magnetic dipole strip to each sampling point is calculated, and the leakage magnetic field of N×N magnetic dipole strips is superimposed at each point on the sampling plane to obtain the leakage magnetic field of the entire defect.

[0036] Furthermore, the unit magnetic dipole band superposition model in step S4 is:

[0037] The permanent magnet magnetizes the ferromagnetic specimen along the axial direction. The lift-off value of the leakage magnetic field sampling plane is h. Then the radial component of the magnetic flux density B at any point P on the sampling plane is z (P) is:

[0038]

[0039] Among them, δ ij Magnetic dipole band Sij The magnetic charge density, V ij Magnetic dipole band S ij volume, μ0 is the magnetic permeability, z' and z ij P and S respectively ij The radial coordinate of |PC ij | is the magnetic dipole band S ij The center point C ij The Euclidean distance to the sampling point P.

[0040] Compared with the prior art, the present invention has the following advantages:

[0041] The present invention takes into account that the magnetic charge distribution of complex contour defects is the key to the calculation of leakage magnetic signals. In order to accurately and quickly calculate the leakage magnetic signals of complex contour defects, a calculation scheme for the discretized magnetic charge density field is proposed. The magnetic charge density field of the defect is discretized so that each unit magnetic dipole band corresponds to a magnetic charge density value. The magnetic charge density components of each magnetic dipole band to all sampling points are calculated, and the magnetic charge density components of each magnetic dipole band corresponding to all sampling points are superimposed to finally obtain the discretized magnetic charge density field of the entire defect. This not only reduces the amount of calculation, but also can quickly and accurately calculate the leakage magnetic signals of complex defects.

[0042] The present invention also takes into account the influence of leakage on the sample surface near the defect and leakage on the defect surface parallel to the sample surface on the magnetic charge density. Therefore, when calculating the magnetic charge density of the defect, it is designed to offset the influence of surface leakage on the calculation results, which can further improve the accuracy of the magnetic charge density calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 Schematic diagram of the method flow of the present invention;

[0044] Figure 2 Schematic diagram of the process of using the unit magnetic dipole band superposition model of the discretized magnetic charge density field in the embodiment;

[0045] Figure 3 Schematic diagram of the outline of the complex defect used in the embodiment;

[0046] Figure 4 A diagram showing the results of using a discretized magnetic charge density field calculation method for three-dimensional irregular defects in an embodiment;

[0047] Figure 5 This is a diagram showing the radial component of a complex defect leakage magnetic field prediction signal using a unit magnetic dipole band superposition model and COMSOL software using two magnetic charge density calculation methods in the embodiment;

[0048] Figures 6a to 6c Comparison of radial components at different widths of the embodiment;

[0049] Figures 7a to 7c Comparison of radial components at different depths of the embodiment;

[0050] Figures 8a to 8c Comparison of radial components at different lift-off values ​​in the embodiment;

[0051] Figures 9a to 9d 1 is the result of reconstructing the estimated contour of the defect using four different optimization algorithms when the unit magnetic dipole band superposition model of the constant method magnetic charge density is used as the forward model in the embodiment;

[0052] Figures 10a to 10d These are the estimated contour reconstruction results of the defect using four different optimization algorithms when the unit magnetic dipole strip superposition model of the discretized magnetic charge density field is used as the forward model in the embodiment. DETAILED DESCRIPTION

[0053] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0054] Example

[0055] like Figure 1 As shown, a defect leakage magnetic field detection method based on discretized magnetic charge density field calculation includes the following steps:

[0056] S1. Divide the three-dimensional arbitrary shape defect to obtain N×N rectangular slot unit magnetic dipole strips;

[0057] S2. Calculate the magnetic charge density value corresponding to each magnetic dipole band based on the defect magnetic charge density field formed by each magnetic dipole band;

[0058] S3. Eliminate the influence of surface leakage on the calculation results of the magnetic charge density field of the defect and obtain the magnetic charge density field of the entire defect;

[0059] S4. Combined with the unit magnetic dipole strip superposition model, the leakage magnetic field of N×N magnetic dipole strips is superimposed at each point on the sampling plane to obtain the leakage magnetic field of the entire defect.

[0060] This proposal proposes a discretized magnetic charge density field calculation method for determining the magnetic charge distribution of complex defects. Considering that magnetic flux leakage detection involves both forward and inverse modeling, an effective and accurate forward model is essential for solving the problem. Furthermore, the magnetic charge distribution of complex contour defects is key to calculating the magnetic leakage signal. To accurately and quickly calculate the magnetic leakage signal of complex contour defects, a discretized magnetic charge density field calculation method is proposed. This method not only reduces the computational effort but also enables the rapid and accurate calculation of the magnetic leakage signal of complex defects.

[0061] Figure 2 The process of the discretized magnetic charge density field calculation method for determining the magnetic charge distribution of complex defects provided in this embodiment includes:

[0062] Step 1: segment the three-dimensional arbitrary shape defect, and each magnetic dipole band is represented by its center point;

[0063] Step 2: The magnetic charge density values ​​of each magnetic dipole band are different, forming a magnetic charge density field, and calculating the magnetic charge density values ​​corresponding to each magnetic dipole band;

[0064] Step 3: Eliminate the influence of surface leakage on the calculation results of the magnetic charge density field of the defect and obtain the magnetic charge density field of the entire defect;

[0065] Step 4: Combine the unit magnetic dipole strip superposition model and superimpose the leakage magnetic fields of N×N magnetic dipole strips at each point on the sampling plane to obtain the leakage magnetic field of the entire defect.

[0066] The main principles and specific processes involved in the above steps include:

[0067] Given the nonlinear properties of ferromagnetic materials, the charge distribution of the irregular defect dipole bands must be known to accurately determine the leakage magnetic field of complex defects. For three-dimensional regular defects, the charge density is often assumed to vary linearly with depth. Because the depth is constant, it is usually set to a constant value. Unlike regular defects, the calculation of the charge density of complex defects is improved in this solution in two aspects:

[0068] 1) Due to the complex contour, the magnetic charge density of three-dimensional irregular defects is not a constant. The change of magnetic charge density should be considered in the calculation. The concept of magnetic charge density field is proposed and discretized to facilitate the calculation.

[0069] 2) The influence of leakage on the sample surface and defective surface should be considered during calculation to improve the accuracy of magnetic charge density.

[0070] Thus, a calculation method for the discretized magnetic charge density field suitable for complex defects is obtained.

[0071] First, the defect is divided into N 2 Each magnetic dipole band corresponds to a depth value. Therefore, the outline of the complex defect constitutes an N×N depth matrix D, that is, the defect is divided into N×N rectangular slot unit magnetic dipole bands. The depth matrix D is used to define the defect in the target area (region of interest, ROI) to be solved:

[0072]

[0073] The center point of each unit magnetic dipole is used as the replacement. At the same time, the sampling plane is also divided into N 2 The magnetic charge density of each unit magnetic dipole strip is calculated using the center coordinates. Each magnetic dipole strip corresponds to a magnetic charge density value:

[0074]

[0075] Among them, (x ij ,y ij ,z ij ) is the magnetic dipole band S ij Center point C ij The coordinates of C ij The unit vector to each sampling point, Magnetic dipole band S ij The applied magnetization.

[0076] For ease of calculation, the depth matrix D needs to be converted from an N×N matrix to a 1×N matrix. 2 The vector d, that is

[0077]

[0078] Assuming the magnetization intensity is along the axial direction, the unit vector The axial component I x for:

[0079]

[0080] in,

[0081]

[0082]

[0083] In the formula, (x' m ,y' m ,z' m ) is the coordinate of the mth sampling point, d k is the depth of the kth magnetic dipole zone, and the range of m and k is (1~N 2 ). M is the magnetization intensity applied to the entire model (set as a constant value), and is substituted into the calculation formula for magnetic charge density:

[0084] δ'=I x M x

[0085] Taking into account the influence of the leakage on the sample surface near the defect and the leakage on the defect surface parallel to the sample surface on the magnetic charge density, it is necessary to offset the influence of the surface leakage on the calculation results when calculating the magnetic charge density of the defect, that is, to subtract the magnetic charge density δ0 existing on the sample surface when there is no defect:

[0086] δ=δ'-δ0

[0087] Where δ0 is:

[0088] δ0=I 0x M x

[0089]

[0090]

[0091] I 0x is the axial component of the unit vector of each magnetic dipole band to each sampling point when the defect depth is 0.

[0092] In order to verify the feasibility of the discretized magnetic charge density field calculation method, Figure 3 The leakage magnetic field of the complex defect shown is predicted, and its magnetic charge density field and radial component are shown in Figure 4 and Figure 5 As shown, Figure 5 In the figure, the dotted line represents the predicted signal calculated by COMSOL software; the dashed line represents the predicted signal using the unit magnetic dipole band superposition model with constant magnetic charge density (referred to as the constant method); the solid line represents the predicted signal using the unit magnetic dipole band superposition model with discretized magnetic charge density field (referred to as the discrete method). Figure 5 It can be seen that the predicted signal of the discrete method is closer to the predicted signal calculated by COMSOL than the constant method.

[0093] The root mean square error (RMSE) between the two and the predicted signal calculated by COMSOL is calculated. The root mean square error formula between the predicted signal of the magnetic dipole band cluster model and the predicted signal calculated by COMSOL is:

[0094]

[0095] Among them B z (P i ) is the predicted signal of the unit magnetic dipole band superposition model at the i-th sampling point, B r (P i ) is the predicted signal calculated by COMSOL software at the i-th sampling point.

[0096] The root mean square error of the predicted signals of the two unit magnetic dipole band superposition models and the predicted signals calculated by COMSOL is shown in Table 1. The magnetic charge density of the constant method is taken as 3×10 6 In Table 1, the root mean square error of the discrete method is only one tenth of that of the constant method. Figure 5 It can be seen from Table 1 that the unit magnetic dipole strip superposition model using the discretized magnetic charge density field can better simulate the actual leakage magnetic field situation.

[0097] Table 1 Errors of predicted signals

[0098] Calculation method of magnetic charge density RMSE Discretized magnetic charge density field 0.0017 Constant method magnetic charge density 0.018

[0099] To verify the predictive performance of the established model, the effects of defect width, depth and lift-off value on the predicted leakage magnetic field were observed in the experiment and compared with the radial component calculated by COMSOL. Figures 6a to 6c The radial components of the leakage magnetic field are given when the lift-off value is 2 mm, the defect depth is 8 mm, and the defect width is 6 mm, 10 mm, and 14 mm respectively. Figures 7a to 7c The radial components of the leakage magnetic field are given when the lift-off value is 2 mm, the defect width is 10 mm, and the defect depths are 4 mm, 6 mm, and 8 mm respectively. Figures 8a to 8c The radial components of the leakage magnetic field are given when the defect depth is 8mm, the width is 10mm, and the lift-off values ​​are 1mm, 2mm, and 3mm respectively. Figures 6a to 6c 、 Figures 7a to 7c and Figures 8a to 8c In the figure, the dotted line represents the radial component calculated by COMSOL and used as the measured signal; the solid line represents the radial component calculated by the established model and used as the predicted signal. Figures 6a to 6c 、 Figures 7a to 7c and Figures 8a to 8c It can be seen that the radial component of the leakage magnetic field predicted by the constructed model is almost identical to that of COMSOL, and with the changes in defect depth, width, and lift-off value, the changing trends of the predicted signal and the measured signal are completely consistent, indicating that the constructed model has good prediction performance.

[0100] Accordingly, Table 2 gives Figures 6a to 6c 、 Figures 7a to 7c and Figures 8a to 8c The root mean square error between the predicted leakage magnetic field and the COMSOL calculation result is shown in Table 2. As can be seen from Table 2, the root mean square error of the predicted signal is maintained at 1×10 -3 to 7×10 -3 This shows that the prediction accuracy of the model is almost unaffected by the defect contour and lift-off value.

[0101] Table 2 Signal RMSE of different widths, depths and lift-off values

[0102] Defect width 6mm 10mm 14mm RMSE 0.0029 0.0023 0.0038 Defect depth 4mm 6mm 8mm RMSE 0.0012 0.0020 0.0018 Liftoff value 1mm 2mm 3mm RMSE 0.0065 0.0041 0.0047

[0103] In order to verify the feasibility of the proposed unit magnetic dipole band superposition model using discretized magnetic charge density field in defect inversion, the conjugate gradient method, Gauss-Newton method, LM algorithm and regularized Gauss-Newton method were used to conduct a three-dimensional defect reconstruction study. Figure 3 The complex defect reconstruction shown in the figure has the same initial conditions for the four algorithms. The initial defect is a regular defect and the depth is Figure 3 One half of the maximum depth of medium and complex defects.

[0104] Figures 9a to 9dis the reconstruction result when using the unit magnetic dipole strip superposition model with constant magnetic charge density; Figures 10a to 10d is the reconstruction result when the unit magnetic dipole strip superposition model of the discretized magnetic charge density field is used. The root mean square error and maximum depth error of the corresponding reconstruction results are shown in Tables 3 and 4. Figures 9a to 9d 、 Figures 10a to 10d It can be seen from Tables 3 and 4 that the reconstruction results of the magnetic charge density calculated using the discrete formula method are better than those calculated using the constant method.

[0105] To further verify the effectiveness of this technical solution, due to the ill-posedness of complex defect reconstruction, this embodiment defines the reconstruction error as the root mean square error, that is:

[0106]

[0107] In the formula To predict the defect contour, is the true defect outline.

[0108] At the same time, because the maximum depth of the defect will affect the safety and service life of the ferromagnetic material, the maximum depth error is also given:

[0109]

[0110] Where m is the thickness of the ferromagnetic material.

[0111] for Figure 3 The complex defects are reconstructed using Gauss-Newton method (GN), conjugate gradient method (CG), LM algorithm and adaptive regularized Gauss-Newton method (RGN), respectively. The results are shown in Tables 3 and 4.

[0112] Table 3 Root mean square error of defect reconstruction

[0113]

[0114] Table 4 Maximum depth error of defect reconstruction

[0115]

[0116] In Table 3, the root mean square error of the reconstruction results is shown: when the conjugate gradient reconstruction algorithm is used, the discretization method's error is 28% of that of the constant method; when the Gauss-Newton method is used, the discretization method's error is 60% of that of the constant method; when the LM algorithm is used, the discretization method's error is 24% of that of the constant method; and when the regularized Gauss-Newton method is used, the discretization method's error is 57% of that of the constant method. In Table 4, the maximum depth error of defect reconstruction is shown: when the conjugate gradient reconstruction algorithm is used, the discretization method's error is 5% of that of the constant method; when the Gauss-Newton method is used, the discretization method's error is 43% of that of the constant method; when the LM algorithm is used, the discretization method's error is 20% of that of the constant method; and when the regularized Gauss-Newton method is used, the discretization method's error is 79% of that of the constant method.

[0117] As can be seen from Tables 3 and 4, the defect reconstruction accuracy of the unit magnetic dipole strip superposition model using the discretized magnetic charge density field is higher than that of the unit magnetic dipole strip superposition model using the constant method magnetic charge density. It is obvious that when using the regularized Gauss-Newton algorithm, the reconstructed defect outline is consistent with the true defect outline, which verifies the feasibility and effectiveness of the discretized magnetic charge density field in complex defect reconstruction when used in the unit magnetic dipole strip superposition model.

[0118] In summary, this solution addresses the complexity of calculating magnetic charge density in leakage magnetic signals of complex defects. It proposes the concept of magnetic charge density field, discretizes the magnetic charge density field of the defect, and each unit magnetic dipole band corresponds to a magnetic charge density value. A method for calculating the discretized magnetic charge density field is proposed. The magnetic charge density components of each magnetic dipole band to all sampling points are calculated, and the magnetic charge density components of each magnetic dipole band corresponding to all sampling points are superimposed to eliminate the influence of surface leakage, thereby obtaining the discretized magnetic charge density field of the entire defect. The discretization of the magnetic charge density field reduces the computational cost of the model and improves the accuracy of signal reconstruction. When used in the unit magnetic dipole band superposition model, this solution can not only accurately calculate the leakage magnetic signal of a complex defect, but also has a shorter calculation time and lower computational complexity.

Claims

1. A defect leakage magnetic field detection method based on discretized magnetic charge density field calculation, characterized in that: The following steps are involved: S1. Divide the three-dimensional arbitrary shape defect to obtain N×N rectangular slot unit magnetic dipole strips; S2. Calculate the magnetic charge density value corresponding to each magnetic dipole band based on the defect magnetic charge density field formed by each magnetic dipole band; S3. Eliminate the influence of surface leakage on the calculation results of the magnetic charge density field of the defect and obtain the magnetic charge density field of the entire defect; S4. Combine the unit magnetic dipole strip superposition model and superimpose the leakage magnetic fields of N×N magnetic dipole strips at each point on the sampling plane to obtain the leakage magnetic field of the entire defect; In step S1, each magnetic dipole strip is represented by its center point. The specific process of step S1 is as follows: The three-dimensional arbitrary shape defect is divided into N×N rectangular slot unit magnetic dipole strips, each magnetic dipole strip corresponds to a depth value, and the outline of the complex defect forms an N×N depth matrix D: The center point of each unit magnetic dipole band is used as the replacement, and the sampling plane is also divided into N × N unit grids accordingly; Step S2 specifically calculates the magnetic charge density value corresponding to each magnetic dipole band using the center point coordinates. Step S2 includes the following steps: S21. Convert the depth matrix D from an N×N matrix to a 1×N matrix 2 vector d; S22, set the magnetization intensity along the axial direction and determine the unit vector The axial component I x ; S23. Combined unit vector The axial component I x , and the set magnetization intensity value applied to the magnetic dipole strip, the magnetic charge density value corresponding to the magnetic dipole strip is calculated; The calculation formula for the magnetic charge density corresponding to the magnetic dipole band in step S23 is: δ'=I x M x Among them, (x' m ,y' m ,z' m ) is the coordinate of the mth sampling point, d k is the depth of the kth magnetic dipole zone, and the range of m and k is (1~N 2 ), M is the applied magnetization; The specific process of step S4 is: Calculate the leakage magnetic field of each magnetic dipole band to each sampling point, and superimpose the leakage magnetic fields of N×N magnetic dipole bands at each point on the sampling plane to obtain the leakage magnetic field of the entire defect. The unit magnetic dipole band superposition model in step S4 is: The permanent magnet magnetizes the ferromagnetic specimen along the axial direction. The lift-off value of the leakage magnetic field sampling plane is h. Then the radial component of the magnetic flux density B at any point P on the sampling plane is z (P) is: Among them, δ ij Magnetic dipole band S ij The magnetic charge density, V ij Magnetic dipole band S ij volume, μ0 is the magnetic permeability, z' and z ij P and S respectively ij The radial coordinate of |PC ij | is the magnetic dipole band S ij The center point C ij The Euclidean distance to the sampling point P.

2. The defect leakage magnetic field detection method based on discretized magnetic charge density field calculation according to claim 1 is characterized in that: The step S3 specifically subtracts the magnetic charge density value existing on the surface of the sample when there is no defect from the magnetic charge density value corresponding to the magnetic dipole band, so as to eliminate the influence of surface leakage on the calculation result of the magnetic charge density field of the defect.

3. The defect leakage magnetic field detection method based on discretized magnetic charge density field calculation according to claim 2 is characterized in that: The calculation formula of the magnetic charge density field of the entire defect in step S3 is: δ=δ'-δ0 δ0=I 0x M x Where δ0 is the magnetic charge density on the surface of the sample when there is no defect, I 0x is the axial component of the unit vector of each magnetic dipole band to each sampling point when the defect depth is 0.