Phase Vignesh
Phase Vignesh
Aim
To implement and analyze phase modulation (PM) using Python's NumPy and
Matplotlib libraries.
Apparatus Required
Theory
Phase Modulation (PM) is a technique where the phase of the carrier wave is varied
in proportion to the instantaneous amplitude of the input signal (message signal).
Unlike frequency modulation, where the frequency is varied, in phase modulation, the
phase angle of the carrier wave changes with the amplitude of the message signal.
Algorithm
o Initialize Parameters:
o Set values for carrier amplitude (AcA_cAc ), carrier frequency (fcf_cfc
), message frequency (fmf_mfm ), sampling frequency, and
phase deviation sensitivity (kpk_pkp ).
o Generate Time Axis:
o Create a time vector for the signal duration based on the
samplingfrequency.
o Generate Message Signal:
o Define the message signal as a cosine wave.
o Generate PM Signal:
o Apply the PM modulation formula to obtain the modulated signa
Plot the Signals:
o Use Matplotlib to plot the message signal, carrier signal, and phase-
modulated signa
PROGRAM:
import numpy as np
import matplotlib.pyplot as plt
fc = 60
fm = 10
fs = 6000
Am = 10
Ac = 20
kp = 3.7
t = np.arange(0, 2/fm, 1/fs)
em = Am * np.sin(2 * np.pi * fm * t)
ec = Ac * np.sin(2 * np.pi * fc * t)
epm = Ac * np.sin(2 * np.pi * fc * t + kp * em)
plt.figure(figsize=(10, 8))
plt.subplot(3, 1, 1)
plt.plot(t, em,color='r')
plt.title('Message Signal (em)')
plt.xlabel('Time [s]')
plt.ylabel('Amplitude')
plt.subplot(3, 1, 2)
plt.plot(t, ec,color='g')
plt.title('Carrier Signal (ec)')
plt.xlabel('Time [s]')
plt.ylabel('Amplitude')
plt.subplot(3, 1, 3)
plt.plot(t, epm,color='b')
plt.title('PM Modulated Signal (epm)')
plt.xlabel('Time [s]')
plt.ylabel('Amplitude')
plt.tight_layout()
plt.show()
OUTPUT:
TABULATION:
CALCULATION:
Result
The message signal, carrier signal, and phase-modulated (PM) signal will be
displayed in separate plots. The modulated signal will show phase variations
corresponding to the amplitude of the message signal.