讲解QAM留学生、辅导java编程语言、辅导java/c++设计、讲解Amplitude Modulation

- 首页 >> Java编程

Lab 4: Quadrature Amplitude Modulation

1 Modulation

A quadrature amplitude-modulated (QAM) signal employs two quadrature carriers, cos 2πfct, sin 2πfct, each of

which is modulated by an independent sequence of information bits. The transmitted signal waveforms have the form

um(t) = AmcgT (t) cos 2πfct + AmsgT (t) sin 2πfct, m = 1, 2, ..., M (1)

where {Amc} and {Ams} are the sets of amplitude. For example, Fig. illustrates a 16-QAM signal constellation

that is obtained by amplitude modulating each quadrature carrier by M = 4 PAM. In general, rectangular signal

constellations result when two quadrature carriers are each modulated by PAM.

More generally, QAM may be viewed as a form of combined digital amplitude and digital phase modulation. Thus

the transmitted QAM signal waveforms may be expressed as

umn(t) = AmgT (t) cos(2πfct + θn), m = 1, 2, ..., M1, n = 1, 2, ..., M2 (2)

If M1 = 2k1 and M2 = 2k2

, the combined amplitude- and phase-modulation method results in the simultaneous

transmission of k1 + k2 = log2 M1M2 binary digits occurring at a symbol rate Rb/(k1 + k2).

It is clear that the geometric signal representation of the signal given by (?) and () is in the terms of twodimensional

signal vectors of the form

sm = (p

EsAmc p

EsAms), m = 1, 2, ..., M (3)

Examples of signal space constellation for QAM are shown in Fig.. Note that M = 4 QAM is identical to M = 4

PSK.

2 Demodulation and Detection of QAM

Let us assume that a carrier-phase offset is introduced in the transmission of the signal through the channel. In addition,

the received signal is corrupted by additive white Gaussian noise. Hence, r(t) may be expressed as

r(t) = AmcgT (t) cos(2πfct + φ) + AmsgT (t) sin(2πfct + φ) + n(t) (4)

where φ is the carrier-phase offset and

n(t) = nc(t) cos 2πfct ns(t) sin 2πfct

The received signal is correlated with the two phase-shifted basis functions

ψ1(t) = gT (t) cos(2πfct + φ)

φ2(t) = gT (t) sin(2πfct + φ) (5)

as illustrated in Fig., and the outputs of the correlators are sampled and passed to the detector. The phase-locked

loop (PLL) shown in Fig. estimates the carrier-phase offset φ of the received signal and compensates for this phase

offset by phase shifting ψ1(t) and ψ2(t) as indicated in. The clock shown in Fig.is assumed to be synchronized

1

Figure 1: M=16-QAM signal constellation.

Serial-to-


parallel


converter


Transmitting


filter g

T

(t)


Transmitting


filter g

T

(t)


Balanced


modulator


Balanced


modulator


90

o

phase


shift


Oscillator


+

Transmitted


QAM signal


Binary


data


Figure 2: Functional block diagram of modulator for QAM

to the received signal so that the correlator outputs are sampled at the proper instant in time. Under these conditions,

the outputs from the two correlators are

r1 = Amc + nc cos φ ns sin φ

r2 = Ams + nc cos φ + ns sin φ (6)

where

nc =

1

2

Z T

0

nc(t)gT (t) dt

ns =

1

2

Z T

0

ns(t)gT (t) dt (7)

The noise components are zero-mean, uncorrelated Gaussian random variable with variance No/2.

The optimum detector computes the distance metrics

D(r, sm) = |r sm|

2

, m = 1, 2, ..., M (8)

2

Sampler


Computes


distance metrics


D(s

m


)


Sampler


X


X


X


X


90

o

phase


shift


PLL


Clock


g

T

(t)


Received


Signal

Output


decision


Figure 3: Demodulation and detection of QAM signal

where r = (r1, r2) and sm is given by.

3 Probability of Error for QAM in an AWGN Channel

In this section, we consider the performance of QAM systems that employ rectangular signal constellations. Rectangular

QAM signal constellations have the distinct advantage of being easily generated as two PAM signals impressed

on phase quadrature carriers. In addition, they are easily demodulated. For rectangular signal constellations in which

M = 2k

, where k is even, the QAM signal constellation is equivalent to two PAM signals on quadrature carriers, each

having √

M = 2k/2

signal points. Because the signals in the phase quadrature components are perfectly separated

by coherent detection, the probability of error for QAM is easily determined from the probability of error for PAM.

Specifically, the probability of a correct decision for the M-ary QAM system is

Pc = (1 P√

M)

2

(9)

where P√

M is the probability of error of a √

M-ary PAM with one-half the average power in each quadrature signal

of the equivalent QAM systems. By appropriately modifying the probability of error for M-ary PAM, we obtain

(10)

where Eav/No is the average SNR per symbol. Therefore, the probability of a symbol error for the M-ary QAM is

PM = 1 (1 P√

M)

2

(11)

We note that this result is exact for M = 2k when k is even.

MATLAB Perform a Monte Carlo simulation of an M=16-QAM communication system using a rectangular signal

constellation. The model of the system to be simulated is hown in Fig..

Solution The uniform random number generator (RNG) is used to generate the sequence of information symbols

corresponding to the 16 possible 4-bit combinations of b1, b2, b3, b4. The information symbols are mapped into

the corresponding signal points, as illustrated in Fig. ??, which have the coordinates [Amc Ams]. Two Gaussian

3

= 64


= 32


= 16


= 8


= 4


Figure 4: Signal space diagram for QAM signals

RNG are used to generate the noise components [nc ns]. The channel-phase shift φ is set to 0 for convenience.

Consequently, the received signal-plus-noise vector is

r = [Amc + nc Ams + ns]

The detector computes the distance metric given by and decides in favor of the signal point that is closest to

the received vector r. The error counter counts the symbol errors in the detected sequence. Fig.illustrates

the results of the Monte Carlos simulation for the transmission of N = 10000 symbols at different values of the

SNR parameter Eb/No, where Eb = Es/4 is the bit energy. Also, shown in Fig.  is the theoretical value of

the symbol-error probability given by () and ().

echo on

SNRindB1=0:2:15;

SNRindB2=0:0.1:15;

M=16;

k=log2(M);

for i=1:1:length(SNRindB1),

smld_err_prb(i)=qam_sim(SNRindB1(i)); % simulated error value

echo off;

end;

echo on;

for i=1:length(SNRindB2),

SNR = exp(SNRindB2(i)*log(10)/10); % signal-to-noise ratio

4

1


2


3


-3

-2

-1

1

2

3


-1


-2


-3


Figure 5: Block diagram of an M=16-QAM system for the Monte Carlo simulation

% theoretical symbol error rate

theo_err_prb(i)=4*Qfunct(sqrt(3*k*SNR/(M-1)));

echo off;

end;

echo on;

% Plotting commands follow.

semilogy(SNRindB1,smld_err_prb,’*’)

hold

semilogy(SNRindB2,theo_err_prb);

grid on

xlabel(’E_b/N_o in dB’)

ylabel(’Symbol Error Rate’)

5

function [p]=qam_sim(snr_in_dB)

% [p]=qam_sim(snr_in_dB)

% finds the probability of error for the given value of snr_in_dB,

% SNR in dB.

N=10000;

d=1; % min. distance between symbols

Eav=10*d?2; % energy per symbol

snr=10?(snr_in_dB/10); % SNR per bit (given)

sgma=sqrt(Eav/(8*snr)); % noise variance

M=16;

% Genreation of the data source follows.

for i=1:N,

temp=rand;

dsource(i)=1+floor(M*temp);

end;

% Mapping to the signal constellation follows

mapping=[-3*d 3*d;

-d 3*d;

d 3*d;

3*d 3*d;

-3*d d;

-d d;

d d;

3*d d;

-3*d -d;

-d -d;

d -d;

3*d -d;

-3*d -3*d;

-d -3*d;

d -3*d;

3*d -3*d];

for i=1:N,

qam_sig(i,:)=mapping(dsource(i),:);

end;

% received signal

for i=1:N,

[n(1) n(2)]=gngauss(sgma);

r(i,:)=qam_sig(i,:)+n;

end;

% detection and error probability calculation

numoferr=0;

for i=1:N,

% Metric computation follows.

for j=1:M,

metrics(j)=(r(i,1)-mapping(j,1))2+ (r(i,2)-mapping(j,2))?2;

end;

[min_metric decis]=min(metrics);

if (decis?=dsource(i)),

numoferr=numoferr+1;

6

end;

end; p=numoferr/(N);

0 5 10 15

107

106

105

104

103

102

101

100

Eb

/No

in dB

Symbol Error Rate

Figure 6: M = 16-QAM signal constellation for the Monte Carlo simulation

7

Lab Homework

In this homework, we want to perform a Monte Carlo simulation of an M=16-QAM communication systems for the

performance of bit error rate (not a symbol error rate) for the SNR range of SNR=0~ 15 dB.

Use the following hint: For this simulation, you have to generate not only the symbols but also the bits such as

s0000=[3*d 3*d];

s0001=[d 3*d];

s0011=[-d 3*d];

s0010=[-3*d 3*d];

s1000=[3*d d];

s1001=[d d];

s1011=[-d d];

s1010=[-3*d d];

s1100=[3*d -d];

s1101=[d -d];

s1111=[-d -d];

s1110=[-3*d -d];

s0100=[3*d -3*d];

s0101=[d -3*d];

s0111=[-d -3*d];

s0110=[-3*d -3*d];

for i=1:1:N,

temp=rand;

if (temp<1/16),

dsource1(i)=0;

dsource2(i)=0;

dsource3(i)=0;

dsource4(i)=0;

elseif (temp<2/16),

dsource1(i)=0;

dsource2(i)=0;

dsource3(i)=0;

dsource4(i)=1;

elseif (temp<3/16),

dsource1(i)=0;

dsource2(i)=0;

dsource3(i)=1;

dsource4(i)=0;

elseif (temp<4/16),

dsource1(i)=0;

dsource2(i)=0;

dsource3(i)=1;

dsource4(i)=1;

elseif (temp<5/16),

dsource1(i)=0;

dsource2(i)=1;

dsource3(i)=0;

dsource4(i)=0;

elseif (temp<6/16),

8

dsource1(i)=0;

dsource2(i)=1;

dsource3(i)=0;

dsource4(i)=1;

elseif (temp<7/16),

dsource1(i)=0;

dsource2(i)=1;

dsource3(i)=1;

dsource4(i)=0;

elseif (temp<8/16),

dsource1(i)=0;

dsource2(i)=1;

dsource3(i)=1;

dsource4(i)=1;

elseif (temp<9/16),

dsource1(i)=1;

dsource2(i)=0;

dsource3(i)=0;

dsource4(i)=0;

elseif (temp<10/16),

dsource1(i)=1;

dsource2(i)=0;

dsource3(i)=0;

dsource4(i)=1;

elseif (temp<11/16),

dsource1(i)=1;

dsource2(i)=0;

dsource3(i)=1;

dsource4(i)=0;

elseif (temp<12/16),

dsource1(i)=1;

dsource2(i)=0;

dsource3(i)=1;

dsource4(i)=1;

elseif (temp<13/16),

dsource1(i)=1;

dsource2(i)=1;

dsource3(i)=0;

dsource4(i)=0;

elseif (temp<14/16),

dsource1(i)=1;

dsource2(i)=1;

dsource3(i)=0;

dsource4(i)=1;

elseif (temp<15/16),

dsource1(i)=1;

dsource2(i)=1;

dsource3(i)=1;

dsource4(i)=0;

else (temp<15/16),

dsource1(i)=1;

9

dsource2(i)=1;

dsource3(i)=1;

dsource4(i)=1;

end;

end;

Then, the received signal at the detector for the ith symbol (in Matlab form) is

n(1)=gngauss(sgma);

n(2)=gngauss(sgma);

if ((dsource1(i)==0) & (dsource2(i)==0) & (dsource3(i)==0) & (dsource4(i)==0)),

r=s0000+n;

elseif ((dsource1(i)==0) & (dsource2(i)==0) & (dsource3(i)==0) & (dsource4(i)==1))

r=s0001+n;

elseif ((dsource1(i)==0) & (dsource2(i)==0) & (dsource3(i)==1) & (dsource4(i)==0))

r=s0010+n;

elseif ((dsource1(i)==0) & (dsource2(i)==0) & (dsource3(i)==1) & (dsource4(i)==1))

r=s0011+n;

elseif ((dsource1(i)==0) & (dsource2(i)==1) & (dsource3(i)==0) & (dsource4(i)==0))

r=s0100+n;

elseif ((dsource1(i)==0) & (dsource2(i)==1) & (dsource3(i)==0) & (dsource4(i)==1))

r=s0101+n;

elseif ((dsource1(i)==0) & (dsource2(i)==1) & (dsource3(i)==1) & (dsource4(i)==0))

r=s0110+n;

elseif ((dsource1(i)==0) & (dsource2(i)==1) & (dsource3(i)==1) & (dsource4(i)==1))

r=s0111+n;

elseif ((dsource1(i)==0) & (dsource2(i)==0) & (dsource3(i)==0) & (dsource4(i)==0)),

r=s1000+n;

elseif ((dsource1(i)==1) & (dsource2(i)==0) & (dsource3(i)==0) & (dsource4(i)==1))

r=s1001+n;

elseif ((dsource1(i)==1) & (dsource2(i)==0) & (dsource3(i)==1) & (dsource4(i)==0))

r=s1010+n;

elseif ((dsource1(i)==1) & (dsource2(i)==0) & (dsource3(i)==1) & (dsource4(i)==1))

r=s1011+n;

elseif ((dsource1(i)==1) & (dsource2(i)==1) & (dsource3(i)==0) & (dsource4(i)==0))

r=s1100+n;

elseif ((dsource1(i)==1) & (dsource2(i)==1) & (dsource3(i)==0) & (dsource4(i)==1))

r=s1101+n;

elseif ((dsource1(i)==1) & (dsource2(i)==1) & (dsource3(i)==1) & (dsource4(i)==0))

r=s1110+n;

else

r=s1111+n;

end;

Then, the correlation metrics will be followed.


站长地图