A Control Method for IPMSM Based on Active Disturbance Rejection Control and Model Predictive Control

: In this paper, the speed tracking problem of the interior permanent magnet synchronous motor (IPMSM) of an electric vehicle is studied. A cascade speed control strategy based on active disturbance rejection control (ADRC) and a current control strategy based on improved duty cycle ﬁnite control set model predictive control (FCSMPC) are proposed, both of which can reduce torque ripple and current ripple as well as the computational burden. First of all, in the linearization process, some nonlinear terms are added into the control signal for voltage compensation, which can reduce the order of the prediction model. Then, the dq-axis currents are selected by maximum torque per ampere (MTPA). Six virtual vectors are employed to FCSMPC, and a novel way to calculate the duty cycle is adopted. Finally, the simulation results show the validity and superiority of the proposed method.


Introduction
With the gradual exhaustion of resources and the aggravation of global pollution, Electric Vehicles (EVs) have become the future development trend of the automobile industry. The era of Industry 4.0, marked by Cyber-Physical Systems (CPS), promotes the rapid development of EVs. The cyber subsystem is located in the feedback loop of the electric vehicle drive motor. The cyber subsystem drives actuators and the controlled drive motor based on the current states and inputs of the sensors [1,2]. The permanent magnet synchronous motor, especially interior permanent magnet synchronous machines (IPMSM), has become the ideal driving motor for EVs due to its advantages such as high efficiency, high power factor, wide operating speed range, high torque to the current ratio, and robustness.
The nonlinear dynamic of IPMSM, its motor parameter variations, and external disturbances can deteriorate control performances, and proportiona-integral (PI) and linearquadratic (LQ) regulators cannot achieve good performances. Accordingly, some intelligent control methods have been proposed to improve the control performances, such as robust and adaptive nonlinear approaches, sliding mode control, neural network, fuzzy controllers and genetic algorithms (GAs), backstepping control, and active disturbance rejection control (ADRC).
Robust and adaptive nonlinear approaches have been widely used for control of IPMSM. In [3], an adaptive flux observer is proposed to improve its robustness. In [4], an adaptive interconnected high gain observer has been employed for sensorless control eight to three [23]. In [24], the sector of the desired voltage vector is directly determined, rather than traversing all switch states. Although the approaches mentioned above can reduce the calculation time, they still have large torque ripples and current ripples. Hence, the emphasis of this paper is to decrease the torque ripple and current ripple of FCSMPC.
In this paper, a cascade speed controller based on ADRC and a current controller based on improved FCSMPC for IPMSM are proposed. A different approach to dealing with nonlinear terms in IPMSM is proposed. In the linearization process, some nonlinear terms are added into the control signal for voltage compensation, which can reduce the order of the prediction model. The ADRC controller is used to estimate the nonlinear terms in the mechanical motion equation and generate the appropriate torque reference. Then, the torque reference is converted into the dq-axis current reference of the current controller according to MTPA. Six virtual vectors are employed to FCSMPC, and a novel way to calculate the duty cycle is adopted. The proposed FCSMPC controller applies both current and voltage constraints and reduces torque ripple and current ripple as well as computational burden. Compared with traditional PI control and traditional FCSMPC, the effectiveness and superiority of the designed ADRC controller and improved duty cycle FCSMPC controller are verified.
This paper is organized as follows. Section 2 introduces the mathematical model of IPMSM. Section 3 presents the design details of the ADRC speed controller, and Section 4 presents the design details of the improved duty cycle FCSMPC method in IPMSM. The simulation result is presented in Section 5. The conclusion is given in Section 6.

Mathematical of IPMSM
In the three-phase static reference frame, the mathematical model of IPMSM is a nonlinear equation related to the instantaneous position of the rotor, which makes the voltage and flux linkage equations too complicated to be analyzed. The IPMSM established in the three-phase static reference frame (abc) can be converted into a synchronous reference frame (dq) by the Clark transformation and the Park transformation.
The mathematic model of the IPMSM can be described as follows: where variables u d , u q , i d , i q , L d , L q are the d-axis voltage, q-axis voltage, d-axis current, q-axis current, d-axis inductance and q-axis inductance, respectively; variables ω, R, and ψ f are the electrical angular velocity, stator resistance, and rotor flux, respectively; J is the moment of inertia, B is the viscous coefficient of the load, and T L is the disturbance torque, which is given by Since ω e (t), i q (t) and i d (t) can be measured, ω e (t)i q (t) and ω e (t)i d (t) can be considered as compensation for control signals and removed from the original model and then added after solving the control signal: where The state vector of the system can be expressed as: Define the control vector as u = u d , u q T , the disturbance as d = T L . Then, the state equation is transformed into the following standard form: . where,

Structure of Control System
The system block diagram of the overall motor-control scheme is shown in Figure 1, which consists of an IPMSM, a three-phase voltage inverter, a coordinate transformation, speed controller based on ADRC and a current controller based on improved duty cycle FCSMPC.
The state vector of the system can be expressed as: Define the control vector as = [ , ] , the disturbance as = . Then, the state equation is transformed into the following standard form: where,

Structure of Control System
The system block diagram of the overall motor-control scheme is shown in Figure 1, which consists of an IPMSM, a three-phase voltage inverter, a coordinate transformation, speed controller based on ADRC and a current controller based on improved duty cycle FCSMPC.
Assuming that is the electrical angular velocity reference, * is the torque reference, * is the d-axis current reference, * is the q-axis current reference, is the dqaxis current, is the abc-axis current and is the electrical angle.  Assuming that ω re f is the electrical angular velocity reference, T * e is the torque reference, i * d is the d-axis current reference, i * q is the q-axis current reference, i dq is the dq-axis current, i abc is the abc-axis current and θ is the electrical angle.
The ADRC controller is used to estimate the nonlinear terms in the mechanical motion equation and generate the appropriate torque reference. Then, the torque reference is converted to the dq-axis current reference of the current loop according to MTPA. According to the current reference, the switching signal is generated by the improved duty cycle FCSMPC. Finally, the output voltage signal is used to control IPMSM. The ADRC controller is introduced in Section 3, the MTPA and improved duty cycle FCSMPC are introduced in Section 4.

Speed Controller Based on ADRC
ADRC controller is usually composed of a tracking differentiator, extended state observer (ESO) and nonlinear error feedback control law. The tracking differentiator has no use in the control of IPMSM. Therefore, only the extended state observer and nonlinear error feedback control law need to be designed.
Part of the speed differential equation can be regarded as the model disturbance of the system, which can be written as: where, Equation (6) contains the uncertainty term a(t) and the control term u. If a(t) can be correctly observed by ADRC and can be fed back into a known quantity, then the dynamic equation can be simplified into a first-order equation.
The extended state observer corresponding to Equation (6) can be expressed as: where z 1 is used to observe the rotational speed state, which is used to track the actual speed. z 2 is the expanded state, which represents the estimation of the interference term a(t) in Equation (6). u is the control variable, e is the input deviation, δ 1 is the adjustable coefficient greater than 0, and ω is the actual speed. α 1 , α 2 , β 1 and β 2 are the coefficients that need to be adjusted. fal() in Equation (7) can be expressed as: where, (7) can estimate the speed ω and the interference term a(t), and the first-order nonlinear control law is given as: Substitute Equation (9) to Equation (6) and the final control output can be given as:

The Maximum Torque Per Ampere (MTPA)
The Maximum Torque Per Ampere control is used to maximize the torque when the amplitude of the current vector is the minimum. Solving the current value under the Maximum Torque Per Ampere control can be equivalently expressed as: Mathematics 2021, 9, 760 6 of 16 The problem shown in Equation (11) can be solved by the Lagrange multiplier method. The derivation process of MTPA is not discussed in this paper. By derivation, the relationship between i d and i q can be described as: The relationship between T e and i q can be described as: Equation (13) can be solved numerically by the fsolve() function of MATLAB. In order to meet the time limit of online calculation, the i q corresponding to each torque can be obtained in advance according to the interval and then made into a table. Hence, the corresponding i q can be obtained only through the given torque-i q table during online calculation.
Due to the complexity of the solution, calculating i d directly through Equation (12) cannot meet the requirements of real-time applications. Therefore, using Taylor's formula to expand near a point close to 0 (select 0.001) and ignoring the minimal term and higherorder terms in the expansion: It is also necessary to consider the issue of constraints. The dq-axis current must satisfy the constraint i 2 d + i 2 q ≤ I 2 N . Therefore, the actual steps are as follows: 1 set torque T e ; 2 calculate i q and i d according to Equations (13) and (14); Step 5; otherwise, loop to Step 4; output i q and i d as current reference values for the current regulator.

Current Controller Based on FCSMPC
FCSMPC is based on the finite switching states. This method does not require a modulator such as Space Vector Pulse Width Modulation (SVPWM), and the nonlinear characteristics of the system and various constraints can also be easily integrated into the system.
For the design of FCSMPC, the current prediction model discretized by the first-order Euler discretization method can be expressed as: where, The prediction equation of FCSMPC can be expressed as: where where u i (k) is the selection of the i-th switch state, and X i (k + 1) is the current state at the next sampling time after the i-th switch state is applied. The traditional FCSMPC method traverses all the switch states according to Equation (16), obtains all the predicted states at the next moment, and selects the switch state corresponding to the vector with the smallest difference in the expected voltage vector amplitude for control. Considering the current constraints, the corresponding cost function can be expressed as:

Improved Duty Cycle FCSMPC
The duty cycle FCSMPC is to add a zero vector in one period, so the optimal vector is only used for a part of the sampling period. Assuming that the ratio of the optimal vector action time to the sampling period final state can be expressed as: define εX i (k + 1) = X # − X i (k + 1), which represents the deviation of the given state vector X # from the i-th vector X i (k + 1), εX 0 (k + 1) = (x 0 , y 0 ), which represents the deviation from the given value under the action of the zero vector.
Assuming that the voltage vector V i = (x 1 , y 1 ), the angle between the two voltage vectors can be expressed as: The optimal vector can be obtained by comparing the size of each vector's cos θ, assuming that the optimal vector is j; the ideal origin is O; the future state under the action of zero vector is A, X 0 (k + 1); the current state of the system is B, X(k); the given state is C, X # ; and the state after its action is D, X j (k + 1).
The geometric relationship is shown in Figure 2: If + 1 is omitted, then the Equation (18) can be expressed as: Assuming that the vector of this state is , which satisfies = , = ( , ) and = ( , ), then Due to ⊥ , substitute it into Equation (21) and obtain However, this method still has its limitations. With only six vectors and two zero vectors to choose from, it cannot approach the possible vectors sufficiently. In order to make the optimal vector more accurate, consider adding 6 virtual voltage vectors. All virtual voltage vectors can be regarded as the result of two adjacent basic vectors acting for half of the time.
First calculate all the basic vectors to select the optimal vector and the sub-optimal vector and then compare with the virtual vector between these two vectors, so that the optimal vector can be obtained in only eight computations.
In addition, due to current constraints, the voltage vector selected according to Equation (19) may cause the stator current to exceed the limit value at the next moment. Therefore, after selecting the optimal vector and calculating the duty cycle. It can be judged according to the following process.
First, the average value of the control voltage in a sampling period can be expressed as: Define ( ) = [ ( ) ( ) ( )] , which represents the ratio of the time when each switch state is 1 to the sampling period. Substituting it into Equation (23), the control quantity of a sampling period can be expressed as: Substituting Equation (24) into Equation (15), the predicted current value at the next moment can be obtained. If the predicted current exceeds the current limit value, then the sub-optimal vector is selected until the stator current is less than the limit. If k + 1 is omitted, then the Equation (18) can be expressed as: Assuming that the vector of this state is Due to → CE⊥ → AE, substitute it into Equation (21) and obtain However, this method still has its limitations. With only six vectors and two zero vectors to choose from, it cannot approach the possible vectors sufficiently. In order to make the optimal vector more accurate, consider adding 6 virtual voltage vectors. All virtual voltage vectors can be regarded as the result of two adjacent basic vectors acting for half of the time.
First calculate all the basic vectors to select the optimal vector and the sub-optimal vector and then compare with the virtual vector between these two vectors, so that the optimal vector can be obtained in only eight computations.
In addition, due to current constraints, the voltage vector selected according to Equation (19) may cause the stator current to exceed the limit value at the next moment. Therefore, after selecting the optimal vector and calculating the duty cycle. It can be judged according to the following process.
First, the average value of the control voltage in a sampling period can be expressed as: Define ρ(k) = ρ a (k) ρ b (k) ρ c (k) T , which represents the ratio of the time when each switch state is 1 to the sampling period. Substituting it into Equation (23), the control quantity of a sampling period can be expressed as: Substituting Equation (24) into Equation (15), the predicted current value at the next moment can be obtained. If the predicted current exceeds the current limit value, then the sub-optimal vector is selected until the stator current is less than the limit.

Simulation Results
The parameters of IPMSM are selected from Toyota Prius Hybrid vehicles, as shown in Table 1. The relevant parameters of ADRC speed controller are α 1 = 0.8, δ 1 = 0.001, The simulation condition simulates the driving condition of the car. The car starts with a load of 10 N·m until it reaches the speed of 1000 r/min. The load is increased to 30 N·m at 0.4 s to simulate uphill conditions. After smooth operation, the load is reduced to 10 N·m at 0.6 s to simulate flat road driving. The entering speed is reduced to 500 r/min at 0.8 s, and it enters the deceleration driving mode.
Under the same conditions, simulation experiments were carried out for the control system of the following controllers, as shown in the control block diagram in Figure 1, assuming that C 1 is the speed controller and C 2 is the current controller.
Case 1: C 1 uses PI control, and C 2 also uses PI control; Case 2: C 1 uses PI control, and C 2 uses improved duty cycle FCSMPC; Case 3: C 1 uses ADRC control, and C 2 uses traditional FCSMPC; Case 4: C 1 uses ADRC control, and C 2 uses improved duty cycle FCSMPC. Figure 3 shows the comparison of the speed response in Cases 1, 2 and 4. It indicates that all three controllers can rapidly increase the speed until reaching the given value of 1000 r/min during the starting process with load. The first magnified portion shows the speed response of three controllers as the speed approaches steady state. The peak time in Case 1 is the same as that in Case 2, but the overshoot in Case 2 is smaller than that in Case 1, and the steady-state time is significantly less than that in Case 1. Compared with Case 1 and Case 2, the adjustment time in Case 4 is significantly lower than these two cases, and there is no overshoot. Therefore, it has significant advantages. The second magnified portion shows the speed response when entering the uphill condition at 0.4 s. Due to the increase of load torque, there is a short decrease of rotating speed in all three control cases. Compared with Case 2, the rotational speed in Case 2 decreases less than that in Case 1, and the time for the rotational speed to recover the given value is shorter. Compared with Case 1 and Case 2, the speed drop in Case 4 is the smallest, and it returns to the given value in a short time. After a period of stable operation, the system enters the flat driving condition. The third magnified portion shows the speed response in the three control situations when the load drops. There are larger fluctuations and longer adjustment times in Case 1, the adjustment times in Case 2 and Case 4 are shorter, and the overshoot in Case 4 is smaller. Afterwards, it enters the deceleration condition at 0.8 s. The fourth magnified portion shows the speed response when the target speed is about to reach 500 r/min during deceleration. It indicates that there is no overshoot in Case 4, and the time to reach the steady state is the shortest. From the comparison of the speeds in the two cases in Figure 4, in acceleration driving condition, the peak time in Case 3 is much longer than in Case 4. Additionally, there are still fluctuations in Case 3 when reaching the steady state. Similarly, the same situation also occurs when the given speed drops. The adjustment time is significantly shorter in Case 4.  Table 2 shows the speed dynamic response in all cases. There is almost no overshoot and transient time in the acceleration and deceleration driving condition using the ADRC controller in Case 3 and Case 4. This proves that the control system using the ADRC controller has a better control effect. Compared with Case 3, Case 4 has less peak time, overshoot and transient time in all conditions. Obviously, compared with the control system using the traditional FCSMPC, the control system using the improved duty cycle FCSMPC has a better control effect. From the comparison of the speeds in the two cases in Figure 4, in acceleration driving condition, the peak time in Case 3 is much longer than in Case 4. Additionally, there are still fluctuations in Case 3 when reaching the steady state. Similarly, the same situation also occurs when the given speed drops. The adjustment time is significantly shorter in Case 4.  Table 2 shows the speed dynamic response in all cases. There is almost no overshoot and transient time in the acceleration and deceleration driving condition using the ADRC controller in Case 3 and Case 4. This proves that the control system using the ADRC controller has a better control effect. Compared with Case 3, Case 4 has less peak time, overshoot and transient time in all conditions. Obviously, compared with the control system using the traditional FCSMPC, the control system using the improved duty cycle FCSMPC has a better control effect.  Table 2 shows the speed dynamic response in all cases. There is almost no overshoot and transient time in the acceleration and deceleration driving condition using the ADRC controller in Case 3 and Case 4. This proves that the control system using the ADRC controller has a better control effect. Compared with Case 3, Case 4 has less peak time, overshoot and transient time in all conditions. Obviously, compared with the control system using the traditional FCSMPC, the control system using the improved duty cycle FCSMPC has a better control effect.  Figures 5 and 6 show the d-axis current response and the q-axis current response in Case 1, Case 2 and Case 4. When the speed drops, the currents are shown in the first magnified portion of the two figures. In the three cases, the currents are fluctuant in the steady state. The dq-axis currents have very large overshoots in Case 1 and Case 2, while there is almost no overshoot in Case 4. When entering the uphill condition at 0.4 s, the absolute value of the dq-axis currents is increased to offset the increased load torque. At this time, the time to reach the steady state is the shortest in Case 4. The time to reach the steady state in Case 4 is still the shortest when it reaches the flat driving condition at 0.6 s. When entering the deceleration driving condition at 0.8 s, the q-axis current reverses to generate the maximum torque in the negative direction to decelerate rapidly, and then it returns to constant speed driving. The currents decrease so that the output torque is equal to the load torque, and the dq-axis current responses are shown in the fourth magnified portion of the two figures. The dq-axis current has no overshoot in Case 4, and the adjustment time is the shortest. There are large overshoots in Case 1 and Case 2, and the adjustment time is relatively long.   Figures 5 and 6 show the d-axis current response and the q-axis current response in Case 1, Case 2 and Case 4. When the speed drops, the currents are shown in the first magnified portion of the two figures. In the three cases, the currents are fluctuant in the steady state. The dq-axis currents have very large overshoots in Case 1 and Case 2, while there is almost no overshoot in Case 4. When entering the uphill condition at 0.4 s, the absolute value of the dq-axis currents is increased to offset the increased load torque. At this time, the time to reach the steady state is the shortest in Case 4. The time to reach the steady state in Case 4 is still the shortest when it reaches the flat driving condition at 0.6 s. When entering the deceleration driving condition at 0.8 s, the q-axis current reverses to generate the maximum torque in the negative direction to decelerate rapidly, and then it returns to constant speed driving. The currents decrease so that the output torque is equal to the load torque, and the dq-axis current responses are shown in the fourth magnified portion of the two figures. The dq-axis current has no overshoot in Case 4, and the adjustment time is the shortest. There are large overshoots in Case 1 and Case 2, and the adjustment time is relatively long.   Figure 7 shows that the dq-axis current under the control in Case 3 fluctuates greatly, which will cause the electromagnetic torque value generated to be smaller than that in Case 4. Due to the excessive current fluctuation, it is difficult for it to stabilize when it reaches the steady state. Hence, the speed still fluctuates in the steady state.    Figure 7 shows that the dq-axis current under the control in Case 3 fluctuates greatly, which will cause the electromagnetic torque value generated to be smaller than that in Case 4. Due to the excessive current fluctuation, it is difficult for it to stabilize when it reaches the steady state. Hence, the speed still fluctuates in the steady state.  Figure 7 shows that the dq-axis current under the control in Case 3 fluctuates greatly, which will cause the electromagnetic torque value generated to be smaller than that in Case 4. Due to the excessive current fluctuation, it is difficult for it to stabilize when it reaches the steady state. Hence, the speed still fluctuates in the steady state.     The smaller the THD, the lower the degree of distortion between the waveform and the sine wave of a certain frequency. The proposed controller has a THD of 2.25% in Case 4, 17.00% in Case 3, 2.26% in Case 2, and 2.62% in Case 1. The sines of the waveforms in Case 2 and Case 4 are comparable, while the sine is slightly worse in Case 1 and the worst in Case 3. The smoothness of the waveform generated by the traditional FCSMPC is low. While the improved duty cycle FCSMPC is used as the current controller in Case 2 and Case 4, the smoothness of the waveforms is the highest. Therefore, the effectiveness of the proposed current controller can be further proved.  Total Harmonic Distortion (THD) indicates the degree of waveform distortion caused by all harmonics. The smaller the THD, the lower the degree of distortion between the waveform and the sine wave of a certain frequency. The proposed controller has a THD of 2.25% in Case 4, 17.00% in Case 3, 2.26% in Case 2, and 2.62% in Case 1. The sines of the waveforms in Case 2 and Case 4 are comparable, while the sine is slightly worse in Case 1 and the worst in Case 3. The smoothness of the waveform generated by the traditional FCSMPC is low. While the improved duty cycle FCSMPC is used as the current controller in Case 2 and Case 4, the smoothness of the waveforms is the highest. Therefore, the effectiveness of the proposed current controller can be further proved.

Conclusions
This paper presents the application of a cascade speed control strategy based on ADRC and a current control strategy based on improved duty cycle FCSMPC in an IP-MSM speed tracking problem. More than six virtual vectors are used to reduce torque ripple and current ripple, and this novel way to select the optimal vector leads to a reduction in the computational burden. The proposed controllers are investigated at different driving conditions with current and voltage constraints. Compared with traditional PI control and traditional FCSMPC, the simulation results indicate that the proposed controllers exhibit better dynamic performances keeping all system variables within rated. Additionally, the THD and current ripple is lower than that of PI control and traditional FCSMPC. Our future work will be extending the results to other potential applications including energy storage management.

Conclusions
This paper presents the application of a cascade speed control strategy based on ADRC and a current control strategy based on improved duty cycle FCSMPC in an IPMSM speed tracking problem. More than six virtual vectors are used to reduce torque ripple and current ripple, and this novel way to select the optimal vector leads to a reduction in the computational burden. The proposed controllers are investigated at different driving conditions with current and voltage constraints. Compared with traditional PI control and traditional FCSMPC, the simulation results indicate that the proposed controllers exhibit better dynamic performances keeping all system variables within rated. Additionally, the THD and current ripple is lower than that of PI control and traditional FCSMPC. Our future work will be extending the results to other potential applications including energy storage management.