I'm looking at the designs for a simple buck converter which has the P mosfet, inductor, capacitor and reverse based diode. Instead of PWM, I'm trying out to use an op-amp to switch the P mosfet but one thing that I notice is that if the load changes from low resistance to high resistance then the inductor spikes the voltage on the load to double what it is until it can re-stablise. (This is all in simulation)

Is this happening because I'm using the op-amp? How does using PWM affect the inductor in such a way that if the load would change from say 10 ohms to 100 ohms that the inductor won't spike the voltage? Perhaps PWM / fast switching keeps the inductor with such a low charge that when the load changes, the inductor doesn't have nearly enough voltage to do anything?

Cheers.


Question: Why does this sequence converges to $\pi$?
Answer: This is an extended comment: Interestingly enough, displaying the differences of consecutive terms of A000960 shows an amazing degree of fluctuation.