Wave Form 1
Wave Form 1
Prof H Xu
Text Book
Principles of Communication Systems - Taub &
Schilling 2nd Edition
Communication Systems Haykin
Principles of Communications Ziemer &
Tranter
Communication Systems Engineering Proakis
& Salehi
Copyright 2001, S. K. Mitra
Cheating
No late tutorial/practical will be accepted.
Cheating will be not be tolerated and it will be
strongly dealt with. This includes:
Copying someone elses Prac codes and report.
Copying someones tutorial/exam answers.
etc.
DP requirements: faculty rule
Contents
Part 1: waveform coding
Part 2: source coding
Part 2: channel coding
Part 2: digital modulation
Part 1 waveform coding
Introduction
Communication systems are used to transport information
bearing signal from source to destination via a channel.
The information bearing signal can be:
(b) Digital : digital communication system
(a) Analog : analog communication system;
Digital communication is expanding because:
(a) The impact of the computer;
(b) flexibility and compatibility;
(c) possible to improve reliability;
(d) integrated solid-state electronic technology
(d) availability of wideband channels
Basic communication system
Introduction
Introduction
Information Source
(a) Generates the message(s) . Examples are voice,
television picture, computer key board, etc..
(b) If the message is not electrical, a transducer is used to
convert it into an electrical signal.
(c) Source can be analog or digital.
(d) Source can have memory or memoryless.
Source encoder/decoder
Introduction
(a) The source encoder maps the signal produced by the
source into a digital form (for both analog and digital).
(b) The mapping is done so as to remove redundancy in the
output signal and also to represent the original signal as
efficiency as possible (using as few bits as possible).
(c) The mapping must be such that an inverse operation
(source decoding) can be easily done.
(d) Primary objective of source encoding/decoding is to reduce
bandwidth, while maintaining adequate signal fidelity.
Introduction
Channel encoder/decoder
(a) Maps the input digital signal into another digital signal in
such a way that the noise will be minimized.
(b) Channel coding thus provides for reliable communication
over a noisy channel.
(c) Redundancy is introduced at the channel encoder and
exploited at the decoder to correct errors.
Modulator
(a) Modulation provides for efficient transmission of the
signal over channel.
(b) Most modulation schemes impress the information on
either the amplitude, phase or frequency of a sinusoid.
(c) Modulation and demodulation is done such that
Bit error rate is minimized and Bandwidth is conserved.
Introduction
Channel
Characteristics of channel are
(a) Bandwidth
(b) Power
(c) Amplitude and phase variations
(d) Linearity, etc..
Typical channel models are Additive White Gaussian Channel
and Rayleigh fading channel;
Waveform coding
-- introduction
Techniques for converting analog signal into a digital bit stream
fall into the broad category waveform coding. Example are:
(a) Pulse code modulation (PCM)
(b) Differential PCM
(c) Delta modulation
(d) Linear prediction coding (LPC)
(e) Subband coding
The basic operations in most waveform codes are:
(a) Sampling
(b) Quantization
(c) Encoding
Waveform coding
-- introduction
Example: PCM
Lower Pass Filter (LPF) at transmitter is used to attenuate
high frequency components
Sampling operation is performed in accordance with the
sampling theorem a band limited signal of finite energy, with
no frequency components higher than is completely
described by samples taken at a rate .
M
f
M
f 2
Waveform coding
-- introduction
Aliasing results if sampling frequency .
M s
f f 2
Quantization produces a discrete amplitude, discrete-time
signal from the discrete time, continuous amplitude signal.
Encoding assigns binary codewords into the quantized signal.
Waveform coding
-- Quantization
Classification of quantization
Uniform quantization
Mid-rise type Mid-tread type
nonuniform quantization
law A law
Waveform coding
-- uniform quantization
A uniform Quantizing is the type in which the 'step size'
remains same throughout the input range.
No assumption about amplitude statistics and correlation
properties of the input.
Mid-tread
Zero is one of the output
levels M is odd
Mid-rise
Zero is not one of the
output levels M is even
Quantizing error consists of the difference between the input and
output signal of the quantizer.
0 2 / 2 / = A A output input
A = A A output input 2 / 3 2 /
Waveform coding
-- uniform quantizing noise
Maximum instantaneous value of quantization error is
2
A
Waveform coding
-- uniform quantizing noise
Waveform coding
-- performance of a uniform quantizer
The performance of a quantizer is measured in terms of the
signal to quantizing error ratio:
_ a
noise quatizing square mean
kT m E
SQER
s
) (
2
=
For a signal with distribution , the signal power is ) (m p
_ a
=
A
+
A
=
Q
i
m
m
i s
i
i
dm m p m kT m E
1
2
2
2 2
) ( ) (
Waveform coding
-- Sampling, quantization and coding
For example: Q=16 quantization steps; ;
v size step 5 . 0 = = A
M
s
f
T
2
1
=
Output coding : natural binary
Waveform coding
-- Sampling, quantization and coding
For example: Q=16 quantization steps; ;
v size step 5 . 0 = = A
M
s
f
T
2
1
=
Bit rate= )
M
f Q 2 log
2
Output coding: natural binary
Waveform coding
-- Sampling, quantization and coding
)
=
=
Q
i
i i
P MSQE MSQE
1
Where is the probability that signal falls in the ith interval.
is the mean square quantization error in the ith
interval.
i
P
)
i
MSQE
)
A +
A
=
2 /
2 /
2
) | ( ) (
i
i
m
m
i i
dm i m p m m MSQE
i i
P
m p
P
i m p
i m p
) ( ) , (
) | ( = =
A +
A
=
2 /
2 /
) (
i
i
m
m
i
dm m p P
So
=
A +
A
|
=
Q
i
i
m
m
i
P dm i m p m m MSQE
i
i
1
2 /
2 /
2
) | ( ) (
Waveform coding
-- Sampling, quantization and coding
=
A +
A
|
=
Q
i
i
m
m
i
P dm i m p m m MSQE
i
i
1
2 /
2 /
2
) | ( ) (
i
P
m p
i m p
) (
) | ( =
=
A +
A
=
Q
i
m
m
i
i
i
dm m p m m MSQE
1
2 /
2 /
2
) ( ) (
Waveform coding
-- Linear quantizer with larger Q
If the number of quantizing steps is larger, then can be
considered constant in a quantization interval.
) (m p
So
=
A +
A
=
Q
i
m
m
i
i
i
dm m p m m MSQE
1
2 /
2 /
2
) ( ) (
=
A +
A
=
Q
i
m
m
i i
i
i
dm m m m p MSQE
1
2 /
2 /
2
) ( ) (
= =
A
A
'
+
'
A
- - = =
Q
i
i
Q
i
i
m p dx x m p MSQE
1
3
1
2 /
2 /
2
2
2
3
1
) ( ) (
=
= A
Q
i
i
m p
1
1 ) (
12
2
A
= MSQE
Waveform coding
-- Nonuniform quantizing
Problems with uniform quantization
Only optimal for uniformly distributed signal
Real audio signals (speech and music) are more concentrated
near zeros
Human ear is more sensitive to quantization errors at small
values
Solution: use non-uniform quantization
quantization interval is smaller near zero
Waveform coding
-- Nonuniform quantizing
uses variable steps;
small steps in regions where the signal has a higher
probability;
the quantizer steps ( ) and the levels ( ) are chosen to
maximize the SQER.
i
A
i
m
in practice, a nonuniform quantizer is realized by signal
compression followed by uniform quatizer
) (m g y =
at the receiver an expander is used to produce the inverse
operation ) (
1
y g m
=
the compressor and expander taken together
constitute a compander.
Waveform coding
-- Nonuniform quantizing
Two common laws are the law and the A law.
law
A law
,
|
+
+
+
=
1 | |
1
,
log 1
|) | log( 1
1
| | 0 ,
log 1
| |
x
A A
x A
A
x
A
x A
y
) (
) 1 log(
)
| |
1 log(
max
max
x sign
x
x
x y
+
+
=
Waveform coding
-- Nonuniform quantizing
Waveform coding
-- implementation of -law
(1) Transform the signal using -law
) (
) 1 log(
)
| |
1 log(
) (
max
max
x sign
x
x
x x F y
+
+
= =
(2) Quantize the transformed value using a uniform
quantizer
(3) Transform the quantized value back using inverse -
law
) ( 1 10 ) (
| |
) 1 log(
max
1
max
y sign
x
y F x
y
x
'
+
'
= =
+
Waveform coding
-- performance of a nonuniform quantizer
Recall :
The performance of a quantizer is measured in terms of the
signal to quantizing error ratio:
_ a
) (
) (
2
MSQE noise quatizing square mean
kT m E
SQER
s
=
For a signal with distribution , the signal power is ) (m p
_ a
=
A
+
A
=
Q
i
m
m
i s
i
i
dm m p m kT m E
1
2
2
2 2
) ( ) (
=
A +
A
=
Q
i
m
m
i
i
i
dm m p m m MSQE
1
2 /
2 /
2
) ( ) (
For nonuniform quantization system, it is very difficult to
calculate MSQE.
Waveform coding
-- performance of a nonuniform quantizer
Normally we use mean square error (MSE) between original and
quantized samples or signal to noise ratio (SNR) to evaluate the
performance of nonuniform quantization system.
)
=
=
N
k
k x k x
N
MSE
1
2
) ( ) (
1
where N is the number of samples in the sequence.
MSE
SNR
x
2
W
=
2
x
W
where is the variance of the original signal
Waveform coding
-- Differential PCM
speech and many signals contain enough structure such that
there is correlation among adjacent samples.
mostly evident when sampled at higher than Nyquist.
if samples are , the first difference
.
... ), 3 ( ), 2 ( ), (
s s s
T m T m T m
) ) 1 (( ) (
s s r
T r m rT m D =
_ a _ a _ a _ a ) ) 1 (( ) ( 2 ) ) 1 (( ) (
2 2 2
s s s s r
T r m rT m E T r m E rT m E D E + =
For a zero mean stationary process,
_ a _ a
2 2 2
) ) 1 (( ) (
w s s
T r m E rT m E W = =
_ a ) ( ) ) 1 (( ) (
2
s mm m s s
T R T r m rT m E = = pW
where are correlation coefficients.
p
Waveform coding
-- Differential PCM
_ a _ a _ a _ a ) 1 ( 2 ) ) 1 (( ) ( 2 ) ) 1 (( ) (
2 2 2 2
p W = + =
m s s s s r
T r m rT m E T r m E rT m E D E
For
2
1
" p
then
_ a
2 2
m r
D E W
That means that the variance of is
less than the variance of sampled signal.
) ) 1 (( ) (
s s r
T r m rT m D =
So a given number of quantization steps, better performance
can be obtained by quantizing rather
than the samples.
) ) 1 (( ) (
s s r
T r m rT m D =
( Differential PCM; PCM)
2
1
" p
2
1
p
the procedure is to encoder the
difference ] ) 1 [( ) ( ) (
s s s
T r m rT m rT e =
Waveform coding
-- Differential PCM
Where is predicted by using previous values of
unquantized output.
] ) 1 [(
s
T r m
+
+
+
-
Quantiser
L
Predictor
encoder
L
Transmitter
S(i)
e( i)
e(i) + q(i)
DPCM
S(i)
^
Waveform coding
-- Delta Modulation
uses single bit quantization.
possible with oversampling to increase correlation
between adjacent samples.
its a 1-bit version of DPCM
uses a staircase approximation to the oversampled signal
Bit Rate of a Digital Sequence
Nyquist sampling rate
m S
f f 2 u
Quantization resolution: B bit/sample
Bit rate: bit/sec
B f R
S
- =
For example:
Speech signal sampled at 8 KHz, quantized to 8 bit/sample,
Then kbits/sec
64 8 8 = - = - = B f R
S
Summary of waveform coding
Understand the general concept of quantization
Can perform uniform quantization on a given signal and
calculate the SQER
Understand the principle of non-uniform quantization, and can
perform mu-law quantization and calculate SQER
Can calculate bit rate given sampling rate and quantization
Levels
Know advantages of digital representation
understand the difference between DPCM and PCM.