Performance Improvements of a Permanent Magnet Synchronous Machine via Functional Model Predictive Control

This paper investigates the application of the model predictive control (MPC) approach to control the speed of a permanent magnet synchronous motor (PMSM) drive system. The MPC is used to calculate the optimal control actions including system constraints. To alleviate computational effort and to reduce numerical problems, particularly in large prediction horizon, an exponentially weighted functional model predictive control (FMPC) is employed. In order to validate the effectiveness of the proposed FMPC scheme, the performance of the proposed controller is compared with a classical PI controller through simulation studies. Obtained results show that accurate tracking performance of the PMSM has been achieved.


Introduction
Permanent magnet synchronous motors fed by PWM inverters are widely used for industrial applications, especially servo drive applications, in which constant torque operation is desired.In traction and spindle drives, on the other hand, constant power operation is desired [1].The inherent advantages of these machines are light weight, small size, simple mechanical construction, easy maintenance, good reliability, and high efficiency.Generally speaking, the applications of the PMSM drive system include two major areas: the adjustable-speed drive system and the position control system.The adjustable-speed drive system has two controlloops: the current loop and the speed loop.To improve the performance of the PMSM drive system, a lot of research has been done.In general, the research has focused on improvement of the performance related to current loop, speed loop, and/or position loop.The PMSM drive system has been controlled using a PI controller due to its simplicity.The PI controller, however, cannot provide good performance in both transient and load disturbance conditions.Several researchers have investigated the speed controller design of adjustable-speed PMSM systems to improve their transient responses, load disturbance rejection capability, tracking ability, and robustness [2][3][4][5][6][7][8][9][10][11].
The MPC controller generally requires a significant computational effort.As the performance of the available computing hardware has rapidly increased and new faster algorithms have been developed, it is now possible to implement MPC to command fast systems with shorter time steps, as electrical drives.Electric drives are of particular interest for the application of MPC for at least two reasons: (1) they fit in the class of systems for which a quite good linear model can be obtained both by analytical means and by identification techniques; (2) bounds on drive variables play a key role in the dynamics of the system; indeed, two main approaches are available to deal with system constraints: antiwindup techniques, widely used in the classical PI controllers, and MPC.The presence of the constraint is one of the main reasons why, for example, state space controllers have limited application in electrical drives.
In spite of these advantages, MPC applications to electrical drives are still largely unexplored and only few research laboratories are involved in them.For example, generalized Predictive Control (GPC)-a special case of MPC-has been applied to induction motors for only current regulation [12] and later for speed and current control [13].In [14], the more general MPC solution has been adopted for the design of the current controller in the same drive.
In this paper, a centralized MPC with large prediction horizon for PMSM speed control is presented.The proposed centralized scheme improves the control performance in a coordinated manner.
Another challenge of centralized MPC for PMSM is its large computational effort needed.To overcome this drawback, a functional MPC with orthonormal basis Laguerre function [15] is presented.The presented functional MPC reduces computational effort significantly which makes it more appropriate for practical implementation.In addition, an exponential data weighting is used to reduce numerical issue in MPC with large prediction horizon [16].To verify the effectiveness of the proposed scheme, time-based simulations are carried out.The results obtained proved that the functional MPC is able to control successfully the PMSM system in the transient and steady state cases.

Dynamic Model of PMSM
The dynamic model of the PMSM can be described in the d-q rotor frame as follows [17]: where where r is the stator resistance, i d is the d-axis current, i q is the q-axis current, v d is the d-axis stator voltage, v q is the q-axis stator voltage, L is the stator inductance, where stator inductance in dand q-axis are assumed to be equal (L d = L q ), d/dt is the differential operator, P is the pole numbers, ω r is the mechanical rotor speed, λ m is the flux linkage generated from the permanent magnet material, j is the motor moment of inertia, B is the motor viscous friction coefficient, T e is the electromagnetic torque, T L is the load torque and θ r is the rotor position.

Linearised Model
The basic principle in controlling the PMSM is based on field orientation.This is obtained by letting the permanent magnet flux linkage be aligned with the d-axis, and the stator current vector is kept along the q-axis direction.This means that the value of i d is kept zero in order to achieve the field orientation condition.Since the permanent magnet flux is constant, therefore the electromagnetic torque is linearly proportional to the q-axis current which is determined by closed loop control.As a result, maximum torque per ampere can be obtained from the machine in addition to the achievement of high dynamic performance.So, the electromagnetic torque can be written as follows: Applying the field orientation concept (the electromagnetic torque is linearly proportional with i q ) in ( 1), the linearised model of the PMSM can be described in a state space form as where (5)

Functional Model Predictive Control
4.1.Model Predictive Control.Model predictive control uses an explicit model of system to predict future trajectory of system states, and outputs.This prediction capability allows solving optimal control problem online, where prediction error (i.e., containing difference between the predicted output and reference output) and control input action are minimized over a future horizon, possibly subject to constraints on the manipulated inputs, states, and outputs.The optimization yields an optimal control sequence as input and only the first input from the sequence is used as the input to the system.At the next sampling interval, the horizon is shifted and the whole optimization procedure is repeated.The main reason for using this procedure, which is called receding horizon control (RHC), is that it allows compensating for future disturbance and modeling error.
The basic structure of model predictive control is depicted in Figure 1.An explicit model of the system is used to predict future output response chain y.Based on the predicted system output and current system output, the error is calculated.The errors, then, are fed to the optimizer.In the optimizer, the future optimal control sequence, Δu, is calculated based on the objective function and system constraints.
In this paper, the state space model of the system is used in the model predictive control.The general discrete form of the state space model used in model predictive control is of the form: where k is the sampling instant, x is state vector, u is input vector, d represents system disturbance, and w represents system noise model.A, B, C, E, and F are coefficients of system state space model and reflect the PMSM model in (4).
The final aim of model predictive control is to provide zero output error with minimal control effort.
Therefore, the cost function J that reflects the control objectives is defined as where μ k and v k are respectively, the weighting factors for the prediction error and control energy, y (n + k): the kth step output prediction, y ref (n + k): the kth step reference trajectory, and Δu(n + k): the kth step control action, where the first term reflects the future output error and second term reflects the consideration given to the control effort.The predicted output vector has dimension of 1 × N p , where N p is the prediction horizon.Δu is control action vector with dimension of 1 × N c , where N c is control horizon.In the model predictive control, the control horizon, N c , is always smaller than or equal to prediction horizon (N p ). μ k and v k reflect the weights on the predicted error of predicted outputs and change in the control action.The constraints of model predictive control include constraints of magnitude and change of input, state, and output variables that can be defined in the following form Solving the objective function (7) with system constraint (8) gives the optimal input control sequence.

Laguerre Based Model Predictive Control.
In the classical model predictive control, the future control signal is modeled as a vector of forward shift operator with length of N c : where N c unknown control variables are achieved in the optimization procedure.However, large prediction horizon is needed to achieve high closed-loop performance.That would require large computational burden.Therefore, MPC may not be fast enough to be used as a real-time optimal control for such case.A solution to this drawback is the use of functional MPC.In the functional MPC, future input is assumed to be a linear combination of a few simple base functions.In principle, these could be any appropriate functions.However in practice, a polynomial basis is usually used [18][19][20][21].This approximation of input trajectory can be more accurate by proper selection of base function.Using functional MPC, the term used in the optimization procedure can be reduced to a fraction of that required by classical MPC.Therefore, the computational load will be reduced largely.
In this paper, orthonormal basis Laguerre function is used for modeling input trajectory.Laguerre polynomial is one of the most popular orthonormal base functions which has extensive applications in system identification [15].The z-transform of m th Laguerre function is given by where 0 ≤ a ≤ 1 is the pole of Laguerre polynomial and is called scaling factor in the literature.The control input sequence can be described by the following Laguerre functions: where l m is the inverse z-transform of Γ m in the discrete domain.The coefficients c m are unknowns and should be obtained in the optimization procedure.The parameters a and N are tuning parameters and should be adjusted by user.Usually, the value of N is selected smaller than 10 that is enough for most practical applications.Generally, choosing larger value for N increases the accuracy of input sequence estimation.

Exponentially Weighted Model Predictive Control.
Closed-loop performance of MPC depends on the magnitude of prediction horizon N p .Generally, by increasing the magnitude of prediction horizon, the closed-loop performance will be improved.However practically, selection of large prediction horizon is limited by numerical issue, particularly in the process with high sampling rate.One approach to overcome this drawback is to use exponential data weighting in model predictive control [16].

Design of the
where α is tuning parameter in exponential data weighting and is larger than 1.The state space representation of system with transformed variable is where The optimal control trajectory with transformed variables can be achieved by solving the new objective function and constraints: By choosing a > 1, the condition number of Hessian matrix will be reduced significantly, especially for large values of prediction horizon (N p ).This leads to a more reliable numerical approach.
After solving new objective function with new variables, the calculated input trajectory should be transformed into standard variable with the following equation: The Laguerre-based model predictive control and exponentially weighted model predictive control can be combined using the following systematic procedure: (i) choosing of the proper tuning parameter α; (ii) transforming the system parameters (A, B, C) and the system variables (U, X, Y ) are transformed using ( 13) and ( 14); (iii) the objective function with its constraints is created based on ( 15) and ( 16); (iv) optimizing objective function based on Laguerre polynomial and then calculating unknown Laguerre coefficients; (v) calculating input chain from ( 11); (vi) the calculated weighted input chain is transformed into unweighted input chain using ( 16) and applied on the plant.

System Configuration
The block diagram of the field-oriented PMSM with the proposed FMPC is shown in Figure 2. All the commanded values are superscripted with asterisk in the diagram.The proposed system control consists of three loops.The first loop for the speed and based on FMPC and the others for the d-q currents and based on PI controllers.Simulations are carried out to compare the performance of designed speed controller by FMPC with conventional PI controller.The input and the output of the FMPC are considered as speed error and reference q-axis current, respectively.The control parameters are assumed as next: input weight matrix: The constraints are chosen such that the d-and q-axis stator voltages are normalized to be between 0 and 1, where 0 corresponds to zero and 1 corresponds to maximum stator voltage.Thus, The constraints imposed on the control signal are hard, whereas the constraints on the states are soft, that is, small violations can be accepted.The constraints on the states are chosen so as to guarantee signals stay at physically reasonable values as follows: The speed error is fed to the speed controller (FMPC) in order to generate the torque current command i * q .The flux current command i * d is set to zero to satisfy the field orientation condition.The reference currents i * q and i * d are compared with their respective actual currents.The resulted errors are used to generate the voltage commands v * d and v * q which are converted to three phase reference values v * a , v * b , and v * c in the stator frame.These voltage signals are compared with triangular carrier signal and the output logic is used to control the PWM inverter.
The entire system has been simulated on the digital computer using the Matlab/Simulink/Powerlib software package.The motor used in the simulation procedure has the following specifications [22]: Computer simulations have been carried out in order to validate the effectiveness of the proposed scheme.The simulation tests are carried out using Matlab/Simulink software package.Wherever, the state space model of the permanent magnet synchronous motor is programmed with the functional model predictive algorithms in MATLAB work space.
The MPC control algorithm depends on the solution of a constrained optimization problem.Most designers choose N p (prediction horizon) and N c (control horizon) in a way such that the controller performance is insensitive to small adjustments in these horizons.Here are typical rules of thumb for obtaining a stable process: (1) choose the control interval such that the plant's openloop settling time is approximately 20-30 sampling periods (i.e., the sampling period is approximately one-fifth of the dominant time constant), (2) choose prediction horizon to be the number of sampling periods used in step 1, (3) use a relatively small control horizon, for example, Selection of suitable values of a and N will increase the system output predicted values accuracy and help to improve the system performance with small control effort.The tuning parameter α is chosen in order to decrease the numerical problems and decrease the simulation time and hence make the system more suitable for implementation.Therefore, the system state space with transformed values A, B, C, and D is obtained using the system state space model A, B, C, and D and tuning parameter α, where A = A/α, B = B/α, C = C/α and D = D/α.Then, the control objectives are achieved by solving the new cost function J and new constraints.In the proposed system under study, the parameters of the FMPC are adjusted to be a = 0.38, N = 6, α = 1.04,N p = 200 and N c = 5.The system performance with the proposed FMPC controller is compared with the corresponding one using the conventional PI controller.The gains of the PI controller are adjusted as follows: proportional gain K p = 6 and integral gain K i = 2.5.The following simulation tests are carried out to show the validity of the proposed FMPC controller.

High Speed Case.
It is assumed that the machine follows a certain speed trajectory starting from 400 rad/sec., stepped to 300 rad/sec.at time t = 0.03 sec., then returned back to 400 rad/sec at t = 0.05 sec.The load torque is kept constant at the value 3 N•m.during the simulation period.Figures 3  to 7 show the dynamic responses of the speed, torque, rotor position, and stator currents of the PMSM system based on both FMPC and PI controllers.It has been shown that the proposed system has better transient response.This is clear in Figures 3 and 4 where the system with PI controller oscillates many times before the steady state values are attained.In contrast, the system with the proposed controller has attained the steady state value very quickly.That is can be   shown in Figures 3 to 9, where overshoot and settling time of system are reduced when FMPC controller is used.The settling time of PI controller is 18 ms, where in the case of FMPC the settling time equal 5 ms as shown in Figure 3. Also,  the FMPC tracks well the rotor position reference and the field orientation condition is satisfied.Figures 6 and 7 show the stator current response based on FMPC and PI controllers.It is obvious that, with the FMPC controller, the stator current has less ripple content and over shoot than using PI controller.

Low Speed Case.
The performance of the PMSM scheme with the proposed FMPC controller is investigated at low speed (10 rad/sec).The load torque is assumed to be stepped from 2 N•m. to 5 N•m. at time t = 0.035 second.Figures 8 and 9 show the system responses using the FMPC and PI controllers.It is clear that the system has poor transient response using PI controller especially at starting and at the instant of load change.Also, more ripples are noticed in the torque response.These drawbacks are nearly eliminated using the FMPC controller.Also in the FMPC, the unknown variables are 16 times less than the classical MPC.In each time interval, the calculation time needed for classical MPC is 4.6 ms, whereas this time is reduced to 0.48 ms in the FMPC.This is a great computational advantage of using functional MPC.

Conclusions
In this paper, a centralized functional model predictive controller is proposed to control the speed and torque of the permanent magnet synchronous motor drive system.The proposed predictive controller uses orthonormal Laguerre functions to describe control input trajectory which reduces real-time computation largely.Also, exponential data weighing is used to decrease numerical issue, particularly with large prediction horizon.Constraints are imposed on both the qaxis current and the motor speed.
Computer simulations have been carried out in order to evaluate the effectiveness of the proposed controller.The results proved that the proposed system has accurate tracking performance at low speeds as well as high speeds.Also, small ripple contents are noticed in the torque and stator current waveforms.Moreover, the proposed controller has significantly better performance relative to PI controller especially at starting and load change conditions.The main reasons of this superiority are centralized structure of the proposed controller which reduces negative interaction between local control actions, proper constraints that improve optimal calculation of control trajectory, and, finally, using large prediction horizon which gives a performance close to global.

Figure 2 :
Figure 2: Block diagram of the proposed PMSM speed control system.

Figure 3 :
Figure 3: Speed response of the PMSM system based on FMPC and PI controllers.

Figure 4 :Figure 5 :
Figure 4: Torque response of the PMSM system based on FMPC and PI controllers.

Figure 6 :
Figure 6: Stator current response of the PMSM system based on the FMPC controller.

Figure 5 Figure 7 :Figure 8 :
Figure5illustrates that the PI controller produces large phase difference in the rotor position response which adversely affects the axes transformation and the flux orientation, and thereby reduces the system performance.On the other hand,

Figure 9 :
Figure 9: Torque response based on FMPC and PI controllers at low speed.
Proposed Functional Model Predictive Control.In this section, the Laguerre-based model predictive control and exponentially weighted model predictive control are combined in order to alleviate computational effort and reduce numerical problems.At first, a discrete model predictive control with exponential data weighting is designed.The input, state, and output vectors are changed in the following way: