pwm signal generation

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..

 채택된 답변

Paulo Silva
Paulo Silva 2011년 4월 17일

0 개 추천

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

Rmzn
Rmzn 2011년 4월 17일
Thanks Mr Paula;
but i didnt mean this. i need this process in simulink model,i have a discrete sinusoidal Soruce which is used from "Signal Processing Toolbox". can you suggest sth to do this ??
thanks very much..
Paulo Silva
Paulo Silva 2011년 4월 17일
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)

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Arnaud Miege
Arnaud Miege 2011년 4월 17일

1 개 추천

Use the Saturation block.
HTH,
Arnaud

댓글 수: 1

Rmzn
Rmzn 2011년 4월 17일
thanks a lot Mr Arnoud.! That is what i was looking for :))

댓글을 달려면 로그인하십시오.

커뮤니티

더 많은 답변 보기:  Power Electronics Community

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

질문:

2011년 4월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by