Real-time online electromagnetic nondestructive testing of hardened layer depth in steel parts based on RBF artificial neural network
2026-04-06 07:40:26··#1
In heat treatment production, many control requirements are real-time, that is, to respond quickly to various phenomena on site. For example, in the process of high frequency quenching, the depth of hardened layer must be measured in time and the high frequency quenching process is adjusted accordingly to obtain qualified products. In recent years, the author has done some work on electromagnetic non-destructive testing of the depth of hardened layer of steel parts and developed the dwy-1 electromagnetic non-destructive testing instrument [1]. However, many difficulties were encountered in data processing and mathematical modeling, especially since the relationship between coercivity and depth of hardened layer is different for different materials and different heat treatment processes. A knowledge base needs to be established in advance, so real-time online detection cannot be achieved. To this end, we used artificial neural networks to establish the mapping relationship between coercivity and depth of hardened layer to realize real-time online non-destructive testing of the depth of hardened layer of steel parts. Artificial neural networks are a novel modeling tool because they have high nonlinear mapping, fast parallel distributed processing, fault tolerance, self-organization and self-learning capabilities. Unlike expert systems, which require prior knowledge base establishment, knowledge acquisition only requires sufficient training samples. A well-trained network stores knowledge in weight coefficients. Artificial neural networks can simulate complex input-output relationships of real systems and have strong nonlinear modeling capabilities, thus gaining increasingly widespread application [2]. Feedforward networks and feedback networks are two typical networks. Feedforward networks are mainly used to realize the mapping between input and output and function approximation; feedback networks are mainly used to obtain associative storage and optimization calculation. BP networks and RBF networks are two typical feedforward networks, but BP networks have disadvantages such as slow convergence speed and easy to get trapped in local minima. Although BP networks have introduced algorithms such as genetic algorithms, simulated annealing algorithms, and momentum factor adjustment, BP networks still have drawbacks when used for online detection [3]. Therefore, this paper applies the radial basis function network RBF (radial basis function), which is superior to BP networks in terms of both approximation capability and learning speed, and uses the network to complete quantitative identification in online real-time detection of electromagnetic nondestructive testing. In order to speed up the online detection, this paper uses the improved gram-schmidt orthogonalization method to optimize the network structure. The learning algorithm of the network [4] The RBF network is a single hidden layer feedforward network, which includes a self-adjusting processing unit in the hidden layer and a linear output unit in the output layer. That is, the hidden layer adopts a nonlinear transformation, and the transformation from the hidden layer to the output layer adopts a linear transformation. The basis function in the hidden layer adopts a radial symmetric function, which produces a localized response to the input stimulus, that is, the hidden unit makes a meaningful non-zero response only when the input falls in a very small specified region in the input space. Taking the multi-input single-output RBF network as an example, the activation function ai and the output ui of the hidden layer neuron i are respectively: The training method of the network RBF network is divided into two stages: the first stage is the selection of the radial basis function center; the second stage is the calculation of the weight w. Selection of the radial basis function center The selection of the radial basis function center value usually adopts the k-means clustering algorithm. It is an unsupervised learning algorithm, and its specific process can be described as follows: First, the initial values of the activation function centers cj (j=1,2,…,p, where p is the number of hidden layer nodes) of the hidden layer units are set to the initial p training samples. Then, all training samples are grouped according to the nearest cluster centers. If xi and cj satisfy minj||xi-cj||, then xi belongs to the set θj of cj (i.e., mj=mj+1, where mj represents the number of elements belonging to θj). Finally, the cluster center cj() is calculated. The commonly used method for calculating weights w is now the orthogonal least squares (OLS) method. For the case of nr samples, equation (2) can be written in matrix form: d = uw + e (3) where e is the error matrix e = [ε (1), ε (2), ..., ε (nr)]t, u is the output matrix of the hidden layer neuron u = [u1, u2, ..., up], ui is the output vector of the hidden layer neuron ui = [ui (1), ui (2), ..., ui (nr)]t, 1 ≤ i ≤ p, w is the output weight vector w = [w1, w2, ..., wp]t, and d is the expected output vector of n samples d = [d (1), d (2), ..., d (nr)]t. W is decomposed into orthogonal triangles (using the gram-schmidt orthogonalization algorithm). u=qr (4) Substituting equation (4) into (3) yields: d=qrw+e (5) Let rw=g, then equation (5) can be written as: d=qg+e (6) Based on the known q and d matrices, the unknown matrix g' in equation (6) can be obtained. Where g'= qtd Using the general method of solving linear equations, the weight matrix w can be obtained. mgs method optimizes network structure [4] The structural optimization of neural networks (i.e., the selection of the number of hidden nodes) has always been a difficult point. The number of hidden nodes in the commonly used network structure is very large, which easily causes the network to overlearn. The method of optimizing the network structure using the mgs method proposed in reference [4] was adopted: First, let the number of hidden nodes p equal to the number of samples nr. Then, when t=1, calculate the error compression ratio [err]k(t)=g2k/(dtd) (k=1,2,…, nr). Find [err]k1(t) = max{[err]k(t), 1≤k≤nr}, and select q1=qk. When t=h, repeat the above loop and find: [err]kh(t)= max{[err]k(t), 1≤k≤nr, k≠k1,…,k≠kh-1}, and select qh=qkh. If the above loop is true at t=ps, then the process ends. ps is the number of hidden nodes after optimization. Where 0<ρ<1 is the selected tolerance, t is the number of loops, and qk is the vector of the orthogonal matrix q in equation (6). Electromagnetic detection principle [1] The magnetic circuit model of the magnetic detector is shown in Figure 1. A ∩-shaped electromagnet is placed on the surface of the workpiece to be tested. A Hall sensor is placed in the middle of the electromagnet to measure the magnetic induction intensity in the electromagnet. When the excitation coil is energized by DC, the electromagnet and the workpiece to be tested form a closed magnetic circuit. During the measurement, the workpiece is first locally magnetized by the saturated excitation current im, and then the reverse demagnetizing current ic is passed. When the reverse current increases to make the magnetic induction intensity br=0, the corresponding reverse current value ic is measured. According to the literature [1], by measuring the ic value of different hardened layer depths under the same quenching conditions, the hardened layer depth under this quenching condition can be determined. [align=center] Figure 1 Magnetic circuit model of magnetic detector [/align] The principle block diagram of the test system is shown in Figure 2. The microcontroller controls the magnetization current controller according to the output signal of the Hall sensor, so as to input DC current into the excitation coil. When the reverse current increases to make the output voltage of the Hall sensor zero, the microcontroller transmits the reverse current value (ic) at this time to the upper microcomputer as the input of the neural network. The trained neural network can output the specific value of the hardened layer depth based on this input, thereby realizing online real-time detection of the hardened layer depth. [align=center] Figure 2 Schematic diagram of the test system[/align] Application Example The author's prototype DWY-1 electromagnetic non-destructive testing instrument, using an improved gram-schmidt method optimized RBF artificial neural network as the signal processing system, was used to perform non-destructive testing of the hardened layer depth of crankshafts produced by a certain factory. The crankshaft material is 47MnTi induction hardening, tempered at 180℃~220℃, and the required hardened layer depth at HRC45 is 5~5.5mm. The author randomly selected 30 workpieces from the production site. First, the hardness method, i.e., the hardness tester, was used to measure the hardened layer depth of all workpieces. Then, the DWY-1 electromagnetic non-destructive testing instrument was used for measurement. 12 workpieces were used as training samples, and the other 18 workpieces were used as test samples, with a learning rate of 0.01. The test results are shown in the attached table. It can be seen that the measurement error of no more than 0.2 mm fully meets the needs of actual production. Appendix: Hardened layer depth values measured by the two methods (unit: mm) Conclusion The experiment shows that the DWY-1 electromagnetic non-destructive testing instrument, which uses an optimized RBF artificial neural network with the improved gram-schmidt method as the signal processing system, meets the needs of actual production in terms of both the detection accuracy of the hardened layer depth and the network convergence speed, providing a possibility for real-time online non-destructive testing of the hardened layer depth of steel parts.