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.

How can I create a periodic time based function

0 votes
653 views
I want to repeat a damped sinusoid during the simulation. The sinusoid damps to zero in <100ms but repeats every 400ms. How can to created this repetitive signal?
asked Oct 22, 2020 by ddivins (14 points)

1 Answer

0 votes
Hello,

I have attached a basic working PLECS Standalone example that you can reference and modify for different timing, magnitudes, frequency, etc.

The logic uses a pulse generator to enable a subsystem every 100ms. The input to the enabled subsystem is a repeating linear ramp signal from 1 to 0 every 100ms, but by using the enabled subsystem we can effectively only select every 4th ramp iteration, such that it actually repeats every 400ms. This repeating (and delayed) ramp signal is then multiplied by the sinusoid and the negative slope of the ramp causes an attenuation behavior.

To open this model in PLECS Blockset, add an empty PLECS Circuit block in a Simulink model and from the File menu, choose "Import from Standalone".

Please study this implementation and then let me know if you have questions.

Regards,

Kris
answered Oct 22, 2020 by Kris Eberle (1,583 points)
Thanks. I looked at it and is there a way to multiply the sine wave with a repeating exponential decay rather than a negative going ramp.
See attached. Is this what you mean?
Thank you that is the waveform that I wanted.
...