how to generate the switching pulses

3 次查看(过去 30 天)
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 个)

类别

Help CenterFile Exchange 中查找有关 Signal Processing Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by