Skip to content

Archana120906/AM-using-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

AM-using-Python

Aim

To implement and analyze amplitude modulation (AM) using Python's NumPy and Matplotlib libraries.

Apparatus Required

  1. Software: Python with NumPy and Matplotlib libraries
  2. Hardware: Personal Computer

Theory

Amplitude Modulation (AM) is a method of transmitting information over a carrier wave by varying its amplitude in accordance with the amplitude of the input signal (message signal). The amplitude of the carrier wave is varied according to the instantaneous amplitude of the message signal. The general form of an AM signal is:

Algorithm

  1. Initialize Parameters: Set the values for carrier frequency, message frequency, sampling frequency, and frequency deviation.
  2. Generate Time Axis: Create a time vector for the signal duration.
  3. Generate Message Signal: Define the message signal as a cosine wave.
  4. Compute the Integral of the Message Signal: Calculate the integral of the message signal over time.
  5. Generate FM Signal: Apply the AM modulation formula to obtain the modulated signal.
  6. Plot the Signals: Use Matplotlib to plot the message signal, carrier signal, and modulated signal.

Program

import numpy as np
import matplotlib.pyplot as plt

Am=3.9
Ac=7.8
fc=3320
fm=332
fs=33200
t=np.arange(0,2/fm,1/fs)
m=Am*np.cos(2*np.pi*fm*t)
c=Ac*np.cos(2*np.pi*fc*t)
eam=(Ac+Am*np.cos(2*np.pi*fm*t))*np.cos(2*np.pi*fc*t)
plt.subplot(3,1,1)
plt.plot(t,m)
plt.show()
plt.subplot(3,1,2)
plt.plot(t,c)
plt.show()
plt.subplot(3,1,3)
plt.plot(t,eam)
plt.show()

Output Waveform

Screenshot 2025-10-23 223808

Tabular Column

WhatsApp Image 2025-10-23 at 22 13 44_fa6bdf40

Calculation

WhatsApp Image 2025-10-23 at 22 13 45_e5e640d9

Result

The message signal, carrier signal, and amplitude modulated (AM) signal will be displayed in separate plots. The modulated signal will show amplitude variations corresponding to the amplitude of the message signal.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published