Robust Sliding Mode Control of PMSM Based on Rapid Nonlinear Tracking Differentiator and Disturbance Observer

Torque ripples caused by cogging torque, flux harmonics, and current measurement error seriously restrict the application of a permanent magnet synchronous motor (PMSM), which has been paid more and more attention for the use in inertial stabilized platforms. Sliding mode control (SMC), in parallel with the classical proportional integral (PI) controller, has a high advantage to suppress the torque ripples as its invariance to disturbances. However, since the high switching gain tends to cause chattering and it requires derivative of signals which is not readily obtainable without an acceleration signal sensor. Therefore, this paper proposes a robust SMC scheme based on a rapid nonlinear tracking differentiator (NTD) and a disturbance observer (DOB) to further improve the performance of the SMC. The NTD is employed to providing the derivative of the signal, and the DOB is utilized to estimate the system lumped disturbances, including parameter variations and external disturbances. On the one hand, DOB can compensate the robust SMC speed controller, it can reduce the chattering of SMC on the other hand. Experiments were carried out on an ARM and DSP-based platform. The obtained experimental results demonstrate that the robust SMC scheme has an improved performance with inertia stability and it exhibits a satisfactory anti-disturbance performance compared to the traditional methods.


Introduction
As its attractive characteristics such as efficiency, power density, torque-to-inertia ratio, reliability, etc., the application of permanent magnet synchronous motors (PMSM) on inertial stabilized platforms have been paid more and more attention. Usually, an airborne inertial stabilization photoelectric platform is equipped with visible or infrared cameras, and if we want to obtain stable and clear images, the stability of the platform must be high enough. However, due to the influence of inherent factors, such as the cogging torque of the permanent magnet synchronous motor, the torque ripples caused by the motor during operation seriously affects the performance of the motor. The torque ripples will also produce noise when the servo system is running at high speed and even cause the system to vibrate mechanically at low speed [1][2][3].
There are several ways to weaken the torque ripple from the optimization design of the motor, and it is the most effective means, such as skew of the stator lamination stack or rotor magnetization, skewing and fractional slot pitch windings, increasing the number of phases, dummy slots, and dummy teeth, optimization of the air gap flux distribution, and the magnet pole arc width and position, etc. [4].

Mathematical Model of PMSM
In order to simplify the mathematical model of three phase PMSM in the natural coordinate system, the coordinate transformation usually includes static coordinate transformation (Clark transformation) and synchronous rotation coordinate transformation (Park transformation). The relationship between them is shown in Figure 1, in which ABC is a natural coordinate system, α − β, is a stationary coordinate system, and d − q is a synchronous rotating coordinate system. The coordinate transformation of the natural coordinate system ABC to the stationary coordinate system α − β is the Clark transformation. According to the relationship between the various coordinate systems shown Figure 1, the formula is as follows: It is necessary to point out that for a three-phase symmetric system, the zero-sequence component f 0 can be ignored when calculating.
In order to facilitate the design of the controller, we choose the mathematical model under the synchronous rotating coordinate system d − q [27,28]. The stator voltage equation is as follows: The stator flux equation is as follows: Then we can get a new stator voltage equation: where u d and u q are the stator voltage along the d and q axes, respectively, i d and i q are the stator current along the d and q axes, respectively, R is the stator resistance, ψ d and ψ q are the stator flux linkages along the d and q axes, respectively, ω e is the electrical angular speed, L d and L q are the inductances along the d and q axes, respectively, and ψ f are the flux linkages of the permanent magnet.
According to the Equation (9), we can find that the mathematical model of PMSM is fully decoupled. Then we can get the electromagnetic torque equation: Equations (7)-(10) are the mathematical model for the built-in PMSM, and for the surface mounted PMSM, the stator inductance L d = L q . Then we can obtain: where T e is the electromagnetic torque, p is the number of pole pairs and K t is the torque coefficient. The equation of PMSM dynamic is: where J is the inertia, ω m is the mechanical angular speed, T L is the load torque, and B is the viscous frictional coefficient. In fact, the above model is only obtained under ideal conditions. Parasitic torque pulsations exist in PMSM due to the non-sinusoidal flux density distribution around the air gap, errors in current measurements, and variable magnetic reluctance of the air gap due to the stator slots [8]. The speed of the motor will oscillate as a result, especially at low operating speeds. Therefore, to reduce the speed ripples, an appropriate control strategy is needed to minimize the torque ripple.

Robust Sliding Mode Control
SMC is essentially a kind of nonlinear control method, and its nonlinearity expressed as the discontinuity of the control variables. The difference between SMC and other control strategy is that the "structure" is not fixed. SMC can change according to the current state (such as the error and its derivative) of the system in the dynamic process, forcing the system to move in accordance with the state trajectory of a predetermined "sliding mode". Following is the robust SMC strategy used in this paper.
According to Equation (12), we can obtain the mathematical model of the PMSM: where D is the system lumped disturbance, and θ m is the mechanical angular. In order to facilitate the subsequent deduction, we use B to represent J/K t , to represent D/K t , and remove the subscripts of θ m : Without loss of generality, suppose that the parameters B and d are bounded, |B|≤ ∆ 1 , |d|≤ ∆ 2 . The control objective is e = θ − θ d = 0, and we select the following sliding mode function [29]: where α > 0, and s(e) is the saturation error function, we define that: of which c is an arbitrary constant: Then we can get following properties of ρ(e) and s(e): According to the above formula, we can obtain: and: ..
Multiplied by B on both sides of Equation (20) yields: Then we can get the following sliding mode controller: The following is a proof of its large scale asymptotic stability. According to Equations (21) and (22): Multiplied by σ on both sides of Equation (23) yields: where: According to Equation (18), the positive definite functions v 1 and v 2 can be defined as follows: s(e) . e + α 2 k t s 2 (e) (26) where |c| α∆ 1 , then β can be expressed as: Further we can get: At last, if Lyapunov function is selected as follows: then: .
V is negative definite. Therefore, the stability of the system and the gradual stability of large range can be guaranteed by the sliding mode controller i d .
Further using the boundary layer method to improve the control law yields: where: The overall block diagram of the robust sliding mode control is shown in Figure 2. The field-oriented control (FOC) method is utilized to control the PMSM. The robust sliding mode controller is employed as the speed controller to generate the q-axis reference current i sqre f . In order to obtain maximum electromagnetic torque, i sqre f is always assigned to zero. e is measured by an image tracker, . θ and θ are measured by a gyroscope and an encoder, respectively.

Disturbance Observer
In the above proof we notice that the switching gain η needs to be greater than ∆ 1 ∆ a + ∆ 2 . Generally, ∆ 1 and ∆ a can be obtained or estimated from actual system, but we cannot obtain the exact values of ∆ 2 , because it is not only related to the parameters of the motor itself, but also many factors, such as the tightness of the mechanical installation and the disturbance caused by the cable, and so on. In order to make the system stable, we usually use a high gain, but excessive gain will easily cause the chattering of the system. Thus, a natural idea is that if we observe the disturbance and compensate it in the system, the buffeting effect of the system can be greatly reduced. Equation (14) can be drawn as Figure 3. where P(s) = 1 Bs 2 , a typical DOB based on the nominal model is shown in Figure 4 [30]. where P n (s) is the nominal model of practical system, and P −1 n (s) is its inverse model, Q(s) is a low-pass filter, and ξ is the measurement noise.
This structure uses the inverse of the nominal model to estimate the disturbance, but the relative order of the model is generally greater than one, so it is not physically possible. Additionally, the effect of measurement noise will affect the observation precision. To solve this problem, the inverse of the model can be multiplied by a low-pass filter. According to the relative order of the nominal model above, we can design the low-pass filter as the form of the typical two order system, so that the relative order of the product by the inverse of the model and the low-pass filter will be equal to zero, thus avoiding the direct differentiation of the measured signal. The DOB after structural transformation is shown as shown in Figure 5. Thus, after obtainingδ, the upper bound of ∆ 1 ∆ a + ∆ 2 can be determined approximately. Then the minimum switch gain simply needs to satisfy η ≥ ∆ 1 ∆ a +δ to guarantee the system stability and robustness. This means that the DOB can reduce the minimum switching gain and, thus, reduce the buffeting of the system on the premise of assurance of system robustness.

Rapid Nonlinear Tracking Differentiator
Note that the derivative of the signal is contained in the robust sliding mode control designed above. There are usually no corresponding sensors in the actual system. To obtain the approximate differential of a signal, a nonlinear tracking differentiator (NTD) is a good solution [25,26], as it makes use of the principle of signal tracking and guarantees the quality of the differential. Guo, B.-Z. and Zhao, Z.-L. give the general form of the NTD and gives a proof of it [31].
Suppose that the equilibrium point (0,0) of the following system is globally asymptotically stable: among which f : R 2 → R is a locally Lipschitz continuous function and f (0, 0) = 0. x 10 and x 20 are the initial value. If the differential needed signal r is differentiable and sup t∈[0,∞] . r(t) < ∞, then the following tracking differential: is convergent in the sense that: for every a > 0, z 1R is uniformly convergent to r on [a, ∞) as R → ∞ , where z 10 and z 20 are any given initial value. The selection nonlinear function f in (36) is a key problem which is also the focus of previous research. However, reference [25] pointed out that there are always serious phase lags in the output no matter how the nonlinear function is designed. Thus, the NTD with feedforward is proposed to improve the rapidity: where k (k > 0) is a constant. A detailed proof is given in [25]. According to ([25], Remark 3.1), there is no need for . r(t) in the implementation of the NTD, although the wanted signal differential . r(t) appears in Equation (37).
In this paper, we make a slight improvement to Equation (37): To reduce the impact of the noise of the input signal r(t), a low-pass filter L(s) is added to the feedforward. The cutoff frequency of the L(s) can be designed according to the specific requirements of the practical system.
Thus, the block diagram of proposed robust sliding mode controller based on rapid NTD and DOB can be employed, as shown in Figure 6. It is worth noting that the input signal of the NTD is acquired by adding e and θ, and the output signal of the NTD is . θ d .

Implementation of Experimental System
The composition of the experimental system is shown in Figure 7, whereas Figure 8 shows the photograph of the experimental platform. The experimental system was mounted to a two-axis swing platform which was used to simulate the disturbance of the aircraft to the system. It is composed of a permanent magnet synchronous motor, a single-axis gyroscope, an off-axis encoder, driver, and acquisition circuit, control circuit, image tracker, visible light camera, and so on. The parameters of the tested PMSM is listed in Table 1. The high-precision single-axis gyroscope is employed for measurement of the angular velocity of the relative inertial space of the motor. In order to reduce the effect of friction on the shaft of the motor, an off-axis encoder was used. Unlike the photoelectric encoder, it works by using the principle of magnetic induction. The resolution ratio of the encoder is 360/2 19 degrees and it is an absolute encoder. Angle detection is realized using the DSP (TMS320F28069) through the SPI interface and speed detection is realized using the ARM (STM32F407) through the RS422 serial port. The sampling frequency for the angle and current is 8 kHz, whereas the sampling frequency for the gyroscope is 2 kHz with a baud rate of 921.6 kbps. In this experimental system, DSP is mainly used to control the integrated drive chip DRV8312 in the current loop. The control strategy proposed in this paper is mainly implemented in ARM. The serial communication time of the DSP and the ARM is 1 ms. All programs are programmed in the C language.   The performance evaluation of the proposed robust sliding mode controller is presented in the following section.

Experimental Results and Discussions
To verify the effectiveness of the proposed robust SMC scheme in this paper, experiments are carried out under different strength sinusoidal disturbance conditions added by the swing platform, including d = 3 sin(2π × 0.1t), d = 6 sin(2π × 0.1t), d = sin(2πt), and d = sin(2π × 2t) (unit: degrees). The following three methods are compared in the experiment: The traditional PI method, the robust SMC with differentiator using the Euler method, and the robust SMC with NTD. Based on the Z-N method [32], the parameters of traditional PI method are chosen as k p = 0.2, k i = 1.0; the parameters of the robust sliding mode controller are k p = 0.1, k v = 1.0, k t = 0.6, η = 5 + δ ; ψ is determined to be 0.1 through multiple attempts; The parameters of the disturbance observer are: where the cut-off frequency w p is set to be 6000rad/s, and the damping coefficient β p is set to be 0.7.
The approximate current loop model P(s) ≈ 1/(0.0001989s + 1) is acquired by sweeping frequency. The parameters of the rapid NTD are selected by referring to [25], the nonlinear function f is selected as: where α 2 = 2α 1 = 2.0, β = 30.0, p/q = 3, and k = 650, and the low pass filter L(s) is in the same form with Q(s), but w pl = 1256 rad/s . Additionally, the traditional PI method is adopted in the current loop of the PMSM driver, and the parameters of the three methods are all the same: d-axis PI parameters: K dp = 8.0 and K di = 1.0. q-axis PI parameters: K qp = 8.0 and K qi = 1.0. In order to compare the performance of the three control algorithms more fairly, the actual measurement is carried out when parameters are set, so that the measured bandwidth of the system is kept as consistent as possible, which is about 30 Hz (−3 dB).
In order to demonstrate the ability of the proposed method under different disturbance conditions, experiments are carried out in the tracking mode. By analyzing the data of the gyroscope, the inertial stability performance of the system can also be analyzed.
The experimental results of the PI, robust SMC with Euler, and robust SMC with NTD under the disturbance d = 3 sin(2π × 0.1t) are shown in Figures 9-11. Figures 9a, 10a and 11a show the speed signal of the gyro output, and Figures 9b, 10b and 11b show the tracking error obtained by integrating the speed signal. The tracking error shows the inertial tracking capability of the system. The RMS value of the tracking error is used for compared. The formula for calculating the RMS is:   The experimental results demonstrate that, at the disturbance of sin(2πt), the robust sliding mode controller with NTD achieves a satisfactory inertial tracking performance. The tracking error RMS values of the three control methods are 48.6156 urad, 25.7942 urad, and 17.5528 urad, respectively. Compared to the PI method and the robust sliding mode controller with Euler, the tracking error RMS values of the robust sliding mode controller with NTD reduce by 63.89% and 31.95%, respectively. In order to verify the effectiveness of the proposed method under various disturbances, the following comparison experiments are also conducted.          From the experimental results presented, it is evident that the proposed robust SMC with NTD has obvious advantages. For a more intuitive comparison, the RMS value column diagram of the tracking error under different disturbance conditions is shown in Figure 21. What is worth paying attention to here is that when only the PI method is compared, the RMS value of the tracking error under the disturbance of 3 sin(2π × 0.1t) and 6 sin(2π × 0.1t) with small maximum acceleration is even higher than the others. This is due to the existence of friction and other disturbances in the system, and the other two methods, due to the use of the disturbance observer, this phenomenon is well suppressed. Considering the robustness of the proposed method, we change the parameters of the controlled object by artificially increasing the load [33]. Specifically, we use the method of sticking lead blocks to achieve this. In fact, the inertia J is increased in Equation (13) in this way. By testing the performance of the system in this case, we can indirectly weigh the robust performance of the system when the model changes. Figure 22 shows the experiment results under the disturbance signal d = 3 sin(2π × 0.1t) by adding a 50 g lead (the load weight of the original system is about 800 g); Figure 23 shows the experiment results under the disturbance signal d = sin(2πt) by adding an 80 g lead.  Comparing the results of Figures 23 and 11, Figures 22 and 14, respectively, we can determine that although the performance of the system is lower than that of the original, it still has good performance. To a certain extent, the robustness of the controller is verified. In practical applications, due to the influence of environment, such as temperature, humidity, mechanical wear, and so on, the parameters of the system will change. Therefore, the robustness of the system is of great significance.

Conclusions
A robust sliding mode control strategy based on a rapid nonlinear tracking differentiator and disturbance observer is presented in this paper, for the purpose of improving the anti-disturbance ability of the PMSM inertial tracking system, so to achieve better inertial stability. Sliding mode control is a reasonable choice for its invariance to the disturbance and the complexity of disturbance. The rapid nonlinear tracking differentiator provide the derivative for SMC controller. Disturbance observer is utilized to estimate the lumped disturbances of the system. The estimated disturbance is utilized to compensate the robust sliding mode controller, which can reduce the minimum switching gain and, thus, alleviate the system sliding mode chattering simultaneously. Experimental investigations were conducted on an integrated ARM-DSP-based PMSM platform. The PMSM servo system was operated under different kinds of sinusoidal disturbances coming from a two-axis rotating platform. The effectiveness of the proposed robust SMC with an NTD scheme was demonstrated by the experimental results.