how to generate the switching pulses
1 view (last 30 days)
Show older comments
Hello All, am working on a programme, where i should turn on a sequence of switches for a part of a switching duration,
Consider the switching frequency to be 50 kHz,
therefore Ts=1/Fs = 0.00002
now i divide the time into 3 parts Ta, Tb, To based on some condition such that Ts=Ta+Tb+To
now from t=0 to t=t+Ta/2 i have to turn on one set of switch, for the next duration that is from t+ta/2 to t+ta/2+tb/2 other set of switch should be on, like this 5 sequence is there , i have tried using for loop,
can anyone check my progrmme please.. please give the suggesstion if i can cut shot the programme
t=0;
if Region==1
for t=0:(t+Ta/2)
Sap=0
San=0
Sbp=0
Sbn=1
Scp=0
Scn=1
end
for t=(t+Ta/2):(t+Ta/2+Tb/2)
Sap=0
San=1
Sbp=0
Sbn=1
Scp=0
Scn=1
end
for t=(t+Ta/2+Tb/2):(t+Ta/2+Tb/2+To)
Sap=0
San=1
Sbp=1
Sbn=1
Scp=0
Scn=1
end
for t=(t+Ta/2+Tb/2+To):(t+Ta/2+Tb/2+To+Ta/2)
Sap=1
San=0
Sbp=0;
Sbn=0
Scp=1
Scn=0
end
for t=(t+Ta/2+Tb/2+To+Ta/2):(t+Ta/2+Tb/2+To+Ta/2+Tb/2)
Sap=0
San=0
Sbp=0
Sbn=0
Scp=1
Scn=0
end
0 Comments
Answers (0)
See Also
Categories
Find more on Waveform Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!