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.

Is there a variable delay block?

0 votes
1,716 views
Hello,

I am trying to implement a controller where I am looking to have a variable delay. Is there a way to implement this in PLECS? There is a Simulink block which offers the delay time as a second input, but I cannot find this option in PLECS.

Thanks,

Matt
asked Jul 24, 2018 by mwamyotte (12 points)
Can you tell us a bit more about what this variable delay is needed for? Is it for realizing a pulse-width modulation scheme?
Hi Beat,

I am implementing a constant on-time critical conduction mode PFC. In order to ensure the bus voltage is maintained for different input voltages, the constant on-time must be controlled. Please refer to the figure for the implementation using an SR flip-flop.

I have managed a workaround by building my controller in Simulink (which has a variable delay block), but if there is a solution in PLECS that would be great.

Thanks,

Matt
Hi Matt,

Our State Machine component is likely a good choice for this. With PLECS 4.1, we introduced an AFTER keyword to trigger delay-based transitions. Take a look at the "Buck Converter with Constant On-Time Control" model, included with the PLECS demo library.

Beat

1 Answer

0 votes
Hi.

I was trying to solve the same problem for another reason, but there isn't such block in the library.

What you can do is see how the Simulink block is built and replicate it in Plecs.

Otherwise, you should write a C-Script to implement what you need...
answered Jul 24, 2018 by nikilito (112 points)
...