## 2 Materials and Methods
### Dynamic Model of the Solenoid
#### 2.3.4 Solving the Dynamic Equations  
Because the equations for each subsystem of the solenoid and describing the whole system are not linear, their analytical solutions are very difficult to solve. In this study, a computer-aided numerical solution was applied using MATLAB-Simulink. The Simulink model for the solution of dynamic equations can be constructed using two methods [9; 12].  
In the first method, as well as the basic equation of the three subsystems, the reluctance and permeability equations of the magnetic circuit are used. This equation contains complex algebraic expressions that depend on the geometry of the magnetic circuit. In addition, algebraic expressions in the Simulink model extend the solution time and often make it insoluble.  
Another method uses tables of reluctance and magnetic flux values due to electric current and displacement. These tables, which are prepared through experimental or static analysis or calculations, can be used as a Look-Up Table function in the Simulink model. In this way, the solutions are faster, and the simulation results are closer to the real results [16].  
In this study, the Look-Up Table method was used to solve dynamic behavior equations in the Simulink environment. The data in the Look-Up Table were obtained from the solution of the magnetic analysis data from the ANSYS-Maxwell finite element program.  
Based on the Maxwell FEM analysis results, matrices that give the values for force \(F_{M}\) and magnetic flux linkage \(\lambda\) were created versus current-air-gap-flux linkage values. The calculated magnetic force data versus the current \(i\) and displacement \(x\) values in the Maxwell model are defined in the block named \"Lookup1, \(F_{m}=f(i,x)\)\" in the Simulink model. The air-gap-current-magnetic-force data are shown in Figure 10(a).  
Figure 10(b) shows the current-air-gap-flux linkage data taken from the Maxwell program. However, for dynamic simulation, current-air-gap-magnetic-flux linkage data are needed and desired. Therefore, a MATLAB program was prepared that gives the magnetic flux linkage \(\lambda\) versus the current-air-gap. The obtained current data versus the air gap \(x\) and flux linkage \(\lambda\) values in the MATLAB program are defined in the block named \"Lookup 2, \(i=f(x,\lambda)\)\" in the Simulink model.  
The electrical subsystem of the dynamic model seen in Figure 10 was prepared using the expression given in Equation (9). The mechanical subsystem was modelled using the expression given in Equation (11). Proportional solenoids have moving and fixed poles. When current is applied to the coil, the moving element completes its movement in the air gap in three stages: (i) the starting motion (\(F_{m}<F_{p}\), \(x=0\)), (ii) the moment of motion (\(F_{m}>F_{p}\), \(0<x<x_{max}\)), and (iii) the end of motion (\(x\ \geq\ x_{max}\)). These stages are defined in the Conditions subsystem of the dynamic model.  
Figure 11: Magnetic FEM analysis in the working region: (a) air-gap–current–magnetic-force; (b) current–air-gap–flux linkage.  
A solenoid with the resistance \(R=5\)\(\Omega\), \(e=8\) V input voltage was applied in the model. It was assumed that the movable element moves 3 mm. The pretension force, spring coefficient, and viscous friction coefficient were neglected. The solenoid coil (copper) was wound using 23 AWG (American Wire Gauge) wire, which has a standard outer diameter of 0.573 mm. The coil comprises 716 turns in total.  
The simulation results of the dynamic model are given in the Results section.