PWMSim

LTspicePowerSim

Buck — peak current mode with PI loop

LTspicePowerSim's peak current-mode buck, its comparator, latch, slope and compensator as one switch.

Open and simulate
Press Run: the example simulates in your browser. Open and simulate takes it to the full app, where you can change it.

Try this

Halve the load resistance; the loop raises the current command to hold 1 V. Then press Run again.