# An Optimal Power Control Strategy for Grid-Following Inverters in a Synchronous Frame
## 4 Simulation and Experimental Results
### HIL Experimental Robustness Assessment  
To assess performance robustness, a real-time hardware-in-the-loop (HIL) experiment was performed. The LQR-ORT performance was compared against the classical proportional-resonant (PR) droop controller developed in [13]. The LQR-ORT controller and the PR-Droop controller were implemented in a dSPACE SCALEXIO real-time simulation platform.  
The general scheme of the HIL experiment is shown in Figure 5. The circuit shown in Figure 2 was implemented in an OPAL-RT OP5700 real-time simulator using IGBT transistor models with a PWM switching frequency of 10 kHz. Each of the 50 component variations were programmed in the OP5700 in order to assess performance robustness under different component scenarios in a hardware-in-the-loop experiment (HIL).  
The dSPACE and the OP5700 were physically connected as shown in Figure 6. Step response robustness under component variations was assessed and summarized in Table 2. Each component  
Figure 4: LQR-ORT discrete-time closed-loop eigenvalues of the nominal system and the system under variations using the same controller \(\text{K}_{\text{d}}\).  
Figure 5: Real-time hardware-in-the-loop (HIL) experiment representation.  
scenario ID is sorted from the most positive to the most negative deviation. Negative deviations occur when a component is under nominal values. Component variations between \(\pm\)40% (ID 2 to ID 26) were stable for both controllers and their results are not included.  
After a component variation of \(-\)42% (ID 28), the PR-Droop controller is more susceptible to becoming unstable than the LQR-ORT. Furthermore, the PR-Droop controller becomes completely unstable after a variation of 58.6% (ID 42), whereas the LQR-ORT becomes completely unstable after a variation of 62.7% (ID 49).  
Figure 7 shows the response of both controllers to a pulsed reference of 300 W and 200 Var under nominal component values and scenarios 41 and 42. Each pulse had a width of 1.8 s and a time shift of 0.7 s to analyze decoupling between active and reactive power. To analyze transient response, power was measured using a first-order low-pass filter with a bandwidth of 50 rad/s as shown in Figure 6. The power measurement with the filter are outside the control loop and do not affect closed-loop dynamics. For nominal component values, the LQR-ORT controller shows a smooth transient response with low noise and low decoupling between active and reactive power. On the other hand, the PR-Droop controller shows oscillating responses with high switching noise and high coupling between active and reactive power.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**ID**} & **C** & **Li** & **Lo** & **Max** & **LQR-ORT** & **PR-Droop** \\  & **(μF)** & **(mH)** & **(mH)** & **Deviation** & **Stable** & **Stable** \\ \hline Nom & 8.8 & 1.8 & 1.8 & 0\% & Yes & Yes \\ \hline
1 & 12.6 & 2.87 & 2.57 & 42.8\% & Yes & Yes \\ \hline � & � & � & � & � & � & � \\ \hline  
\hline \end{tabular}
\end{table}
Table 2: HIL Experimental Robustness Assessment.  
For scenario 41, The LQR-ORT transient response remains robust with some coupling between active and reactive power, whereas the PR-Droop response becomes more oscillating and the coupling increases. Finally, for scenario 42, the LQR-ORT shows a slight increase in switching noise and the PR-Droop becomes unstable. These results demonstrate that the LQR-ORT performance is more robust for component variation than the classic PR-Droop controller.  
Figure 6: Photo of the HIL experimental setup.  
Figure 7: HIL experiment comparison between LQR-ORT and the PR-Droop controller for the nominal case and scenarios 41 and 42. (**a**) PR-Droop controller with nominal scenario. (**b**) PR-droop controller with scenario 41. (**c**) PR-Droop controller with scenario 42. (**d**) LQR-ORT controller with nominal scenario. (**e**) LQR-ORT controller with scenario 41. (**f**) LQR-ORT controller with scenario 42.