Professional Documents
Culture Documents
Practicum Report Digital Telecommunication: Class TT 2E Khusnul Khotimah 1831130043
Practicum Report Digital Telecommunication: Class TT 2E Khusnul Khotimah 1831130043
DIGITAL TELECOMMUNICATION
Class TT 2E
Khusnul Khotimah 1831130043
TABLE OF CONTENTS..............................................................................................i
TABLE OF FIGURES.................................................................................................ii
TABLE OF TABLES..................................................................................................iii
SIMULATION OF SINUSOIDAL PULSE WIDTH MODULATION (SPWM)
TECHNIQUE...............................................................................................................1
1.1 Ojective.............................................................................................................1
1.2 Basic Theory.....................................................................................................1
1.2.1 Pulse Width Modulation (PWM)......................................................................1
1.2.2 Sinusoidal Pulse Width Modulation (SPWM)..................................................2
1.3 Experiment Apparatus......................................................................................3
1.4 Procedure..........................................................................................................3
1.4.1 Matlab Simulation.............................................................................................3
1.4.2 Multisim Simulation.........................................................................................4
1.5 Measurement Result and Discussion................................................................5
1.6 Conclusion......................................................................................................10
REFERENCES...........................................................................................................11
i
TABLE OF FIGURES
ii
TABLE OF TABLES
iii
SIMULATION OF SINUSOIDAL PULSE WIDTH MODULATION (SPWM)
TECHNIQUE
1.1 Ojective
1. To understand the operation theory of SPWM
2. To simulate SPWM using Matlab
3. To simulate SPWM using Multisim
1.2 Basic Theory
1.2.1 Pulse Width Modulation (PWM)
PWM (Pulse Width Modulation) is a modulation technique by
changing the pulse width (duty cylce) with a fixed amplitude and frequency
value. One pulse cycle is a high condition then it is in the transition zone to a
low condition. PWM pulse width is directly proportional to the amplitude of
the unmodified original signal. Duty Cycle is a representation of the logic
high condition in a signal period and expressed in the form (%) with a range
of 0% to 100%, for example if the signal is in a high condition continuously
means to have a duty cycle of 100%. If the time of a high signal is the same
as a low state then the signal has a duty cycle of 50%.
How it works from PWM is to compare the two inputs of an Op-Amp,
namely inverting and non-inverting amplifiers. Sawtooth wave is given to
the non-inverting input continuously and the number of these pulses
determines the output frequency, while the inverting input makes it a
determinant of the output form called duty cycle. Duty cylcle can vary at a
fixed frequency. This means that the duty cycle does not affect the number of
frequencies. Duty cycle determines what percentage of time on and off time
in a period. Sawtooth pulses and comparable pulses can be exchanged for the
reverse arrangement. For example, if you want to increase the duty cycle
when given a positive voltage comparison then the triangle pulse is given to
the inverting input but if you want the duty cycle to decrease when given a
positive voltage then the sawtooth pulse is given to the non-inverting input.
1
Figure 1. 1 Schematic of PWM
2
the efficient output voltage, the widths of all pulses are amplified or reduced
while keeping the sinusoidal proportionality. With PWM only the on-time of
the pulses are changed during the amplitudes.
3
16.legend('Comparator Wave','Message Wave'); %attach legend
on the figure
17.
18.pwm=zeros(1,length(stooth));
19.for i=1:length(stooth)
20.if (msg(i)>=stooth(i))
21.pwm(i)=1; %is message signal amplitude at i th sample is
greater than
22.%sawtooth wave amplitude at i th sample
23.Else
24.pwm(i)=0;
25.end
26.end
27.
28.subplot(2,1,2);
29.plot(t,pwm,'b');
30.title('SPWM signal');
31. axis([0 max(t) 0 1.1]); %to keep the pwm visible during
plotting.
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:
fs = 28
fm = 0.1 × 28 = 2.8
a = 0.1 × 28 = 2.8
b = 0.1 × 28 = 2.8
4
2. Set Function Generator 1 to produce sinusoidal message signal with
frequency fm = 0.1 × presence number kHz and amplitude of 0.1 ×
presence number Vp.
3. Set Function Generator 2 to produce triangular comparator signal with ft=
presence number kHz and amplitude of 0.1×presence number Vp and
50% duty cycle.
4. Example: if your presence number is 28, then:
a. Function Generator 1 = sinusoidal signal
fm = 0.1×28 = 2.8 kHz.
Amplitude = 0.1×28 = 2.8 Vp
b. Function Generator 2 = triangular signal with 50% duty cycle
ft = 28 kHz.
Amplitude = 0.1x28 = 2.8 Vp
5. Observe the output
1.5 Measurement Result and Discussion
1. Write the Matlab source code that you used to generate the modulation
signal, including explanation of each code line!
The source code that I used to generate the modulated signal:
5
Used to create and determine the variable fm value of 1.1
t=0:1/f_sampling:2/fm;
stooth=b.*sawtooth(2*pi*ft*t,0.5); %generating a
triangular wave
subplot(2,1,1);
6
To declare the value of variable msg according to the formula as
generating messsage wave
hold on
Title the plot area with the name 'Comparator and Message
Wave’
pwm=zeros(1,length(stooth));
for i=1:length(stooth)
if (msg(i)>=stooth(i))
7
%sawtooth wave amplitude at i th sample
else
pwm(i)=0;
end
end
subplot(2,1,2);
plot(t,pwm,'b');
xlabel ('Time');
8
Label the X axis with the word 'Time'
ylabel ('Amplitude');
title('SPWM signal');
Ask matlab to make the size / dimensions of the box that will be
occupied by the graph
9
fm = 0.1×11 = 1.1 kHz.
Amplitude = 0.1×11 = 1.1 Vp
b. Function Generator 2 = triangular signal with 50% duty cycle
ft = 11 kHz.
Amplitude = 0.1x11 = 1.1 Vp
10
Figure 1. 5 SPWM Multisim Circuit
Table 1. 1 Multisim Simulation Result
Presence
No Output Signal
Number
Comparator Wave
gn
al
Message Wave
1 11
SPWM Signal
11
4. Based on the simulation result, what is the basic principle of SPWM?
The basic principle of SPWM is to adjust the pulse width that follows
the pattern sinusoidal wave. Comparators are used to compare waves
sinusoidal and triangular waves. If the sinusoidal voltage value is greater
than triangle voltage then the comparator output will be worth 1 (high).
However, if sinusoidal voltage is smaller than triangle voltage then the
comparator output will be value 0 (low).
Modulate the carrier signal that is used a sine signal with amplitude
and maximum frequency. As a carrier wave, a modulation wave (signal sine)
must not be greater than the frequency of the triangular signal. Comparison
between the amplitude of a sinusoidal wave with a triangle wave is called the
modulation index amplitude. In the SPWM signal, the output frequency of the
Inverter output depends on the signal frequency reference.
5. Write minimum 2 implementations of PWM technique!
Implementations of PWM technique are used for regulating DC motor speed,
adjusting the brightness or dim LED, and controlling the angle of the servo
motor. Example of the use of PWM in setting the speed of a DC motor, the
greater the value of the duty cycle given will affect the speed of the motor
rotation. If the value of the duty cylinder is small then the motor will move
slowly.
1.6 Conclusion
The refernce voltage is greater than the carrier voltage, the comparator output
will be high.
The reference voltage is less than the carrier voltage, the comparator output
will be low.
12
REFERENCES
13