# A Novel Nonlinear Magnetic Equivalent Circuit Model for Magnetic Flux Leakage System
## 4 Nonlinear Solution of the MEC Model  
The fundamental theory of the MEC model is [PERSON]'s voltage law [25]. The permeances of the MEC model are connected by nodes similar to the electric circuit. The relations among the magnetic potential of the nodes, permeances, and flux are represented as follows:  
\[[F]=[P]^{-1}[\Phi] \tag{30}\]  
where \([F]\) is the magnetic potential matrix, \([P]\) is the permeance matrix, and \([\Phi]\) is the flux matrix. Equation (30) can also be shown in detail as follows:  
\[ \begin{bmatrix}F(1)\\ F(2)\\.\\.\\ F(n)\end{bmatrix} = \begin{bmatrix}P(1,1)&P(1,2)&.&.&P(1,n)\\ P(2,1)&P(2,2)&.&.&P(2,n)\\.&.&.&.\\.&.&.&.\\ P(n,1)&P(n,2)&.&.&P(n,n)\\ \end{bmatrix} ^{-1} \begin{bmatrix}\Phi(1)\\ \Phi(2)\\.\\.\\.\\.\\ \Phi(n)\end{bmatrix}  \tag{31}\]  
Figure 7: Schematic illustration of the fringing flux. where \(n\) is the total node number of the MEC model, \(F(i)\) is the magnetic potential of node \(i\), \(P(i,j)\) is the permeance between node \(i\) and node \(j\), and \(\Phi(i)\) is the flux of node \(i\). According to [PERSON]'s voltage law, if node \(i\) is connected to node \(j\), the permeance between these nodes is a negative number and is denoted as follows:  
\[P(i,j)=P(j,i)\ \ \ \ \ i\ \
eq\ j \tag{32}\]  
Moreover, the permeance located at the principal diagonal of the permeance matrix [\(P\)] as follows:  
\[P(i,i)=\sum_{ \begin{subarray}{c}k=1\\ k\
eq i\end{subarray} }^{n}-P(i,k) \tag{33}\]  
After the precise calculation of the magnetic potential matrix is performed, new flux \(\Phi_{new}\) and new flux density \(B_{new}\) between node \(i\) and node \(j\) can be calculated by the following Equations. \[\Phi_{new}=\left(F(i)-F(j)\right)P(i,j) \tag{34}\]  
\[B_{new}=\frac{|\Phi_{new}|}{S} \tag{35}\]  
where \(S\) represents the cross-sectional area through which \(\Phi_{new}\) flows. In the MEC model, permeabilities of magnetic permeances exhibit a nonlinear variation depending on the flux density. Therefore, iterative methods are employed to obtain the desired solution. In the iteration steps, the permeability values need to be updated according to the calculations. Discrete table data from the \(B\)-\(H\) curve are used for the update process. Data from the \(B\)-\(H\) curve shown in Figure 2 are used for all the magnetic elements in this process. The \(B\)-\(H\) table provides a fast and easy calculation method. Here, the portion of the \(B\)-\(H\) curve between two sample points is defined as a straight line. In the iteration steps, the \(H_{new}\) value is calculated using the \(B\)-\(H\) table data with the following equation:  
\[H_{new}=H_{(i-1)}+(B_{new}-B_{(i-1)})\frac{H_{(i)}-H_{(i-1)}}{B_{(i)}-B_{(i-1)}} \tag{36}\]  
In Equation (36), a derivative addition is defined to ensure rapid convergence of the algorithm. Thus, the new permeability of the magnetic permeances can be determined as follows:  
\[\mu_{new}=\frac{B_{new}}{H_{new}} \tag{37}\]  
The iterative process will end automatically when the iteration termination condition is met, which is as follows:  
\[\left|\frac{\mu^{(k)}-\mu^{(k-1)}}{\mu^{(k-1)}}\right|\leq\varepsilon \tag{38}\]  
where \(\varepsilon\) is the error limit, \(\mu^{(k)}\) is the permeability of the \(k\)th iterative process, and \(\mu^{(k-1)}\) is the permeability of the \((k-1)\)th iterative process. If the error condition is met, the result is considered convergent and saved for use. Exceptional cases may occur during algorithm operation. The algorithm might not reach the error limit and could fail to achieve the desired convergence, leading to an infinite loop. Setting a maximum number of iterations alongside the error limit would be beneficial in such instances. It should also be noted that such issues are not expected to arise in a thoroughly structured algorithm. The encountered problems are usually due to programming errors, inappropriate MEC structure, and/or incorrect matrix solutions. If such problems occur, the obtained results are invalid and cannot be used for verification.