You are on page 1of 32

EE445S Real-Time Digital Signal Processing Lab Fall 2010

Matched Filtering and Digital


Pulse Amplitude Modulation (PAM)
Slides by Prof. Brian L. Evans and Dr. Serene Banerjee
Dept. of Electrical and Computer Engineering
The University of Texas at Austin

Lecture 13
Outline
• Transmitting one bit at a time
• Matched filtering
• PAM system
• Intersymbol interference
• Communication performance
Bit error probability for binary signals
Symbol error probability for M-ary (multilevel) signals
• Eye diagram

13 - 2
Transmitting One Bit
• Transmission on communication channels is analog
• One way to transmit digital information is called
2-level digital pulse amplitude modulation (PAM)
x0 (t ) y0 (t ) receive
‘0’ bit ‘0’ bit
b input output b
Additive Noise
t Channel
x(t) y(t)
-A -A

x1 (t ) y1 (t ) receive
How does the ‘1’ bit
A A
receiver decide
b t
which bit was sent? b t

‘1’ bit 13 - 3
Transmitting One Bit
• Two-level digital pulse amplitude modulation over
channel that has memory but does not add noise
x0 (t ) y0 (t ) receive
‘0’ bit ‘0’ bit
b input output h h+b
Communication t
t Channel
x(t) y(t) -A Th
-A

x1 (t ) h(t ) y1 (t ) receive
Model channel as ‘1’ bit
A LTI system with 1 A Th
impulse response
t
b t h(t) h t h h+b
‘1’ bit Assume that Th < Tb
13 - 4
Transmitting Two Bits (Interference)
• Transmitting two bits (pulses) back-to-back
will cause overlap (interference) at the receiver
x(t ) h(t )
y (t )
A
* 1 =
b h+b

b t h t b t
-A Th
‘1’ bit ‘0’ bit Assume that Th < Tb ‘1’ bit ‘0’ bit

• Sample y(t) at Tb, 2 Tb, …, and


threshold with threshold of zero Intersymbol
interference
• How do we prevent intersymbol
interference (ISI) at the receiver? 13 - 5
Preventing ISI at Receiver
• Option #1: wait Th seconds between pulses in
transmitter (called guard period or guard interval)
x(t ) h(t )
y (t )
A
* 1 =
h+b h+b

b t h t h b t
-A Th
‘1’ bit ‘0’ bit Assume that Th < Tb ‘1’ bit ‘0’ bit

Disadvantages?
• Option #2: use channel equalizer in receiver
FIR filter designed via training sequences sent by transmitter
Design goal: cascade of channel memory and channel
equalizer should give all-pass frequency response
13 - 6
Digital 2-level PAM System
ak{-A,A} s(t) x(t) y(t) y(ti)

bi Decision
1
PAM g(t) h(t)  c(t) Sample at Maker
bits
t=iTb 0
pulse AWGN matched
Clock Tb Threshold 
shaper w(t) filter Clock T
b
N0 p 
opt  ln 0 
4 ATb  p1 
Transmitter Channel Receiver

• Transmitted signal s (t )  ak


k g (t  k Tb )
• Requires synchronization of clocks between
transmitter and receiver
13 - 7
Matched Filter
• Detection of pulse in presence of additive noise
Receiver knows what pulse shape it is looking for
Channel memory ignored (assumed compensated by other
means, e.g. channel equalizer in receiver)

g(t) x(t) h(t) y(t) y(T) T is the


symbol
Pulse t=T
Matched period
signal
w(t) filter
Additive white Gaussian y (t )  g (t ) * h(t )  w(t ) * h(t )
noise (AWGN) with zero  g 0 (t )  n(t )
mean and variance N0 /2
13 - 8
Matched Filter Derivation
• Design of matched filter
Maximize signal power i.e. power of g 0 (t )  g (t ) * h(t ) at t = T
Minimize noise i.e. power of n(t )  w(t ) * h(t )
• Combine design criteria
max  , where  is peak pulse SNR
| g 0 (T ) |2 instantaneous power
 2

E{n (t )} average power

g(t) x(t) h(t) y(t) y(T)

Pulse t=T
signal Matched
w(t) filter 13 - 9
Power Spectra
• Deterministic signal x(t) • Autocorrelation of x(t)
w/ Fourier transform X(f) Rx ( )  x( ) * x* ( )
Power spectrum is square of Maximum value at Rx(0)
absolute value of magnitude
response (phase is ignored) Rx() is even symmetric, i.e.
2
P ( f )  X ( f )  X ( f ) X *( f ) Rx() = Rx(-)
x
x(t)
Multiplication in Fourier 1
domain is convolution in
time domain 0 Ts t
Conjugation in Fourier domain Rx()
is reversal and conjugation Ts
in time domain
X ( f ) X * ( f )  F  x( ) * x* ( )  -Ts Ts 
13 - 10
Power Spectra
• Power spectrum for signal x(t) is Px ( f )  F  Rx ( ) 
Autocorrelation of random signal n(t)
Rn ( )  E n(t ) n (t   )    n(t ) n* (t   ) dt

*


Rn ( )  E n(t ) n* (t   )    n(t ) n* (t   ) dt  n( ) * n* ( )



For zero-mean Gaussian random process n(t) with variance 2
 
Rn ( )  E n(t ) n* (t   )   2  ( )  Pn ( f )   2
• Estimate noise power
spectrum in Matlab
N = 16384; % number of samples
approximate
gaussianNoise = randn(N,1); noise floor
plot( abs(fft(gaussianNoise)) .^ 2 ); 13 - 11
Matched Filter Derivation
Noise power
g(t) x(t) h(t) y(t) y(T) spectrum SW(f)
N0
Pulse t=T 2
signal w(t) Matched filter f
N0
• Noise n(t )  w(t ) * h(t ) S N ( f )  SW ( f ) S H ( f )  | H ( f ) |2
2
 
AWGN Matched
N0 filter
E{ n 2 (t ) }   S N ( f ) df   | H ( f ) | 2
df

2 

• Signal g 0 (t )  g (t ) * h(t ) G0 ( f )  H ( f )G ( f )


j 2
g 0 (t )  H ( f ) G ( f ) e f t
df



j 2
| g 0 (T ) |2  | H ( f ) G ( f ) e fT
df |2 13 - 12

Matched Filter Derivation
• Find h(t) that maximizes pulse peak SNR 

 H ( f ) G( f ) e
j 2 f T
| df |2 a
 

N0

2
| H ( f ) | df
2  
b
• Schwartz’s inequality
T
a b
For vectors: | a b |  || a || || b ||  cos 
T *

|| a || || b ||
 2  

  ( x)    ( x)   ( x)
2 2
For functions: 1
*
2 ( x) dx  1 dx 2 dx
- - -

upper bound reached iff 1 ( x)  k 2 ( x) k  R


13 - 13
Matched Filter Derivation
Let 1 ( f )  H ( f ) and 2 ( f )  G * ( f ) e  j 2  f T
  
|  H ( f ) G ( f ) e j 2  f T df |2   | H ( f ) |2 df  | G ( f ) |2 df
-  

|  H ( f ) G ( f ) e j 2  f T df |2 
2
 -

N0


N0  | G ( f ) |2 df

2 

| H ( f ) |2 df 


2
max  
2
| G ( f ) | df , which occurs when
N 0 
H opt ( f )  k G * ( f ) e  j 2  f T  k by Schwartz ' s inequality
Hence, hopt (t )  k g * (T  t )
13 - 14
Matched Filter
• Given transmitter pulse shape g(t) of duration T,
matched filter is given by hopt(t) = k g*(T-t) for all k
Duration and shape of impulse response of the optimal filter is
determined by pulse shape g(t)
hopt(t) is scaled, time-reversed, and shifted version of g(t)
• Optimal filter maximizes peak pulse SNR
 
2 2 2 Eb
max   | G ( f ) | df   | g (t ) | dt   SNR
2 2

N 0  N 0  N0
Does not depend on pulse shape g(t)
Proportional to signal energy (energy per bit) Eb
Inversely proportional to power spectral density of noise13 - 15
Matched Filter for Rectangular Pulse
• Matched filter for causal rectangular pulse has an
impulse response that is a causal rectangular pulse
• Convolve input with rectangular pulse of duration
T sec and sample result at T sec is same as to
First, integrate for T sec
Second, sample at symbol period T sec Sample and dump

Third, reset integration for next time period


• Integrate and dump circuit

 T
t=kT
h(t) = ___ 13 - 16
Digital 2-level PAM System
ak{-A,A} s(t) x(t) y(t) y(ti)

bi Decision
1
PAM g(t) h(t)  c(t) Sample at Maker
bits
t=iTb 0
pulse AWGN matched
Clock Tb Threshold 
shaper w(t) filter Clock T
b
N0 p 
opt  ln 0 
4 ATb  p1 
Transmitter Channel Receiver

• Transmitted signal s (t )  ak


k g (t  k Tb )
• Requires synchronization of clocks between
transmitter and receiver
13 - 17
Digital 2-level PAM System
• Why is g(t) a pulse and not an impulse?
Otherwise, s(t) would require infinite bandwidth
s (t )   ak  (t  k Tb )
k
Since we cannot send an signal of infinite bandwidth, we limit
its bandwidth by using a pulse shaping filter
• Neglecting noise, would like y(t) = g(t) * h(t) * c(t)
to be a pulse, i.e. y(t) =  p(t) , to eliminate ISI
y (t )    ak p (t  kTb )  n(t ) where n(t )  w(t ) * c(t ) p(t) is
k
centered
 y (ti )   ai p (ti  iTb )    ak p  (i  k )Tb   n(ti ) at origin
k ,k i

actual value intersymbol noise


(note that ti = i Tb) interference (ISI)
13 - 18
Eliminating ISI in PAM
• One choice for P(f) is a  1
rectangular pulse  2 W ,W  f  W
P( f )  
W is the bandwidth of the  0
 , | f | W
system
Inverse Fourier transform
of a rectangular pulse is 1 f
P( f )  rect ( )
is a sinc function 2W 2W
p (t )  sinc(2  W t )
• This is called the Ideal Nyquist Channel
• It is not realizable because pulse shape is not
causal and is infinite in duration
13 - 19
Eliminating ISI in PAM
• Another choice for P(f) is a raised cosine spectrum
 1
 0  | f |  f1
2W

  
 1
P( f )   1  sin  (| f | W )   f1  | f |  2W  f1
  2W  2 f  
 4W   1 
 0 2W  f1  | f |  2W


• Roll-off factor gives bandwidth in excess f1
  1
of bandwidth W for ideal Nyquist channel W
• Raised cosine pulse p(t )  sinc t  cos 2 2 W2 t 2
 T  1  16  W t
has zero ISI when  s

sampled correctly ideal Nyquist channel dampening adjusted by


impulse response rolloff factor 
• Let g(t) and c(t) be square root raised cosines
13 - 20
Bit Error Probability for 2-PAM
• Tb is bit period (bit rate is fb = 1/Tb)
s(t) r(t) r(t) rn s (t )   ak g (t  k Tb )
 h(t) k

Sample at r (t )  s (t )  v(t )
Matched t = nTb
v(t) filter r(t) = h(t) * r(t)

v(t) is AWGN with zero mean and variance 2


• Lowpass filtering a Gaussian random process
produces another Gaussian random process
Mean scaled by H(0)
Variance scaled by twice lowpass filter’s bandwidth
• Matched filter’s bandwidth is ½ fb
13 - 21
Bit Error Probability for 2-PAM
• Binary waveform (rectangular pulse shape) has
amplitude A over nth bit period nTb < t < (n+1)Tb
• Matched filtering by integrate & dump See slide
Set gain of matched filter to be 1/Tb 13-16
Integrate received signal over symbol period, scale and
sample( n 1)Tb
1 Prn (rn )
rn 
Tb nTb  r (t ) dt
( n 1)Tb
1 rn
 A
Tb  v(t ) dt
nTb A
- 0
A
  A  vn Probability density function (PDF)
13 - 22
Bit Error Probability for 2-PAM
• Probability of error given that Tb = 1
transmitted pulse has amplitude –A
 vn A 
P(error | s (nTb )   A)  P ( A  vn  0)  P (vn  A)  P  
  
vn / 
• Random variable
vn
is Gaussian with PDF for

N(0, 1)
zero mean and
variance of one 0 A /
 v2
 vn A  1   A
P(error | s(nT )   A)  P     e 2
dv  Q 
    A 2  

Q function on next slide


13 - 23
Q Function
• Q function
1   y2 / 2
Q( x)  e dy
2 x
• Complementary error
function erfc
2  t 2
erfc ( x)   e dt
 x
• Relationship Erfc[x] in Mathematica
1  x 
Q( x)  erfc  erfc(x) in Matlab
2  2
13 - 24
Bit Error Probability for 2-PAM
• Probability of error given that
Tb = 1
transmitted pulse has amplitude A
P (error | s (nTb )  A)  Q( A /  )
• Assume that 0 and 1 are equally likely bits
P(error)  P( A) P(error | s (nTb )  A)  P( A) P (error | s (nTb )   A)
1  A 1  A
 Q   Q   Q    Q 
2 σ 2 σ
 A
 
σ
A2 

where,   SNR  2 e x 2
1 e 2
 erfc( x)   Q(  ) 
• Probability of error x 2 
decreases exponentially with SNR for large positive x, 
See slide 8-17 13 - 25
PAM Symbol Error Probability
• Average transmitted signal power 3d

E{an2 } 1 E{an2 }
   | GT ( ) | d  Tsym
2
PSignal
Tsym 2 d d

GT() is square root of the -d -d


raised cosine spectrum
Normalization by Tsym will -3 d
be removed in lecture 15 slides 2-PAM 4-PAM
• M-level PAM symbol amplitudes Constellations with
M M
li  d (2i  1), i  1, . . . , 0, . . . , decision boundaries
2 2
• Assuming each symbol is equally likely
 M
  M

1  1 2  1  2 2
2 d2
PSignal   M i  T  M
l 2
   d (2i  1)    ( M  1)
2

Tsym  M i   1  sym  i 1  3Tsym 13 - 26


 2   
PAM Symbol Error Probability
• Noise power and SNR • Consider M-2 inner
1
 sym / 2
N0 N0 levels in constellation
PNoise 
2 

 /2
2
d 
2Tsym Error if and only if
sym

| vR (nTsym ) | d
two-sided power spectral
density of AWGN where  2  N 0 / 2
PSignal 2( M 2  1) d 2 Probablity of error is
SNR   
PNoise 3 N0 d
P (| vR (nTsym ) | d )  2 Q 
 
• Assume ideal channel, • Consider two outer
i.e. one without ISI levels in constellation
x (nTsym )  an  v R ( nTsym ) d
P(vR (nTsym )  d )  Q 
channel noise after matched  
13 - 27
filtering and sampling
Optional

Alternate Derivation of Noise Power



v(nT )   g ( )w(nT   )d

r Filtered noise T = Tsym

 
E v (nT )  E   g r ( ) w(nT   )d 
2
2  
 Noise power
   
 
 E{   gT ( 1 ) w(nT   1 ) gT ( 2 ) w(nT   2 )d 1d 2 }
 
 
  g
  
T ( 1 ) gT ( 2 ) E{w(nT   1 ) w(nT   2 )}d 1d 2
2 (1–2)
  sym / 2
2 1  2
   g r ( )d  
2 2
 G r ( )d 
2


2  sym / 2
T 13 - 28
PAM Symbol Error Probability
• Assuming that each symbol is equally likely,
symbol error probability for M-level PAM
M 2 d  2  d  2( M  1)  d 
Pe   2 Q 
  Q   Q 
M    M    M  

M-2 interior points 2 exterior points

• Symbol error probability in terms of SNR


 1
 PSignal
M 1   3
Pe  2 Q  2
2 
SNR   since SNR  
PNoise 3
d2
M 2
1  
  M 1
2
M  
 

13 - 29
Visualizing ISI
• Eye diagram is empirical measure of signal quality
 

  g (nTsym  kTsym ) 
x(n)   ak g (n Tsym  k Tsym )  g (0)  an   ak 
k    k   g ( 0 ) 
 k  n 
• Intersymbol interference (ISI):
 g (nTsym  kTsym )  g (kTsym )
D  ( M  1) d 
k  , k  n g (0)
 ( M  1) d 
k  , k  n g (0)

• Raised cosine filter has zero


ISI when correctly sampled
• See slides 13-31 and 13-32 13 - 30
Eye Diagram for 2-PAM
• Useful for PAM transmitter and receiver analysis
and troubleshooting
Sampling instant

M=2
Margin over noise
Distortion over
Slope indicates zero crossing
sensitivity to
timing error
Interval over which it can be sampled

t - Tsym t t + Tsym
• The more open the eye, the better the reception
13 - 31
Eye Diagram for 4-PAM

Due to
3d startup
transients.
d Fix is to
discard first
few symbols
-d equal to
number of
symbol
-3d periods in
pulse shape.
13 - 32

You might also like