PWM Modulation and Demodulation
For
CE Project
Second Year (Semester-IV)
Bachelors in Engineering
By
Varunraj Bhirud D9A 06
Hrishikesh Pandit D9A 28
Supervisor
Mrs. Himali Patel
Department of Electronics and Telecommunication
Vivekanand Education Society’s Institute of Technology
Mumbai University
2024-25
AIM - To implement and analyze the Modulation and Demodulation of Pulse
Width Modulation (PWM) signals in MATLAB SimuLink.
APPARATUS - MATLAB SimuLink.
Blocks Used in Simulink:-
• Signal Generator
• Sawtooth Generator
• Multiplexer
• Subtract
• Comparator
• Data Type Conversion
• Integrator
• Monostable Multivibrator
• Product
• Low-pass Analog filter
• Gain
• Scope
CIRCUIT DIAGRAM-
WORKING OF CIRCUIT: -
I. Modulation
• The signal generator generates a sinusoidal signal which acts as the
modulating signal and the sawtooth generator generates a sawtooth signal
which acts as the carrier signal.
• Both of these signals are fed into the subtract block which subtracts the
sawtooth signal from the generated signal.
• The resulting difference between the sawtooth signal and the generated
signal is fed into a comparator which checks whether the difference is
greater than or equal to zero. If it is, it gives a high output and if not then it
gives a low output.
• The output of the comparator is the corresponding PWM signal. We can
observe this signal in the scope.
II. Demodulation
• The PWM signal is fed to two components namely the Data type
converter and a monostable multivibrator. The data type converter block
converts the data type of PWM signal from Boolean to a suitable data type
required for the demodulation process and the monostable multivibrator
acts as a synchronous pulse generator which generates pulses of fixed
width at the end of each PWM pulse.
• The converted signal is fed to an integrator which acts as the ramp
generator whose output is given to the product block along with the output
of the multivibrator. The output of this product block is the corresponding
Pulse Amplitude Modulated (PAM) signal.
• The generated PAM signal is fed to an analog low-pass filter which
removes the high frequency components of the PAM signal and then
reconstructs the original modulating signal.
• The reconstructed modulating signal is of different amplitude. So, we use
the gain block to adjust the amplitude so that the signal looks exactly like
the original modulating signal.
OBSERVATION AND RESULTS -
• The sinusoidal signal generated by the signal generator, that is the
modulating signal was modulated successfully into a Pulse Width
Modulated (PWM) signal with a sawtooth signal acting as the carrier
signal.
• The difference between both signals helped us determine if the sinusoidal
signal was greater than the sawtooth signal or not using the comparator
whose output was the PWM signal which was depicted in the Scope.
• This PWM signal was then fed to an integrator and a monostable
multivibrator respectively in order to generate a ramp signal and a
synchronous pulse signal which would generate a pulse at the end of each
PWM pulse.
• The product of the ramp signal and the generated pulse signal was the
corresponding PAM signal which was then passed through an analog low-
pass filter to produce a signal similar to the original modulating signal.
• The output of the filter was then fed to a gain block in order to reconstruct
the original modulating signal.
WAVEFORMS: -
1. Scope
2. Scope1
3. Scope2
CONCLUSION-
We successfully performed the modulation and demodulation of the sinusoidal
signal that was generated by the signal generator using the sawtooth signal as the
carrier signal in SimuLink. Using a comparator, we modulated the message
signal and we demodulated the PWM signal using an analog low-pass filter and
adjusted the amplitude of the resulting signal using a gain block in order to
reconstruct the original modulating signal. Doing so, we gained an in-depth
understanding of both the processes and how this method of modulation can be
used efficiently.