*Article* **The Direct Speed Control of Pmsm Based on Terminal Sliding Mode and Finite Time Observer**

#### **Yao Wang \*, HaiTao Yu \*, Zhiyuan Che, Yuchen Wang and Yulei Liu**

School of Electrical Engineering, Southeast University, Nanjing 210096, China; zhiyuanche@foxmail.com (Z.C.); 220172743@seu.edu.cn (Y.W.); wangyhbcd@126.com (Y.L.)

**\*** Correspondence: 230179191@seu.edu.cn (Y.W.); htyu@seu.edu.cn (H.Y.)

Received: 22 August 2019; Accepted: 10 September 2019; Published: 16 September 2019

**Abstract:** A non-singular terminal sliding mode control based on finite time observer is designed to achieve speed direct control for the permanent magnet synchronous motor (PMSM) drive system. Speed and current are regulated in one loop under the non-cascade structure, taking place of the cascade structure control method in the vector control of PMSM. Based on the second-order speed function of the PMSM, the disturbance and parameters uncertainties are estimated by the designed finite time observer (FTO), and compensate to the drive system. The estimated value of the finite time observer will converge to the actual disturbance value in a finite time. A second-order non-singular terminal sliding mode controller is proposed to realize the speed and current single-loop, which can track the reference speed and reference current in a finite time. Rigorous stability analysis is established. Comparative results verified that the proposed method has faster speed tracking performance and disturbance rejection property.

**Keywords:** non-singular terminal sliding mode control (NTSMC); finite-time observer (FTO); mismatched/matched disturbance/uncertainties; permanent magnet synchronous motor (PMSM)

#### **1. Introduction**

By reason of the high-power density, torque-to-inertia ratio and high efficiency, the permanent magnet synchronous motor (PMSM) are widely used in industrial areas, such as, aerospace, servo control, numerical control machine and robot [1–5]. In these applications, the dynamic response performance and disturbance rejection property of PMSM are very important.

In recent years, with the progress of technology, the control periods between the speed loop and current loop of PMSM gradually decreased, or even vanished [6]; making it possible to realize the speed-current single-loop of PMSM drive system under the non-cascade structure. Generally speaking, in the traditional cascade control method for PMSM, the control period of the speed loop is 5–10 times that of the current loop, reducing the real-time control performance of the speed [7–9]. When the same control algorithm is adopted, different from the cascade control structure, the number of adjustable parameters is reduced and the speed can be directly controlled. These are the virtues of the non-cascade control structure [10,11]. Despite its advantages, there is little research on non-cascade control structures for the PMSM system in recent years. A non-cascade structure control based on model predictive control is proposed in [12], in which the dynamic performance of the system is improved and the computational complexity is reduced, compared with the traditional cascade predictive control method. In [13], under the non-cascade structure, the speed and current are adjusted in one proportion integration differentiation (PID) controller. Rigorous theoretical derivation and experimental analysis verified that the proposed method has better dynamic performance and disturbance rejection ability. Considering the influence of various disturbances on the PMSM system, a new non-cascade structure controller is established in [14], which can directly control the speed of PMSM. PMSM speed and current

are adjusted in one loop based on terminal sliding mode and nonlinear disturbance observer under non-cascade structure control in [15]. However, when without the nonlinear disturbance observer, the proposed method has a poor ability to deal with the load sudden change. A direct speed control method based on radial basis function (RBF) is designed in [16], which avoided the control of current, simplified the control structure and improved the control performance. A model predictive direct speed control method based on voltage vector control is proposed in [17]. In this method, the voltage vector does not need to be measured, the computational burden of the system is reduced, and the output current is constrained within a certain range. A model predictive direct speed controller is proposed in [18], which overcomes the shortcoming of cascade linear controller in high-speed control, and the results show that the proposed method has better stability performance. Based on the state-dependent Riccati equation (SDRE) and Convex constrained optimization, a direct speed controller was proposed in [19], which can make the PMSM control system achieve high dynamic and accurate stability performance, and the input voltage and stator current can be constrained.

Due to the nonlinear and strong coupling characteristics of the PMSM drive system, ideal control results can hardly be achieved in traditional PI controller [20,21]. Many nonlinear control methods have been applied in PMSM drive systems, such as sliding mode control, model predictive control, auto-disturbance rejection control, finite time control, etc., [22–26]. Among these methods, it can converge in finite time and has a better disturbance rejection performance. The terminal sliding mode is widely used in control systems. In [27], a new terminal sliding mode controller is designed to adjust the speed of the PMSM servo system, which can make the system reach the reference speed in a finite time, ensuring a fast convergence performance and a better tracking accuracy of the system. In [28], a non-singular terminal sliding mode control based on state observer is investigated to realize the pressure control. In the proposed method, the pressure tracking error can converge to the equilibrium point in finite time and the chattering of the sliding mode is weakened. In [29] according to euler discrete technology, a new discrete time fast terminal sliding mode method is proposed and applied to the control of permanent magnet synchronous linear motor (PMLSM), and the reference position of PMLSM can be quickly tracked. In [30], a fractional-order terminal sliding mode controller based on fractional-order disturbance observer is proposed, under which the speed can converge to the reference speed in a finite time. In [31], a higher speed tracking accuracy can be achieved by a continuous fast terminal sliding mode control, and the robustness of the PMSM system can be improved when the disturbance is feedforward to the system by the extended state observer. In [32], a nonsingular terminal sliding mode based on improved extended state observer is investigated to realize the direct voltage control for the stand-alone doubly-fed induction generator (DFIG) system, which can achieve a balanced stator voltage.

Load change, parameters uncertainty and unmodeled dynamics are considered to be important factors affected the control performance. At present, in order to improve the robustness, the disturbance will be estimated by state observer and feed forward to the system before it affects the system. In [33], to improve the robustness in surface permanent magnet synchronous motor, the lumped disturbance consisted of the external disturbance and mismatched parameters can be estimated by a Luneburg observer, and compensate to the PMSM system. In [34] the parameters uncertainties and disturbances in DC-DC converters are considered as lumped disturbance, estimated by a reduced order generalized proportional integral observer and fed forward to the system, which improves the dynamic performance of the system. In [35], the lumped disturbance in air-breathing hypersonic vehicles is calculated by a disturbance observer, and the accuracy of speed and position control is improved when the disturbance feedforward to the system. In [36], a high-gain generalized proportional integral observer is designed, to estimate the load change and parameters uncertainties in PMSM. In [37], the disturbance is estimated and compensated by a nonlinear disturbance observer to improve the disturbance rejection property of the system. Then, a nonlinear controller is used to control the system, and the semi-global stability of the designed nonlinear controller and nonlinear disturbance observer is proved. In [38], a robust nonlinear observer is proposed for the Lipschitz nonlinear system. On the one hand, the new observer

does not need to be added to small Lipschitz constants; on the other hand, the state estimation error of the system can quickly approach zero in the face of large additional disturbances. Disturbance also exists in the PMSM drive system under the non-cascade structure. In order to improve the anti-disturbance ability, it is necessary to estimate and compensate the disturbance to the system.

#### **2. Preliminaries**

#### *2.1. The Mathematical Model of Pmsm*

The ideal model of a surface mounted PMSM in the *d-q* frame can be expressed as follows.

$$\begin{cases} \frac{di\_d}{dt} = \frac{-Ri\_d + n\_p\omega iL\_q}{L} + \frac{1}{L}u\_d\\ \frac{di\_q}{dt} = \frac{-Ri\_q - n\_p\omega iL\_d - n\_p\omega i\psi\_f}{L} + \frac{1}{L}u\_q\\ \frac{d\omega}{dt} = -\frac{B\omega}{f} + \frac{n\_p\psi\_f}{f}i\_q - \frac{T\_L}{f} \end{cases} \tag{1}$$

where, *id*, *iq* are the *d*-axis and *q*-axis stator currents, respectively; *ud*, *uq* are the *d*-axis and *q*-axis stator voltages, respectively; *L* is the inductor; *R* is stator resistance; *np* is the number of pole pairs; ω is angular velocity; ψ*<sup>f</sup>* is rotor flux linkage; *TL* is load torque; *B* is viscous frictional coefficient; *J* is rotor inertia.

#### *2.2. The Mathematic Model of Speed-Current Single-Loop*

Let *x*<sup>1</sup> = ω*re f* − ω, and its derivative can be expressed as

$$
\dot{\mathbf{x}}\_1 = \mathbf{x}\_2 = \dot{\boldsymbol{\omega}}\_{\text{ref}} - \dot{\boldsymbol{\omega}} = \dot{\boldsymbol{\omega}}\_{\text{ref}} + \boldsymbol{a}\_1 \boldsymbol{\omega} - \boldsymbol{a}\_2 \dot{\mathbf{i}}\_{\text{\text{\textdegree}}} + \boldsymbol{a}\_3 \boldsymbol{T}\_L. \tag{2}
$$

where, *a*<sup>1</sup> = *<sup>B</sup> <sup>J</sup>* , *<sup>a</sup>*<sup>2</sup> <sup>=</sup> *np*ψ*<sup>f</sup> <sup>J</sup>* , *<sup>a</sup>*<sup>3</sup> <sup>=</sup> <sup>1</sup> *J* .

When the parameters uncertainties are considered, the following expression can be obtained.

$$
\dot{\mathbf{x}}\_1 = \mathbf{x}\_2 + d\_1 = \dot{\boldsymbol{w}}\_{ref} + \boldsymbol{a}\_1 \boldsymbol{\omega} - \boldsymbol{a}\_2 \dot{\boldsymbol{i}}\_q + \boldsymbol{a}\_3 \boldsymbol{T}\_L + d\_1 \tag{3}
$$

where, *d*<sup>1</sup> = Δ*a*1ω − Δ*a*2*iq* + Δ*a*3*TL* is considered as mismatched uncertainties. And *a*1, *a*2, *a*<sup>3</sup> are nominal parameter values, *at*1, *at*2, *at*<sup>3</sup> are the actual parameter values. Δ*a*<sup>1</sup> = *at*<sup>1</sup> − *a*1, Δ*a*<sup>2</sup> = *at*<sup>2</sup> − *a*2, Δ*a*<sup>3</sup> = *at*<sup>3</sup> − *a*3.

The second order differential equation of speed error can be expressed as follows

$$
\dot{\mathbf{x}}\_2 = \ddot{\boldsymbol{\omega}}\_{ref} - \ddot{\boldsymbol{\omega}} = \ddot{\boldsymbol{\omega}}\_{ref} + a\_1 \dot{\boldsymbol{\omega}} - a\_2 \dot{\boldsymbol{i}}\_q + a\_3 \dot{\boldsymbol{T}}\_L. \tag{4}
$$

Considering system (1), the (4) can be rewritten as

$$
\dot{\omega}\_2 = \ddot{\omega}\_{ref} + a\_1 \dot{\omega} + a\_2 b\_1 \dot{i}\_q + a\_2 b\_2 \omega \dot{i}\_d + a\_2 b\_3 \omega - a\_2 b\_4 \omega\_q + a\_3 \dot{T}\_L. \tag{5}
$$

where *b*<sup>1</sup> = *<sup>R</sup> <sup>L</sup>* , *<sup>b</sup>*<sup>2</sup> <sup>=</sup> *np*, *<sup>b</sup>*<sup>3</sup> <sup>=</sup> *np*ψ*<sup>f</sup> <sup>L</sup>* and *<sup>b</sup>*<sup>4</sup> <sup>=</sup> <sup>1</sup> *L* .

Taking the parameters uncertainties and disturbance into consideration, system (5) can be expressed as follows .

$$
\dot{\mathbf{x}}\_2 = -a\_1 \mathbf{x}\_2 - a\_2 b\_3 \mathbf{x}\_1 - a\_2 b\_4 \boldsymbol{\mu}\_q + d\_2. \tag{6}
$$

.

where, *<sup>d</sup>*<sup>2</sup> <sup>=</sup> .. ω*re f* + *a*<sup>1</sup> . ω*re f* + *a*2*b*3ω*re f* + *a*2*b*1*iq* + *a*2*b*2ω*id* + *a*<sup>3</sup> . *TL* − Δ*a*1*x*<sup>2</sup> − Δ*a*2Δ*b*3*x*1+ Δ*a*<sup>1</sup> . ω*re f* + Δ*a*2Δ*b*3ω*re f* + Δ*a*2Δ*b*1*iq* + Δ*a*2Δ*b*2ω*id* − Δ*a*2Δ*b*4*uq* + Δ*a*<sup>3</sup> . *TL*

*b*1, *b*2, *b*3, *b*<sup>4</sup> are the nominal parameter values, *bt*1, *bt*2, *bt*3, *bt*<sup>4</sup> are the actual parameter values, Δ*b*<sup>1</sup> = *bt*<sup>1</sup> − *b*1, Δ*b*<sup>2</sup> = *bt*<sup>2</sup> − *b*2, Δ*b*<sup>3</sup> = *bt*<sup>3</sup> − *b*3, Δ*b*<sup>4</sup> = *bt*<sup>4</sup> − *b*4.

The second-order speed regulation system can be expressed as follows

$$\begin{cases} \dot{\mathbf{x}}\_1 = \mathbf{x}\_2 + d\_1\\ \dot{\mathbf{x}}\_2 = -a\_1 \mathbf{x}\_2 - a\_2 b\_3 \mathbf{x}\_1 - a\_2 b\_4 \mathbf{u}\_q + d\_2 \end{cases} \tag{7}$$

#### **3. Control Design**

Based on the method designed in this paper, the PMSM control structure block diagram is shown in Figure 1.

**Figure 1.** Permanent magnet synchronous motor (PMSM) control system based on the method designed in this paper.

#### *3.1. Finite Time Observer*

The disturbance is estimated and feedforward to the system based on the finite time observation method. The stability of the finite time control system is defined as follows.

**Lemma 1.** *[39] the following system is considered*

$$\dot{\mathbf{x}} = f(\mathbf{x}), \mathbf{x} \in \mathcal{U} \subseteq \mathbb{R}^n, f(0) = 0 \tag{8}$$

*where, f* : *U* → *Rn is a continuous function of x in domain of definition. For the equilibrium solution of the system, x* = 0 *is defined as finite time stability, which requires the system to be both stable and convergent in finite time. Finite time convergence means there are* ∀*x*<sup>0</sup> ∈ *U*<sup>0</sup> ⊂ *R<sup>n</sup> and a continuous function T*(*x*)*: U*0\{0} → (0, +∞)*, making the solution x*(*t*, *x*0) *of the system (3) satisfied the following conditions: when <sup>t</sup>* <sup>∈</sup> [0, *<sup>T</sup>*(*x*0))*, <sup>x</sup>*(*t*, *<sup>x</sup>*0) <sup>∈</sup> *<sup>U</sup>*0\{0} *and* lim *<sup>x</sup>*→*T*(*x*0) *x*(*t*, *x*0) = 0 *are true; When t* > *T*(*x*0)*, x*(*t*, *x*0) = 0 *is always true. If U* = *U*<sup>0</sup> = *Rn existed, the system is considered globally finite time stable.*

**Notation 1.** *For writing convenience, denote sig*β(*x*) = sgn(*x*)|*x*<sup>|</sup> <sup>β</sup>*, where <sup>x</sup>*, <sup>β</sup> <sup>∈</sup> <sup>R</sup>*, and* sgn(·) *is the sign function.*

**Lemma 2.** *[40] Consider the following system*

$$\dot{\mathbf{x}} = f(\mathbf{x}) + f(\mathbf{x}),\\f(\mathbf{0}) = \mathbf{0}, \mathbf{x} \in \mathbb{R}^n \tag{9}$$

*where, f*(*x*) *is a continuous homogeneous vector field, and f*(*x*) *has negative homogeneous degree k with respect to expansion vector* (*r*1,*r*2, ... ,*rn*). ˆ *f*(*x*) *is the estimated disturbance of the system, which satisfies* ˆ *f*(0) = 0*. <sup>x</sup>* <sup>∈</sup> <sup>R</sup>*<sup>n</sup> refers that x is belonged to the n-dimensional vector. Suppose that the asymptotically stable equilibrium point of system* . *x* = *f*(*x*) *is x* = *0 and satisfies the following conditions,* ∀*x* 0

$$\lim\_{\varepsilon \to 0} \frac{\hat{f\_i}(\varepsilon^{r\_1} \mathbf{x}\_1, \dots, \varepsilon^{r\_n} \mathbf{x}\_n)}{\varepsilon^{k + r\_i}} = 0, i = 1, 2, \dots, n \tag{10}$$

*Then x* = 0 *is a locally finite time equilibrium point of system* (9).

**Lemma 3.** *[41–43] Consider the nonlinear system*

$$\begin{cases} \dot{\mathbf{x}}\_{i} = \mathbf{x}\_{i+1}, i = 1, \dots, n-1 \\ \dot{\mathbf{x}}\_{\text{lt}} = \boldsymbol{\mu} \\ \boldsymbol{y} = \mathbf{x}\_{1} \end{cases} \tag{11}$$

*where, x* = (*x*1, *x*2, ... , *xn*) *<sup>T</sup>* <sup>∈</sup> *Rn are the state variables of the system; <sup>u</sup>* <sup>∈</sup> *<sup>R</sup> and <sup>y</sup>* <sup>∈</sup> *<sup>R</sup> are the input and output of the system, respectively.*

*For system (11), the estimated state values* (*x*ˆ1, *x*ˆ2, ... , *x*ˆ*n*) *can converge to the real states* (*x*1, *x*2, ... , *xn*) *of system (11) in a finite time by the following global finite time observer.*

$$\begin{cases}
\dot{\mathfrak{X}}\_i = \mathfrak{X}\_{i+1} + \lambda\_i \text{sig}^{\theta\_i}(\mathfrak{x}\_1 - \mathfrak{x}\_1), i = 1, 2, \dots, n - 1 \\
\dot{\mathfrak{X}}\_n = \mathfrak{u} + \lambda\_n \text{sig}^{\theta\_n}(\mathfrak{x}\_1 - \mathfrak{x}\_1)
\end{cases} \tag{12}$$

*where,* <sup>β</sup>*<sup>i</sup>* <sup>&</sup>gt; <sup>0</sup>*, i* = 1, 2, ... , *n, it's a Hurwitz polynomial sn* + <sup>β</sup>1*sn*−<sup>1</sup> + ··· + <sup>β</sup>*n*−1*<sup>s</sup>* + <sup>β</sup>*n*.

$$
\beta\_i = i\beta - (i-1), i = 1, \dots, n,\\
\beta \in (1 - \frac{1}{n}, 1] \tag{13}
$$

**Lemma 4.** *[44,45] A second-order system can be expressed as follows*

$$\begin{cases}
\dot{x}\_1 = x\_2 - \lambda \text{sig}^{\frac{1}{2}}(x\_1) \\
\dot{x}\_2 = -\nu \text{sign}(x\_1) + F(t)
\end{cases} \tag{14}$$

*If there is a positive real number f* <sup>+</sup>*, F*(*t*) <sup>&</sup>lt; *<sup>f</sup>* <sup>+</sup> *is true, and* <sup>ν</sup>*,* <sup>λ</sup> *satisfies the following description.*

$$
\Delta \nu > f^+, \lambda > \sqrt{\frac{2}{\nu - f^+}} \frac{(\nu + f^+)(1 + \mu)}{(1 - \mu)} \tag{15}
$$

*where,* μ *is a constant,* 0 <μ< 1*. Then the state* (*x*1, *x*2) *of the system (14) will be converged to the equilibrium point 0 in a finite time, and the system (14) is globally stable in finite time.*

**Assumption 1.** *The disturbance d*1*,d*<sup>2</sup> *in system (7) are second-order and first-order di*ff*erentiable, respectively.*

Let *<sup>x</sup>*<sup>1</sup> <sup>=</sup> *<sup>x</sup>*1, *<sup>x</sup>*<sup>2</sup> <sup>=</sup> *<sup>x</sup>*<sup>2</sup> <sup>+</sup> *<sup>d</sup>*1, *<sup>d</sup>* <sup>=</sup> . *d*<sup>1</sup> + *d*<sup>2</sup> + *a*1*d*1, the following system can be derived from system (7)

$$\begin{cases} \dot{\overline{\overline{x}}}\_1 = \overline{\overline{x}}\_2\\ \dot{\overline{\overline{x}}}\_2 = -a\_1 \overline{\overline{x}}\_2 - a\_2 b\_3 \overline{\overline{x}}\_1 - a\_2 b\_4 u\_\eta + d\\ y = \overline{x}\_1 \end{cases} \tag{16}$$

Finite time state observers are designed for the state variables of system (7) and system (14) according to Lemma 3.

$$\begin{cases} \dot{\hat{\mathbf{x}}}\_1 = \mathbf{x}\_2 + \hat{d}\_1 - \lambda\_1 \text{sig}^{g\_1}(\hat{\mathbf{x}}\_1 - \mathbf{x}\_1) \\ \dot{\hat{d}}\_1 = -\lambda\_2 \text{sign}(\hat{\mathbf{x}}\_1 - \mathbf{x}\_1) \end{cases} \tag{17}$$

$$\begin{cases} \dot{\hat{\mathbf{x}}}\_{2} = -a\_1 \hat{\mathbf{x}}\_{22} - a\_2 b\_3 \hat{\mathbf{x}}\_{11} - a\_2 b\_4 u\_q + \hat{d}\_2 + a\_1 \hat{d}\_1 - \overline{\lambda}\_1 \text{sig}^{g\_2}(\hat{\mathbf{x}}\_2 - \overline{\mathbf{x}}\_2) \\\ \dot{\hat{d}}\_2 = -\overline{\lambda}\_2 \text{sign}(\hat{\mathbf{x}}\_2 - \overline{\mathbf{x}}\_2) \end{cases} \tag{18}$$

where, λ1, λ2, λ1, λ<sup>2</sup> are the observation gain of the finite time observer, β1, β<sup>2</sup> are the fractional power of the finite time observer, ˆ *x*1, ˆ *x*2, ˆ *d*1, ˆ *d*<sup>2</sup> are the estimated values of *x*1, *x*2, *d*1, *d*2. The following function can be acquired ˆ *d* = *a*<sup>1</sup> ˆ *d*<sup>1</sup> + ˆ *d*2, where, ˆ *d* is the estimated value of *d*.

Proof: The estimated errors are defined as *<sup>x</sup>*<sup>1</sup> <sup>=</sup> <sup>ˆ</sup> *x*<sup>1</sup> − *x*1, *d* <sup>1</sup> <sup>=</sup> <sup>ˆ</sup> *d*<sup>1</sup> − *d*1. The error equation obtained by system (7) and system (17) can be expressed as

$$\begin{cases} \dot{\widetilde{\boldsymbol{x}}}\_{1} = \widetilde{\boldsymbol{d}}\_{1} - \lambda\_{1} \text{sig}^{\beta\_{1}}(\widetilde{\boldsymbol{x}}\_{1})\\ \dot{\widetilde{\boldsymbol{d}}}\_{1} = -\lambda\_{2} \text{sig}^{\beta\_{2}}(\widetilde{\boldsymbol{x}}\_{1}) - \dot{\boldsymbol{d}}\_{1} \end{cases} \tag{19}$$

From Assumption 1, <sup>−</sup>*<sup>L</sup>* <sup>≤</sup> . *d*<sup>1</sup> ≤ *L* can be obtained. When the gain meets (15), the error system can be reached stability within a finite time. Namely, ˆ *d*<sup>1</sup> can converge to the true value *d*<sup>1</sup> in finite time. After this moment, ˆ *<sup>d</sup>*<sup>1</sup> <sup>≡</sup> *<sup>d</sup>*1, <sup>ˆ</sup> *<sup>x</sup>*<sup>1</sup> <sup>≡</sup> *<sup>x</sup>*<sup>1</sup> are always true. Then *<sup>x</sup>*<sup>2</sup> <sup>≡</sup> *<sup>x</sup>*<sup>2</sup> <sup>+</sup> <sup>ˆ</sup> *d*<sup>1</sup> is true. The proof of the finite time stability of the error system for the system (17) is the same as above.

In conclusion, the observation state (ˆ *x*1, ˆ *x*2, ˆ *d*1, ˆ *d*2) estimated by the finite time observer will converge to the actual values (*x*1, *x*2, *d*1, *d*2) of system (7) and system (18) within a finite time.

#### *3.2. Non-Singular Terminal Sliding Mode Control*

Consider the following second-order system

$$\begin{cases}
\dot{\varepsilon}\_1 = \varepsilon\_2 \\
\dot{\varepsilon}\_2 = f(\varepsilon) + u + d(t)
\end{cases} \tag{20}$$

where, *<sup>e</sup>*1,*e*<sup>2</sup> are the state variables, *<sup>d</sup>*(*t*) is the disturbance, *d*(*t*) <sup>≤</sup> *<sup>D</sup>*.

The non-singular terminal sliding mode surface is selected as follows

$$s = c\_1 + \frac{1}{\eta}e\_2^{p/q} \tag{21}$$

where, η > 0, and *p* > *q* > 0 are odd.

In order to make the system state converge to the actual value in finite time, the control law can be designed as

$$u = -(D + \varepsilon) \text{sign}(s) - f(e) - \eta \frac{q}{p} e\_2^{2 - p/q} \tag{22}$$

where, ε is the robustness coefficient, ε > 0, 1 < *p*/*q* < 2.

In order to prove the stability of the designed system, the Lyapunov function is selected as

$$V = \frac{1}{2}s^2\tag{23}$$

The derivative of *V* is as following .

$$\begin{array}{lcl} V &= \text{s} \\ &= s(\dot{e}\_1 + \frac{1}{\eta} \frac{p}{q} e\_2^{p/q - 1} \dot{e}\_2) \\ &= s[e\_2 + \frac{1}{\eta} \frac{p}{q} e\_2^{p/q - 1} (f(e) + u + d(t))] \\ &= s[e\_2 + \frac{1}{\eta} \frac{p}{q} e\_2^{p/q - 1} (f(e) + u + d(t))] \\ &= s[e\_2 + \frac{1}{\eta} \frac{p}{q} e\_2^{p/q - 1} (-(D + \varepsilon) \text{sign}(s) - \eta \frac{q}{p} e\_2^{2 - p/q} + d(t))] \\ &= s[\frac{1}{\eta} \frac{p}{q} e\_2^{p/q - 1} (-(D + \varepsilon) \text{sign}(s) + d(t))] \\ &\leq \frac{1}{\eta} \frac{p}{q} e\_2^{p/q - 1} (-\varepsilon)|\mathbf{s}| \end{array} \tag{24}$$

where *p*, *q* are positive odd integers and 1 < *p*/*q* < 2, thus *e p*/*q*−1 <sup>2</sup> <sup>&</sup>gt; 0. Then . *V* < 0 is always true.

According to the above analysis, the control law (22) designed for system (20) can ensure the system convergence.

Assume that the system state reaches the sliding mode surface at *tr*, that is to say *s*(*tr*) = 0, then

$$\begin{cases} \ \mathfrak{e}\_1 + \frac{1}{\eta} \mathfrak{e}\_2^{p/q} = 0\\ \ i\_1 = \eta \mathfrak{e}\_1^{q/p} \end{cases} \tag{25}$$

The time it takes for the system to stabilize to the equilibrium point can be expressed as

$$t\_s = \frac{p}{\eta(p-q)} \left| c\_1(t\_r) \right|^{1-q/p} \tag{26}$$

As can be seen from the time function (26), the larger η is, the smaller *ts* is to the stable state; However, if η is too large, the effect of switching item will be strengthened due to the change of *s* symbol, and the control output will be weakened.

For system (16) (17) (18), the non-singular terminal sliding mode surface function is selected as

$$s = \overline{\mathbf{x}}\_1 + \frac{\mathbf{1}\_2}{\eta} \overline{\mathbf{x}}\_2^{p/q} \tag{27}$$

The control law is designed as

$$u\_q = \frac{1}{a\_2 b\_4} [-a\_1 \hat{\mathbf{x}}\_2 - a\_2 b\_3 \overline{\mathbf{x}}\_1 + \hat{d} + \eta \frac{q}{p} \hat{\mathbf{x}}\_2^{2 - p/q} + (D + \varepsilon)sign(s)] \tag{28}$$

Choose the Lyapunov function as

$$V = \frac{1}{2}s^2\tag{29}$$

Derivation of (29)

$$\begin{split} \dot{V} &= s \dot{\mathbf{x}} \\ &= s(\dot{\overline{\mathbf{x}}}\_1 + \frac{1}{\eta} \frac{p}{\eta} \frac{\Delta^{p/q - 1} \dot{\underline{\mathbf{x}}}\_2}{\Delta}) \\ &= s(\dot{\overline{\mathbf{x}}}\_2 + \frac{1}{\eta} \frac{p}{\eta} \dot{\overline{\mathbf{x}}}\_2^{p/q - 1} (-a\_1 \dot{\overline{\mathbf{x}}}\_2 - a\_2 b\_3 \overline{\mathbf{x}}\_1 - a\_2 b\_4 u\_q + d) \end{split} \tag{30}$$

Consider the control law (28)

$$\begin{array}{l} \dot{V} &= s \lfloor \frac{1}{\eta} \frac{p}{q} \hat{\mathbf{x}}\_2^{p/q - 1} (-(D + \varepsilon) \text{sign}(\mathbf{s}) - \hat{d} + d) \rfloor \\ &= s \lfloor \frac{1}{\eta} \frac{p}{q} \hat{\mathbf{x}}\_2^{p/q - 1} (-\varepsilon \text{sign}(\mathbf{s}) + d - \hat{d} - D \text{sign}(\mathbf{s})) \rfloor \\ &\leq \frac{1}{\eta} \frac{p}{q} \hat{\mathbf{x}}\_2^{p/q - 1} (-\varepsilon) \|\mathbf{s}\| \\ &\leq 0 \end{array} \tag{31}$$

In (31), *p*, *q* are positive odd integers and 1 < *p*/*q* < 2, thus ˆ *x p*/*q*−1 <sup>2</sup> <sup>&</sup>gt; 0 is true, and η > 0, so <sup>1</sup> η *p <sup>q</sup>* |*s*| > 0 is true, because ε > 0, then <sup>1</sup> η *p q* ˆ *x p*/*q*−1 <sup>2</sup> (−ε)|*s*| < 0 can be proved.

It can be known from (31) that the second-order PMSM system can reach a stable state in a finite time based on the composite strategy of finite time observer and non-singular fast terminal sliding mode.

#### **4. Simulation and Analysis**

In order to verify the effectiveness of the proposed method, comparative simulations are built on the traditional cascade PID, cascade sliding mode, and the proposed method this paper. The simulations are based on Asus notebook FX503VD, Intel(R)Core i7 7700HQ, CPU@2.80GHz, RAM 7.88GB (Hynix DDR4 2400MHz), SanDiskSD8SN8U128G1002(128GB/solid state disk), Nvidia GeForce GTX 1050 (4GB/Asus), 64-bit operating system, matlab 2017b (ASUSTek Computer Inc., Taiwan, China). In order to ensure the fairness of the comparison, the bus voltage is set to 36 V. The reference speed of PMSM is set at 1000 r/min. The PMSM parameters used for simulation are shown in Table 1. The parameters of the traditional cascade PID, the traditional cascade sliding mode control and NTSMC-FTO proposed in this paper are shown in Tables 2–4, respectively. In cascade SMC controller, SMC and PID are used for speed loop and current loop, respectively. *s* = *cx*<sup>1</sup> + *x*<sup>2</sup> is taken as the sliding mode surface of SMC, and *i* ∗ *<sup>q</sup>* <sup>=</sup> <sup>2</sup>*<sup>J</sup>* 3*np*ψ*<sup>f</sup>* \* *t* <sup>0</sup> [*c*(*x*2) + *Mu* × *sign*(*s*) + κ*s*]*dt* as the expression of output.


**Table 1.** Rated parameters of the permanent magnet synchronous motor (PMSM).



**Table 3.** The cascade sliding mode control (SMC) controller.


**Table 4.** The proposed controller this paper.


There are two groups of comparative simulations, one is the response curve at the phase of startup, and the other is the response curve when the load torque suddenly changes at a constant speed stage. It can be found from the comparison results that the NTSMC-FTO proposed in this paper, which regulate the speed and current of PMSM in one loop, has a better dynamic performance and disturbance rejection property than the traditional PID and SMC.

Case I: Phase of start. The reference speed of PMSM is set at 1000 r/min, and the motor starts without load torque. Figure 2a–c are ω, *iq*, *id* response curves of startup, respectively. The solid (blue) line is NTSMC-FTO controller, the dotted (pink) line is PID controller, and the dotted (black) line is SMC controller. It can be summarized that when the motor starts without speed overshoot, When the motor starts without speed overshoot, it takes 0.0028 s for NTSMC-FTO to reach the steady state, compared with the cascade SMC and PID 0.045 s is needed. The cost to reach steady state is reduced by 0.0422 s. The *d*-axis and *q*-axis currents chattering of NTSMC-FTO are smaller than the cascade SMC and PID controller. The comparative simulation results of startup can be seen in Table 5.


**Table 5.** The comparative simulation results of start up.

Case II: Load torque is changed suddenly. The load torque has a sudden change from *TL* = 0 N · m to *TL* = 0.1 N · m at *t* = 0.1 s. Figure 3a–c, are ω, *iq*, *id* response curves of load torque sudden change, respectively. When the load torque changed suddenly, the speed of NTSMC-FTO is decreased by 2.5 r/min (0.25%), while SMC and PID are 87 r/min (8.7%) and 74 r/min (7.4%), respectively. The recovery time of NTSMC-FTO, SMC and PID to 1000 r/min are 0.0004s, 0.06s and 0.06 s, respectively. The comparative simulation results of load changed suddenly can be seen in Table 6.

**Table 6.** The comparative simulation results of load changed suddenly.


**Figure 2.** Performance comparisons under the PID, permanent magnet synchronous motor (SMC) and NTSMC-FTO at the phase of startup. (**a**) Speed response curves. (**b**) *d*-axis current curves. (**c**) *q*-axis current curves.

**Figure 3.** Performance comparisons under the PID, SMC and NTSMC-FTO with sudden load torque change. (**a**) Speed response curves. (**b**) *d*-axis current curves. (**c**) *q*-axis current curves.

.

Figure 4a,b are disturbance *d*<sup>1</sup> and disturbance *d*<sup>2</sup> curves estimated by the finite time observers, respectively.

It can be concluded that compared with the traditional SMC and PID, the NTSMC-FTO proposed in this paper, which put the speed and current in one loop to regulate, has a faster tracking speed and a better disturbance rejection performance, demonstrating that the proposed method in this paper has strong robustness.

**Figure 4.** The estimated value based on the finite-time observer. (**a**)The estimated value of *d1* based on the finite-time observer. (**b**)The estimated value of *d2* based on the finite-time observer.

#### **5. Conclusions**

In this paper, a novel speed-current single-loop controller for the PMSM drive system has been proposed. Simulations have verified that compared with the cascade PID and cascade SMC method, the proposed method has a faster start up response and a better disturbance rejection performance. The disturbance can be accurately estimated and compensated by the proposed disturbance observer. Future research can be carried out from the state constraint of the proposed method to reduce the *q*-axis transient current and improve the safety of the system.

**Author Contributions:** This is a joint work and the authors were in charge of their expertise and capability: Y.W. (Yao Wang) for investigation and analysis; H.Y. for funding support; Z.C., Y.W. (Yuchen Wang), and Y.L. for manuscript revision.

**Funding:** This research was supported by National Natural Science Foundation of China (NSFC) under Grant 41576096.

**Acknowledgments:** The authors would like to express their gratitude to all those who helped them during the writing of this paper. And the authors would like to thank the reviewers for their valuable comments and suggestions.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
