PWM-Based Optimal Model Predictive Control for Variable Speed Generating Units

This article investigates the dc-link voltage control of an active rectifier that is supplied by a variable speed permanent magnet synchronous generator. This configuration is commonly encountered in gearless wind energy conversion systems as well as in variable speed generating units. The proposed control strategy uses an optimal voltage vector based modulated model predictive control (MPC) to achieve direct power control. The studied scheme combines the advantages of finite control set MPC and control techniques that use pulsewidth modulator. The fast dynamics of the former are obtained during large transients, and the constant switching frequency operation, of the latter, is ensured in steady state. At each sampling instant, all the switching states are evaluated and the two adjacent states that give minimum error in the controlled variables are selected. The duty cycle of each of these vectors is computed through linear combination and appropriately limited for overmodulation. Simulations and cosimulation results presented in this article show interesting results. The control strategy has been developed on a field-programmable gate array control platform and experimental results at steady state are shown, with the aim to demonstrate the computational feasibility of the control strategy.


INTRODUCTION
Permanent magnet (PM) machines are generally employed for servo and traction applications [1]. In variable speed drives, they are a viable solution in applications that demand high power density, such as integrated starter generators in aerospace sector [2]. These machines are also very effective in gearless wind energy conversion systems where bulky mechanical gearboxes are avoided for minimizing load on wind turbine towers [3]- [5]. With a direct-drive (gearless) permanent magnet synchronous generator (PMSG), a varying wind speed means variable frequency ac voltages being induced at the generator terminals. To be able to couple this variable frequency source with a constant frequency grid, a power electronic interface is necessary.
Most often, the power electronic interface consists of a diode rectifier feeding a dc-link at the output of which another power electronic converter delivers power to the grid [6]. However, a discontinuous conduction pattern in diode bridge rectifiers means greater current ripple and, hence, a substantial torque ripple at the shaft [6]. An active front end (AFE) converter that replaces diodes with bidirectional power electronic switches alleviates this discontinuous conduction problem. The control of this AFE converter has been widely reported in the literature [7]- [11].
An increasing research effort is directed towards MPC applications for AFE control [7], [8]. A ripple-reduced model predictive direct power control of an AFE is presented in [7]. The active and reactive power slopes are determined based on the system state equations. Using these power slopes, the active and reactive powers for the next sampling instant are predicted for seven voltage vectors corresponding to available states of a three-phase inverter. A cost function is evaluated that compares the reference and predicted powers. Unlike finite control states FCS-MPC in which only one voltage vector is applied, [7] uses two vectors whose duties are computed through analytical solution. It should be noted that this technique either applies two active vectors or one active and one zero vector in a control period. Use of two active and a zero vector in the same control period is not analyzed. Dutycycles are optimized in [8] for model predictive current control of an AFE. The control is implemented in dq rotating reference frame. In a given sector, errors in controlled currents are evaluated for the two voltage vectors at the sector boundary. An optimization problem is solved to compute duty-cycles for each active vector in the current sector, which is then transformed to phase duty cycles. Performance of this predictive duty-cycle algorithm is compared with deadbeat, FCS-MPC and linear controllers.
A predictive hybrid pulse width modulation strategy is introduced in [9] for AFEs. The method focuses on minimization of current distortions and switching losses at each sampling instant. Predictive control is used to estimate current distortions and switching losses for every PWM sequence and the sequence that minimizes the cost function is chosen. As such, the control strategy does not deal with the dynamics of control. The application of predictive direct power control to minimize ripple in active power is presented in [10]. Starting from a conventional MPC that identifies the voltage vector with minimum power error, instead of applying this vector for a complete control period its duty-cycle is computed that results in reduced active power ripple. For the remaining time of a control period a zero vector is applied. Thus, only one active vector is used in a given control period. In [11] a performance comparison of different MPC strategies for an AFE rectifier is presented. The performance is analysed in terms of the total harmonic distortion of the line current under different operating conditions, such as unbalanced input voltages, uncertainty in the parameters and DC-link voltage fluctuation. The control performance is evaluated for a system with a 10 mH input filter inductance, 1.1 mF output filter capacitance, 60 Hz frequency and 20 kHz switching frequency.
In this paper, the control of an active front end power converter is implemented through optimal voltage vector selection starting from the basic model predictive control algorithm. The control strategy is adapted from [12], however, the implementation takes place in the rotating dq reference frame. The system under consideration is a variable speed PMSG supplying a DC load. In [7]- [12], the MPC is implemented for AFE rectifiers in systems that present phase inductance values from few to dozens mH and fundamental frequency of 50 Hz. The aim of this paper is to show the effectiveness of the proposed solution for PMSG with phase inductance and fundamental frequency of about thousands μH and Hz respectively, as is the case of the PMSG employed in variable speed generation applications, where the increase in the fundamental frequency value allows to reduce the size and the weight of the electric machine and of the overall system. Furthermore, the performance of an MPC control algorithm is strongly affected by the accuracy of the system model. Particularly, when power balances are considered in the control algorithm, it becomes important to realize a model capable of providing good power losses estimation. With respect to the [13], an improved system model, shown in the next section, has been implemented in order to increase the accuracy of the system state estimation.
Starting from the discrete equations of the considered system, the power errors at the next sampling instant are predicted for all the inverter states. Then, the two adjacent inverter states that minimize the error in the active and reactive powers are selected. The duty-cycle for the application of each state is decided by whether it is possible to reach the reference power values in one sampling instant or not. In the first case, when the reference power can be achieved in one sample time, the solution lies in the linear regulation range and the dutycycles are computed through linear combination of the two inverter states. In case the system constraints do not allow reaching the target in one sample time, the over-modulation condition is encountered. To preserve optimality condition also in over-modulation, the duty-cycles for each state are linearly scaled. In this way, the algorithm preserves the fast dynamic characteristics of FCS-MPC as well as maintains constant switching frequency of modulator based control schemes [13]. An advantage of the proposed MPC is that the optimal control action is obtained without explicitly formulating the cost function. This means that no tuning action on the cost function weights is required. Finally, the use of an additional sensor to measure the load current can be avoided implementing an estimator, such as virtual flux methods with low passive filters, state observer and Kalman filters [14].

II. SYSTEM MODELING
With respect to the dq0 rotating frame, the equations representing the continuous time model of the PMSG (1) are considered together with the equation describing the DC-link capacitor dynamics, where icp stands for the capacitor current, as represented in Fig. 1. Applying the Kirchoff law to the node "A" in Fig. 1, the capacitor current is expressed as the algebraic sum between the rectified current idc and the load current il.
From the continuous time model, forward Euler method is applied to obtain the discrete time model of the system (2). Where Ts is the sampling period, Rs is the generator phase resistance, Ld and Lq are the machine inductances, C the total DC-bus capacitance, λpm is the magnetic flux, ω is the frequency of the electrical quantities and vsd vsq are the control actions applied by the inverter to the system. For a given DC-link voltage, the voltage vector resulting from each inverter state is given by (3

A. Improved modeling and calculations
In order to accurately control the DC-link voltage, especially during the steady-state condition, an improved modelling approach has been performed to consider more non-ideal effects. Additional losses that have been considered are related to the inverter conduction and switching effects as well as electrical machine joule and iron losses. Those terms will be part of the proposed control structure.

• Electrical machine joule losses
Electrical machine joule losses can be achieved by considering the dq-axes currents that are used also in the control structure. Losses evaluated at the next time step have the expression reported as follows 2 2 , [ 1] , [ 1] 3 () 2 Where also the temperature of the machine stator winding has been taken into account.

• Electrical machine iron and friction losses
In order to achieve the aforementioned loss contribution, two different approaches can be used. The first one allows to directly evaluate the whole losses by a no-load test of the electrical machine at the test bed. The use of a torque meter is mandatory to obtain the shaft torque and speed. On the other side, taking into account the design and assembly characteristics, iron and friction losses can be estimated [15], [16].

• Power converter losses
Power devices losses have been calculated on-line with specific reference to SiC MOSFET conduction and switching losses, DC-bus capacitors losses as well as freewheeling diodes losses [17]- [19]. Temperature dependency is also taken into account, adjusting losses accordingly.
Aforementioned terms are evaluated on-line during the execution of the main Predictive Control algorithm. In fact, as it will be shown in details later on, the control platform is able to run the MPC controller in parallel with the system losses evaluation block.

III. MODULATED MPC STRATEGY
The purpose of the proposed control strategy is to regulate the DC-link voltage while keeping the reactive power to zero. The desired value of the DC voltage is reached considering the link between the active power flow produced by the PMSM and the change in the capacitor voltage. This relation allows to determine the reference of the q-axis current which enables the achievement of the desired DC voltage. Once that the current references are obtained, the control algorithm must determine the voltage vector that the converter has to apply to the system in order to reach the desired current references and consequently the desired DC voltage. As already known, the only possible control actions in FCS-MPC are those generated by the eight different converter states. The control action is thus discrete, resulting in a low power quality at steady state. In this paper, an inversion of the electrical model is performed as in [12]. Finding an analytical inversion would require extremely high computational effort. The electrical model inversion is thus obtained through linear approximation. Fig.  2 shows the hexagon created by the converter finite control actions on the αβ plane. Applying to the system each one of these control voltages would result in different values of the dq axes currents. It is then possible to consider the plane of axes eid and eiq, where eid stands for the error between the predicted values of id and its reference and eiq represents the error on the q-axis current. The coordinates of each point represented in the plane e id e iq (e 1 ,e 2 ..) stand for the currents that would be present in the system if the voltage vectors with the same index (V1 ,V2…) were applied by the converter. On the plane eid eiq the predictions associated to the non-zero voltage vectors form an irregular hexagon. The e0 error is the one associated to the uncontrolled system, whose evolution is here assumed equal to that of the system when the zero-voltage vector is applied. This means that the point e0 represents the initial condition of the system at the beginning of the sampling period. The algorithm is meant to find a linear combination of two adjacent voltage vectors ( , xy vv ) which allows to move in a control period, on the e id e iq plane, from the point e 0 to the origin of the coordinate reference system; the latter is the point for which the error between the predicted currents and the reference values goes to zero. The error vectors ( , xy ee) must then satisfy the following mathematical conditions, which guarantee that the chosen voltage vectors cause the system operating point to move towards the origin of the coordinate reference system:  x y e e e e  are represented in red. The first two inequalities reported in (4) state that the above-mentioned vectors must have positive components along the -e0 direction, while the third inequality guarantees that their components along the normal to the -e 0 direction are of opposite sign. It is then guaranteed that the linear superposition of the two chosen voltage vectors allows to move toward the origin of the coordinate reference system along the -e0 direction. Once the couple of adjacent voltage vectors is chosen, the duty-cycle associated to each of them is calculated, according to the resolution of the linear system expressed by (5). If the sum of the duty cycles determined by (5) is less than 1, the zero-voltage vector is applied for the remaining time of the control period. In the over-modulation region, that is when, dx + dy > 1, duty-cycles are opportunely scaled according to (6).
The resulting voltage vector applied to the system can be expressed as in (7). The proposed control strategy does not consider an explicit formulation of a cost function, being the control action chosen on the basis of the explained mathematical procedure. The latter aims to identify the two voltage vectors that, linearly combined, lead to the smallest error in the controlled quantities. In order to keep the reactive power equal to zero, id reference value is set to zero, while to opportunely regulate the capacitor voltage, a reference value of the q-axes current is generated (iq,R), based on the estimation of the active power flow needed to both feed the load and follow the voltage reference [20]. The control algorithm starts computing the first step of prediction on the basis of the previous control action applied to the system. The values of id, [k+1], iq, [k+1], and vdc, [k+1] are then calculated. The predicted value of the capacitor voltage vdc, [k+1] is obtained estimating the DC current idc as a function of the inverter states applied to the system and the phase currents, as shown in (8). This solution is considered because of the specific nature of the proposed MPC strategy, which returns as a result different converter states to be applied in a single control period. The adopted solution allows improving the idc estimation and consequently the whole control algorithm. Second step of prediction starts with the calculation of the iq,R reference value.
To do that, a proper power balance is defined considering that the active power flow produced by the PMSG (Pag) has to account for both the power required by the load (PL), the power needed to change the DC-link voltage (Pc) and the power losses. Equations (9) describe the existing relation between the change in the stored energy of a capacitor (∆Ec) and its voltage variation, as well as the resulting power flow.
The power required by the load is determined as the product of the load current, which is here assumed measurable, and the desired DC-link voltage. Power losses are considered as Joule losses due to the stator resistance (PJloss), iron losses in the stator system (PSloss) and the converter switching and conduction losses (P Closs ). The sum of the considered losses is PLtot. It means that the required active power flow at instant [k+2] is: The active power produced by the PMSG is expressed in terms of the q-axes current by (11) and it is then possible to evaluate the iq reference through (12). 3   The parameter Tt represents the period of time in which the reference value has to be reached. Consequently, it takes into account the dynamics of the control action. It has to be underlined that this parameter acts only on the power that in the proposed control strategy is required by the capacitor to increase the voltage at its terminals. When the measured voltage enters a close range of the reference value, the control dynamics is reduced increasing the value of Tt, in order to significantly decrease the voltage ripple around the voltage reference value and thus improve the phase currents waveform. An appropriate value of Tt should be selected based on the desired trade-off between current waveforms quality, steady state error on the DC voltage reference and DC voltage ripple. Once that the current references have been determined, the control actions are chosen on the basis of the mathematical procedure previously introduced. A simplified scheme of the proposed control strategy is presented in Fig.   3.

IV. SIMULATION RESULTS
Preliminary results have been achieved through a simulation model implemented in the Matlab/Simulink environment. The system parameters are shown in Table 1. Typical issues of real implementation have been considered in the simulation, such as delay time on the application of the control action (finite time of the calculation) and parasitic elements such as losses related to the power devices of the three-phase inverter and the electrical machine operated as generator.

A. Co-Simulation
Between the simulation and the experimental stage, the NI LabVIEW Multisim Co-simulation tool has been used to verify the correct FPGA implementation of the control strategy. This tool allows simulating the physical system through NI Multisim and simultaneously implement the control strategy writing the FPGA code on LabVIEW FPGA. Proceeding like that, it has been possible to significantly reduce the time needed to reach a correct FPGA implementation of the code and thus the experimental stage. The tool highlighted in Fig. 8, thanks to the use of a Control and Simulation Loop guarantees the right timing between the simulation of the physical system and that of the simulated control platform. Only few minor changes to the simulated FPGA code have to be made before loading it on the real control platform. For each iteration of the "Control & Simulation Loop" the Multisim model of the system is executed, while the output values of the FPGA simulated code are returned each Ts (i.e. control algorithm sampling time). Co-simulation has been carried out considering the same parameters of the simulation stage. A dead-time of 1 µs was added to the switches behavior. The PMSG is rotating at a constant speed, about 1450 rpm which leads to a frequency of the electrical quantities around 290 Hz. For the behavior of the control algorithm during a step in the voltage reference, as shown in Fig. 5 and in Fig. 6, analogous performances have   been put in evidence by both simulation and Co-simulation. Indeed, in both cases, it takes a time equal to about 15 ms for the control algorithm to reach the new reference value. In order to avoid too high transient currents, a limitation in the value of the q-axis current (iq) intervenes as it is possible to notice in both figures. In this case, the current limitation was set to 50 A. Again, when the load resistance was decreased from 200 Ω to 140 Ω, simulation and Co-simulation returned comparable results as shown in Fig. 4 and Fig. 7. Once again, the fast dynamics of the control allows to keep the DC voltage close to the reference value, even during the fast variation of the load conditions. As already mentioned, this dynamic is regulated by the parameter Tt, which allows to increase or decrease the period of time in which the reference voltage has to be reached. By the way, this parameter acts only on the power flow that is delivered to the capacitor and not on the total power produced by the PMSG. The previous considerations have been taken into account to select an appropriate value of Tt once that the characteristics of the controlled system have been evaluated. In addition, Tt is expressed as an integer multiple of the sampling period. The chosen value of Tt for both simulation and Co-simulation is reported in Table I.

V. EXPERIMENTAL RESULTS
The developed control strategy has been implemented on the National Instruments System-on-Module (formally sbRIO9651), with a dedicated control board (PED-Board®). The whole control algorithm is developed on the FPGA while the Real-Time target takes into account the external communication and the system management actions. The active rectifier is a SiC power converter based on the SKiiP 26ACM12V17 from Semikron, that allows to achieve high switching frequencies, improving power quality of the phase currents. The entire electrical drive is shown in Fig. 9. Calculation of the system losses has been implemented using the same development environment adopted for the MPC algorithm. A dedicated LabVIEW subVI has been deployed to evaluated in real-time the complete system losses. Such a software structure runs on the Real-Time target (i.e. control board Processor) allowing to monitor the behaviour thanks to a dedicated graphical user interface. Table II illustrates the accuracy of the losses estimation algorithm (PLtot) with respect to an industrial measurement (PLtotM) setup composed by a power meter (PM3000A from Voltech) and a torque-meter (DRFL-II-50 manufactured by ETH-Messtechnik). Comparison has been reported with respect to different operating points expressed as DC-bus power (PDC), modulation index (m), and mechanical speed (m).  . 10 shows the steady state behaviour of the control algorithm when the voltage reference is 700 V, the load resistance is equal to about 50 Ω and the value of the Tt parameter is set to 7.5 ms. The electrical quantities frequency is about equal to 500 Hz (2500 rpm). The Total Harmonic Distortion of the phase currents (THDI) has been calculated to be equal to 4.2%.
Dynamic test in Fig. 11 has been performed varying the resistive load from about 200  to about 120  using a DC contactor. It can be noticed how fast is the controller to compensate any DC-bus voltage unbalance. In fact, the phase current is suddenly increased as soon as the required power increases.      Thus, the error between the voltage reference and the measured one is about equal 0.6%. Furthermore, it can be seen that a peak-to-peak DC-link voltage ripple of about 8 V is present. In Fig. 13 the same experimental test has been performed when the on-line losses evaluation is completely disabled. It can be noticed that a steady-state error is still present, increasing when the demanded power increases. In fact, during the experimental test both the electrical machine and the inverter losses have been forced to zero, avoiding their contribution in the Model Predictive algorithm. The resulting voltage error is about 24V, ≈3%. A performance comparison test has been also performed with respect to a variation of the mechanical speed. Speed reference of the prime mover is suddenly changed of about 500 rpm and, after a certain amount of time, it is brought back to its initial value. Fig. 14 shows the results when the algorithm for on-line losses evaluation is enabled. It can be seen that the DC-bus does not exhibit appreciable changes. Whereas, in Fig. 15 the same test is carried out when the losses evaluation was disabled. A steady-state error in the DC-link voltage is present and it depends by the mechanical speed. In Fig. 16 the DC-link voltage reference is suddenly changed from 500 V to 700 V. The voltage vertical axis zero is set to 250 V. Voltage regulation tries to reach the desired final voltage as soon as possible, increasing the q-axis current reference, theoretically, without any limitation. However, the inherent current limiting feature allows to directly saturate the maximum current to the desired value as it is shown in this experimental verification. Of course, any current limitation affects the dynamic related to the tracking of the voltage reference variation.

A. Considerations about the convergence time Tt
The convergence time Tt is expressed in seconds, and it could be considered as a sort of time required to provide the necessary amount of energy to the DC-link capacitors, in order to bring the related voltage to the desired value. Hence, it directly affects the AC to DC transferred power: lower Tt results in high power in short time (i.e. fast compensation of DC-bus voltage unbalances), whereas higher values yield longer compensation times with very stable behavior. In general, it is convenient the evaluation of Tt as the samples with respect to the control algorithm sampling time Ts, Tt=H·Ts.
The effects of the time Tt are highlighted in Fig. 17, where two different values are used. Sampling time Ts has been set to 50 s as reported in Table I. For Tt=Tt1=50Ts, it can be noticed an initial instability on the generator phase current where also the current waveform appears distorted: current regulation starts becoming ineffective. On the contrary, when the convergence time is increased Tt1=200Ts, the system is perfectly stable showing a current waveform with low distortion (THDI≈4.2 %). According to that, the time Tt has been dynamically adjusted with respect to the DC-bus voltage error to obtain a high-quality current waveform and accurate DC-bus voltage regulation during the steady-state operation; as well high dynamic, fast, compensation of DC voltage errors when the operating conditions change. Coefficient H has been evaluated to be proportional to the voltage error expressed as the difference between the DC-link voltage reference and the predicted DC voltage at the step k+1 (one step ahead). This approach allows to increase the dynamic of the control actions proportionally to the distance of the current system operating point to the desired state. This is a great benefit that can be obtained by modifying the sole parameter that can be selected in the proposed control structure. In fact, it can be observed that a special, complex, and mathematically complicated tuning is not necessary, being the convergence time Tt, the single degree of freedom of the system controller.
In order to further improve the robustness and the performance of the proposed controller, parameter H can be adjusted with respect to the voltage error. For the system having the parameters shown in Table I, a suitable variation of the H coefficient is reported in Fig. 18, where smaller values are used when the operating point is far from the desired one, resulting in a higher control dynamic. On the other hand, higher values of Tt are recommended during the steady state condition (i.e. small DC-bus voltage error), increasing the system stability. The main effect of Tt is on the value of the iq reference that is computed according to equation (10). For a fixed deviation of the measured voltage from the reference value, whenever the Tt value is such that the computed iq reference is higher than the nominal current of the system, then current limitation sets in and the dynamics of the control depends on the value of the current limitation itself. If the Tt value is set such that the current reference is below the current limit, the dynamics of the control depends on the electrical time constant of the generation system. It is understood that an upper limit on the bandwidth is imposed by the control period (Ts), from which depends the update rate of the iq reference. From this perspective, it takes on particular importance to underline that the developed algorithm allows to compute a continuous voltage vector as a control action, keeping low the number of necessary calculations and making possible to increase the speed of the control algorithm. Furthermore, as long as the frequency of the control loop increases, the accuracy of the linear superposition at the basis of the mathematical procedure increases, improving the performance of the control algorithm. As can be seen from Table I, the L/R time constant of the electric machine used for the experimental campaign is about 4.5 ms considering the rated parameters. In general, it is not recommended to force a convergence time which is far below the electrical time constant due to the constraint imposed by the converter sampling and switching frequency.

CONCLUSIONS
The Modulated Optimal Model Predictive Control for the control of the active rectifier that is supplied by a permanent magnet synchronous generator has been presented. The proposed strategy ensures both the fast dynamics of the Finite-Set MPC and good phase currents quality at steady state, which is typical of the control typologies characterized by the presence of a modulator. It has been individuated the parameter Tt which allows properly tune the control action to achieve both fast behaviour at transients and high-quality phase current at steady state.