Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Triangular wave with variable frequency

0 votes
1,440 views
Hello.

I would like to know how to make a triangular or sawtooth wave in PLECS with a variable frequency in time. I tried with a C-Script, but it makes the simulation slower and because of the time delay, the frequency is not on point.

Thanks in advance.
asked Aug 15, 2022 by Seyager (17 points)

1 Answer

0 votes
 
Best answer
A good reference for variable frequency ramp generation is the "Half-Bridge LLC Converter with Analysis Tools" demo model.  Refer to the "VCO w/ programmable clock duty cycle" subsystem which implements the carrier generation.  It uses a resettable integrator to generate a sawtooth waveform.  The sawtooth waveform is then mapped into a triangular waveform.

I attached a model of that subsystem here as well.
answered Aug 18, 2022 by Bryan Lieblick (1,853 points)
edited Aug 18, 2022 by Bryan Lieblick
...