frequency modulation and demodulation
TRANSCRIPT
K L University 1
A
Project Based Lab Report
On
FREQUENCY MODULATION AND DEMODULATION
Submitted in partial fulfilment of the
Requirements for the award of the Degree of
Bachelor of Technology IN
ELECTRONICS &COMMUNICATION ENGINEERING
By
M.YASWANT SAI 150040994
Under the guidance of
Mrs.S.Vara kumari Asst.professor, Dept. of ECE
Dept. of Electronics and Communication Engineering, K.L.
UNIVERSITY
Green fields,Vaddeswaram-522502, Guntur
Dist.
2016-17
K L University 2
K L UNIVERSITY DEPARTMENT OF ELECTRONICS AND ENGINEERING
CERTIFICATE
This is to certify that this project based lab report entitled “FREQUENCY MODULATION AND DEMODULATION” is the bonafide work carried out by Yaswant Sai Mamidiapaka (150040994) I.Penchala Sai (15004007) P.DurgaKalyani (150060069) in partial fulfilment of the requirement for the award of degree in Bachelor of Technology in Electronics and
Communication Engineering during the academic year 2016-2017.
Signature of the Project Guide Signature of Course Co ordinator
Head Dep. Of E.C.E
K L University 3
ACKNOWLEDGMENT
My sincere thanks to Mrs. S.Vara Kumari in the Lab for their outstanding support
throughout the project for the successful completion of the work.
We express our gratitude to Dr. A.S.C.S. Sastry, HOD, for providing us with adequate
facilities, ways and means by which we are able to complete this project based work.
We would like to place on record the deep sense of gratitude to the honourable Vice Chancellor,
K L University for providing the necessary facilities to carry the concluded project based work
.Last but not the least, we thank all Teaching and Non-Teaching Staff of our department and
especially my classmates and my friends for their support in the completion of our project based
work.
S. No Name of the Student
1 Yaswant Sai Mamidipaka (150040994)
2
I.Penchala Sai (150041007)
3 P.Durga Kalyani (150060069)
K L University 4
CONTENTS
1. Abstract
2. Chapter 1: Introduction
3. Chapter 2: Tasks and Their Simulation Results:
4. Task 1 : Generation of sinusoidal signals with given conditions and
plotting signals and their spectrums using given single tone modulating signal.
5. Task 2 : Generation of sinusoidal signals with given conditions and
plotting signals and their spectrums using given multi tone modulating
signal.
6. Task 3 : obtaining demodulating graph using given modulating signals.
7. Task 4: Generation of sinusoidal signals with given conditions and
plotting signals and their spectrums using given multi tone modulating signal.
8. Task 5: Repeat above tasks for real speech signals
9. Conclusions and Future Scope
10. References
ABSTRACT
Project Goals: To generate frequency modulation (FM) signal.
K L University 5
Demodulation and reception of Frequency Modulation signals. Exposure
to simulation on modulation/demodulation systems for FM using MATLAB for
synthetic & real signals (such as speech).
A base band signal m(t) is used to generate Narrow Band Frequency Modulated signal
explore the theoretical concepts of FM signal by modeling and simulation using
Matlab and Simulink.
Task1: Consider a single tone modulating signalm(t) =1.2cos500 t , carrier
signal c(t) =2cos104 t and frequency deviation is 1.2 KHz.
1. Determine the expression for FM signal in both time domain and frequency domain.
2. Sketch the modulating signal m(t) and its spectrum.
3. Sketch the carrier signal c(t) and its spectrum.
4. Sketch the Narrow Band Frequency Modulated signal FM (t) and their spectra.
5. Identify the side frequencies from the spectrum. 6. Determine the approximate
minimum bandwidth using Carson’s rule.
7. Determine the minimum bandwidth from the Bessel function table.
8. Sketch the output frequency spectrum from the Bessel approximation.
9. If the modulating signal voltage is now increased to 2.4 Volts, what is the new
deviation? Find the modulation index in this case.
10. If the modulating signal voltage is increased to 4 Volts, while its frequency is
decreased to 200 Hz, what is the new deviation? Find the modulation index in this
case.
11. Determine the power of modulated signal in all the above cases. Task2: Now
consider a multi tone modulating signalm(t) =2cos1000 t sin1500 t + 1.5cos2000 t
and repeat the steps (1) to (8) above from the Task1 . Task 3: Assume that the
demodulation process is synchronous detection as shown in Fig.1. The objective is to
study the demodulation / reception of Frequency Modulated signal.
Task4: Repeat above tasks for multi tone modulating signal m(t)
=1.4cos200pit -0.8sin300pit +cos400pit .
Task5: Repeat above tasks for real speech signals.
INTRODUCTION
Modulation and Demodulation is to prevent the unwanted signals which are not
in the particular band of frequency and retrieve the original signal (message signal)
K L University 6
.In this project the modulation and demodulation of the single tone message signal
, multi tone message signals,recored voice,music signals ,female and male voice
are performed with the carrine wave of sine for modulation and carrier wave of
cosine for demodulation and after performing this operations the demodulated
signal is passed through the low pass filter in order to get the desired out put i..e
the signal in the particular range of frequency
Carrier wave
Need of modulation
The frequency range audible to human beigns known as audible range is between
20 Hz to 20kHz .The frequency of human voice and music signals lies between
200 Hz to 4000Hz.Signals in the audible range audible range are not transmitted
directly for the following reason
MODULATION
K L University 7
1)The wave length of audible signals is very long .To transmit such signals signals
the size of antena must be atleast one tenth of signal wave length.
For example: consider a 1500Hz signal .The wavelength of the signal is(3*10^8)/1500
The height of anteena should be atleast 0.2*10^5 meters which is not possible practically
2) The signals in the audible range are not transmitted directly for the following reasons.
3) The audio signals attenuate rapidly in the atmosphere.
4) The interference will occur if two are more audio signals are transmitted
simultaneously.
Because of the above reasons the audio signals signals are modulated before
modulation.Not only for audio signals it is also used for signals to be transmited
for longer distances.
Types of modulation
Modulation is of three types they are:
1)Amplitude
2)Frequency
3)Phase
Frequency modulation
In telecommunications and signal processing, frequency modulation (FM) is the
encoding of information in a carrier wave by varying the instantaneous frequency
of the wave. This contrasts with amplitude modulation, in which the amplitude of
the carrier wave varies, while the frequency remains constant.
In analog frequency modulation, such as FM radio broadcasting of an audio signal
representing voice or music, the instantaneous frequency deviation, the difference
between the frequency of the carrier and its centre frequency, is proportional to the
modulating signal.
Digital data can be encoded and transmitted via FM by shifting the carrier's
frequency among a predefined set of frequencies representing digits - for example
one frequency can represent a binary 1 and a second can represent binary 0. This
modulation technique is known as frequency-shift keying (FSK). FSK is widely
used in modems and fax modems, and can also be used to send Morse code. Radio
teletype also uses FSK.[2]
Frequency modulation is widely used for FM radio broadcasting. It is also used in
telemetry, radar, seismic prospecting, and monitoring new borns for seizures via
K L University 8
EEG, two-way radio systems, music synthesis, magnetic tape-recording systems
and some video-transmission systems. In radio transmission, an advantage of
frequency modulation is that it has a larger signal-to-noise ratio and therefore
rejects radio frequency interference better than an equal power amplitude
modulation (AM) signal. For this reason, most music is broadcast over FM radio.
Frequency modulation has a close relationship with phase modulation; phase
modulation is often used as an intermediate step to achieve frequency modulation.
Mathematically both of these are considered a special case of quadrature amplitude
modulation (QAM).
Tasks and Their Simulation Results
Task1:
Consider a single tone modulating signalm(t) =1.2cos500pit , carrier
signalc(t) =2cos10pit and frequency deviation is 1.2 KHz.
Description:- 1. Determine the expression for FM signal in both time domain and frequency domain.
2. Sketch the modulating signal m(t) and its spectrum.
3. Sketch the carrier signal c(t) and its spectrum.
K L University 9
4. Sketch the Narrow Band Frequency Modulated signal FM (t) and their spectra.
5. Identify the side frequencies from the spectrum. 6. Determine the approximate
minimum bandwidth using Carson’s rule.
7. Determine the minimum bandwidth from the Bessel function table.
8. Sketch the output frequency spectrum from the Bessel approximation.
9. If the modulating signal voltage is now increased to 2.4 Volts, what is the new
deviation? Find the modulation index in this case.
10. If the modulating signal voltage is increased to 4 Volts, while its frequency is
decreased to 200 Hz, what is the new deviation? Find the modulation index in this
case.
11. Determine the power of modulated signal in all the above cases.
MATHLAB CODES:-
close all; clear all;
fs=100000; N=200;
Ts=1/fs; fm=250;
fc=5000; ac=2;
Kf=1200;
t=(0:Ts:(N*Ts)-Ts);
m=1.2*cos(2*pi*fm*t);
figure() plot(t,m)
title('Message signal');
axis([0 0.002 -1.5 1.5])
figure()
c=2*cos(2*pi*fc*t);
plot(t,c); title('Carrier
signal');
axis([0 0.002 -2 2])
[w b]=T2F(c,t);
%figure()
%plot(w/max(w),angle(b))
%title('Phase spectrum of carrie signal in frequency domain')
figure() plot(w,abs(b))
title('Magnitude spectrum of carrier signal in frequency domain') axis([-50
50 0 0.002]);
[u d]=T2F(m,t);
%figure();
%plot(u,angle(d))
%title('Phase spectrum of message signal in frequency domain')
figure(); plot(u,abs(d))
K L University 10
title('Magnitude spectrum of message signal in frequency domain'); axis([-50
50 0 0.0013]) %0.0012
fd=1200; mi=fd/fm;
fms=ac*(cos(2*fc*pi*t+mi.*sin(2*pi*fm*t)));
figure(); plot(t,fms) title('Frequency
Modulated signal');
axis([0 0.002 -2.1 2.1]) % 2
% Frequency Domain -----
%fms=2*(cos(2*fc*pi*t+mi.*sin(2*pi*fm*t)));
[v a]=T2F(fms,t)
%figure();
%plot(v,angle(a))
%title('Modulated signal Phase spectrum in frequency domain');
figure(); plot(v,abs(a))
title('Modulated signal Magnitude spectrum in frequency domain');
axis([-50 50 0 0.002]) %0.001934 %approximate band witdth
using carson's rule
cn=2*(Kf+fm);
fprintf('The approximate band width using carsons rule is (hz)=%.4f\n',cn)
%minimum bandwidth using bessel approximation
bapp=2*8*fm;
fprintf('The approximate band width using bessel appoximation is
(hz)=%.4f\n',bapp)
%%
figure()
fprintf('As modulation index %.4f we have 8 sidebands',mi);
X = 0:0.1:20; J
= zeros(5,201);
for i = 0:8
J(i+1,:) = besselj(i,X);
end
plot(X,J,'LineWidth',1.5)
axis([0 20 -.5 1.1]) grid
on
legend('J_0','J_1','J_2','J_3','J_4','J_5','J_6','J_7','J_8','Location','bestoutside')
title('Bessel Functions of the First Kind for v = 0,1,2,3,4,5,6,7,8') xlabel('X')
ylabel('J_v(X)')
n=0:1:8; f=n*fm;;
G=zeros(length(n),1); for
(i=1:1:length(n))
G(i)=(ac/2)*besselj(n(i),mi);
K L University 11
end
figure(); for
j=1:1:2
plot(((-1)^j)*fc+f,abs(G),'o'); hold
on;
plot(((-1)^j)*fc-f,abs(G),'o'); end
axis([-fc-9*fm fc+9*fm 0 0.45])
for(i=1:1:length(n))
for j=1:1:2
line([((-1)^j)*fc+f(i) ((-1)^j)*fc+f(i)],[0 abs(G(i))]);
hold on
line([((-1)^j)*fc-f(i) ((-1)^j)*fc-f(i)],[0 abs(G(i))]);
end end;
title('Spectrum of FM using Bessel approximation');
%%
am1=2.4; kf=1000;
fm=250;
mi1=(kf*am1)/(fm);
fd1=kf*am1;
fprintf('If modulating signal voltage is increased to 2.4 then deviation is %.4f and
modulation index %.4f\n',fd1,mi1)
%%
am2=4; fm1=200;
kf=1000;
fd2=kf*am2;
mi2=(kf*am2)/(fm1);
fprintf('If modulating signal voltage is increased to 4 and frequency decreased to
200 Hz then deviation is %.4f and modulation index %.4f\n',fd2,mi2)
%%
%case 1
p1=(((1.2)^2)/50)*(((((-0.18)^2))/2)+((-
0.13)^2)+((0.05)^2)+((0.36)^2)+((0.39)^2)+((0.26)^2)+((0.13)^2)+((0.05)^2)+((
0.02)^2)) fprintf('Power is %.4f\n',p1);
%case 2
p2=(((2.4)^2)/50)*(((((-0.18)^2))/2)+((-
0.13)^2)+((0.05)^2)+((0.36)^2)+((0.39)^2)+((0.26)^2)+((0.13)^2)+((0.05)^2)+((
0.02)^2)) fprintf('Power is %.4f\n',p1);
%case 3
p3=(((4)^2)/50)*(((((-0.18)^2))/2)+((-
0.13)^2)+((0.05)^2)+((0.36)^2)+((0.39)^2)+((0.26)^2)+((0.13)^2)+((0.05)^2)+((
0.02)^2)) fprintf('Power is %.4f\n',p1);
The approximate band width using carsons rule is (hz)=2900.0000
The approximate band width using bessel appoximation is (hz)=4000.0000
K L University 12
As modulation index 4.8000 we have 8 sidebands
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 -3
-1.5
-1
-0.5
0
0.5
1
1.5 Message signal
K L University 13
Carrier signal
-3 Magnitude spectrum of message signal in frequency domain x 10
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 -3
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
-50 -40 -30 -20 -10 0 10 20 30 40 50 0
0.2
0.4
0.6
0.8
1
1.2
K L University 14
x 10
-3 Modulated signal Magnitude spectrum in frequency domain x 10
-3 Magnitude spectrum of carrier signal in frequency domain x 10
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 -3
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2 Frequency Modulated signal
-50 -40 -30 -20 -10 0 10 20 30 40 50 0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
K L University 15
Bessel Functions of the First Kind for v = 0,1,2,3,4,5,6,7,8
Spectrum of FM using Bessel approximation
-50 -40 -30 -20 -10 0 10 20 30 40 50 0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
K L University 16
Task2:
Now consider a multi tone modulating signal m(t) =2cos1000pit -sin1500pit
+ 1.5cos2000pit and repeat the steps (1) to (8) above from the Task1 . 2. Sketch the modulating signal m(t) and its spectrum.
3. Sketch the carrier signal c(t) and its spectrum.
4. Sketch the Narrow Band Frequency Modulated signal FM (t) and their
spectra.
5. Identify the side frequencies from the spectrum.
6. Determine the approximate minimum bandwidth using Carson’s rule.
7. Determine the minimum bandwidth from the Bessel function table.
8. Sketch the output frequency spectrum from the Bessel approximation.
MATLAB CODE:
clear all; close all;
fs=100000; N=200;
Ts=1/fs; fm=1000;
fc=5000; ac=2;
Kf=1200;
t=(0:Ts:(N*Ts)-
Ts);
m=2*cos(fm*pi*t)-
sin(1500*pi*t)+1.5*cos(2000*pi*t); figure() plot(t,m)
title('Message signal'); axis([0 0.002 -2.5 4])
K L University 17
figure()
c=2*cos(2*pi*fc*t);
plot(t,c); title('Carrier
signal');
axis([0 0.002 -2 2])
[w b]=T2F(c,t);
figure() plot(w,abs(b))
title('Magnitude spectrum of carrier signal in frequency domain')
axis([-50 50 0 0.002]); [u d]=T2F(m,t); figure(); plot(u,abs(d))
title('Magnitude spectrum of message signal in frequency domain'); axis([-
50 50 0 0.0035]) %0.003432
fd=1200; mi=fd/fm;
fms=ac*(cos(2*fc*pi*t+mi.*sin(2*pi*fm*t)));
figure(); plot(t,fms) title('Frequency
Modulated signal'); axis([0 0.002 -2.1 2.1])
% 2
[v a]=T2F(fms,t)
figure(); plot(v,abs(a))
title('Modulated signal Magnitude spectrum in frequency domain'); axis([-50
50 0 0.0019]) %0.001841
%approximate minimum band width using carson's rule
cn=2*(Kf+fm);
%minimum bandwidth using bessel approximation bapp=2*4*fm;
fprintf('The approximate band width using bessel appoximation is
(hz)=%.4f\n',bapp)
fprintf('The minimum band width using carsons rule is (hz)=%.4f\n',cn)
figure();
fprintf('As modulation index %.4f we have 4 sidebands',mi); % 1.5 4
X = 0:0.1:20; J
= zeros(5,201);
for i = 0:4
J(i+1,:) = besselj(i,X);
end
plot(X,J,'LineWidth',1.5)
axis([0 20 -.5 1.1]) grid
on
legend('J_0','J_1','J_2','J
_3','J_4','Location','besto
utside') title('Bessel
Functions of the First
Kind for v = 0,1,2,3,4')
xlabel('X')
K L University 18
ylabel('J_v(X)')
n=0:1:4; f=n*fm;;
G=zeros(length(n),1); for
(i=1:1:length(n))
G(i)=(ac/2)*besselj(n(i),mi);
end
figure(); for
j=1:1:2
plot(((-1)^j)*fc+f,abs(G),'o'); hold
on;
plot(((-1)^j)*fc-f,abs(G),'o'); end
axis([-fc-5*fm fc+5*fm 0 0.75])
for(i=1:1:length(n))
for j=1:1:2
line([((-1)^j)*fc+f(i) ((-1)^j)*fc+f(i)],[0 abs(G(i))]);
hold on
line([((-1)^j)*fc-f(i) ((-1)^j)*fc-f(i)],[0 abs(G(i))]);
end end;
title('Spectrum of FM using Bessel approximation');
The minimum band width using carsons rule is
(hz)=4400.0000
The approximate band width using bessel appoximation is
(hz)=8000.0000
As modulation index 1.2000 we have 4 sidebands
Carrier signal
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 -3
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
K L University 19
x 10
x 10-3 Magnitude spectrum of message signal in frequency domain
-3 Modulated signal Magnitude spectrum in frequency domain
x 10
-3 Magnitude spectrum of carrier signal in frequency domain x 10
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 -3
-2
-1
0
1
2
3
4 Message signal
-50 -40 -30 -20 -10 0 10 20 30 40 50 0
0.5
1
1.5
2
2.5
3
3.5
-50 -40 -30 -20 -10 0 10 20 30 40 50 0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
K L University 20
-50 -40 -30 -20 -10 0 10 20 30 40 50 0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 -3
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2 Frequency Modulated signal
0 5 10 15 20 -0.5
0
0.5
1
X
Bessel Functions of the First Kind for v = 0,1,2,3,4
J 0
J 1
J 2
J 3
J 4
K L University 21
Task3:-
Assume that the demodulation process is synchronous detection as shown in
Fig.1. The objective is to study the demodulation / reception of Frequency
Modulated
Math lab code:
% DEMODULATION ----------------------
fc=5000; fs=50000; fd=1000; N=1000;
ts=1/fs; t=(0:ts:(N*ts)-ts);
c=2*cos(10000*pi*t);
m=1.2*cos(500*pi*t);
y=fmmod(m,fc,fs,fd);
z=fmdemod(y,fc,fs,fd);
plot(t,m)
title('Original message signal') axis([0.00005
0.012 -1.5 1.5])
figure()
plot(t,z)
title('Demodulated message signal') axis([0.00005
0.012 -1.5 1.5])
figure(); plot(t,m,'c',t,z,'b--');
axis([0.00005 0.012 -1.5 1.5])
xlabel('Time (s)')
ylabel('Amplitude')
K L University 22
legend('Original Signal','Demodulated Signal')
[w a]=T2F(t,m) [u
b]=T2F(t,z) figure()
plot(w,abs(a)); axis([-1000
1000 0 0.012])
title('Magnitude spectrum of original signal in frequency domain')
figure(); plot(u,abs(b)); axis([-1000 1000 0 0.012])
title('Magnitude spectrum of demodulated signal in frequency domain')
figure(); plot(w,abs(a),'c',u,abs(b),'b--'); axis([-1000 1000 0 0.012])
xlabel('Frequency (in Hz) ---->') ylabel('Amplitude')
legend('Original Signal','Demodulated Signal','location','bestoutside')
Demodulated message signal
x 10
2 4 6 8 10 12 x 10 -3
-1.5
-1
-0.5
0
0.5
1
1.5
2 4 6 8 10 12 -3
-1.5
-1
-0.5
0
0.5
1
1.5 Original message signal
K L University 23
Magnitude spectrum of original signal in frequency domain
2 4 6 8 10 12 x 10 -3
-1.5
-1
-0.5
0
0.5
1
1.5
Time (s)
Original Signal Demodulated Signal
-1000 -800 -600 -400 -200 0 200 400 600 800 1000 0
0.002
0.004
0.006
0.008
0.01
0.012
K L University 24
Magnitude spectrum of demodulated signal in frequency domain
Task 4: Repeat above tasks for multi tone modulating signal m(t)
=1.4cos200pit -0.8sin300pit +cos400pit .
MATLAB CODE :-
clear all; close all;
fs=100000; N=200;
Ts=1/fs; fm=200;
fc=5000; ac=2;
-1000 -500 0 500 1000 0
0.002
0.004
0.006
0.008
0.01
0.012
Frequency (in Hz) ---->
Original Signal Demodulated Signal
-1000 -800 -600 -400 -200 0 200 400 600 800 1000 0
0.002
0.004
0.006
0.008
0.01
0.012
K L University 25
Kf=1200;
t=(0:Ts:(N*Ts)-Ts);
m=1.4*cos(200*pi*t)-(0.8)*sin(300*pi*t)+cos(400*pi*t);
figure() plot(t,m) title('Message signal');
axis([0 0.002 -1.5 3])
figure()
c=2*cos(2*pi*fc*t);
plot(t,c); title('Carrier
signal');
axis([0 0.002 -2 2])
[w b]=T2F(c,t);
figure() plot(w,abs(b))
title('Magnitude spectrum of carrier signal in frequency domain')
axis([-50 50 0 0.002]);
[u d]=T2F(m,t);
figure(); plot(u,abs(d))
title('Magnitude spectrum of message signal in frequency domain'); axis([-
50 50 0 0.0012])
fd=1200; mi=fd/fm;
fms=ac*(cos(2*fc*pi*t+mi.*sin(2*pi*fm*t)));
figure(); plot(t,fms) title('Frequency
Modulated signal');
axis([0 0.002 -2.1 2.1]) % 2
% Frequency Domain -----
%fms=2*(cos(2*fc*pi*t+mi.*sin(2*pi*fm*t)));
[v a]=T2F(fms,t)
%figure();
%plot(v,angle(a))
%title('Modulated signal Phase spectrum in frequency domain');
figure(); plot(v,abs(a))
title('Modulated signal Magnitude spectrum in frequency domain'); axis([-50
50 0 0.0020]) %0.002
%approximate minimum band witdth using carson's rule
cn=2*(Kf+fm);
fprintf('The minimum band width using carsons rule is (hz)=%.4f\n',cn)
%minimum bandwidth using bessel approximation bapp=2*9*fm;
fprintf('The approximate band width using bessel appoximation is
(hz)=%.4f\n',bapp)
figure();
fprintf('As modulation index %.4f we have 9 sidebands',mi); % 1.5 4
K L University 26
X = 0:0.1:20; J
= zeros(5,201);
for i = 0:9
J(i+1,:) = besselj(i,X);
end
plot(X,J,'LineWidth',1.5)
axis([0 20 -.5 1.1]) grid
on
legend('J_0','J_1','J_2','J_3','J_4','J_5','J_6','J_7','J_8','J_9','Location','bestoutside')
title('Bessel Functions of the First Kind for v = 0,1,2,3,4,5,6,7,8,9') xlabel('X')
ylabel('J_v(X)')
n=0:1:9; f=n*fm;;
G=zeros(length(n),1); for
(i=1:1:length(n))
G(i)=(ac/2)*besselj(n(i),mi);
end figure(); for j=1:1:2
plot(((-1)^j)*fc+f,abs(G),'o');
hold on; plot(((-1)^j)*fc-
f,abs(G),'o'); end
axis([-fc-10*fm fc+10*fm 0 0.75])
for(i=1:1:length(n)) for j=1:1:2
line([((-1)^j)*fc+f(i) ((-1)^j)*fc+f(i)],[0 abs(G(i))]);
hold on
line([((-1)^j)*fc-f(i) ((-1)^j)*fc-f(i)],[0 abs(G(i))]);
end end;
title('Spectrum of FM using Bessel approximation');
%%
fc=5000;
fs=50000;
fd=1000; N=1000;
ts=1/fs;
t=(0:ts:(N*ts)-ts); c=2*cos(10000*pi*t);
m=1.4*cos(200*pi*t)-(0.8)*sin(300*pi*t)+cos(400*pi*t);
y=fmmod(m,fc,fs,fd); z=fmdemod(y,fc,fs,fd); plot(t,m)
title('Original message signal')
axis([0.00005 0.012 -2 3])
figure();
plot(t,z)
title('Demodulated message signal')
axis([0.00005 0.012 -2 3]) figure();
plot(t,m,'c',t,z,'b--'); axis([0.00005
0.012 -2 3]) xlabel('Time (s)')
ylabel('Amplitude')
K L University 27
legend('Original Signal','Demodulated Signal')
%% ----- optional ------
[w a]=T2F(t,m) [u
b]=T2F(t,z) figure()
plot(w,abs(a)); axis([-
400 400 0 0.014])
title('Magnitude spectrum of original signal in frequency domain')
figure(); plot(u,abs(b));
axis([-400 400 0 0.014])
title('Magnitude spectrum of demodulated signal in frequency domain')
figure(); plot(w,abs(a),'c',u,abs(b),'b--'); axis([-400 400 0 0.014])
xlabel('Frequency (in Hz) ---->') ylabel('Amplitude')
legend('Original Signal','Demodulated Signal','location','bestoutside')
The minimum band width using carsons rule is (hz)=2800.0000 The approximate band width using bessel appoximation is (hz)=3600.0000 As modulation index 6.0000 we have 9 sidebands
x 10
-3 Magnitude spectrum of carrier signal in frequency domain
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 -3
-1.5
-1
-0.5
0
0.5
1
1.5
2
2.5
3 Message signal
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 -3
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2 Carrier signal
K L University 28
-3 Magnitude spectrum of message signal in frequency domain
x 10
x 10-3 Modulated signal Magnitude spectrum in frequency domain
-50 -40 -30 -20 -10 0 10 20 30 40 50 0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
-50 -40 -30 -20 -10 0 10 20 30 40 50 0
0.2
0.4
0.6
0.8
1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 -3
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2 Frequency Modulated signal
K L University 29
Bessel Functions of the First Kind for v = 0,1,2,3,4,5,6,7,8,9
-50 -40 -30 -20 -10 0 10 20 30 40 50 0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
2 4 6 8 10 12 x 10 -3
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
2.5
3 Original message signal
K L University 30
2 4 6 8 10 12 x 10 -3
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
2.5
3
Time (s)
Original Signal Demodulated Signal
2 4 6 8 10 12
x 10 -3
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
2.5
3 Demodulated message signal
K L University 31
Magnitude spectrum of original signal in frequency domain
TASK5:- Repeat above tasks for real speech signals.
clear all;close all;clc;
% Record your voice for 5 seconds
recObj = audiorecorder disp('Start
speaking.'); recordblocking(recObj,5);
% 5 seconds disp('End of
Recording.'); y=getaudiodata(recObj);
a=y(35001:40000) k=length(a) a=a';
-400 -200 0 200 400 0
0.002
0.004
0.006
0.008
0.01
0.012
0.014
Frequency (in Hz) ---->
Original Signal Demodulated Signal
-400 -300 -200 -100 0 100 200 300 400 0
0.002
0.004
0.006
0.008
0.01
0.012
0.014
K L University 32
t=0:k-1; b=(sin(2*pi*(400/pi)*t));
m=a.*b; z=m.*(sin((400/pi)*2*pi*t));
[v,A]=T2F(t,a);
[w,Z]=T2F(t,z); [f,M]=T2F(t,m);
subplot(3,3,1);
plot(t,a/max(a),'black','Linewidth',1.5);
title(' x(t),msg signal'); subplot(3,3,2);
plot(v,abs(A),'r','Linewidth',2);
title('|X(jw)| msg signal');
subplot(3,3,3);
plot(t,m/max(m),'black','Linewidth',1.5);
title('y(t),modulated signal');
subplot(3,3,4);
plot(f,abs(M),'r','Linewidth',2);
title('|y(jw)| modulated signal');
subplot(3,3,5);
plot(t,z/max(z),'black','Linewidth',1.5);
title('demodulated signal c(t)');
subplot(3,3,6);
plot(w,abs(Z),'r','Linewidth',2);
title('|c(jw)|,demodulated'); fs=1600;
fc=400;
[g,h] = butter(5,fc*2/fs); % Filter coefficients
so = filtfilt(g,h,z); subplot(3,3,7)
plot(t,so)% Reconstruction signal title('Reconstucted
signal');
[fo So ]= T2F(t,so); % Spectrum of the reconstructed signal subplot(3,3,9)
K L University 33
plot(fo,abs(So),'r','Linewidth',2); title('Spectrum
of reconstructed signal'); figure();
plot(t,a,'black','Linewidth',1.5);hold on
title('compare()'); plot(t,so);
K L University 34
3. Conclusions and Future Scope
This project concludes that frequency modulation and demodulation that has been
utilised by the broadcasting industry is the reduction in noise. it does not suffer
audio amplitude variations as the signal level varies.
Mainly in frequency modulation amplitude remins constant
In frequency modulation, the carrier amplitude is constant, on the other hand,
the value of the carrier frequency varies depending on the frequency of the
modulating signal. The envelope of the modulated signal is the same shape as the
modulating signal. Modulation index is the ratio of the frequency deviation to
meassage signal frequency/.
From the modulated carrier displayed on an oscilloscope, the percent modulation
can be measured through the maximum and the minimum values of the
modulating signal, The voltage of each side frequency depends on carrier voltage
and the modulation index. Thebandwidth is twice the modulating frequency. A
square wave which is a complex modulating signal consists of many side
frequencies generated.
The above mentioned modulation techniques will be used for new generation
communication technology. The SDR mostly used in portable devices such as
PDAs, smart phones, laptops and so on. The cellular technologies like GSM,
WCDMA, and LTE etc. are more supportable with SDR. It can support the different
services like location based service (GPS), World Wide Web (www), video calling,
video broadcasting, e-commerce
\
REFERENCES
1.Jump up^ Stan Gibilisco (2002). Teach yourself electricity and electronics. McGraw-Hill Professional. p. 477. ISBN 978-0-07-137730-0.
2. Jump up^ B. Boashash, editor, "Time-Frequency Signal Analysis and
Processing – A Comprehensive Reference", Elsevier Science, Oxford, 2003;
ISBN 0-08-044335-4
3. John G. Proakis and Dimitris G. Manalakis, ‘Digital Signal Processing,
principles,algorithms and applications’, Pearson Prentice Hall, 2011.
4.Wikipedia
K L University 35
5. Vinay K. Ingle and John G. Proakis, Essentials of Digital Signal Processing
Using MATLAB®,Third Edition 2012, Cengage Learning.