Role of Capacitor when switch is open in Buck Converter?
In a buck converter, the switch controls energy storage in the inductor. The average of the square wave applied to the filter will be the DC output level (12V @ 41.6% duty cycle = 5V average). The inductor acts as a current source to keep the output capacitor charged.

Depending on the load, switching frequency and inductor size, a fixed-frequency buck converter can operate in one of two modes. If the DC output current level is greater than half of the inductor current ramp, the converter is said to be in CCM (continuous conduction mode); if not, it's said to be in DCM (discontinuous conduction mode).

\$ I_o &gt; \dfrac{1}{2} \cdot \dfrac{[V_i-V_o]\cdot T_{on}}{L} \$ or

\$ I_o &gt; \dfrac{1}{2} \cdot \dfrac{-V_o\cdot T_{off}}{L} \$

In CCM, the inductor is sourcing current the entire time. The inductor current never goes to zero. The capacitor is always being charged by the inductor, so it never has to support the load by itself. The duty cycle will remain essentially fixed regardless of output current once in CCM.



In DCM, because the output current is less than half the inductor ramp current, the only way to regulate properly is to decrease duty cycle. This decrease in duty cycle leads to a third mode of operation, where the switch is off and the inductor has completely discharged.



(Some controllers will operate in what's called critical conduction mode, where instead of operating with fixed frequency and variable duty cycle, it operates with fixed duty cycle and adjusts the frequency to keep the converter exactly at the DCM/CCM threshold.)