A program for simulation and analysis of the output stage in grid-connected systems. Considering an grid-tied system consisting of a half-bridge voltage source inverter (VSI) and an output LCL filter, it allows evaluating the operation of such electronic device for high-frequency switching and under different load conditions.

The program contains the following file types:
- MATLAB scripts for general settings and controller design
- Simulink implementation for digital-control simulation
- PSIM implementation for power-electronics simulation
Main file named as 'run_grid_tied.m'.
The current regulator in grid-connected inverters aims to maintain the current injected to grid at quality levels accepted by standards such as IEEE 1547. One solution for designing such output-current regulators are controllers based on the internal model principle (IMP), which in case of grid-tied inverters yield to the multi-resonant and repetitive controllers.
Consider a closed-loop in the form
employing a proportional-multiple-resonant (PMR) controller with transfer function
where
An appropriate design of
The control law shown can be rewritten as
where