Speed and Current Model Predictive Control of an

0 downloads 0 Views 1MB Size Report
Sascha Kühl†, Student Member, IEEE and Giorgio Paccagnella∗. ∗. Dept. of Electrical ... region search and the evaluation of the corresponding control law. In [4], [5] it .... In (6), (7) Ld(id), Lq(iq) are the stator inductances and. ˜Ld(id), ˜Lq(iq) ..... implementation, the controller is stored in a binary search tree according to [8].
Speed and Current Model Predictive Control of an IPM Synchronous Motor Drive Silverio Bolognani∗ , Senior Member, IEEE, Ralph Kennel† , Senior Member, IEEE, Sascha Kühl† , Student Member, IEEE and Giorgio Paccagnella∗ ∗ Dept.

of Electrical Engineering, University of Padova, Padova, Italy, [email protected] of Electrical Drive Systems and Power Electronics, Technische Universität München, Munich, Germany, [email protected]

† Institute

Abstract—Predictive control indicates a wide family of advanced control techniques that in last decade have been investigated in several studies and researches in the electrical drive field. This paper considers one of them, named Model Predictive Control (MPC). There are many advantages and interesting aspects in the use of this control technique compared to more traditional techniques that are usually employed in electrical drives. The typical cascade structure of FOC algorithms, for instance, can be avoided by implementing a single controller that manages both speed and currents. The innovation proposed within this paper is the application of Model Predictive Control to an IPM synchronous motor drive. Herein, special attention is given to the system’s non-linearities and how the controller can be modified to realize flux-weakening and other control strategies. After a detailed description of the strategy that has been implemented, in the last part of the paper most important results obtained by simulations and by testing on a real drive are shown and discussed.

I. I NTRODUCTION Model Predictive Control (MPC) is a very topical subject in the advanced drives research field and only a few number of laboratories is working on this control technique. It presents several advantages and characteristics that make it suitable for electrical drives [1]: it bases on simple and intuitive concepts, it can be adapted to a variety of different controlling problems, it can inherently manage the constraints and the non-linearities of the system, it can easily be extended to control multivariable systems and it is relatively easy to implement. Therefore, MPC allows to simultaneously control position, speed and current of an electrical motor, thus avoiding cascaded control structures usually applied. By this means, constraints on all system states and inputs can be implemented in a unified manner. This work deals with MPC for speed and current control of an IPM synchronous motor drive. More precisely, an explicit MPC (EMPC) algorithm is applied, where the optimization problem is solved off-line by means of multi-parametric programming [2], [3]. This technique allows to compute the explicit solution as piecewise affine function of the states. Thus, the on-line computational effort can be reduced significantly for small, linearly constrained, linear systems. The resulting controller consists of polytopes dividing the feasible state space into a finite number of regions, each containing an affine control law. The on-line computational effort thus reduces to a region search and the evaluation of the corresponding control

law. In [4], [5] it was shown that EMPC is applicable for speed and current control of surface mounted permanent magnet synchronous motors (SPMSM). This work will address, for the first time, the difficulty of considering the additional nonlinear reluctance torque, related to interior permanent magnet synchronous motors (IPMSM). II. M ODEL P REDICTIVE C ONTROL The base concept of MPC is the following: • A model of the plant is applied to predict the future system behavior from the actual state at a sampling instance k. The temporal prediction length is called prediction horizon N and defines a finite number of steps. MPC thus can be classified as Long Range Predictive Control (LRPC) technique. • A cost function, which includes the model-based prediction, is defined. It mathematically expresses the control objectives and its minimization results in the optimal actuations for the control. • From the sequence of optimal inputs u(k), u(k + 1), ..., u(k + N − 1) the controller applies only the first one, u(k). At the next sampling instance k+1 the procedure is repeated: the system states are measured or estimated, the horizon is shifted by one step (N is a constant) and a new prediction and optimization is performed. This receding horizon strategy thus combines open-loop optimal control with feedback control. The key elements in the design process of MPC are the system model as well as defining and tuning of the optimization criterion, the cost function. When the optimization process is performed off-line as in EMPC schemes, model and cost function must be known in advance; the control is nonadaptive. A. System Model The applied EMPC algorithm requires a discrete-time linear time-invariant system model in state-space representation for prediction. Within this work, the outputs are assumed equal to the states. x(k + 1) = Ax(k) + Bu(k) (1) y(k) = x(k)

The non-linear equations describing the electrical and mechanical dynamics of the IPMSM drive thus have to be linearized at suitable set-points and discretized by means of explicit forward Euler discretization. B. Optimization Objective The cost function can be an L1 , L2 or L∞ norm of states and inputs. For this work, the quadratic norm has been chosen. T

J(x(k), u(k)) = x(k + N ) Px(k + N ) + k+N X−1   + x(j)T Qx(j) + u(j)T Ru(j)

(2)

j=k

The matrices P, Q and R contain the weights on the last predicted state, the remaining states and inputs, respectively. They have to be positive definite () or semi-definite (). With (2) the optimization objective can be expressed as constrained finite-time optimal control problem. min J(x(k), u(k))

(3)

subject to equation (1), x(k + j) ∈ X ⊂ Rn ∀j ∈ {Nx1 , . . . , Nx2 }, u(k + j) ∈ U ⊂ Rm ∀j ∈ {Nu1 , . . . , Nu2 }, P = PT  0, Q = QT  0, R = RT  0,

(4)

U

with U = [u(k)T , . . . , u(k + Nu − 1)T ]T ∈ Rm·Nu

(5)

Herein, the polytopes X and U constrain the states and inputs. The horizons Nx1/2 and Nu1/2 denote the lower and upper bounds for which the constraints are temporarily active. The constraint horizon Nu ≤ N denotes the time step, after which the optimal input is assumed to be constant. This technique is referred to as move blocking and aims to reducing the degrees of freedom of the optimizer U. III. IPM D RIVE For the electrical subsystem of the drive, a synchronous dqreference frame with the d-axis fixed to the rotor PM flux linkage vector is considered. The electrical dynamics of the drive can thus be described by the following stator equations, where the time dependency of the variables is understood and the influence of cross saturation is neglected: 1 did = (ud − Rid + ωe Lq (iq )iq ) (6) ˜ dt Ld (id ) diq 1 = (u − Riq − ωe Ld (id )id − ωe λmg ) ˜ q (iq ) q dt L

(7)

In (6), (7) Ld (id ), Lq (iq ) are the stator inductances and ˜ d (id ), L ˜ q (iq ) the differential inductances. They depend on L the dq-current as a consequence of iron saturation. R is the phase-resistance, λmg is the PM flux linkage, ωe is the electromechanical speed in el.rad/s (given by pωm , in which p is the number of pole pairs, and ωm is the mechanical speed). The mechanical dynamics are described by the following equation, resulting from the torque balance: dωe 3 λmg 3 Ld (id ) − Lq (iq ) p = p2 iq (t) + p2 id iq − τL (8) dt 2 J 2 J J

with τL as load torque and J as moment of inertia of the drive. It can be seen that the equations describing the electrical dynamics of the drive (6), (7) are not linear due to iron saturation, but also because of the cross coupling terms that involve speed and currents. Additionally, the reluctance component introduces a non-linearity in the mechanical dynamics (8). IV. C ONTROLLER D ESIGN The main task in the design process of MPC is to define a model of the plant, followed by defining and tuning the optimization problem. This section introduces different prediction models, describes the applied constraints and explains how tracking tasks can be included in the cost function. Additionally, some implementation hints are given. A. MPC with inherent flux-weakening features The first controller proposed combines speed and current control of both d- and q-axis current. In order to track a given speed reference, the controller autonomously drives the currents necessary to generate the required torque. The continuous-time state-space model serving as basis for discretization has the form: h iT d ωe x = id iq ωd , x˙ = A0 x + B0 u, (9) e id ωe iq with 

− L˜R

0

0 0 0 ki 

− L˜R q 0 0 3 2 λmg p 2 J " 1

0

d

   A0 =   

B0 =

˜d L

0

d −L ˜q L 0 0 0

0 1 ˜q L

Lq ˜d L

0 0 0 0

0 0 0 0 0 0

0 −

λmg ˜q L

0 0 0

    ,  

(10)

#T ,

(11)

3 2 Ld − Lq p (12) 2 J The differential inductances should be saturated values at maximal allowed currents. Otherwise, the controller would underestimate the electrical dynamics, which can lead to overshooting and thus infeasible states. The non-linear crossd coupling terms ωd e id and ωe iq are considered as measured disturbances according to [4], [6]. The reluctance torque component is linearized at the set-points  = ±iset . In this way, the resulting controller exploits both d- and q-axis current for torque generation. If, on the contrary,  = 0, the controller always regulates id to zero. Choosing two linearization points for  leads to a piecewise affine model with two dynamics and is necessary to sufficiently approximate the reluctance component in every operating condition. The decision, which dynamic is active, depends on the sign of the requested torque. This can easily be implemented by evaluating the sign of the control error: ki =

ωe,ref − ωe ≤ 0 ωe,ref − ωe > 0

 = −iset ,  = +iset

(13)

Fig. 1: Constraints on currents and voltages Fig. 2: Constraints in ωe − iq plane

In order to obtain offset-free speed tracking, the state vector x has to be augmented with a speed reference ωe,ref and the past inputs uk−1 , uk−1 . The latter aims to include an integral q d action to the control loop (see [4], [6]). By introducing these modifications and also considering the 1-step computational dead time, the augmented model has the form: T  , (14) xaug = xT ωeref uk−1 uk−1 q d     A 0 B 0 xaug (k + 1) =  0 1 0  xtr (k) +  0  ∆u(k) (15) 0 0 I I The weight matrix P is chosen as zero-matrix. Matrix R slightly weights the optimal voltage changes, as it is requested by (4). Speed tracking is obtained by heavily weighting the control error ωe,ref − ωe within matrix Q. Although not necessary for the tracking task, the currents also have to be weighted, since this is crucial for closed-loop stability of the main (unconstrained) controller region [4]. Note that the weights reported are applied to the normalized model. This is useful to avoid numerical problems in the multi-parametric programming algorithm. R = diag(8 · 10       Q=     

1 0 0 0 0 0 0 0

0 20 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

−8

0 0 0 0 2 · 107 −2 · 107 0 0

, 8 · 10

−8

),

0 0 0 0 −2 · 107 2 · 107 0 0

(16) 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

       (17)     

The prediction horizon is chosen to N = 4. With P = 0 this corresponds to the minimal necessary horizon, since the model includes three time delays from the input to the output.1 In order to reduce the controller complexity, the control horizon is set to Nu = 1. Voltage and current constraints are given by 2 2 i2d + i2q ≤ IN , u2d + u2q ≤ UN , 1 Setting

P = Q and N = 3 would be equivalent

(18)

p √ where IN = 2·Inom and UN = 2/3·Unom . The index nom indicates nominal line-to-line rms values. Since the applied EMCP algorithm requires linear constraints, the circular limitations on currents and voltages are approximated by polygons as shown in Fig. 1. In order to reduce the number of linear inequalities and thus the complexity of the resulting controller, the feasible current region is defined by a rectangle containing the MTPA (Maximum Torque Per Ampere) trajectory. In order to improve the robustness against overshooting and measurement noise, the current constraints are implemented only for the last predicted step (Nx1 = Nx2 = 4). The voltage constraints are always active. Since the cross-coupling terms are treated as measured disturbances, the controller is not able to predict their future behavior correctly. Therefore, in order to avoid infeasible states, additional constraints in the ωe − iq plane have to be introduced as shown in Fig. 2. They are linear approximations of the system’s inherent constraint (19), obtained from (6) provided that the limited control action ud should be sufficient to ensure a constant current id in every operating point. ωe iq ≤

Rid − ud Lq

(19)

Eq. (19) describes concave permitted regions in quadrants II and IV of the ωe − iq plane (see Fig. 2 for quadrant II). Approximating it by linear constraints results in losing feasible operating areas for the controller (“cut 1” and “cut 2”). However, this is neccessary to guarantee feasibility of the control. Fig. 3 shows simulation results of a controller with inherent flux-weakening. The simulations were performed with MATLAB Simulink. For controller design, the Multi-Parametric Toolbox (MPT), developed at the ETHZ was used [7]. In order to demonstrate the flux-weakening features of the controller, √ the voltage limitations have been reduced by the factor 1/ 2. The controller automatically drives d- and q-axis currents in order to track the given speed reference cycle. The fact that the cross-coupling terms are not predicted correctly, leads to the increasing d-current at ~0.1s. A similar problem would occur at speed reversal, thus leading to infeasibility. This, however, is avoided by aforementioned constraints in the ωe − iq plane. Besides the effect that the negative d-current generates a reluctance torque component, it also weakens the flux linkage

Fig. 3: Simulated MPC with inherent flux-weakening

of the permanent magnet and thus extends the attainable speed region of the drive. After arriving at reference speed, iq is driven to zero and id is controlled to minimum needed fluxweakening current (note that uq is at its limit). The forth subplot presents the active controller regions. The fact that a region is found in every operating point states that the implemented constraints are always respected. Note that for better comparability, the scaling factor of the current is set to Imax = Inom . Therefore, values bigger than ±1 do not indicate violation of the limitations on id (see also Fig. 4). The linearized piecewise affine model applied, however, implies some disadvantages. Due to the linearization, the reluctance torque cannot be predicted properly and thus no advanced control strategies like MTPA can be obtained. Furthermore, the piecewise affine structure leads to much more complex controller partitions, which are considerable more difficult to implement.

Fig. 4: Simulation using controller with combined speed and d-current tracking

voltage limitations at base speed (outer patch) and maximum speed (inner patch). The d-current reference is chosen from the actual q-current, which is driven autonomously in order to minimize the speed error. Below base speed, id,ref is set according to MTPA look-up data. At higher speed, two different flux-weakening strategies are applied: the first one consists in generating the maximal possible torque while respecting the current limitation; the second one aims to minimize the losses by reducing id to the minimum needed flux-weakening current, when no torque is requested (i.e. when the speed error is zero).

B. MPC with double tracking The disadvantages of the controller described in section IV-A can be avoided by introducing a double tracking scheme, where speed and d-current are tracked in parallel. Therefore, model (9)-(12) is applied with  = 0 and augmented by a current reference id,ref . Current tracking is obtained by weighting the corresponding tracking error with the factor 5000. The remaining weights and horizons remain unchanged. The d-current reference can be chosen from look-up data, which contains MTPA information. In that case, it is easy to limit id,ref and thus the constraints on id can be omitted. The chosen strategy for d-current tracking is shown in Fig. 5. The red circle denotes the current limitation. The blue patches represent the feasible current regions under the influence of

Fig. 5: Strategies implemented for id tracking presented in the id − iq state space

In Fig. 4 simulation results for a speed reference cycle are shown. As done before, reduced voltage limitations are implemented. Comparing these results with those shown in Fig. 3 a higher settling time is observed. This results from additional constraints in the ωe −iq plane, which aim to avoiding voltage saturation and thus unattended current increase (cf. Fig. 3, ud and id at approx. 0.1s). The constraints are implemented in the same manner as described above. This time, however, the quadrants I and III in the ωe − iq plane have to be considered. V. S AFETY C ONTROLLER One problem of MPC is the occurrence of infeasible states, i.e. states that hurt the constraints and thus let (3) and (4) be infeasible. As a consequence, the optimization has no solution and thus the controller does not provide a valid control action. Infeasible states appear inter alia due to parameter mismatch, neglected non-linearities or measurement noise. We propose to solve this problem by implementing a safety controller, which gets active, when the nominal MPC cannot find a feasible control law. This is shown in Fig. 6. The task of the safety controller is to regulate all system states to the origin. The safety controller remains active as long as the MPC is infeasible. After driving the system states back into feasible regions, the MPC is reactivated. mains safety MPC

no

SWITCH

yes

MPC

~

PWM

~

feasible

is encoder

us

IPMSM

ω

Fig. 6: Scheme of closed-loop system

The safety controller bases on the following model:  T  T x = id iq ωe , u = ud uq (20)    1  0 0 − LRd 0 Ld   λ mg 1 − LRq − Lq  x+  0 Lq  u, (21) x˙ =  0 3 2 λmg 0 0 0 p 0 2

J

The non-linear cross-coupling terms as well as the reluctance torque component are neglected. The d- and q-axis inductances are assumed to be constant. In order to make sure that the safety controller does not figure the same problem of infeasibility, no constraints have been implemented. The resulting solution of the optimization problem is an affine control law, which is always feasible. Therefore, the safety controller results in an affine state feedback control. The control task of the safety controller is obtained by directly weighting all states. For simplicity, P is chosen as zeromatrix. Since R has to be positive definite, it is chosen as unity-matrix I. The weights Q = diag(10, 5, 1) are found

Fig. 7: Simulation using safety controller to lead speed and current to zero

iteratively by worst-case simulations, such that voltage and current limitations are always respected (see. Fig. 7). Since in the unconstrained case prediction horizons do not influence the controller complexity, N = 400 and Nu = 5 are chosen. VI. E XPERIMENTAL RESULTS The experiments were performed on a test bench with a dSPACE 1104 real time system and an IPMSM, whose characteristic data is presented in Table I. The evaluation of measurement data is done with MATLAB in order to guarantee comparability to the simulation results. For practical implementation, the controller is stored in a binary search tree according to [8]. Table I: IPMSM data Nominal voltage Nominal current Max speed Phase resistance d-axis inductance (unsaturated) q-axis inductance (unsaturated) PM flux linkage

Unom Inom ωmax R Ld Lq λmg

230 V rms 3.9 A rms 4000 RPM 4.85 Ω 0.030 H 0.153 H 0.194 Wb

Fig. 8 and Fig. 9 show measurement results of the double tracking controller introduced in Section IV-B. The former shows a speed reference step of about 3 /4 of maximum speed. Since nominal voltage limitations are applied, the speed is tracked without flux-weakening at steady state. However, due to aforementioned constraints in the ωe − iq plane, iq is decreased also at lower speeds. Therefore, it is useful to apply the maximum current strategy for id . Applying, on the contrary, the MTPA strategy, would result in generating a minor torque than allowed by the current limitation. The controller that has been used for the practical tests was designed with an inertia higher than the real one. As shown in [4] using a the model with a higher inertia results in a slight overshooting of the speed, but also makes the controller less

Fig. 8: Experimental results using controller with combined speed and d-current tracking at a speed reference step

aggressive and thus increases the robustness of the closed-loop system. Accordingly, it can be seen that the speed has a small overshooting before arriving to a stable state at the reference speed. If a load disturbance is applied to the drive without considering this in the prediction, the speed control can present a steady state error. This can be easily avoided by introducing an integral action to the speed reference as demonstrated in [4] and [5]. Within this work, however, no substantial load disturbance was applied. The plots of currents and voltages in Fig. 8 state that the control respects the implemented constraints. With increasing speed, the currents show disturbances due to stator slotting of the motor. This disturbances cause an error in the current control, which results in corresponding voltage oscillations. In contrast to former simulations, the active region plot presents fast changing regions according with these oscillations. It is worth noticing that the controller is able to react very fast on these kind of disturbances due to the piecewise affine state feedback nature of EMPC.2 Fig. 9 shows a reversal of the reference at low speed. Accordingly, the distortions on currents and voltages caused by stator slotting are significantly smaller. As long as the current iq is kept to the maximum value, id is tracked to the MTPA strategy. When iq starts decreasing due to the ωe iq constraints, the d-tracking strategy is changed to maximum current. With reaching the reference speed, no torque is needed an thus both currents are controlled to zero according to minimum flux-weakening strategy. 2 A conventionally tuned PI controller would react much slower; the voltages would be smoother at the expense of higher current (and thus torque) ripple.

Fig. 9: Experimental results using controller with combined speed and d-current tracking at reversal of the speed

VII. C ONCLUSIONS The present work has demonstrated the applicability of explicit MPC to combined current and speed control of IPM drives. Different proposals are made for controllers that exploit the rotor anisotropies in order to generate an additional reluctance torque. The problems of resulting nonlinearities are depicted and appropriate measures in the form of linear constraints are introduced. Additionally, the possibility of implementing flux-weakening techniques is described. Simualtions and experimental results are provided in order to verify proposed controllers. R EFERENCES [1] P. Cortes, M. P. Kazmierkowski, R. M. Kennel, D. E. Quevedo, and J. Rodriguez, “Predictive control in power electronics and drives,” IEEE Transactions on Industrial Electronics, vol. 55, no. 12, pp. 4312–4324, dec. 2008. [2] A. Bemporad, M. Morari, V. Dua, and E. N. Pistikopoulos, “The explicit solution of model predictive control via multiparametric quadratic programming,” in American Control Conf., vol. 2, 2000, pp. 872–876. [3] A. Bemporad, M. Morari, V. Dua, and E. N. Pistikopoulos, “The explicit linear quadratic regulator for constrained systems,” Automatica, vol. 38, no. 1, pp. 3–20, 2002. [4] Sav. Bolognani, Sil. Bolognani, L. Peretti, and M. Zigliotto, “Design and implementation of model predictive control for electrical motor drives,” IEEE Transactions on Industrial Electronics, vol. 56, no. 6, pp. 1925– 1936, jun. 2009. [5] Sav. Bolognani, Sil. Bolognani, L. Peretti, and M. Zigliotto, “Combined speed and current model predictive control with inherent field-weakening features for pmsm drives,” in MELECON, may 2008, pp. 472–478. [6] T. A. Badgwell and K. R. Muske, “Disturbance model design for linear model predictive control,” in American Control Conference, 2002. Proceedings of the 2002, vol. 2, 2002, pp. 1621–1626. [7] M. Kvasnica, P. Grieder, and M. Baoti´c, “Multi-Parametric Toolbox (MPT),” 2004. [Online]. Available: http://control.ee.ethz.ch/~mpt/ [8] P. Tøndel, T. A. Johansen, and A. Bemporad, “Evaluation of piecewise affine control via binary search tree,” Automatica, vol. 39, no. 5, pp. 945–950, 2003.