Active Disturbance Compensation Based Robust Control for Speed Regulation System of Permanent Magnet Synchronous Motor

This paper deals with the robust control method for permanent magnet synchronous motor (PMSM) speed-regulation system based on active disturbance compensation. Different from the classical PMSM disturbance compensation scheme, a novel disturbance feed-forward compensation based on extended state observer (ESO) is designed for speed loop and q-axis current loop of PMSM. The disturbances of current loop include unmodeled dynamics of back electromotive force and parameters variations of stator are considered as lumped disturbance to compensate actively. In this way, the dynamic response of q-axis current loop can be improved to guarantee the anti-disturbance ability. A composite controller using sliding mode control and ESO is designed as speed loop controller, and an ESO-based proportional-integral controller is designed for q-axis current loop. Moreover, a transition process of reference signal is introduced to replace the step reference signal, which reduces the initial error and increases the range of feedback gain to improve system robustness. Finally, simulations and experiments are given to demonstrate the effectiveness of the proposed strategy.


Introduction
As an important power of mechanical system, permanent magnet synchronous motor (PMSM) is widely used because of the compact structure, high power density, and low noise. Especially in the field where volume is strictly limited, such as robots, aerospace, high-performance service system, PMSM is widely accepted. As we know, proportional-integral (PI) control is already used in PMSM system because of its simple implementation. However, PMSM is a nonlinear, time-varying system and it is difficult to achieve satisfactory control performance by using PI control. Therefore, it is necessary to use nonlinear control algorithm in PMSM system [1].
In recent years, many complex control algorithms have been implemented because of the development of micro controller, e.g., robust control [2][3][4], fuzzy control [5][6][7], adaptive control [8][9][10], sliding mode control (SMC) [11][12][13], backsteeping control [14][15][16], etc. These advanced algorithms can effectively improve control performance. Among these methods, SMC attracts more attention because of its robustness. SMC is a discontinuous control method that can force the system move along the sliding surface. Moreover, sliding motion can be designed and it is not affected by parameter change and external disturbance. In [17], a SMC speed-regulation controller consisting of a tracking controller and two synchronous controllers is designed for multi-motor system. In [18], a nonlinear speed-control algorithm based on sliding mode reaching law (SMRL) is designed for PMSM system and this algorithm can dynamically adapt to the operation statues. But SMC is a feedback-based proportional-integral for q-axis current loop are designed. Moreover, a transition process of reference signal is introduced to replace step reference signal. In Section 4, simulation and experiment results are presented. Finally, conclusions are shown in Section 5.

Problem Formation
To simplify the mode of the PMSM, let us first assume: the three-phase windings of the stator are evenly distributed, the saturation effect of the core is ignored, and air gap magnetic field is sinusoidal. The governing equations of PMSM under d-q reference frame can be described as follows: where R s is stator resistance (Ω), ψ f is rotor flux linkage (Wb), T L is load torque (N/m). J is moment of inertia (Kg·m 2 ), ω is angular velocity(rad/s), B m is viscous friction coefficient, u d and u q are d and q axis stator voltage (V), L d and L q are d and q axis induction (H), i d and i q are d and q axis stator current (A), n p is the number of pole pairs. The current vector is decomposed into flux-producing component i d and torque-producing component i q by coordinate transformation, therefore i d and i q can be regulated separately. Here make i d = 0, so that the electromagnetic torque of the motor can be controlled only by i q . Finally, the PMSM speed-regulation problem is simplified to i q regulation. The general structure of PMSM speed-regulation system is shown in Figure 1. The PMSM system includes a speed loop and two current loops. Here a PI controller is adopted in d-axis current loop. In this paper, we mainly design controller and disturbance compensator for speed loop and i q loop.
Appl. Sci. 2020, 10, x 3 of 13 signal is introduced to replace step reference signal. In Section 4, simulation and experiment results are presented. Finally, conclusions are shown in Section 5.

Problem Formation
To simplify the mode of the PMSM, let us first assume: the three-phase windings of the stator are evenly distributed, the saturation effect of the core is ignored, and air gap magnetic field is sinusoidal. The governing equations of PMSM under d-q reference frame can be described as follows: where Rs is stator resistance (Ω), ψf is rotor flux linkage (Wb), TL is load torque (N/m). J is moment of inertia (Kg·m 2 ), ω is angular velocity(rad/s), Bm is viscous friction coefficient, ud and uq are d and q axis stator voltage (V), Ld and Lq are d and q axis induction (H), id and iq are d and q axis stator current (A), np is the number of pole pairs. The current vector is decomposed into flux-producing component id and torque-producing component iq by coordinate transformation, therefore id and iq can be regulated separately. Here make id = 0, so that the electromagnetic torque of the motor can be controlled only by iq. Finally, the PMSM speed-regulation problem is simplified to iq regulation. The general structure of PMSM speedregulation system is shown in Figure 1. The PMSM system includes a speed loop and two current loops. Here a PI controller is adopted in d-axis current loop. In this paper, we mainly design controller and disturbance compensator for speed loop and iq loop.

Controller Design
In practical industrial application, PMSM is affected by disturbance, which includes external disturbance and internal disturbance. Despite controller is robust, but these nonlinear disturbances still have an impact on system, moreover, feedback-based control method cannot react promptly to disturbances. For speed loop, a sliding mode speed regulation controller is designed, and a feedforward compensator based on ESO is designed for not only speed loop but q-axis current loop.

Controller Design
In practical industrial application, PMSM is affected by disturbance, which includes external disturbance and internal disturbance. Despite controller is robust, but these nonlinear disturbances still have an impact on system, moreover, feedback-based control method cannot react promptly to disturbances. For speed loop, a sliding mode speed regulation controller is designed, and a feed-forward compensator based on ESO is designed for not only speed loop but q-axis current loop.

Speed Loop Controller Design
The process of the system reaching the sliding surface from any initial state is called reaching motion, the sliding mode accessibility condition can only ensure that the system state can reach sliding surface, but there is no limitation on the motion trajectory. The reaching law can make the system state reach sliding surface according to the designed trajectory and improve the dynamic quality of reaching motion.
The differential equation of mechanical angular speed is shown as: .
Define the state variable is defined as: where ω * is reference speed. Because the first-order model of PMSM is adopted, so i q is approximately equal i q * . Conventionally, the response time of current loop is faster than speed loop, if control period of speed loop is more than 10 times of current loop, the approximate error can be neglected. The state equation can be rewritten as: There are two main disturbances in PMSM operation: external disturbance which includes load change and reference signal change, and inertial disturbance which includes parameters change and unmolded dynamics.
As we know the disturbance of the system mainly consists of the following three parts: (1) disturbance caused by load change, (2) disturbance caused by speed change, (3) disturbance caused by reference speed change.
However, it would be difficult to observe their disturbances separately, so we define the set of all disturbances as lumped disturbance R, and the same effect can be achieved by compensating the lumped disturbance R. Indeed, we expended R as a new state variable x 2 ; x defined as x 1 , and establishes a new second-order model.
where T L J is the disturbance caused by load change, B m J ω is the viscous friction disturbance caused by speed change.
The ESO is designed as: .
where α 1 , α 2 are constant gain, z 1 , z 2 are the estimated values of speed error and lumped disturbance, respectively. The high-gain error feedback in ESO makes the observer dynamic much faster than system; ESO is equivalent to the fast-changing subsystem in the system, which can ensure the fast convergence of the error and high estimation accuracy. But the high gain observer will produce a peak when initial set value differs greatly from system actual value. For example, for a step reference signal, the initial value of error e = ω* at t = 0 s. Large error can cause a large initial impact on system to cause a peak. For peak caused by difference initial value, a transition process is designed.
Appl. Sci. 2020, 10, 709 where t is time, t j is transition time, β is a gain. In the initial stage t → 0, β → 0, which mitigate peak caused by different initial values, with t → t j , β; can smoothly transit to the normal gain value. The ESO can be redesigned as: .
In order to design the sliding mode control law for Equation (8), here, we define an integral sliding surface as: where c is the integral gain (c > 0). The reaching law is chosen as: where ε, k are positive real numbers, sign() is symbolic function. Substituting the estimated lumped disturbance z 2 into Equation (5) yields the derivative of s as: and an ESO-based sliding mode controller can be designed as: Defining a Lyapunov function is as: To differential V yields: here we quote a conclusion in [34], if the gain of ESO (11) is large enough, then the observer error When the sliding mode motion occurs on sliding surface s = 0, we can derive If c > 0, the existence condition of sliding mode and exponential convergence of x 1 can be guaranteed.

Design of q-Axis Current Controller
As the inner loop of a cascade control structure, the disturbance of q-axis current loop cannot be ignored. Conventionally, compensating the disturbance of q-axis current loop can improve the robustness of the whole cascade structure.
Appl. Sci. 2020, 10, 709 6 of 13 The differential equation of q-axis current loop is shown as: where p is differential operator, ω e is synchronous speed (rad/s). From Equation (19), we can obtain: We define the lumped disturbance of q-axis current loop as: Here, Rq is expended as a new state variable. The state-space form is as follows: The ESO for q-axis current loop is designed as: Finally, the controller can be designed as: The block diagram of ESO-based q-axis current loop is shown in Figure 2.

Design of q-Axis Current Controller
As the inner loop of a cascade control structure, the disturbance of q-axis current loop cannot be ignored. Conventionally, compensating the disturbance of q-axis current loop can improve the robustness of the whole cascade structure.
The differential equation of q-axis current loop is shown as: where p is differential operator, ωe is synchronous speed (rad/s). From Equation (19), we can obtain: We define the lumped disturbance of q-axis current loop as: Here, Rq is expended as a new state variable. The state-space form is as follows: The ESO for q-axis current loop is designed as: Finally, the controller can be designed as: The block diagram of ESO-based q-axis current loop is shown in Figure 2. Remark 1. Some scholars may doubt the effectiveness of ESO because the quantitative stability analysis has not been given. In [34], the error analysis of second-order ESO under constant disturbance is given, and the conclusion is that the observation error of ESO can be made small enough by selecting appropriate parameters. But the premise is steady-state and constant disturbance, and the quantitative analysis is also difficult and challenging. Actually, ESO has been applied in many papers and practical system, and many cases show that ESO is an effective estimation method. Therefore, ESO is applied in this paper, and our simulations and experiments prove the effectiveness of ESO. Remark 1. Some scholars may doubt the effectiveness of ESO because the quantitative stability analysis has not been given. In [34], the error analysis of second-order ESO under constant disturbance is given, and the conclusion is that the observation error of ESO can be made small enough by selecting appropriate parameters. But the premise is steady-state and constant disturbance, and the quantitative analysis is also difficult and challenging. Actually, ESO has been applied in many papers and practical system, and many cases show that ESO is an effective estimation method. Therefore, ESO is applied in this paper, and our simulations and experiments prove the effectiveness of ESO.

Transition Peocess Based on TD
We hope the output speed ω of system to track the step reference signal ω * as fast as possible, so a large error proportional gain is generally used. However, increasing the error proportional gain will make the closed-loop system become an under-damped and overshoot occurs, which is a contradiction between rapidity and overshoot. In fact, any system has inertia, the output speed ω can only change from zero, but the reference signal ω * is a step signal. Therefore, the initial value of error e = ω * at t = 0 s. Large error proportional gain can cause a large initial impact on the system, which make the system easy overshoot. If the initial error can be reduced, a large error proportional can be used to speed up the transition process. Therefore, a suitable transition process is arranged according to the reference signal ω * , and the output ω tracks the transition process to reach the control target. In this paper a tracking-differentiator (TD) from ADRC is used as the transition process.
where h is the integration time step, r is the speed factor that determines the tracking speed, sign() is symbolic function, H 1 is the transition process of reference signal, H 2 is the differential of transition process. Finally, the feedforward-based PMSM speed regulation system is shown in Figure 3.

Transition Peocess Based on TD
We hope the output speed ω of system to track the step reference signal ω * as fast as possible, so a large error proportional gain is generally used. However, increasing the error proportional gain will make the closed-loop system become an under-damped and overshoot occurs, which is a contradiction between rapidity and overshoot. In fact, any system has inertia, the output speed ω can only change from zero, but the reference signal ω * is a step signal. Therefore, the initial value of error e = ω * at t = 0 s. Large error proportional gain can cause a large initial impact on the system, which make the system easy overshoot. If the initial error can be reduced, a large error proportional can be used to speed up the transition process. Therefore, a suitable transition process is arranged according to the reference signal ω * , and the output ω tracks the transition process to reach the control target. In this paper a tracking-differentiator (TD) from ADRC is used as the transition process.
where h is the integration time step, r is the speed factor that determines the tracking speed, sign() is symbolic function, H1 is the transition process of reference signal, H2 is the differential of transition process.
Finally, the feedforward-based PMSM speed regulation system is shown in Figure 3.

Simulation and Experiment Results
Simulations and experiments are done to verify the effectiveness of the proposed method. In this section, ESO-based method only for speed loop is named single-ESO method, ESO-based method for speed loop and q-axis is named double-ESO method. The parameters of PMSM are as follows: Rs is 4 Ω, Ld and Lq are 0.0006 H, J is 0.002 Kg·m 2 , Bm is 0.00054, np is 4.

Simulation and Experiment Results
Simulations and experiments are done to verify the effectiveness of the proposed method. In this section, ESO-based method only for speed loop is named single-ESO method, ESO-based method for speed loop and q-axis is named double-ESO method. The parameters of PMSM are as follows: R s is 4 Ω, L d and L q are 0.0006 H, J is 0.002 Kg·m 2 , B m is 0.00054, n p is 4.
The estimated resulted of ESO for speed loop and q-axis current loop are shown in Figure 4, respectively. It can be seen from Figure 4 that the estimated value of ESO is similar to the theoretical value of the disturbance, which indicates that ESO can accurately estimate the disturbance of the system. This provides a basis for compensating the disturbances. The speed curves of single-ESO method and double-ESO method are shown in Figure 5, respectively. It can be seen that the system using double-ESO method has batter disturbance rejection ability. In Figure 6, disturbance compensation improves the dynamic response of q-axis current loop. In Figure 7, a transition process is obtained by TD, the system will track this transition signal instead of step signal. Therefore, the transition process extends the range of system parameters and improves the robustness.
The estimated resulted of ESO for speed loop and q-axis current loop are shown in Figure 4, respectively. It can be seen from Figure 4 that the estimated value of ESO is similar to the theoretical value of the disturbance, which indicates that ESO can accurately estimate the disturbance of the system. This provides a basis for compensating the disturbances. The speed curves of single-ESO method and double-ESO method are shown in Figure 5, respectively. It can be seen that the system using double-ESO method has batter disturbance rejection ability. In Figure 6, disturbance compensation improves the dynamic response of q-axis current loop. In Figure 7, a transition process is obtained by TD, the system will track this transition signal instead of step signal. Therefore, the transition process extends the range of system parameters and improves the robustness.
The estimated resulted of ESO for speed loop and q-axis current loop are shown in Figure 4, respectively. It can be seen from Figure 4 that the estimated value of ESO is similar to the theoretical value of the disturbance, which indicates that ESO can accurately estimate the disturbance of the system. This provides a basis for compensating the disturbances. The speed curves of single-ESO method and double-ESO method are shown in Figure 5, respectively. It can be seen that the system using double-ESO method has batter disturbance rejection ability. In Figure 6, disturbance compensation improves the dynamic response of q-axis current loop. In Figure 7, a transition process is obtained by TD, the system will track this transition signal instead of step signal. Therefore, the transition process extends the range of system parameters and improves the robustness.

Experiment Results
A test device is established to verify the proposed method, and is shown in Figure 8. The test deice consists of controller, motor driver, PMSM. The controller is STM32F103, FOC, and SVPWM are implemented by C-program, the clock frequency of controller is 72 MHz, the sampling time of speed loop is 10 ms, the PWM frequency is 16 KHz, current sensing by isolated current sensors (ICS), an encoder of 1000 lines is used. The max speed of motor is 3000 rpm and the rated current is 3.13 A. The serial port communicating baud rate between the STM32F103 and computer is 115,200.
In order to verify the effectiveness of the proposed method, the proposed method is compared with other controllers. The speed curve under PI speed controller is shown in Figure 9, the proportional gain and integral gain of speed PI controller are 200 A/rad/s and 50 A/rad, respectively. The proportional gain and integral gain of current loop PI controller are 572 V/A and 121 V/A s, respectively. The parameters of sliding mode speed controller are as follows: c = 21, ε= 50, k = 0.0075. The parameters of ESO are as follows: α1 = 3000, α2 = 3000. The speed curve under speed loop sliding mode controller is shown in Figure 10, the current loop controllers are PI. The speed curve under SMC with speed loop compensation is shown in Figure 11. In Figure 12, the speed controller is sliding

Experiment Results
A test device is established to verify the proposed method, and is shown in Figure 8. The test deice consists of controller, motor driver, PMSM. The controller is STM32F103, FOC, and SVPWM are implemented by C-program, the clock frequency of controller is 72 MHz, the sampling time of speed loop is 10 ms, the PWM frequency is 16 KHz, current sensing by isolated current sensors (ICS), an encoder of 1000 lines is used. The max speed of motor is 3000 rpm and the rated current is 3.13 A. The serial port communicating baud rate between the STM32F103 and computer is 115,200.
Appl. Sci. 2020, 10, x 10 of 13 mode controller, and disturbance compensation based on ESO is designed for speed loop and q-axis current loop. It can be seen that PI has the worst performance and cannot handle disturbance very well. In Figures 10 and 11, speed sliding mode controller and speed loop disturbance compensation technology can significantly improve the anti-disturbance ability of the system. In Figures 12 and 13, current loop disturbance technology can speed up the dynamic response of the system and shorten the adjustment time. Moreover, it can make iq tracking iq reference faster and more stable. A detail comparison is shown in Table 1.   In order to verify the effectiveness of the proposed method, the proposed method is compared with other controllers. The speed curve under PI speed controller is shown in Figure 9, the proportional gain and integral gain of speed PI controller are 200 A/rad/s and 50 A/rad, respectively. The proportional gain and integral gain of current loop PI controller are 572 V/A and 121 V/A s, respectively. The parameters of sliding mode speed controller are as follows: c = 21, ε= 50, k = 0.0075. The parameters of ESO are as follows: α 1 = 3000, α 2 = 3000. The speed curve under speed loop sliding mode controller is shown in Figure 10, the current loop controllers are PI. The speed curve under SMC with speed loop compensation is shown in Figure 11. In Figure 12, the speed controller is sliding mode controller, and disturbance compensation based on ESO is designed for speed loop and q-axis current loop.            It can be seen that PI has the worst performance and cannot handle disturbance very well. In Figures 10 and 11, speed sliding mode controller and speed loop disturbance compensation technology can significantly improve the anti-disturbance ability of the system. In Figures 12 and 13, current loop disturbance technology can speed up the dynamic response of the system and shorten the adjustment time. Moreover, it can make i q tracking i q reference faster and more stable. A detail comparison is shown in Table 1.
curve when load disturbance.    Figure 13. i q and i q reference with current loop compensation and without current loop compensation: (a) curve of i q and i q reference without q-axis current compensation, (b) curve of i q and i q reference with q-axis current compensation.

Conclusions
In this paper, a robust control method based on feed-forward compensation has been proposed for PMSM speed-regulation system. A feed-forward based on ESO is introduced in speed loop and q-axis current loop to improve the dynamic response and robustness. By means of the disturbance estimation for feed-forward compensation, the compensator can generate a compensation signal to reduce the interference of lumped disturbance, which include external disturbance and internal disturbance, in the system. In particular, compensation for current loop disturbances significantly improves the performance and robustness of the system. A transition process of reference signal is introduced, which can reduce the initial error and increase the range of error feedback gain to improve system robustness. Both simulation and experimental results have been presented to verify the feasibility of the proposed method.

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