Is there a variable delay block?

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

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…

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