This example shows how to control the output voltage of a four-switch buck-boost converter. To adjust the duty cycle, the Control subsystem uses a PI-based control algorithm. In both the boost and buck modes, one switch controls the duty cycle, one is operated inversely and the other two are kept in fix positions. The input voltage and the system load are considered constant throughout the simulation. The total simulation time (t) is 0.25 seconds. At t = 0.15 seconds, the voltage reference changes and the system switches from buck mode to boost mode.
The plot below shows the requested and measured voltage for the test and the input voltage in the circuit.