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.

PLECS- how to implement continuous integration

0 votes

I want to sample current across inductor in regular time samples. For example find current delta at t(i+1)-t(i). How can I implement that. I tried using function block. inductor current is a continuous signal. I want to find delta between two successive samples continuously.


Any help is appeciated.


asked Jan 15, 2021 by Samk (16 points)

1 Answer

0 votes

> I want to sample current across inductor in regular time samples.

If the sample instances are fixed, then one approach is to use the Zero-Order Hold (ZOH) Block with a Discrete-Periodic sample time input.  You can enter the sample time parameter as "Tp" or "[Tp,To]" where Tp is the sample period and To is the offset in seconds within that sample period (0≤To<Tp).  You could then use ZOHs with different offsets and subtract the results.

A basic example is attached.


answered Jan 18, 2021 by Bryan Lieblick (1,301 points)
Thanks Bryan.This helps