Quasi-Z Source T-Type Power Converter for PV Based Commercial and Industrial Nanogrids with Active Functions Strategy

: Since most power electronics used in photovoltaic (PV) inverters at commercial and industrial facilities exhibit behavior as non-linear loads from the grid side, these high-power demand installations are expected to have a major impact on the network’s power quality. In an attempt to facilitate their integration into the distribution grid, this paper presents a comprehensive control strategy for Quasi-Z Source T-Type PV inverters inside a facility, which performs active and reactive power control, and harmonic and imbalance compensation at expenses of the spare inverter power capacity. Unlike other approaches, the one proposed here operates properly under distorted and unbalanced grid voltages. The electrical network structure inside a commercial and industrial facility is considered, analyzing the operation of the proposed strategy on three-phase PV inverters. The power topology used has voltage boosting ability, which eliminates the requirement for both an additional DC-DC converter and / or a step-up transformer commonly used in PV inverter systems. The proposed strategy performance is demonstrated on a 50 kW converter model under a disturbed grid environment and changing load conditions.


Introduction
The consolidation of renewable energy sources (RES), mainly those that are intermittent, non-dispatchable or difficult to predict, poses major challenges in the design and operation of electricity grids. In this context, the role of nanogrids becomes a key element. In short, nanogrids are only small microgrids, usually serving one or several buildings or facilities. Recent years have witnessed a growing interest towards Commercial and Industrial Nanogrids (CINs), i.e., involving commercial buildings or manufacturing plants. Most of the RES, such as the photovoltaic (PV) modules and fuel cells, generate DC voltage. Thus, in general, power generated from RES should be conditioned. This process is usually performed by power electronics systems, in this case, specifically by grid-interactive PV inverters (PVI). One of the most widely used topologies in these converters is the conventional voltage source inverter (VSI), having however some drawbacks. The DC input voltage must be higher than the peak value of the grid voltage [1]. In practical applications, such as PV systems, the generated DC voltage levels are usually low and can vary widely depending on the operating conditions. An additional DC-DC converter is therefore required to increase the DC 1.
The integration of PV inverters, based on a three-phase Quasi-Z-Source Three-Level T-Type topology as part of a PV based commercial and industrial nanogrid. The control strategy (i) integrates several functions so far partially implemented on this specific power topology [22,24]: active and reactive power control and harmonics and imbalance mitigation; (ii) propose a collaborative operation between inverters inside the CIN and (iii) in any case, working well under distorted and unbalanced grid voltage, extending the achievements reported in [26].

2.
The control approach is straightforward and can achieve optimized injection of PV power into the grid, reactive power compensation, and harmonic and imbalance mitigation, in a coordinated or independent manner. Even more, the AC/DC converters from PV, which includes the DC link capacitors, are suitable to be used as active filters even when there is no solar irradiation. The idea Electronics 2020, 9,1233 3 of 18 tries to take maximum advantage of power electronics equipment, regardless of the process they are involved in.
The rest of the paper is organized as follows. The configuration of a PV based CIN is shown; then the inverter topology, the control strategy, the modulation technique and the current controller are presented and explained in detail. The system is tested under disturbed voltage grid conditions in several practical situations in Section 3. Section 4 concludes this paper. Figure 1 shows the structure of a representative case of CIN. A total power about 1000 to 1500 kW is considered, connected to the Medium Voltage (MV) distribution network throughout a MV/LV transformer. The Low Voltage (LV) network follows a typical structure commonly used in Europe: four wires three-phase 230/400 V network with the neutral grounded at transformer neutral, according to the TT grounding scheme [27], supplying both single-phase and three-phase loads.

Power Structure and Control System
four wires three-phase 230/400 V network with the neutral grounded at transformer neutral, according to the TT grounding scheme [27], supplying both single-phase and three-phase loads.

Topology
The proposed topology of PVIs is displayed in Figure 2. This is a three-phase Quasi-Z-Source Three-Level T-type inverter. The figure shows the DC voltage source which represents the renewable energy source, the quasi-Z network, the T-type three-level inverter and the output filter. The currents injected into the grid by an individual PVI are , , ; the voltage and current from the PV panels are and , respectively. A representation of the assigned fraction (it will be defined further) of the CIN's unbalanced and non-linear load is included in Figure 2 as well. The currents demanded by this load are , , and the total currents injected into the grid by the CIN are , , Using several switching combinations, the inverter outputs (a', b', c') are connected to the terminals P, 0 or N. Thus, a waveform with three voltage values (− /2, 0 and /2) is obtained.
The corresponding switching combinations are the previously mentioned NST states. When P and N points are joined by closing both the upper ( ) and lower ( ) switches of either phase, a zero-voltage value is obtained at the corresponding output. The one described is the previously mentioned ST state, which is not permitted in a traditional VSI (without the Z-source network), because it causes a short circuit in the DC source. By changing the duty-cycle of the ST state, the DC bus voltage is increased with respect to the PV voltage. This feature is briefly explained in the following.

Topology
The proposed topology of PVIs is displayed in Figure 2. This is a three-phase Quasi-Z-Source Three-Level T-type inverter. The figure shows the DC voltage source which represents the renewable energy source, the quasi-Z network, the T-type three-level inverter and the output filter. The currents injected into the grid by an individual PVI are i a , i b , i c ; the voltage and current from the PV panels are U PV and I PV , respectively. A representation of the assigned fraction (it will be defined further) of the CIN's unbalanced and non-linear load is included in Figure 2 as well. The currents demanded by this load are i La , i Lb , i Lc and the total currents injected into the grid by the CIN are i ga , i gb , i gc .
Using several switching combinations, the inverter outputs (a', b', c') are connected to the terminals P, 0 or N. Thus, a waveform with three voltage values (−U PN /2, 0 and U PN /2) is obtained. The corresponding switching combinations are the previously mentioned NST states. When P and N points are joined by closing both the upper (S 1 ) and lower (S 2 ) switches of either phase, a zero-voltage value is obtained at the corresponding output. The one described is the previously mentioned ST state, which is not permitted in a traditional VSI (without the Z-source network), because it causes a short circuit in the DC source. By changing the duty-cycle of the ST state, the DC bus voltage is increased with respect to the PV voltage. This feature is briefly explained in the following. It is also assumed that the converter operates in the continuous conduction mode. Taking into consideration that, in steady state, the average voltage value at inductor terminals during each switching period is zero, the boost factor B is obtained [28] from: where is the peak DC-link voltage, available during NST states. The amplitude of the fundamental component of the output phase-to-neutral voltage is given by: where m is the modulation index.

Proposed Control Strategy
The reference current for each PVI of a CIN, * = ( * * * ) (see Figures 1 and 2), is calculated by means of the control strategy, aiming that the active power and reactive power setpoints provided by the CIN-EMS are fulfilled. Besides, if the PVI rated power is not exceeded, harmonic and imbalance compensation at the PCC can be achieved. Thus, each PVI collaborates improving the LV network performance, since balanced and sinusoidal currents will be attained, with displacement power factor (dPF) according to the CIN-EMS requirements. The tracking technique obtains the switching signals for the PVI ensuring a minimum error between the measured and reference current.
The PVI reference current vector is composed of three terms, explained in detail in the next sections: active power * = ( * * * ) , reactive power * = ( * * * ) and harmonic and imbalance load current * = ( * * * ) . The durations of the NST and ST states are defined as T N and T 0 , respectively, and the corresponding duty ratios are D N = T N /T and D 0 = T 0 /T, where T is the switching period T = T N + T 0 . Assuming that the quasi-Z-source network is symmetric (i.e., L 1 = L 3 , L 2 = L 4 and C 1 = C 4 , C 2 = C 3 ), the voltages across the passive components are u L1 = u L3 , u L2 = u L4 and u C1 = u C4 , u C2 = u C3 . It is also assumed that the converter operates in the continuous conduction mode. Taking into consideration that, in steady state, the average voltage value at inductor terminals during each switching period is zero, the boost factor B is obtained [28] from: whereÛ PN is the peak DC-link voltage, available during NST states. The amplitude of the fundamental component of the output phase-to-neutral voltage is given by: where m is the modulation index.

Proposed Control Strategy
The reference current for each PVI of a CIN, i * = ( i * a i * b i * c ) T (see Figures 1 and 2), is calculated by means of the control strategy, aiming that the active power and reactive power setpoints provided by the CIN-EMS are fulfilled. Besides, if the PVI rated power is not exceeded, harmonic and imbalance compensation at the PCC can be achieved. Thus, each PVI collaborates improving the LV network performance, since balanced and sinusoidal currents will be attained, with displacement power factor (dPF) according to the CIN-EMS requirements. The tracking technique obtains the switching signals for the PVI ensuring a minimum error between the measured and reference current. The PVI reference current vector is composed of three terms, explained in detail in the next sections: active power i * T and harmonic and imbalance load current i * HI = ( i * HIa i * HIb i * HIc ) T . Figure 3 shows the block diagram of the PVI control system, where P * and Q * 1 , are set by the CIN-EMS and i L is measured at the PCC.
Electronics 2020, 9, x FOR PEER REVIEW 5 of 18 Figure 3 shows the block diagram of the PVI control system, where * and * , are set by the CIN-EMS and is measured at the PCC.

Active Power Control (P Mode)
A modified Perfect Harmonic Cancelation (PHC) [29] control strategy is proposed, so that the current injected into the grid is proportional to the positive-sequence fundamental grid voltage. It ensures that the PVI operates with a unity dPF providing sinusoidal and balanced current. Into this P mode, in turn, two modes of operation are considered: Maximum Power Point Tracking mode (MPPT mode) and Reference Power Point Tracking (RPPT mode).
When the MPPT mode is activated (selected by the switch S), the reference PVI current in the 0dq reference frame ( ) * will be determined, based on local voltage and current measurement from the PV panels associated to the specific PVI, using an MPPT algorithm, such as the classical Perturb and Observe, to extract the maximum available power from them.
On the other hand, in the RPPT mode, the CIN-EMS dispatch a three-phase active power setpoint * to each individual PVI, according to different criteria that depends on commercial or economic consideration, which are out of the scope of this paper. It seems interesting, however, to point out some examples in this regard. Thus, the RPPT mode could be applied in the event that the inverter temporarily discontinues power generation and uses its full capacity to act as static synchronous compensator (STATCOM), as proposed in [10]. In addition, if a PVI is associated with an energy storage system, based for example on batteries, the system could inject a reference constant active power into the grid during certain time intervals. In this case, it might happen that the power from PV panels would have to be limited if the batteries are fully charged and the solar irradiation is too high [30]. In this paper, when the RPPT mode is activated (selected by the switch S in Figure 3), the reference PVI current in the 0dq reference frame is calculated from the mentioned reference power setpoint * by the following current vector.
where , is the d-axis component of the positive-sequence fundamental grid voltage vector = ( , , , ) . From the grid voltage , an Auto-Adjustable Synchronous Reference Frame (ASRF) phase locked-loop [31] extracts the positive-sequence fundamental vector, and its phase angle . Afterward, the block abc/0dq applies the Park transformation to obtain ( ) = (0 , , ) . Finally, whatever mode (MPPT or RPPT) is selected, the reference current vector * is obtained by means of the inverse transformation 0dq/abc.

Active Power Control (P Mode)
A modified Perfect Harmonic Cancelation (PHC) [29] control strategy is proposed, so that the current injected into the grid is proportional to the positive-sequence fundamental grid voltage. It ensures that the PVI operates with a unity dPF providing sinusoidal and balanced current. Into this P mode, in turn, two modes of operation are considered: Maximum Power Point Tracking mode (MPPT mode) and Reference Power Point Tracking (RPPT mode).
When the MPPT mode is activated (selected by the switch S), the reference PVI current in the 0dq reference frame i * PM(0dq) will be determined, based on local voltage and current measurement from the PV panels associated to the specific PVI, using an MPPT algorithm, such as the classical Perturb and Observe, to extract the maximum available power from them.
On the other hand, in the RPPT mode, the CIN-EMS dispatch a three-phase active power setpoint P * to each individual PVI, according to different criteria that depends on commercial or economic consideration, which are out of the scope of this paper. It seems interesting, however, to point out some examples in this regard. Thus, the RPPT mode could be applied in the event that the inverter temporarily discontinues power generation and uses its full capacity to act as static synchronous compensator (STATCOM), as proposed in [10]. In addition, if a PVI is associated with an energy storage system, based for example on batteries, the system could inject a reference constant active power into the grid during certain time intervals. In this case, it might happen that the power from PV panels would have to be limited if the batteries are fully charged and the solar irradiation is too high [30]. In this paper, when the RPPT mode is activated (selected by the switch S in Figure 3), the reference PVI current in the 0dq reference frame is calculated from the mentioned reference power setpoint P * by the following current vector. phase locked-loop [31] extracts the positive-sequence fundamental vector, u + 1 and its phase angle θ + 1 . Afterward, the block abc/0dq applies the Park transformation to obtain u + 1(0dq) = (0 u + 1,d u + 1,q ) T . Finally, whatever mode (MPPT or RPPT) is selected, the reference current vector i * P is obtained by means of the inverse transformation 0dq/abc.

Reactive Power Control (Q Mode)
According to economic reasons, based on tariff incentives, reactive power management or PCC voltage support can be provided by the CIN. Thus, a fundamental three-phase reactive power setpoint Q * 1 is sent by the CIN-EMS to each individual PVI. Two modes of operation are considered: (i) fundamental reactive power flow from the grid to the PVI (Q * 1 < 0), and (ii) fundamental reactive power flow from the PVI to the grid (Q * 1 > 0). A control strategy derived from the PHC strategy [29] is proposed, which aims that the PVI provides sinusoidal and balanced current, lagging 90 • from the positive-sequence fundamental component of the grid voltage. Thus, in Q mode, the reference PVI current is calculated in the 0dq reference frame as: Likewise, the reference current vector in the abc frame i * Q is obtained by means of the inverse transformation 0dq/abc.

Load Current Harmonics and Imbalance Reduction (HI Mode)
The objective of this mode is to compensate for the harmonic and unbalanced currents demanded by the CIN loads, so that the PVI behaves as an Active Power Filter (APF). Therefore, the contribution of all the PVIs attains a better power quality and imbalance ratios in the CIN.
The CIN-EMS measures the total load current at the PCC (i L−CIN ) and divides it into portions (i L ) to each PVI. Meanwhile, the load current assigned to a PVI can be decomposed into the following terms: are the positive-sequence, negative-sequence and zero-sequence fundamental components, respectively, and i Lh the harmonic component. A Total Harmonic and Imbalance Compensation (THIC) control strategy is proposed aiming that the PVI current is equal and opposite to the harmonic and fundamental unbalanced components of i L , that is: The Synchronous Reference Frame (SRF) block is in charge to extract i + L1 from the assigned load current vector i L , by using the positive-sequence fundamental phase angle provided by the ASRF block.
The reference current in Equation (5) must be saturated to ensure the PVI does not exceed its nominal current I N . Therefore, the Root Mean Square (RMS) value of the reference current for the HI mode is obtained as where I P and I Q are the RMS values for i * P and i * Q , respectively. Finally, the reference PVI current is obtained from the equations below.
where I HI is the highest RMS value of the components of i * HI .
Electronics 2020, 9, 1233 7 of 18 The part that performs the THIC strategy appears at the bottom of Figure 3.

Current Controller and Modulation Method
After the definition of the current references, a current controller (block called CC in Figure 3) will be used to ensure that the inverter output currents will track those references. A simple proportional controller is selected to regulate the current error (∆i). In fact, this proportional controller is tuned to adjust the desired maximum current ripple, being expressed as a percentage of the nominal current. A saturation block limits the maximum and minimum values of the control signals, being also them finally scaled by considering the constrain u * y ≤ 1 − D 0 , where y represents the phase a, b or c. In following sections, it will be shown an accurate and fast transient response of this controller, with zero steady error [32]. The implementation block diagram is represented in Figure 4.
Electronics 2020, 9, x FOR PEER REVIEW 7 of 18 the nominal current. A saturation block limits the maximum and minimum values of the control signals, being also them finally scaled by considering the constrain * ≤ 1 − , where y represents the phase a, b or c. In following sections, it will be shown an accurate and fast transient response of this controller, with zero steady error [32]. The implementation block diagram is represented in Figure 4. Each signal expressed as * corresponds with the duty cycle to be applied on each branch of the inverter. As this control action is calculated as a proportional value of the difference between the instantaneous reference * and the measured (with switched shape), a switched duty cycle is attained, as shown in Figure 5. Then, a level-shifted Pulse Width Modulation (LS-PWM) in phase disposition with constant boost control (CBC) is selected [33] to generate the different gate signals ( ), where x represents the switch (1, … , 4) for the power converter.   Each signal expressed as u * y corresponds with the duty cycle to be applied on each branch of the inverter. As this control action is calculated as a proportional value of the difference between the instantaneous reference i * and the measured i (with switched shape), a switched duty cycle is attained, as shown in Figure 5. Then, a level-shifted Pulse Width Modulation (LS-PWM) in phase disposition with constant boost control (CBC) is selected [33] to generate the different gate signals (S gxy ), where x represents the switch (1, . . . , 4) for the power converter.
Electronics 2020, 9, x FOR PEER REVIEW 7 of 18 the nominal current. A saturation block limits the maximum and minimum values of the control signals, being also them finally scaled by considering the constrain * ≤ 1 − , where y represents the phase a, b or c. In following sections, it will be shown an accurate and fast transient response of this controller, with zero steady error [32]. The implementation block diagram is represented in Figure 4. Each signal expressed as * corresponds with the duty cycle to be applied on each branch of the inverter. As this control action is calculated as a proportional value of the difference between the instantaneous reference * and the measured (with switched shape), a switched duty cycle is attained, as shown in Figure 5. Then, a level-shifted Pulse Width Modulation (LS-PWM) in phase disposition with constant boost control (CBC) is selected [33] to generate the different gate signals ( ), where x represents the switch (1, … , 4) for the power converter.   Figure 5 depicts the scheme of the LS-PWM in phase disposition with CBC. A frequency modulation index equal to 11 has been used for better visualization. The three signals u * y and two carrier signals (C 1 , upper ∈ [0, 1] and C 2 , lower ∈ [−1, 0]) are compared to generate the NST states and to trigger the different power switches. As an example, the NST states for branch a are illustrated at the same figure. Other carrier but at double frequency is in response of the ST states generation defined by D 0 . Performing in this way, the generation of the ST states is uniform and with constant width during the fundamental period. Finally, carriers C 1 and C 2 are shifted to C 1 and C 2 by a value of D 0 /2 to compensate the output average voltage, which is affected due to the ST states insertion.

DC Bus Voltage Regulation
In Z-source inverters, the DC-link voltage, present during NST states, is the peak voltageÛ PN . The control of this DC-link voltage is realized by adjusting D 0 according to Equation (1) from the variable value of the PV voltage U PV . The changes in U PV are caused by changes in solar irradiance or by changes in reference power. It is important to note that the DC-link voltage is a pulsed voltage waveform and, consequently, cannot be used as feedback signal. Thus, an indirect approach is employed. Capacitors C 2 and C 3 voltages are measured and the actual magnitude of peak DC-link voltage is calculated from the following relation [34]: In Figure 3 (top right), the calculated magnitudeÛ PN is compared with the reference magnitudê U * PN . Then the error signal is processed by a Proportional Integral (PI) controller, generating the ST duty-cycle D 0 . This duty cycle together with the output of the current controller are the input for the PWM stage.

Simulation Results and Analysis
The present study is focused on PVI power range of 50-200 kW, which is suited for commercial and industrial applications and for multi-megawatt PV plants. More specifically, a PVI with the following rating is considered: 230/400 V; 50 Hz, 50 kW. The corresponding rated RMS current I N is 72.5. Table 1 gathers the main equipment parameters. Based on [33,35], the source network components were calculated from the following equations: In these equations, besides the previously defined parameters, f sw is the switching frequency; K L is the assumed ripple in I PV ; P out is the rated output power; and K C is the maximum voltage ripple across the capacitors.
The output voltage harmonic distortion at the switching frequency is reduced by means of an output filter constituted by the inductors L f , the values of which are calculated based on [36] from the following equation: where U inv (h sw ) is the desired harmonic distortion of the output voltage at the switching frequency; U g is the RMS grid voltage (phase-to-neutral); f 1 is the fundamental frequency; h sw is the switching harmonic order; and THD I is the assumed total harmonic distortion of the output current. An equivalent load representative of the CIN's linear and non-linear loads, others than the PVIs themselves, is considered. The rated apparent power demanded by this load is supposed to be close to the total amount of installed PV power in the CIN. This would allow the CIN to operate in off-grid mode. At the PCC, the CIN-EMS measures the CIN's load current (i L−CIN ) and assigns a fraction (i L ) to each PVI. According to [37], in commercial buildings and industrial plants, harmonic analysis and the corresponding correction measures are required when a large number of non-linear loads (typically greater than 25% to 30% of the total load) are present or anticipated to be added. Hence, in this work, as a representative example, harmonic and imbalance compensation over about 40% of the CIN's total demand is proposed. Therefore, the load RMS current allocated to a specific PVI will be approximately 40% of the rated RMS current of the PVI itself, i.e., in this case I L = 30 A. A simulation model for a PVI, in the conditions described above, has been developed using PSCAD simulation tool. Both the switching frequency and the sampling rate were considered 10 kHz and a simulation time step was taken 10 −6 s. The four-wire LV network was supposed to be distorted and unbalanced according to [38,39]. Individual distortion percentage for harmonic 3 is selected at its limit, while for harmonics 5 and 7 the percentages are calculated for having a Total Harmonic Distortion (THD) below the 8% limit. The inverse sequence component (U − ) is set at its limit, adding a zero-sequence component (U 0 ) fixed at the same value. These values are shown in Table 2. Table 2. Low Voltage (LV) network characteristics.

Voltage Harmonic Distortion (%)
Voltage THD (%)   Table 3. For this load, the RMS value of the equivalent current, calculated according to Std. IEEE-1459:2010 [41] is I Le = 31.53 A. The HI compensation function is not activated.  Electronics 2020, 9, x FOR PEER REVIEW 10 of 18 CIN-EMS. One can notice that the DC-link voltage is closed to its reference value in both cases. In case A, since the PV voltage is high enough, the boost functionality, by using the ST control, is not needed. In case B, however, it is necessary because the PV voltage is low.  In case C (Figure 8), the CIN load current is distorted (see Table 3) and unbalanced ( − / + = 10%, 0 / + = 10%). Since in this case the HI compensation function is not activated, the grid current is unbalanced and distorted. Table 4 summarizes the harmonic and imbalance components of the load, grid, and PVI phase currents.   Table 4. From left to right and top to bottom as in Figure 6.
In Case D ( Figure 9) the CIN load current is distorted and unbalanced as in Case C, however in this case the HI function is activated. The CIN-EMS setpoints and the compensation requirements are compatible with the PVI nominal current, the converter can perform its assigned tasks and therefore balanced sinusoidal grid currents are achieved. Table 5 summarizes the harmonic and imbalance components of the load, grid, and PVI phase currents. As it can be seen, load currents have THD in the range 21-28 %; this figure is notably reduced to below 5% in grid currents. Regarding imbalances,   Table 4. From left to right and top to bottom as in Figure 6.
In Case D ( Figure 9) the CIN load current is distorted and unbalanced as in Case C, however in this case the HI function is activated. The CIN-EMS setpoints and the compensation requirements are compatible with the PVI nominal current, the converter can perform its assigned tasks and therefore balanced sinusoidal grid currents are achieved. Table 5 summarizes the harmonic and imbalance components of the load, grid, and PVI phase currents. As it can be seen, load currents have THD in the range 21-28 %; this figure is notably reduced to below 5% in grid currents. Regarding imbalances,  Table 4. From left to right and top to bottom as in Figure 6.   Table 3. From left to right and top to bottom as in Figure 6.   Table 3. From left to right and top to bottom as in Figure 6. In Case E (Figure 10), the CIN load current is distorted and unbalanced as in Case C and D, and the HI function is activated. The active power setpoint is 45 kW; however, the reactive power has been increased to 21.7 kVAr. With these values, the compensation requirements cannot be fulfilled without incurring equipment overload. Therefore, the PVI performs a partial compensation and grid currents are not sinusoidal nor balanced. Table 6 summarizes the harmonic and imbalance components of the load, grid, and PVI phase currents for Case E. Paying attention to grid currents, it can be seen that THD is about 7.5% in the worst phase; and − and 0 are 1.81 and 1.91 A, respectively. These results show the expected saturation effect which ensures the PVI does not exceed its rated RMS current.   The CIN load current is sinusoidal and balanced in cases A ( Figure 6) and B (Figure 7), so the reference current for the HI control is null. In case A, no reactive power setpoint is provided by the CIN-EMS, thus only the P control is activated with a reference value imposed by the MPPT algorithm.
A unity dPF is attained by the PVI, injecting a current into the grid in phase with the positive-sequence fundamental grid voltage. In case B, the PVI receives active and reactive power setpoints from the CIN-EMS. One can notice that the DC-link voltage is closed to its reference value in both cases. In case A, since the PV voltage is high enough, the boost functionality, by using the ST control, is not needed. In case B, however, it is necessary because the PV voltage is low.
In case C (Figure 8), the CIN load current is distorted (see Table 3) and unbalanced (I − /I + = 10%, I 0 /I + = 10%). Since in this case the HI compensation function is not activated, the grid current is unbalanced and distorted. Table 4 summarizes the harmonic and imbalance components of the load, grid, and PVI phase currents. Table 4. Harmonic and imbalance components of load, grid and PVI currents for case C.

Harmonics
Imbalance In Case D ( Figure 9) the CIN load current is distorted and unbalanced as in Case C, however in this case the HI function is activated. The CIN-EMS setpoints and the compensation requirements are compatible with the PVI nominal current, the converter can perform its assigned tasks and therefore balanced sinusoidal grid currents are achieved. Table 5 summarizes the harmonic and imbalance components of the load, grid, and PVI phase currents. As it can be seen, load currents have THD in the range 21-28 %; this figure is notably reduced to below 5% in grid currents. Regarding imbalances, the figures I − = 3A and I 0 = 3A in the load currents are reduced to 0.14 A and 0.2 A, respectively, in the grid currents. Table 5. Harmonic and imbalance components of load, network and PVI currents for case D.

Harmonics
Imbalance In Case E (Figure 10), the CIN load current is distorted and unbalanced as in Case C and D, and the HI function is activated. The active power setpoint is 45 kW; however, the reactive power has been increased to 21.7 kVAr. With these values, the compensation requirements cannot be fulfilled without incurring equipment overload. Therefore, the PVI performs a partial compensation and grid currents are not sinusoidal nor balanced. Table 6 summarizes the harmonic and imbalance components of the load, grid, and PVI phase currents for Case E. Paying attention to grid currents, it can be seen that THD is about 7.5% in the worst phase; and I − and I 0 are 1.81 and 1.91 A, respectively. These results show the expected saturation effect which ensures the PVI does not exceed its rated RMS current. Table 6. Harmonic and imbalance components of load, network and PVI currents for case E.

Harmonics
Imbalance Following the definitions proposed in Standard IEEE-1459:2010 [41], different PVI three-phase power quantities have been calculated. Table 7 summarizes the results for cases A-E. The following power terms are shown: apparent power S in kVA, active power P in kW, fundamental reactive power Q 1 in kVAr, non-active power N in kVA, the power factor PF, and the displacement power factor dPF.  Figure 11 demonstrates the behaviour under changing setpoint conditions. The overall performance is described below: Initially PVI is not connected and consequently the CIN loads are fed solely from the grid; therefore, grid currents are equal to load currents with opposite sign.
At t = 0.2 s, PVI is connected, injecting 30 kW from the PV panels in a specific irradiation condition. At the same time, the Q function is activated to inject fundamental reactive power in the order of one-third of the active power, 10 kVAr in this case. Despite the unbalanced and distorted grid voltage, the PVI output currents waveforms are balanced and sinusoidal, and lagging from the fundamental component of phase voltage. However, since load current is distorted, the currents injected into the grid are unbalanced and distorted.
At t = 0.24 s, PV voltage U PV falls to 850 V; DC-link voltage is regulated to its reference value (Û * PN = 1050 V), adjusting the ST ratio D 0 . Voltage U PN is zero during ST states andÛ PN during NST states. These changes are also reflected in u a b .
At t = 0.26 s, HI function is activated, consequently, PVI currents become distorted and unbalanced so the grid currents are sinusoidal and balanced. In this case, total compensation is possible because the PVI rated power is not reached.
At t = 0.32 s, active and reactive power setpoints are increased to P * = 45 kW and Q * 1 = 21.795 kVAr, respectively. In this condition, the equipment performs a partial compensation; consequently, grid currents remain partially distorted and unbalanced.

' '
At t = 0.26 s, HI function is activated, consequently, PVI currents become distorted and unbalanced so the grid currents are sinusoidal and balanced. In this case, total compensation is possible because the PVI rated power is not reached.
At t = 0.32 s, active and reactive power setpoints are increased to * = 45 kW and 1 * = 21.795 kVAr, respectively. In this condition, the equipment performs a partial compensation; consequently, grid currents remain partially distorted and unbalanced.
′ ′ Figure 11. Behavior under changing setpoint conditions. From top to bottom: grid voltages (u a , u b , u c ); grid currents (i ga , i gb , i gc ); PVI output currents (i a , i b , i c ); PV voltage (U PV ), DC-link voltage (U PN ); and phase-to-phase PVI output voltage before filtering (u a b ).
The implemented model is based on real electrical models with realistic parameters for the power stage. Selected parameters of the IGBTs were obtained from datasheet of 12MBI100VN-120-50 IGBT T-type module by Fuji. Both the transfer functions and the controllers have been implemented in their discrete form using Tustin's method, and all measurements are sampled before processing at 10 kHz. This gives an insight into the practical feasibility of the proposal using current fast microcontrollers.

Conclusions
A control strategy has been presented for photovoltaic converters that allows the control of the overall active and reactive power of the CIN where they are integrated. Additionally, if the converter has spare capacity, the control strategy contributes to reduce the harmonic content and imbalances in the three-phase currents demanded by the entire CIN at the point of connection to the distribution network.
A three-phase Quasi-Z-Source Three-Level T-Type, is used as a grid interactive inverter. This topology has voltage boosting ability and eliminates the requirement for both an additional DC-DC converter and/or a step-up transformer commonly used in PV inverter systems. Therefore, the application of this topology is more efficient than the other conventional two-level and three-level inverter structures for medium frequency operation.
Simulation results have demonstrated that the reference currents can be calculated locally, based on the setpoints received from the CIN-EMS, in a time frame compatible with practical operation, and that these references are correctly followed by the currents supplied by the PVI. Proper operation has been achieved even under distorted and unbalanced LV grid conditions.
No cross-coupling interaction was observed, i.e., active power, reactive power and harmonic-imbalance controls act independently from each other, demonstrating another featured advantage of the proposed global control strategy.
Although the implemented simulation is highly accurate, a laboratory scaled prototype is currently being assembled, in order to experimentally endorse the proposed control strategies on this topology.
The practical use of the proposed PVI systems in CINs will contribute to the smart grid goals, allowing the offer of ancillary services to the distribution system operator and improving the power quality of the LV network.