I have simulated a buck converter in LTSPICE, and below is the switching signal (red )that goes into an RLC filter( vout as green).
The filter does not average the switching pulses, So I believe the value for L and C are not correct. I increased the inductor to L=10u, and I was able to have a sharper increase to 28 V: I was thinking that if I decrease the discharging time by increasing capacitor, I will be able to get a smooth output, like this:
However, It does not matter what values I change the capacitor to, the vout still reaches to zero. Could you please explain how I can control the rising and falling portion of the VOUT?