# Phase Balancing and Reactive Power Support Services for Microgrids
## 3 Advanced PV/ESS Controller
### Experimental Setup  
An experimental setup has been developed to validate the inverter performance according to the proposed control scheme with ancillary services provision functionalities. The enhanced inverter controller with the advanced sharing capability has been developed as a firmware within a dSPACE DS-1104 digital signal processor (DSP) board with a sampling and switching frequency of 3.45 kHz and is associated with a three-phase 5 _kVA_ SEMIKRON Semiteach (B6U+E1C1F+B6 CI) grid tied inverter. Then, the DC input of the inverter has been connected with a DC power supply ElekTRO-AUTOMATIC (EA-PS 9750-20) to emulate the PVs or the batteries connected at the DC-link. The AC output of the inverter has been connected with the power grid through an LC filter and a 5  
The performance of the proposed sharing strategy has been validated using three sets of experiments. Initially, the positive sequence reactive power seen by the grid (\(Q_{grid}^{+1}\)) has been measured at 1200 VAr and the negative sequence current (\(\mathbf{i}_{grid}^{-1}\)) at 3.5 A rms. Then, the sharing constant (\(k\)) has been altered from 0.01 to 100 for investigating the performance of the proposed strategy. Figure 5 shows the experimental results for the three case studies. At the beginning of each case study, the PV system (or ESS) was producing 1000 W. In the first case study (Figure 5a), at t = 25.02 s a sharing constant \(k\) = 0.01 has been requested from the MGCC. According to Equation (6) and Equation (7), priority will be given to PB compensation. As can be seen in Figure 5a, at t = 25.025 s the PV's currents are becoming asymmetrical to compensate \(\mathbf{i}_{grid}^{-1}\) while \(Q_{grid}^{+1}\) is not compensated since no reactive current capacity (\(\hat{I}_{Q_{min}}^{+1}\)) was available due to the low value of the sharing constant \(k\). In the next case study, a sharing constant \(k\) = 100 has been requested from the MGCC at t = 14.78 s. According to (6), a large sharing constant illustrates that the available capacity should be utilized only for positive sequence reactive power injection. Particularly, \(Q_{grid}^{+1}\) was compensated completely while \(\mathbf{i}_{grid}^{-1}\) remained unaffected as shown by Figure 5b. Finally, in Figure 5c, an equal capacity of reactive current and negative sequence current (\(\hat{I}_{inv}^{-1}\)) was requested by the MGCC (\(k\) = 1) at t = 4.02 s. The new PQ controller equally shares the capacity among the two ancillary services. As can be observed from, positive sequence reactive power was reduced from 1200 VAr to 400 VAr and the negative sequence current from 3.5 A to 0.5 A. Hence, the proposed PQ controller can share the inverter's available capacity among reactive and negative sequence current according to the sharing constant estimated by the MGCC in real-time.  
\begin{table}
\begin{tabular}{l l} \hline Switching and sampling frequency & 3.45 kHz \\ Synchronization Unit & DN\(\alpha\)\(\beta\)-PLL (\(k_{P}\) = 92, \(T_{i}\) = 0.000235) \\ Current Controller & \(k_{P}\) = 17.3, \(k_{I}\) = 218.5 \\ LC Filter & \(R_{if}\) = 0.19 \(\Omega\), \(L_{if}\) = 15 mH, \(C_{if}\) = 9.45 μF \\ Additional Inductance & \(Z_{g1}^{-1}\) = 4.7 mH \\ \hline \end{tabular}
\end{table}
Table 1: Parameters of the experimental setup.  
Figure 5: Experimental results showing inverter current injection (\(\mathbf{i}_{imp-n}\)), the grid reactive power (\(Q_{grid}^{+1}\)) at the microgrid PCC and negative sequence current (\(\mathbf{i}_{grid}^{-1}\)) at the microgrid PCC for different values of sharing constant \(k\): (**a**) \(k\) = 0.01, (**b**) \(k\) = 100 and (**c**) \(k\) = 1.