IdealInverter1phOpen presents two implementations of an open loop 1-phase inverter. The function of the inverter is to convert DC voltage and current into AC voltage and current. To keep things simple, a constant DC source is included on the DC side and an LC load is included on the AC side. Typically, inverters are placed inside a more complicated setup, which might require MPPT (Maximum Power Point Tracking) on the DC side when connected to a PV array and AC synchronization when connected to a grid on the AC side instead of just a simple passive load.
Nevertheless, the example still showcases an interesting application. Upon running the simulation with the provided values, plotting the resistor voltage and current and the DC source voltage yields the following figure:
The AC is achieved with the inverter topology (called an H-bridge) as well as with the duty cycle sinusoidal modulation. Have a look at the duty cycle driving the SignalPWM block and compare it with the voltage drop in the resistor.
Compare it with the voltage drop in the inductor. The voltage coming out of the inverter is actually a square wave and the inductor is providing some crude (but enough for some applications) filtering. Play around with the value of the inductor to see how it provides a better or worse filtering performance (decreasing or increasing the voltage and current ripple in the resistor, which in this example is assumed to be the load being fed). Since this is an open loop configuration, it will also change the peak value of the voltage drop in the resistor, as well as its phase.
Importantly, see how the the average model provides a very good approximation for low frequencies. This kind of model won't be useful to study ripples and to evaluate the performance of different PWM modulations (sinusoidal modulation is being used in this example) or of different filter configurations, since those are concerned with the high frequencies in the system. On the other hand, the average models will be very useful to study controllers and to perform longer simulations since the simulation step doesn't need to be so small as to accurately represent the switching dynamics.