文档库

最新最全的文档下载
当前位置:文档库 > TELE 4653 Assignment 1 Report

TELE 4653 Assignment 1 Report

TELE 4653 Digital Modulation and Coding

Assignment 1 Report

Student Name: LiKai Ma

Student ID: z3326280

E-mail Address: likaima_michael@http://www.wendangku.net/doc/33fef8fc08a1284ac8504361.html

Part 1

Constellation (a)

TELE 4653 Assignment 1 Report

Figure 1 - Constellation (a)

A QAM modulated signal takes the following form:

s QAM t = R A mi +jA mq g t e j 2πf c t

=A mi g t cos 2πf c t ? A mq g (t )sin ?(2πf c t ) (1) where g (t ) is some pulse signal with energy εg and m =1,2,…,M .

The QAM signal in (1) can be represented by its orthogonal basis as in equation (2) s QAM t = A mi εg

2

φ t + A mq ?g

2

φ (t ) (2)

where φ t = 2εg

g (t )cos ?(2πf c t ) and φ t = 2

εg

g (t )sin ?(2πf c t )

Therefore the energy of the signal is the square of the norm of the signal vector s m =

A mi

εg 2A mq

g

2

, which is given by equation (3).

εm = s m 2=

εg 2

(A mi 2+ A mq 2

) (3)

The average energy is given by equation (4)

εavg = p m εm M m =1 (4) Using equation (3) and (4), we thus have

εavg = p m s m 2

8m =1 (5)

Since the signal points in constellation (a) are equally probable, the probability of each one them is p m =1

M =1

8. We then have

εavg =1

M s m 28m =1 (6)

The signal vectors in Figure 1 are listed in the following set

s m = x y : 20 , 2j 2 , 0j 2 , ?2j 2 , ?20 , ?2?j 2 , 0?j 2 , 2

?j 2

Therefore, by using equation (6), the average energy of constellation (a) is

εavg =1

8

4+8+?+8 = 6

Constellation (b)

TELE 4653 Assignment 1 Report

Figure 2 - Constellation (b)

The signal vectors in Figure 2 are listed in the following set

s m = x y : 10 , 2j 3 , 0j 3 , ?2j 3 , ?10 , ?2?j 3 , 0?j 3 , 2

?j 3

The same analysis performed for constellation (a) can also be used for constellation (b). Therefore, the average energy for constellation (b) is

εavg =1

8

1+7+?+7 = 4.5

It can be clearly seen that constellation (b) has less average energy than (a), and hence more power efficient.

Part 2

The low pass equivalent of the transmitted signal is

s l t=a n g(t?n)

n= ?∞

where

g t=1,0≤t<1 0,otherwise

The Figure 3 shows the shape of the pulse function.

TELE 4653 Assignment 1 Report

Figure 3– Pulse function g(t)

The Fourier transform of the pulse function g(t)is by definition a sinc function of the following form.

Sinc ωT

2

=

sin

ωT

2

ωT

2

Figure 4 shows a plot of the above sinc function with T =1.

TELE 4653 Assignment 1 Report

Figure 4 – Plot of sinc function with T =1.

The derivation of the formula for PSD is shown as the following. Suppose that

v l (t )= a n g t ?nT = s l (t ?nT ,I n )∞

n = ?∞

n =?∞

The autocorrelation of s l (t ) is this given as

R vl t +τ,t = E v l t +τ v l ? t

=

E [s l t +τ?nT ,I n s l ?(t ?mT ,I m )]∞

m = ?∞

n =?∞

The average over one period T is given by

TELE 4653 Assignment 1 Report

Let

TELE 4653 Assignment 1 Report

The Fourier transform of g k (τ) can be expressed as

For QAM modulation, G k (f ) can be expressed as

TELE 4653 Assignment 1 Report

The PSD of QAM is then given as

TELE 4653 Assignment 1 Report

where S I f = R I k e ?j 2πkfT

∞n =?∞.

The PSD of constellations (a) and (b) are shown in Figure 5, where the blue curve shows the PSD of constellation (a) while (b) for green. Refer to Appendix for code that generates the plot.

TELE 4653 Assignment 1 Report

Figure 5 – Plot of PSD for constellations (a) and (b).

We can see that constellation (a) has larger PSD then constellation (b) since (a) consists of higher average power.

Part 3

In this part of the assignment, we need to simulate the detection process of QAM modulation scheme. The general approach of the program is illustrated as the following.

(a) Generate a set of uniformly distributed integers in the range n ∈[1,8]. This set of integers is then used as indices to select the symbols in the constellation, namely the transmitted symbols a k .

(b) Generate a set of zero-mean Gaussian noise z k with standard deviation σ. It is then added to the transmitted symbols. This simulates the received symbol r k distorted by noise. In other words, r k =a k +z k .

(c) A function is then implemented to perform the detection process based on a =arg min r k ?a k 2 ? a k ∈A .

(d) The error probability is determined by using the formula P Error =

#Error symbols #Total symbols

.

The noise power is determined using the formula for signal-to-noise-ratio (SNR) and signal power. The derivation is shown in equation ().

SNR =10log 10P

s P n

()

Since P s is pre-determined from part (a), P n can be readily found using equation () P n =

P s

10SNR

10

()

Since the symbols in the constellation are complex numbers, the Gaussian noise generated must be complex as well. This is achieved by generating two Gaussian distributed noise signals separately and joining them as complex signals using z k =z R +jz I . Each one of the real and imaginary parts of the noise signal will contain half the noise power. Since the noise signal is white Gaussian noise, the power is given by the variance of the Gaussian distribution. The expression for both the real and imaginary parts of the Gaussian noise is given in equation ().

σR 2

=

P n 2

and σI 2=

P n 2

()

The total noise power is thus P n = σz 2= σR 2+σI 2.

Suppose G (μ,σ) denotes a Gaussian distribution with mean value μ and standard deviation σ. Let g n denote the vector that holds the samples of the above Gaussian distribution. The zero-mean Gaussian noise can be achieved by removing the mean

value of g n from each element of it, namely g 0=g n ?g n , where g n

is the mean value of g n

.

The desirable noise power is achieved by scaling the zero-mean noise vector by the ratio of the desired standard deviation and original standard deviation. This is shown by the following expression.

g0′=σd

g0where σis the desired standard deviation and σ0is the original σ0

standard deviation. This expression will ensure the variance (power) of g0′is σd.

The simulation is performed for SNR in the range from 0 to 10 with step size 0.05. The result is shown in Figure x where the blue curve represents the error probability for Constellation (a) while green for (b).

TELE 4653 Assignment 1 Report

Figure x –Error probability versus SNR for Constellation (a) and (b). The blue line is for constellation (a), while the green one is for (b).

One obvious conclusion that can be drawn from the above graph is that the error probability reduces with increasing SNR for both constellations. The reducing error probability shows the fact that the transmitted signal experiences less distortion from noise under high SNR. The nearest-neighbor detection scheme outperforms when noise level is low.

The other observation made is that both constellations have similar error probability under the same range of SNR, which means that they have similar performance with nearest-neighbor detection scheme. Hence, Constellation (b) is a better constellation since it requires less transmission power with similar performance.

Appendix

% ***************************

% * *

% * TELE 4653 Assignment 1 *

% * Part 1 *

% * *

% ***************************

clc

clear

close all

%////////////////////////////////////////////////////////////

% Constellation (a)

con_a = [2 2+2*j 2*j -2+2*j -2 -2-2*j -2*j 2-2*j];

figure(1);

plot(real(con_a),imag(con_a),'.');

title('Constellation (a)');

axis([-3 3 -3 3]);

avg_eng_a = sum(abs(con_a).^2)/8

%////////////////////////////////////////////////////////////////

% Constellation (b)

con_b = [-1 1 j*sqrt(3) -j*sqrt(3) 2+j*sqrt(3) 2-j*sqrt(3) -2+j*sqrt(3) -2-j*sqrt(3)];

figure(2);

plot(real(con_b),imag(con_b),'.');

title('Constellation (b)');

axis([-3 3 -3 3]);

avg_eng_b = sum(abs(con_b).^2)/8

% ***************************

% * *

% * TELE 4653 Assignment 1 *

% * Part 2 *

% * *

% ***************************

clc

clear

close all

% Constelllaiton a

con_a = [2 2+2*j 2*j -2+2*j -2 -2-2*j -2*j 2-2*j];

con_b = [-1 1 j*sqrt(3) -j*sqrt(3) 2+j*sqrt(3) 2-j*sqrt(3) -2+j*sqrt(3) -2-j*sqrt(3)];

T = 1;

w = -30 * pi: pi/(2048-1) :30* pi;

G_f = sin(w*T/2) ./ (w*T/2);

plot(w,G_f);

title('Sinc Function');

xlabel('Freqnency (rad)');

ylabel('G(w)');

PSD_a = G_f.^2 * var(con_a);

PSD_b = G_f .^2 * var(con_b);

figure(2);

plot(w,[PSD_a' PSD_b']);

legend('PSD of Constellation (a)','PSD of Constellation (b)');

% ***************************

% * *

% * TELE 4653 Assignment 1 *

% * Part 3 *

% * *

% ***************************

% Constellation a

clc

clear

con_a = [2 2+2*j 2*j -2+2*j -2 -2-2*j -2*j 2-2*j];

% Randomly select signal from the constellation

select = randi([1,8],1,1000);

for k = 1:length(select)

a(k) = con_a(select(k));

end

Ps = 6;

SNR = 0:0.05:10;

for i = 1:length(SNR)

Pn = Ps/(10^(SNR(i)/10));

% Generate zero-mean Gaussian noise

temp1 = randn(1,length(select));

temp2 = randn(1,length(select));

temp1 = temp1 - mean(temp1); % zero mean Gaussian noise

temp2 = temp2 - mean(temp2);

stdn1 = sqrt(Pn/2)/std(temp1); % determine the noise power

stdn2 = sqrt(Pn/2)/std(temp2);

temp1 = stdn1 * temp1;

temp2 = stdn2 * temp2;

z = temp1 + j * temp2;

r = a + z; % noise distorted signal

% Detection

a_hat = detection(r,con_a); % detection process

% Calculate error probability

count = 0;

for k = 1:length(a)

if a_hat(k) ~= a(k)

count = count + 1;

end

end

err_prob1(i) = count/length(a); % error probability

i = i + 1;

end

clear temp1temp2r z a select

con_b = [-1 1 j*sqrt(3) -j*sqrt(3) 2+j*sqrt(3) 2-j*sqrt(3) -2+j*sqrt(3) -2-j*sqrt(3)];

Ps = 4.5;

select = randi([1,8],1,1000);

for k = 1:length(select)

a(k) = con_b(select(k));

end

for i = 1:length(SNR)

Pn = Ps/(10^(SNR(i)/10));

% Generate zero-mean Gaussian noise

temp1 = randn(1,length(select));

temp2 = randn(1,length(select));

temp1 = temp1 - mean(temp1);

temp2 = temp2 - mean(temp2);

stdn1 = sqrt(Pn/2)/std(temp1);

stdn2 = sqrt(Pn/2)/std(temp2);

temp1 = stdn1 * temp1;

temp2 = stdn2 * temp2;

z = temp1 + j * temp2;

r = a + z;

% Detection

a_hat = detection(r,con_b);

% Calculate error probability

count = 0;

for k = 1:length(a)

if a_hat(k) ~= a(k)

count = count + 1;

end

end

err_prob2(i) = count/length(a);

i = i + 1;

end

plot(SNR', [err_prob1' err_prob2'] );

xlabel('SNR (dB)');

ylabel('Error Probability');

% ***************************************************** % * * % * This function is used to perform detection * % * process based on arg min |r_k - a_k|^2 * % * * % *****************************************************

function detect = detection(recv,con);

for i = 1:length(recv)

dist(i,:) = abs(con - recv(i)).^2;

end

for i = 1:length(recv)

for k = 1:length(con)

if min(dist(i,:)) == dist(i,k)

break;

end

end

detect(i) = con(k);

end

end