A Predictive Control Scheme for a Single-Phase Grid-Supporting Quasi-Z-Source Inverter and Its Integration With a Frequency Support Strategy

Small grid-connected inverters are not friendly to the electrical grid, in the sense they do not take any action to support the grid when contingency events occur. For example, because of their relatively low power capacity, small grid-connected inverters are not designed to provide dynamic frequency support to the grid. On the other hand, it is well known that microgrids and weak grids including distributed generation would benefit significantly if all of the grid-connected converters could support and help against grid frequency disturbances. Within the family of small grid-connected converters, single-phase quasi-Z-source inverters (QZSI) have become an attractive topology, because they represent a reliable and economical alternative, and can be very efficient in applications that demand small or medium powers. However, a major disadvantage is that the control strategy must manage both direct current and alternating current variables through the same group of switches. The latter is a challenging task when implementing predictive control schemes. This paper proposes a finite control set model predictive control (FCS-MPC) strategy for a single-phase grid-supporting QZSI. The proposed predictive scheme can be easily integrated with a complementary control block to provide grid frequency support. Experimental results show evidence of the inverter operating under the proposed control strategy and providing grid frequency support, which demonstrates the feasibility of the proposal.


I. INTRODUCTION
Renewable energies are one of the most promising prospects in the quest to slow down climate change. Power electronics has been one of the enabling technologies to unlock the massification of renewables in electrical networks [1].
The associate editor coordinating the review of this manuscript and approving it for publication was Lei Chen .
The increasing penetration of photovoltaic (PV) energy and other renewable sources in the electrical networks has been driven mainly by governmental policies and by the sustained reduction in the production costs of PV and wind related technologies. Here, power inverters play a significant role, since almost all renewable sources require inverters to share their energy with the power grid. However, one of the most significant drawbacks of using inverters as grid-interface of VOLUME 11, 2023 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ renewable sources is that they act as non-rotating generation, reducing the total inertia of the grid as their penetration increases. This fact becomes more evident in the context of microgrids and small isolated networks [2], [3]. The inertia and damping capacity of the power grid relies on the masses' rotational motion in synchronous generators involved in the production of electricity. These parameters give better stability to electrical systems since they ensure stored energy in the generators' masses, which is available to help compensate for possible instantaneous power differences between supply and demand. If an imbalance between the demand and supply of energy in an electric system emerges, the more significant the inertia and damping, the greater the system's capacity to respond and compensate the lack or excess of energy at the time of imbalance [3], [4]. A stiff alternating current (ac) grid, with high inertia and damping capacity presents zero or almost zero frequency excursions due to energy supply and demand imbalances. In contrast, a weak ac grid with low inertia and low damping capacity shows significant frequency excursions in the face of these imbalances, which may lead to instability in the system. How to deal with this problem and how grid-connected inverters could improve low inertia in weak grids and microgrids is a topic of current research [5].
Most domestic grid-connected inverters are not friendly to weak ac grids; they do not help or support the electrical system in case of contingencies. Worse yet, some photovoltaic (PV) inverters respond in the opposite way to how a synchronous generator would when a sudden contingency emerges [6]. It is to be expected that if hundreds or thousands of grid-connected inverters are involved they could significantly affect weak grids' stability, particularly if these correspond to isolated microgrids [7]. It is noteworthy that as inverters become an even more massive technology, they are influencing an increasing penetration of renewables, each one continuously seeking the maximum power point tracking (MPPT) for delivery to the system. Thus, as the proportion of sources that provide inertia and damping in distribution systems decreases, renewables and inverters operating at MPPT could have an even greater impact on a frequency event [8]. With both the present and the future-when power generation could have an even higher proportion of renewable sources connected through inverters-in mind, it has been proposed that power converters could emulate the behavior of synchronous generators, thus providing frequency support [3], [5], [9], [10].
For the grid-connected inverters to provide frequency support in the most complete possible way and respond against contingencies, it is necessary to count on energy storage systems (ESS) and bi-directional power capability of the aforementioned converters. Thus, the inverters can use available energy (from the ESS) to respond to frequency drops, or absorb energy (from the grid to the ESS) if the grid frequency exceeds its nominal value. However, commercially available, unidirectional grid-connected inverters, which only deliver energy to the grid, are cheaper and more common. These converters could also work with ESS to store the surplus energy obtained from the inverter's DC side sources. Furthermore, they can work without ESS, taking power directly from the renewable sources to inject into the grid, generally using algorithms to maintain MPPT operation [11], [12], [13]. Nevertheless, these converters are not as advantageous as bi-directional ones. For instance, if the system does not use an ESS and is not receiving its power reference from a microgrid operator, renewable energy sources that depend on the environmental conditions can inject a higher power into the grid than necessary, which can become critical, especially in isolated microgrids. Likewise, renewable sources may not provide enough power when the microgrids or distribution networks need it. In such cases, these renewable sources behave as sources that can supply the networks, but also disturb them, causing imbalances between the generated and consumed power. To achieve frequency support, even partially, using renewable sources with their associated converters and maintaining an MPPT operation, ESS is necessary.
In general, most domestic inverters operate unidirectionally in power. If these converters could count on ESS, they could provide frequency support to the grid and continue to work in MPPT. Single-phase grid-connected inverter topologies work jointly with dc-dc converters for adjusting dc voltage levels before injecting power into the ac electrical grids. The best example of the above are the domestic market focused PV inverters for PV systems on roofs [13], [14], [15], [16]. They do not absorb energy from the ac grids, only delivering power to it. At the same time, new unidirectional power inverter topologies with desirable properties have been proposed in recent years. Among them, the quasi-impedance source inverter (QZSI) stands out [17]. QZSIs utilize a single circuit (or stage) to increase the dc voltage and convert it to ac, in contrast to current source inverters (CSI) or voltage source inverters (VSI) which usually require dc-dc circuits before the inverter to reduce or increase dc voltages, involving two conversion stages. The QZSI has improved several aspects of the original proposal, the ZSI, particularly the stress in the semiconductors and the smoothness of the current drawn from the dc source [17]. Regarding their control, many of the approaches used for the ZSI can be used in their QZSI variants since the operating modes are equivalent [17], [18]. Finite control set model predictive control (FCS-MPC) is a strategy that has become popular in power converter control in the last two decades [19]. The use of predictive control to regulate the QZSI has been proposed by several works, resulting in different variants [20], [21], [22], [23], [24], [25]. In some of these works, it has been mentioned that for controlling the QZSI using FCS-MPC, it is necessary to implement the predictive strategy using an extended horizon greater than one-step ahead. This requirement prevents the strategy prediction from becoming divergent at the moment of a reference change due to the non-minimum phase behavior of the Quasi-Z-Source-Network of this inverter [20], [21], [22], [23], [24]. It can be noted that in recent years the research on single-phase impedance source inverters has focused mainly on regulating the current and voltage variables of the topology, and reducing the second harmonic on the dc side together with its effects on the inverter variables [26], [27], [28]. Even though several recent works seek to reduce the size of the capacitances in the quasi-Z network, the use of higher capacitance values allows not only to reduce the dc-link harmonics but also to contain a greater amount of energy, which can be available for use in the dynamic frequency support [29], [30].
In light of the recent advances and challenges of grid-connected power converters for renewable integration, the main contribution of this paper is to formalize the procedures for implementing a single-phase QZSI controlled by an FCS-MPC scheme in conjunction with a strategy that correctly provides frequency support. This means providing a detailed implementation of a FCS-MPC based controller that enables a grid-supporting inverter characteristic to the QZSI, taking into account the non-regenerative characteristic of this inverter. The present work demonstrates that a single-phase grid-connected QZSI can achieve a friendly integration to the grid regardless of whether the proposed inverter is unidirectional in power. The rest of the document is organized as follows: Section II explains a detailed modeling of the single-phase grid-connected QZSI topology; Section III shows the design of the predictive FCS-MPC control strategy; Section IV introduces the frequency support strategy; Section V shows the experimental results of the control strategy under frequency disturbances; and finally, Section VI summarizes the major conclusions of this work.

II. SINGLE-PHASE GRID-CONNECTED QUASI-Z-SOURCE INVERTER A. THE QUASI-Z-SOURCE INVERTER TOPOLOGY
A single-phase grid-connected QZSI, as is shown in Fig.1a, is composed of a quasi-Z-source network (QZSN) that takes energy from a dc source-with voltage V DC -and an H-bridge connected to the QZSN, required to convert dc voltage to ac and be able to share power to the grid. The QZSN has two capacitors (C 1 and C 2 ), two inductors (L 1 and L 2 ) and a diode D Z . This diode causes a nonlinear behavior that depends mainly on the V PN voltage. Through the switching of the H-bridge semiconductors, it is possible to change the V PN voltage and in this way facilitate the charge and/or discharge of the passive components of the QZSN. If V PN is zero due to a shoot-through (ST ) on the H-bridge, the diode D Z stops conducting; in such condition, the converter is said to be in an ST state (see Fig.1b). In contrast to an ST state, the inverter can be in a non-shoot-through (NST ) state, in either active or null condition. It is in active condition (see Fig.1c) when the V PN voltage is shared by the dc and ac circuits of the inverter, whereas it is in null condition if the output voltage (v o ) is zero (where I PN is also zero -see Fig.1d). In NST the diode D Z conducts, resulting in a voltage V PN equal to the sum of the capacitors' voltages of the QZSN. Thus, the values of V PN depend on the state in which the inverter is; that is to say, where,V  Taking into account all valid switching states in the singlephase QZSI, its operation can be summarized in Table 1. As shown in the Table, from all possible switching states, only one corresponds to an actuated ST state, and only the most efficient ST state is considered, as stated in [31] and [32] -. It is known that a controlled alternation between the ST and NST states can maintain a constant voltage across capacitors C 1 and C 2 . When considering the ac side (right side of the H-bridge), three voltage values v o are possible at the inverter's output (V PN , −V PN , and 0). To model the ac side, it is possible to consider a given switching function S f , as depicted in Table 1. The way to obtain this switching function is as proposed in [33].
This system's challenge is to control the power both on the dc side and on the inverter's ac side, ensuring an amount of energy available on the dc-link to use in any contingency. A FCS-MPC scheme will be proposed to achieve these control objectives, while simultaneously allowing the use of a complementary scheme to provide dynamic frequency support in electrical networks. For controlling the singlephase grid-connected QZSI through the use of FCS-MPC it is required to know the system's model, which is discussed below.

B. MODELING OF THE SINGLE-PHASE GRID-CONNECTED QZSI
Consider Fig.1a. If the inverter's circuit on the ac side and its variables are considered, the behavior of the inverter's output current can be described as follows, where i g is the inverter's output current injected into the grid, v o is the inverter's output voltage, V grid is the grid voltage, and L f and r L are parameters of the line used to connect the inverter to the grid. Taking into account that the QZSN output voltage V PN is reflected in the inverter output depending on the switching function S f , it is possible to write (3) as follows: In this way, the dc side (through V PN ) is linked to the equation's ac side.
The capacitances' voltages on the dc side of this converter can be increased or reduced by alternating ST and NST states at the output of the QZSN. The ST state is performed by closing all switches of the H-bridge, meanwhile a NST state corresponds to any state different to ST (see Table 1). A graphical representation of the dc side for each state, ST and NST (including active and null conditions) can be seen in Fig.1b, Fig.1c and Fig.1d.
By proposing a binary variable S ST to represent the two possible states at the dc side, defined as a dynamic model of the dc side that depends on variable S ST can be written as, where v C1 is the voltage at the capacitor C 1 , v C2 is the voltage at the capacitor C 2 , i L1 is the current in the inductor L 1 and I PN is the current at the output of the QZSN. On the other hand, a valid steady-state relation, which can be helpful for a possible estimation of variables on the dc side as proposed in [34], can be written as This relation could allow minimizing the number of sensors required to control the system, as replacing (7) in (2) giveŝ In addition, another useful relation that would allow to indirectly find the I PN current for control purposes, can be obtained through Kirchhoff's Current Law at node m,

C. INTERFACING THE RENEWABLE SOURCE TO THE AC GRID
Grid-connected inverters can be integrated into the electricity system in different ways or with different architectures [35].
In the In-line architecture, renewable sources feed a dc bus containing ESSs; meanwhile, the grid-connected inverters take energy from the dc bus, injecting it into the network. This In-line architecture is one of the possible alternatives that can use batteries in residential energy systems [36]. In this context, it is possible to use a single-phase QZSI, as shown in Fig.2. In the system shown, it is necessary, on one hand, to manage the energy seeking to obtain the maximum power from renewable sources, but on the other hand, to maintain surplus energy so that it can be injected into the grid at some convenient moment [37], [38]. For the management of this energy, both the MPPT algorithms and the state of charge (SoC) of the batteries are decisive [39]. Therefore, as shown in Fig.2, when considering a grid-supporting inverter operating mode, it is helpful to the integration of secondary control schemes that the primary control strategy receives the active power, calculated by the energy management algorithms, directly as a reference (P Ref ). In the following section, an FCS-MPC strategy will be designed, using the inverter of Fig.2 arranged as an in-line architecture, and the model of the system previously obtained.

III. PROPOSED FCS-MPC STRATEGY FOR THE SINGLE-PHASE GRID-CONNECTED QZSI A. REFERENCES FOR THE REGULATION OF AC AND DC CURRENTS OF THE QZSI
To properly control the QZSI, the proposed strategy must make the ac power supplied by the converter to the grid match the dc power required from the dc-link. The control scheme can use the active power reference to find the set-points of the currents on both sides of the converter -ensuring that the ac and dc powers coincide. Then, to achieve the power reference P Ref on the dc side, and to find the reference i L1ref , the value of P Ref must be divided by the voltage value of the battery. In this way, the control scheme can obtain the reference for current i L1 , that is: On the ac side, if the converter operates as a grid-supporting inverter, it can inject only its active power, keeping its reactive power at zero if it is only limited to provide frequency support [40]. To accomplish this, the current i g must be in phase with the voltage V grid . On the other hand, for the strategy to be successful, the magnitude of i g must make it possible to impose the desired power P ref . The set-point signal i gRef that meets the requirements can be written as: whereV grid is the amplitude of the ac voltage at the point of common coupling (PCC) to which the inverter is connected. BothV grid and the signal sin(ωt) can be obtained employing an enhanced phase-locked loop (EPLL) algorithm or a sinusoid-locked loop (SLL) algorithm [41], [42]. In this way, by knowing the voltage V DC andV grid , in addition to the reference power, it is possible to find the references for the currents on both sides of the inverter.
Other variables in the QZSI that must be managed in a regulated way are the voltages v C1 and v C2 . However, since both variables are linked through (7), it would be enough to only regulate the voltage v C1 to regulate the voltage v C2 as well.

B. VOLTAGE REGULATION ON DC CAPACITANCES
Since the voltages v C1 and v C2 are linked, and due to the model, there is a relationship between the main voltage V DC , voltage v C1 and voltageV PN (through the equation (8)). To ensure a more uniform pattern at the inverter's output voltage in the face of possible changes in the magnitude of the voltage V grid , it is convenient to consider a proportional relationship between the voltageV PN and the amplitude of ac voltage V grid . The expression that relates both voltages can be set through a constant K s , such that: Here,V grid is the amplitude of the voltage V grid . For a given power, the higher K s is, the greater will beV PN ; thus, using a traditional FCS-MPC controller, the control scheme will force the inverter to switch to a higher rate to accomplish the equation (12). On the contrary, the lower the tuned value for K s , the more reduced the switching rate proposed by the controller will be. VOLUME 11, 2023 To fulfill the relation (12), considering the equation (8), an expression can be found for proposing a reference v C1 ref in order to control voltage v C1 , as a function of the voltageŝ V grid and V DC ; the resulting expression can be written as, The value of K s can be adjusted according to the nominal power and voltage of the converter. For the proposed system, a suitable value of K s is found based on the following expression, where P nom is the nominal power of the inverter, ω is the nominal frequency of the system and where ρ is a ratio between the ac and dc voltage of the inverter. The value of ρ is less than one -and greater than 0-; however, a useful guideline is to be in the range 0.5 ≤ ρ ≤ 0.9.
To carry out the proposal, one should be aware that the impedance source inverter's family has a non-minimum phase system characteristic in their dc-link [23], [43]. To always ensure good behavior in a non-minimum phase system controlled with a predictive scheme, the strategy must count with an extended prediction horizon [21], [23]. Taking the above into account, the control proposal for the single-phase gridconnected QZSI in Fig. 3 is explained below.

C. EXTENDED HORIZON FCS-MPC FOR SINGLE-PHASE GRID-CONNECTED qZSI
Several predictive control schemes have been proposed and implemented to manage ac and dc variables in the QZSIs. Practically all the authors agree that to ensure the stability of the predictive strategy, in the face of sudden actions that the control references must perform, the predictive schemes must have an extended horizon higher than one prediction ahead [21], [22], [23], [24], [26]. Hence, it is essential to appropriately formulate a cost function given the extended horizon requirement. For the grid-connected QZSI, the cost function proposal is presented as follows.

1) COST FUNCTION FOR PREDICTIVE SCHEME IN THE SINGLE-PHASE QZSI
The control scheme must regulate three variables in the single-phase grid-connected QZSI: (a) the ac current i g shared with the grid, (b) the dc current i L1 delivered by the main dc source, and (c) the capacitor voltage v C1 . In this work both, the inductor current i L1 and the ac current i g shared with the grid obtain their references from the power set-point P Ref , considering equations (10) and (11). On the other hand, one can see that the voltage v C1 does not depend on the power in a direct way, like through some equation of the system; however, this voltage is partially tied to the current i L1 and has a certain degree of freedom, given that i L1 fans out into two currents before reaching the input of the H-bridge. Regulation of v C1 is key to the efficiency of the converter. For this predictive control scheme to track the voltage reference v C1 ref better, it must consider the relationship between the current i L1 and the derivative of the voltage dv C1 dt , visible in the equation (9). Then, taking into account the existing relationship and the internal model principle, it is possible to propose a proportionality law for the error between the capacitor voltage and its reference with regard to the inductor current L 1 , that is, To maintain the aforementioned proportionality by means of predictive control through its cost function, a term V P can be minimized to force the fulfillment of (14). The term V P to be minimized, in discretized form, can consider predictions for v C1 and i L1 with different prediction horizons h; thus, it can be expressed as, where h can correspond to h = K + 1, h = K + 2, etc. Based on this new expression and considering the minimization of the currents concerning their references (the other variables to regulate), the cost function for the extendedhorizon QZSI's predictive control can be written as follows: Taking into account the cost function (17), it is possible to establish the flowchart of the FCS-MPC scheme with prediction horizon h = K + 2, including the delay compensation, as shown in Fig. 4. The predictive scheme's weighting factors, both for ac and dc currents and for the voltage -λ i and λ v -can be tuned according to the methodology given in [44]. A traditional long-horizon FCS-MPC algorithm, such as the one described here, is enough to manage the grid-connected QZSI and supply the available power on the dc link to the ac system. However, to operate in a grid-friendly  way and provide frequency support in the system, it is necessary to consider an additional control block.

IV. GRID-FREQUENCY SUPPORT STRATEGY
Single-phase inverters and micro-inverters that operate in micro-grids, using strategies such as the one presented in Fig. 2, are traditionally not friendly with ac electrical systems and do not consider frequency support in case of contingencies [45], [46], [47], [48]. However, the advantages in a hypothetical ac grid where all the actors involved provide frequency support are recognized [49], [50]. In case of the inverter in this proposal, and since the control scheme presented here involves only an active power as a reference, a frequency support strategy can be integrated using a single complementary block.
It is possible to implement a frequency support strategy as a complementary scheme to the previous FCS-MPC scheme. The complementary control block (as seen in Fig. 5) will seek to modify the power reference depending on the frequency of the system in order to inject power into the grid in a more friendly way, especially for possible contingency events affecting grid frequency.
It should be noted that the inclusion of a frequency support strategy can be implemented in several ways in different types of converters [9], [51]. For this task, the proposal described herein includes a droop control as a frequency support scheme in the predictive control strategy. Implementation details to this complementary control block are provided below.

A. FREQUENCY SUPPORT BASED ON TRADITIONAL DROOP CONTROL
One of the simplest ways to incorporate a frequency support strategy into a system like the one shown in Fig. 2 is to set a droop control characteristic for power via a complementary block, as shown in Fig. 5. This droop characteristic can be included in the complementary block, which takes the value of the reference power proposed by the energy management block (P * p ) and adds a term that depends on the expected frequency regarding the nominal grid frequency, considering an inverse linear relationship, such as expressed in the following equation, Here, M p is the active power droop constant, which allows the power slope that characterizes the system's behavior against a change in frequency. This droop constant can be designed taking into account the expected power increase P, given a change in frequency f , thus: For implementing the droop control in the QZSI system, the complementary scheme must consider the power limits of the converter and the frequency limits in the system. Then, the droop feature given by (18) must operate within a specific frequency-power region, as shown in Fig. 6. As can be seen in Fig. 6, the maximum or minimum possible reference powers that come out from the complementary block to the predictive control block will initially depend on the proposed setpoint P * p by the energy management block, since the proposed base powers can be different depending on the operating conditions (for example P * p a , P * p b or P * p c as seen in Fig. 6). The reference power values delivered by the complementary block in the event of a contingency will depend on the base power of the system operating at a nominal frequency.
The expression (18) that enables the primary droop feature, operating in the complementary block of Fig. 5, would allow a contribution to the regulation of the frequency in steady-state or in the face of slow dynamics. This primary droop strategy does not allow adjusting the control response to sudden or swift dynamic changes in frequency; however, if a low-pass filter is used for the power reference, as proposed in [49], a derivative of the grid frequency appears and adds an inertial term in the droop equation. As a result, an enhanced droop feature is as follows: where τ f corresponds to the time constant of the low-pass filter, as considered in [9], [49], and [52]. The behavior proposed by using (20) would allow a dynamic contribution in the face of swift changes in the system's frequency, which is an improvement concerning the behavior of the original proposal that uses (18). In the context of the limits, it is necessary to consider that the QZSIs, like the proposed converter, cannot operate with bidirectional powers due to the diode in the dc-link. Therefore from the control point of view, it is not feasible to draw power from the ac mains to the dc battery because it involves negative currents (i L1 ).
In summary, the single-phase QZSI can use a traditional in-line architecture, as shown in Fig.2, operating with a control strategy like the one in Fig. 3, which is implemented with the extended-horizon predictive scheme as described in Fig. 4. The described operation corresponds to a traditional approach, which is not entirely grid-friendly. A second way of operating is to include an auxiliary block, as shown in Fig. 5. In this complementary block, it is possible to add a frequency support strategy such as droop control. This modification is done to make the converter more grid-friendly.
The traditional approach (Fig. 2) and the grid-friendly (Fig.5) operating modes achieve an entirely different behavior in the face of extreme grid-frequency contingency events in the network. In the following section, both types of operation are evaluated against these contingencies.

V. PERFORMANCE EVALUATION OF PROPOSED QZSI AGAINST FREQUENCY CONTINGENCY EVENTS A. KEY ASPECTS TO BE EVALUATED
Facing a frequency contingency, a traditional approach, as proposed in Fig. 2, maintains a power reference P Ref from the energy management algorithms (EMAs), whose proposed power will be independent of the frequency dynamics and voltage at the point of common coupling (PCC). If the EMAs give a constant power reference, the objective of the traditional strategy will be to achieve that smooth and continuous power value in the moment of the disturbance. A constant power at the time of contingency will be evident when observing the average value of the current i L1 since this current is proportional to the inverter's injected power. Whether the contingency of the system involves a decrease or an increase in frequency ( Fig. 7(a) or Fig. 7(c)) in the traditional approach, the references will likely remain constant, as seen in Fig. 7(b) and Fig. 7(d).
On the other hand, if a frequency support strategy is considered to make the inverter more grid-friendly (as in Fig. 5), for example by including a droop control strategy, then the injected power from the inverter into the grid will change depending on the grid's frequency deviation regarding its nominal value. Therefore, given that the average value of the dc current i L1 is proportional to the power of the inverter, it should be observed, in the face of a change in grid's frequency, that the average value of i L1 will be inversely modified in relation to frequency. For trying to outface a contingency that causes the system frequency to drop (Fig. 7 (a)), the control scheme will seek to increase the power reference, as seen in Fig. 7(b). Meanwhile, if the contingency causes an increase in frequency (Fig. 7 (c)), the proposed power reference automatically will reduce its value. In this case, for the QZSI (which is not bidirectional in power), the power cannot be less than zero and must be limited to maintain control of all the inverter variables (as proposed in Fig. 6).
If there is no set limit (especially in over-frequencies events), the control scheme fails when the reference goes out from the operating region.

B. EXPERIMENTAL RESULTS
For this study, the laboratory staff implemented a gridconnected single-phase QZSI converter capable of injecting up to 300W into a grid, whose parameters are in Table 2.
Regarding the values taken into account for the experimental setup -in this table-, it is worth mentioning that the design of the converter parameters was done considering the guidelines given in [53]. It is also noteworthy that similar values can be found considering the proposals presented in [54] and [55]. The control system of the converter has been run thanks to a dSPACE MicrolabBox. Among the test probes used for current measurement are the N2782B -Keysight brandand a TCP305A probe with a TCPA300 amplifier -Tektronix brand -. For voltage measurements, differential probes TA042 and DP65pro probes are used. This prototype has made it possible to verify the correct operation of the proposed predictive control strategy, both in steady-state and in the face of dynamic reference changes in power. For emulating a low inertia system, on which to operate the QZSI prototype, the laboratory has a set-up of coupled electrical machines. One of them is a synchronous electric motor acting as a source. The emulated grid frequency is controlled by the angular speed VOLUME 11, 2023  imposed on the synchronous motor by the other machine. Also, the ac grid voltage can be managed by a dc voltage applied in the field of the same generator. Figure 8 shows the workspace and the implemented prototype. In this figure, one can see (a) the set of coupled electrical machines that emulate the behavior of an ac weak system, and (b) the converter prototype beside its controller system. With the end to verify and test the converter and the proposed control scheme against frequency contingency events, this work considered five different operating cases (for the converter) when these frequency events affect the associated grid. The experiences were carried out using the same prototype parameters observed in Table 2. The five cases are as follows. Case I: This considers the QZSI behavior proposed by the traditional predictive control scheme (without frequency support) in the face of an under-frequency contingency. Case II: It takes the same predictive control scheme of Case I into account but evaluates the QZSI behavior in the face of an over-frequency event. In Case III, the converter's behavior and the predictive scheme are evaluated against an under-frequency event, considering the proposed frequency support, with droop control as a complementary scheme. Case IV considers the evaluation of the system with frequency support when there is an over-frequency event in the system; however, the power delivered by the inverter is low, and there are no power limits (as proposed in Fig. 6). In this case, the reference power provided by the droop control block can cause a control failure, and the inverter system must be helped by protections. Finally, Case V considers the same conditions reviewed in Case IV, but counting with the power limitation of Fig. 6. For Case I, it is possible to see the experimental results in Fig. 9. The waveforms show the response of the proposed FCS-MPC (control scheme of Fig. 2) applied to the inverter during an under-frequency event on the system. In this test, the power reference P Ref in the control system is constant. Due to the emulated contingency, at time t = −1.7s, the frequency (whose rated value is 50Hz) reaches its nadir point at 48.1Hz at t = −0.87s as seen at the bottom of Fig. 9(a). It is observed from the results that, in the face of the event, the variables managed by the converter are not altered and maintain their nominal magnitudes. For example, one can observe that the average value of the dc-current i L1 is maintained around 3A, without variation of its mean value. This fact is not so convenient for the ac grid regarding the converter since the inverter does not deliver more power to the grid at the time of the low-frequency event. However, it does not worsen the grid situation either.
In Fig. 10, one can see the experimental results of Case II. In this test, the system is suddenly subjected to an overfrequency event. At the waveforms (in both Fig.10a and Fig.10b), it is observed that the grid's frequency temporarily increases its nominal value. Also, one can perceive in the figures that the traditional control proposed for a typical behavior -in this case, without frequency support (with a stable reference power P Ref )-maintains an average value for the current i L1 (around 3A and constant) despite the over-frequency. The over-frequency does not affect or modify the power that the converter, commanded by the predictive control, must deliver into the ac grid. Again, in this second case, how the inverter behaves is not to the benefit of the ac grid since, in the face of an over-frequency event, the sources that contribute to the network should try to reduce the power delivered or even absorb energy instead of maintaining their provision.
The inverter and control scheme is arranged for Case III as in Fig. 5. In this test, the ac source of the system is subjected to a low-frequency event. For this third case, the control scheme makes the inverter provide frequency support to the system. In Fig. 11, it is possible to observe that the grid frequency is subject to the same contingency of case I (see Fig. 11(a) and Fig. 11(b)). Given the low-frequency event, the proposed inverter's control seeks to increase power as the frequency drops, aiming to contribute to the system to recover its frequency. The extra energy is obtained by the QZSI from the dc source, which has a battery. In the experimental test, it is observed that the current i L1 is increased by the control in Fig. 11(a) until it reaches a mean amplitude value of 13A. With regard to above, it is relevant to mention that the maximum value that i g can reach should not exceed the maximum current of the converter. For this reason, the reference must consider a limit block at the input of the predictive scheme. Finally, as seen in Fig.11(a), the system frequency begins to fall at t = −2s until it reaches a nadir close to 48Hz at t = −1s (seen in Fig.11(b)), and then begins to recover, a process which takes 3 seconds. The frequency when recovering reaches a value close to 49.5Hz; consequently, the current i L1 is maintained with an increase in its average value if it is compared with the initial one. Although it is true in this third case that the converter provides more power as the frequency falls, unlike case I, it cannot observe an improvement in the frequency, as might be expected. This lack of correction is because the system controls the speed of coupled machines to emulate that frequency drop. Furthermore, the extra power injected by the inverter would not be enough to improve the frequency event.
The Case IV test seeks to show how the system behaves with the control scheme of Fig.5 in the event of an overfrequency contingency. But, considering no limit prevents a negative current reference i L1 Ref or another reference that causes regeneration in the scheme, to perform this test it is necessary to protect the inverter and disconnect it from the grid if regeneration begins to occur. In this condition, absorbing power from the grid would cause an increase in the voltages of the QZSN capacitors. It must be remarked that the traditional QZSI inverter does not support bidirectionality.
As seen in Fig. 12(a), acquired from the test for Case IV, when the grid frequency suddenly increases, the inverter control seeks to reduce its power as the frequency increases, which is verified from current i L1 . Similarly, the current i g will be reduced. Once i L1 becomes zero, i g will seek to change direction (180-degree shift concerning the grid voltage), which activates the protection that switches off the inverter and prevents regeneration. The protective action takes the inverter completely out of operation, which is undesirable since control over the variables on the dc side would be lost. Also, the control system would have to deal with dynamics in these variables when connecting the inverter again. It would be much better to have a smoother behavior and not as abrupt as the one proposed by the response of this case IV.
To prevent the inverter going completely out of operation, one must incorporate a power limitation in the complementary block. The limitation may be as shown in Fig.6. In the Case V test, it is possible to check the system's operation when there is an over-frequency, as in case IV, but a lower limit for the power. As seen in Fig.13(a), when the frequency begins to increase, the power injected by the inverter will reduce, reaching a lower limit, and staying there, which is observed through the current i L1 , which is proportional to power. The current i g also reaches a value around zero (see Fig.13(b)) until the complementary block returns to deliver a positive power reference. In this latter case, there is no abrupt disconnection of the inverter, which is much more favorable for the system's operation, thus achieving a smoother behavior against frequency events, even before a contingency as aggressive as this last over-frequency.

C. BRIEF DISCUSSION
It is clear that the QZSI converter is not bidirectional and that it cannot absorb power by taking it from the network and storing the energy on the dc side. To do that, the QZSN of the inverter must be modified, altering the traditional topology of the QZSI. However, the fact that it cannot absorb power from the grid is not an obstacle since the control system can be proposed to be grid-friendly anyway. If the control system is proposed traditionally -like the one in Fig.2 -to deliver only the power available on the dc side, it does not get altered by a low-frequency or an overfrequency event, as can be seen in the results in Fig. 9 and Fig. 10. In these cases, the average magnitude of the current i L1 remains constant, as does the magnitude of the current i g on the ac-side, with the reference P p coming from the EMAs block. It is worth reminding that the operation and behavior of the inverter, based only on the energy available in the converter dc-link against an under-frequency event, could not affect the ac grid even more since at least it continues to deliver the power it provided before the contingency. However, in the event of an over-frequency event, if the inverter continues to provide the same amount of power to the system can be harmful because it is known that excess energy available could further affect the grid's over-frequency.
On the other hand, if a complementary frequency support block is introduced, as proposed in this work and depicted in Fig. 5, a grid-friendly operation of the inverter system is possible. In fact, with the proposed setup in case of a lowfrequency event, the scheme will increase the power as the frequency drops; also, in event of an over-frequency, the complementary control block will seek to reduce and even absorb energy from the network. However, since the studied inverter is non-bidirectional, the protection system disconnects the inverter from the network to protect it from an overload on the dc side (as seen in Fig. 12). By limiting and considering a minimum power greater than zero, as proposed in Fig. 6, it is possible to maintain the system's operation against an over-frequency without activating the system protection. This proposed action allows the inverter to function continuously and behave in a consistent and grid-friendly manner.

VI. CONCLUSION
This paper proposes a traditional single-phase grid-connected QZSI, together with a FCS-MPC control scheme integrating a frequency support system to achieve grid-friendly operation in microgrids and weak grids. The proposed predictive control uses a two-step horizon to ensure a more accurate prediction since the dc-link of the QZSI shows a nonminimum-phase behavior. The proposal considers possible grid voltage variations and allows the integration of a frequency support strategy. The inverter can deliver this frequency support as long as the system involves a storage system, such as batteries. The experimental results showed that the proposed control complementary block for the inverter allows injection of extra power when exposed to a low-frequency event. However, when the power reference is not limited against an over-frequency event, and depending on the operational conditions, the QZSI could be required to activate its protections and shut down at the moment of contingency, since the prediction model is not valid under regeneration conditions. If the use of protection relays is to be avoided, it is appropriate to consider a lower limit for the power in the event of a possible over-frequency event. The experimental results show that the proposed QZSI-based system can indeed be friendly to the grid, supporting it in case of low-or over-frequency events. It is a fact that there is an open flank in the behavior of many grid-connected inverter control schemes regarding disturbances or events in the same ac grid. This research, for example, has only focused on frequency events; It has not contemplated the provision or absorption of reactive power into or from the ac grid to support it against voltage drops or surges. Future proposals, especially in higher power levels, should include considerations regarding both frequency events and voltage events.