Top Banner
Done by: BASIL Z. BARZAQ 120070737 BASSAM H. SALLOUHA 120071676 MOHAMED A. ELSHAER 120071709 Supervised by: Eng.: Mohammed Kamel AbuFoul May 2010
16
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: FM AM Matlab

Done by:BASIL Z. BARZAQ 120070737BASSAM H. SALLOUHA 120071676MOHAMED A. ELSHAER 120071709Supervised by:

Eng.: Mohammed Kamel AbuFoul

May 2010

Page 2: FM AM Matlab

Understanding frequency modulation and demodulation by direct differentiation ,slope detection.

Using MATLAB m-file and simulink to implement FM modulation ,demodulation.

Page 3: FM AM Matlab

Definition: it’s a form of modulation which represents information as variations in the instantaneous frequency of a carrier wave.

Note:1)In analog applications,the carrier frequency is varied in direct proportion tochanges in the amplitude of an input signal.

Page 4: FM AM Matlab

2) The FM-modulated signal has its instantaneous frequency that varies linearly with the amplitude of the message signal.

Now we can get the FM-modulation by:

Where:Kƒ is the sensitivity factor, and represents

the frequency deviation rate as a result of message amplitude change.

The instantaneous frequency is:

Page 5: FM AM Matlab

The maximum deviation of Fc (which represents the max. shift away from Fc in one direction) is:

Note:The FM-modulation is implemented by

controlling the instantaneous freq. of a voltage-controlled oscillator(VCO).

The amplitude of the input signal controls the oscillation freq. of the VCO output signal.

Page 6: FM AM Matlab

In the FM demodulation what we need to recover is the variation of the instantaneous frequency of the carrier, either above or below the center frequency.

The detecting device must be constructed so that its output amplitude will vary linearly according to the instantaneous freq. of the incoming signal.

Page 7: FM AM Matlab

In this method we differentiate the FM signal to get an AM signal, then we use an envelope detector.

Page 8: FM AM Matlab

The code of plotting m(t) and FM modulated signal:clear allfc=100;ts=1/(10*fc);fs=(1/ts);kf=80;wc=2*pi*fc;t=0:ts:2;m=sin(2*pi*t);y=cos(wc*t+(kf*2*pi*cumsum(m)).*ts);figure(1)subplot(211)plot(t,m)title('input signal')subplot(212)plot(t,y)title('fm modulation of input signal')

Page 9: FM AM Matlab

The code of magnitude spectrum of m(t) and the FM signal:

mf=fftshift(fft(m))*ts;delta=fs/length(mf);f=-fs/2:delta:fs/2-delta; figure(2)subplot(211)plot(f,abs(mf))title('magnitude spectrum of input signal')a=fftshift(fft(y))*ts;delta=fs/length(a);f=-fs/2:delta:fs/2-delta; subplot(212)plot(f,abs(a))title('magnitude spectrum of the fm') 

Page 10: FM AM Matlab

The plot of the output signal after differentiator:

E=diff(y)/ts;

figure(3)

plot(E)

title('the differentiation of fm ')

 

Page 11: FM AM Matlab

The plot of the output signal from the envelope detector:

vout(1)=E(1);t1=(0:length(E)-1)*ts;R=[10^5,10^4,10^3,10^2]*3.2;c=10^-6;for n=1:4for i =2:length(E) if E(i)>vout(i-1) vout(i)=E(i); else

vout(i)=vout(i-1).*exp(-ts/(R(n)*c)); endendfigure(4)subplot(4,1,n)plot(t1,vout,t1,E)title(' the AM signal and envelope signal ')end

Page 12: FM AM Matlab

R= 10^5*3.2

Page 13: FM AM Matlab

R=10^4*3.2

Page 14: FM AM Matlab

R= 10^3*3.2

Page 15: FM AM Matlab

R= 10^2*3.2

Page 16: FM AM Matlab