# Metaheuristic and Heuristic Algorithms-Based Identification Parameters of a Direct Current Motor
## 2 Mathematical Modelling  
_DC Motor Modelling_  
The dynamic system of the DC motor is composed of two differential equations (an electrical and a mechanical part). The electrical equation has variables such as voltage and current and parameters such as a resistor, which is the internal resistance of the motor, and an inductor, which represents the inductance generated by its windings. In the mechanical equation, there are variables such as speed and torque and mechanical parameters such as the coefficient of friction and inertia, as shown in Figure 1.  
From the diagram in Figure 1, the following equations are obtained.  
\[v(t)=Ri(t)+L\frac{di(t)}{dt}+e(t) \tag{1}\]  
\[\tau(t)=J\frac{d\omega(t)}{dt}+B\omega(t)+T_{L} \tag{2}\]  
\[e(t)=K_{e}\omega(t) \tag{3}\]  
\[\tau(t)=K_{m}i(t) \tag{4}\]  
\[K_{e}\approx K_{m}=K \tag{5}\]  
where \(R\) is the resistance expressed in ohms \(\Omega\), \(L\) the inductance in H, \(J\) is the moment of inertia of the rotor, \(B\) the coefficient of friction between the rotor and the stator, and \(T_{L}\) the torque load; however, for parameter estimation, a motor free of load is used, which means that \(T_{L}\) = 0. \(v(t)\) is the voltage induced to the armature, \(i(t)\) is the current, \(\omega(t)\) is the angular velocity of the rotor, \(e(t)\) is the induced electric voltage, and \(\tau(t)\) is the torque of the motor. \(K\) is the rate of change of the electromotive force with respect to the angular velocity, and the rate of change of the induced voltage is considered to be equivalent to both \(K_{m}\) and \(K_{e}\). Equation (1) was derived using a simple [PERSON]'s voltage law analysis presented in Figure 1. Equation (2) was obtained by knowing that the sum of moments that make the rotor rotate to the symmetrical axis is the same as that of moments that oppose its movement. \(K\) is the rate of change of the electromotive force with respect to the angular velocity, and the rate of change of the induced voltage is considered equivalent to both \(K_{m}\) and \(K_{e}\). This is because it is a DC motor and the excitation source is considered constant; hence, the previous constants are considered equal. This can be deduced by working with the instantaneous power equation, which relates to the instantaneous power supplied by the excitation source, the instantaneous mechanical power, and the instantaneous power dissipated by the motor windings [31].  
The system of differential equations shown in Equations (6) and (7) is obtained from the combination and substitution of Equations (3) and (4) into (1) and (2), respectively.  
\[\frac{di(t)}{dt}=\frac{v(t)-Ri(t)-K_{e}\omega(t)}{L} \tag{6}\]  
\[\frac{d\omega(t)}{dt}=\frac{K_{m}i(t)-B\omega(t)}{J} \tag{7}\]  
The equations represent the dynamic model of a DC motor, where Equation (6) corresponds to the mechanical part of the motor, and Equation (7) corresponds to the electrical part. The time response of the dynamic system was simulated using the nominal parameters, as shown in Table 1. Later, simulations were performed with the parameters selected  
Figure 1: DC motor dynamic circuit diagram.  
by the algorithms, as described in the following section. It should be noted that the model and nominal parameters may have differences from reality, although they are considered so small as to be negligible.  
The simulation of differential equations was carried out through a block diagram in MATLAB/Simulink 2010. The arrangement consisted of six inputs, which are the five described in Table 1 and the input voltage. The current and angular velocity outputs were delivered as a result. The setup can be seen in Figure 2.