Skip to content

Vismaya-1207/AM-Using-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

AM-Using Python

Aim

To implement and analyze frequency modulation (FM) 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 frequency and phase of the carrier wave remain constant, while the amplitude changes based on the instantaneous value of the message signal.

Algorithm

1.Initialize Parameters: Set the values for carrier frequency, message frequency and sampling frequency.

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 AM 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=7.0
Fm=549
Ac=14
Fc=5490
Fs=54900
t=np.arange(0,2/Fm,1/Fs)
m=Am*np.cos(2*np.pi*Fm*t)
plt.subplot(3,1,1)
plt.plot(t,m)
c=Ac*np.cos(2*np.pi*Fc*t)
plt.subplot(3,1,2)
plt.plot(t,c)
s=(Ac+m)*np.cos(2*np.pi*Fc*t)
plt.subplot(3,1,3)
plt.plot(t,s)

Output Waveform

image

Tabular Column

WhatsApp Image 2025-10-23 at 13 39 32_85d34349

Calculation

WhatsApp Image 2025-10-23 at 13 47 17_8c4c2cc5

Result

The message signal, carrier signal, and amplitude modulated (AM) signal will be displayed in separate plots. The modulated signal will show frequency 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