Rotating electromagnetic field surface corrosion defect inversion system, method and medium

By constructing a hybrid loss function of multi-dimensional magnetic field coupling feature tensor and dual gradient constraints, the problem of low accuracy in the three-dimensional morphology inversion of corrosion defects under complex working conditions in rotating electromagnetic field detection technology is solved, achieving high-precision corrosion defect detection with strong adaptability and low cost.

CN121955166BActive Publication Date: 2026-06-23CHINA UNIV OF PETROLEUM (EAST CHINA) +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNIV OF PETROLEUM (EAST CHINA)
Filing Date
2026-04-02
Publication Date
2026-06-23

Smart Images

  • Figure CN121955166B_ABST
    Figure CN121955166B_ABST
Patent Text Reader

Abstract

The application discloses a kind of rotating electromagnetic field surface corrosion defect inversion system, method and medium, belong to corrosion defect quantitative detection technical field, including: rotating electromagnetic field excitation module, for generating rotating magnetic field excitation signal to be measured metal component surface;Triaxial magnetic field acquisition module is linked with rotating electromagnetic field excitation module, drives triaxial magnetic field sensor probe to complete the scanning of region to be measured;Characteristic tensor construction module receives triaxial magnetic field matrix output by triaxial magnetic field acquisition module;Loss function construction module constructs hybrid loss function;Inversion neural network module, output corrosion defect three-dimensional topography prediction result;Model deployment module, the inversion neural network optimal model of training completion is deployed to actual detection system.The application is coupled with characteristic tensor by constructing multidimensional magnetic field, combined with the hybrid loss function of double gradient constraint, solve the problem of low precision and poor anti-interference ability of corrosion defect three-dimensional topography inversion under complex working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a rotating electromagnetic field surface corrosion defect inversion system, method, and medium, belonging to the field of quantitative detection technology for corrosion defects. Background Technology

[0002] Surface corrosion of metal components is one of the core causes of equipment failure in fields such as power, petrochemicals, and rail transportation. Rotating electromagnetic field (MEF) detection technology has been widely used for qualitative detection of surface corrosion defects in metal components due to its advantages of non-contact detection, high efficiency, and omnidirectional defect detection. However, in existing technologies, MEF detection can mostly only identify the location and roughly determine the size of defects, and cannot perform high-precision quantitative inversion of the three-dimensional morphology of corrosion defects. The three-dimensional morphology of corrosion defects and the spatial magnetic field response signal of rotating electromagnetic fields have multiple nonlinear mapping relationships. The conventional inverse problem solution equations are ill-conditioned equations and do not have a unique solution. Artificial intelligence technology provides a feasible solution for this type of nonlinear inversion problem.

[0003] To address this technical problem, existing technologies, such as the Chinese invention patent with authorization announcement number CN119478298B, disclose a method for three-dimensional reconstruction of surface corrosion defects in a rotating electromagnetic field structure. This method employs a Pix2Pix network structure and constructs a hybrid loss function that combines data loss and physical loss. The physical loss is calculated based on two evaluation indicators: the maximum depth and volume of the corrosion defect. The loss is calculated using a maximum of 5 pixels and a maximum of 15 deviation points, respectively, to achieve three-dimensional reconstruction of corrosion defects under small sample conditions. This scheme improves the inversion accuracy in small sample scenarios to some extent, but it still has two obvious shortcomings: First, the scheme only uses the uniaxial magnetic field strength perpendicular to the component surface to construct the input features, without fully exploring the gradient features of the triaxial magnetic field, multi-axis coupling features and other deep information. When there are non-defect interferences such as oil stains and oxide scale on the component surface, the magnetic field signal distortion features are easily submerged by noise, and the inversion accuracy is less than 80% under complex working conditions. Second, the physical loss of this scheme only applies weight boosting to a fixed number of pixels with the largest deviation, and cannot adaptively identify defect areas based on the magnetic field gradient distribution. When the defect is irregular in shape and has multiple scattered corrosion points, it cannot cover the weight optimization of the entire defect area, resulting in low defect edge restoration accuracy and depth error generally exceeding 12%.

[0004] In addition, other mainstream corrosion defect inversion schemes generally suffer from three major defects: First, most of them only utilize the original amplitude information of single-axis or three-axis magnetic fields, without fully exploring deep features such as magnetic field gradients and multi-axis magnetic field coupling, resulting in poor robustness to interference from oil stains, oxide scale, etc. on the component surface; Second, the neural network training process only uses simple morphology error loss without introducing gradient constraints, resulting in low accuracy of defect edge and irregular morphology reconstruction, with depth errors generally exceeding 15%; Third, the loss weights for defect areas and non-defect areas are the same during training, making it impossible to prioritize the optimization of defect areas, further limiting the improvement of inversion accuracy. Summary of the Invention

[0005] The purpose of this invention is to propose a rotating electromagnetic field surface corrosion defect inversion system, method and medium. By constructing a multi-dimensional magnetic field coupled feature tensor and combining it with a hybrid loss function with dual gradient constraints, the technical problems of low accuracy and poor anti-interference ability in the three-dimensional morphology inversion of corrosion defects under complex working conditions are solved.

[0006] The rotating electromagnetic field surface corrosion defect inversion system of the present invention includes:

[0007] The rotating electromagnetic field excitation module is used to generate a rotating magnetic field excitation signal that acts on the surface of the metal component being tested.

[0008] The three-axis magnetic field acquisition module, linked with the rotating electromagnetic field excitation module, drives the three-axis magnetic field sensing probe to complete the scanning of the area to be measured through the clamping mechanism, and simultaneously acquires the coordinate information of the area to be measured and the original signals of the three-axis magnetic field (Bx, By, Bz), and outputs the three-axis magnetic field matrix.

[0009] The feature tensor construction module receives the three-axis magnetic field matrix output by the three-axis magnetic field acquisition module, and sequentially completes magnetic field normalization processing, magnetic field gradient feature calculation, and magnetic field coupling term calculation, and finally constructs a multi-dimensional magnetic field coupling feature tensor.

[0010] The loss function construction module is used to construct a hybrid loss function that includes shape error loss, geometric gradient matching loss, and comprehensive gradient weighting loss. The geometric gradient matching loss and comprehensive gradient weighting loss constitute a dual gradient constraint, which is used to optimize the training process of the inversion neural network.

[0011] The inversion neural network module receives the magnetic field coupling feature tensor output by the feature tensor construction module as input and outputs the three-dimensional morphology prediction result of the corrosion defect.

[0012] The model deployment module is used to deploy the trained optimal inversion neural network model to the actual detection system.

[0013] Preferably, the magnetic field normalization formula in the feature tensor construction module is:

[0014] B_k'=(B_k-min(B_k)) / (max(B_k)-min(B_k)), k=x,y,z;

[0015] Where: B_k' is the normalized magnetic field strength value in the k-th axis direction; B_k is the original magnetic field strength value collected in the k-th axis direction; min(B_k) is the global minimum value of all original magnetic field strength values ​​in the k-th axis direction; max(B_k) is the global maximum value of all original magnetic field strength values ​​in the k-th axis direction; k is the coordinate axis identifier, with values ​​x, y, and z corresponding to the three coordinate axis directions respectively.

[0016] Preferably, the multi-dimensional magnetic field coupling feature tensor output by the feature tensor construction module is a 12-dimensional magnetic field coupling feature tensor, with the following expression:

[0017] T=[Bx, By, Bz, Bx amplitude, By amplitude, Bz amplitude, Bx direction angle, By direction angle, [Direction angle Bz, Bx×By, Bx×Bz, By×Bz]

[0018] Where: Bx, By, and Bz are 3-dimensional normalized triaxial magnetic field strength characteristics; Bx、 By、 Bz is the characteristic amplitude of the 3D magnetic field gradient. Bx direction angle, By direction angle, The Bz direction angle is a 3D magnetic field gradient direction angle feature; Bx×By, Bx×Bz, and By×Bz are 3D magnetic field pairwise coupling features.

[0019] Preferably, the 3D magnetic field gradient direction angle feature is calculated using the atan2 two-parameter arctangent function, and its expression is:

[0020] θ=atan2( B / y, B / x);

[0021] Where: θ is the gradient direction angle of the target magnetic field component; B / y is the partial derivative of the target magnetic field component in the y-axis direction; B / x is the partial derivative of the target magnetic field component in the x-axis direction. The calculation results are mapped to the range of 0~2π radians to eliminate quadrant ambiguity.

[0022] Preferably, the expression for the ternary mixture loss function L_total in S3 is:

[0023] L_total=L_data+αL_geo_gradient+βL_total_gradient;

[0024] Where: L_total is the final mixture loss value; L_data is the L1 loss between the predicted and true topologies; L_geo_gradient is the mean square error between the geometric gradient matrices of the predicted and true topologies; L_total_gradient is the weighted error loss with the combined gradient matrix G_total as the point-by-point weight coefficient, expressed as:

[0025] ;

[0026] Where: Z_pred(i,j) is the predicted topographic depth value at coordinate point (i,j); Z_true(i,j) is the true topographic depth value at coordinate point (i,j); M is the total number of rows in the defect topographic matrix; N is the total number of columns in the defect topographic matrix; α is the weight coefficient of the geometric gradient matching loss; β is the weight coefficient of the comprehensive gradient weighted loss; because the defect region is larger than G_total(i,j), the corresponding loss weight is automatically increased, realizing priority optimization of the defect region and improving the inversion accuracy.

[0027] Preferably, the comprehensive gradient matrix G_total in the loss function construction module is the superposition of the gradient magnitudes of the three-axis magnetic field, and its expression is:

[0028] G_total(i,j)=| Bx(i,j)|+| By(i,j)|+| Bz(i,j)|;

[0029] Where: G_total(i,j) is the comprehensive gradient value at coordinate point (i,j) in the region to be measured; | Bx(i,j)| represents the gradient magnitude of the magnetic field component along the x-axis at the coordinate point (i,j); By(i,j) represents the gradient magnitude of the magnetic field component along the y-axis at the coordinate point (i,j); Bz(i,j)| represents the gradient magnitude of the magnetic field component along the z-axis at coordinate point (i,j); i is the row index of the magnetic field matrix, ranging from 1 to M, where M is the total number of rows in the magnetic field matrix; j is the column index of the magnetic field matrix, ranging from 1 to N, where N is the total number of columns in the magnetic field matrix.

[0030] The rotating electromagnetic field surface corrosion defect inversion method of the present invention, based on the rotating electromagnetic field surface corrosion defect inversion system, includes the following steps:

[0031] S1: Preprocessing of rotating electromagnetic field detection signal: drive the rotating electromagnetic field probe to complete the scanning of the metal structure under test, obtain the three-axis Bx, By, Bz magnetic field matrix, and normalize the magnetic field matrix to obtain the standardized magnetic field matrix.

[0032] S2: Construction of multi-dimensional magnetic field coupling feature tensor: Calculate the magnetic field gradient magnitude features, magnetic field gradient direction angle features, and pairwise magnetic field coupling terms of Bx, By, and Bz. Based on the standardized magnetic field matrix, magnetic field gradient features, and pairwise magnetic field coupling terms, construct the magnetic field coupling feature tensor.

[0033] S3: Design of a hybrid loss function with dual gradient constraints: Construct a ternary hybrid loss function consisting of "topography error loss + geometric gradient matching loss + comprehensive gradient weighted loss";

[0034] S4: Inversion Neural Network Training and Optimization: Train and optimize the inversion neural network to obtain the optimal inversion model;

[0035] S5: 3D Defect Morphology Reconstruction Output: Input the magnetic field coupling feature tensor of the region to be detected into the trained inversion neural network, and output the 3D morphology inversion result of the corrosion defect in the corresponding region.

[0036] Preferably, the inversion neural network adopts the Unet network structure, or adopts a convolutional neural network structure based on residual blocks.

[0037] Preferably, the training sample database of the inversion neural network is jointly constructed by the finite element simulation model and the experimental detection system, with a sample size of no less than 500 groups, covering corrosion defect samples of different sizes, shapes, and orientations.

[0038] The computer-readable storage medium of the present invention stores a computer program, which, when executed by a processor, implements the steps of the rotating electromagnetic field surface corrosion defect inversion method.

[0039] Compared with existing technologies, the rotating electromagnetic field surface corrosion defect inversion system, method, and storage medium of the present invention exhibit the following beneficial effects in terms of technical performance and practical application:

[0040] 1. Strong anti-interference capability: By constructing a 12-dimensional multi-dimensional coupled feature tensor containing the original magnetic field, gradient features, and coupling features, the deep information of magnetic field distortion is fully explored, which greatly improves the robustness to non-defect interference such as surface oil stains and oxide scale. The inversion accuracy can reach more than 95% under complex working conditions, which is more than 15 percentage points higher than the scheme disclosed in CN119478298B.

[0041] 2. High accuracy in morphology reconstruction: The introduction of dual gradient constraints consisting of geometric gradient matching loss and comprehensive gradient weighted loss ensures that the edge gradient of the defect morphology is consistent with the true value, and also adaptively increases the loss weight of the defect region through the weight of the magnetic field gradient, realizing priority optimization of the defect region. It does not require a fixed number of deviation pixels, can adapt to corrosion defects of any shape and any number, and the depth error of the inversion result can be controlled within 5% and the volume error does not exceed 4%, which is more than 60% more accurate than the existing scheme.

[0042] 3. The 12-dimensional coupled feature tensor integrates magnetic field strength, triaxial gradient magnitude, orientation angle and coupling terms to comprehensively capture the correlation information between magnetic field and defects. The network still achieves a defect recognition accuracy of ≥95% under complex working conditions such as oil stains and oxide scale, and its generalization ability is significantly better than traditional single feature input methods.

[0043] 4. High adaptability: This solution does not require any changes to the hardware structure of existing rotating electromagnetic field detection equipment. Deployment can be completed simply by upgrading the algorithm module of the detection software. It is compatible with the vast majority of commercial rotating electromagnetic field detection equipment, resulting in low promotion and application costs. Attached Figure Description

[0044] Figure 1 This is a flowchart of the rotating electromagnetic field surface corrosion defect inversion method in an embodiment of the present invention;

[0045] Figure 2 These are the normalized magnetic field matrix images of Bx, By, and Bz in this embodiment of the invention;

[0046] Figure 3 The images are the magnitude matrices of the magnetic field gradient features of Bx, By, and Bz in this embodiment of the invention.

[0047] Figure 4 The images shown are the magnetic field gradient feature direction angle matrix images of Bx, By, and Bz in this embodiment of the invention.

[0048] Figure 5 This is a matrix image of pairwise magnetic field coupling terms in an embodiment of the present invention;

[0049] Figure 6 This is an inversion image of corrosion defects output by the network in an embodiment of the present invention;

[0050] Figure 7This refers to the complex morphology erosion image that needs to be reconstructed in the embodiments of the present invention;

[0051] Figure 8 This is a diagram showing the result of reconstructing the prior art according to an embodiment of the present invention;

[0052] Figure 9 This is a diagram showing the reconstruction result of the present invention in an embodiment of the present invention. Detailed Implementation

[0053] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0054] Example 1:

[0055] The rotating electromagnetic field surface corrosion defect inversion system of the present invention includes:

[0056] The rotating electromagnetic field excitation module is used to generate a rotating magnetic field excitation signal that acts on the surface of the metal component being tested.

[0057] The three-axis magnetic field acquisition module, linked with the rotating electromagnetic field excitation module, drives the three-axis magnetic field sensing probe to complete the scanning of the area to be measured through the clamping mechanism, and simultaneously acquires the coordinate information of the area to be measured and the original signals of the three-axis magnetic field (Bx, By, Bz), and outputs the three-axis magnetic field matrix.

[0058] The feature tensor construction module receives the three-axis magnetic field matrix output by the three-axis magnetic field acquisition module, and sequentially completes magnetic field normalization processing, magnetic field gradient feature calculation, and magnetic field coupling term calculation, and finally constructs a multi-dimensional magnetic field coupling feature tensor.

[0059] The loss function construction module is used to construct a hybrid loss function that includes shape error loss, geometric gradient matching loss, and comprehensive gradient weighting loss. The geometric gradient matching loss and comprehensive gradient weighting loss constitute a dual gradient constraint, which is used to optimize the training process of the inversion neural network.

[0060] The inversion neural network module receives the magnetic field coupling feature tensor output by the feature tensor construction module as input and outputs the three-dimensional morphology prediction result of the corrosion defect.

[0061] The model deployment module is used to deploy the trained optimal inversion neural network model to the actual detection system.

[0062] The specific steps are as follows:

[0063] A robotic arm grips a rotating electromagnetic field probe to scan the structure under test, acquiring triaxial Bx, By, and Bz magnetic field matrices. These magnetic field matrices are then normalized to obtain a standardized magnetic field matrix, such as... Figure 2 As shown, compared with the single-axis Bz magnetic field matrix, the obtained three-axis magnetic field matrix can more comprehensively reflect the three-dimensional morphology of corrosion defects, making the inversion results of corrosion defects more accurate. Furthermore, normalizing the magnetic field matrix makes the inversion network more likely to converge.

[0064] Calculate the magnetic field gradient features and pairwise magnetic field coupling terms of Bx, By, and Bz. Based on the normalized magnetic field matrix, magnetic field gradient features, and pairwise magnetic field coupling terms, construct a 12-dimensional magnetic field coupling feature tensor T∈ X×Y×12 It provides multimodal input to the network; the 12-dimensional coupled feature tensor integrates magnetic field strength, triaxial gradient magnitude, orientation angle and coupling terms, and comprehensively captures the correlation information between magnetic field and defects. The network still achieves a defect inversion accuracy of ≥95% under complex working conditions such as oil stains and oxide scale, and its generalization ability is significantly better than traditional single feature input methods.

[0065] Furthermore, the Bx, By, and Bz magnetic field matrices have N rows and M columns; the normalization formula is:

[0066] B_k'=(B_k-min(B_k)) / (max(B_k)-min(B_k)), k=x,y,z;

[0067] Where: B_k' is the normalized magnetic field strength value in the k-th axis direction; B_k is the original magnetic field strength value collected in the k-th axis direction; min(B_k) is the global minimum value of all original magnetic field strength values ​​in the k-th axis direction; max(B_k) is the global maximum value of all original magnetic field strength values ​​in the k-th axis direction; k is the coordinate axis identifier, with values ​​x, y, and z corresponding to the three coordinate axis directions respectively.

[0068] Furthermore, the 12-dimensional magnetic field coupling characteristic tensor is:

[0069] T=[Bx,By,Bz, Bx amplitude, By amplitude, Bz amplitude, Bx direction angle, By direction angle, [Bz direction angle, Bx×By, Bx×Bz, By×Bz];

[0070] Specifically defined as:

[0071] The magnetic field strength characteristics are 3-dimensional: [Bx, By, Bz], which are the standardized triaxial magnetic field strength values;

[0072] 3D Magnetic field gradient characteristic amplitude: [ Bx amplitude, By amplitude, [Bz amplitude], where:

[0073] ;

[0074] 3D characteristic direction angle of magnetic field gradient: [ Bx direction angle, By direction angle, [Bz direction angle], where the direction angle is calculated as follows:

[0075] θ=atan2( B / y, B / x);

[0076] The range is mapped to 0~2π radians to avoid quadrant ambiguity; the direction angle is calculated using the two-parameter arctangent function atan2, covering the entire quadrant from 0 to 2π, avoiding quadrant ambiguity of the traditional atan function, and ensuring accurate extraction of edge features of defects in different orientations (lateral, longitudinal, and oblique).

[0077] The pairwise coupling terms of the magnetic field are 3-dimensional: [Bx×By, Bx×Bz, By×Bz], which are the pairwise products of the three-axis magnetic field strengths.

[0078] Magnetic field gradient characteristic magnitude matrix ( Bx amplitude, By amplitude, Bz amplitude) such as Figure 3 As shown, the characteristic direction angle matrix of the magnetic field gradient ( Bx direction angle, By direction angle, (Bz direction angle) such as Figure 4 As shown, the orientation angle is calculated using the two-parameter arctangent function atan2, covering the entire quadrant from 0 to 2π. This avoids the quadrant ambiguity of the traditional atan function and ensures accurate extraction of edge features of defects in different orientations (lateral, longitudinal, and oblique). The pairwise coupling term matrix of the magnetic field is as follows: Figure 5 As shown, (Bx×By, Bx×Bz, By×Bz) represents the pairwise product of the three-axis magnetic field strengths.

[0079] The 12-dimensional coupled feature tensor is input into a pre-trained surface corrosion defect inversion neural network, and the output is the predicted morphology of the corrosion defect, as shown below. Figure 6 As shown in the figure. The output corrosion defects have a depth error of 4% and a volume error of 3.5%.

[0080] Furthermore, the structure of the aforementioned surface corrosion defect inversion neural network is a Unet network, and the expression for the loss function L_total is:

[0081] L_total=L_data+αL_geo_gradient+βL_total_gradient;

[0082] Where: L_total is the final mixture loss value; L_data is the L1 loss between the predicted and actual shapes, measuring the overall shape deviation, and its expression is:

[0083] ;

[0084] L_geo_gradient is the mean square error between the geometric gradient matrix of the predicted morphology and the geometric gradient matrix of the actual morphology. The gradient characteristics of the constrained defect edges are consistent with the true values. The formula for calculating the geometric gradient matrix is:

[0085] ;

[0086] In the formula: G_geo(i,j) is the geometric gradient value of the topography at coordinate point (i,j); Z / x is the partial derivative of the topographic depth value in the x-direction; Z / y is the partial derivative of the topographic depth value in the y-direction;

[0087] ;

[0088] Where G_geo_pred is the geometric gradient matrix of the predicted shape, and G_geo_true is the geometric gradient matrix of the true shape.

[0089] L_total_gradient is the weighted error loss with point-by-point weights based on the comprehensive gradient matrix G_total, and its expression is:

[0090] ;

[0091] In the formula: Z_pred(i,j) is the predicted topographic depth value at coordinate point (i,j); Z_true(i,j) is the true topographic depth value at coordinate point (i,j); M is the total number of rows in the defect topographic matrix; N is the total number of columns in the defect topographic matrix.

[0092] The comprehensive gradient matrix G_total is defined as the superposition of the gradient magnitudes of the three-axis magnetic fields, and its expression is:

[0093] G_total(i,j)=| Bx(i,j)|+| By(i,j)|+| Bz(i,j)|;

[0094] Where: G_total(i,j) is the comprehensive gradient value at coordinate point (i,j) in the region to be measured; | Bx(i,j)| represents the gradient magnitude of the magnetic field component along the x-axis at the coordinate point (i,j); By(i,j) represents the gradient magnitude of the magnetic field component along the y-axis at the coordinate point (i,j); Bz(i,j)| represents the gradient magnitude of the magnetic field component along the z-axis at coordinate point (i,j); i is the row index of the magnetic field matrix, ranging from 1 to M, where M is the total number of rows in the magnetic field matrix; j is the column index of the magnetic field matrix, ranging from 1 to N, where N is the total number of columns in the magnetic field matrix.

[0095] Because the magnetic field gradient is larger in the corrosion defect region, the corresponding loss weight is automatically increased, realizing priority optimization of the defect region; α is the weight coefficient of geometric gradient matching loss; β is the weight coefficient of comprehensive gradient weighted loss; because G_total(i,j) is larger in the defect region, the corresponding loss weight is automatically increased, realizing priority optimization of the defect region and improving the inversion accuracy.

[0096] The method employs a dual constraint mechanism of "geometric gradient matching loss + comprehensive gradient weighted loss". Geometric gradient constrains the edge detail accuracy, while comprehensive gradient amplifies the area loss weight. This effectively avoids the problems of "edge blurring" and "depth distortion" in traditional methods, reduces the X / Y position deviation of the defect center, and meets the requirements of high-precision industrial-grade detection.

[0097] Furthermore, the rotating electromagnetic field database was obtained jointly from the simulation model and the experimental system, with a sample size of no less than 500.

[0098] For irregular corrosion defects, such as Figure 7 The scan was performed as shown, and the magnetic field matrices Bx, By, and Bz were obtained.

[0099] To further verify the technical effect of the present invention, the original magnetic field matrix of Bz was input into the pre-trained network according to the method in comparative patent 1 (CN119478298B), and the inversion result obtained is as follows. Figure 8 As shown, it can be seen that the method in patent 1 cannot achieve the inversion of irregular corrosion, and the details of length and depth cannot be reflected. The inversion depth error is 30%, and the volume error is 50%, which cannot meet the requirements of structural evaluation.

[0100] According to the scheme of this invention, the magnetic field gradient features of Bx, By, and Bz and pairwise magnetic field coupling terms are calculated to construct a 12-dimensional magnetic field coupling feature tensor. This tensor is then input into the network constructed in this invention, and the resulting inversion result is as follows: Figure 9As shown, the present invention can achieve accurate inversion of corrosion defects with complex morphology, and can obtain accurate results in all directions and at different depths, with the maximum depth error being 4.1% and the volume error being 3%.

[0101] Example 2:

[0102] like Figure 1 As shown, the rotating electromagnetic field surface corrosion defect inversion method of the present invention, based on the rotating electromagnetic field surface corrosion defect inversion system described in Example 1, includes the following steps:

[0103] S1: Preprocessing of rotating electromagnetic field detection signal;

[0104] A six-axis robotic arm drives a rotating electromagnetic field probe to perform a grid scan of the stainless steel component under test, acquiring a three-axis original magnetic field matrix of Bx, By, and Bz with a resolution of 100×100. First, a wavelet denoising algorithm is used to remove electromagnetic interference and mechanical vibration noise from the original magnetic field signal. Then, the magnetic field values ​​of each axis are mapped to the 0~1 interval according to the normalization formula to eliminate the influence of gain differences and excitation intensity fluctuations of different sensors, thus obtaining a standardized magnetic field matrix.

[0105] S2: Construction of multi-dimensional magnetic field coupling feature tensors;

[0106] Feature extraction is performed on the standardized three-axis magnetic field matrix: the gradient magnitude features of the three-axis magnetic fields Bx, By, and Bz are calculated using the 3×3 Sobel operator, and the gradient direction angle features of the three-axis magnetic fields are calculated using the atan2 two-parameter arctangent function and mapped to the 0~2π interval to eliminate quadrant ambiguity. Then, the pairwise coupling product terms of the three magnetic field components Bx×By, Bx×Bz, and By×Bz are calculated. The 3D standardized magnetic field features, 3D gradient magnitude features, 3D gradient direction angle features, and 3D coupling features are concatenated in sequence to finally construct a 12-dimensional magnetic field coupling feature tensor, which is used as the input of the inversion neural network.

[0107] S3: Design of a hybrid loss function with dual gradient constraints;

[0108] A ternary hybrid loss function is constructed: L_total = L_data + αL_geo_gradient + βL_total_gradient. Here, L_data is the L1 loss between the predicted and actual topographic features, constraining the overall topographic deviation; L_geo_gradient is the mean square error between the geometric gradient matrix of the predicted topographic feature and the geometric gradient matrix of the actual topographic feature, constraining the gradient features of the defect edges to be consistent with the true values; L_total_gradient is the comprehensive gradient matrix G_total obtained by superimposing the three-axis magnetic field gradients, and it is a weighted error loss with point-by-point weights, automatically increasing the loss weight of the defect region. The geometric gradient matching loss and the comprehensive gradient weighted loss together constitute a dual gradient constraint, ensuring both the accuracy of defect edge restoration and prioritizing the optimization of the defect region. In this embodiment, the weight coefficients α = 0.3 and β = 0.4.

[0109] S4: Inversion Neural Network Training Optimization;

[0110] A training dataset containing 600 samples was constructed, including 450 COMSOL finite element simulation samples covering circular, elliptical, square, and irregularly shaped corrosion defects with depths ranging from 1mm to 12mm and lengths from 5mm to 50mm. This dataset also includes 100 samples with surface oxide scale and oil contamination. The remaining 150 samples are experimental test samples obtained through actual testing of artificial corrosion blocks and decommissioned power transmission tower components. The inversion neural network uses a Unet architecture with 12 input channels and 1 output channel. It is trained using the Adam optimizer with an initial learning rate of 0.001, which decays to 0.5 every 20 epochs. The batch size is set to 8, and the total training iterations are 200 epochs until the loss function converges, yielding the optimal inversion model. The inversion neural network in this step can also be replaced with a custom convolutional neural network structure built based on residual blocks, both achieving similar inversion accuracy.

[0111] S5: Output of 3D morphological reconstruction of defects;

[0112] The 12-dimensional magnetic field coupling feature tensor of the region to be detected is input into the trained optimal inversion model, and the corrosion depth matrix of the corresponding region is output, which is converted into the three-dimensional morphology inversion result of corrosion defects.

[0113] The training sample database of the inversion neural network is jointly constructed by the finite element simulation model and the experimental detection system, with no less than 500 sets of samples, covering corrosion defect samples of different sizes, shapes and orientations.

[0114] The comparison of the detection performance of this embodiment under different working conditions with the existing technology CN119478298B is shown in Table 1 below:

[0115] Table 1. Comparison of detection performance between the present invention and existing technologies under different working conditions.

[0116]

[0117] Example 3:

[0118] The computer-readable storage medium of the present invention stores a computer program, which, when executed by a processor, implements the steps of the rotating electromagnetic field surface corrosion defect inversion method as described in Example 2.

[0119] The storage medium is a non-volatile storage medium such as the Flash memory of an embedded detection terminal, a hard disk of a cloud server, or a USB flash drive. The storage medium stores a computer program. When the computer program is executed by the ARM processor of the detection terminal or the CPU of the cloud server, it implements all the steps of the rotating electromagnetic field surface corrosion defect inversion method described in Example 2:

[0120] First, the acquired three-axis magnetic field matrix data is read, normalization processing and feature tensor construction are performed, and the generated 12-dimensional feature tensor is input into the inversion neural network model stored in the medium. Finally, the three-dimensional morphology inversion results of corrosion defects are output, providing quantitative data support for equipment operation and maintenance decisions. This medium can be directly integrated into existing rotating electromagnetic field detection equipment, and the detection function can be upgraded without modifying the hardware architecture.

[0121] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A rotating electromagnetic field surface corrosion defect inversion system, characterized in that, include: The rotating electromagnetic field excitation module is used to generate a rotating magnetic field excitation signal that acts on the surface of the metal component being tested. The three-axis magnetic field acquisition module, linked with the rotating electromagnetic field excitation module, drives the three-axis magnetic field sensing probe to complete the scanning of the area to be measured through the clamping mechanism, and simultaneously acquires the coordinate information of the area to be measured and the original signals of the three-axis magnetic field (Bx, By, Bz), and outputs the three-axis magnetic field matrix. The feature tensor construction module receives the three-axis magnetic field matrix output by the three-axis magnetic field acquisition module, and sequentially completes magnetic field normalization processing, magnetic field gradient feature calculation, and magnetic field coupling term calculation, and finally constructs a multi-dimensional magnetic field coupling feature tensor. The loss function construction module is used to construct a hybrid loss function that includes shape error loss, geometric gradient matching loss, and comprehensive gradient weighting loss. The geometric gradient matching loss and comprehensive gradient weighting loss constitute a dual gradient constraint, which is used to optimize the training process of the inversion neural network. The inversion neural network module receives the magnetic field coupling feature tensor output by the feature tensor construction module as input and outputs the three-dimensional morphology prediction result of the corrosion defect. The model deployment module is used to deploy the trained inversion neural network optimal model to the actual detection system; The multi-dimensional magnetic field coupling feature tensor output by the feature tensor construction module is a 12-dimensional magnetic field coupling feature tensor, expressed as: T=[Bx, By, Bz, Bx amplitude, By amplitude, Bz amplitude, Bx direction angle, By direction angle, [Direction angle Bz, Bx×By, Bx×Bz, By×Bz] Where: Bx, By, and Bz are 3-dimensional normalized triaxial magnetic field strength characteristics; Bx、 By、 Bz is the characteristic amplitude of the 3D magnetic field gradient. Bx direction angle, By direction angle, The direction angle Bz is a characteristic of the 3D magnetic field gradient direction angle; Bx×By, Bx×Bz, and By×Bz are the characteristics of pairwise coupling of the 3D magnetic field. The 3D magnetic field gradient direction angle feature is calculated using the atan2 two-parameter arctangent function, and the expression is: θ=atan2( B / y, B / x); Where: θ is the gradient direction angle of the target magnetic field component; B / y is the partial derivative of the target magnetic field component in the y-axis direction; B / x is the partial derivative of the target magnetic field component in the x-axis direction. The calculation results are mapped to the range of 0~2π radians to eliminate quadrant ambiguity. The expression for the hybrid loss function is: L_total=L_data+αL_geo_gradient+βL_total_gradient; Where: L_total is the final mixture loss value; L_data is the L1 loss between the predicted and true topologies; L_geo_gradient is the mean square error between the geometric gradient matrices of the predicted and true topologies; L_total_gradient is the weighted error loss with the combined gradient matrix G_total as the point-by-point weight coefficient, expressed as: ; Where: Z_pred(i,j) is the predicted topographic depth value at coordinate point (i,j); Z_true(i,j) is the true topographic depth value at coordinate point (i,j); M is the total number of rows in the defect topographic matrix; N is the total number of columns in the defect topographic matrix; α is the weight coefficient of the geometric gradient matching loss; β is the weight coefficient of the comprehensive gradient weighted loss; because the defect region is larger than G_total(i,j), the corresponding loss weight is automatically increased, realizing priority optimization of the defect region and improving the inversion accuracy.

2. The rotating electromagnetic field surface corrosion defect inversion system according to claim 1, characterized in that, The magnetic field normalization formula in the feature tensor construction module is as follows: B_k'=(B_k-min(B_k)) / (max(B_k)-min(B_k)), k=x,y,z; Where: B_k' is the normalized magnetic field strength value in the k-th axis direction; B_k is the original magnetic field strength value collected in the k-th axis direction; min(B_k) is the global minimum value of all original magnetic field strength values ​​in the k-th axis direction; max(B_k) is the global maximum value of all original magnetic field strength values ​​in the k-th axis direction; k is the coordinate axis identifier, with values ​​x, y, and z corresponding to the three coordinate axis directions respectively.

3. The rotating electromagnetic field surface corrosion defect inversion system according to claim 1, characterized in that: The comprehensive gradient matrix G_total in the loss function construction module is the superposition of the gradient magnitudes of the three-axis magnetic field, expressed as: G_total(i,j)=| Bx(i,j)|+| By(i,j)|+| Bz(i,j)|; Where: G_total(i,j) is the comprehensive gradient value at coordinate point (i,j) in the region to be measured; | Bx(i,j)| represents the gradient magnitude of the magnetic field component along the x-axis at the coordinate point (i,j); By(i,j) represents the gradient magnitude of the magnetic field component along the y-axis at the coordinate point (i,j); Bz(i,j)| represents the gradient magnitude of the magnetic field component along the z-axis at coordinate point (i,j); i is the row index of the magnetic field matrix, ranging from 1 to M, where M is the total number of rows in the magnetic field matrix; j is the column index of the magnetic field matrix, ranging from 1 to N, where N is the total number of columns in the magnetic field matrix.

4. A method for inverting surface corrosion defects using a rotating electromagnetic field, based on the rotating electromagnetic field surface corrosion defect inversion system according to any one of claims 1-3, characterized in that, Includes the following steps: S1: Preprocessing of rotating electromagnetic field detection signal: drive the rotating electromagnetic field probe to complete the scanning of the metal structure under test, obtain the three-axis Bx, By, Bz magnetic field matrix, and normalize the magnetic field matrix to obtain the standardized magnetic field matrix. S2: Construction of multi-dimensional magnetic field coupling feature tensor: Calculate the magnetic field gradient magnitude features, magnetic field gradient direction angle features, and pairwise magnetic field coupling terms of Bx, By, and Bz. Based on the standardized magnetic field matrix, magnetic field gradient features, and pairwise magnetic field coupling terms, construct the magnetic field coupling feature tensor. S3: Design of a hybrid loss function with dual gradient constraints: Construct a ternary hybrid loss function consisting of "topography error loss + geometric gradient matching loss + comprehensive gradient weighted loss"; S4: Inversion Neural Network Training and Optimization: Train and optimize the inversion neural network to obtain the optimal inversion model; S5: 3D Defect Morphology Reconstruction Output: Input the magnetic field coupling feature tensor of the region to be detected into the trained inversion neural network, and output the 3D morphology inversion result of the corrosion defect in the corresponding region.

5. The rotating electromagnetic field surface corrosion defect inversion method according to claim 4, characterized in that, The inversion neural network adopts the Unet network structure, or adopts a convolutional neural network structure based on residual blocks.

6. The rotating electromagnetic field surface corrosion defect inversion method according to claim 4, characterized in that, The training sample database of the inversion neural network is jointly constructed by the finite element simulation model and the experimental detection system, with a sample size of no less than 500 groups, covering corrosion defect samples of different sizes, shapes, and orientations.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the rotating electromagnetic field surface corrosion defect inversion method as described in any one of claims 4-6.