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.


0 votes
Hi, when I use the pulse generator block i can choose the frequency of the sqaure wave form. PLECS samples the wave form two times at period so half of the period must be a integer multiple of the discretization step size.

If I use simultaneously two different pulse generators how will the softwer respond?
asked Sep 1, 2022 by Luca Mincato (32 points)

1 Answer

0 votes
If you use a fixed step solver or generate code from a PLECS model, all discrete time constants must be integer multiples of the solver step size. It doesn't matter how many time constants there are in the model since each of them must fulfil the criteria.

If you use a variable step solver PLECS automatically generates solver steps as needed in most cases. In particular, for a pulse generator it generates solver steps at the rising and falling edges of the signal. Depending on the simulation options "Synchronize fixed step sample times" and "Use single base sample rate" PLECS tries to find a common base rate and/or to synchronize the sample times in the system. This can be used to make sure, for example, that two pulse generators, one running with double the frequency of the other, are updated in the in the same simulation step whenever the slower of the two is updated.
answered Sep 5, 2022 by Oliver Schwartz (601 points)