digital communications part ii line coding and pulse shaping
TRANSCRIPT
DIGITAL COMMUNICATIONS Part II
Line Coding and Pulse Shaping
©2000 Bijan Mobasseri 2
Statement of the Problem
On the way from transmitter to the receiver, we are now here…
Two questions:• How to pick pulse sequence?• How to pick pulse shape?s
Source encoder
Analog message
1 0 0 1 1...
?
©2000 Bijan Mobasseri 3
Picking a pulse sequence:line coding
There are numerous ways we can convert a string of logical 1’s and 0’s to a sequence of pulses. But what are the ground rules?
Example: convert 1 0 1 1 0 1
1 1 1 10 0
1
0
1 1
0
1OR
©2000 Bijan Mobasseri 4
Line coding concerns
Here are what we have to know before making a selection• Presence or absence of DC level• Spectrum at DC• Bandwidth• Built-in clock recovery • Built-in error detection• Transparency
©2000 Bijan Mobasseri 5
DC level
Some line codes have a DC level some don’t. DC levels are inherently wasteful of power. Also, their DC levels will be stripped over links with transformers or capacitor coupled repeaters
1 1 1 10 0
1
0
1 1
0
1
DC level 0 DC
©2000 Bijan Mobasseri 6
Spectrum at DC
This is related to the DC level. Generally we want to have the spectrum to be 0 at f=0. Finite spectrum at f=0, indicates partial presence of a DC level
©2000 Bijan Mobasseri 7
Bandwidth
A most critical component. We must be able to compare the bandwidth taken up by different line codes while transmitting a fixed number of pulses per second.
BB
©2000 Bijan Mobasseri 8
Clock recovery
Knowing the beginning of pulses at the receiver is critical in bit detection. Otherwise you don’t know where you are or what you are looking at. Can you tell where a pulse ends and where the next one begins?
Received pulses
©2000 Bijan Mobasseri 9
Error detection
It is possible to come up with smart pulse sequences that can signal to the receiver there is something wrong
For example, let consecutive 1’s be represented by opposite polarity pulses
1 1
channel
1
1
It is not possible to have two neighboring pulses of the same polarity: It violates the encoding ruleThere must be a detection error
transmitted
received
©2000 Bijan Mobasseri 10
Transparency
Data bits are often random but at times they my bunch up and form unbroken strings of 0’s or 1’s. In such cases statistics of pulse pattern may change
Look at the following two cases:
1
0
1 1
0
1
0 0 0 0
zero DC Non zero DC
©2000 Bijan Mobasseri 11
Specific line codes
We will cover the following line codes• Unipolar • Polar• Split phase or Manchester• Bipolar or AMI (alternate mark inversion)• Coded mark inversion(CMI)• High density bipolar 3 (HDB3)
©2000 Bijan Mobasseri 12
Unipolar (on-off)
Unipolar (return-to-zero, RZ)• Digit 0 is represented by NO PULSE• Digit 1 is represented by a half width pulse
Unipolar (non RZ)• Digit 0 is represented by NO PULSE• Digit 1 is represented by a full width pulse
10
10
©2000 Bijan Mobasseri 13
Unipolar examples
The bit sequence is 1 0 1 1 0 0 0 0 1 0 1
Unipolar RZ:
Unipolar NRZ:Bit
length
Bitlength
Half-width pulses
Full width pulses
©2000 Bijan Mobasseri 14
Unipolar properties by spectral analysis
Let the pulse rate be R. Pulse width is T=1/R
R 2R
Unipolar NRZ
2RR
Bandwidth=pulse rate
Bandwidth=2xpulse rate
Clock signals
Unipolar RZ
00
©2000 Bijan Mobasseri 15
Could we have predicted the bandwidth?
Nyquist gave us this inequality: BT>R/2, i.e. need at least R/2 Hz to transmit R pulses per sec.
For unipolar we are transmitting R pulses per second. Unipolar spectrum gives us two answers
BT=R (NRZ)
BT=2R(RZ)
©2000 Bijan Mobasseri 16
Why the difference?
Nyquist gives us the minimum possible bandwidth. Obviously, neither of the two signaling arrangements reach that goal
The reason is the choice of the pulse shape. We are working with square pulses. To meet Nyquist’s goal, we have to use sinc pulses. More on that later
©2000 Bijan Mobasseri 17
Importance of clock component
If a unipolar NRZ signal is put through a narrowband bandpass filter centered at R, then a sinusoidal signal emerges that can be used for symbol timing
1/R 2RR
Clock signals
0
BPF
f
©2000 Bijan Mobasseri 18
Polar
Encoding rule:• 1 is represented by a pulse• 0 is represented by the negative of the same pulse
Example: encode 1 0 1 1 0 0 0 0 1 0 1
RZ
NRZ
©2000 Bijan Mobasseri 19
Polar spectrum
Identical to unipolar except for the absence of clock component at pulse rate
R 2R 2R
NRZRZ
©2000 Bijan Mobasseri 20
Split phase or Manchester coding
Encoding rule:• 1 is represented by -->
• 0 is represented by-->
Encode 1 0 1 1 0 0 0 0 1 0 1 Bit length
©2000 Bijan Mobasseri 21
Manchester code properties
There are some nice properties here• Zero DC because of half positive/half negative pulses• Transparent: string of 1’s and zeros will not affect DC levels
No DC at f=0 but large bandwidth and no clock
2RR
©2000 Bijan Mobasseri 22
Bipolar or AMI
Bipolar or alternate mark inversion(AMI) used in PCM is defined by• O ----> no pulse• 1------> ±pulse. Sign of the pulse alternates
Example: 1 0 1 1 1
1
1 1
10
Alternating polarity
©2000 Bijan Mobasseri 23
Advantages
AMI has several nice properties including null at DC. It also avoids signal “droop” over AC coupled lines
Result of a long string of1’s if polar format is used
©2000 Bijan Mobasseri 24
Bipolar spectrum
Bipolar can be of RZ or NRZ variety. As usual, the NRZ has half the bandwidth of RZ
R 2RR/2f f
RZ NRZ
©2000 Bijan Mobasseri 25
HDBn: G.703 standard for 2,8 and 34 Mbits/sec PCM
High density binary n line code is just like bipolar RZ with the following modification:• When the number of continuous zeros exceeds n, usually 3, they
are replaced by a special code
A string of 4 zeros is replaced by either 000V or 100V. V is a binary 1 with the sign chosen to violate the AMI rule. This will let the receiver know of the substitution
©2000 Bijan Mobasseri 26
HDB3 example
Le the sequence be 10110000101. Here is the corresponding HDB3 coding
V
1 0 1 1 0 0 0 0 1 0 1
Must alternate in polarity
©2000 Bijan Mobasseri 27
Coded Mark Inversion(CMI):G.703 for 140 Mbits/sec
CMI is a modified polar NRZ code. Pulses corresponding to 0’s stay put but 1’s alternate in polarity. In polar they had a fixed assignment
1 0 1 1 0 0 0 0 1 0 1
©2000 Bijan Mobasseri 28
CMI spectrum
Similar 3-dB bandwidth to bipolar-NRZ but has a clock component at the pulse rate
R 2R f
Pulse Shaping
Choosing the right pulse for the job
©2000 Bijan Mobasseri 30
What is the problem?
What we just went through was about picking a pulse sequence. We have not said anything about the pulse shapes that make up the sequence
Square pulses are by no means the best shapes to use
©2000 Bijan Mobasseri 31
Criterion for picking pulse shapes
Whatever line coding you choose, the shape of the pulse greatly affects signal properties. The two we are most concerned with are• Bandwidth• Interference with adjacent pulses
©2000 Bijan Mobasseri 32
ISI:intersymbol interference
Modern communication systems are mostly interference limited, not noise limited
ISI is a phenomenon in digital signaling that arises from the interaction of the signal and communication channel
©2000 Bijan Mobasseri 33
How is ISI created?
There are a variety of reasons (bandlimited channels, multipath, fading). The end result is something like this
1 0 0 0
1 0 0 0
1 0 1 0
1 0 0 0 ISI causes detection error0’s may look like 1’s and vice versa
transmitted
received
©2000 Bijan Mobasseri 34
A note on notation
We frequently talk about data rate either in terms of bits/sec(Rb) or pulses/sec(R). They are not the same because one pulse may represent several bits.
Similarly, we may talk about bit length (Tb=1/Rb) or pulse width(T=1/R)
We will use bit notations but results are applicable to pulses as well
©2000 Bijan Mobasseri 35
Bandlimiting effect
Take square NRZ pulses at Rb bits/sec. The nominal pulse bandwidth is then Rb Hz.
Let’s investigate passage of this pulse through an ideal lowpass channel limited to Rb/2 Hz
1/Rb
?H(f)
Rb/2
©2000 Bijan Mobasseri 36
Output in the frequency domain
In the frequency domain, input is a sinc.
RbRb
transmit
receive
Rb/2
Clearly, the received pulse is severely bandlimited compared to its original shape. How doesit look like in time?
©2000 Bijan Mobasseri 37
Distorted pulse in time=pulse dispersion
As a result of bandlimiting, we witness pulse “dispersion”, i.e. spreading
transmitted
received
Tb/2
Tb
time
©2000 Bijan Mobasseri 38
Notion of sampling instant
A digital receiver works on the basis of samples taken at periodic intervals.
These samples are either taken directly from the pulse (not likely) or after some preprocessing(filtering, equalization)
©2000 Bijan Mobasseri 39
Dispersion impact on a pulse train
We never send just one pulse. We send a pulse sequence such as 1 1 1...
Sampling instants
Instead of picking up a sample from the current pulse, we are picking upsamples from adjacent samples as well
©2000 Bijan Mobasseri 40
How to handle ISI?
ISI can be handled at two points, 1): source (by pulse shaping) and /or 2): equalization at the receiver
We will cover both but first look at ISI elimination by pulse shaping
©2000 Bijan Mobasseri 41
What did Nyquist say about ISI?
He said we need not have zero ISI everywhere. In fact adjacent pulses may have substantial overlap
All we need to have is zero ISI at the sampling points where bit detection is performed
©2000 Bijan Mobasseri 42
A typical scenario
Detecting bits at the receiver entails two main steps• Sampling of the received signal at the appropriate time• Decision making
Decision device
0
1
©2000 Bijan Mobasseri 43
Nyquist’s first criterion for zero ISI
Nyquist defined zero ISI as the absence of ISI at sampling instants ONLY. Pulses can overlap each other at all other times with no ill effects
©2000 Bijan Mobasseri 44
Pulse specification
This is what we want: transmit pulses at the rate of Rb bits/sec such that when the line is sampled at intervals 1/Rb sec., we experience NO ISI
Generally speaking, this is not possible because pulses spread out as they pass through channel
©2000 Bijan Mobasseri 45
But… there is a way
Of all the candidate pulses, there is one that satisfies this seemingly difficult task. It is , you guessed it, a sinc.
To transmit Rb bits/sec. we should use pulses of the form
p(t)=sinc(Rbt)
©2000 Bijan Mobasseri 46
How does a sinc work?
A sinc pulse has periodic zero crossings. If successive bits are positioned correctly, there will be no ISI at sampling instants.
Sampling instants
No ISI
Nadjacent pulsesGo to zero hence no ISI
Tb
©2000 Bijan Mobasseri 47
Another distinction for sinc
We know that sinc(Rbt) has bandwidth of Rb/2 (Fourier table). Therefore, to transmit Rb bits/sec a bandwidth of Rb/2 would suffice
We learned before that this is the minimum transmission bandwidth
©2000 Bijan Mobasseri 48
Nyquist’s 1st criterion for zero ISI:summary
To transmit data at Rb bits/sec use pulses of the form sinc(Rbt)
In addition to zero ISI, this pulse requires minimum possible bandwidth of Rb /2
©2000 Bijan Mobasseri 49
Ideal Nyquist channel
Ideal Nyquist channel of bandwidth Rb /2 can support Rb bits/sec
Rb /2 is called the Nyquist bandwidth
Rb/2
1/Rb
Nyquist channel
©2000 Bijan Mobasseri 50
Example: PCM voice channel
Remember that to transmit one voice channel, 8-bit PCM generates 64 Kb/sec. Recommend a pulse generating zero ISI
The desired pulse is p(t)=sinc(Rb t)=sinc(64000t)
Required bandwidth is BT=Rb /2=32 KHz
©2000 Bijan Mobasseri 51
Problems with sinc
Sinc pulses are nice but are not realizable. Why? Because sinc is the impulse response of an ideal lowpass filter which itself cannot be built
H(f) H(f)sinc
©2000 Bijan Mobasseri 52
Keeping the best of both worlds
What we want is a pulse that is 1): realizable and 2): has the same desirable ISI property of a sinc
To make a sinc realizable, we begin by smoothing the edges of its squared-off spectrum
This process is called “ roll-off ”
©2000 Bijan Mobasseri 53
Raised cosine spectrum
We can smooth the sinc spectrum by the smoothing parameter . The cost is increased bandwidth
f
=0.5=0
=1
Rb/2 Rb
©2000 Bijan Mobasseri 54
Excess bandwidth and roll off factor
Rolling off generates increased bandwidth beyond Nyquist’s. Roll-off factor is given:
a=1−f1 Rb /2( )
=0 f1 =Rb /2 original Nyquist's bandwidth
1 f1 =0 full roll-off⎧ ⎨ ⎩
=0
Rb/2
f1
Excess bandwidth
©2000 Bijan Mobasseri 55
Bandwidth of raised cosine pulse
Raised cosine bandwidth varies according to the roll-off factor. Zero roll-off gives the Nyquist bandwidth. Full roll-off doubles it
BT=(1+)(Rb/2)
©2000 Bijan Mobasseri 56
Raised-cosine pulse in the time domain
When the spectrum of sinc is smoothed out, it naturally affects the shape of the pulse in the time domain. The result is a modified sinc given by
p t( )=sincRbt( )cosπαt( )
1−4α2Rb2t2
⎡
⎣ ⎢ ⎤
⎦ ⎥
Keeps zero crossingsat t=multiples of Rb
Sinc, a=0
a=1
t1/Rb
©2000 Bijan Mobasseri 57
Properties of raised-cosine
Raised cosine is very much sinc-like, i.e.• Has zero crossings at multiples of 1/Rb
• Has additional zero crossings between the old ones
Raised cosine also decays faster Side lobes are smaller than sinc All of the above properties help to diminish ISI
©2000 Bijan Mobasseri 58
Special case: full raised cosine
For =1 we get a special case called full raised cosine pulse. For a bit rate of Rb, this pulse requires a bandwidth of Rb.
Rb/2 Rb
=0
BT=(1+1)Rb/2=Rb
=1
©2000 Bijan Mobasseri 59
Raised-cosine pulse:full roll-off
In the time domain, raised-cosine pulse with full roll-off( =1 ) is given by
Properties:• Zero crossings at multiples of 1/2Rb (twice the sinc) . You can find
ZC’s by setting argument of sinc to ±1, ±2 etc
• Bandwidth is twice the sinc at BT=Rb
p t( )=sinc 2Rbt( )1−4Rb
2t2
©2000 Bijan Mobasseri 60
Example: 64 Kbits/sec line
Compare shapes and spectra of candidate pulses below for ISI free transmission• Square pulse• Sinc pulse• full roll-off raised cosine
©2000 Bijan Mobasseri 61
Square pulses:poor ISI
To transmit data at 64 KB/sec, we need pulses of 1/64000 sec (if NRZ)
Tb=1/64000 sec
BT=1/Tb=64 KHz
©2000 Bijan Mobasseri 62
Other pulses
Sinc pulse corresponds to a roll-off factor of zero. Therefore,
BT=(1+ )Rb/2=32 KHz For a full roll-off raised cosine pulse, =1
BT=(1+ 1)Rb/2=64 KHz
©2000 Bijan Mobasseri 63
Issue of bandwidth efficiency
The singular property of a digital signaling scheme is its bandwidth efficiency measured in bits/sec/Hz and found by the ratio =Rb/BT
measures how many bits/sec we can pump in one hertz of bandwidth
©2000 Bijan Mobasseri 64
Bounds on
For a sinc we have BT=Rb/2. Therefore
=2 bits/sec/Hz For a full roll-off pulse BT=Rb. Therefore
=1 bit/sec/Hz For example, in a bandwidth of 4 KHz, the
fastest we can signal without ISI is 8 KHz using sincs
©2000 Bijan Mobasseri 65
An interesting question
We know pretty well what pulse we need to work with for ISI-free transmission
The problem is we need sinc or raised cosine characteristic at the receiver
The question then is what kind of pulse we need to send in order to end up with an ISI-free pulse?
©2000 Bijan Mobasseri 66
Channel model
Here is what we are looking at
The overall response must be such that the received pulse is ISI-free, e.g. sinc
HN(f)=HT(f)Hch(f)HR(f)
Transmit filter
ChannelReceive
filter
ISI-free pulseinput
HN(f)
©2000 Bijan Mobasseri 67
Nyquist channel
What we need is for HN(f) to have a raised cosine response giving rise to raised cosine pulses at the receiver
Assuming perfect channel, Hch(f)=1, we can split the raised cosine response between HR(f) and HT(f)
HT f( ) =HR f( ) =cos2
πf2Rb
⎛
⎝ ⎜
⎞
⎠ ⎟ f ≤Rb
0 else
⎧
⎨ ⎪
⎩ ⎪
©2000 Bijan Mobasseri 68
Nyquist’s channel response
Received pulses will have this spectrum
HN(f)=HT(f)HR(f)
frequencyRbRb/2
0.5
1
©2000 Bijan Mobasseri 69
Overall response
This is the equivalent model we now have
HN(f)(raised cosine)
1 1 -1 -1 -1 1
Transmitter Receiver
anδ t−nTb( )n∑an = −1,1{ }
ann∑ hN t−nTb( )
EQUALIZATION
Dealing with ISI after the fact
©2000 Bijan Mobasseri 71
Canceling ISI
We can eliminate ISI before it has happened (pulse shaping) or after it has happened (equalization)
The problem with pulse shaping is that channel characteristics, hence pulse shapes do not remain constant.
We need a mechanism to cancel ISI at the destination
©2000 Bijan Mobasseri 72
Illustrating the problem
The delicate pulse shaping at the transmitter is messed up by the channel. ISI is back
Tb
ISI
Zero crossing has moved hence ISI with the adjacent pulse
©2000 Bijan Mobasseri 73
What is equalization?
Equalization is a process by which a number of received pulses are processed in order to “null” ISI, i.e. drive it to zero, at the sampling point
In effect we want to create an ideal channel; flat frequency response and linear phase response. The delicate pulse shaping at the transmitter is therefore preserved
©2000 Bijan Mobasseri 74
Setting the stage
Let p(t) be the current pulse sampled at t=Tb. As a result of channel, zero crossings do not coincide with sample times
Sample time=Tb
Sample time
ISI
Current pulse
©2000 Bijan Mobasseri 75
Zero forcing equalizer
What we need to do is to somehow force the nonzero tails of the adjacent pulses to zero, therefore eliminating ISI at the sampling point
This can be accomplished by a weighted sum operation implemented by a digital filter
©2000 Bijan Mobasseri 76
What do we want?
Here is what we want
Equalizerp (t) po(t)
po nTb( )=
1 n=0
0 n=±1,±2,K ,±N⎧ ⎨ ⎩
Tb2Tb
po(t)received
©2000 Bijan Mobasseri 77
ZF equalizer as a digital filter
Tb Tb Tb
W-N W-N+1
Tb
Wo
Tb
WN
p(t)
input
po(t) = Wkp t−kTb( )k=−N
N
∑
One bit delay
unknowns
©2000 Bijan Mobasseri 78
How to find the weights?
There are 2N+1 unknown weights. At the same time, po(t) must satisfy 2N+1 conditions
po nTb( )=
1 n=0
0 n=±1,±2,K ,±N⎧ ⎨ ⎩
©2000 Bijan Mobasseri 79
Enforcing one condition
We want the equalized pulse to have a peak of 1 at t=0, i.e. no ISI. Setting po(0)=1
W−Np(+N)+W−N+1p(N −1)+...
+Wop(0)+W1p(−1)+...+WNp(−N) =1
p(0) Sample times
Received pulse
©2000 Bijan Mobasseri 80
In matrix form...
Equalizer output can put in a compact matrix product form shown below
W−N,W−N+1,...,Wo,W1,...WN[ ]
p(N)
p(N −1)
M
p(0)
M
p(−N)
⎡
⎣
⎢ ⎢ ⎢ ⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥ ⎥ ⎥ ⎥
=1
©2000 Bijan Mobasseri 81
2N+1 matrix equation
We have 2N+1 unknown weights and precisely 2N+1 equations
p(0) p(−1) L p(−2N)
p(1) p(0) L p(−2N +1)
M M M M
p(2N) p(2N −1) L p(0)
⎡
⎣
⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥
W−N
M
Wo
M
WN
⎡
⎣
⎢ ⎢ ⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥ ⎥ ⎥
=
0
M
1
M
0
⎡
⎣
⎢ ⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥ ⎥
Known data
©2000 Bijan Mobasseri 82
Example: 3-tap equalizer
Since there are 2N+1 taps, N=1
Tb Tb
W-1 Wo W1
p(t)
p(t+Tb) p(t-Tb)
po(t) =W−1p(t+Tb)+Wop(t)+
W1p(t−Tb)
©2000 Bijan Mobasseri 83
Received pulse
Received pulse is sinc-like but its zero crossings have moved.
-0.3-0.2
1
p(0)=1p(Tb)=-0.3p(-Tb)=-0.2
Force them to zero
©2000 Bijan Mobasseri 84
Setting up the matrix equation
The (2N+1)x(2N+1) data matrix reduces to the 3x3 matrix
p(0) p(−1) p(−2)
p(1) p(0) p(−1)
p(2) p(1) p(0)
⎡
⎣
⎢ ⎢
⎤
⎦
⎥ ⎥
W−1
Wo
W1
⎡
⎣
⎢ ⎢
⎤
⎦
⎥ ⎥
=
0
1
0
⎡
⎣
⎢ ⎢
⎤
⎦
⎥ ⎥
p(-2) p(-1) p(0) p(1) p(2)
©2000 Bijan Mobasseri 85
Solving for the weights
Filling in the data matrix from pulse amplitudes, we can easily solve for W’s
1 −0.2 −0.05
−0.3 1 −0.2
0.1 −0.3 1
⎡
⎣
⎢ ⎢
⎤
⎦
⎥ ⎥
W−1
Wo
W1
⎡
⎣
⎢ ⎢
⎤
⎦
⎥ ⎥ =
0
1
0
⎡
⎣
⎢ ⎢
⎤
⎦
⎥ ⎥ ⇒ W =P−1I
in MATLAB
W=P \ I ⇒ W =
0.21
1.12
0.31
⎡
⎣
⎢ ⎢
⎤
⎦
⎥ ⎥
©2000 Bijan Mobasseri 86
Visual look at equalization
The matrix equation can be viewed as a sliding weighted sum
W1 Wo W-1
W1 Wo W-1
W1 Wo W-1
Each multiply-add givesOne equation
MATCHED FILTERING
©2000 Bijan Mobasseri 88
Problem statement
The ultimate task of a receiver is detection, i.e. deciding between 1’s and 0’s. This is done by sampling the received pulse and making a decision
Matched filtering is a way to distinguish between two pulses with minimum error
©2000 Bijan Mobasseri 89
Detection scenario
Here is a typical detection scenario. Received noisy pulse is sampled. Based on this sample a decision must be made; what was the transmitted bit?
+
noise
decision
0
1
©2000 Bijan Mobasseri 90
Objective: lowest bit error rate (BER)
We are looking for a detector structure that over the long run provides the least number of bit errors.
Bit error is directly affected by the level of SNR at detection instant
It makes sense therefore to raise the SNR as high as possible before making a decision
©2000 Bijan Mobasseri 91
Enter matched filter
Instead of sampling the received pulse directly, how about putting it through some kind of pre-processing with the objective of raising the SNR
+
noise
decision
0
1
Matchedfilter
(SNR)1 (SNR)2
Want (SNR)2 higher than (SNR)1
©2000 Bijan Mobasseri 92
Defining parameters
Let’s define various symbols as follows
+ ?g(t): Transmitted pulse
w(t) noise
y(t) y(T)
t=T sample time
decision
Unknown filter:Matched filter
©2000 Bijan Mobasseri 93
Filter output quantities
Filter output consists of two terms, pulse corresponding to g(t) and noise
y(t)=go(t)+n(t) Output SNR is defined at the sampling instant
t=T
η =signal powerat t =Taverage noisepower
=go(T)2
E n2 t( ){ }
©2000 Bijan Mobasseri 94
What is the output signal at sample time t=T?
Filter’s I/O relationship is given byGo(f)=G(f)H(f)
In the time domain we have
go t( )= G f( )∫ H f( )ej2πftdt
©2000 Bijan Mobasseri 95
Instantaneous signal power at t=T
Evaluating g(t) at t=T and squaring it
go T( )2 = H( f)G( f)ej2πfTdt−∞
∞
∫2
Notice t is replacedBy T
©2000 Bijan Mobasseri 96
Matched filter output noise power
Assuming white noise coming in,
Question now is what is output noise power?
H(f)f
No/2
White noise spectrum
Sw(f)
SN(f)=(No/2)|H(f)|2
©2000 Bijan Mobasseri 97
Average output noise power
Average power of any random process is the area under its power spectral density function. Therefore,
E n2(t){ }= SN( f)df =No
2H( f)2df
−∞
∞
∫−∞
∞
∫H(f)
©2000 Bijan Mobasseri 98
MF output SNR
We are now in a position to write the output SNR of matched filter
Known: pulse spectrum G(f), noise PSD No/2, sampling time T
Unknown: filters response H(f)
η =
H( f)G( f)ej2πfTdf−∞
∞
∫2
No
2H( f)2 df
−∞
∞
∫
©2000 Bijan Mobasseri 99
Next step: finding H(f)
Here is the premise: of all the filters you could use there is one that will generate the highest SNR at sampling instant.
The process leading to the solution is an optimization problem that in the end leads to the sought after H(f)
©2000 Bijan Mobasseri 100
An intuitive solution
To maximize output SNR we must minimize output noise power. Look at the following signal and noise spectra at filter’s input
High SNR band
Low SNR band
Noise PSD
Pulse spectrum
Filter must restrict noise passage without restricting signal
©2000 Bijan Mobasseri 101
Matched filter amplitude response
To pass just the signal and as little as noise as possible, filter’s amplitude response must be identical to input pulse frequency response:
|H(f)|=|G(f)| What about phase response?
©2000 Bijan Mobasseri 102
Input pulse phase response
Input pulse has a phase spectrum profile best shown by looking at its Fourier series expansion
t
Amplitudes add incoherently
f
Pulse phase spectrumπ
-π
©2000 Bijan Mobasseri 103
Output pulse phase response
For output signal amplitudes to add up coherently at t=T, output phase spectrum must be null, i.e. no phase difference among the components
Amplitudes add coherently
t=Tf
(f)=0
©2000 Bijan Mobasseri 104
What does it take to make (f)=0?
Filter’s output phase spectrum is equal to the sum of input phase and filter’s phase spectrum. Recall
Go f( )=G( f)ejφg( f )
×H( f)ejφh( f )
=G( f ) H( f)ej φg( f )+φh( f )( )
φh( f)=−φg( f)
©2000 Bijan Mobasseri 105
Characterizing Matched filter
We have established two facts• filter’s amplitude response=pulse amplitude spectrum• filter’s phase spectrum=negative pulse phase spectrum
Therefore, Matched filter is specified by
H(f)=kG*(f)exp(-j2πfT)
Sample timeconjugate
©2000 Bijan Mobasseri 106
Example:define MF at t=2
Let the input pulse g(t) be
G(f)=FT((t-1))=sinc2(f)exp(-j2πf1) Using H(f) from previous slide
H(f)=kG*(f)exp(-j2πfT)=sinc2(f) exp(+j2πf1) exp(-j2πfx2)
H(f)=sinc2(f)exp(-j2πf)
t1
(t-1)
©2000 Bijan Mobasseri 107
Matched filter in the time domain
MF has a more interesting form in the time domain.
Given g(t) as the input pulse, output SNR will be maximized if filter’s impulse response is given by
h(t)=kg(T-t)
©2000 Bijan Mobasseri 108
MF interpretation
The impulse response of a MF is a flipped and translated pulse itself
Pulse ----->
Flipped---->
Shifted---->
t1
1
MF impulse response
©2000 Bijan Mobasseri 109
Importance of sampling instant
Position of impulse response is controlled by the sampling instance. If we wanted to maximize SNR at t=2, h(t) would have been
t1 2
Shifted by t=2
©2000 Bijan Mobasseri 110
MF for rectangular pulses
For a rectangular pulse centered at t=1 and width 2 design a matched filter in order to reach peak SNR at t=2
g(t)
h(t) g(t)*h(t)=2
2
1
2 4
Sample time
signal peaks at t=2for which the filter is designd for
this is g(t) flipped and shifted by 2
©2000 Bijan Mobasseri 111
SNR at decision instant
We know that MF maximizes SNR at specific time T. Question is what is that SNR?
For a pulse of energy E immersed in white noise No/2, the output SNR is given by
SNR=2E/No
©2000 Bijan Mobasseri 112
Interpretation
SNR is controlled by only two quantities; signal energy and noise PSD
Therefore, pulse shape has no bearing on the output SNR
Any pulse, as long as it has the same energy, will produce the same SNR
©2000 Bijan Mobasseri 113
Example: SNR calculation
Let the pulse be triangular of height 10 mv and width 1.0 ms. Find SNR at the T=1 ms if noise is white with PSD 10-9 V2/Hz
10 mv
1 msec
©2000 Bijan Mobasseri 114
Matched filter and sampling instant
Since sampling instant is at t=1, we should flip then shift by t=1 ms. The MF impulse response will then look like h(t)=kg(T-t)=kg(10-3-t)
Shift to t=1
T=1 msec
©2000 Bijan Mobasseri 115
Finding output SNR
We must first find the pulse energy
SNR is then given by
E = g2(t)dt=0
T
∫ 20t[ ]2dt+0
0.5x10−3
∫ 0.02−20t[ ]2dt0.5x10−3
10−3
∫
=0.33×10−7 W-s
SNR=2ENo
=2×0.33×10−7
10×10−9 =6.67=8.2dB
©2000 Bijan Mobasseri 116
Designing MF for two pulses
In all likelihood, we will be using at least two pulses in a digital comm system!
If they are of different shapes, how would you design a matched filter receiver?
1
0
©2000 Bijan Mobasseri 117
Solution 1: filter bank
Build a filter bank, each branch matched to one pulse
h(t)=p1(T-t)
h(t)=p2(T-t)
Pick larger
0
1
p1(t)
here decision is in favor of p1 or digit 0
©2000 Bijan Mobasseri 118
Solution II: use a single MF
It can be shown that when two pulses are involved, a single filter matched to the difference pulse p1(t)-p2(t), is the optimum filter
For 0
For 1
A
-A
2A
h(t)
©2000 Bijan Mobasseri 119
Illustration
Let’s see what appears at the output of the single matched filter
A
-A
2A
2A2Tb
-2A2Tb
1’s and 0’s are clearlydistinguished
©2000 Bijan Mobasseri 120
Nonoptimum filters
What happens if we just use a garden variety lowpass filter instead of the optimum matched filter?
Is there a loss in SNR and how much? Is the resulting hardware simplicity worth it?
©2000 Bijan Mobasseri 121
RC filter:signal out
Let’s pick the simplest of all lowpass filters
R
C
H( f) =1
1+j2πfRCp(t)
po(t)
po t( )=A 1−e−
tRC
⎛
⎝ ⎜
⎞
⎠ ⎟ 0≤t≤Tb
Ap
Tb
po(t)
Ap =A 1−e−
TbRC
⎛
⎝ ⎜
⎞
⎠ ⎟
Sampling point
©2000 Bijan Mobasseri 122
RC filter: noise out
Assume white noise No/2 at the input. Output PSD is then
Sno(f)=(No/2)|H(f)|2
Output noise power is the area under Sno
σno
2 =No
2df
1+(2πfRC)2=
No
4RC∫
©2000 Bijan Mobasseri 123
Output SNR
Define output SNR as peak signal squared over noise power
Substituting
ρ =Ap
2
σn
2
ρ =4A2Tb
No
1−e−
TbRC
⎛
⎝ ⎜
⎞
⎠ ⎟
2
Tb RC
Goal: find the RC that maximizesoutput SNR
©2000 Bijan Mobasseri 124
Solving for RC
Replace RC by x and set d/dx=0 and solve for x. The answer is
RC=Tb/1.26 The resulting output SNR is
max=(0.816)(2A2Tb/No)
©2000 Bijan Mobasseri 125
Comparison with matched filter
For matched filter output SNR was (SNR)MF=2E/No=2A2Tb/No
Compare withmax =(SNR)RC =(0.816)(2A2Tb/No)
(SNR)RC=0.816(SNR)MF
(SNR)RC=(SNR)MF-0.9 dB
©2000 Bijan Mobasseri 126
ISI at filter’s output
Consider the following scenario
Define ISI as the ratio of unwanted over wanted amplitudes; -11 dB with RC=Tb/1.26
©2000 Bijan Mobasseri 127
Reducing ISI
One way to reduce ISI is to make pulse tails decay faster. This requires smaller time constants.
For example, for RC=Tb/2.3, ISI goes down to -20 dB.
The price we pay is that SNR is no longer at its peak value
©2000 Bijan Mobasseri 128
Canceling ISI through integrate-and-dump
Integrate and dump is a procedure whereby the tail of the pulse is shorted out at the end of the bit interval or integration
©2000 Bijan Mobasseri 129
Transversal MF
It is possible to realize a MF by a transversal filter the like of equalizer
DelayT
DelayT
DelayT
DelayT
anan-1 a1
+
r(t)=s(t)+n(t)
ro(t)=so(t)+no(t)
pick the weights tomaximize outputSNR at sample time
OPTIMUM DETECTION
What happens after matched filter?
©2000 Bijan Mobasseri 131
Baseband binary system
PAMTransmit
filterchannel
Receivefilter
Decisiondevice
+
BinaryData
bk
{ak} s(t)
w(t)
x(t)y(t)
t=Tb
0
1
noisetransmitter channel receiver
©2000 Bijan Mobasseri 132
Detection scenario
Once the received pulse is sampled (after MF or equalizer), we are left with a number
Based on this number we have to make a decision
+ MF
noise
Data=x(t)decisiony
y>-->1
y<-->0
©2000 Bijan Mobasseri 133
Polar signal in noise
Assume polar signaling in noise. The received signal at MF’s input is given by
y(t)=±A+w(t)where w(t) is random white gaussian noise with
PSD of No/2
©2000 Bijan Mobasseri 134
Case for bit errors
If 0(-A) is received, MF output is
Depending on noise strength, it is possible for y to swing over to positive territory causing a decision in favor of +A (1)
y t( )t=Tb= −A+w(t)[ ]
0
Tb
∫ dt= −Adesired{ +
1Tb
w(t)dt0
Tb
∫noise
1 2 4 3 4
©2000 Bijan Mobasseri 135
Comments on the “observation”
y(Tb) is the defined as the “observation” upon which a decision will be made
y(Tb) however is a random variable. Therefore, laws of probability govern whether it exceeds or falls below the threshold
©2000 Bijan Mobasseri 136
Types of bit errors
Type I• making a decision in favor of a 1 when 0 is transmitted
Type II• making a decision in favor of 0 when 1 is transmitted
Type I occurs when y(Tb) exceeds the pre-set threshold even though a negative pulse was transmitted
Type II occurs when y(Tb) falls short of the pre-set threshold even though a a positive pulse was transmitted
©2000 Bijan Mobasseri 137
Statistics of observation
At the MF output we have
y(Tb) is a random variable with the following statistics
y t( )t=Tb= −A+w(t)[ ]
0
Tb
∫ dt= −Adesired{ +
1Tb
w(t)dt0
Tb
∫noise
1 2 4 3 4
E y Tb( ){ }=−A
var y Tb( ){ }=No2Tb
©2000 Bijan Mobasseri 138
Distribution of y(Tb) when a 0 is transmitted
y(Tb) changes depending on whether a 0 or 1 is transmitted. Since noise is gaussian y(Tb) is a normal random variable with mean and variance just given
Its probability density function given that a 0 is transmitted is given by
f y0( ) =1
2πσye
−y+A( )2
2σ y2
©2000 Bijan Mobasseri 139
Two density functions for y(Tb)
If a 1 is transmitted, y(Tb) is normal with mean +A. If a zero is transmitted, the mean is -A
A-A
f(y|1)f(y|0)
y
©2000 Bijan Mobasseri 140
Detection errors
Here is the decision ruley>-->1 is transmittedy<-->0 is transmitted
Detection error occurs when a 1 is transmitted but we read y< or a 0 is sent and we read y>
©2000 Bijan Mobasseri 141
Conditional error probability:Peo
The probability of error given that a 0 is transmitted is written as
P(e|0)=P(y>|0)=area under the curve beyond
y
f(y|0)
-A
©2000 Bijan Mobasseri 142
…and Pe1
If 1 is transmitted, density function of y is normal and centered at +A
0 A
Pe1
y
©2000 Bijan Mobasseri 143
Overall bit error rate
We want a single number quantifying systems bit error rate(BER). BER is obtained by averaging conditional BER’s
Pe=P(e|1)P(1)+P(e|0)P(0) P(0) and P(1) are “prior” probabilities. Meaning
in what proportion are 1’s and 0’s that are transmitted
Normally it is 50/50
©2000 Bijan Mobasseri 144
Choice of threshold
Clearly threshold level on y makes a big difference in BER
It can be shown that for polar signals, the best optimum threshold is 0, i.e.
y>0 : decide in favor of 1y<0 : decide in favor of a 0
©2000 Bijan Mobasseri 145
Illustrating two BER’s
One error can be reduced at the expense of another
f(y|1)f(y|0)
y
Peo
Pe1
©2000 Bijan Mobasseri 146
Computing BER:Q-function
Computing BER boils down to finding areas under gaussian PDF. These numbers are tabulated for zero mean, unit variance gaussians as “Q-function”
a y
P(y>a)=Q(a)
0
©2000 Bijan Mobasseri 147
Area under general gaussian PDF
y is gaussian but has mean and variance other than (0,1). What then? It is a normalization problem
ma
P(y>a)=Q((a-m)/)
mean mvariance 2
©2000 Bijan Mobasseri 148
Properties of the Q-function
Due to the symmetry of gaussian PDF, there are similar symmetries on the Q-function. Examples are• P(y>-a)=1-Q(a)• P(y<-a)=Q(a)• P(-a<y<a)=1-2Q(a)
a
y
0-a
©2000 Bijan Mobasseri 149
Complimentary error function:erfc
In the textbook, instead of the Q-function, erfc is used. erfc and Q are closely related
Q v( ) =12erfc
v2
⎛ ⎝
⎞ ⎠
erfc(u)=2Q 2u( )
©2000 Bijan Mobasseri 150
Examples
If y is a gaussian random variable with mean 0 and variance 1, what is P(y>2)
We want Q(2). Table A7.1 shows erfc tabulation. Converting to Q
Q(2)=0.5erfc(1.4)=0.5x0.95229=0.476
©2000 Bijan Mobasseri 151
Non standard gaussian
If y is normal with mean 2 and variance 4, what is P(y>3)
We hadP(y>a)=Q((a-mean)/std.dev))=
Q((3-2)/2)=Q(0.5) Find Q(0.5)
©2000 Bijan Mobasseri 152
BER for polar signals
We will talk about BER’s at length in chapter 8. For now, for polar signaling, the most power efficient binary signaling:
where Eb is energy per bitBER=
12
erfcEb
No
⎛
⎝ ⎜
⎞
⎠ ⎟
©2000 Bijan Mobasseri 153
Defining Eb
If a bit is transmitted via a pulse p(t) of length Tb, then
For a square pulse of height AEb=A2Tb
Eb = p2 t( )dt0
Tb
∫
©2000 Bijan Mobasseri 154
Power in the bitstream
We don’t send just one pulse. It is then reasonable to ask what is the power in a bitstream running at Rb bits/sec
Power=(energy per bit)x(bits per second)=EbRb
©2000 Bijan Mobasseri 155
Example
In a polar scheme running at 1000 bits/sec. pulses used have amplitudes of 1mv. What is the bitstream power?
Eb=A2Tb=(0.001)2x(0.001)=10-9 watt-sec Power is given by
P= EbRb=(10-9)x103=10-6 watts
©2000 Bijan Mobasseri 156
Average Eb
In many line codings, energy per bit may not be the same for 0 and 1. Example is unipolar where one of the pulses is 0
We therefore have to work with average Eb
(Eb)avg=(1/2)Ebo+(1/2)Eb1
For unipolar,(Eb)avg=(1/2)x0+(1/2)Eb1=(1/2)Eb1
P=EavgRb
©2000 Bijan Mobasseri 157
Where do we go from here?
All we have done so far has been in baseband. The next step is to take the line codes in
baseband and map them to bandpass Chapter 8 is about digital modulations, where
rubber meets the road
EYE DIAGRAM
Picking the best sampling point
©2000 Bijan Mobasseri 159
Defining eye diagram
Imagine looking at a bitstream on a scope triggered by the symbol clock. Observation window is one bit long. Here is an ideal case
©2000 Bijan Mobasseri 160
Problem of sampling point
In the presence of noise and ISI, the eye diagram will look something like this. Question is where in {0-Tb} do you sample?
Tb
Which point would you choose To sample the pulse?
Superposition of Many pulses
©2000 Bijan Mobasseri 161
Actual examples
Let’s pass a polar NRZ bitstream through a pre-detection filter and look at its output in the presence of varying SNR.
Then, present the output in the form of eye diagram
%generating an eye pattern
%B.Mobasseri
%3/21/99
n=100;%number of bits
stdN=0.1;%noise standard deviation
%Generate bitstream, add noise then filter
p=bitstream(100,'polar_nrz');% n polar NRZ
snr=20*log10(std(p)/stdN) %show SNR
h=0.1*ones(1,10);%matched filter(output normalized)
p=p+stdN*randn(1,length(p));%add noise
y=conv(p,h);%find filter's output
y=y(6:length(y)-4);%offset pulse for proper display
z=reshape(y,10,length(y)/10);%rearrange data to simulate hold command
plot(z);grid
%Generate dynamic figure title
k=['SNR=',num2str(snr),' dB'];
title(k)
©2000 Bijan Mobasseri 162
Anatomy of an eye pattern
1 2 3 4 5 6 7 8 9 10-1.5
-1
-0.5
0
0.5
1
1.5SNR=19.9974 dB
Max.eye openingDegradationIn eyeopening
©2000 Bijan Mobasseri 163
Lowering SNR
1 2 3 4 5 6 7 8 9 10-1.5
-1
-0.5
0
0.5
1
1.5SNR=5.9971 dB
Eye closing
©2000 Bijan Mobasseri 164
Lowering SNR still
1 2 3 4 5 6 7 8 9 10-2
-1.5
-1
-0.5
0
0.5
1
1.5
2SNR=-0.0026092 dB
Shrinking eye opening
©2000 Bijan Mobasseri 165
Eye for polar RZ
1 2 3 4 5 6 7 8 9 10-1.5
-1
-0.5
0
0.5
1
1.5SNR=19.9607 dB for polar RZ
©2000 Bijan Mobasseri 166
Eye for polar RZ
1 2 3 4 5 6 7 8 9 10-1.5
-1
-0.5
0
0.5
1
1.5SNR=6.0093 dB for polar RZ
©2000 Bijan Mobasseri 167
Eye for polar RZ
1 2 3 4 5 6 7 8 9 10-2
-1.5
-1
-0.5
0
0.5
1
1.5
2SNR=-0.023539 dB for polar RZ
©2000 Bijan Mobasseri 168
Polar RZ,NRZ side-by-side
1 2 3 4 5 6 7 8 9 10-1.5
-1
-0.5
0
0.5
1
1.5SNR=19.9607 dB for polar RZ
1 2 3 4 5 6 7 8 9 10-1.5
-1
-0.5
0
0.5
1
1.5SNR=19.9974 dB
©2000 Bijan Mobasseri 169
Polar RZ,NRZ side-by-side
1 2 3 4 5 6 7 8 9 10-1.5
-1
-0.5
0
0.5
1
1.5SNR=6.0093 dB for polar RZ
1 2 3 4 5 6 7 8 9 10-1.5
-1
-0.5
0
0.5
1
1.5SNR=5.9971 dB
©2000 Bijan Mobasseri 170
Polar RZ,NRZ side-by-side
1 2 3 4 5 6 7 8 9 10-2
-1.5
-1
-0.5
0
0.5
1
1.5
2SNR=-0.023539 dB for polar RZ
1 2 3 4 5 6 7 8 9 10-2
-1.5
-1
-0.5
0
0.5
1
1.5
2SNR=-0.0026092 dB