Model Predictive Control Based PID Controller for PMSM for Propulsion Systems

Model Predictive Control (MPC) is one of the most suitable controllers for industrial applications, especially for constrained systems. However, it requires high computational burden, which is considered as the main drawback. Proportional Integral Derivative (PID) controller is the most widely used controller in particular for Single Input Single Output (SISO) system and for cascaded control loops, but it is difficult to be tuned especially for a constrained system. Therefore, a combination of PID and MPC is addressed. The basic concept of the proposed technique concentrates on the tuning of PID controller gains based on the MPC performance for the closed loop system considering constraints, which will be applied in a control system consisting of two hierarchical levels structure. The algorithm is applied to control the speed of Permanent Magnet Synchronous Motor (PMSM), which is considered as Multi Input Multi Output (MIMO) system.


I. INTRODUCTION
Recently, Permanent Magnet Synchronous Motors (PMSMs) are gaining more attraction in various industries such as railway electric propulsion power trains, ship electric propulsions, electric vehicles [1] and aircraft [2], [3] and also various industrial automation applications [4]. The PMSM has a lot of advantages such as high efficiency, high torque and power densities [5]- [9], simple construction and almost a maintenance-free operation [10]. Nonetheless, accurate and fast speed control of PMSMs is essential for the successful implementation of such machine drives. For a few decades, a popular approach has been implemented on Field Oriented Control (FOC), where a cascaded structure is used for the machine's current, speed and current control loops [11].
The Proportional Integral Derivative (PID) controller has been used in many closed loop systems and is characterized by a simple and robust nature. The performance of the closed loop system can be improved by setting and fine tuning of the PID parameters for an optimal response of the system. Nowadays, there are many literatures that have addressed various techniques for PID tuning [12].
However, in the last few years, a more advanced type of control known as Model Predictive Control (MPC) has become ever-more popular. Today, it is used in a number of applications such as industrial manufacturing processes and energy environment systems [13], [14]. MPC is an optimization-based method that calculates the next control action by decreasing the difference between the predicted output of a system and the specified reference [15]. The behaviour of the process changes by changing the value of the manipulated variables using the mathematical model. The moves of the manipulated variables are selected such that the predicted output has certain desirable characteristics and only the first computed change in the manipulated variable is implemented [16].
Recently, a number of comparative studies between PID and MPC controllers are available and in general terms, the superiority of the MPC based control systems for specific applications is observed when compared to conventional PID-based schemes [17], [18].
Another interesting area that the present work is concerned with is the adaptation and fine tuning of PID parameters based on MPC algorithms [16], [19], [20], [21]. An important MPC controller type is the Generalized Predictive Control (GPC) algorithm. The GPC's performance is achieved by providing the online tuning of the PID gains through using the recursive least square identification method. The proposed control system can be applied to various applications including electrical drive applications such as speed control of PMSM as a Multi Input Multi Output System (MIMO) system. The proposed algorithm with its hierarchical structure could also be applied so that the PID controller is installed in the field level to maintain the desired performance for the motor through its driver, while the GPC controller is performed with a higher level for the constraints handling and for the tuning of PID parameters with respect to the system's behavior, which result in better performance and more reliable control system. Thus, this paper proposes a tuning procedure for a PID controller based on a custom developed GPC technique. In Section II, the discretized linear state-space model of the considered PMSM is presented, while the GPC technique and the tuning of PID based on GPC equations are introduced in Section III. The simulation results of the proposed technique for the considered PMSM are presented in Section IV, followed by the conclusion in Section V.

II. PMSM MODEL
The analytical description of the PMSM is based on the standard d-q model for a PMSM as defined in [12]. The general scheme of the control loops is shown in Fig. 1. The This work is funded by the INNOVATIVE doctoral program. The INNOVATIVE program is partially funded by the Marie Curie Initial Training Networks (ITN) action (project number 665468) and partially by the Institute for Aerospace Technology (IAT) at the University of Nottingham reference, torque reference, is obtained from the cascaded speed control loop [22]. The dq reference components of the stator currents are used to obtain the required gate signals for the inverter through a hysteresis band or PWM current controller. Although the considered model is a nonlinear one, it still needs to be linearized around a definite operating point. In this case, the Taylor expansion is used, and thus the linearized equations for the model are given by: where 0 , 0 and 0 are the operating point's values of the linearized model. After substituting by the classical dq current equations of the PMSM into (1) and (2), the linearized PMSM state space model is given by: where ( ) , ( ) and ( ) represent state, input and output vectors. A m , B m , C m and D m represent system parameters, while is a vector that contains the operating point and certain motor parameters. These components could be defined as follow: where and are the direct and quadrature stator voltage components , and are the direct and quadrature stator current component, and are the direct and quadrature synchronous inductances, Rs is the stator resistance, is the electrical angular velocity, is the stator-rotor flux and is the pole pairs. Finally, the model is discretized with a definite sampling time using first order approximation. The discretized state space model of the system is as given by: where

III. THE PROPOSED ALGORITHM
The GPC algorithm is one of the common MPC techniques that is successfully applied to several applications for a better performance and more robustness. The control signal is computed by solving the cost function subjected to the discretized state-space model in (12) and (13) such as [9]: where ( ) * 1 = ( ) * 1 − ( ) * 1 is the error, ( ) * 1 is the system output, ( ) * 1 is the system reference, ( ) * 1 is the system input, Q( ) * and R( ) * are weighting matrices, x( ) n* 1 is the system states, A n*n , B n*m , C l*n , D l*m are the system parameters, ny is the prediction horizon value, nu is the control horizon value, m is the number of inputs, l is number of outputs and n is the number of states. The recursive form of the model over the prediction horizon ny is given by: ̂( + 1) = P ( ) + H ̂( ) where: ̂( + 1) ( * ) * 1 is the predicted system states,̂( + 1) ( * ) * 1 is the system output, ̂( ) ( * ) * 1 is the system required input and P ( * ) * , H ( * ) * ( * ) , P ( * ) * , H ( * ) * ( * ) are the system coefficients through the prediction horizon ny. The minimization of (19) yields to:

( ) = L[(H T Q( )H + H T Q T ( )H +2R T ( )) −1 2H T Q T ( )(̂( ) − P ( ))]
(29) where L m*(m*n y ) =[I :O], Im*m is an identity matrix and Om*(m*nym) is a zero matrix, r( ) (l*n y )* 1 is the system set point, Q( ) ( * ) * ( * ) and R( ) (m* -1)*(m*n u -1) are weighting matrices. One of MPC's features is its ability to solve the constrained optimization problem. Softening constraints technique could also be used to deal with the system constraints. As a result, the cost function will be: where ( ) * 1 is the maximum control input constraints and S( ) * is the weighting matrix. Minimizing of equation (30) will be:

( ) = L [(H T Q( )H + H T Q T ( )H + 2R T ( )
where ̂( ) ( * −1) * 1 and Ŝ( ) ( * −1) * ( * −1) are the maximum constraints values and weighting matrix respectively through the control horizon − 1. On the other hand, the discretized PID controller could be represented as follows: where ( ) is the error at instant k, kP is the proportional gain, kI is the integral gain and kD is the derivative gain. The adaptation of PID gains is necessary for an enhanced behaviour of the controlled system. The proposed algorithm is developed to obtain PID gains based on GPC through the recursive least square identification technique. An identified model could be illustrated by: where θ is a column vector of parameters to be calculated from observations ( ) and ( ), while ( ) is the noise. The cost function could be developed such as: where αk is a weighting scalar coefficient. The minimization of (34) will be: A recursive formula could be used for lower calculations, let: then: The recursive formula for ( ) is given by: To match between PID controller in (32) and the identification technique, then: the control algorithm is computed for PMSM based on the block diagram shown in Fig. 2.

IV. SIMULATION RESULTS
The simulation is implemented using MATLAB software. The GPC simulation parameters are shown in TABLE I, while the parameters of a practical PMSM are given in TABLE II. The fixed gains for the PID controllers are tuned using the reference tracking classical method [23] (see  TABLE III).     The proposed algorithm is tested for two different operating points, as illustrated in TABLE IV. Figs 34 and 5 represent the response of the motor's speed and stator dq frame currents in the case of the offline tuning of PID and the GPC based PID respectively. The results show that GPCbased PID controllers have a faster response than the conventional PID controllers as the PID gains are auto-tuned with respect to GPC in order to enhance the system's response, which is not performed in the normal PID operation. However, the fast response of the system is followed by an overshoot for a little period in GPC-based controller currents' response.     fig. 7 shows the variation of PID gains so as to achieve the GPC's performance. The calculation of initial PID gains for the recursive formula is achieved through using the GPC controller with the first few samples. After that, PID gains are tuned continuously for each sample based on the GPC behaviour. The same response is presented in Figs. 8, 9and 10 of the motor speed and stator dq frame currents for the second operating point, which reflect the successful operation of the GPC based PID technique showing its robustness with various operating conditions. Fig. 11 shows the input signal response of and , while Fig. 12 shows the adaptation of PID gains.

V. CONCLUSION
An online PID parameters tuning based on the GPC controller through the recursive least square identification method has been introduced. It has also provided the tuning of PID gains while considering the constraints. This can be achieved without affecting the control loop by implementing a hierarchical control structure. Eventually, PID controller will be implemented in the field control level, while the GPC controller will be in the supervisory control level. The proposed technique has been tested for PMSM motor speed control as a MIMO system and the results have been presented. A faster response has been achieved by 37.5% and 41% in Fig. 3 and Fig. 8 respectively for GPC based PID compared to the conventional PID controller. Moreover, no overshoot has been observed for GPC based PID in Fig. 3 and Fig. 8 in contrast to PID controller, 21.3% and 22.5% respectively. The proposed algorithm enhances the system performance and solves the problem of selecting the suitable gains of PID controller. For generality, the possibility of applying the algorithm to MIMO system, such as motor drives and power applications, is addressed in a case of PMSM, which has multi-control loops, parallel and cascade loops. The real implementation of the proposed technique will be the focus of the future work, in addition to the field of applications and limitations.