# A Method for Detecting Surface Defects in Railhead by Magnetic Flux Leakage
## 3 Defect Detection Method
The main sensor is used to detect the magnetic field in the \(x\) and \(z\) directions, which is set in the middle below a yoke. The other four are auxiliary sensors, numbered 1, 2, 3, and 4, which are placed on both sides of the main sensor. The auxiliary sensors 1 and 2 are used to detect the magnetic field in the \(x\)-direction, and the auxiliary sensors 3 and 4 are used to detect the magnetic field in the \(z\)-direction. It can be proved that \(H_{x}(0,\,z)\) is the maximum and \(H_{z}(0,\,z)\) is 0. That is, when the main sensor is directly above the defect, regardless of the lift-off, the \(x\)-component of its signal is more significant than those of auxiliary sensors 1 and 2, and the \(z\)-component is smaller than that of auxiliary sensors 3 and more significant than that of auxiliary sensor 4. Therefore, the presence of defects can be determined by comparing the relative magnitudes of the sensors signals. Since this judgment is not based on the value of a sensor signal, but the relative values of different sensors signal, it is less affected by the change of the lift-off. Obviously, the signal difference between the main sensor and the auxiliary sensors should be as large as possible to improve the accuracy of detection because of other interferences. The distance between sensors affects the difference of signals, so the space of sensors should be set reasonably. \(H_{x0}(l)\) and \(H_{z0}(l)\) are the fitting curves of the main sensor in \(x\) and \(z\) components, \(H_{x1}(l)\)\(H_{x2}(l)\) are the fitted curves of the signals of auxiliary sensors 1 and 2 in the \(x\)-direction; \(H_{z3}(l)\) and \(H_{z4}(l)\) are the fitted curves of the signals of auxiliary sensors 3 and 4 in the \(z\)-direction. The distances between the main sensor and the auxiliary sensors 1 and 2 are both \(l_{1}\). The distances between the main sensor and the auxiliary sensors 3 and 4 are both \(l_{2}\). Obviously, if there is a defect at \(l_{0}\), \(H_{z}(l_{0})=0\), \(H_{x}(l_{0})\) is the maximum, \(H_{x}(l_{0})>H_{x1}(l_{0}-l_{1})\), \(H_{x}(l_{0})>H_{x2}(l_{0}+l_{1})\), \(H_{z}(l_{0})<H_{z3}(l_{0}-l_{2})\), \(H_{z}(l_{0})>H_{z4}(l_{0}+l_{2})\). \(H_{x}(x,z_{0})\) has two minimum points from Equation (1) and Figure 3. \((m_{1},z_{0})\) and \((m_{2},z_{0})\) are the two points coordinates, respectively, and \(m_{1}<0\), \(m_{2}>0\). Obviously, \(m_{1}\) and \(m_{2}\) are the installation position of the auxiliary sensors 1 and 2. When \(x<0\), the minimum point's \(x\)-coordinate of Equation (4) is close to that of Equation (1). To facilitate the account, take it as \(m_{1}\). \[Q_{x}(x,z_{0})=\frac{\sigma_{ms}}{2\pi}\left[\tan^{-1}\frac{b+z_{0}}{a+x}- \tan^{-1}\frac{z_{0}}{a+x}\right] \tag{4}\]  
The sensors are close to each other, and their lift-offs are about the same, so \(z_{0}\) is a constant. Take the derivative of Equation (4) to \(x\) and set it equal to 0:  
\[Q_{x}^{\prime}(x,z_{0})=0 \tag{5}\]  
Equation (5) is solved, and it is obtained that \(Q_{x}(x,\,z_{0})\) is minimum when \(x=-\left(a+\sqrt{bz_{0}+z_{0}^{2}}\right)\). Therefore, if the auxiliary sensor 1 is placed behind the main sensor and the distance is \(a+\sqrt{bz_{0}+z_{0}^{2}}\), the signal amplitude difference between the main sensor and the auxiliary sensor is the largest when the main sensor is directly above the defect. Figure 1:0 MFL of a defect. When \(x>0\), the minimum point's \(x\)-coordinate of Equation (6) is close to that of Equation (1). To facilitate the account, take it as \(m_{2}\). Figure 1:1  
Take the derivative of Equation (7) to \(x\) and set it equal to 0:  
Figure 1:2  
Equation (7) is solved, and it is obtained that \(G_{x}(x,\ z_{0})\) is minimum when \(x=a+\sqrt{bz_{0}+z_{0}}^{2}\). Therefore, if auxiliary sensor 2 is placed in front of the main sensor and the distance is \(a+\sqrt{bz_{0}+z_{0}}^{2}\), the signal amplitude difference between the main sensor and the auxiliary sensor is the largest when the main sensor is directly above the defect.