
pwm signal generation
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
hi; i want to generate i pwm signal for an inverter. For this, i have a sinus signal which has amplitude btw -5 and +5. But i need to chop its negative intervals. how can i implement this in digital signal processing tools? i will use this in f2808 dsp chip for generating triggering signals to the mosfets..
0 commentaires
Réponse acceptée
Paulo Silva
le 17 Avr 2011
f=1e3;a0=0;AmpSin=5; %sample wave values
t0=0;tf=0.01;Ts=1e-6; %time vector and resolution
v=0;AmpPwm=1; %Pwm options, increase v for lower dutty-cycle
t=t0:Ts:tf; %create the time vector
fun=AmpSin*sin(2*pi*f*t+a0); %create the function
pwm=AmpPwm*(fun>v); %get the pwm
%plot it just to know if its working
clf
plot(t,fun)
hold on
plot(t,pwm,'r')
Alternative implementation in simulink

2 commentaires
Paulo Silva
le 17 Avr 2011
I'm sorry but you only mentioned simulink now, please follow Arnaud suggestion or do the same thing I did with my code on simulink (it's just simple math and comparison blocks)
Plus de réponses (1)
Communautés
Plus de réponses dans Power Electronics Control
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!