System period length in AC sweep?

With a simple peak current mode controlled buck converter, the system period field of the dialog should be set to auto. I’m confident PLECS will determine the system period (which should be the switching period in your case) correctly. You can check it in the log, where it will tell you the automatically calculated value.

I would suggest to use the Impulse Response Analysis instead of the AC Sweep. It gives almost instant results.

See the attached model. I modified the peak current mode buck demo. Varying the perturbation amplitude has no effect on the bode plot, which is a good sign.

IControl.plecs (29.4 KB)