Adaptive PIF Control for Permanent Magnet Synchronous Motors Based on GPC

To enhance the control performance of permanent magnet synchronous motors (PMSMs), a generalized predictive control (GPC)-based proportional integral feedforward (PIF) controller is proposed for the speed control system. In this new approach, firstly, based on the online identification of controlled model parameters, a simplified GPC law supplies the PIF controller with suitable control parameters according to the uncertainties in the operating conditions. Secondly, the speed reference curve for PMSMs is usually required to be continuous and continuously differentiable according to the general servo system design requirements, so the adaptation of the speed reference is discussed in details in this paper. Hence, the performance of the speed control system using a GPC-based PIF controller is improved for tracking some specified signals. The main motivation of this paper is the extension of GPC law to replace the traditional PI or PIF controllers in industrial applications. The efficacy and usefulness of the proposed controller are verified through experimental results.


Introduction
High-performance servo systems for permanent magnet synchronous motors (PMSMs) are essential in many applications such as precision engineering and industrial automation because of their OPEN ACCESS advantages of high efficiency, high power factor and high power density [1][2][3]. As the control core of the speed control system for a PMSM, the servo drive generally uses a fixed proportional integral (PI) controller to complete the adjustment process. Although the PI controller has the advantages of simple algorithms and high reliability, the control performance is closely related to its structure and control parameters. Nevertheless, as a one-degree-of-freedom (1Dof) controller, even if a traditional PI controller is tuned to be optimal, it is difficult for the servo system to satisfy good load-disturbance rejection and good transient response simultaneously. Recently, controllers with two degrees of freedom (2Dof) are being used more and more frequently [4][5][6]. These controllers are aimed at responding swiftly to speed command changes and offering enough robustness against the uncertainties of the servo system, but more controller parameters must be tuned for the additional flexibility. Therefore, in order to meet the development requirements of high speed and high precision, it is thus desirable to have an intelligent 2Dof controller that can self-tune its control parameters according to the operating condition uncertainties.
Self-tuning strategies for industrial applications have been also widely investigated. Roughly speaking, there are two lines of thought to self-tune the controller parameters so that the controllers can adapt to the varying conditions: model-based methods and rule-based methods [7]. Fuzzy logic theory and neural network (NN) techniques were developed to provide rule-based methods that incorporate self-tuning capability to implement nonlinear algorithms [8][9][10]. They are characterized by a series of linguistic or weight statements in the controller, but there are obstacles to these methods. The learning cost of these methods is considerably large, and these control parameters cannot be adequately adjusted due to the nonlinear properties [11]. For the simplicity and feasibility of self-tuning strategies, model-based methods appear to be more suitable for adoption in real-time self-tuning situations. Alfaro et al. [7] proposed a robust tuning method for a 2Dof PI controller based on the model reference optimization procedure, but its effectiveness depended on the accuracy of the model, and the method might not sound solid when the estimated model conditions were violated in real applications.
In order to solve the problem considering the accuracy of the controlled model, many PID controllers based on a generalized predictive control (GPC) law have been proposed to improve the performance of the control system [12,13]. A GPC law is a model-based controller not requiring extra compensators, and has been successfully implemented in many industrial applications [14][15][16][17]. An important reason for the growing number of applications is the fact that its linear model can be obtained by identification techniques. Another important reason is its control performance deterioration caused by the identification errors of the controlled model can be prevented [18]. Therefore, by using GPC to tune 2Dof PI controller parameters online in this paper, not only can the stability of the speed control process be guaranteed, but control parameters can also be tuned automatically according to the changing characteristics of the controlled model.
In this paper, a PI plus feedforward (PIF) controller, in the form of a commercially available 2Dof PI controller, is used to improve the regulatory control performance and the closed-loop control system robustness simultaneously. The main motivation of this paper is to further advance the application of GPC in adaptive control for PMSM systems. There are possibly two contributions in design of a GPC-based PIF controller.
First, the mainly disadvantage of GPC law is that the computational expense to obtain the solution of an optimization process is considerable at each sampling time [19][20][21]. To solve the problem, a first-order controlled model is employed as the process object for the speed control system, and the parameters of this controlled model can be obtained directly by using a recursive least squares (RLS) algorithm with a low online computation burden. Moreover, Diophantine equations based on a first-order controlled model will be simplified obviously, so real-time performance of the GPC law can be guaranteed. Finally, the reference trajectory of a conventional GPC law was usually integrated as a smooth transition toward the desired trajectory or set point. However, in real industrial applications, this trajectory may not only cause a degradation of the closed-loop control performance, but increase the complexity of the GPC law for a PMSM system. In this paper, the trajectory will be ignored and a simplified cost function only requiring a future speed tracking error item and a penalization item on the torque current command is used.
Second, conventional GPC-based PID controllers use the future reference trajectory to obtain control performance as good as that of the GPC law, and have been designed to follow a step-type or a ramp-type reference command [18,22]. Frequent step-type speed commands for a PMSM will severely impact the electrical and mechanical agencies of the servo system, and a ramp-type command is discontinuous and just a special application, but the speed command for a commercial servo drive is usually required to be continuous and at least first-order differentiable. Meanwhile, due to the structural differences between a PIF controller and a PID controller, the coefficients of the GPC law need to be rearranged and keep in consonance with those of the PIF controller. In this paper, a GPC law can be straightforwardly replaced by a PIF controller, and the GPC-based PIF controller will be designed to follow many general reference curves for speed commands. However, it is noted that an arbitrary reference command does not necessarily satisfy the design requirements for the GPC-based PIF controller.
The paper is organized as follows: in Section 2, the system model of the PMSM is built in detail. In Section 3, the model parameters of a dynamic process object for a PMSM will be obtained in real time by using an RLS method, then, based on the controlled model and the future speed reference, a GPC law will supply a PIF controller with the suitable controller parameters to ensure good control performance. Experimental results are presented in Section 4 and conclusions are drawn in the final section.

Speed Control System of PMSM
Under perfect field orientation and sensing technique conditions, the complicated coupled nonlinear dynamic performance of a PMSM can be significantly improved, whereby torque and flux can be tuned separately by two closed loops [23,24]. Thus accurate current feedback and position feedback are important factors in the realization of a high-precision and highly responsive closed control system [25]. A system configuration of a vector-controlled PMSM servo system is shown in Figure 1. In this vector control scheme, three-phase current is often detected by using a Hall current sensor, and position information is often obtained by using a high-resolution optical encoder. In the high-performance speed control system, a considerable high-bandwidth current loop is designed to ensure accurate current tracking and act as a current source amplifier within the current loop bandwidth [26]. Assuming the perfect current tracking and ignoring dead time in this paper, an average controlled model of a PMSM is shown in Figure 2. Accordingly, the mechanical dynamics can be reasonably described as: (1) where ω f is feedback speed; i qr is expected torque current; k f is the torque coefficient related with flux linkage of PMSM; J is the system inertia including the load inertia; T dist is the external disturbances; B is the frictional torque coefficient. The uncertainties of the servo system mainly include the load inertia and load torque. In the running of a servo system, system inertia may change. When the system inertia increases, the response of the servo system will speed up with system overshoot, which is likely to cause system instability. On the contrary, when the system inertia decreases, dynamic response will occur with system oscillation as well as turbulence. Meanwhile, the main role of the servo system is to drive the load operation, but in many industries, the load carried by servo system is not constant. Changes in the load torque will have a significant impact on servo control performance: in the running of a servo system, the sudden increase or reduce of load torque would result in fluctuations in servo speed control, affecting the accuracy of positioning and control performance.
Aside from the above reasons, the true controlled model may be more complex and of high-order since the current sensor and position sensor are nonlinear systems [27]. Actually, in order to better apply a GPC law to servo control, the effect of uncertainties is considered as the variation of model parameters. So the dynamic model of PMSM is rewritten as: (2)

Discrete-Time Model and Controller
Based on Equation (2), with the zero-order-hold (ZOH) conversion, the mathematical expression of controlled model can be described with the following discrete difference equation: where T s is the sampling time of servo system; a 1 and b 0 are the estimated parameters; ξ(k) is white noise; ∆ is the differential operator, The control structure of PIF controller is shown in Figure 3. In order to use GPC to tune the control parameters, the PIF controller can be described as: where k pv is velocity loop proportional gain; k iv is velocity loop integral gain; k fv is velocity loop feedforward gain. i qr usually need to be limited, and ∆i qr is used for GPC to replace PIF controller.

The design of Adaptive PIF Controller
The basic function of the GPC law is to calculate a sequence of future control signals in such a way that it minimizes a cost function defined over a prediction horizon [28,29]. In this paper, the GPC-based PIF controller mainly includes performance prediction, future reference trajectory and control B Js parameters calculation. The structure of a GPC-based PIF controller is presented in Figure 4. Firstly, torque current and actual speed are sampled for obtaining a controlled model in every control period, and a recursive least squares (RLS) algorithm is used to update the model parameters. Then, based on the controlled model and future reference trajectory, the predicted output can be obtained and the calculation of future control values can be achieved. Finally, future control values will supply the PIF controller with suitable control parameters online.

The Identification of Model Parameters
In order to obtain predictions of the speed control performance, continuous recognition should be applied to the model parameters of the controlled object. The model parameters can be generally obtained by a RLS algorithm, so the parameters in the polynomial of A(z −1 ) and B(z −1 ) in Equation (3) are calculated using the following recursive least squares method [30]: where α* is the forgetting factor; X(0) = α Г I (0 < α Г < ∞).

Performance Prediction
To simplify the GPC law, the trajectory will be ignored, and a cost function of the speed control system is designed by using output error and quadratic indicators form of weighted control increments: where N 1 is minimum predictive horizon, usually choose N 1 = 1; N 2 is maximum predictive horizon; N u is control horizon, generally N u ≤ N 2 ; λ is the control increment weighting factor.
Because B(z −1 ) is zero order polynomial, simplified Diophantine Equations (11) and (12) are solved to obtain ω f (k + j): Then the j steps ahead predictive output is obtained by following equation: (14) Obviously, in the right hand part of Equation (14), the first two terms and the third are irrelevant. If the first two are regarded as the optimal prediction, then the third is the prediction error, that is, the optimal prediction controlled object can be expressed as: (15) The vector form of Equation (14) is expressed as: The vector form of the cost Function in Equation (10) can be obtained: Since Equation (22) is quadratic in i qr , the optimal solution with respect to i qr is obtained by: (24) The use of the first element of i qr gives the following control law:

Future Reference Trajectory
Remark 1: Compared with the increment control output in [18,22], Equation (25) is more simple, only requiring a future speed command item and a feedback speed item. However, the future speed command item cannot be straightforwardly achieved in the PIF controller. To apply the GPC law to the PIF controller, assuming the speed command curve for PMSM is arbitrary-order continuously differentiable at some points, the future reference trajectory can be expressed by the following equation by using Taylor series expansion: (27) where g(k, j) is related to k and j. Detailed expressions of Equation (27) are given in Appendix A.
Remark 2: If the speed command cannot be expressed as Equation (27), the polynomial of GPC will not match with the polynomial of the PIF controller, and the GPC law will not supply the PIF controller with the suitable control parameters. When a PMSM runs at constant velocity, the servo drive is required to set the rise time and the drop time. Therefore, the rise stage and the drop stage of speed command are usually set as a continuously differentiable curve, e.g., trapezium-type or exponent-type curve, in this case, g(j) is only related to j and Equation (27) can be simplified as:

Optimal Control Parameters Calculating
Using Equation (28), the first term on the right hand side of Equation (25) is rewritten as: (29) Using Equation (29), the GPC law Equation (25) is rewritten as: Based on 1, so the following equations can be obtained: Then comparing Equation (30) with Equation (4), the PIF controller gain parameters are calculated by the GPC law: (32) With the above discussion, the implementation of a GPC-based PIF controller design is summarized as follows: Step 1: Given the related parameters for an RLS law and a GPC algorithm.
Step 2: The controlled model parameters a 1 and b 0 are updated online by the RLS law.
Step 3: Based on the controlled model, Diophantine Equations (11) and (12) are solved to obtain ω f (k + j) and ∆i qr (k) is obtained by Equation (25).
Step 4: Speed command can be expressed as Equation (28), then, the PIF controller gain parameters can be tuned by Equation (32).
Step 5: Set k = k + 1 and go to step 2.

Experiment
The apparatus for the experimental platform contains three major parts and some data transferring buses, as shown in Figure 5. These three major parts are: (1) PC-based PCI motion controller with sampling time equal to 5 ms; (2) AC servo drive with position, velocity and torque control modes using a DSP plus a FPGA, where DSP TMS320F2812 mainly accomplishes in real-time control algorithms during motion control, and FPGA EP2C8Q208C8N is responsible for the analysis and realization of absolute ruler and NCUC-Bus protocols; (3) PMSM with the parameters described in Table 1, increment encoder with 2,500 pulse/revolution is fixed in the PMSM. Through the PCI controller, the PC sends the speed command and control parameters to the servo drive, receives expected torque current and feedback velocity from the servo drive for the identification of model parameters, and implements the RLS algorithm and proposed GPC-based PIF design every 5 ms by a commercial Servo Self-adapted Turning Tool (SSTT) software based on the VC environment.
In the experimental tests, the maximum value of the speed command is set to 1,200 r/min, its rise time and drop time are set to 1 s. Finally, all experimental data from the SSTT are plotted by using Matlab 6.5. The related parameters for the RLS algorithm and the GPC law are: N 1 = 1, N 2 = 10, N u = 2, λ = 0.01, and α* = 0.94. To evaluate the control performance and confirm the effectiveness of the proposed strategy, three different tests, which all consider a traditional PI controller and a traditional PIF controller, have been taken on the experiment platform.   Figures 6 and 7 show the speed response and speed error for the traditional PI controller, traditional PIF controller and GPC-based PIF controller. It is clear that traditional PI controller and traditional PIF controller do not meet the precision control requirement, and a large speed error exists in the whole control process, especially in the rise stage and the drop stage. Meanwhile, the performance of the speed response based on the adaptive PIF controller is obviously improved in the whole process, except in the initial stage, because model parameters are not completely convergent. PIF controller gains are shown in Figure 8, because more torque is required in the rise stage and the drop stage, controller gains of the rise stage and the drop stage is larger than those of the steady stage. The identification result for model parameters using the RLS algorithm is shown in Figure 9, it can be seen that model parameters in uniform velocity stage are relatively stable without applied load.

Test 2 with Applied Load Inertia
In this test, the load inertia is a triple rotor inertia, and is applied to confirm the robustness and the effectiveness of the proposed controller. It is noted that the control gains of traditional PI controller and traditional PIF controller are the same as in test 1. Figures 10 and 11 show the speed response and speed error for a traditional PI controller, traditional PIF controller and GPC-based PIF controller. It is clear that the traditional PI controller and traditional PIF controller both lead to large speed errors and system overshoot in the control process. Meanwhile, the adaptive PIF controller can continue to maintain fairly good control performance in the whole control process, but the initial model mismatch still exists. GPC-based PIF controller gains and model parameters are shown in Figures 12 and 13, because system inertia becomes larger and leads to speed overshoot in the transition point between the rise stage and the steady stage, controller gains of the transition stage are required to become larger to overcome the larger inertia.

Test 3 with Applied Load Torque
In this test, load torque is applied to confirm the robustness and the effectiveness of the proposed controller. The initial load torque is set to 2 Nm, and became to be 9 Nm when t = 3 s. It is noted that the control gains of the traditional PI controller and traditional PIF controller are still the same as in test 1. Figures 14 and 15 show the speed response and speed error for the three controllers. When 0 < t ≤ 3 s, it is clear that traditional PI controller and traditional PIF controller both lead to larger speed errors and system overshoot than those in test 2. When t ≥ 3 s, because of the variation of load torque, the actual speed drops and begins to keep speed tracking after 1 s. Meanwhile, the adaptive PIF controller can continue to maintain fairly good control performance in the whole control process especially when t ≥ 3 s. The initial model mismatch still exists, but the control performance is superior for the adaptive PIF controller. PIF controller gains and model parameters are shown in Figures 16 and 17, because load torque becomes larger and makes servo speed drops when t ≥ 3 s, controller gains of the transition stage is required to become larger to overcome the load torque.

Conclusions
The speed control systems of the PMSMs employed in various industries are almost always controlled by traditional PI and PIF controllers. In order to meet the development requirements of high performance servo systems, this paper has proposed a new GPC-based PIF controller to increase the robustness of servo systems. In this method, controlled model parameters can be obtained online by an RLS algorithm. Based on the controlled model, a high performance and simplified GPC supplies the PIF controller with suitable control parameters according to the uncertainties in the operating conditions. The experimental results show a good control performance and strong robustness of the speed control system can be maintained.