Simple implementation of a variable peak sawtooth generator?

Mostafa_Amer
Thu, 21 Dec 2023 15:11:47 +0000
PLECS

I want to implement a fixed-frequency sawtooth generator with a peak voltage (Vpk) that I can control using an external variable (Vx). I created a simple circuit using a voltage controlled current source, a capacitor, and a reset switch like the figure below. However, this circuit increase the single simulation time from 0.2 second to 2.7 second. The time factor is important for me because I am doing thousands of simulation runs (optimization loop).

Is there a simpler and faster way to implement this variable-peak sawtooth generator (ideal ways are ok)?

Thanks

BuckClosedLoop_PI_FF.plecs (35.9 KB)

2 posts - 1 participant