With Simulink and Simscape Electrical, you can create a schematic model for the grid-tied inverter and perform power electronics simulation. You can design and tune the inverter's control algorithm, such as PID control, for regulating output voltages.
[PDF Version]