# Fault Detection in Active Magnetic Bearings Using Digital Twin Technology
## 2 Materials and Methods
### Mathematical Model of AMB  
To analyze and design a controller, one must first determine the system's mathematical model [19]. An active magnetic bearing's (AMB) mathematical model includes a description of the system's forces and dynamics. The magnetic force on the rotor can be represented by the following equation [20]:  
\[\mathrm{F_{x}}=\mathrm{k_{i}}\mathrm{i_{x}}+\mathrm{k_{s}}\mathrm{x}\ \ \ \mathrm{in}\ \mathrm{x}\ \mathrm{direction} \tag{1}\]  
\[\mathrm{F_{y}}=\mathrm{k_{i}}\mathrm{i_{y}}+\mathrm{k_{s}}\mathrm{y}\ \ \ \mathrm{in}\ \mathrm{y}\ \mathrm{direction} \tag{2}\]  
Figure 1: The cross section of the AMB.  
where, \(\rm F_{x,y}\) is the magnetic force in \(\rm x,y\) direction, \(\rm i_{x,y}\) control current in \(\rm x,y\) direction, \(\rm x,y\) is displacement of the rotor form its original position in \(\rm x,y\) direction, \(\rm k_{i}\) is current gain, and \(\rm k_{s}\) is position stiffness. The current gain and position stiffness can be calculated by:  
\[\rm k_{i}=\frac{\mu_{0}N^{2}Ai_{0}}{g_{0}^{2}} \tag{3}\]  
\[\rm k_{s}=\frac{\mu_{0}N^{2}Ai_{0}^{2}}{g_{0}^{2}} \tag{4}\]  
where, \(\mu_{0}\) is the permeability of free space, N is the number of turns, A the cross-sectional area of the pole, \(\rm i_{0}\) is the current acting on all AMB, and \(\rm g_{0}\) air-gap between rotor and the stator. Figure 2 shows a block diagram of an AMB closed-loop system.  
A control system is often used to maintain stability and regulate the position of the rotor. In AMB systems, a proportional-integral-derivative (PID) controller is often used [21]. The control system model can be represented by the following equation:  
\[\rm u=Kp*e+Ki*\int edt+Kd*de/dt \tag{5}\]  
where, \(\rm u\) represents the control signal applied to the electromagnets, \(\rm Kp\) is the proportional gain, \(\rm Ki\) is the integral gain, \(\rm Kd\) is the derivative gain, and \(\rm e\) is the error between the desired and actual rotor position. The dynamics of the rotor may be mathematically described by a second-order differential equation that takes into consideration many variables such as the mass, inertia, and damping of the rotor [22]. As can see in the following equation:  
\[\rm M*d^{2}x/dt^{2}+C*dx/dt+K*x=F \tag{6}\]  
where, \(\rm x\) represents the displacement of the rotor, \(\rm M\) is the mass of the rotor, \(\rm C\) is the damping coefficient, \(\rm K\) is the stiffness coefficient, and \(\rm F\) is the total force acting on the rotor. The behavior of the electromagnets in the AMB system can be represented by an electrical circuit equation [23]. The current in the electromagnets can be described using the following equation:  
\[\rm V=L*di/dt+R*i \tag{7}\]  
where, \(\rm V\) represents the voltage applied to the electromagnets, \(\rm L\) is the inductance of the electromagnets, \(\rm R\) is the resistance of the electromagnets, and \(\rm di/dt\) is the derivative of the current. A comprehensive mathematical model of an active magnetic bearing system may be developed by combining Equations (1), (2) and (5)-(7) and analyzing the relationships among the magnetic forces, control system, rotor dynamics, and electromagnet behavior. This model serves as a basic structure for the examination, development of control design, and simulation of AMB systems. All dimensions used in this study are listed in Table 1.  
Figure 2: The block diagram of an AMB closed-loop system.