You are on page 1of 17

PRACTICUM REPORT

DIGITAL TELECOMMUNICATION

Class TT 2E
Khusnul Khotimah 1831130043

PROGRAM STUDY TELECOMMUNICATION ENGINEERING


ELECTRICAL ENGINEERING
STATE POLYTECHNIC MALANG
2020
TABLE OF CONTENTS

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

Figure 1. 1 Schematic of PWM....................................................................................2


Figure 1. 2 Duty Cycle Output of PWM.......................................................................2
Figure 1. 3 Wavefrom of SPWM..................................................................................3
Figure 1. 4 Matlab Simulation Result of SPWM Technique........................................8
Figure 1. 5 SPWM Multisim Circuit............................................................................9

ii
TABLE OF TABLES

Table 1. 1 Multisim Simulation Result.........................................................................9

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

Figure 1. 2 Duty Cycle Output of PWM


1.2.2 Sinusoidal Pulse Width Modulation (SPWM)
Sinusoidal pulse width modulation (SPWM) is a technique of pulse width
modulation used in inverters. An inverter generates an output of AC voltage
from an input of DC with the help of switching circuits to reproduce a sine
wave by generating one or more square pulses of voltage per half cycle. If the
size of the pulses is adjusted, the output is said to be pulse width modulated.
With this modulation, some pulses are produced per half cycle. The pulses
close to the ends of the half cycle are constantly narrower than the pulses
close to the center of the half cycle such that the pulse widths are comparative
to the equivalent amplitude of a sine wave at that part of the cycle. To change

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.

Figure 1. 3 Wavefrom of SPWM


1.3 Experiment Apparatus
1. Matlab software
2. Multisim software
1.4 Procedure
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:');
%input0.1*your presence number
4. b=input('Enter Amplitude of Triangular Signal:');
%input0.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');

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

3. Observe the result.


1.4.2 Multisim Simulation
1. Create SPWM circuit as shown in Fig. 1. You can use two two-channel-
oscilloscopes if your multisim doesn’t support 4-channel one.

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:

ft=11; %input your presence number

 Used to create and determine the variable ft value of 11

fm=1.1; %input 0.1*your presence number

5
 Used to create and determine the variable fm value of 1.1

a=1.1; %input 0.1*your presence number

 Used to create and determine the variable a value of 1.1

b=1.1; %input 0.1*your presence number

 Used to create and determine the variable b value of 1.1

f_sampling=100*ft; %sampling frequency

 Used to create and determine the variable f_sampling valued at


100*f

t=0:1/f_sampling:2/fm;

 To declare a value of t, f_sampling, fm by describing dots (:)

stooth=b.*sawtooth(2*pi*ft*t,0.5); %generating a
triangular wave

 To declare the value of variable stooth according to the formula


as generating a triangular wave

subplot(2,1,1);

 Is the number of rows (2), number of columns (1), and subplot


number (1)

plot(t,stooth,'k-'); % plotting the triangular


wave

 Intended to draw a curve by pairing the defined points t and


stooth. Whereas 'k-' shows if the color of the curve requested is
black with a solid line

msg=a.*sin(2*pi*fm*t); %generating message wave

6
 To declare the value of variable msg according to the formula as
generating messsage wave

hold on

 To ‘hold’ the previous image so that it is not erased when a new


image is overwritten

plot(t,msg,'r-'); %plotting the sinusoidal


message wave

 Intended to draw a curve by pairing the defined points t and msg.


Whereas 'r-' shows if the color of the curve requested is red with a
solid line

title('Comparator and Message Wave');

 Title the plot area with the name 'Comparator and Message
Wave’

legend('Comparator Wave','Message Wave'); %attach


legend on the figure

pwm=zeros(1,length(stooth));

 To declare the value of variable pwm according to the formula as


information signal

for i=1:length(stooth)

 To repeat a command in a user-specified amount based on the


fulfillment of the expression function i=1:legth (stooth)

if (msg(i)>=stooth(i))

pwm(i)=1; %is message signal amplitude at i th


sample is greater than

7
%sawtooth wave amplitude at i th sample

 The if command we can insert it in the program, and the if


command will run if a count shows a number that matches the
statement carried by the if command itself

else

 Else is a command that functions as an exception to the if


command, so when a number appears and does not enter the if
statement statement criteria, then the else command will run

pwm(i)=0;

 Else is a command that functions as an exception to the if


command, so when a number appears and does not enter the if
statement statement criteria, then the else command will run

end

 States the conditional statement has ended. So that it can proceed


to the program command afterwards

end

 States the conditional statement has ended

subplot(2,1,2);

 Is the number of rows (2), number of columns (1), and subplot


number (2)

plot(t,pwm,'b');

 Intended to draw a curve by pairing the defined points t and


pwm. Whereas 'k-' shows if the color of the curve requested is
blue with a solid line

xlabel ('Time');

8
 Label the X axis with the word 'Time'

ylabel ('Amplitude');

 Label the Y axis with the word 'Amplitude'

title('SPWM signal');

 Title the plot area with the name 'SPM Signal’

axis([0 max(t) 0 1.1]); %to keep the pwm visible


during plotting.

 Ask matlab to make the size / dimensions of the box that will be
occupied by the graph

2. Show your matlab simulation result and variables value!


My presence number is 11, then, the value of:
fs = 11
fm = 0.1 × 11 = 1.1
a = 0.1 × 11 = 1.1
b = 0.1 × 11 = 1.1

Figure 1. 4 Matlab Simulation Result of SPWM Technique


3. Show your multisim simulation result and variables value!
My presence number is 11, then:
a. Function Generator 1 = sinusoidal signal

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

[1] Firman, “Pulse Width Modulation”, May 2019 [Online]. Available:


http://kl301.ilearning.me/2015/05/19/tentang-pwm-pulse-width-modulation/
[Accesed on May 7, 2020]
[2] Unknown, “Siunsoidal Pulse Width Modulation” July 2019 [Online].
Available: https://www.watelectronics.com/sine-pulse-width-modulation-
spwm-working/ [Accessed May 7, 2020]
[3] Tutorials Point, “Pulse Width Modulation” June 2012 [Online]. Available:
https://www.tutorialspoint.com/power_electronics/power_electronics_pulse_
width_modulation.htm [Accessed May 7, 2020]

13

You might also like