Professional Documents
Culture Documents
TECHNIQUE
1.1 Objectives
1 To understand the operation theory of SPWM
2 To simulate SPWM using Matlab
3 To simulate SPWM using Multisim
1.2 Basic Theory
Give a brief explanation about:
1. Pulse Width Modulation (PWM)
2. Sinusoidal Pulse Width Modulation (SPWM)
1.3 Experiment Apparatus
1. Matlab software
2. Multisim software
1.4 Procedures
1.4.1 Matlab Simulation
1. Type the following script onto your M-File
1. ft=input('Comparator Triangular frequency:'); %input your
presence number
2. fm=input('Message frequency:'); %input 0.1*your presence
number
3. a=input('Enter Amplitude of Message signal:'); %input
0.1*your presence number
4. b=input('Enter Amplitude of Triangular Signal:'); %input
0.1*your presence number
5. f_sampling=100*ft; %sampling frequency
6. t=0:1/f_sampling:2/fm;
7.
8. stooth=b.*sawtooth(2*pi*ft*t,0.5); %generating a triangular
wave
9. subplot(2,1,1);
10. plot(t,stooth,'k-'); % plotting the triangular wave
11.
12. msg=a.*sin(2*pi*fm*t); %generating message wave
13. hold on
14. plot(t,msg,'r-'); %plotting the sinusoidal message wave
15. title('Comparator and Message Wave');
16. legend('Comparator Wave','Message Wave'); %attach legend on
the figure
17.
18. pwm=zeros(1,length(stooth));
2. Input your presence number as fs value. For fm, a, and b value, input 0.1 × your
presence number. For example, if your presence number is 28, then, the value of:
= 28
= 0.1 × 28 = 2.8
= 0.1 × 28 = 2.8
= 0.1 × 28 = 2.8
3. Observe the result.
VCC T
XFG1 5.0V A B C D
COM U2
7
5
1
3 U1
6
XFG2 2
BUFFER
COM
LM741AH/883
4
VEE
-5.0V
1.6 Conclusion