The inductor alternately stores energy as magnetic flux, and releases energy as current.
- transistor on: ‘charging’ L1 (building flux)
- transistor off: ‘discharging’ L1 (collapsing flux)
During that second phase, as the flux collapses, the voltage across L1 flips, dumping current through the diode and into the load.
Here's a Falstad sim to try (try it here):
I modified the inductor to a smaller value (100uH) which is more appropriate for a 50kHz switching frequency. You can do the same for your sim, it should work then. 10mH is much too big.
The takeaway is, the same energy is loaded into the inductor during 'charge', then released during 'discharge' into the output. If, for example, you're stepping voltage up 10x, the output current will be about 1/10th the input current. But the power and energy are the same, less losses. So if you have 1A in, you get at 10x the voltage at a bit less than 100mA for your trouble.
With a buck it's the opposite: you're stepping down. If you're inputting 1A and stepping down 10:1, then the output is 10A but at 1/10th the output voltage.
In either case, the power in is the same as power out (less losses.)
What is ‘stepping ratio’? It’s the ratio of Vin to Vout. Stepping ratio roughly correlated with the PWM duty cycle. The relationship for a boost is expressed as:
- Duty cycle = 1 - Vin/Vout
So a 90% duty yields 10x the voltage and 1/10 the current.