Why do we use closed-loop feedback in buck converters?
The main thing you are missing is that what is put into the LC filter is not necessarily always a square wave. It is when the buck converter is in continuous mode, but unless you know that to always be the case, you can't assume the square wave input to the filter as you are.
In continuous mode, the output voltage is ideally the input voltage times the duty cycle. However, it's not that simple in the real world. Even if the input voltage stays constant, there is the DC resistance of the inductor to consider, the voltage across the switch, and the voltage across the diode from ground during the pulse low time.
The latter can be mitigated by synchronous rectification, but that isn't perfect either. At the least, there is the voltage drop across whatever is being used as the synchronous rectifier switch. Synchronous rectification timing is also usually made conservative, meaning it errs on the side of staying on a little too short rather than too long. The cost of turning off a little early is more voltage drop at the end of the flyback part of the pulse. However, the cost of turning on too late is shoot thru, which rapidly decreases efficiency, and risks damaging parts.
I have seen pre-regulation power supplies which were fixed duty cycle buck switchers. In one case, it was used to drop a 48 V distribution voltage down to a rough 12 V, which was distributed locally and dropped to the final regulated voltages by other power supplies. It didn't matter if the 12 V varied a bit.
A general purpose power supply has to be designed to handle low load too. Below some load for any switching frequency, a buck switcher can't maintain continuous mode. Some OEM supplies simply state a minimum load is required.
More general purpose supplies fall back to discontinuous mode. In that case your fixed square wave assumption fails. Now there are really 3 parts to the cycle. At the start, the input to the LC filter is actively driven high. When that stops, the flyback part begins, which drives the input actively low. Then there is the third phase in discontinuous mode where you consider the input effectively high impedance. The function of duty cycle to output voltage is not longer linear.
A buck converter can indeed be visualized as a low-impedance square-wave generator feeding a low-pass filter combining an inductor \$L\$ and a capacitor \$C\$. However, as you can imagine, when the power switch closes, \$V_{in}\$ is not the value applied to the left-side inductor terminal. The input source undergoes a voltage drop inherent to the power switch \$r_{DS(on)}\$ and the inductor ohmic loss \$r_L\$. As a result, the on-state inductor voltage is not \$V_{in}-V_{out}\$ but less than that as shown in the left-side picture:
During the off-time, in continuous conduction mode or CCM, the left terminal of the inductor does not drop to 0 V but to the diode forward drop which forces the node to swing below ground. Therefore, when you apply the volt-second balance law for the inductor, you realize that the full output voltage formula including these losses differs from the simple one in CCM, \$V_{out}=DV_{in}\$. You could further complicate the expression by including the diode recovery time and the switch turn- on and off losses.
Practically speaking, as you said, a CCM-operated buck converter with 0 parasitics and operated at a constant input voltage would not need a loop to maintain its output operating point. However, as you can see, several parasitic elements affect the dc transfer function and a control loop needs to correct the control voltage forcing the output voltage to meet the target. The load resistance will affect the corner frequency but very marginally actually, involving \$r_L\$ and \$r_C\$. The loop is there to truly make the regulator (the setpoint is fixed) immune to external perturbation like the input voltage and the output current. See the below picture:
You see the effect of the loop on several parameters:
- the output voltage: obviously you want a precisely-regulated \$V_{out}\$ so you need gain in your loop (no gain, no control system) to a) reduce as much as possible the static error b) ensure a fast-reacting system to a sudden power demand c) make the system robust to external perturbations.
- the output impedance: as you can see, the output impedance is hampered by all the parasitics like the \$r_{DS(on)}\$, the ohmic losses etc. The small-signal response to a step is dictated by the output impedance. You thus want this impedance to be of sufficiently-low value to make sure the output drop when the load current changes remains reasonable. The gain of the loop will work to reduce the output impedance by the sensitivity function \$S=\frac{1}{1+T(s)}\$ in which \$T\$ is the loop gain.
- same for the other perturbation, \$V_{in}\$. When you have \$V_{out}=DV_{in}\$ you can see that if you differentiate \$V_{out}(V_{in})\$ with respect to \$V_{in}\$ you obtain \$D\$. That means that any static change in the input voltage will be propagated to the output by \$D\$. Not very good. Again, the addition of the loop will improve this input voltage rejection or audiosusceptibility by the sensitivity function.
You are assuming Switch Mode Power Supply (SMPS) uses Pulse Width Modulation (PWM) to pass an average voltage level and the LC filter removes the switching part to leave that average voltage. However that is not how they work.
An SMPS uses PWM to pass energy from a source to store it onto a capacitor so that the voltage level on that capacitor is as defined by the feedback circuitry.
As the load changes, and requires more or less energy, the SMPS changes how fast that energy is transferred to keep that capacitor at the target voltage. If the load goes away completely the PWM can actually stop.
If your load is fixed and your input supply is also fixed, then some steady state PWM operation will happen, but that is actually quite rare. If you attempt it without feedback, ANY difference in load or source will cause the output voltage to drift one way or the other over time since the energy transfer will be either too high or too low.