Adaptive Sliding Mode Based Position Tracking Control for PMSM Drive System With Desired Nonlinear Friction Compensation

The output feedback position tracking control of permanent-magnet synchronous motor (PMSM) drive system is addressed in this paper. In order to obtain a differentiable disturbance theoretically, a continuous differentiable model is employed to model the nonlinear friction, and the desired velocity, rather than the measured or estimated velocity, is used in the friction compensation. Then, based on the desired friction compensation model, the reaching law based sliding mode controller is designed to make the position tracking error as small as possible in the presence of model uncertainties and load disturbance, and the gain of the reaching law is online tuned to adapt the variations of the controlled system. Moreover, a nonlinear extended state observer (NESO) is designed to simultaneously estimate the unmeasured states and unknown disturbance to guarantee the finite time stability of the proposed controller, and the designed NESO is proven to be exponentially stable and has zero estimation errors theoretically. Simulations and experimental results are given to verify the effectiveness of the proposed control scheme.


I. INTRODUCTION
Permanent-magnet synchronous motor (PMSM) is widely used in modern industrials due to its attractive advantages, such as fast response, high efficiency, wide speed regulation range and low maintenance cost [1]- [3]. The PMSM drive system is essentially a nonlinear system subjected to model uncertainties and unknown load torque. Although widely used in the position tracking control of PMSM drive system, there is no doubt that it is harder and harder for the traditional PID control to fulfil the increasing control performance demands of modern industrials. To improve the control performance of PMSM drive system, several advanced control methods have been proposed in recent years, such as adaptive control [4], [5], mode predictive control [6], [7], active disturbance rejection control [8], [9] and intelligent control [10], [11].
Apart from the abovementioned control methods, sliding mode control (SMC) is one of the most commonly used nonlinear control method for the position tracking control The associate editor coordinating the review of this manuscript and approving it for publication was Jesus Felez . of PMSM drive system due to its simplicity, high precision and robust [1]- [3], [12], [13]. An adaptive sliding mode controller was proposed in [2] for the position tracking control of PMSM, and the adaptive control was employed to online estimate the unknown parameters and the bound of the switching gain to improve the control performance. Moreover, to attenuate the chattering, which is not desired in real applications for it may harm the mechanical system, a saturation function was employed to replace the sign function. Although the chattering can be effectively attenuated by choosing large boundary layer of the saturation function, the robustness and the position tracking performance will be deteriorated within the boundary layer [14]. To overcome this problem, higher order SMC (HOSMC), in which the discontinuous control acts on the higher order derivative of the sliding variable, was proposed in [15] to alleviate the chattering while preserving the main advantages of the traditional first-order SMC, i.e., robust to model uncertainty and disturbance. In reference [16], HOSMC with adaptive gains was proposed to relax the requirement on the upper bound of the uncertainty and disturbance. Although effectively reduced, the chattering is mitigated rather than totally eliminated by HOSMC [17].
The reaching law based sliding mode control is another effective way for chattering attenuation [1], [18], [19]. The control performance of the reaching law based SMC depends significantly on the reaching law gains, which are usually chosen as constants [18]. Generally speaking, small reaching law gains will lead to poor robustness and long reaching time while large reaching law gains cannot attenuate the chattering effectively. To overcome this problem, the adaptive reaching law based SMC was proposed in [1] and [19], in which the gains of the reaching law were online tuned to adapt the variations of the controlled system, and the control performance is significantly improved in terms of robust and precision. The adaptive reaching law can also be found in the works [20], [21] and the references therein. For chattering attenuation, soft computing based approaches, such as fuzzy logic, neural networks and probabilistic reasoning, are also widely used, the details can be found in the survey paper [22]. Another disadvantage of the traditional SMC is the asymptotical converge rate due to the linear sliding surface. Terminal SMC (TSMC) was proposed in [23] to obtain the finite time stability of the error dynamics. However, the singular problem that caused by the negative fractional power of the error is not desired in real applications. In reference [24], the nonsingular TSMC (NTSMC) was proposed for the position control of robotic manipulators, in which the singularity was totally removed by rearranging the sliding surface, and essentially, the dynamics of the proposed NTSMC in [24] is equivalent to that of the TSMC in [23]. Although the neural network was employed to improve the control performance of TSMC in [25], the convergence rate decays quickly when the error dynamics approach to the equilibrium point due to the small fractional power. To further improve the control performance of NTSMC, the nonsingular fast TSMC (NFTSMC) was proposed in [26], in which an additional term with large fractional power was added to the sliding surface of traditional TSMC, and faster response and higher control precision were obtained compared to the traditional NTSMC and TSMC. However, only simulation results were given to verify the effectiveness of the NFTSMC.
Friction that appears between the moving parts of mechanical system is one of the main nonlinearities in PMSM drive system. The nonlinear friction may lead to large steady state error or limit cycles in low velocity regime [27]. Several models have been proposed to describe the friction phenomena, such as the classic nonlinear model, Karnopp model, Dahl Model, LuGre model and so on [27]- [29]. However, all the above mentioned friction models are discontinuous due to the sign function of velocity, which is not desired in high performance control system. A continuously differentiable friction model was developed in [29] for the high performance control system, and the friction model can well capture the main characteristics of the nonlinear friction. And the effectiveness of this continuously differentiable friction model have been verified though experiments. Typically, the velocity signal that measured by sensor or estimated by observer is used for the friction compensation to improve the control performance.
However, the compensation performance may be unsatisfactory due to the measurement noise or estimated error. The desired compensation technique [30], [31] is an effective way to attenuate the effect of measurement noise or estimation error. The main idea of the desired compensation technology is that the desired velocity, which is known exactly and noise free, is used in the friction compensation rather than the measured or estimated velocity, thus the friction compensation signal is smooth and noise free.
Another difficulty for the high performance control of PMSM drive system is the unmeasured states and unknown disturbance. To improve the control performance of PMSM drive system, the sliding mode observer was designed in [3] to estimate the external disturbance, and the estimated disturbance was embedded in the SMC to reduce the switching gain. However, the disturbance was assumed to be constant, which is not always fulfilled in real applications. Moreover, the sliding mode observer suffers from the chattering problem due to the discontinuous sign function, and additional low-pass filter is needed to obtain smooth signals. Disturbance observer (DOB) [32]- [34] is another commonly used method for disturbance estimation. DOB can asymptotically estimate the time-invariant disturbance, and the estimation error for time-varying disturbance can be effectively reduced by tuning the observer gains [34]. However, all the above mentioned observers need full states of the system, and this limits their usage in practical applications. Sliding mode observer was also designed to estimate the unknown states of a class of nonlinear system with uncertainties in [35], [36], but the disturbance is not estimated. Extended state observer (ESO) is a special kind of observer that can simultaneously estimate the unknown states and disturbance [34], [37], [38]. Although the estimation errors can be effectively reduced by tuning the observer gain, the traditional ESO has bounded estimation errors rather than zero estimation errors if the time derivative of the disturbance is not Lipchitz [38].
In this paper, motived by the above discussions, an adaptive reaching law based sliding mode position tracking controller is proposed for the PMSM drive system based on a novel nonlinear ESO. Simulations and experimental results are given to verify the effectiveness of the proposed controller. The main contributions of this paper are listed as follows.
(1) In order to estimate the unmeasured states and disturbance precisely, a nonlinear ESO is designed, which is exponentially stable and has zero estimation errors theoretically, thus, the discontinuous term can be totally removed from the SMC while preserves its main advantages in the whole working space, i.e., robust and high precision. Moreover, the desired compensation technology is employed to guarantee the stability of the designed nonlinear ESO.
(2) The dynamics of the PMSM drive system is rearranged based on the desired compensation model, and then, based on the rearranged model, a reaching law based fast nonsingular terminal sliding mode controller is designed to obtain faster response and higher position tracking precision. And the designed controller is proven to be finite time stable in the presence of model uncertainties and disturbance.
(3) To further improve the control performance of the PMSM drive system, an adaptive law is designed to online tuning the gain of the reaching law such that the gain increases to accelerate the convergence process when the sliding variable is far away from the origin, and vice versa, the gain decays to a small level to avoid chattering when the sliding variable is close to the origin.
For simplicity of expression, the following notations are introduced.
(3) the sign function is defined as

II. DYNAMIC MODEL OF THE PMSM DRIVE SYSTEM WITH UNCERTAINTIES
Typically, the dynamic model of PMSM drive system contains mainly two parts, namely, the PMSM model and the mechanical model. The PMSM model in d-q-axis can be described by the following equations [1]- [4].
while the mechanical model can be given as where u d , u d , i d , i q , L d and L q are the d-q-axis voltages, currents and inductances, respectively; R is the resistance of stator winding; θ is the mechanical angle displacement of the rotor; p is the number of pole pairs; ψ f is the rotor flux; J is the equivalent moment of inertia of the rotor, including the load; T f is the nonlinear friction; T L is the load torque, including the unknown external disturbance and the unmolded dynamics; T M is the electromagnetic torque that provided by the PMSM, which can be given as [1], [2] If the Field Oriented Control (FOC) is applied with the d-axis current being controlled to be zero, i.e., i d = 0, the motor torque (3) can be rewritten as where K T = 1.5pψ f is the torque constant of the motor, u = i q is the control input.
Considering that the lumped disturbance should be differentiable for the observer design, the nonlinear friction T f θ is modeled by the following continuously differentiable model [28]: where c i (i = 1, 2, . . . , 6) are positive constants. The term c 1 tanh c 2θ − tanh c 3θ + c 4 tanh c 5θ is the approximation of the static friction, the stribeck phenomenon is captured by the term tanh c 2θ − tanh c 3θ , and the viscous damping is modeled by the term c 6θ .
Considering model uncertainties, the mechanical dynamics (2) can be rewritten as where K T 0 , J 0 , T f 0 and K T , J , T f are the nominal and uncertain part of K T , J , T f , respectively. The equation (6) can be further rewritten as where Note that the nonlinear friction model (5) is differentiable and has bounded derivatives, thus it is reasonable to assume that T f is also differentiable and has bounded derivatives. Note also that the model uncertainties K T , J and the disturbance T d are all bounded in practical applications. Hence, if the control signal u is designed to be differentiable and bounded, then the following assumption can be made.
Assumption 1: The lumped disturbance T lump is differentiable and bounded with bounded derivative, i.e., where 1 > 0 is a unknown constant while 2 > 0 is a known constant.
If the state variables are chosen as x = [x 1 x 2 ] T = [θθ] T , then the mechanical dynamics (7) can be rewritten in the state space form as Given the desired motion trajectory x d , which is assumed to be continuous and bounded up to the third order derivative, The control task in this paper is to design a bounded and differentiable control law u such that the angle displacement of the PMSM drive system can tracking the desired motion trajectory x d as closely as possible in the presence of model uncertainties and unknown load torque.

III. DESIGN OF SLIDING MODE CONTROLLER WITH ADAPTIVE REACHING LAW
In this section, a sliding mode position tracking controller will be designed based on the reaching law approach, and the gain of the reaching law is online updated for control performance improvement. In order to reduce the effect of the measurement noise or estimation errors, the desired compensation technology [30], [31] is employed to generate a smooth and noise free friction compensation signal. More specifically, by using the desired compensation, the second equation of (9) can be rearranged as follows: where Define the position tracking error as By using (9) and (10), the time derivatives of the position tracking error (11) can be given aṡ In order to obtain the finite time convergence of the position tracking error (11) and its first order time derivative (12a), the nonsingular fast terminal sliding mode surface [25] is introduced as follows.
where k 0 > 0, k 1 > 0, k 2 > 0, 1 < β < 2 and α > β are constants to be determined later. Remark 1: Typically, k 0 is set to k 0 = 1 in the traditional nonsingular fast terminal sliding mode surface [26]. However, in view of (13), the sliding variable s is small when the position tracking error e and its first order time derivativeė are in the vicinity of zero, which leads to a slow response of the closed loop system. Thus, in this paper, a large value of k 0 is used for the control performance improvement, i.e., k 0 > 1.
By using (10) and (12), the first order time derivative of the sliding variable (13) can be given aṡ Theorem 1: For the system (9) satisfying assumption 1, if the control law is designed as where η > 0 and ϑ > 0 are constants to be designed later. Then the position tracking error (11) and the reaching law gain µ will converge to zero in finite time and all signals are bounded.
Proof: Substituting the control law (15) into (14) yieldṡ Define the positive definite Lyapunov function as By using (15d) and (16), the first order time derivative of Lyapunov function (17) can be given aṡ Note that for any positive real number m 1 > 0, m 2 > 0 and 0 < n < 1, the inequality (m 1 + m 2 ) n ≤ m n 1 + m n 2 holds [24]. Thus, it can be obtained from (18) thaṫ where k η = min ηβk 2 |ė| β−1 , ϑ . The stability and the convergence can be analyzed in the following two cases.
Case 1:ė = 0. In this case, it is easy to check that |ė| β−1 > 0. Thus, we have ηβk 2 |ė| β−1 > 0, which means that k η > 0. Hence, V c will converge to zero in finite time [24], [26], and consequently, the sliding variable s and the reaching law gain µ will converge to zero in finite time. Case 2:ė = 0. In this case, the control law (15b) can be rewritten as Then, the equation (12b) and (15d) can be rewritten as In view of (22),μ = 0 if µ = 0, which means that µ = 0 is a global attractor and µ is finite time stable. Therefore, VOLUME 8, 2020 η + µ > 0 holds after the convergence to zero of µ due to η > 0. Hence, it can be concluded from (21) thatë = 0 for both s > 0 and s < 0, that is,ė = 0 is not a attractor and the across over the vicinity ofė = 0 will occur in finite time. Now, it can be concluded from the above discussions that the sliding surface s = 0 can be reached in finite time. Note that the initial tracking errors are bounded due to the boundedness of the desired motion trajectory and the states of PMSM drive system, and the disturbance is also bounded according to assumption 1, thus all the signals will be bounded. The proof is completed.
Remark 2: Although the sign function and the absolute values are involved in the control law (15), it is continuous and differentiable. Thus, the chattering is totally removed theoretically.
Remark 3: In view of (15d), the reaching law gain µ is online updated according to s, µ andė. For stability and chattering elimination reasons, the parameter ϑ should be chosen large enough such that µ decreases to a small level when the tracking error is small. However, too large value of ϑ will result in a quick converge rate of µ, and µ will decay quickly to zero when s andė are small, which will lead to a poor robust and slow response of the closed loop system. On the other hand, small value of ϑ will also lead to a poor robust due to the slow increase rate of µ when large tracking error appears. Hence, the parameter ϑ should be chosen to balance the control performance and stability of the closed loop system.
In view of (15b), the disturbance d is involved in the control law. However, the disturbance d is not known. Moreover, the sliding variable (13) also cannot be calculated directly due to the unknown velocity signal. Thus, the control law (15) cannot be implemented directly. It should be also noted that only bounded tracking errors can be obtained by the reaching law based SMC if the disturbance d is not known exactly [18]. Therefore, the next step is to estimate the unknown velocity and disturbance d precisely based on the desired compensation model (10).

IV. DESIGN OF NONLINEAR OBSEVER WITH ZERO ESTIMATION ERRORS
In this section, the unknown velocity and disturbance d will be estimated with zero estimation error based on the desired compensation model (10). To do this, the traditional ESO [36], [37] is employed with suitable modification. As in the traditional ESO design, the disturbance d is extended as a new state x 3 , namely, x 3 = d. Note that the disturbance d is differentiable due to the differentiability of T lump and T f 0 . Denote the first order time derivative of d as h(t), i.e.,ḋ =ẋ 3 = h (t). Then, the system (9) can be rewritten in the extended form as Note that the first order time derivative of T f 0 and T lump are both bounded, thus, it is reasonable to assume that h(t) is also bounded by some known constant δ, i.e., |h (t)| < δ.
Define the estimation error as     x wherex 1 ,x 2 andx 3 are the estimation of x 1 , x 2 and x 3 , respectively. The proposed nonlinear ESO is given as where ω o > 0, L 1 > 0, L 2 > 0, L 3 > 0 and ε > 0 are constants to be designed later. By using (23) and (25), the estimation error dynamics (24) can be rewritten as which can be written asẋ Note that the matrix A is Hurwitz since ω o > 0, thus, there must exist some positive symmetric matrix P such that A T P + PA = −I 3×3 , where I 3×3 is the unit matrix, and for the Lyapunov function V 1 (x) =x T Px, the following inequality holds:V Thus, it can be concluded that the subsystemẋ = f 1 (x) is exponentially stable. More details about the stability and convergence of the subsystemẋ = f 1 (x) can be found in [36]- [38] and the references therein. Note also that the subsystemẋ = f 2 (x) is (3, 2, 1)homogeneous of degree −1, which means that it is finite time stable [40]. Hence, there exist some constants c > 0, 0 < α < 1 and a continuous positive definite function V 2 (x) such that [40] For the stability analysis of the proposed observer, define the Lyapunov function as V o = V 1 + V 2 . By using (27) and (28), the time derivative of V o can be given aṡ For the case Thus, V 0 (x) is finite time stable, which means that V 1 (x) will be bounded by V 1 (x) < 1 in finite time. Note that λ min (P) x 2 2 ≤ V 1 (x), thus the estimation errors are also bounded in finite time, i.e., x 2 2 < 1/λ min (P), and the bound can be effectively reduced by tuning the parameters ω o . Recall that V 2 (x) is a continuous function ofx, thus, if the parameters ω o is chosen large enough such that V 2 (x) < 1, which means V 2 (x) ≤ V α 2 (x). Then it can be obtained from (29) thaṫ which means that V 0 (x) together with V 1 (x) and V 2 (x) will converge to zero exponentially. Therefore, based on the above discussions, we can conclude that the estimation errors will first converge to a small bound in finite time and then converge to zero exponentially. Remark 4: In order to make sure that V 2 (x) < 1 when V 1 (x) < 1, the observer gain ω o should be chosen large enough. However, large value of ω o may lead to stability issues due to the measurement noise. Thus, the observer gain ω o should be chosen to balance the stability and estimation performance.
Remark 5: The traditional ESO has bounded estimation errors if the extended state h(t) is not Lipchitz with respect to the estimation errorx [38]. By introducing a nonlinear term, the designed observer can estimate the unknown states and disturbance with zero estimation errors if the extended state h(t) is bounded, which is a much relax requirement. Thus, the application of the ESO is extended to a wide range.
Remark 6: The selection of the L 1 , L 2 and L 3 has great influence on the estimation performance of the observer.
It is recommended that they are chosen following the design of Levant's Differentiator [41]. Now, based on the estimated signals, the equation (12a) can be rewritten asė And the disturbance d can be written as Thus, the sliding variable (13) and the controller (15) can be calculated based on (32) and (33). The diagram of the proposed control scheme is shown in Figure 1.

V. CLOSED LOOP STABILITY ANALYSIS
The stability and convergence of the closed loop system will be established in the following three stages.
Stage 1: In this stage, the estimation errors of the observer (25) will converge to a small level in finite time, and then the estimation errors will converge to zero exponentially. Since the states of the PMSM drive system are bounded in practical applications, all the estimated signals are also bounded.
Stage 2: The sliding variable s reaches zero in finite time under the control of the control law (15), and meanwhile, the adaptive gain of the reaching law µ converges to zero. Stage 3: After the convergence to zero of the sliding variable s, the position tracking error (11) and its time derivatives (12) will converge to zero in finite time with fast convergence rate.
To further verify the stability and convergence of the closed loop system, define the Lyapunov function as V = V O + V c , it can be obtained from (19), (30) and (31) thatV < 0 holds during the whole process. Thus, the Lyapunov function V together with V o and V c will converge to a small level in finite time and then converge to zero exponentially, and consequently, the position tracking error (11) and the controlled plant (x 1x d ) will also converge to a small level in finite time and then converge to zero exponentially, and all the signals are bounded due to the boundedness of the system states, observer dynamics and the initial errors.

VI. SUMULATION AND EXPERIMENTAL RESULTS
In order to evaluate the effectiveness of the proposed controller, simulations and experiments were carried out. And the following two controllers were performed for comparison purpose. VOLUME 8, 2020 (1) PIVF: This is the commonly used PID controller with velocity feedforward, which is given as (34) where k p > 0, k i > 0, k v > 0 are the controller gains to be designed.
(2) SMC: This is the reaching law based sliding mode control proposed in [1], which is given as where s =ė+λe, T f (x 2 ) = a 1 tanh (a 2 x 2 )+a 3 x 2 . The velocity signal was obtained by backward differentiation method. The motor used in the simulations and experiments is a three-phases and eight-pole PMSM with Y connection, and the main parameters of the motor are listed as follows: rated power 1000 W, rated speed 1000 r/min, phase resistance 0.245 , torque constant 1.0 Nm/A, rotor inertia 0.00277 Kgm 2 .
Considering the fact that the control input in real applications is bounded, the control effort in the simulations and experiments was saturated within −10∼10 Amperes, i.e., −10 < u < 10.

A. SIMULATION RESULTS
Simulations were carried out by using Matlab/Simulink software and AMESim software to verify the effectiveness of the proposed controller. The PMSM drive system was modeled in AMESim software, and the EMDPMSM01 model and EMDPMSMFOC01 model were used for the PMSM and FOC, respectively. The coefficient of viscous friction was set as 0.0115 Nm/(rad/s) while the coulomb friction torque and static torque were set as 0.55 Nm and 0.625 Nm, respectively. The control algorithm was carried out in the Matlab/Simulink software. The sample time was fixed to 0.1ms.
The In order to evaluate the performance of the three controllers, the sinusoidal and point-to-point motion trajectory were tested in the following simulations.
(1) sinusoidal motion trajectory (sine): the sinusoidal motion trajectory with the maximum speed of 6π rad/s was tested in this simulation, i.e., x d = 20 sin (0.3πt) rad.
The normal system was first test to evaluate the control performance of the three controllers. The simulation results are given in Figure 2 -Figure 6. As can be seen from Figure 2, the position tracking error of PIVF is about ±0.16 rad while that of SMC and the proposed controller are about ±0.04 rad and ±0.03 rad, respectively, which shows the superiority of the advanced controller. Although the position tracking error of PIVF can be further reduced by increase the controller gains, serious chattering would appear due to the limited bandwidth of the controlled system. It should be also noted that some chattering has already appeared in PIVF, which can be seen from Figure 3. Moreover, large position tracking error, about 0.3 rad, appears in PIVF within the first a few seconds, this is mainly caused by the mismatched initial conditions, i.e.,ẋ 1 (0) =ẋ d (0). The mismatched initial conditions will also lead to large control effort, which can be seen from Figure 3. To further reduce the position tracking error within the first a few seconds and avoid large control effort, the desired motion trajectory should be filtered such that x 1 (0) = x d (0),ẋ 1 (0) =ẋ d (0) andẍ 1 (0) =ẍ d (0) as in [2]. The sliding variable of SMC and the proposed controller are shown in Figure 4, as can be seen, although the sliding variable of the proposed controller is much larger than that of SMC in the beginning, it decays quickly to a small level. The large sliding variable of the proposed controller is still mainly caused by the unmatched initial conditions. In view of (15d), the large value of sliding variable will lead to large value of µ, which can be seen Figure 5. It also as can be seen from Figure 5 that µ increases quickly when the sliding variable is large, and it decays to almost zero when the sliding variable is small. It should also be noted that large value of µ may lead to stability problems as discussed in Remark 4. To overcome this problem, a simple but effective way is to saturate µ within a suitable range, i.e., µ < µ 0 , where µ 0 is a positive constant that determined by the specific application.   However, it would lead to a slower response when large model uncertainty or external disturbance appears if is µ 0 small. Thus, the chosen of µ 0 should balance the performance and the stability. The estimated velocity and disturbance are given in Figure 6 and Figure 7, respectively. The maximal velocity estimation error is about ±0.15 rad/s, that is about 0.8% of the maximum velocity, which shows the effectiveness of the designed nonlinear ESO.
To test the robustness of the three controllers, model uncertainties and external disturbance were considered in the following simulation. The rotor inertia was set as 5 times of the normal value, i.e., J = 0.0138 Kgm 2 and the friction was set as 2 times of the nominal value, namely, the coefficient of the viscous friction was set as 0.022 Nm/(rad/s) while the  static friction torque and the coulomb friction torque were set as 1.25 Nm and 1.1 Nm, respectively. Moreover, a step disturbance was added after the tenth second, i.e., d = 0, t < 10 3 × sign(θ)Nm otherwise.
The simulation results are given in Figure 8 - Figure 13. As can be seen from Figure 8, before the step disturbance is added, the position tracking error of the proposed controller is about ±0.04 rad while that of PIVF and SMC is ±0.06 rad, ±0.28 rad, respectively. That is about 33.3% and 85.7% improvement of the position tracking precision. After the step disturbance is added, the position tracking error of SMC and PIVF increases to about ±0.23 rad and ±1.1 rad, respectively. Meanwhile, the position tracking error of the proposed controller increases slightly to about ±0.06 rad during that time, which shows the superior performance of the proposed controller. As can be seen from Figure 9, the control effort of the three controllers are almost the same except that some chattering appears in the control effort of PIVF.
The sliding variable of the proposed controller and SMC are shown in Figure 10. As can be seen, some peaks appear in the sliding variable of the proposed controller, this is mainly caused by the large friction and the change of load disturbance. It can be seen from Figure 11 that µ increases quickly to attenuate the effect of disturbance when it is added, and thus a small position tracking error is obtained. The estimated velocity and disturbance are given in Figure 12 and Figure 13, respectively.    (2) Point-to-point motion trajectory (PTP): The classic point-to-point motion trajectory with the maximum speed of 50 rad/s, which is given in Figure 14, was tested in this simulation. The same model uncertainties as in the sinusoidal    motion trajectory were also considered in this simulation. The simulation results are given in Figure 15 to Figure 20.
As can be seen from Figure 15, the maximum absolute position tracking error of PIVF is about 0.6 rad while that  of SMC and the proposed controller are about 0.25 rad and 0.17 rad, respectively. The proposed controller still has better control performance in this situation. Remember that all the gains of the three controllers were tuned for the sinusoidal motion trajectory, which means that they maybe not optimal for the PTP motion trajectory, thus, it takes several seconds for the position tracking error to approach zero by PIVF. There is no doubt that the position tracking error can be further reduced by increasing the gains of PIVF, and this is also true for SMC and the proposed controller. However, it should be noted that the purpose of this simulation is to evaluate the performance of the three controllers, thus, for the sake of fairness and simplicity, the same controller gains were still used in this simulation. The steady-state error of PIVF and the proposed controller are almost zero while that of SMC is about 0.02 rad. It should be noted that although the integral action was not employed in the proposed controller due to its side-effect such as long settling time and large over shoot, zero position tracking error was still obtained, which shows the superior of the proposed controller.
The control effort of the three controllers are given in Figure 16, as can be seen, they are almost the same except that the control effort of SMC is about zero in the steady-state while that of PIVF and the proposed controller are both about 1.1 Amperes, which is almost the same as the coulomb friction torque. This is why the steady-state error of PIVF and the proposed control are about zero while that of SMC is about 0.02 rad. The steady-state error shows the disadvantage of   the reaching law based sliding mode control proposed in [1]. The sliding variable of SMC and the proposed controller are shown in Figure 17. The evolution of µ is given in Figure 18, as can be seen, µ decreases quickly when the sliding variable is large, and decays to almost zero quickly when the sliding variable is small. It should be noted that the parameter ϑ was selected for the sinusoidal motion trajectory, thus, it maybe not optimal for the PTP motion trajectory. The estimation of velocity and disturbance are shown in Figure 19 and Figure 20, respectively.

B. EXPERIMENTAL RESULTS
To further evaluate the effectiveness of the proposed controller, a test bench was set up, which is shown in Figure 21. The motor controller is a IGBT-Module (FS400R07A1E3, Infineon) controlled by a digital signal VOLUME 8, 2020  processor (TMS320F28379D, Texas Instruments). The main parameters of PMSM are the same as the PMSM used in the simulation. The angle position of the rotor is measured by a resolver, and the resolver signal is acquired via a 12bit A/D converter. To attenuate the measurement noise, a second order Butterworth Filter with the cut-off frequency of 2 kHz is employed. The load torque is generated by a magnetic powered brake whose rated speed and brake torque are 1000 r/min and 0-5 Nm, respectively. Moreover, the Filed Oriented Control (FOC) is employed to control the motor in the experiments. The two current loops are both controlled by the standard PI controller, which are tuned via try-anderror method. The PI parameters of the two current loops are the same, i.e., k p = 6.16, k i = 0.075. The sampling time of the current loop and the position loop are 100 us and 200 us, respectively. The control algorithm is coded with Code Composer Studio Integrated Development Environment (CCS IDE V10.1 Texas Instruments) and carried out in the digital signal processor (TMS320F28379D, Texas Instruments).
In order to measure the performance of the three controllers, the following three performance indexes are employed, i.e., (i) Maximum absolute value of the position tracking errors, which is defined as   (ii) Average value of the absolute position tracking errors, which is defined as where N and e(i) are the same as in (i).
(iii) Standard deviation of the position tracking errors, which is defined as where µ is given in (ii).
Since the friction compensation is involved in the proposed controller and SMC, a PI speed controller was designed for friction identification purpose. Note that the PI speed controller has little effect to the friction identification since only steady-state information are needed, i.e., the q-axis current during a period of constant speed. Thus, the gains of the speed controller were chosen via try-and-error method and given as k p = 0.88, k i = 0.36. The identified friction is shown in Figure 22, and the following coefficients are used to fit the recorded friction data: c 1 = 0.7708, c 2 = 29.07, c 3 = 1.672, c 4 = 1.014, c 5 = 3.605, c 6 = 0.0229. The friction coefficient in the SMC are chosen as a 1 = 1.0, a 2 = 100, a 3 = 0.0229 according to the recorded friction data.
The three controllers were first tested to track the sinusoidal motion trajectory, i.e., x d = 20 sin (0.3πt) rad, which is the same as in the simulation, and a 3.0 Nm step load  torque was added to test the robust of the three controllers. The position tracking errors of the three controllers are shown in Figure 23. As can be seen, before the step load torque is added, the position tracking error of the three controllers are about ±0.51 rad (PIVF), ±0.38 rad (SMC) and ±0.23 rad (the proposed controller), respectively. After the step load torque is added, the position tracking error of PIVF increases to about 1.31 rad and then decays to ±0.75 rad, and the position tracking error of SMC during that time is about ±0.42 rad. However, the position tracking error of the proposed controller remains almost the same when the step disturbance is added. The three performance indexes of the three controllers are given in Table 1, as can be seen, the proposed controller has better performance than PIVF and SMC. The control effort of the three controllers are shown in Figure 24, as can be seen, some chattering appears in all the control effort of the three controllers, especially after the step disturbance is added. The sliding variable of SMC and   the proposed controller is shown in Figure 25. The evolution of µ of the proposed controller is given in Figure 26, as can be seen, it increases quickly to attenuate the model uncertainly and external disturbance, and when the position tracking error is small, it decays quickly to a small level. The estimated signals are given in Figure 27.
To further evaluate the performance of the three controllers, the classic point-to-point motion trajectory (Figure 14) was test in the following experiment. The step disturbance is not added in this experiment.
As can be seen from Figure 28, the maximum position tracking error of the proposed controller is about 0.25 rad while that of PIVF and SMC are about 0.42 rad and 0.31 rad, respectively. It should also be noted that the steady-state position tracking error of SMC is much large than that of the proposed controller and PIVF. The large steady-state error of SMC is mainly caused by the large friction. Although the friction composition was used in SMC, it was not satisfactory due to the measurement noise. The three performance indexes are given in Table 2,   as can be seen, the proposed controller still has better performance than PIVF and SMC in this experiment. The large M µ of SMC is mainly cause by the large steady-state errors.
The control effort of the three controllers are given in Figure 29, as can be seen, some chattering appears in the control effort of PIVF. The sliding variable of the proposed controller and SMC are shown in Figure 30. As can be seen, the sliding variable of the proposed controller is much smaller than that of SMC in the steady state. The evolution of µ is shown in Figure 31, as can be seen, it increases quickly when position tracking error is large, and decays quickly to a small level when the position tracking error is small to avoid the chattering problems. The estimated signals are given in Figure 32.

VII. CONCLUSION
In this paper, the output feedback position tracking control of PMSM drive system is addressed. A continuous differentiable model is employed for friction compensation, and the desired velocity rather than the estimated or measured velocity is used in the nonlinear friction compensation, thus, the generated compensation signal is smooth and noise-free. Then, the reaching law based sliding mode control is designed to make the position tracking error as small as possible in the presence of model uncertainty and external disturbance, and the fast nonsingular terminal sliding mode surface is employed to obtain the finite time convergence of the error dynamics. Moreover, the gain of the reaching law is online tuned to attenuate the effect of model uncertainties and external disturbance. In order to guarantee the finite time convergence to zero of the proposed controller, a nonlinear extended state observer is designed to simultaneously estimate the unmeasured states and unknown disturbance, and it is proven to be exponentially stable and has zero estimation errors theoretically. Simulations and experimental results show that the proposed controller has better control performance than the commonly used PI controller with velocity feedforward and the adaptive reaching law based sliding mode control in terms of position tracking precision and robustness. It should be noted that the motor dynamics is assumed to be ideal in this paper, however, it cannot be always fulfilled in real applications. Our future work will focus on the effect of motor dynamics on the control performance and take the motor dynamics into consideration during the controller design.