Model Predictive Control of Grid Forming Converters with Enhanced Power Quality

: This paper proposes an enhanced ﬁnite control set model predictive control (FCS-MPC) strategy for voltage source converter (VSC) with a LC output ﬁlter. The proposed control scheme is based on tracking the voltage reference trajectory by using only a single-step prediction within the controller horizon. Besides, the suitability of different frequency control schemes with the proposed scheme to prevent from inherent variable switching behaviour of conventional FCS-MPC is investigated. Based on that, the proposed method targets two major factors inﬂuencing power quality in grid forming applications by enhancing the output voltage harmonic distortion and also preventing variable switching behaviour of FCS-MPC. Although compared to multi-step prediction approaches, only a single-step multi-objective cost function to improve computation efﬁciency is utilized, the introduced control schemes are able to deliver higher power quality compared to its counterpart methods as well. Furthermore, the effect of different applied cost functions on the transient response of the system is studied and investigated for the future use of the VSC in microgrids (MGs). The effectiveness of the proposed scheme was assessed by simulation using MATLAB/SIMULINK and experiment using a 5.5 kVA VSC module and the results were in good agreement.


Introduction
The concept of microgrids (MGs) has received considerable attention owing to its potential to serve as an alternative power source utilizing unconventional sources interfaced by the power converters, or supplying power to the critical loads in the main grid in case of networks failure [1]. Furthermore, MGs are an agglomeration of distributed energy systems, working in low-voltage, and provide heat or power or combined heat and power (CHP) to a particular area. MGs provide a platform to maximize reliability, availability, efficiency, security, and economic performance and can operate independently to isolate themselves from the main grid in case of faults. Based on the power converters operation, which are vital parts of MGs, they are classified into grid-following, grid-forming, and grid-supporting power converters [2,3]. The concept of a grid-forming power converter, as the main focus of this paper, is fundamental to the operation of a low-inertia power system dominated by non-rotational generation [4]. In such scenarios, grid-forming converters provide the frequency and voltage references for regulation purposes. Hence, they form the references for the other distributed generations (DGs) [5]. Moreover, grid-forming converters can be used in different cases such as parallel operation, grid-connected, and islanded modes, where grid-forming converters are supplied by stable power sources such as batteries, fuel cell modules, and turbines, as shown in Figure 1 [6]. Bearing in mind that connecting a large number of DGs to the grid will result in some difficulties in controlling the MGs system and therefore may cause severe problems in power quality, stability, reliability, and also security [7][8][9]. The negative impact generated by the agglomeration of the DGs in the MG entity can be resolved throughout applying some aspects such as optimized cooperation, advanced control strategies, and proper coordination [10]. In fact, providing a high power quality by using the grid forming converters is a very challenging process. Therefore, advanced control techniques have to be adopted in order to diminish the adverse effects caused by poor quality originators. The conventional way of realizing voltage source converter (VSC) control structure in the MGs is through hierarchical and organized linear control loops utilizing a pulse width modulator (PWM). Cascaded linear structure inherently introduces a low-pass filtering behaviour of the overall control system where the dominant time constant tends to rise by an order of magnitude with every loop. Moreover, as the converters usually have an LC filter installed at the output, there exists a dynamic coupling between the inductor current and capacitor voltage, which is cumbersome when cancelling it out due to the presence of computational and PWM delays. In this paper, finite control set model predictive control (FCS-MPC) is used to control a stand-alone voltage source converter in order to form a voltage reference and regulate the frequency for the future use in MGs as a grid-forming type. FCS-MPC has been discussed intensively in [11][12][13][14][15][16] for grid-connected applications and [17][18][19] provide detailed discussions on the performance of different FCS-MPC algorithms. To sum up the detailed discussion in the references mentioned above, FCS-MPC enabled simplicity and ease of including the constraints and non-linearities, and it has been proposed to be applied in many applications such as electrical drives and grid-connected power electronic systems [20,21]. Mainly, these promising results were achieved because of the general concept of FCS-MPC, which is based on the principle of using a discrete model of the power converter with an associated filter to predict its future behaviour for all possible control inputs and, consequently, apply the one that minimizes a programmed cost function (CF) at every sampling time [17] (see Figure 2). The key idea is to use the raw processing power to embed all the inner control loops within a single algorithm that takes into account the model of the converter and its associated filter. This structure provides flexibility and inherent fast response and it has been addressed in [22,23] with a focus on balancing the power in between two parallel converters. Usually, CFs based on one step prediction/short-horizon become problematic when controlling higher-order plants (as in the case of a LC filter) due to the couplings between different state variables [24]. This problem has been solved in this paper by giving respect for all orders in order to decouple each variable and control it separately without a need for more computations compared to the computational burden in the long-horizon method [25,26]. That was done by proposing a solution, which explicitly deals with the dynamic coupling between the inductor current and capacitor voltage, allowing the usage of and one step prediction/horizon for effective voltage control of the converter associated with the LC filter. Besides, the conventional FCS-MPC has a problem of variable switching frequency [27], and this has led to some difficulties in the LC filter design resulting in low converter performance due to the use of an inappropriate filter. Thereby, high power losses are introduced by including an oversized filter [28]. Therefore, many research studies have been devoted to finding a feasible solution to obtain a fixed switching operation and facilitate the filter selection process [29,30]. The paper is structured as follows: the converter model and the proposed controller are described in Section 2. In Section 3, frequency control approaches are explained in detail. In Section 4, the obtained results and remarks to them are given. Finally, the summary of the work is described in Section 5. Novelty and contributions of this research are briefly summarized as follows: 1.
Propose a new term in the CF, resulting in less computation and higher power quality compared to the traditional schemes.

2.
Address the suitability of different frequency control strategies such as Simple Penalization (SP), Notch filter (N), and Periodic control (P) combined with the new improved algorithm (IMPC).

3.
Discusses the suitable size of LC filter that can be associated with the converter when the above-mentioned frequency control strategies are used with IMPC and CMPC algorithms.

4.
Address the proper selection of sampling time for all conventional (CMPC) and improved (IMPC) algorithms.

5.
Shed light on many aspects such as spectrum analysis, steady-state operation, transient operation, power quality and factors tuning for eight different predictive schemes such as CMPC, IMPC, SP-CMPC, SP-IMPC, N-CMPC, N-IMPC, P-CMPC, and P-IMPC.  Figure 2 shows the circuit schematic of a two-level three-phase VSC. The power switches in each leg operate in a complementary mode. The switching states can be represented by the switching signals S ka , S kb , and S kc , which are defined as follows: The filter inductance equation can be expressed in the vectorial form as:

Converter Model
where L f is the filter inductance (L a , L b , L c ). The equation that describes the dynamic behaviour of the output voltage can be expressed mathematically as: where C f is the filter capacitance (C a , C b , C c ). These equations can be rewritten in the state space model as: where, where i L f and V c f are the filter current and voltage respectively. i o is the load current, which can be estimated or measured. In this paper, i o , i L f , and V c f are measured and transformed to the alfa-beta reference frame within the state space model. V i is the inverter voltage of the system, and it has eight different voltage vectors, as shown in Figure 3. More details for the state-space model derivation and discretization method are presented in [31]. A discrete model is obtained from (6), and it can be expressed as follows: where, where T s is the sampling time. This model is used to predict the filter voltages and currents for every possible input voltage. The selection of the optimal input voltage depends on the CF. In the next subsections, the conventional FCS-MPC algorithm and the proposed one will be discussed. S 0 (0,0,0)  Figure 2 shows a block diagram of a three-phase VSC based on a FCS-MPC algorithm. In its basic form, the algorithm is executed sequentially, and at the beginning of each sample, it applies the switching configuration, which is calculated in the previous calculation step. Then, it receives the measurements and selects the new switching configurations accordingly and apply them at the next instant. The following CF is implemented in a stationary reference frame (α − β):

Conventional FCS-MPC Scheme for Voltage Regulation
where g is the CF, V * re f α and V * re f β are the real and imaginary components of voltage reference signals in the stationary reference frame, while V p c f α (k + 1) and V p c f β (k + 1) are the predicted components for each possible switch configuration. The conventional CF, as in Equation (15), uses a regulation strategy, which results in a minimal magnitude error at the next sampling instance. In first order plants, the variable of interest is directly regulated by the control input, allowing an instantaneous change of its derivative at a particular sampling instance. Hence, looking further than one prediction step ahead is optimal only for the first order plants [25]. For second order plants, capacitor voltage in the LC filter configuration is regulated indirectly through the inductor current. As the respective current cannot change its value instantaneously, the capacitor cannot change its derivative instantaneously. Therefore, no respect is given to the capacitor voltage derivative, which determines the heading of its trajectory. There are two possibilities to improve the power quality of the discussed configuration. Firstly, by applying a two-step or three-step prediction strategy, but using this approach makes the computations too intensive for practical applications. The other possibility evaluates for one prediction step by assuming that the same configuration will be kept for the next two periods (k + 2) in advance. This approach requires a highly accurate model of the system and it does not consider the capacitor voltage trajectory during inter-sampling periods [18,19].

Proposed FCS-MPC Scheme
Using the voltage reference track as the only objective in the grid-forming converter is inadequate with a second order plant. Therefore, in order to improve the capacitor voltage quality, an improved CF is discussed here. As discussed in the previous subsection, the inability to control the derivative of capacitor voltage is a fundamental cause of high THDv. Therefore, the ideal regulator should track both the voltage reference and its derivative simultaneously, which can be included as two signals treated as two separate references as follows: where V * re f and ω re f are the amplitude and frequency of the reference signal, respectively. The voltage derivative reference is obtained as follows: Tracking of V * c f (t) is already accomplished by the presented CF in Equation (15). Therefore, what remains is to design a CF, which ensures that dt . In order to ensure that the voltage derivative tracks the reference, the predicted value is needed and can be taken from the predicted currents, which are calculated directly from the discrete model of the converter: It can be seen that the voltage derivative trajectory will be well tracked if the respective differences between the first and second term from Equations (17) and (18) are minimized. These equations are explicitly formulated as the following CF: The term g I can now be added to the conventional CF in Equation (20), and the weight λ d controls its effect: As introduced in this paper, another contribution is to find out the suitability of the frequency control techniques with both conventional and improved CFs. Therefore, in the next section, three different frequency control techniques such as, simple penalization (SP) control, Notch (N) control and Periodic (P) control will be discussed and redesigned in order to be incorporated with the improved and conventional CFs as well.

Frequency Control
The FCS-MPC algorithm decides the optimal states to minimize the voltage error, that is given in every sample, but it leads to random commutations, resulting in no control over the switching frequency for any time span. This may lead to introduce some losses, electromagnetic interference, resonances, and unbalanced stresses on the switches. In order to control the switching frequency through a single CF using the FCS-MPC, the algorithm should comply with some requirements such as reference tracking, computation time, simplicity, and flexibility. In the same time, all objectives should be regulated without hindering each other. In the case of initiating frequency control, it is important to have controllable objectives, which could be equal or unequal, in term of importance, to the proposed derivative term in order to achieve good power quality. That can be done by designing the weighting factors of each objective in the whole CF. Thus, in the discussed FCS-MPC strategy here, the CF should regulate the switching frequency, not at the expense of the other objectives or at least with a minimum impact. Thereby, if a control objective overwhelms the others, the controller will only care about minimizing the considered objective, fading the other objectives or making them less important. In this context, a detailed explanation for the improved CFs using different frequency control techniques of simple penalization (SP), Notch (N) and Periodic (P) will be given in the next subsections.
In this paper, the improvement is based on tracking the capacitor current, and including it in the main CF as a secondary objective in order to control its importance by a factor λ d . Accordingly, the predictive schemes in Equations (27)-(29), should guarantee the optimum operation without introducing any conflicts between the other objectives which is leading to a degradation in the controller performance. The controllers damping ability, derivative term, has been tested at 2 kHz, which is the concentrated switching frequency, and that is relatively higher than the resonance frequency. The idea is to test all kind of studied CFs at the same conditions. Furthermore, the physical filter values LC, as introduced in Table 1, were available in the laboratory for experimental validations. Table 1. Filter design parameters for the simulation and experimental setup.

Simple Penalization
A basic strategy to regulate the switching frequency is to penalize the act of commutation, which can be controlled by the λ sw and yield to : When adding Equation (21), which illustrates the simple penalization frequency control technique (SP) to the conventional or improved CFs, the switching frequency is controlled. In case the voltage or its derivative has a large error, its corresponding value in the cost function would be large enough to overcome the penalization during the switching. Thus, strong importance should be given to the penalization term by setting the value of λ sw high, then the commutation of the last step will be maintained to provide switching's reduction. Figure 4 shows the relative importance of the penalization term with the voltage tracking term. This strategy leads to a lower average frequency and higher voltage error, as shown in Figure 5. Considering that the spectrum will still spread in a wide band range and concentrated more to the lower frequencies. Later on, in the results and discussion section, the weighting factor design for both SP-CMPC and SP-IMPC will be discussed.

Notch Filter
The aforementioned strategy focuses on the reduction of the switching while this strategy aims to concentrate the voltage spectrum around the desired frequency by utilizing a digital notch filter. Generally, notch filters are shaping the spectrum at certain frequencies, where they need different weight values, to allow control of harmonics. The notch filter is designed for the IMPC scheme in order to control the switching frequency of the grid-forming converter. The implementation of the notch filter is done using the discrete-time domain. Therefore, the CF can be modified as: where λ n is the weighting factor and F n is the second-order band-stop filter. A Tustin discretization of the notch filter is considered in the filter design. Similarly, the derivative term g I in Equation (19) can be modified as: The implemented notch filter in this paper, which has a frequency concentration at 2 kHz is illustrated in Equation (24): Notably, changing the filter bandwidth gives a different spreading range around the desired frequency. Similarly to the SP controller, the weighting factor design for both N-CMPC and N-IMPC will be discussed in the results and discussion section.

Periodic Control
The periodic control strategy focuses on fixing the time it takes for two consecutive similar commutations [32]. It means that any two ups or downs, same direction, form a similar commutation. The objective is to control the T up and T down . The key idea is to achieve a modulation behaviour similar to the PWM pattern.
In periodic control, the switching frequency is compared with a reference time T r , which is used for both up and down events in order to achieve the desired performance by applying the states, which are minimizing the error. The cost function, which is given in Equation (25) shows how the up and down events can be evaluated in order to regulate the switching frequency as follows: where it can be rewritten as the following in the discrete form: The algorithm predicts the state of K up = T up T s and K down = T down T s for all possible states, which are eight states in the case of the VSC. It is worth to mention that K r = f s f r is the reference frequency that is given to the MPC controller to reshape the spectrum around the frequency of interest and its multiples. The factor λ p is used to mitigate the deviation as long as the stability of the overall system is preserved. The complete CFs of the conventional (P-CMPC) and improved (P-IMPC) periodic schemes are calculated in Equation (29).

Results and Discussion
All discussed predictive control algorithms were implemented using the dSpace with DS 1007 power dual-core 2 GHz processor board. A flow chart showing the implementation steps of all algorithms can be found in Figure 6. The maximum achieved turn around time was around 22 µs. It should be noted that 9 µs was introduced by the auxiliary tasks (A/D conversion). In order to reduce the time taken by the A/D, an observer could be used to estimate the load current instead of measuring it. Since the dSpace A/D samples at a rate of 1 MS/s, that will save 3 µs from the total needed time. Moreover, the computational delay of exact Ts is compensated as discussed in [33]. The overall parameter of the test setup and simulation model can be seen in Table 1, and the setup is shown in Figure 7. Due to the setup limitation, both the simulation model and the setup have been operating at a 40 kHz sampling frequency. In order to illustrate the effect of different samplings, simulation results, in which the sampling is 80 kHz, are provided. FCS-MPCs based on the periodic, notch, penalization control algorithms have been verified experimentally, where a 5.5 kW rated power system has been built for that purpose. The power stage comprises a delta-star transformer to provide the DC-link voltage through an input filter to a rectifier. A two-level three-phase VSC (Danfoss type), the LC filter on the converter side, is loaded with a linear load. It should be noted that the Danfoss VSC contains electrolytic DC-link capacitor. In this work, the LC filter design was based on choosing low resonance frequency, as shown in Figure 8, to verify and make the FCS-MPC algorithms feasible for the study. As future work, each algorithm should have its optimized filter design, which will be briefly summarized later in the end of this paper.  Figure 6. Flowchart of the implemented algorithms using dSpace. Resonance has a peak of 27 dB

Spectrum Analysis
The spectrum analysis is shown in this work in order to validate the functionality of the proposed FCS-MPC algorithms, where several points have been observed during the tests as follows: In Figure 9, the switching frequency fixed behaviour is obtained successfully by the periodic control technique. In case of having no control over the switching frequency, both conventional and improved FCS-MPC have high switching fluctuations. Thus, the output voltage and current harmonics are spread to a wide range of frequencies, as shown in Figure 10. Figure 11 shows the output current spectrum on phase (a) following a reference frequency of 2 kHz using P-CMPC strategy. Here, it can be seen clearly that the output spectrum presents a similar behaviour as the one achieved with using a modulator. In Figure 12, P-IMPC has a magnitude's reduction in the output spectrum, which is resulting in a higher power quality than the P-CMPC as it is shown in the time between 0.26 s and 0.36 s. A series of tests were performed on all algorithms to compare the spectrum performance of each method using the experimental setup. That can be verified in Figures 13 and 14. It can be concluded from the figures that N-IMPC and N-CMPC have higher spectrum magnitude than the P-CMPC and P-IMPC. It can be seen also that it is difficult to keep the spectrum magnitude at the desired frequency in case of using SP-IMPC. Bearing in mind that the SP-CMPC can not be operating at exactly 2 kHz. All these findings make P-IMPC the best algorithm, among the discussed ones in this paper, in terms of fixed switching frequency while providing high power quality. In addition, it is easy to obtain the reference switching frequency and follow it accurately. Table 2 summarizes the THDv for each method utilizing the same LC filter design. It can be concluded that periodic control has a better THDv in both the conventional and improved FCS-MPC. Figure 15 shows the measured switching frequency in cases where using the P-CMPC and P-IMPC as discussed in Equation (29). It depicts that in P-IMPC, the deviation from the reference is a little higher compared to the conventional P-CMPC, and the reason is that the weighting factors for both tests, in this case, were kept constant. That was to illustrate the effect of using the same weighting factors for both algorithms. Figure 16a,b show two important aspects. Firstly, they show how the periodic control strategy follows the different references resulting in a fixed switching frequency. Secondly, they show the effect of samplings, which indicates that P-CMPC and P-IMPC are using high sampling frequency to give better fixed switching frequency performance.

Dynamic Response
All FCS-MPC algorithms were discussed in this work have been tested in order to observe the dynamic operation in case of load changes. A power change of more than 30% of the total power has occurred suddenly in order to test all controllers. As shown in Figure 17, it can be seen that αβ currents using SP-IMPC, N-IMPC, and P-IMPC still responded to the instant load changes exactly the same as the IMPC. One reason behind this is the accurate design of each CF, which guarantees no conflicts between the several objectives in one CF. Furthermore, Figures 18 and 19 show the power deviation of conventional and improved CFs with/without including the frequency control terms. Due to the ability of the IMPC to better regulate the voltage and current quantities, the power deviation in case of using frequency control terms with IMPC shows promising results.
Finally, it has to be noticed that a proper low-pass filter and correct weight factors design are crucial to preserve the dynamic properties of the proposed algorithms and obtain the best possible power quality.

Sampling Effect
As the sampling time (T s ) decreases, the rejection of disturbances usually improves. However, when (T s ) becomes too small, the computational effort increases dramatically. Therefore, the optimal choice is a balance of computational burden and power quality. Figure 20a,b show two points; initially, they confirm that the frequency control algorithms are significantly influenced by sampling time values. Secondly, they show how samplings affect the dynamic changes when a load step is applied. The presented results show the behaviour of the predictive control implemented using periodic control for the grid forming application. It can be seen that the deviation in the case of 40 kHz sampling is high and varies between 4 kHz and 4.5 kHz, while in the 80 kHz the variance is between 4 kHz and 4.15 kHz.

Steady-State Operation
For the steady-state performance evaluation, all FCS-MPC algorithms were discussed in this work have been observed during the steady-state operation. Apparently and during the tests stage, all algorithms showed very good performance in terms of controller stability. However, N-CMPC requires more computation time, which introduces some difficulties in the implementation. On the other hand, the power qualites of N-IMPC, SP-IMPC, and P-IMPC have a significant improvement compared to N-CMPC, SP-CMPC, and P-CMPC. The P-IMPC has around 5% reduction in the active power fluctuation comparing to the P-CMPC, which is a significant outcome compared to the N-IMPC and SP-IMPC. Bearing in mind that the steady-state performance of all algorithms can be observed also in Figures 11, 12, 17 and 20.

Factor weights
Three optimization criteria have been employed in this paper in order to choose the best factor values and maintain system stability. Mainly, the tuning process was based on the relative importance between the objectives and in this work, the tuning processes of P-CMPC and P-IMPC schemes are shown as an example. Normally, there are no specific guidelines to determine the exact tuning factors of any multi-objective function. In this paper, the relative importance between objectives was determined by defining the priority of each objective. As shown in Figure 21, different tuning of P-IMPC gives somehow a reduced switching frequency until the fixed switching behaviour is reached at 0.8 s and at 1 s for P-CMPC. The importance which is given to the periodic objective determines how the output performance is, in terms of the fixed switching frequency. It worth to mention that power quality is greatly maintained. Figure 22 demonstrates the performance of P-CMPC and P-IMPC during the selection of weighting factors for all three cases, which are defined in Table 2. It can be seen that both equal and higher importance criterion give very good results in terms of switching frequency and THDv for P-IMPC. In the end, Table 3 summarizes the characteristics of all eight algorithms to have an overview of their features. The Table includes THDv, stability assessment, implementation, computational burden, and switching behaviour. . Weighting factors drifting based on the relative importance: average switching frequency and THDv of the V α for the three criteria; (black line) the derivative term is higher importance than the periodic term; (red line) the derivative term is lower importance than the periodic term; and (grey line) the derivative term is equal importance to the periodic term. (a) Average switching frequency for the three criteria; and (b) THDv of V α for the three criteria.

Conclusions
In this work, a proposal of an improved FCS-MPC is presented, and the suitability of three different frequency control approaches has been investigated. The frequency control algorithms with the improved scheme introduced new FCS-MPC regulators for grid forming converters. The primary objective of the CF is to predict the voltage, while the secondary objective is to improve the power quality for enhancement purposes. In order to have similar characteristics as the conventional linear controllers, FCS-MPC should control the switching frequency and reshape the spectrum at desired values. One advantage is to reduce the losses by reducing the average switching frequency, where the new CFs do not introduce a high computational burden. Another advantage is to control system, which uses only one-step prediction. In this respect, the steady-state performance of the system becomes comparable with some recent proposed FCS-MPCs, which achieve good power quality using longer horizon or multi-step prediction. Besides, this work has shown that the frequency can be concentrated, while the feature of the fast dynamic response is retained. Some challenges have been solved during this work-study, and there were as follows: Weight factors tuning, which affects the performance of the power converter. This challenge solved by defining the importance of each objective in multi-objective CF. Another challenge was to include the most suitable frequency control objectives without using a modulator and send the optimized actuation based on the error evaluated by the CF. This challenge has been solved by investigating the performance of each frequency control scheme combined with the improved FCS-MPC. High-frequency sampling, which is solved by concentrating the switching frequency at a relatively lower frequency. That allowed the standard setups to handling this kind of controllers.
In the end, this work showed that the proposed derivative, FCS-MPC based scheme could improve any approach introduced so far for controlling the switching frequency. Periodic control achieved promising results in terms of power quality and fixed switching behaviour. Moreover, periodic control has a simple and easy implementation for further consideration in the grid-forming applications. The proposed cost function is applicable for complicated systems such as the matrix or neutral point clamped converters. The idea behind using VSC is to simply illustrate the new schemes and verify the frequency control methods and providing some comparisons. As future work, researchers are seeking new techniques to eliminate the weighting factors or using intelligent technologies in order to calculate the weighting factors online resulting in much more flexibility. Funding: This research is supported by Arab Academy for Science, Technology and Maritime Transport and Department of Energy Technology at Aalborg University.

Conflicts of Interest:
The authors declare no conflict of interest.