Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

VNU LyThuyetTinHieu Lec2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Signal Theory
(INS207102)
———————————–
Prof. Huan X. Nguyen

Guest Lecture 2:

Decision Rule for Signal Detection: Binary Systems

Signal Theory (INS207102) Huan X Nguyen 1/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Outline

1 Baseband Transmission

2 Receiver Structure

3 Detection & Decision Rules

4 Matlab simulation

Signal Theory (INS207102) Huan X Nguyen 2/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Additive White Gaussian Noise (AWGN) Channel


""! !

$ "! ! # "!
"! !"#$%#&'(
#$ " # ! !% " !
!"#$%&'())*+
Received signal: r(t) = s(t) + n(t)
The noise, n(t), is a zero-mean white Gaussian random
process:

- Mean: E [(n(t)] = 0,
N0
- Autocorrelation: R(τ ) = E [n(t)n(t − τ )] = δ(τ ),
2
N0
- Power spectrum: S(f ) = F{R(τ )} = .
2
where N0 /2 is double-sided spectral density.

Signal Theory (INS207102) Huan X Nguyen 3/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Baseband Signal Transmission

A block diagram of the baseband transmission:


additive white noise
u(t) n(t)

data sequence transmitter x(t)


Impulse to the receiver
1 -1 1 -1 ... modulator filter
h(t) y(t)

The role of the impulse modulator (IM) is to convert a symbol sequence into
an analog waveform. That is,

X
u(t) = bnδ(t − nT ), (1)
n=−∞

bn : the symbol sequence


T: the symbol interval

The transmitter filter h(t) is used to constrain the bandwidth of transmitted


signal x(t).

Signal Theory (INS207102) Huan X Nguyen 4/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Output of the Transmitter Filter


In the amplitude shift keying (ASK), the data symbol bn has different ampli-
tude to represent binary information as

• 2-ary ASK: “0” → +1 and “1” → −1

• 4-ary ASK: “00” → +3, “01” → +1, “10” → −1, and “11” → −3

Hence, if we have more levels to represent the symbol, bn, we can transmit
more bits per second. For M -ary ASK, the data rate becomes log2(M )/T
bits/sec (bps).

The output of the transmitter filter is written as


Z
x(t) = h(τ )u(t − τ )dτ
Z X∞
= h(τ ) bnδ(t − nT − τ )dτ
n=−∞

X Z
= bn h(τ )δ(t − nT − τ )dτ
n=−∞
X∞
= bnh(t − nT ). (2)
n=−∞

Signal Theory (INS207102) Huan X Nguyen 5/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Examples of Filter Output


Filter impulse response Impulse modulated bit sequence

Filter output

Filter impulse response Impulse modulated bit sequence

Filter output

Signal Theory (INS207102) Huan X Nguyen 6/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

System Model

At the receiver, the received signal is corrupted by the noise n(t) and written
as
y(t) = x(t) + n(t). (3)
Generally, n(t) is modeled as white Gaussian noise with zero mean. The
autocorrelation of n(t) is E[n(t)n(t − τ )] = N20 δ(τ ), where N0/2 is the double-
sided spectral density of the noise. The dimension of N0 is in watts per
Hertz.

At the front end of the receiver, we have the receiver filter and sampler:

y(t) receiver filter to decision device


g(t)
sample at t = nT

This converts an analog receiver signal into a sampled (discrete) signal.

Signal Theory (INS207102) Huan X Nguyen 7/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Received Signal After Sampling


The output of the receiver filter is written as
z(t) = g(t)
Z ∗ y(t)
= g(τ )y(t − τ )dτ
Z X Z
= g(τ ) bmh(t − mT − τ )dτ + g(τ )n(t − τ )dτ
X Z Z
m

= bm g(τ )h(t − mT − τ )dτ + g(τ )n(t − τ )dτ.


m

The sampled signal at t = nT is given as


zn = z(nT ) Z Z
X
= bm g(τ )h((n − m)T − τ )dτ + g(τ )n(nT − τ )dτ . (4)
m | {z }

=wn

From (4), some desirable properties of g(t) can be found as

a) at t = nT , the transmitted symbol bn shall be obtained when there is no


noise

b) the noise wn shall be as small as possible.

Signal Theory (INS207102) Huan X Nguyen 8/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Impulse Response of Matched Filter

One can show that

G(f ) = kH ∗ (f )

is equivalent to
g(t) = kh(−t).
This receiver filter is called the matched filter.
It is not unusual to choose

g(t) = h(−t).

All the matched filters guarantee a maximum SNR.


However, the matched filter derived above is obtained under
the condition that the noise is white.

Signal Theory (INS207102) Huan X Nguyen 9/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

SNR of Matched Filter

Assuming that the zero-ISI transmitter filter is used with the normalized
matched filter at the receiver (so that its energy is unity) as
h(−t) 1
g(t) = qR (a = qR ),
|h(t)|2dt |h(t)|2dt
Then, the sampled signal is given by
p
zn = Eb bn + wn , (15)
R
where Eb = |h(t)|2dt and wn ∼ N (0, σw2 ). The noise variance σ 2 is given as
w
Z
2 N 0 N0
σw = E[|wn|2] = |g(t)|2dt = .
2 2
Clearly, the SNR is given as
Eb
SN R = .
N0 /2
Note that the Eb is the bit energy that is decided by the transmitter filter
h(t).

Signal Theory (INS207102) Huan X Nguyen 10/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Detection & Decision Rules (1/2)

• From the observation zn , we need to decide whether bn = 1 or bn = −1.

• There are some statistical approaches for the detection. Among them,
we only consider
– the maximum likelihood (ML) detection
– the maximum a posteriori probability (MAP) detection

To find a decision rule, we assume that bn = 1 is transmitted. Then, the


received signal is given by
p
zn = Eb + wn.
Depending on the noise wn , zn can be close to Eb or not and it becomes a
Gaussian random variable with the following pdf:
zn ∼ f (zn | bn = 1)

p N0
= N Eb,
2
 
1 1 p
= √ exp − (zn − Eb)2 .
πN0 N0

Signal Theory (INS207102) Huan X Nguyen 11/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Detection & Decision Rules (2/2)

Using a similar approach, we can find the pdf of zn when bn = −1, which is
given by
zn ∼ f (zn | bn = −1)
p N0
= N − Eb ,
2 p 
1 1
= √ exp − (zn + Eb )2 .
πN0 N0

The two (conditional) pdf’s are called the likelihood functions. With the two
likelihood functions, we can build a hypothesis.

f (zn |bn = −1) f (zn |bn = 1)

√ √
− Eb Eb

Signal Theory (INS207102) Huan X Nguyen 12/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Maximum Likelihood (ML) Decision Rule (1/2)

According to the maximum likelihood (ML) decision, we choose the likelihood


function or decision that has the maximum value for the given zn. The ML
decision can be summarized as follows:

1, if f (zn |bn = 1) > f (zn |bn = −1);
b̂n = (16)
−1, if f (zn |bn = 1) < f (zn |bn = −1)
or
( f (zn |bn =1)
1, if f (zn |bn =−1)
> 1;
b̂n = f (zn |bn =1) (17)
−1, if f (zn |bn =−1)
< 1.
f (zn |bn =1)
The ratio L(zn) = f (zn |bn =−1)
is called the likelihood ratio.

Signal Theory (INS207102) Huan X Nguyen 13/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Maximum Likelihood (ML) Decision Rule (2/2)

The ML decision can be further simplified by taking log. It can be shown


that
 
1  p p
log L(zn) = log exp − (zn − Eb)2 − (zn + Eb)2
√ N0
4 Eb
= zn .
N0
From (17), the ML decision is given by
( √
4 Eb
1, if log L(zn) = N0 n
z > 0;
b̂n = √
4 Eb
(18)
−1, if log L(zn) = N0 n
z <0
or
b̂n = sign(zn).

Signal Theory (INS207102) Huan X Nguyen 14/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Example with ML Rule

Example

There are two dices: one is fair (dice A) and the other is not (dice B). Their
probabilities are given by
PA(k) = 1/6, PB (k) = k/21, k = 1, 2, . . . , 6.
One of the two dices can be chosen randomly with a probability of 1/2. Find
the decision rule whether the chosen dice is A or B when k dots are observed.

Signal Theory (INS207102) Huan X Nguyen 15/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Solution

Solution
6/21

1/6

1/21

k=1 2

k 1 2 3 4 5 6
Prob. of A 1/6 1/6 1/6 1/6 1/6 1/6
Prob. of B 1/21 2/21 3/21 4/21 5/21 6/21
Decision A A A B B B

Signal Theory (INS207102) Huan X Nguyen 16/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Maximum a Posteriori (MAP) Decision Rule (1/3)

In addition to the ML decision rule, the maximum a posteriori (MAP) decision


rule is one of popular decision rules. The decision is made by the a posteriori
probability. The a posteriori probabilities are given by
Pr(bn = 1 | zn) and Pr(bn = −1 | zn ).
Given zn , we choose bn that has the maximum a posteriori probability. That
is, the MAP decision rule is given by

1, if Pr(bn = 1 | zn) > Pr(bn = −1 | zn);
b̂n = (19)
−1, if Pr(bn = 1 | zn) < Pr(bn = −1 | zn).
Note that the a posteriori probability is obtained by

f (zn |bn) Pr(bn)


Pr(bn|zn) =
f (zn )
f (zn |bn) Pr(bn)
=
f (zn |1) Pr(1) + f (zn| − 1) Pr(−1)
∝ f (zn |bn) Pr(bn). (20)

Signal Theory (INS207102) Huan X Nguyen 17/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Maximum a Posteriori (MAP) Decision Rule (2/3)


The MAP decision rule can be simplified further. Since
( Pr(bn =1 | zn )
1, if Pr(bn =−1 | zn )
>1
b̂n = Pr(bn =1 | zn )
−1, if Pr(bn =−1 | zn )
< 1,
the ratio
Pr(bn = 1 | zn )
Pr(bn = −1 | zn )
is important to simplify. It can be shown that
Pr(bn = 1 | zn ) f (zn |bn = 1) Pr(bn = 1)
=
Pr(bn = −1 | zn ) f (zn |bn = −1) Pr(bn = −1)
f (zn |bn = 1) Pr(bn = 1)
= .
f (zn |bn = −1) Pr(bn = −1)
Taking log, we have
Pr(bn = 1 | zn)
log = log L(zn) + Li,
Pr(bn = −1 | zn)
 
Pr(bn =1)
where Li = log Pr(bn =−1)
.

Signal Theory (INS207102) Huan X Nguyen 18/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Maximum a Posteriori (MAP) Decision Rule (3/3)

Therefore, the MAP rule is simplified as


( √
1, if 4 N0Eb zn + Li > 0;
b̂n = √
−1, if 4 N0Eb zn + Li < 0.
It is interesting to show that the decision statistic is decomposed as

4 Eb
zn + Li
|{z}
| N{z
0 } a priori knowledge
observation

Signal Theory (INS207102) Huan X Nguyen 19/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Example with MAP Rule

Example (revisited)

There are two dices: one is fair (dice A) and the other is not (dice B). Their
probabilities are given by
PA(k) = 1/6, PB (k) = k/21, k = 1, 2, . . . , 6.
Suppose that the probability that dice A is selected is 1/3, while dice B is
2/3. Find the decision rule whether the chosen dice is A or B when k dots
are observed.

Solution

k 1 2 3 4 5 6 Priori prob.
Post. Prob. of A 1/6 1/6 1/6 1/6 1/6 1/6 ×1/3
Post. Prob. of B 1/21 2/21 3/21 4/21 5/21 6/21 ×2/3
Decision A B B B B B

Signal Theory (INS207102) Huan X Nguyen 20/21


Baseband Transmission Receiver Structure Detection & Decision Rules Matlab simulation

Performance Validation using Matlab

Let’s open Matlab and simulate the binary communication system


we have just studied.

Signal Theory (INS207102) Huan X Nguyen 21/21

You might also like