EE - 451 / E01 spring 2002

Advanced Communications Theory

Professor: Conner

Submitted By:

Andrew Buettner

Lab #2: AM and FM Using MatLab®

Sunday, March 02, 2003



Table Of Contents

        1) Cover Page 1

        2) Table of Contents 2

        3) Objective 3

        4) Components Used 3

        5) Procedures 3

        6) Lab Data / Results 4

          1) Diagram 1 4

          2) Diagram 2 5

          3) Diagram 3 5

          4) Diagram 4 6

          5) Diagram 5 6

          6) Diagram 6 7

          7) Diagram 7 7

          8) Diagram 8 8

          9) Diagram 9 8

          10) Diagram 10 9

          11) Diagram 11 9

          12) Diagram 12 10

          13) Diagram 13 10

          14) Diagram 14 11

          15) Diagram 15 11

          16) Table 1 12

        7 Answers to Lab Questions 12

        7) Conclusions 13

        8) Attachments 13



      1. Original lab handout

      2. Original lab data

      3. Calculations

      4. Octave log








GNU Octave, version 2.0.17 (i686-pc-linux-gnu).

Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 John W. Eaton.

This is free software with ABSOLUTELY NO WARRANTY.

For details, type `warranty'.


octave:1> n=0:255;

octave:2> t=n/256;

octave:3> wc=2*pi*32;

octave:4> wm=2*pi*3;

octave:5> b=.75;

octave:6> x=(1+b*cos(wm*t)).*cos(wc*t);

octave:7> plot(t,x)

octave:8> PHI=fft(x);

octave:9> plot(24:40,abs(PHI(25L41)))

parse error:


>>> plot(24:40,abs(PHI(25L41)))

^


octave:9> plot(24:40,abs(PHI(25:41)))

octave:10> wm=2*pi*2;

octave:11> b=2;

octave:12> x=(1+b*cos(wm*t)).*cos(wc*t);

octave:13> plot(t,x)

octave:14> PHI=fft(x);

octave:15> plot(24:40,abs(PHI(25:41)))

octave:16> wm=2*pi*3;

octave:17> b=.75;

octave:18> x=(1+b*cos(wm*t)).*cos(wc*t);

octave:19>

octave:19> phi=x;

octave:20> for i=1:255, if phi(i) < 0 then

> phi(i)=0;

> end,

> end

error: `then' undefined near line 20 column 28

error: evaluating expression near line 20, column 28

error: evaluating if command near line 20, column 14

error: evaluating for command near line 20, column 1

octave:20> for i=1:255, if phi(i) < 0

> phi(i)=0;

> end,

> end

octave:21> plot(t,phi);

octave:22> pr=phi;

octave:23> PR=fft(pr);

octave:24> plot(n,pr)

octave:25> plot(n,PR)

octave:26> H=zeros(1,256);

octave:27> H(2:9)=ones(1,8);

octave:28> f=0:126;

octave:29> H(130:256)=H(128-f);

octave:30> PRF=H.*PR;

octave:31> plot(n,prf)

error: `prf' undefined near line 31 column 8

error: evaluating expression near line 31, column 8

error: evaluating argument list element number 2

error: evaluating index expression near line 31, column 1

octave:31> plot(n,PRF)

octave:32> prf=ifft(PRF);

octave:33> plot(t,prf)

octave:34> mf=3;

octave:35> wm=2*pi*2;

octave:36> fm=cos(wc*t+b*sin(wm*t));

octave:37> plot(t,fm)

octave:38> fm=cos(wc*t+b*cos(wm*t));

octave:39> plot(t,fm)

octave:40> FM=fft(fm);

octave:41> plot(0:63,abs(X(1:64)))

error: `X' undefined near line 41 column 15

error: evaluating index expression near line 41, column 15

error: evaluating argument list element number 1

error: evaluating index expression near line 41, column 11

error: evaluating argument list element number 2

error: evaluating index expression near line 41, column 1

octave:41> plot(0:63,abs(FM(1:64)))

octave:42> fm=cos(wc*t+2*b*cos(wm*t));

octave:43> plot(t,fm)

octave:44> FM=fft(fm);

octave:45> plot(0:63,abs(FM(1:64)))

octave:46> f=0:128;

octave:47> HPF=((f/32).^4)./(1+(f/32).^4);

octave:48> HPF=sqrt(HPF);

octave:49> f=0:126;

octave:50> HPF(130:256)=HPF(128-f);

octave:51> plot(n,HPF)

octave:52> D1=FM.*HPF;

octave:53> d1=ifft(D1);

octave:54> plot(t,d1);

octave:55> D1F=D1.*H;

octave:56> d1f=ifft(D1F);

octave:57> plot(t,d1f)

octave:58> d1r=d1;

octave:59> for i=1:255, if d1r(i) < 0

> d1r(i)=0;

> end,

> end

octave:60> plot(t,d1)

octave:61> plot(t,d1r)

octave:62> D1R=fft(d1r);

octave:63> D1F=D1R.*H;

octave:64> d1f=ifft(D1F);

octave:65> plot(t,d1f)

octave:66>