0% found this document useful (0 votes)
7 views

Analog Communication Assignment

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Analog Communication Assignment

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Analog Communication Assignment

Name: Sandeep Sharma


Roll No. 21EC10061

Ques:1 Amplitude modulator at certain freq with a message signal in .wav format to generate AM modulated
wave and plot time, freq domain graph for under, critical, over modulated index.

Solution: Taken the message signal input as well its sampling rate/freq. Made the length of time exact to audio
signal length(duration). Now my signal was giving error of channel not selected so I used both the stereo
signal. Played the original signal using soundsc function. Paused for some time for next step. Using the
Amplitude of the carrier signal, its frequency taken by the user. I took K1 as input for under modulating index,
K2 as over modulating, critical was set default to be 1. Used s(t)=Ac[1+μcos(2πfmt)]cos(2πfct) this equation
for getting the modulating signal for μ = K1, μ = K2, μ =1. While doing the multiplication we had to perform
the element wise product so I used carrier transpose for multiplying, which worked correctly. After that we
plotted all the time and frequency graph for the diff modulation index using simple syntax like subplot, abs, fft
etc.

Input 

>> Playing original_signal

>> Enter Amplitude of carrier signal in V: 1

>> Enter frequency of carrier signal in Hz: 10000

>> Enter the under modulating index: 0.5

>> Critical modulating index = 1

>> Enter over modulating index: 1.5

>> Playing under modulated signal

>> Playing critically modulated signal

>> Playing over modulated signal

Time domain signals


Frequency domain signals

Note: You can also vary the input values in the command section but you have to wait for 6 sec to listen the
audio. This is with reference to all the question solved after this.

Ques: 2 Demodulation

Solution: For demodulation we again performed element wise multiplication on the modulated signal to get
the shift of the message in the frequency domain and the applied various low pass filters to get the exact
message signal.

Input:
>> Playing original_signal
>> Enter Amplitude of carrier signal in V: 1
>> Enter frequency of carrier signal in Hz: 10000
>> Enter the under modulating index: 0.5
>> Critical modulating index = 1
>> Enter over modulating index: 1.5
>> Under modulated signal is getting demodulated using 5 diff filters:
>> Playing demodulated signal with butterworth filter
>> Playing demodulated signal with chebyshevs filter
>> Playing demodulated signal with elliptic filter
>> Playing demodulated signal with bessel filter
>> Playing demodulated signal with FIR filter
-->Similarly time, freq. domain signal can be taken as butter, chebyshevs
>> Playing demodulated signal with butterworth filter overmodulation case
>> Playing demodulated signal with butterworth filter in critical case

I tried to plot almost all the graphs for all the filters but there were many, so I used just few to show my result,
rest we can plot all the other graphs for various modulation index for all the filters by using just plot, subplot,
fft, title and basic function.
Ques: 3 Incoherent demodulator.

Solution: I calculated the envelope of the input signal using the absolute value of the Hilbert transform. This is
the envelope detection step. Specifies the cutoff frequency for the low-pass filter. Designs a low-pass
Butterworth filter with the user-defined filter order (n) to filter out high-frequency noise. Applies the filter to
the envelope signal to obtain the demodulated signal. Stores the demodulated signal in the
demodulated_signals array. Plays the demodulated audio using the soundsc function.

Input:

>> Enter the under modulation index: 0.5


>> Enter the over modulation index: 1.5
>> Enter the order of the Low pass filter: 10

Ques: 4 FM modulation

Solution: The code performs Frequency Modulation (FM) on the original audio signal: It modulates the audio
signal by varying the frequency of a carrier signal. The modulated signal is created using the FM formula,
where the carrier frequency is fc, and the modulation is achieved by adding a phase component based on the
cumulative sum of the input signal.
The first subplot displays the original input signal.

The second subplot shows the FM-modulated signal.

The third subplot visualizes the frequency domain representation of the modulated signal using the Fast
Fourier Transform (FFT).

Note: I used the cumsum in order to integrate the message signal, because when I designed a loop for doing
that there was a error coming of memory getting exceeded of the array which I defined to keep all the points
to do the sum:
% function result = integrate(signal)
% n = length(signal);
% result = zeros(1, n);
% result(1) = signal(1);
%
% for i = 2:n
% result(i) = result(i-1) + signal(i);
% end
% end
Input:

>> Enter the freq sensitivity: 5000

>> Enter the carrier amplitude: 1

>> Enter the carrier freq: 10000

>> Playing original_signal

Ques: 5 FM demodulator

Solution: In this question we used the modulated signal derived above and then we used the differentiation
function and then then absolute of that in order to get the magnitude of the diff of the modulated signal so
that we get the amplitude term resembles the envelope of AM wave and the angle term
resembles the angle of FM wave. Referring this equation:
ds(t)/dt = Ac(2πfc)[1+(kf/kc)m(t)]sin(2πfct+2πkf∫m(t)dt−1800)
Then we used the butter filter to get the message signal and remove any other high frequency, we can vary the
cut-off frequency and its order by giving input from user.

Input:

Enter the freq sensitivity: 5000


Enter the carrier amplitude: 1
Enter the carrier freq: 10000
Playing original_signal
Enter the cutoff freq: 2000
Enter the order of butter filter: 10
Playing demodulated_signal

Ques: 6 Using the FM Modulation and Demodulation in the above to do the Phase Modulation and
Demodulation respectively.

Solution: For Phase modulation we just modified to modulated_signal = Ac * cos(2 * pi * fc * t


+ kf *(input_signal));

Input:

Enter the freq sensitivity: 5000


Enter the carrier amplitude: 1
Enter the carrier freq: 10000
Playing original_signal
Playing modulated_signal
I tried the code for phase demodulating but couldn’t get the correct output.

You might also like