FM MATLAB assignment - University of Rhode · PDF fileFM MATLAB assignment 1. Matlab Code (a)...

1
University of Rhode Island Department of Electrical and Computer Engineering ELE 435: Communication Systems FM MATLAB assignment 1. Matlab Code (a) Modulation: Generation of an FM signal: i. Generate an FM signal, given by s(nT s )= A c Cos((2πf 1 nT s )+ βsin(2πf 2 nT s )), where A c = 2, f 1 = 20KHz, f 2 = 200Hz, T s = 1 fs , f s = 80KHz, and vary β for example 0.2, 1, 5 etc. ii. Plot the spectrum for atleast two different values in the report. You may want to run for few other values to get an idea. The Plots should look like Figure 5-11, Page 327 in the text book. There might be a scaling factor difference in the plots, for now you can ignore that. (b) Demodulation: Build an FM receiver (demodulator) using Hilbert Transform i. Take the Hilbert transform of the above generated FM signal, the result is c(nT s )= e ((2πf1nTs)+βsin(2πf2nTs)) . Use the hilbert command in matlab. ii. Take the conjugate of the Hilbert transform. iii. Plot the angle of result generated by c(nT s )c * ((n - 1)T s ), where c * ((n - 1)T s ) is the conjugate of hilbert and is also shifted by one sample. (c) Design a Low Pass Filter and Band Pass Filter for different Filter orders. Show plots for Orders 10 and 100. Use freqz command in MATLAB to see the characteristics. You may want to run for few more filter order values and cut-off frequency values gives below to see the filter characteristics. (d) MATLAB Help: i. To design a Low Pass filter: b = fir1(filterorder,f c /(f s /2)), where f c /(f s /2) is called the normalized cut-off frequency ii. To design a Band Pass filter: b = fir1(filterorder,[f b1 /(f s /2) f b2 /(f s /2)]) iii. To check the characteristics: Try freqz(b,1,512) iv. Parameters: f c = 10 KHz, f b1 = 6KHz, f b2 = 12K, f s = 40 KHz, (e) JUSTIFY/Comment on the matlab commands you used in the code to obtain credit. 1

Transcript of FM MATLAB assignment - University of Rhode · PDF fileFM MATLAB assignment 1. Matlab Code (a)...

Page 1: FM MATLAB assignment - University of Rhode · PDF fileFM MATLAB assignment 1. Matlab Code (a) Modulation: Generation of an FM signal: i. Generate an FM signal, given by s(nT s) = A

University of Rhode Island Department of Electrical and Computer Engineering

ELE 435: Communication Systems

FM MATLAB assignment

1. Matlab Code

(a) Modulation: Generation of an FM signal:

i. Generate an FM signal, given by s(nTs) = AcCos((2πf1nTs) +βsin(2πf2nTs)), where Ac = 2, f1 = 20KHz, f2 = 200Hz,Ts = 1

fs, fs = 80KHz, and vary β for example 0.2, 1, 5 etc.

ii. Plot the spectrum for atleast two different values in the report.You may want to run for few other values to get an idea. ThePlots should look like Figure 5-11, Page 327 in the text book.There might be a scaling factor difference in the plots, for nowyou can ignore that.

(b) Demodulation: Build an FM receiver (demodulator) using HilbertTransform

i. Take the Hilbert transform of the above generated FM signal,the result is c(nTs) = e((2πf1nTs)+βsin(2πf2nTs)). Use the hilbertcommand in matlab.

ii. Take the conjugate of the Hilbert transform.

iii. Plot the angle of result generated by c(nTs)c∗((n− 1)Ts), where

c∗((n − 1)Ts) is the conjugate of hilbert and is also shifted byone sample.

(c) Design a Low Pass Filter and Band Pass Filter for different Filterorders. Show plots for Orders 10 and 100. Use freqz command inMATLAB to see the characteristics. You may want to run for fewmore filter order values and cut-off frequency values gives below tosee the filter characteristics.

(d) MATLAB Help:

i. To design a Low Pass filter: b = fir1(filterorder,fc/(fs/2)), wherefc/(fs/2) is called the normalized cut-off frequency

ii. To design a Band Pass filter: b = fir1(filterorder,[fb1/(fs/2)fb2/(fs/2)])

iii. To check the characteristics: Try freqz(b,1,512)

iv. Parameters: fc = 10 KHz, fb1 = 6KHz, fb2 = 12K, fs = 40 KHz,

(e) JUSTIFY/Comment on the matlab commands you used in the codeto obtain credit.

1