Академический Документы
Профессиональный Документы
Культура Документы
le:///home/aman/Dropbox/Lab 5.html
EECS 3451
Lab 05: Amplitude Modulation
Submitted by: Amanpreet Walia
Student No. : 212938734
Submitted on: November 29, 2015
Introduction
The basic idea behind the given lab is to explore the use of digital computers for the analysis, design, synthesis, and
simulation of an amplitude modulation (AM) system using Python where an information signal is multiplied by a sinusoid at a
much higher frequency.The phenomenon of modulation, its impact on the signal spectrum and how this is used to simulate
the modulation and demodulation of an audio signal. The main topics to be dealt in this labortary is frequency
shifting,amplitude modulation,demodulation,sampling,aliasing and Digital Fourier analysis. This forms the major objective of
the lab is to compute, display, and interpret frequency spectra of an amplitude modulated signal.Design and use digital filters
to prevent aliasing in your computer simulation of an AM system.Use your understanding of frequency-domain analysis and
digital filters to design and build a system for modulating and demodulating audio signals,prevent aliasing by using filters or by
changing the sampling rate.This lab is basically divided into two segments : Software Experiment and Hardware Experiment.
The hardware experiment requires us to use the envelope detection circuit to demodulate the modulated signal and obtain the
original signal.
Preparation
Question 1
Assume that the given signal tone is Acos(2 100t). We have to take modulating/carrier signal to be 2cos(2 250t) and then
apply low pass filter with cutoff frequency of 170 Hz to obtain tone of 150 Hz.
After this applying Low pass filter to modulated signal with cutoff frequency of 170 Hz we can block the high pass component
to obtain the desired signal
1 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
2 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
Question 2
Here the minimum frequency at which signal can be sampled is 200 Hz.
3 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
We have to use Low pass Filter with unity gain and cutoff frequency between 100 to 300 Hz to obtain the original signal back.
Question 3
4 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
5 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
Yes Aliasing will occur as the resulting spectrum will coincide with each other.This is because by using 2 kHz sampling
frequency we are have original spectrum occuring at intervals of 2 Khz period but original spectrum have bandwidth due to
which they coincide with each other.
Question 4
6 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
7 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
Problem 1
In this Problem we studied the frequency spectrum of amplitude modulated signal after doing amplitude modulation on cosine
wave.
8 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
9 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
Problem 2
10 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
In [115]: plt.figure(figsize=(16,8))
plt.plot(np.fft.fftfreq(data.size, d=1/rate),np.abs(np.fft.fft(data)/(rate*max
(t))), label='Frequency Spectrum')
plt.show()
11 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
In [116]: fc = 8000
t = np.arange(0,((data.shape[0])/rate),1/rate)
xc = (1+0.5*data)*np.cos(2*np.pi*fc*t)
plt.figure(figsize=(16.0,8.0))
plt.plot(xc[:1500])
#plt.xlim([0., xc.shape[0]])
plt.title('Modulated Speech Signal')
plt.ylabel('Amplitude(Voltage)')
plt.xlabel('Time(t)')
plt.show()
w3 = xc.astype(np.int16)
wav.write('modulated speech.wav',rate,w3)
In [117]: plt.figure(figsize=(16,8))
plt.plot(np.fft.fftfreq(xc.size, d=1/rate),np.abs(np.fft.fft(xc)/(rate*max(t))
), label='Frequency Spectrum')
plt.show()
12 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
Problem 3
13 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
14 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
Problem 4
15 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
Here the carrier frequency is obtained from the frequency spectrum of the signal as 16000 Hz and bandwidth as 3000 Hz.
16 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
17 of 22
2015-11-30 12:53 AM
Lab 5
18 of 22
le:///home/aman/Dropbox/Lab 5.html
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
In [127]: plt.figure(figsize=(16,8))
plt.plot(np.fft.fftfreq(y.size, d=1/rate4),np.abs(np.fft.fft(y)/(rate4)), labe
l='Frequency Spectrum')
plt.show()
In [128]: w4 = y.astype(np.int16)
wav.write('p4.wav',rate,w4)
With these modifications wave form was clearly heard hence being correctly demodulated.
Problem 5
19 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
We Obtain the following output from the osciloscope for amplitude modulation.
Problem 6
20 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
We use this circuit to obtain the required envelope to obtain the signal from the modulated wave
Since the equipment was not available in the lab,its only possible to obtain the waveform using simulation.
Discussion
21 of 22
2015-11-30 12:53 AM
Lab 5
le:///home/aman/Dropbox/Lab 5.html
In this lab we studied about amplitude modulation of signal and how modulation and demodulation can be actually
implemented.We studied the modulation technique in both frequency as well as time domain.While domain serve as actual
physical representation of the signal, analysis in frequency domain serve as more important tool to analysze the signals.We
used Fourier analysis to analyze the signals for determing their frequency spectrum.We analysed how sampling frequency is
closely related to frequency of signal and how signal is effected if it is sampled at frequency lower than the minimum
frequency.Amplitude demodulation can be realised by either using filter or analog circuit technique.We implemented Filter
demodulation on software whereas envelope dtection using analog circuit is done with the help of circuit board and
osciloscope to view the result.
Conclusion
All the software as well as hardware analysis done in the lab was succesful.We used scipy and numpy toolbox to analyze
signals in frequency and time domain and circuit board realised on breadboard to analyze signal for hardware analysis.The
hardware part of the lab is done with envelope detection circuit which is made up of diode, capacitor and resistors.The
envelope detection circuit can operate as long as the carrier frequency is much higher than the highest frequency present in
the signal.The waveform obtained after demodulation was analyzed which happens to be bit choppy as compared to the
original input.The software aspect basically deals with modulation and demodulation using the phenomenon of frequency
shifting, aliasing, sampling , the concept of filters was understood and used to complete the given tasks.We obtained
fundamental understanding of amplitude modulation while doing the las through the wave files and frequency spectrums.
In [ ]:
22 of 22
2015-11-30 12:53 AM