Hello! I'm trying to simulate the buck converter using statespace equations. I don't understand why the output voltage has a ripple in the second photo (uncompensated system) and then, in the first one there is no ripple (compensated system)
The Puse Generator has a period of 1/100000 seconds, which is injecting 100 KHz pulses into your system. The ripple is simply the response to those pulse. Try setting Period=10 and Amplitude=24 and you will get rid of the ripple.