Constrained field-oriented control of permanent magnet synchronous machine with field-weakening utilizing a reference governor

ABSTRACT This paper presents a complete solution for constrained control of a permanent magnet synchronous machine. It utilizes field-oriented control with proportional-integral current controllers tuned to obtain a fast transient response and zero steady-state error. To ensure constraint satisfaction in the steady state, a novel field-weakening algorithm which is robust to flux linkage uncertainty is introduced. Field weakening problem is formulated as an optimization problem which is solved online using projected fast gradient method. To ensure constraint satisfaction during current transients, an additional device called current reference governor is added to the existing control loops. The constraint satisfaction is achieved by altering the reference signal. The reference governor is formulated as a simple optimization problem whose objective is to minimize the difference between the true reference and a modified one. The proposed method is implemented on Texas instruments F28343 200 MHz microcontroller and experimentally verified on a surface mounted permanent magnet synchronous machine.


Introduction
Permanent magnet synchronous machine (PMSM), due to its inherently high torque density and premium efficiency stands out as a motor of choice in a wide array of applications and especially proves as a perfect fit in electric traction applications. In order to fully utilize its advantages a proper control system must be employed.
In traction applications, the main objective is to ensure reaching the reference torque with a good dynamic performance while achieving loss minimization in the steady state. This can be achieved by a proper current control algorithm which must respect PMSM drive voltage and current limits.
With addition of loss minimization requirement, the control strategy of a PMSM can be divided into three segments: an algorithm for finding the optimal current vector which minimizes the copper losses or total copper and iron losses in a steady state, field-weakening algorithm which ensures that voltage constraints are not violated in steady state, and a control algorithm responsible for tracking of reference current trajectory.
An algorithm for finding the optimum current vector is often given in a form of pre-calculated look-up table [1], analytical solution [2] or some sort of on-line loss minimization search algorithm [3,4].
Control techniques for tracking the current trajectory based on vector/field-oriented control (FOC) or direct torque control (DTC) are most commonly used for PMSMs [5,6].
In FOC, the control system usually employs proportional-integral (PI) controllers with decoupling terms and pulse-width modulation to keep the currents at their desired values. The main advantage of FOC is in its modularity, flexibility, robustness regarding parameter variation and low computational burden, which makes it an industry standard in control of PMSMs. However, voltage and current constraints are not considered in the design stage. Instead, usually antiwindup techniques, dynamic over-modulation and even decreasing of the controller gain are used [7,8]. Over-modulation inevitably leads to increase in losses during transient operation, while any decrease of controller gain is followed by a performance deterioration. Various antiwindup techniques such as realizable references (back-calculation) are commonly used to alleviate the problem of saturation [7,9]. However, by using such techniques the control designer cannot influence in which way the allowable reference is reached. Furthermore, such techniques cannot handle current constraints.
On the other hand, the DTC uses flux and torque hysteresis controllers and a look-up table to directly control the transistor switching. The current constraints are handled using the hysteresis band while the voltage constraints are not considered.
Recently, advanced control techniques have also been developed for controlling this type of electric machines in order to handle constraints. Among them the most notable is model predictive control (MPC). In general, MPC approaches for PMSM can be divided into two groups: namely the finite control-set (FCS-MPC) and continuous control-set (CCS-MPC) methods [10,11]. FCS-MPC takes into account the discrete nature of the power converter. By checking all the possible combinations of switches, taking into account the cost function and constraints, the optimal switching of the power converter can be found [12]. However, this is limited to short prediction horizons due to the combinatorial nature of the problem. The main disadvantage of such control scheme is variable switching frequency of the converter and ringing. On the other hand, similar to FOC, CCS-MPC abstracts away the discrete nature of the power converter by using pulse-width modulation. The CCS-MPC can be implemented as an explicit MPC which requires a high amount of memory, or as on-line MPC which, on the other hand, requires a fast online solver [13][14][15].
An alternative and computationally less demanding approach to cope with constraints is to keep the existing control loop and employ a so-called reference governor. Its task is to alter the external reference input to the existing control loops in order to satisfy the constraints [16,17]. The altered reference input is obtained by solving a simple optimization problem at every sampling instant where the objective function is specified by the control designer. The most commonly used objective function is to minimally alter the reference input to satisfy the constraints. In the absence of constraints the performance remains the same as with the original controller. The reference governor and its utilization in PMSMs is investigated in simulation in our conference paper [18]. The voltage constraint is linearized which results in underutilization of motor voltage and therefore in somewhat conservative control law. Furthermore, the field-weakening operation is not investigated in the aforementioned paper.
To ensure feasibility of reference current vector, in context of voltage constraint satisfaction in a steady state, field-weakening algorithm is required. The methods of current control in the field-weakening (FW) area, which are based on FOC control, can be classified into feed-forward (FF) methods, feedback methods (FB) and FF/FB hybrid methods.
The FF method calculates the feasible current vector based on the machine model, desired torque, DC link voltage and measured speed [19][20][21]. This method requires accurate knowledge of machine model and its parameters, resulting in faulty FW operation in the case of errors in the presumed machine model and/or parameters.
Feedback methods [22][23][24] use outputs from the current controller (reference voltages in d and q axes) as a feedback information to calculate the reference current vector required for field-weakening operation. This method does not require accurate knowledge of machine parameters. The drawback of the feedback method is a slow field-weakening dynamics which creates problems during transitional states due to possible premature activation of field-weakening operation during current transients, when rapid change of current reference (i.e. desired torque reference) results in the voltage constraint violation and saturation of current controllers. The field-weakening operation of feedback methods is activated when the limits are already violated.
In the hybrid methods according to [25,26], the feed-forward component is utilized in the form of 2D look-up tables and used to determine the current vector according to the available flux which is calculated from the DC link voltage and rotor speed. With the use of feed-forward component, good dynamic response of field-weakening operation is achieved, while the feedback is added to compensate the influence of mathematical model or machine parameter uncertainty. The flaws of this method are related to problems considering acquiring the feed-forward 2D look-up tables and memory required to save them, along with computing requirements in real-time implementation.
This paper builds on the results presented in [18] and provides a complete solution for constrained fieldoriented torque control. Similar to [18], a reference governor is employed to ensure constraint satisfaction during transients. Unlike [18], the voltage constraint is not linearized which results in a less conservative control law and a faster transient response. In addition, to ensure constraint satisfaction in a steady state a novel hybrid field-weakening algorithm, robust to machine parameter uncertainty and error caused by saturation effects, temperature effect on permanent magnet flux linkage and/or simply erroneous parameter identification, is introduced. Field weakening problem is formulated as an optimization problem, the solution of which is found using projected fast gradient method. The proposed method is implemented on Texas instruments F28343 200 MHz microcontroller and experimentally verified on surface mounted permanent magnet synchronous machine.
The paper is organized as follows: In Section 2 the standard FOC of PMSM is presented, Section 3 presents a reference governor as a solution for constraint satisfaction during transients, Section 4 presents a novel field-weakening solution which ensures constraint satisfaction in the steady state, Section 5 presents simulation and experimental results and Section 6 concludes the paper.

Mathematical model
Mathematical model of a synchronous permanent magnet motor can be described in the d−q coordinate system which rotates in synchronism with the electrical angular speed of the rotor (Figure 1). Motor equations, neglecting the core losses, are given by where i d and i q are the d and q axis currents, ω e is the electrical angular velocity, p is the number of pole pairs, v d and v q are the d and q axis voltages, and T e is the electromagnetic torque. Ψ d and Ψ q are the direct and quadrature axis flux linkages which are function of both, d and q axis current components For the control synthesis purpose, the q axis component of permanent magnet flux and cross-inductances are neglected (i.e. Ψ mq = 0 and L dq = L qd = 0). Saturation effects are also neglected presuming the constant value of inductances L d and L q and constant value of permanent magnet flux component in the d axis Ψ md , i.e. through linearization resulting in PMSM model suitable for control algorithm development Figure 1. The d-q coordinate system shown on an SPMSM rotor.

Control structure
In the remainder of this section the proposed control method is described.
There is a direct correlation between current vector in the dq coordinate system and the produced electromagnetic torque, therefore the torque control problem of PMSM translates to a current control in the dq system. In the classical current vector control structure (Figure 2), the currents are regulated by two separate d and q current control loops with PI controllers. Due to coupling between d and q axis, these two loops are not independent. In order to allow separate control of currents in the d and q axis, the decoupling is performed (Figure 3).
The decoupling allows the use of linear control theory for the synthesis of the controller. The augmented PI controllers with decoupling can be written as where K pd , K pq , K id , K iq are the proportional and integral gains of the d and q axis current PI controllers respectively, while I ed and I eq are the accumulated d and q axis current errors.
Using the aforementioned control law, the cancellation of nonlinear terms in the system equations (8) and (9) occurs, and the closed loop system can be written in the form Conventionally, the PI controllers are tuned to achieve fast and well damped transient response without considering constraints, which are namely, in the context of PMSM control, current and voltage con- where I max is the maximum current amplitude while V max is the maximum voltage available from the inverter (for space vector modulation and star connec- where V DC is the DC link voltage). Machine can usually, for limited amount of time, withstand the current several times larger then its rated value. Machine ability to operate with currents larger than rated value depends on machine's thermal conditions and thermal capacitance, making the maximum permissible current hard to define. In the literature, the current limit is often neglected or treated in a form of soft constraint.
To analyse the transient response of the closed-loop system and satisfaction of the constraints, the system dynamics can be rewritten in a state-space form. This analysis is performed during operation of the machine on a microcontroller and therefore rewritten as a discrete-time autonomous dynamical system in a state-space form. Using the Euler-forward discretization, with sampling time T s , the model (15)-(16) can be represented as follows where x = [i d i q I ed I eq i * d i * q ] T and the matrix A is given as Based on the derived model, the idea is to compute the references which ensure tracking of the desired torque while at the same time minimizing losses and ensuring satisfaction of constraints.
To ensure reachability of torque and corresponding loss minimizing current vector references, a fieldweakening algorithm is introduced in the classical control system of PMSM. The task of the proposed field-weakening algorithm is to guarantee satisfaction of the current and voltage constraints in a steady state. Even though the proposed field-weakening algorithm ensures constraint satisfaction in a steady state, the PI controller with decoupling still presents a potential problem for constraint satisfaction during current transients. Therefore, to ensure that control system respects voltage limits even during current transients, a device called reference governor is added into an existing PMSM control structure. In order to simplify the reference governor algorithm, its implementation and to ease its computational burden, the current constraints are treated as a soft constraint handled by fieldweakening algorithm. The complete control structure is shown in Figure 4 and all the components are described in the sequel.

Reference governor
A reference governor approach considers an asymptotically stable closed-loop discrete-time system where x(k) represents the state, y(k) represents the output, and r(k) represents the corresponding reference signal, subject to constraints y(k + j) ∈ Y, j ∈ Z + , where Y is a set representing the constraints. In order to ensure the constraint satisfaction, the desired reference signal has to be suitably modified. In other words, the reference governor generates a new reference signal v(k) following the two key principles: if v(k) is kept constant, constraints are not violated and v(k) is a close approximation of the original reference signal r(k). The aforementioned principles can be mathematically described as follows where J is the cost function which ensures that the modified reference signal is as close as possible to the desired reference signal. In order to ensure constraint satisfaction at all times, usually the maximum output admissible set O ∞ [17] is used. The maximum output admissible set is a set of all states x(k) and constant reference signalsv for which system constraints are not violated The reference governor control scheme is shown in Figure 5.

Reference governor for constrained current control of PMSM
The following objective function is proposed for the purpose of applying the reference governor to a PMSM

J(v(k), r(k)) = (r(k) − v(k)) T (r(k) − v(k)). (24)
In order to guarantee the recursive feasibility the maximum output admissible set has to be found. Using the controller dynamics (11)- (14), the corresponding voltage constraint (18) can be rewritten as the nonlinear state constraint where f V (x, ω e ) is defined as while matrices A d and A q are given as The maximum output admissible set can be calculated using the following recursion Figure 5. Reference governor applied to a closed loop system. and k max is a number for which S k max = S k max −1 . The maximum output admissible set is then obtained as Since the closed loop system is described as an autonomous system (19), the maximum output admissible set is defined by the following set of constraints Taking all the aforementioned into account the corresponding maximum output admissible set can be calculated offline for a single operating point defined by the motor speed, and updated online if the operating point changes.
At every time instant, the set of admissible reference signals is obtained as an intersection of the maximum output admissible set with the measured values [i d i q I ed I eq ] T , the projection of the desired reference signal r k onto the resulting set is performed and applied to the closed loop system.

Field weakening operation of PMSM
Combining the voltage constraint defined by (18) and machine model according to (8) and (9), voltage constraint in a steady state can be mapped onto current vector constraint Neglecting the voltage drop across winding resistance R s , along with linearization of the flux linkage according to (6) and (7), the voltage constraint equation (32) takes the form of the ellipse formally known as voltage ellipse with its centre at (Ψ md /L d , 0) When machine under the load tends to increase its speed, the voltage ellipse "shrinks" reducing the area of reachable current reference vector. In the case when reference current is located outside the voltage ellipse, the increase of current in the direction of negative d axis is required, i.e. field-weakening operation is performed, which in result forces the reference current vector to return inside the voltage ellipse. In order to maintain the desired torque, the q axis component of current should be changed simultaneously with the d axis current component according to . (34) There are infinite current vector values which meet above stated conditions. However, given the nature of PM machine losses, in the field-weakening region minimum loss condition among all current vector combinations is achieved at the intersection of voltage ellipse and torque curve ( Figure 6). The solution of field-weakening problem enriched with minimum loss requirement can be found solving the equation obtained by combining (34) and (33).
In the absence of a solution, i.e. non-existence of voltage ellipse and torque curve intersection, the desired torque reference is not reachable and must be adequately altered. In the aforementioned case, solution to the FW problem is the touching point of voltage ellipse and torque curve (Figure 7(a)), formally known as maximum torque per voltage (MTPV) curve.
To ensure that restriction on current amplitude is satisfied, the maximum torque at which machine can operate should be defined. Considering both, the maximum available torque considering voltage and current limit, the operating point of maximum torque per volt and ampere (MTPVA) is defined according to Figure 7(b) at the intersection point of the voltage ellipse and current circle.
With the assumption that flux linkage components in d and q axis are where hatˆsymbol denotes the presumed values, i.e. inductances and flux linkage which are measured prior to machine exploitation and/or estimated values, it is possible and completely justified to determine the required FW action using equations (33) and (34). Due to inevitable error caused by saturation effects and error in parameter determination, using the described approach results in erroneous FW operation. Additionally, contributing to stated errors and causing faulty FW operation are the neglected voltage drop across winding resistance R s and the temperature sensitive flux linkage component in the d axis produced by permanent magnets where Ψ md,T and Ψ md,T 0 denote permanent magnet flux linkage at temperatures T and T 0 , respectively, T is the magnet temperature rise, while α is the temperature coefficient of remanence (for neodynium magnets α = 0.12 %/K). For example, in traction application, the temperature of magnets mounted in a PM machine changes often from environment temperature to the maximum allowable magnet temperature, which can result in temperature difference of T = 150 K and consequently permanent magnet remanence and flux linkage drop of 18%. A novel field-weakening approach which is able to compensate for voltage drop across winding resistance and eventual deviation/error of parameters and flux values from the real ones is presented in the remainder of this section.
, the current closed-loop model can be expressed as ( Figure 8) where Ψ d and Ψ q are difference/error between real flux linkages and those calculated using presumed machine parameters During field-weakening operation, due to the fact that mechanical time constant is considerably larger than electrical one, the changes in current reference required for field-weakening δi d and δi d are small enough so that flux errors Ψ d and Ψ q between two consecutive time steps along with voltage drop across R s can be Combining (13), (14), (37) and (38), voltage limits can now be reformulated as The solution to field-weakening problem can be finally found by solving the optimization problem stated as and X * being the set of constraints defined as Variables h 1 and h 2 represents weighting coefficients, T * e is the desired torque (torque command) and i d LM is the current reference in d axis at which losses are minimal for the given torque command. In PMSM control algorithm, the loss minimizing d axis current i d LM is usually obtained from a previous measurements or calculations saved in a form of a look-up table. The stated constrained minimization problem is, in the context of this paper, solved using the projected gradient method [27], an iterative search algorithm with iteration defined as where β k and γ k are the positive stepsizes. Operator P X r defines the orthogonal projection onto convex set X r . For a specified problem, stepsizes β k and γ k are, for every iteration k, defined using Armijo search along the boundary X r , i.e. as with for someβ > 0 and σ ∈ (0, 1).

Results
The verification of the presented field-weakening algorithm and current reference governor was performed in two steps, namely through simulation and through experiment on the real PMSM drive. The simulation was performed using machine model whose parameters match the ones obtained through identification and measurements of the real machine (Table 1). For the experiment (Figure 9)   between two consecutive FW calculations, the N FW was set to N FW = 50. The reference governor adaptation (denoted as iq * * ) of the q axis current reference step change (denoted as iq * ), along with the current control actions and the current response iq are evaluated and presented in the upper section of Figure 10. The lower section shows the amplitude of the resulting voltage vector and its constraint V max defined by available voltage from the inverter. The d axis current during the experiment is set to zero (i * d = 0), while the current reference in the q axis i * q is proportional to the required torque T * e . A comparison of the proposed current control with reference governor and the classic PI controller with back-calculation anti-windup can be found in previously published conference paper [18], in which robustness of the current reference governor performance with respect to the motor parameter variation is also presented.
The performance of field-weakening algorithm is presented in Figure 12. During field-weakening experiment, the reference torque, which in case of SMPM is proportional to the current component in the q axis, is kept at a constant value, while the machine speed change is forced with mechanically coupled induction machine (IM) in order to force the FW operation reflected as a change in the d axis current component.  The effectiveness of the proposed parameter uncertainty compensation during field-weakening is investigated in simulation by varying the motor parameters according to Table 2 and compared to field-weakening algorithm without parameter uncertainty compensation. The results are presented in Figure 11. The results point out that the proposed field weakening algorithm is robust to parameter variation while the algorithm without parameter uncertainty compensation is sensitive to variation of the motor parameters. A similar analysis is performed for the reference governor in previously published conference paper [18], where the reference governor is also shown to be robust to variation of the motor parameters.
Due to safety reasons, in order to leave enough voltage reserve for a possible large torque change, i.e. current step change during FW operation, the fieldweakening voltage limit is selected as a value lower than  Figure 11(a) 0.7L d 0.7L q Ψ md R s Figure 11(b) L d L q 0.7Ψ md 1.5R s the actual limit, which is a common practice in control of permanent magnet synchronous machines.

Conclusion
High performance control of PMSMs can be achieved using rotor-field-oriented vector control. Usually, d and q axis currents are controlled independently using PI controllers with additional decoupling terms. Due to a limited voltage available from the inverter, the current controllers are prone to saturation which leads to disturbed current dynamics, degraded torque production and potentially the system instability. In order to overcome the problem of saturation, the adaptation of current references in the form of a reference governor is implemented in the control structure of a permanent magnet synchronous machine. In order to ensure that voltage and current constraints are not violated in steady state, i.e. to ensure reachability of the torque reference, a novel field-weakening algorithm is introduced. The presented algorithms are robust to parameter changes, thereby allowing the use of incorrectly assessed motor parameters and implementation on the motor with a high degree of saturation. The field-weakening and current reference governor algorithm are implemented on Texas Instruments F28343 200 MHz microcontroller and experimentally verified on surface mounted permanent magnet motor drive.

Disclosure statement
No potential conflict of interest was reported by the authors.