3. Servo control system modeling and simulation

#### 3.1. Modeling of permanent magnet synchronous motor

Permanent magnet synchronous motors can be divided into two types according to the rotor type, salient pole rotor and non-salient pole rotor. The structure is shown in Figure 5; in the surface-mounted permanent magnet synchronous motor (Figure 5(a)), the magnetic circuit of the rotor is symmetrical, and the magnetic permeability and air gap permeability of the permanent magnet material are approximately the same. In the rotor two-phase coordinate system, the direct-axis inductance and the quadrature-axis inductance are equal, that is Ld ¼ Lq. It is named non-salient pole rotor permanent magnet synchronous motor.

The rotor magnetic paths of plug-in-type (Figure 5(b)) and built-in-type (Figure 5(c)) permanent magnet synchronous motors are asymmetrical, and the quadrature-axis inductance is

electromagnetic torque, and the positive direction of the load torque is the opposite. The

cos ð Þ θ þ ωt

cos ð Þ θ þ ωt þ 2π=3 cos ð Þ θ þ ωt � 2π=3

T

T

LA MAB MAC MBA LB MBC MCA MCB LC

Electromechanical Co-Simulation for Ball Screw Feed Drive System

http://dx.doi.org/10.5772/intechopen.80716

dφAð Þ θ; i dt dφAð Þ θ; i dt dφAð Þ θ; i dt

(18)

47

(19)

(20)

physical model equation of permanent magnet synchronous motor is as follows:

In Formula (18), R and L are matrices and their expressions are shown in Formula (20):

is ¼ ½ � iA iB iC

R ¼

8

>>>>>>>>>>>>>>>><

>>>>>>>>>>>>>>>>:

winding mutual inductances.

3.2. Coordinate transformation

L ¼

Us ¼ ½ � UA UB UC

RS 0 0 0 RS 0 0 0 RS

UA, UB, and UC are phase voltages of PMSM stator three-phase windings. IA, IB, and IC are the phase currents of stator three-phase windings. RS is the stator winding value. LA, LB, and LC are stator winding self-inductances. MAB ¼ MBA, MAC ¼ MCA, and MBC ¼ MCB are the stator

From the above physical model, we can see that in the ABC coordinate system, the PMSM rotor is asymmetric in the magnetic and electrical structures. The motor equation is a set of nonlinear time-varying equations related to the instantaneous position of the rotor, which makes the analysis of the dynamic characteristics of the PMSM very difficult. It is usually necessary to convert the motor equations by coordinate transformation to facilitate analysis and calculation. The coordinate system used in the vector control of the permanent magnet synchronous motor and their relationship is shown in Figure 7. In the figure, the α � β

3 7 5:

2 6 4

iA iB iC

dΨ<sup>s</sup> dt

US ¼ Ris þ

8 >>>>>><

>>>>>>:

uA uB uC

2 6 4 Ψ<sup>s</sup> ¼ Lis þ Ψ<sup>f</sup>

2 6 4

Figure 5. PMSM motor rotor structure. (a) Surface-mounted; (b) Plug-in; and (c) Interior-mounted.

greater than the direct-axis inductance, that is Lq > Ld. The rotor shows salient pole effect, which is called salient pole-type permanent magnet synchronous motor.

Taking non-salient pole rotor permanent magnet synchronous motor as an example, we simplify the motor model with the following conditions: neglecting the saturation of the motor core; no eddy current and hysteresis loss; permanent magnet material has zero conductivity; three-phase windings are symmetrical; and induced potential in the winding is sinusoidal. Then, a schematic diagram of the physical model of the motor shown in Figure 6 can be obtained.

The axis of the sinusoidal magnetomotive wave generated by a flowing forward current through the phase winding is defined as the axis of the phase winding. Take axis A as the spatial reference coordinate of the ABC coordinate system. It is assumed that the positive direction of the induced electromotive force is opposite to the positive direction of the current (motor principle); take the counterclockwise direction as the positive direction of the speed and

Figure 6. PMSM physical model.

electromagnetic torque, and the positive direction of the load torque is the opposite. The physical model equation of permanent magnet synchronous motor is as follows:

$$\begin{cases} \mathcal{U}\_S = \mathcal{R}\mathbf{i}\_s + \frac{d\Psi\_s}{dt} \\\\ \Psi\_s = \mathcal{U}\_s + \Psi\_f \begin{bmatrix} \cos\left(\theta + \omega\mathbf{t}\right) \\ \cos\left(\theta + \omega\mathbf{t} + 2\pi/3\right) \\ \cos\left(\theta + \omega\mathbf{t} - 2\pi/3\right) \end{bmatrix} \end{cases} \tag{18}$$

$$
\begin{bmatrix} u\_A \\ u\_B \\ u\_C \end{bmatrix} = \begin{bmatrix} R & 0 & 0 \\ 0 & R & 0 \\ 0 & 0 & R \end{bmatrix} \cdot \begin{bmatrix} i\_A \\ i\_B \\ i\_C \end{bmatrix} + \begin{bmatrix} \frac{d\wp\_A(\Theta, i)}{dt} \\ \frac{d\wp\_A(\Theta, i)}{dt} \\ \frac{d\wp\_A(\Theta, i)}{dt} \end{bmatrix} \tag{19}
$$

In Formula (18), R and L are matrices and their expressions are shown in Formula (20):

$$\begin{cases} \begin{aligned} \boldsymbol{U}\_{s} &= \begin{bmatrix} \boldsymbol{U}\_{A} & \boldsymbol{U}\_{B} & \boldsymbol{U}\_{C} \end{bmatrix}^{T} \\ \dot{\boldsymbol{i}}\_{s} &= \begin{bmatrix} \boldsymbol{i}\_{A} & \boldsymbol{i}\_{B} & \boldsymbol{i}\_{C} \end{bmatrix}^{T} \\ \boldsymbol{R} &= \begin{bmatrix} \boldsymbol{R}\_{S} & \boldsymbol{0} & \boldsymbol{0} \\ \boldsymbol{0} & \boldsymbol{R}\_{S} & \boldsymbol{0} \\ \boldsymbol{0} & \boldsymbol{0} & \boldsymbol{R}\_{S} \end{bmatrix} \\ \boldsymbol{L} &= \begin{bmatrix} \boldsymbol{L}\_{A} & \boldsymbol{M}\_{AB} & \boldsymbol{M}\_{AC} \\ \boldsymbol{M}\_{BA} & \boldsymbol{L}\_{B} & \boldsymbol{M}\_{BC} \\ \boldsymbol{M}\_{CA} & \boldsymbol{M}\_{CB} & \boldsymbol{L}\_{C} \end{bmatrix} \end{aligned} \tag{20}$$

UA, UB, and UC are phase voltages of PMSM stator three-phase windings. IA, IB, and IC are the phase currents of stator three-phase windings. RS is the stator winding value. LA, LB, and LC are stator winding self-inductances. MAB ¼ MBA, MAC ¼ MCA, and MBC ¼ MCB are the stator winding mutual inductances.

#### 3.2. Coordinate transformation

greater than the direct-axis inductance, that is Lq > Ld. The rotor shows salient pole effect,

Taking non-salient pole rotor permanent magnet synchronous motor as an example, we simplify the motor model with the following conditions: neglecting the saturation of the motor core; no eddy current and hysteresis loss; permanent magnet material has zero conductivity; three-phase windings are symmetrical; and induced potential in the winding is sinusoidal. Then, a schematic

The axis of the sinusoidal magnetomotive wave generated by a flowing forward current through the phase winding is defined as the axis of the phase winding. Take axis A as the spatial reference coordinate of the ABC coordinate system. It is assumed that the positive direction of the induced electromotive force is opposite to the positive direction of the current (motor principle); take the counterclockwise direction as the positive direction of the speed and

which is called salient pole-type permanent magnet synchronous motor.

Figure 5. PMSM motor rotor structure. (a) Surface-mounted; (b) Plug-in; and (c) Interior-mounted.

diagram of the physical model of the motor shown in Figure 6 can be obtained.

Figure 6. PMSM physical model.

46 New Trends in Industrial Automation

From the above physical model, we can see that in the ABC coordinate system, the PMSM rotor is asymmetric in the magnetic and electrical structures. The motor equation is a set of nonlinear time-varying equations related to the instantaneous position of the rotor, which makes the analysis of the dynamic characteristics of the PMSM very difficult. It is usually necessary to convert the motor equations by coordinate transformation to facilitate analysis and calculation. The coordinate system used in the vector control of the permanent magnet synchronous motor and their relationship is shown in Figure 7. In the figure, the α � β

id iq � �

iα iβ " # <sup>¼</sup> cos <sup>θ</sup> sin <sup>θ</sup> � sin θ cos θ � � i<sup>α</sup>

<sup>¼</sup> cos <sup>θ</sup> � sin <sup>θ</sup> sin θ cos θ � � id

The mathematical model of the permanent magnet synchronous motor in the ABC coordinate system can be transformed into any two-phase coordinate system through coordinate transformation, so that it is possible to simplify the decoupling of the motor flux linkage equation and the electromagnetic torque equation. If the mathematical model of the motor is transformed into a d � q coordinate system fixed on a permanent magnet rotor, the motor flux

With the equivalent flux ψ<sup>d</sup> and ψq, the equivalent inductance Ld, Lq of the motor in the d � q coordinate system, and the rotor permanent magnet flux linkage ψ<sup>f</sup> , the stator flux equation

ψ<sup>d</sup> ¼ Ldid þ ψ<sup>f</sup>

ψ<sup>q</sup> ¼ Lqiq

Take the rotor permanent magnet flux linkage ψ<sup>f</sup> as constant; the voltage of stator in the d � q

did

diq

where ud and uq are the stator-side equivalent voltages of the motor in the d � q coordinate system, R is the stator winding resistance per phase, and ω<sup>r</sup> is the electrical angular velocity of

The electromagnetic torque equation in the d � q coordinate system can be expressed as follows, where p is the number of pole pairs, ψ is the flux synthesis vector, and i is the current

Using the components of the d � q coordinate system to represent the flux linkage and current vector shown in Eq. (28), the electromagnetic torque can be expressed as shown in Eq. (29):

> i ¼ id þ jiq ψ ¼ ψ<sup>d</sup> þ jψ<sup>q</sup>

8 < : dt � <sup>ω</sup>rLqiq

dt <sup>þ</sup> <sup>ω</sup>rLdid <sup>þ</sup> <sup>ω</sup>rψ<sup>f</sup>

Te ¼ 1:5pψ � i (27)

3.2.3. Mathematical model of permanent magnet synchronous motor in coordinate system

equation and the electromagnetic torque equation will be greatly simplified.

8 < :

ud ¼ Rid þ Ld

8 >><

>>:

uq ¼ Riq þ Lq

can be obtained in Eq. (25):

coordinate system is as follows:

the rotor rotation.

composition vector:

iβ " #

Electromechanical Co-Simulation for Ball Screw Feed Drive System

iq

� � (24)

http://dx.doi.org/10.5772/intechopen.80716

(23)

49

(25)

(26)

(28)

Figure 7. The coordinate system used in the vector control and their relationship.

coordinate system is a two-phase stationary coordinate system, and the d � q coordinate system is a two-phase rotating coordinate system that is fixed to the rotor.

#### 3.2.1. Clarke transformation

Clarke transformation simplifies the voltage loop equations on the original three-phase windings into the voltage loop equations on the two-phase windings, from the three-phase stator ABC coordinate system to the two-phase stator α � β coordinate system, as shown in Eq. (21); its inverse transform is shown in Eq. (22). However, after the Clarke transformation, the torque still depends on the rotor flux. In order to facilitate control and calculation, Park transformation is also required:

$$
\begin{bmatrix} i\_{\alpha} \\ i\_{\beta} \end{bmatrix} = \sqrt{\frac{2}{3}} \begin{bmatrix} 1 & -1/2 & -1/2 \\ 0 & \sqrt{3}/2 & -\sqrt{3}/2 \end{bmatrix} \begin{bmatrix} i\_{A} \\ i\_{B} \\ i\_{C} \end{bmatrix} \tag{21}
$$

$$
\begin{bmatrix} i\_A \\ i\_B \\ i\_C \end{bmatrix} = \sqrt{\frac{3}{2}} \begin{bmatrix} 1 & 0 \\ -1/2 & \sqrt{3}/2 \\ -1/2 & -\sqrt{3}/2 \end{bmatrix} \begin{bmatrix} i\_\alpha \\ i\_\beta \end{bmatrix} \tag{22}
$$

#### 3.2.2. Park transformation

In the physical sense, the Park transformation is equivalent to projecting the currents ia, ib, ic onto the d � q axis. The transformed coordinate system rotates at the same speed as the rotor, and the d-axis and the rotor flux have the same position. The Park transformation is shown in Eq. (23), and the inverse transformation is shown in Eq. (24). This transformation also holds for the three-phase voltage and flux linkage:

Electromechanical Co-Simulation for Ball Screw Feed Drive System http://dx.doi.org/10.5772/intechopen.80716 49

$$
\begin{bmatrix} \dot{i}\_d \\ \dot{i}\_q \end{bmatrix} = \begin{bmatrix} \cos\theta & \sin\theta \\ -\sin\theta & \cos\theta \end{bmatrix} \begin{bmatrix} \dot{i}\_a \\ \dot{i}\_\beta \end{bmatrix} \tag{23}
$$

$$
\begin{bmatrix}
\dot{i}\_a\\\dot{i}\_\emptyset \end{bmatrix} = \begin{bmatrix}
\cos\Theta & -\sin\Theta\\\sin\Theta & \cos\Theta
\end{bmatrix} \begin{bmatrix}
\dot{i}\_d\\\dot{i}\_q
\end{bmatrix} \tag{24}
$$

#### 3.2.3. Mathematical model of permanent magnet synchronous motor in coordinate system

coordinate system is a two-phase stationary coordinate system, and the d � q coordinate

Clarke transformation simplifies the voltage loop equations on the original three-phase windings into the voltage loop equations on the two-phase windings, from the three-phase stator ABC coordinate system to the two-phase stator α � β coordinate system, as shown in Eq. (21); its inverse transform is shown in Eq. (22). However, after the Clarke transformation, the torque still depends on the rotor flux. In order to facilitate control and calculation, Park transforma-

> �1=2 ffiffiffi 3 <sup>p</sup> <sup>=</sup><sup>2</sup>

<sup>r</sup> 1 0 �1=2 �1=2

In the physical sense, the Park transformation is equivalent to projecting the currents ia, ib, ic onto the d � q axis. The transformed coordinate system rotates at the same speed as the rotor, and the d-axis and the rotor flux have the same position. The Park transformation is shown in Eq. (23), and the inverse transformation is shown in Eq. (24). This transformation also holds for

�1=2 � ffiffiffi 3 <sup>p</sup> <sup>=</sup><sup>2</sup>

ffiffiffi 3 <sup>p</sup> <sup>=</sup><sup>2</sup>

� ffiffiffi 3 <sup>p</sup> <sup>=</sup><sup>2</sup> iB iC 3 7

<sup>5</sup> (21)

(22)

2 6 4

3 7 5 iα iβ " #

" # iA

system is a two-phase rotating coordinate system that is fixed to the rotor.

Figure 7. The coordinate system used in the vector control and their relationship.

iα iβ " #

¼

iA iB iC

2 6 4

ffiffiffi 2 3 r 1

0

ffiffiffi 3 2

2 6 4

3.2.1. Clarke transformation

48 New Trends in Industrial Automation

tion is also required:

3.2.2. Park transformation

the three-phase voltage and flux linkage:

The mathematical model of the permanent magnet synchronous motor in the ABC coordinate system can be transformed into any two-phase coordinate system through coordinate transformation, so that it is possible to simplify the decoupling of the motor flux linkage equation and the electromagnetic torque equation. If the mathematical model of the motor is transformed into a d � q coordinate system fixed on a permanent magnet rotor, the motor flux equation and the electromagnetic torque equation will be greatly simplified.

With the equivalent flux ψ<sup>d</sup> and ψq, the equivalent inductance Ld, Lq of the motor in the d � q coordinate system, and the rotor permanent magnet flux linkage ψ<sup>f</sup> , the stator flux equation can be obtained in Eq. (25):

$$\begin{cases} \psi\_d = L\_d \dot{\imath}\_d + \psi\_f \\ \psi\_q = L\_q \dot{\imath}\_q \end{cases} \tag{25}$$

Take the rotor permanent magnet flux linkage ψ<sup>f</sup> as constant; the voltage of stator in the d � q coordinate system is as follows:

$$\begin{cases} \mathbf{u}\_d = \mathbf{R}\dot{\mathbf{i}}\_d + \mathbf{L}\_d \frac{d\dot{\mathbf{i}}\_d}{dt} - \omega\_r \mathbf{L}\_q \dot{\mathbf{i}}\_q \\\\ \mathbf{u}\_q = \mathbf{R}\dot{\mathbf{i}}\_q + \mathbf{L}\_q \frac{d\dot{\mathbf{i}}\_q}{dt} + \omega\_r \mathbf{L}\_d \dot{\mathbf{i}}\_d + \omega\_r \psi\_f \end{cases} \tag{26}$$

where ud and uq are the stator-side equivalent voltages of the motor in the d � q coordinate system, R is the stator winding resistance per phase, and ω<sup>r</sup> is the electrical angular velocity of the rotor rotation.

The electromagnetic torque equation in the d � q coordinate system can be expressed as follows, where p is the number of pole pairs, ψ is the flux synthesis vector, and i is the current composition vector:

$$T\_e = 1.5 p \text{ụ} \times \mathbf{i} \tag{27}$$

Using the components of the d � q coordinate system to represent the flux linkage and current vector shown in Eq. (28), the electromagnetic torque can be expressed as shown in Eq. (29):

$$\begin{cases} \mathbf{i} = \mathbf{i}\_d + j\mathbf{i}\_q \\\\ \boldsymbol{\upup} = \boldsymbol{\upup}\_d + j\boldsymbol{\upup}\_q \end{cases} \tag{28}$$

$$T\_e = 1.5p \left[ \psi\_f i\_q + (L\_d - L\_q) i\_d i\_q \right] \tag{29}$$

## 3.3. Servo control modeling of ball screw feed system

In order to model the servo control of the ball screw feed system, the modeling of the threeloop cascade control architecture of the vector control and servo control system of the permanent magnet synchronous servomotor is studied, which is commonly used in the ball screw feed system.
