Gradient-Based Predictive Pulse Pattern Control of Medium-Voltage Drives—Part II: Performance Assessment

In this article, the performance of gradient-based predictive pulse pattern control (GP<inline-formula><tex-math notation="LaTeX">$^{3}$</tex-math></inline-formula>C) is evaluated for a medium-voltage variable-speed drive consisting of a three-level neutral-point-clamped (NPC) inverter and a medium-voltage induction machine. To this end, real-time tests are performed in a hardware-in-the-loop (HIL) environment, which, along with extensive simulation studies, elucidate the potential of performance gains achieved with GP<inline-formula><tex-math notation="LaTeX">$^{3}$</tex-math></inline-formula>C. As shown, by manipulating offline-computed optimized pulse patterns (OPPs) in real time such that the stator current of the machine follows a precalculated optimal current trajectory, superior steady-state and transient performance can be achieved. Specifically, the current total demand distortion (TDD) is significantly reduced compared with established control methods, such as field-oriented control (FOC) with space vector modulation (SVM), while shorter settling times during transients are achieved. Finally, to complete the assessment of the control method of interest, real-time implementation aspects are discussed in detail.


I. INTRODUCTION
M EDIUM-VOLTAGE (MV) drives are widely utilized in industrial applications such as pumps and fans [1]. In such processes, it is attractive to use variable-speed drives (VSDs) as they allow for operation of the machine at an adjustable speed and/or electromagnetic torque. To achieve this, control methods, such as field-oriented control (FOC) [2], [3] or direct torque control [4], need to be employed. Moreover, since high-power converters are used to drive the MV machines, these control techniques need to operate the VSD at low switching frequencies to keep the associated power losses low [5]. Manuscript  An alternative control method that has been gaining interest in the power electronics community is direct model predictive control (MPC), especially in its form as a controller with output reference tracking, which is also known as finite-control-set MPC (FCS-MPC) [1], [6]- [8]. This strategy, when properly designed, can simultaneously tackle several control objectives in an optimal manner, thus ensuring very good steady-state behavior [9]. In addition, the fact that control and modulation are addressed in one computational stage enables very fast transients, limited only by the physical limitations of the VSD system [1]. However, FCS-MPC suffers from a variable switching frequency and spread harmonic spectra, while the optimization problem underlying direct MPC is usually very challenging to solve in real time [1].
To address the aforementioned pitfalls, some direct MPC methods introduce an implicit modulator, which fixes the switching frequency and enables MPC to produce deterministic harmonic spectra [10]- [12]. Moreover, the optimization problem can be cast as a quadratic program (QP) [13], which is relatively easy to solve on an embedded system in real time [14].
In this direction, a control strategy is proposed in [15], 1 called gradient-based predictive pulse pattern control (GP 3 C), which combines the benefits of optimized pulse patterns (OPPs) [16], [17] and gradient-based direct MPC [12], [18]. The control problem of the GP 3 C scheme is based on the minimization of the error between the stator current and its optimal reference trajectory, as computed based on the nominal OPP. The controller manipulates the switching time instants of the offline-computed nominal OPP in real time and in an optimal manner. In doing so, a superior steady-state and dynamic performance can be achieved.
The control principle and problem formulation of GP 3 C are presented in [15]. In a next step, it is desired to test the effectiveness of the proposed control algorithm in a real-world setting with the control algorithm implemented on an embedded control platform. However, MV drives are typically rated at a power greater than 0.5 MVA and voltage in the range of 3-6.6 kV. As can be understood, such systems are not readily available for testing the control software, thereby hindering the development of new control algorithms. Given the advancement in digital processors and a steep improvement in their computational abilities, these obstacles motivated the evolution of various real-time platforms (e.g., PLECS RT-Box, Typhoon HIL, SpeedGoat, StarSim, etc.) intended to support the development of power electronic circuits [19]. These real-time platforms provide great flexibility by enabling real-time emulation of high-power systems (see, e.g., [19]). As a result, hardware-in-the-loop (HIL) simulations can be performed to accurately assess the controller performance without the presence of the physical system. This can be done under both nominal and adverse operating conditions, such as faults and short-circuits, that would not otherwise be tested in the laboratory. In doing so, the testing and commissioning of control software designed for MV power electronic systems are facilitated, while providing a risk-free environment.
This article seeks to augment the contribution and analysis presented in the algorithm part [15]. To this aim, the behavior of an MV VSD system-consisting of a three-level neutral-pointclamped (NPC) voltage-source inverter and an MV induction machine, see Fig. 1-is emulated in this article, by adopting a HIL approach to enable the real-time testing of the proposed control algorithm. In doing so, the performance of GP 3 C is assessed in real time under both steady-state and transient operating conditions, and an insightful and meaningful understanding of the benefits of the proposed control scheme is provided. As can be seen, for the relevant range of switching frequencies for MV drives (i.e., lower than 500 Hz), GP 3 C achieves a superior performance when compared to state-of-the-art control methods, such as FOC with space vector modulation (SVM).
The rest of this article is organized as follows. Section II summarizes the GP 3 C control scheme. Section III presents the HIL implementation, including details on the real-time simulation of the MV VSD system as well as the implementation of GP 3 C on a real-time control platform. Subsequently, the corresponding performance evaluation is reported in Section IV and compared with that of FOC with SVM. Section V provides additional insight into the controller performance, including its robustness to parameter variations, and the effect of the tuning parameters. Finally, Section VI concludes this article.

II. CONTROL PROBLEM AND ALGORITHM
This section recapitulates the main subject matter of [15] by summarizing the drive system that serves as a case study, the control problem, and the main working principle of the GP 3 C algorithm. The block diagram of the discussed GP 3 C algorithm is provided in Fig. 2.

A. Control Problem
Consider an MV VSD system consisting of a three-level NPC voltage-source inverter and an MV induction machine, as shown in Fig. 1. The continuous-time model of the system, in the orthogonal αβ-coordinate system, is written as where F , G, and C are the system, input, and output matrices, respectively, and they can be found in [1, Appendix 5.A]. We use the transformation matrix K, where to translate the three-phase switch position u abc = [u a u b u c ] T into the αβ frame. For a three-level inverter, u ∈ U 3 = {−1, 0, 1} 3 , i.e., it is an integer-valued vector. For the drive system shown in Fig. 1, the stator current and the rotor flux linkage are chosen as the system state, i.e., The control problem is formulated as a current control problem, i.e., the main control objective is to achieve stator current reference tracking. Assuming an (offline-computed) OPP 2 as function p(d, m), where d is the pulse number-which directly defines the device switching frequency-and m is the modulation index, the current reference trajectory i s,ref at a given operating point is calculated based on it. This means that i s,ref is by definition optimal since it corresponds to the current trajectory with the minimum distortions [21]. Hence, by achieving as good a tracking of i s,ref as possible, minimal current distortions are produced at steady-state operation. Moreover, during transients, very fast transient responses of a few milliseconds can be achieved such that, e.g., any changes in the load are quickly dealt with. To achieve such a favorable performance, the controller manipulates the switching time instants of the nominal OPP that fall within a prediction horizon of finite length.

B. Objective Function
Consider the time window T p to serve as the prediction horizon. T p is an integer multiple of the sampling interval T s , i.e., T p = N p T s , where N p ∈ N + is the number of prediction steps. With the assumption that z ∈ N switching time instants of the nominal OPP fall within T p , we define the following vectors: In (3), t ref is the vector of switching time instants of the nominal OPP, U is the vector of the corresponding OPP switch positions, 3 and t is the to-be-computed modified switching time instants.
With the above definitions, the objective function that penalizes the error of the stator current and changes in the nominal OPP is written as where Δt = t ref − t denotes the (to-be-applied) modifications on the nominal OPP. The scalar weighting factor λ t ≥ 0 is a tuning parameter and prioritizes between the tracking accuracy and the amount of modifications in the nominal OPP. As (4) implies, the current evolution within the prediction horizon T p needs to be computed. To this end, gradients are used with which the stator current evolves within T p . Specifically, considering that the z switching time instants of the OPP divide and (6) Following, according to the gradient-based direct MPC principle presented in [12] and [18], (4) is rewritten as 4 where r depends on the reference values and measurements of the stator current, while M is a matrix of the stator current gradients, computed according to (6).

C. Control Algorithm
The algorithm works in the discrete-time domain at equally spaced time instants kT s . In a first step, the offline-computed nominal OPP p(d, m) is retrieved from the respective lookup table (LUT), and the three-phase OPP is constructed. Moreover, the optimal stator current reference values over the prediction horizon are obtained and aggregated in the vec- subject to kT s < t 1 < . . . < t z < kT s + T p . 3. Solve the optimization problem (8). This yields t * . Return t * (k) that fall within T s and modify the OPP accordingly.
As per the receding horizon policy, the switch positions that fall within the first sampling interval T s are implemented at the corresponding time instants t * . The aforementioned procedure of GP 3 C is summarized in Algorithm 1. For more details, the reader is referred to [15].

III. HIL SYSTEM IMPLEMENTATION
As depicted in Fig. 1, the VSD system of interest comprises an MV induction motor fed by a three-level NPC inverter. The dc link of the inverter is supplied by two full-bridge diode rectifiers. 5 The rectifiers are connected to a symmetrical three-phase grid via a Y-YY transformer. 6 For the performance evaluation of the control algorithm, the complete VSD system is simulated on a PLECS RT-Box, while the controller is deployed on a dSPACE SCALEXIO embedded control system. A block diagram of the HIL test bench is shown in Fig. 3, while Fig. 4 presents the real-time implementation in a more detail.

A. Platform and Test Bench
The HIL system implementation employs the PLECS RT-Box 1 which utilizes a Xilinx Z-7030 system-on-chip as the processing unit. It consists of a field-programmable gate array (FPGA) with two embedded CPU cores. The VSD system shown in Fig. 1 is simulated on the processor of the RT-Box with a sampling interval of T s,HIL = 5 μs. 7 The RT-Box FPGA performs the data acquisition (DAQ), thereby ensuring high fidelity of the real-time simulation. The switching signals for the inverter are generated by the control platform described below and supplied via digital inputs. To close the loop, the measurements acquired from the system are fed back to the control platform via an analog interface.
The GP 3 C algorithm is implemented on the dSPACE SCALEXIO system, which consists of a 2.8 GHz Intel i7-6820EQ processor and a Xilinx Kintex-7 FPGA. The control loop is implemented on the processor, while the FPGA is utilized for DAQ and the application of the switching signals. As the 5 Diode rectifiers are used in most electrical drives to reduce the overall cost of the system, particularly when a generating mode is not required. 6 Typically, a Y-YΔ transformer is used in MV applications as a 12-pulse rectifier results, thus reducing the dc-link voltage ripple. However, as also discussed in [15], a YY configuration is chosen for the secondary side of the three-phase transformer in this article. This produces higher dc-link voltage harmonics and, thus, allows us to verify the controller performance under somewhat extreme test conditions. 7 Note that the average cycle time required for the simulation of the VSD system is 2.35 μs, while the maximum time is around 3.23 μs.  optimization problem (8) is a convex QP, it can be solved in a computationally efficient manner in real time with the gradient projection-based solver described in [22]. The Intel i7 processor solves the QP at every sampling interval and supplies the calculated switching time instants t * and corresponding switching pattern U within the first step of the prediction horizon to the FPGA. Inside the FPGA, a counter-based mechanism transmits the switch positions to the HIL platform at the desired times. Table I shows the utilization of the FPGA resources.

B. VSD Model Suitable for Real-Time Simulation
The HIL system running on the RT-Box consists of two main circuits, namely, the grid-connected (passive) rectifier and the IM drive, that are decoupled from each other via the dc link. Most of the components required for the design of the HIL simulation circuit are available in the PLECS library. The rectifier units are built by using three-phase full-bridge rectifiers based on diodes. The dc link consists of two capacitors C dc with (inverse) impedance X dc .
The NPC inverter consists of three single-phase legs, where each leg comprises four pairs of (controllable) active semiconductor switches and freewheeling diodes as well as two clamping diodes.
Finally, the squirrel-cage IM is modeled by employing signal flow graphs [23]. Choosing the stator current i s , rotor flux ψ r , and rotor angular speed ω r as state variables, the differential equations that fully describe the dynamics of the machine are where τ s = σX s /R σ is the transient stator time constant and τ r = X r /R r is the rotor time constant, with X s (X r ) being the stator (rotor) self-reactance. Moreover, σ = 1 − X 2 m /(X s X r ) is the total leakage factor and R σ = R s + k 2 r R r the equivalent resistance, where k r = X m /X r stands for the rotor coupling factor, R s (R r ) for the stator (rotor) resistance, and X m is the mutual reactance. Furthermore, T e and T are the electromagnetic and load torque, respectively, while τ m = H is the mechanical time constant of the machine, where H is the moment of inertia. Finally, ω s denotes the stator angular speed, I 2 is a two-dimensional identity matrix, and J is the rotation matrix

IV. PERFORMANCE EVALUATION OF GP 3 C BASED ON A HIL SYSTEM
In this section, the real-time assessment of the proposed GP 3 C scheme based on the HIL system described in Section III is presented. All results are shown in the per unit (p.u.) system. 8 The rated values of the MV drive system along with its parameters are provided in Table II. 9 For the given parameters of the machine, a total leakage reactance of X σ = 0.255 p.u. results. Moreover, the dc-link voltage, supplied by the diode rectifiers, has an average dc voltage of V dc = 5.2 kV with a (peak-to-peak) voltage ripple of 234 V. The OPP in use has the pulse number d = 5, implying a device switching frequency of 250 Hz for operation at nominal speed. Moreover, the modulation index is m = 1.046.
Finally, regarding the controller parameters, the sampling interval is T s = 50 μs, and the prediction horizon has N p = 20 steps, i.e., the prediction time window is T p = 1 ms. The weighting factor λ t in (7) is chosen as λ t = 10 6 . The measurements are recorded at a sampling frequency of 20 kHz using a digital oscilloscope. Note that the system delay is compensated for by 8 The p.u. system is established using the base quantities V B = 2/3V rat = 2694 V, I B = √ 2I rat = 503.3 A, and ω B = ω rat = 2π50 rad/s. 9 The prediction model of the GP 3 C algorithm uses the same parameters as in Table II.  implementing a standard delay compensation of one sampling interval (see [15]). Fig. 6 shows the steady-state performance of the proposed GP 3 C algorithm for the MV drive simulated on the HIL platform.

A. Steady-State Performance
For the presented results, operation at nominal speed and rated torque is considered. Fig. 6(a) shows the measured stator current along with the optimal current reference trajectory. The latter is not sinusoidal since it is a combination of the fundamental and the optimal current ripple. Moreover, due to the digital implementation of the controller, the reference trajectory is sampled at As can be seen in Fig. 6(a), the steady-state performance of GP 3 C is excellent. Only minute deviations of the stator current from its reference trajectory are observed, implying that the produced current ripple is very close to its optimal value. This is verified by the very low value of the current total demand distortion (TDD) of 4.513%, as computed based on the harmonic current spectrum shown in Fig. 6(b). This value is very close to the corresponding theoretical current TDD, which is 4.242%. From this figure two interesting observations can be made. First, the proposed algorithm can effectively reject the low-frequency (300 Hz) dc-link voltage ripple, shown in Fig. 6(f), indicating its high bandwidth. Second, only nontriplen odd-order harmonics exist, as expected due to the quarter-and half-wave symmetry of OPPs [16], [17]. The latter is clearly shown in Fig. 6(c), which depicts the switching pattern (solid line) as modified by the controller and compares it with the nominal OPP (dashdotted line). It is observed that the nominal OPP undergoes only minor modifications, mostly due to system nonidealities, such as the dc-link voltage ripple, which, as mentioned, has a peak-to-peak value of 0.101 p.u. [see Fig. 6(f)]. This is thanks to the optimal control principle of the controller that locally reoptimizes the OPP by minimizing both the current error and the deviations from the nominal OPP [see (8)]. Furthermore, Fig. 6(d) and (e) shows the electromagnetic torque and the stator flux magnitude, respectively, which are computed in the dSPACE processor based on the measured current and estimated rotor flux.
For comparison purposes, FOC with three-level asymmetric regularly sampled carrier-based pulsewidth modulation (CB-PWM) with common-mode signal injection of the min/max type is implemented. Note that this leads to equivalence between three-level CB-PWM and SVM [24]. For a fair comparison with GP 3 C, the carrier frequency is chosen such that the same switching frequency is considered, i.e., 250 Hz. The proportional-integral (PI) controllers of FOC are tuned based on the modulus optimum method. The results obtained with FOC are shown in Fig. 7. As can be seen in Fig. 7(a), the stator current waveform generated by FOC has a significantly higher current ripple compared to GP 3 C. This is reflected in the harmonic spectrum [see Fig. 7(b)], where the current harmonic distortions are higher, especially at low frequencies. This gives rise to a significantly higher current TDD of 8.172%. It is worth noting that the 5 th and 7 th harmonics are particularly pronounced due to the dc-link voltage ripple at 300 Hz.
To further elucidate the steady-state performance of GP 3 C, Figs. 8 and 9 compare its performance with that of FOC with SVM in terms of current and torque TDD, respectively. This is done for the range of switching frequencies that are relevant for MV drives, i.e., for f sw ∈ [100, 500] Hz. As previously, operation at nominal speed and rated torque is considered. As can be seen in Figs. 8 and 9, the proposed control scheme allows a significant reduction in both current and torque TDDs. Such a reduction is more prominent as the switching frequency decreases, where the harmonic current and torque distortions of GP 3 C can be halved (or even more) compared to those of FOC with SVM. Hence, these figures clearly demonstrate the superior steady-state performance of GP 3 C.

B. Transient Performance
The transient performance of the proposed GP 3 C scheme and FOC is investigated during torque reference steps. While operating at nominal speed, the torque reference is stepped from T e,ref = 1 to 0 p.u., and, following, stepped back up to T e,ref = 1 p.u. The performance for the two examined scenarios for GP 3 C is depicted in Figs. 10 and 11, respectively. As can be seen in these figures, GP 3 C tries to reach the new torque (and current) demanded values as quickly as possible-and without any over/undershoots-by modifying the nominal OPP (shown with dash-dotted lines) accordingly. For example, in the reference torque step-up case, GP 3 C removes pulses from the nominal OPP [see Fig. 11(b)]. In doing so, the settling time is effectively limited only by the available voltage margin, rather by the controller. Hence, Fig. 11(b) clearly highlights the favorable dynamic behavior of the proposed control concept.     Figs. 12 and 13. From these figures, it can be clearly seen that FOC with SVM does not exhibit as favorable a dynamic behavior as GP 3 C. In spite of the fact that the PI controllers are tuned according to the modulus optimum method to ensure high bandwidth, the fact that control and modulation take place in two separate computational stages, executed in a sequential manner, worsens the transient performance of the scheme. Therefore, it can be concluded that owing to the direct control principle of GP 3 C, shorter settling times can be achieved. Finally, it is important to point out that the dynamic performance of GP 3 C can be affected-and further improved-by adjusting the tuning parameters of the controller, such as the prediction horizon length N p and the weighting factor λ t . These points are discussed in more detail in Sections V-D and V-E, respectively. Moreover, it is worth mentioning that the settling times during the torque reference step-down change can get shorter by enabling GP 3 C to reverse the polarity of the pulse pattern. In doing so, the available voltage margin can be fully utilized. To this aim, the concept of pulse insertion can be adopted, as proposed in [25].

C. Computational Burden and Timing Analysis
For the real-time implementation of control methods that seem to be computationally demanding, the analysis of the time required to execute the complete control scheme is of great importance. For this reason, Table III summarizes the time required for the implementation of the GP 3 C algorithm on the dSPACE system. 10 To fully understand and appreciate Table III, it is important to point out that the size of the GP 3 C optimization problem shown in (8) is time varying. More specifically, the size of (8) depends on the number of switching time instants of the OPP that fall within the horizon T p . This time-dependent change in the dimension of the optimization problem is visualized in Fig. 14 over one-sixth of the fundamental period. This is done by showing the number of nominal OPP switching instants that fall within T p at consecutive controller iterations. It is clear that  the size of the QP (8) varies between one and four dimensions. Consequently, the computational burden of the GP 3 C problem varies as a function of the QP size.
With the above information, the dSPACE turnaround times presented in Table III can be better understood. Specifically, time t init is the time required for initialization and DAQ by the dSPACE system. Hence, this time includes measurement (analog-to-digital conversion) and communication delays as well as the time required to read from and construct the OPP based on the LUTs. As can be seen, the low variance in t init is due to the fact that the aforementioned tasks do not depend on the size of the QP. In the next column, t pr refers to the time required for the preprocessing steps of the MPC problem formulation, i.e., for the delay compensation, observer, reference trajectory generation, and calculation of the current gradients based on the predicted state. As some of these tasks depend on the QP size, there is a noticeable difference between the minimum and maximum required times. The time that is mostly affected by the time-varying size of the GP 3 C problem is-as expected-the time t QP required by the solver to solve the QP (8). However, owing to the adopted computationally efficient solver [22], which fully exploits the geometry of the underlying optimization problem, the associated computation time remains relatively modest, even when a fourdimensional QP needs to be solved. This greatly facilitates the real-time implementation of the proposed control algorithm. This is reflected in the total maximum turnaround time which is t tot,max = 37.97μs, i.e., much smaller than the available time of T s = 50 μs.
Finally, the probability distribution of the number of iterations n iter required by the employed solver to find the solution to the QP (8) as well as that of the total turnaround time t tot is shown in Figs. 15 and 16, respectively. Considering that in the worst-case scenario, a four-dimensional QP needs to be solved in real time, the average number of the required iterations, i.e., 18, is modest, indicating the efficacy of the adopted solver [22]. Moreover, as can be seen in Fig. 16, in more than 98% of the cases, the total turnaround time t tot is less than 35 μs for the chosen controller settings. This highlights the fact that the complete GP 3 C algorithm can be solved well within the chosen T s , implying that QPs of higher dimensions could be easily solved-if required-without sacrificing optimality.

V. DISCUSSION
In this section, to gain more insight into the performance and characteristics of GP 3 C, the closed-loop behavior of the MV drive system is examined under different scenarios and varying operating conditions. All the results presented in this section are based on simulations.

A. Robustness to Machine Parameter Variations
For a model predictive controller, such as the proposed GP 3 C algorithm, the accuracy of the discrete-time model of the system that serves as prediction model is of paramount importance. This implies that any mismatches between the actual (to-be-controlled) system and the prediction model can lead to adverse behavior and performance degradation. Therefore, in the sequel of this section, the impact of variations in the motor parameters-namely, the stator and rotor resistance as well as the stator and rotor leakage reactance and the mutual reactance-on the steady-state tracking accuracy of GP 3 C is analyzed. To this aim, a ±50% parameter mismatch is introduced into the prediction model and the harmonic current reference, while the parameters of the simulated drive system remain unchanged, i.e., equal to their nominal values.
As previously, operation at nominal speed and torque is considered, while the OPP in use has a pulse number equal to d = 5. To quantify the deviation from the nominal steady-state performance, the relative changes in quantities of interest, such as the current and torque TDDs, the amplitude of the fundamental component of the stator currentÎ s1 , the torque T e , as well as stator Ψ s and rotor Ψ r flux magnitudes are considered. To this end, the metric is adopted, where ζ represents any of the quantities of interest, as described above, while ζ nom stands for the corresponding nominal values, i.e., those acquired during operation without any model mismatches. For the following analysis, the outer loop (see Fig. 2) is disabled such that it will not compensate for the performance degradation of the inner MPC-based loop due to its integrating nature. The IM resistances typically change during operation due to variations in the operating temperature. For this reason, the impact of variations in the stator and rotor resistances on the performance of GP 3 C is examined; see the top rows in Table IV. As can be deduced from the comparison with the nominal case, shown in the first row of Table IV, all quantities of interest are, essentially, not affected by changes in these resistances. This is anticipated since the resistances of an MV machine are very small, as also shown in Table II.
With regards to the IM reactances, these may vary with changes in the operating point or due to nonlinearities, e.g., saturation of the magnetic material of the machine. As shown in [26], the machine can be assumed as a load with a predominantly inductive behavior, where the motor reactances are modeled using the total leakage reactance X σ . As discussed in [27], a ±50% change in X ls causes a ±30% variation in X σ from its nominal value, while a ±50% change in X lr changes X σ  by ±20%. On the other hand, a mismatch in X m results in a negligible change in X σ , i.e., ±1%. Hence, it is expected that variations in the machine reactances can considerably affect the system performance. Table IV summarizes the performance of GP 3 C for different scenarios of changes in the reactance values. It is observed that, even though most changes do not affect the system performance, an underestimation of X ls or X m has the biggest negative influence compared to other scenarios. The former can be explained by the fact that X σ changes considerably when there is a mismatch in X ls . Since the harmonic current and thus optimal reference trajectory are derived based on the nominal value of X σ , deviations from it will affect the tracking performance of the controller. Nevertheless, there are simple mechanisms that can easily provide the accurate value of X σ and, hence, mitigate  this problem [28]. As for the changes in X m , these affect the estimation of the rotor flux, since this is merely estimated in a feedforward manner based on X σ and X m ; thus, it lacks any integrating action (see [15,). Hence, the wrong estimation of ψ r results in the partial demagnetization of the machine and, consequently, steady-state tracking error of the torque. Such issues, however, can be tackled by employing an observer of integrating nature, e.g., a Kalman filter [22], or an optimal observer, such as a moving horizon estimator [29]. Moreover, activating the outer loop will remedy, to some extent, this issue. Therefore, the presented analysis indicates the robustness of the proposed GP 3 C scheme to variations in the machine parameters.

B. Tradeoff Between Current TDD and Prediction Horizon
As reported in [9] and [30], a long horizon can positively affect the performance of MPC-based schemes since it allows for more educated decisions. To examine the impact of the horizon length on the behavior of GP 3 C, Fig. 17 shows how the current TDD changes as the number of the prediction steps N p increases. The presented investigation is done for operation at nominal speed and rated torque and OPPs with pulse numbers d = 4 to d = 7.
As can be seen, as the horizon length increases, the current TDD decreases. This improvement is more evident at higher pulse numbers, where the current TDD for horizon steps N p > 25 is almost equal to that of the offline-computed nominal OPPs, i.e., equal to its theoretical minimum value. This is due to the fact that a longer interval of the OPP switching pattern falls within the prediction horizon and, thus, more switching time instants. As a result, the controller can distribute the required modifications over several switching time instants-instead of a few-and thus apply a switching pattern that is very close to the nominal OPP.

C. Change in Pulse Number
Typically, MV VSD systems need to operate below a maximum switching frequency f sw,max . This implies that as the fundamental frequency changes, 11 the OPP in use should change such that the switching frequency does not exceed its upper limit, i.e., f sw ≤ f sw,max . When this transition occurs, it should be as smooth as possible so that the drive performance is not affected.
To investigate the performance of GP 3 C under such a scenario, Figs. 18 and 19 show the behavior of the system for a transition in the pulse number from d = 5 to d = 6. Specifically, at t = 40 ms, the OPP in use is changed and the response of the system for the cases where the controller is inactive and active, respectively, is recorded. In Fig. 18, the controller is inactive, and hence, a change in the pulse number causes a low-frequency oscillation in the torque and stator flux magnitude. Fig. 18(a) shows the switching pattern before and after the pulse number change, where the (red) dotted line highlights the time instant of the change in the OPP in use. On the other hand, Fig. 19 depicts the performance of the system when the GP 3 C scheme is active. As can be observed, the controller achieves a seamless transition from one OPP to the other without introducing any transient. To achieve this, the nominal OPP in use is modified accordingly. However, these modifications are minute and thus not visible [see Fig. 19(a)].

D. Torque Response for Different Horizon Lengths
Longer horizons can improve not only the steady-state performance of GP 3 C, but also its dynamic behavior. To verify this, Fig. 20 shows the torque response during a step-down change in its reference value for different prediction horizon lengths. As can be observed, as the horizon increases, e.g., from N p = 5 steps (T p = 250 μs) to N p = 20 steps (T p = 1 ms), the duration of the torque transient is reduced by almost 2.5 ms. This can be explained by the fact that with a longer prediction horizon, more switching instants are available to the controller for manipulation. As a result, the controller can better distribute the required switching instant modifications (and thus volt-second changes), thereby improving the transient response.
This point is further elucidated in Fig. 21. Considering that a torque reference step-down change (from 1 to 0 p.u.) is applied at t = 2 ms (in line with Fig. 20), this figure illustrates the nominal OPP and the modified pattern for three different horizons (N p = 5, 10, 20). As can be seen, a longer horizon equips the controller with the required degree of freedom to apply the required modifications to the switching instants immediately when the step change has occurred, rather than delaying them into the future. For example, for N p = 5, all the switching instants on phase c are modified by a small amount [see Fig. 21(a)] due to the short prediction window, which allows for small changes in the pulse pattern. On the other hand, when the horizon is as long as N p = 20 steps, the switching instant on phase c that is closer to t = 2 ms, i.e., the time instant the step change occurs, is significantly modified so that the torque can settle to its new value as quickly as possible [see Fig. 21(c)]. As a result, the switching instants further in the future are unaffected since the transient has been completed.
Finally, it is worth pointing out that even though the settling times decrease significantly as the horizon length increases, once the horizon is sufficiently long, this rate of improvement diminishes. For example, given the problem settings of the case examined in Fig. 20, i.e., d = 5 and T s = 50 μs, it is evident that there are insignificant benefits-in terms of settling times-for horizons longer than N p ≥ 20. Therefore, it can be concluded that a prediction horizon of N p = 20 steps, i.e., T p = 1 ms, allows GP 3 C to exhibit favorable transient performance without unnecessarily increasing its computational burden.

E. Torque
Step Response for Varying λ t As mentioned in Section IV-A, the transient performance of GP 3 C can be affected by the choice of the weighting factor λ t in (7). A smaller value of λ t implies that the controller prioritizes the current tracking by tolerating larger modifications in the switching time instants, defined as the difference between the nominal OPP switching instants t ref and the to-be-computed switching time instants t, i.e., Δt = t ref − t. Hence, such a tuning choice enables faster transients since bigger modifications in the nominal OPP are allowed. On the other hand, increasing λ t slows down the transient response of GP 3 C as smaller modifications are allowed.
To demonstrate the impact of λ t on the dynamic performance of GP 3 C, Fig. 22 shows the torque response to a step-down change in its reference for different values of λ t . Therein, it is verified that smaller values of λ t allow larger modifications of the nominal OPP switching time instants, and hence, the controller is able to achieve a faster torque response. This is clearly depicted in Fig. 23, where the corresponding switch positions are shown. For instance, in Fig. 23(a) with λ t = 30λ 0 -where λ 0 = 10 5 serves as a base value for λ t -the switching transition in phase c at 3.2 ms is shifted to 2.96 ms, i.e., the pulse is shortened by Δt = −0.24 ms. On the other hand, for λ t = 2λ 0 in Fig. 23(c), the same switching instant is shifted to 2.4 ms, i.e., Δt = −0.8 ms, which speeds up the torque transient.
Based on the presented results, it can be concluded that a small value of λ t is to be preferred since it allows for favorable transient performance. However, an overly small λ t can adversely affect the steady-state behavior of GP 3 C since, in such a case, the controller would not consider the nominal OPP. This could tellingly spoil the symmetry properties of the applied pulse pattern and, consequently, give rise to increased stator current and torque harmonics. This means that a compromise between the transient and steady-state performance needs to be done. Notwithstanding the foregoing, it is clear from the presented results that the proposed control method can achieve a superior overall performance.

VI. CONCLUSION
This article presented a performance analysis of the gradientbased predictive pulse pattern control gradient-based predictive pulse pattern control (GP 3 C) method presented and analysed in [15]. The discussed method was applied to an MV drive system, and its performance was assessed in the laboratory based on a HIL system, i.e., real-time simulations. According to the proposed control principle, the offline-computed OPPs are modified in real time by GP 3 C such that the stator current accurately tracks its optimal reference trajectory. The required modifications in the nominal OPP are computed in an optimal manner by solving an optimization problem. The latter is cast as a QP, thus enabling its real-time solution by employing a computationally efficient solver. Such an implementationfriendly problem formulation is facilitated by the adoption of the gradient-based system modeling approach. According to this method, the gradients of the controlled variables, i.e., the stator currents, are utilized to predict the VSD system evolution. This modeling approach, the subsequent straightforward control problem formulation, and its ease of real-time implementation, indicate another important advantage of GP 3 C, namely its high design versatility. This implies that the application of the proposed control strategy to other types of machine drives is straightforward. More importantly, its extension to higher-order systems and/or grid-connected systems is possible and relatively simple [18].
As shown with the presented results, thanks to the combination of constrained optimal control (i.e., MPC) and optimal modulation (i.e., OPPs), the drive system can exhibit superior steady-state and transient performance. With regards to the former, very low current TDD (close to the theoretical minimum) can be produced. As for the latter, thanks to the optimal modifications of the nominal OPP switching time instants, very fast transient responses are achieved. Furthermore, owing to inherent attributes of the proposed control strategy, such as the receding horizon policy, the GP 3 C scheme can compensate for the nonidealities of the drive system, such as the dc-link voltage ripple, that would otherwise deteriorate the steady-state performance of OPPs in real-world applications. Moreover, a high degree of robustness to parameter variations is achieved. Hence, the presented results clearly demonstrated the benefits of GP 3 C, and provided an insight into the potential benefits of the method in question.