# Inner-Loop Controllers for Grid-Forming Converters
## 3 Results  
In the fields of power electronics and applied control, Test-Driven Development (TDD) has significant potential for systematically characterizing the performance of grid-tied inverter control blocks and verifying their compliance with predefined metrics. TDD, also referred to as Test-Driven Design, is a software development approach in which tests are written before the application or device under test (DUT) is designed, rather than performing validation afterward, as in traditional methods [31]. This methodology enables an iterative development process, where software is incrementally refined based on test outcomes.  
Among software development methodologies, TDD can be particularly beneficial when designing and testing controllers for grid-tied converters. The fundamental principle of TDD is to execute a series of automated tests, each corresponding to a specific scenario. These scenarios are predefined by the designer and executed through supervisory software that drives the simulation. The implementations presented in this chapter have been developed  
Figure 13: Bode diagram that relates the input current \(l_{o}\) and the output voltage \(v_{c}\) of the controller considering virtual impedance method (blue) and virtual admittance method (red) realizations.  
using the Typhoon Test Integrated Development Environment (IDE), a framework that integrates pytest for executing tests written in Python ([[https://www.typhoon-hil.com/](https://www.typhoon-hil.com/)]([https://www.typhoon-hil.com/](https://www.typhoon-hil.com/)), accessed on 15 December 2024). Additionally, multiple application programming interfaces (APIs) facilitate faster and more efficient testing. Typhoon Test IDE also integrates with the Allure Framework reporting tool, providing comprehensive and interactive reports. Each scenario is systematically simulated, and the results can be collected and compared. Examples of test scenarios include structural and parametric variations in the system under simulation. Readers can refer to [6] for a comprehensive discussion of the TDD published by the authors.  
To evaluate and compare the performance of the different internal controllers described in the previous subsections, a case study must be defined: a microgrid consisting of two identical DERs that share a linear resistive load, as presented in Figure 14. The Microgrid Central Controller (MGCC) sends active and reactive power set-points to the DERs. Each DER incorporates inner current loops, virtual impedance, and Droop control as primary control strategies [6]. For comparison purposes, results were obtained operating with virtual inductance (Figure 15) and virtual admittance (Figure 16). It is observed that both strategies result in similar waveforms; however, the Norton equivalent with virtual admittance shows a higher output current measurement during the 0.05 s short circuit.  
Figure 14: Diagram of the defined case study: a microgrid consisting of two identical DERs sharing a linear resistive load.  
Figure 15: HIL simulation results showing the voltage and current measurements of a DER operating in parallel during a 0.05 s short circuit with the inductive Droop as primary controller and predominantly inductive virtual inductance.