Does PLECS have a module for variable time delay?

I need to implement variable-frequency phase-shifted operation, but it seems that PLECS does not have a built-in variable time delay block. Are there any reference examples studies available?

Hi alps, that sounds like an interesting modulator. Could you provide a bit more detail, for example the PWM patterns you are trying to achieve?

PLECS includes a built-in Variable Phase Modulator and a Variable Frequency Modulator, but not both in a single component. However, if you are using PLECS code generation, the TI C2000 PWM (Variable) component supports both variable phase shift and variable frequency. This allows you to both generate code for the MCU and simulate the behavior in the offline model.

What I mean is that a PWM wave is input, which will have a time delay. The delay time is provided by an external input and varies continuously.

However, it seems that the waveform delay blocks in PLECS only support fixed time delay

Hi alps, have you considered using the Turn-on Delay component with the parameter Dead time source set to external? Alternately, maybe the Monoflop component with the Pulse duration source set to external might provide the functionality you are looking for. Again, a model might make it easier to provide a more tailored solution for your challenge.

Hi,munadir. Thanks for your suggestions

The Turn-on Delay block can only delay the turn-on instant, but what I want is to achieve a delay of the entire waveform, and the delay time is constantly changing. I’m really sorry, but my computer isn’t with me right now. I’ll send you my model tomorrow.

By the way, how does the Monoflop block achieve this function? Could you roughly explain the implementation idea? I want to try it on my own first.

Hi,munadir.I’ve been trying to use C-script to write a module that can delay for an arbitrary length of time, but I keep running into issues.

delay.plecs (27.0 KB)