Robust Speed Control for Permanent Magnet Synchronous Motors Using a Generalized Predictive Controller With a High-Order Terminal Sliding-Mode Observer

This paper reports the optimal speed control of a permanent magnet synchronous motor (PMSM) system. The predictive control method is an effective strategy for a fast dynamic response. The undesirable performance in the presence of system disturbances, including internal model uncertainties and external load disturbances, is analyzed. To achieve a fast response and ensure stronger robustness and improved disturbance rejection performance simultaneously, a robust generalized predictive controller (GPC) with a high-order terminal sliding-mode observer (HOTSMO) is proposed for a PMSM control system. The proposed observer can estimate the unknown disturbances with chattering elimination. A feed-forward compensation based on the estimated disturbances is provided to the predictive speed controller. The simulation and experimental results show that the proposed control method can achieve a better speed dynamic response and a stronger robustness.


I. INTRODUCTION
The permanent magnet synchronous motor (PMSM) has been gradually replacing DC and induction motors for a wide range of drive applications, because of its advantages such as high efficiency, high power density, high torque-toinertia ratio, and good reliability [1], [2]. However, it remains challenging to control the PMSM and achieve a good transient performance under all operating conditions. The main disadvantage of the PMSM is the need for a complex controller to achieve high performance in practical applications owing to its nonlinear multivariable dynamics, parameter perturbation, and unknown external disturbances during operation [3], [4].
The field orientation control (FOC) strategy is widely employed in industrial applications for PMSM control, owing The associate editor coordinating the review of this article and approving it for publication was Nasim Ullah. to its fast and fully decoupled control of the torque and flux [5]. In an FOC-based PMSM drive system, a cascade control structure with two inner current control loops and an outer speed control loop is usually employed [6]. This paper focuses on the speed control problem, which directly affects the motor efficiency and reliable operation. A classical approach is realized using a cascade configuration of proportional integral (PI) controllers, owing to the simple idea and facile implementation. Generally, the parameter settings of PI controllers only correspond to some specific working conditions [5]. However, in a practical PMSM system, the speed control is usually unmodeled and time varying because of system disturbances including internal disturbances (parameter variation and unmodeled dynamics) and external disturbances (unknown sudden load torque changes) [7]. It is difficult to achieve a fast response and a strong robustness in practical applications using only linear control methods such the PI control algorithm [8].
Among these advanced control schemes, the model predictive control (MPC) method is an effective alternative for a PMSM control system, owing to the simplicity of modeling, fast response, and full compatibility with digital controllers [6]. With the advancements in digital signal processors (DSPs) and field programmable gate array (FPGA) technologies, the MPC method has been successfully applied to PMSM control systems [19], [20].
The MPC method is recognized by many researchers as an optimal control method. An optimal control law is designed by minimizing a cost function, which is composed of the difference between the desired output and the reference trajectory. Naturally, this may yield an optimal predictive control and offset-free tracking in the absence of disturbances and plant model mismatch [19].
In [21]- [23], discrete time models have been established in the design of controllers, wherein an explicit discrete model of the controlled system was developed to forecast the future states of the system and to determine a future control action sequence that minimizes a designed cost function. Only the first value of the sequence was applied, and the method was implemented again for every sampling period. To realize computer implementation, an integrator was embedded in the discrete MPC design. Because of the embedded integrator, the discrete MPC method can mitigate the effects of parameter variations and external disturbances of the system in applications. However, the discrete MPC method imposes a heavy online computation burden, particularly for electric motor control systems [3], [19].
To realize a fast dynamic response and easy implementation for real-time applications, a generalized predictive controller (GPC) has been proposed for a PMSM based on the continuous time system [24]. Based on a continuous time model, the finite horizon output variables and the predicted reference are approximated using the Taylor series expansion, and the predictive control law of the nominal system is derived through the defined cost function composed of the predicted output and the predicted reference [6], [24]. Owing to the fast dynamic response, simple computation steps, and easy implementation, the GPC method is effective for the speed tracking control of PMSM systems.
However, the GPC method is based on the nominal model of the controlled plant without considering load disturbances or plant model mismatch. Moreover, the GPC method based on the Taylor series expansion will not ensure a completely zero steady-state error under conditions of mismatched parameters and external perturbation [19]. In fact, the PMSM system faces unavoidable disturbance and parameter variations. Therefore, it is difficult to obtain the exact model and parameters of the plant in a practical system. The performance will be deteriorated in the presence of model uncertainties and sudden load disturbances [25].
A high-performance PMSM system must have a fast dynamic response, preferably without overshoot, and a high steady-state accuracy [5]. For improvement, an integral component has been combined in the GPC to overcome the effects of parameter mismatches and external disturbances on the closed-loop system [19], [26]. A zero steady-state error is then realized using an integrator, which is embedded in the controller by modifying the tracking error. Information on the external perturbation or uncertainties is not required. However, to rapidly reduce the influence of system disturbances on the velocity, a high integral coefficient is required. A global integral structure with a fixed integral coefficient may cause an undesirable overshoot in the dynamic response process, particularly when the speed command changes rapidly [20].
Furthermore, a sliding-mode composite compensation structure is directly embedded in the GPC. This method can improve the robustness of the system owing to its switch structure. When the system parameters mismatch or change slowly, a good control performance can be obtained with this approach; however, when the system has external disturbances, particularly when the motor has a low inertia, the load mutation will produce a significant disturbance term in the actual motion model. To overcome this problem, the slidingmode direct compensation structure requires a higher switch gain, and this discontinuous gain significantly increases system chattering. In [16], [17], a novel approach law with a variable gain has been proposed to improve the dynamic response performance of a sliding-mode structure. In [27], a soft-switching sliding-mode observer with a flexible boundary layer was designed using a sinusoidal saturation function to reduce chattering phenomenon. In [28], an adaptive rate was combined with a sliding-mode compensation structure to avoid using a high control gain in the entire control procedure, and the effect of system uncertainties was avoided by estimating the real system uncertainties on-line. In [25], a high-order sliding-mode control compensation approach was proposed to reduce the influence of unmeasured parameters and eliminate chattering. However, these methods are all based on the speed tracking error, and they will complicate the design of speed controllers.
On the other hand, a disturbance observer-based method has been developed to ensure an offset-free performance of the GPC. The observer can be used to estimate unmodeled disturbances, and a feed-forward compensation item based on the estimated disturbances is incorporated in the generalized predictive speed controller. In disturbance observer-based control methods, including the disturbance observer (DOB) and sliding-mode observer (SMO), a linear disturbance observer is conventionally employed owing to its simple structure; however, its dynamic performance and robustness are limited [18]. Compared with the DOB-based method, the SMO-based method has many advantages such as robustness to disturbances, insensitivity to parameter variations, and flexible gain coefficient adjustment [29], [30]. In [29], [31], a sliding-mode observer was applied to estimate the system parameters, obtaining good observation results. In [8], [27], an SMO was employed to observe external disturbances, and a feed-forward compensation technique was used to compensate the disturbances. In [31], the low-pass filter (LPF) effect and chattering phenomenon of the SMO were discussed. The SMO can be used to accurately observe the disturbances with reduced chattering by appropriately designing the control and feedback gains. This observer compromises between the response speed and chattering suppression. In [15], [32], a terminal sliding-mode control method was proposed to achieve faster convergence and to reduce the steady-state tracking errors. In [33], [34], a novel high-order sliding-mode observer (HOSMO) with a nonlinear terminal sliding-mode (TSM) surface algorithm was designed to be equivalent to a low-pass filter, which can mitigate the switching control signal and achieve a finite time convergence without affecting the robustness. In addition, the stability and robustness of the high-order sliding-mode method based on a TSM surface have been proven [35].
Given the aforementioned problems, this paper proposes a robust GPC with a high-order terminal sliding-mode observer (HOTSMO) to obtain a fast dynamic response and ensure a simple control structure. The proposed method can achieve zero offset tracking and improved disturbance rejection performance for a PMSM system. First, a GPC for a PMSM system based on the continuous time model is designed. Furthermore, its dynamic and steady-state performances are analyzed, and its convergence is proven using the Lyapunov theory. The proposed HOTSMO is established to estimate the system disturbances and immediately provide feedback to the GPC to eliminate the speed tracking error and mitigate fluctuations due to system disturbances. Moreover, the proposed observer can not only ensure a fast convergence for the estimated system disturbances, but also eliminate the inherent chattering of the conventional sliding mode control-based observer. This designed controller attempts to combine the advantages of both predictive control and sliding-mode control, and the controller parameters can be easily adjusted.
The rest of this paper is organized as follows. In Section II, the mathematical model of a PMSM system and the implementation approach of the GPC are introduced. In Section III, the design of the HOTSMO method is presented. Section IV presents a simulation performed using MATLAB and the results of an experiment conducted on a digital control system using the GPC + HOTSMO method for a PMSM system. The conclusions of this study are given in Section V.

II. DESIGN OF GENERALIZED PREDICTIVE CONTROLLER A. MATHEMATICAL MODEL OF THE PMSM
The current mathematical model for a PMSM in the dq-synchronous reference frame can be expressed as follows: where i d and i q are the stator currents in the dq-axis, u d and u q are the stator voltages in the dq-axis, L d = L q = L s is the stator winding inductance, R s is the stator winding resistance, ψ f is the permanent magnet flux linkage, ω m is the rotor mechanical angular velocity, and n p is the number of pole pairs. Based on a rotor flux orientation control (FOC) strategy (id = 0), the mechanical motion equation can be written in the dq-synchronous rotating reference frame, and the mathematical model of a PMSM system can be expressed as follows: where J is the moment of inertia, T e is the electromagnetic torque, T L is the load torque, F is the viscous friction coefficient, and K t is the torque coefficient. For a surface-mounted PMSM (L d = L q ) based on the FOC strategy, i d = 0 is used for the controller, and the term ( (3) is approximated to zero. During the operation of the PMSM, the motor mechanical parameters, such as the viscous friction coefficient and the torque coefficient, may vary because of the effects of temperature and working environment. In the presence of parameter variations, the dynamic motion equation of the PMSM can expressed as follows: F 0 , f 0 , and J 0 are the initially set values, F, f , and J are the mismatched values of the corresponding model parameters, and d represents the external load disturbance.
Considering the parameter mismatches between the design of the speed controller and the actual operation, the above equation can be rewritten as follows: where f represents the unknown total system disturbances due to parameter mismatches and external load disturbances. It is defined as follows: f can also be expressed as: where The above term represents the internal disturbances due to parameter mismatches, and d represents the external disturbance due to sudden load torque changes.

B. DESIGN OF GENERALIZED PREDICTIVE SPEED CONTROLLER FOR THE PMSM
According to (2), (3), and (5), the mathematical model of the PMSM can be established as: The GPC method based on the continuous time model is introduced for the speed control. ω * m is the reference motor speed, the state variable is x = ω m , the input variable u(t) = i q , the output variable y = x = ω m , and the disturbance f includes the model uncertainties and the load torque term. Accordingly, the predictive output and predictive reference can be respectively defined as follows.
where y(t + τ ) and y r (t + τ ) represent the predictive output and the predictive reference value, respectively. Further, the cost function needs to be selected. The cost function reflects the requirements of the control system performance. In the speed control system of a PMSM, which belongs to a tracking control system, the objective of the GPC is to find the predictive control action and to ensure that the future plant output y(t + τ ) can optimally track a future reference trajectory y r (t +τ ). This can be done by solving the minimization of the cost function defined by: where J p is the cost function, and T p is the predictive horizon.
To solve the optimization problem (10), the predicted output y(t + τ ) is expanded into a 1 st order Taylor series expansion. Similarly, the predicted reference y r (t + τ ) is approximated by a 1 st order Taylor series expansion [19].
The predicted output y(t + τ ) and the predicted reference y r (t + τ ) can be expressed as: We define the tracking error e(t) = y r (t) − y(t), and the predictive tracking error can be expressed as: According to (10) and (14), the cost function can be rewritten as follows: The equation above can be rewritten through definite integral calculation as: where The necessary condition for finding the predictive control action u p (t) that minimizes J p is given by: Differentiating the cost function J p with respect to control action u(t) and combining with (8) and (16), we can express (17) as: According to (8) and (18), without considering the disturbance term, the predictive control action of the nominal system u p (t) can be derived: With this control law, the controller can realize a fast dynamic response; however, in industrial applications, the control performance of the predictive speed controller will deteriorate in the presence of significant parameter mismatches and/or external disturbances. In particular, for a motor with a low moment of inertia, the external disturbances will cause a serious steady-state error, as shown in Fig. 1.
According to the analysis above, it should be noted that the PMSM usually faces unmodeled, time varying, external disturbances because of the influence of the operating conditions. Therefore, for a high-speed control performance of the PMSM, all the parameter uncertainties and unknown external disturbances must be considered in the controller design [28].
To improve the robustness of the GPC and ensure a fast dynamic response, a sliding-mode direct compensation structure is introduced in the speed controller. The slidingmode control compensation action u dc is a discontinuous VOLUME 7, 2019 control action. It is used to eliminate the speed tracking error and mitigate fluctuations due to system disturbances f . The predictive control action u p provides the basis for the design of the speed controller [6]. According to (8) and (19), we obtain: The optimal control law can be determined:  Further, the stability of the system needs to be proven. The Lyapunov function is expressed as follows: The derivative of V with respect to time t can be expressed as follows: where T p > 0 is the predictive time, and k > 0 is the controller coefficient. To satisfy the finite-time Lyapunov stability theory, the derivative of the Lyapunov functionV ≤ 0 should be determined. This requires e[εsgn(e) + Ef ] ≥ 0, which can be simplified as follows: The sliding-mode discontinuous control gain ε can be obtained as follows: The following equation can be satisfied: From (26), the proposed GPC speed control system is found to be locally and asymptotically stable. In addition, considering the disturbance terms in (5) and (7), including the parameter perturbation and external load disturbance, (25) can be rewritten as follows: where δ is the internal system disturbance due to parameter perturbation; this varies gradually with a low magnitude, and d represents the external disturbance due to sudden changes in load torque; this can vary at a high rate or by a high amplitude. In particular, for a motor with a low moment of inertia, in order to satisfy (27), a high discontinuous control gain is required. However, a discontinuously high gain will cause an undesirable chattering phenomenon. As shown in Fig. 3, the system applies an external disturbance of 0.6 N · m, and as the controller has a lower discontinuous control gain, the speed response will exhibit a steady-state error. On the contrary, when the controller has a higher discontinuous control gain, the speed response will lead to significant chattering phenomenon.

III. DESIGN OF HIGH-ORDER TERMINAL SLIDING-MODE OBSERVER
To avoid complicating the structure of the basic GPC while ensuring a fast dynamic response and overcoming the influence of system disturbances on the speed control performance, a robust GPC with a HOTSMO is proposed. A feed-forward compensation technique based on the HOTSMO is incorporated in the GPC.
The key to realizing the proposed robust GPC with a HOTSMO is the use of the designed observer for estimating the disturbances due to parameter mismatches and external load disturbances and immediately providing feed-forward compensation to the GPC. The chattering phenomenon of the system can be reduced.
According to (2) and (3), considering that the PMSM system will be affected by parameter mismatches and external disturbances during operation, the mathematical model of the PMSM system for practical applications can be expressed as follows: where c is the derivative of the system disturbances [31].
According to (28), the mechanical angular velocity ω m and the system disturbances f are defined as state variables. The extended state space equation of the sliding-mode observer can be expressed as follows: whereω m is the estimated value of the mechanical angular velocity,f is the estimated value of the system disturbances, and g smo is the sliding-mode control function with the mechanical angular velocity observation error e ω . The observation errors of the mechanical angular velocity e ω and the system disturbances e f are defined as follows: Combining the above equations with (28), and (29), we can write the equation for the derivative of the observation error as: On the one hand, the design of the sliding-mode surface determines the observation quality of the SMO, and a fast terminal sliding surface (FTSM) is designed as: where s is the sliding surface, α, β > 0 are constants, p and q are all odd numbers, and 0 < p/q < 1. Compared with the conventional linear sliding-mode surface, the presented nonlinear FTSM surfaces (32) can lead to faster and finite-time convergence and a higher steady-state tracking precision [12], [33].
On the other hand, a high-order sliding-mode observer (HOSMO) is designed to achieve chatter-free control by shifting the discontinuous control to the derivative of the control law. In this paper, the HOTSMO combined with an FTSM surface is presented. Fig. 4 shows the block diagram of the HOTSMO. The sliding-mode control function g smo can be obtained as follows:  where v(0) = 0, l 1 is the control gain, l 2 is the feedback gain, and T ω > 0 is the designed parameter. The observer can achieve a satisfactory observation performance by adjusting the parameters l 1 , l 2 , and T ω appropriately. Further, the sliding-mode surface s can be rewritten by substituting the (first equation in) (31) and (33) into (32) as follows: The derivative of s with respect to time t can be expressed as follows:ṡ The following can be obtained by combining (the second equation in) (31) and (34) into (37): Equation (38) can be rewritten by combining with (35), as follows:ṡ Proof: The Lyapunov function V ω is expressed as: Thus, combining with (39), the derivative of V ω with respect to time t can be expressed as follows: where J 0 > 0. To satisfy the finite-time Lyapunov stability theory, the derivative of the Lyapunov functionV ω ≤ 0 should be determined, which requires the following to be satisfied:   Therefore, the sliding-mode control gain l 1 and feedback gain l 2 can be obtained as follows:

IV. SIMULATION AND EXPERIMENTAL RESULTS
To demonstrate the effectiveness of the proposed control method, a model of the PMSM system was established using MATLAB/Simulink. Experiments were then conducted on a PMSM drive system. This section reports the results. Fig. 5 shows the entire structure of the GPC with a HOTSMO. Table 1 lists the PMSM parameters of the experiment system.

A. SIMULATION RESULTS AND ANALYSIS
The simulation was conducted under parameter mismatches and a step external load disturbance to test the performance of the proposed GPC + HOTSMO.  As shown in Figs. 1 and 3, the performance of the conventional GPC without compensation will deteriorate in the presence of disturbances, including parameter perturbation, i.e., parameter mismatches and external disturbance. When the system suffers these disturbances, a steady-state error will occur in the speed response.   As mentioned previously, to ensure a fast response of the GPC and overcome the adverse influence of unknown disturbances on the speed control performance, a highorder sliding-mode terminal observer is established, and a feed-forward compensation technology is incorporated in the speed controller. Totest the dynamic response performance, the system is required to track an alternate speed step instruction of ±480 rpm. Fig. 6 shows the results based on the PI method only and the proposed GPC with the HOTSMO. Compared with the PI method, the GPC with the HOTSMO method has a faster response with no overshoot.
To test the disturbance rejection performance and robustness, the reference speed is set to 600 rpm while the motor is idlin, after whichthe system applies an external step disturbance of 0.6 N · m. Figs. 7(a), (b), and (c) show the results based on the proposed GPC + HOTSMO method   the conventional GPC method shown in Figs. 1 and 3, the observer can estimate the unknown system disturbances, and the speed tracking performance is improved by feedforward compensation. Fig. 8 shows the results based on the PI and the proposed GPC + HOTSMO method. Compared with the PI method, the speed fluctuatio due tothe disturbance is reduce significantl under the proposed method. Fig. 9 shows the observed results of the external load disturbance d.

B. EXPERIMENTAL RESULTS AND ANALYSIS
To further verify the performance of the proposed GPC with the HOTSMO, experiments were conducted on a PMSM drive system. Fig. 10 shows the experimental platform. The proposed control method is realized based on DSP-TMS320F28335 and FPGA-EP3C40F324-based drive setups. The sampling frequency of the speed controller is 1 kHz, and the counterpart frequency of the current controller is 10 kHz. Fig. 11 shows the configuration of the DSP and FPGA-based experimental setup.
First, the robustness of the GPC is tested when the parameter is mismatched. Fig. 12 shows the results based on the GPC without a compensation structure. As shown in Fig. 12(a), the parameter F is mismatched by F = 0.25F 0 , F = 0.5F 0 , F = 1F 0 , F = 2F 0 , and F = 3F 0 from 0 to 3 s, 3 to 6 s, 6 to 9 s, 9 to 12 s, and 12 to 15 s, respectively. As shown in Fig. 12(b), the parameter f is mismatched by f = 0.3 f 0 , from 0 to 3 s, 3 to 6 s, 6 to 9 s, 9 to 12 s, and 12 to 15 s, respectively. The performance of the GPC with the HOTSMO is then tested. Fig. 13 shows the results. As shown in Fig. 13(a), the parameter F is mismatched by F = 0.25F 0 , F = 0.5F 0 , F = 1F 0 , F = 2F 0 , and F = 3F 0 during the same time interval as those shown in Fig. 12. As shown in Fig. 13(b), the parameter f is mismatched by f = 0.3 f 0 , f = 0.5 f 0 , f 0 = 1 f , f 0 = 2 f 0 , and f = 3 f 0 during the same time interval as those shown in Fig. 12.
Second, the dynamic response performance of the GPC with the HOTSMO is tested. Fig. 14 shows the results obtained using the PI method and the proposed method. As shown in Fig. 14(a), the motor is operated to track an alternate speed instruction of ±480 rpm. Compared with the PI method, the proposed method has a faster response with few overshoot. Taking the first step response as an example, the rise time of the PI method is 0.24 s; the proposed method reduces this time to 0.13 s. Furthermore, the GPC parameters can be easily adjusted simply by predicting the time T p .
Finally, the disturbance rejection performance of the proposed method is tested. Figs. 15-17 show the results based on the PI method, GPC method without a compensation  structure, and the proposed method, respectively. The reference speed is set as 600 rpm while the motor is idlin, after which an external disturbance of 0.6 N · mis applied to the system at5 s and unloaded at 10 s.
As shown in Figs. 15-17, the proposed GPC + HOTSMO method significantly increases the ability of the system to withstand disturbances. Taking the loading response as an example, the maximum speed fluctuation under the PI method is 72 rpm; the proposed method reduces the maximum speed fluctuation to 36 rpm. The maximum speed fluctuation is reduced by 6%. In the reaching phase, the proposed method can achieve a faster response, with little overshoot. The above simulation and experimental results show that the proposed method has a simple structure and is effective in obtaining a better control performance and a stronger robustness for a PMSM speed control system.   Table 2 shows the performance comparisons between the PI and GPC + HOTSMO methods.

V. CONCLUSION
In this study, a robust generalized predictive controller (GPC) with a high-order terminal sliding-mode observer (HOTSMO) was developed for the speed control system of a PMSM. This method based on a continuous time model could achieve an optimal speed control in an embedded system. The designed predictive controller enabled the system to attain a better dynamic response, while keeping the control structure of the controller simple. Moreover, the proposed HOTSMO could accurately estimate the disturbances of the system, and the obtained disturbances were immediately provided as feedback to the GPC to improve the robustness and disturbance rejection performance of the system. The simulation and experimental results showed that the GPC + HOTSMO method can be effective for PMSM speed control systems, enabling a better control performance and a stronger robustness.