06.06.2022 Views

B. P. Lathi, Zhi Ding - Modern Digital and Analog Communication Systems-Oxford University Press (2009)

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 4.41

Frequency

domain signals

during QAM

modulation and

coherent

demodulation for

the second

message m2(1) .

Message 2 spectrum

250 250

200

(\

200

150

'-,

'.::) 150

100 .,.,a 100

50 50

O -600

J \

4. 9 MATLAB Exercises

QAM spectrum magnitude

-400 -200 0 200 400 600 O -600 -400 -200 0 200

f(Hz)

f(Hz)

Second demodulator spectrum Recovered spectrun 2

250

250

200

200

A

C:, 150

S 150

Cl

100

i 100

50

50

0 0 -600 -400 -200 0 200 400 600 -600 -400

I \

-200 0 200 400

f(Hz)

f(Hz)

400

600

600

193

% (ExampleQAMdemfilt.m)

% This program uses triangl .m and triplesinc .m

% to illustrate QAM modulation % and demodulation

% of two message signals

clear;c lf;

ts=l .e-4;

t=-0 .04:ts:0.04;

Ta=0.01; fc=300;

% Use triangl .m and triplesinc .m to generate

% two message signals of dif ferent shapes and spectra

m_sigl=triangl ((t+0.0l)/0.01)-triangl ((t- 0.01)/0.01) ;

m_s ig2=triplesinc (t,Ta) ;

Lm_s ig=length (m_sigl) ;

Lfft=length (t) ; Lfft=2 ceil (log2 (Lfft) );

Ml_fre=fftshift ( fft (m_s igl ,Lfft) );

M2_fre=fftshift ( fft (m_s ig2 ,Lfft) );

freqm= (-Lfft/2:Lfft/2-1) / (Lfft*ts) ;

%

B_m=150; %Bandwidth of the signal is B_m Hz .

% Design a simple lowpass filter with bandwidth B_m Hz .

h=fir1 (40, [B_m*ts] );

% QAM signal generated by adding a carrier to DSB-SC

s_qam=m_sigl .*cos (2*pi*fc*t) +m_sig2 .*sin(2*pi*fc*t);

Lfft=length (t) ; Lfft=2 A ceil ( log2 (Lfft) +l) ;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!