Pulse delay in Simulink

Thread Starter

chaosmc

Joined May 21, 2012
17
Hi all,

I've been stuck for a while with this idea and i want to ask for your opinion. I create 3 pulses in simulink, with Ts switching period, da, db, and dc the equivalent duty cycles. da+db+dc=1 if it helps at all. It is about PWM pulses i use for my switches. The duty cycles are variable in every switching cycle but Ʃd=1 all the time of course.

The thing is that what i want is when the first pulse ends, the second will start and when the second one has finished the third one will start. So my problem is that i need to delay the second pulse as long the first pulse is one and also i need to delay the third pulse as long as the durations of the first and second pulses together.

I have tried with delay blocks and at the delay length i choose input port but so far unsuccessfully. I tried with counters too but i got confused, too.

Any ideas will be highly appreciated. Thanks
 

ActivePower

Joined Mar 15, 2012
155
Can't you vary just one of the delays, say for A and adjust delays into B and C accordingly?

Anyways, I'm just shooting in the dark here. I'll try this for myself and let you know how it works out.
 

Thread Starter

chaosmc

Joined May 21, 2012
17
Can't you vary just one of the delays, say for A and adjust delays into B and C accordingly?

Anyways, I'm just shooting in the dark here. I'll try this for myself and let you know how it works out.

Thanks for the reply ActivePower. The pulses are created from one carrier signal. The pulses get TRUE at the same time but they get FALSE according to their equivalent duty cycle. I cannot vary the delay for any of them. It is just like if you take 3 pulse generator blocks and set them exactly the same except for their pulse width. Of course in my problem the duty cycles vary in every switching period!

I thought it would be an easy task but I am getting so lost here...:confused: Anyway,thanks again!
 

Thread Starter

chaosmc

Joined May 21, 2012
17
Create a repeating sequence which lasts as long as the switching frequency and outputs values from 0 to 1 with step the simulation step.
Compare this value with the 3 duty cycles with simple logic gates.
Pulses ready.
So simple...*bangsheadonthescreen*;)
 
Top