EGR 544 Communication Theory
4. Coding Techniques for Analog Signal
Z. Aliyazicioglu Electrical and Computer Engineering Department Cal Poly Pomona
...
Z. Aliyazicioglu Electrical and Computer Engineering Department Cal Poly Pomona
Coding Techniques for Analog Source • There are several analog source coding techniques • Most of the coding techniques are applied speech and image coding Three type of analog source encoding • Temporal Waveform coding :design to represent digitally the time-domain characteristic of the signal • Spectral waveform coding: signal waveform is sub divided into different frequency band and either the time waveform in each band or its spectral characteristics are encoded. • Model-based coding: Based on the mathematical model of source.
Cal Poly Pomona
Electrical & Computer Engineering Dept.
EGR 544-2 2
1
Temporal Waveform Coding Most common used methods: • Pulse-code modulation (PCM) • Differential pulse-code modulation (DPCM) • Delta modulation(DM) Pulse-code modulation (PCM) Let’s have continuous source function x (t ) and each sample taken from x (t ) is xn at sampling rate fs ≥ 2W, where W is the highest frequency in x (t ) . In PCM, each sample is quantized to one of 2R amplitude level, where number of binary digits used to represent each sample. The bit rate will be Rfs [bit/s] Cal Poly Pomona
Electrical & Computer Engineering Dept.
EGR 544-2 3
Pulse-code modulation (PCM) • The quantized value will be xn and xn = xn − qn
qn quantization error
• Assume that a uniform quantizer is used, then PDF of quantization error is 1 p( q) = ∆ 0
if −
∆ ∆ ≤q≤ 2 2 o.w.
∆ is step size and obtained ∆ = 2− R
Cal Poly Pomona
Electrical & Computer Engineering Dept.
EGR 544-2 4
2
Pulse-code modulation (PCM) Mean square value of the quantization error (or noise) power is ∆/2
E ( q2 ) = ∫
−∆ / 2
q 2 p( q) dq =
1 2 1 −2 R 2 ∆ = 12 12
Mean square value of the quantization error power in dB
E ( q 2 ) dB = 10log
1 2 1 ∆ = 10log 2 −2 R = −10.8 − 6 R [dB] 12 12
Quantization noise decreases by 6dB/bit Quantization noise for 8 bit -58.8 dB It can be measured by signal-to-quantization noise ratio (SQNR) in dB SQNR = 10log
P (average power of source signal) [dB] E(q 2 )
If source is sinusoidal Cal Poly Pomona
SQNR = −1.76 + 6.02 R [dB]
Electrical & Computer Engineering Dept.
EGR 544-2 5
Pulse-code modulation (PCM) • The non-uniform quantizer characteristic can be obtained by passing the signal through a non-linear device the compress the signal amplitude • For example: µ-law compressor: A Logarithmic compressor input-output function
y =
log(1 + µ x ) log(1 + µ )
µ is a parameter that gives desired compression µ=225 selected for USA and Canada. µ=225 , it will drop quantization noise power about –77dB for 7 bit quantization Cal Poly Pomona
Electrical & Computer Engineering Dept.
EGR 544-2 6
3
Example of µ -law
µ=20
µ=100 Cal Poly Pomona
Electrical & Computer Engineering Dept.
EGR 544-2 7
Differential pulse-code modulation (DPCM) • The differences between samples are expected to be smaller than the actual sampled amplitude value. • The simple solution is to encode the differences between successive samples rather than the samples themselves. • Fever bits require to represent the differences
Let xn denote the current sample from the source and let xn denote the predicted value of xn, defined as p
xˆn = ∑ ai xn −1 i =1
• xn is weighted linear combination of the past p samples and {ai} are the predicted coefficient that are selected to minimize the error between xn and xn
Cal Poly Pomona
Electrical & Computer Engineering Dept.
EGR 544-2 8
4
Differential pulse-code modulation (DPCM) • The mean square error between xn and xn is given 2 p ε p = E (e ) = E xn − ∑ ai xn−i i =1 2 n
p
p
i =1
i =1
= E ( xn2 ) − 2∑ ai E ( xn xn −i ) + ∑
p
∑ a a E( x i
j =1
x
n −i n − j
j
)
• Selecting {ai } to minimize the MSE Assume that source output is stationary and φ(m) shows the autocorrelation function of xn p
p
i =1
i =1
ε p = φ (0) − 2∑ aiφ (i ) + ∑ • To minimize εp set
j =1
i
j
p
∑ a φ (i − j ) = φ ( j ) i =1
Cal Poly Pomona
p
∑ a a φ (i − j )
i
Electrical & Computer Engineering Dept.
EGR 544-2 9
Differential pulse-code modulation (DPCM) • If autocorrelation function is not known, it may be estimated as
The quantized sample xn differs from the input xn by quantization error qn
To low-pass filter
Decoder
Cal Poly Pomona
Electrical & Computer Engineering Dept.
EGR 544-2 11
Delta Modulation en = ( xn − xˆn ) To transmitter
Predicted (estimated) value
qn = en − en
xˆn = xn−1 = xˆn −1 + en −1 xˆn = xn−1 + qn−1
= en − ( xn − xˆn ) Source Encoder Output
Source Decoder Cal Poly Pomona
Electrical & Computer Engineering Dept.
EGR 544-2 12
6
Delta Modulation Equivalent realization of Delta modulation To transmitter
Source Encoder
Output
Source Decoder Cal Poly Pomona
Electrical & Computer Engineering Dept.
EGR 544-2 13
Delta Modulation • The performance of the DM encoder is limited by two types of distortion • Slope overload distortion • Step size is too small • Granular noise • Step size is to large Granular noise
Slope-overload distortion
Cal Poly Pomona
Electrical & Computer Engineering Dept.
EGR 544-2 14
7
Delta Modulation •
Alternative solution is variable step size: Step size is increased when the waveform has steep slope and decreased when the waveform has a relatively small slope
• One of the method is called continuous variable slope delta modulation (CVSD) If en , en−1 ,and en−2 has same sign
∆ n = α∆ n −1 + k1 Granular noise
Otherwise
∆ n = α∆ n −1 = k2 where
0 0
k =1
The difference between xn and xˆn
The filter coefficients {ak } can be selected to minimize the mean square error
p
en = xn − xˆn = xn − ∑ ak xn −k k =1
Cal Poly Pomona
Electrical & Computer Engineering Dept.
EGR 544-2 21
Encoding methods for Speech signal • Speech signal band limits 200-3200Hz. • Sampling frequency 8000samples/s for all encoder except DM Encoding method
Quantization
Coder
Transmission rate(bits/s)
PCM Log PCM DPCM ADPCM DM ADM
Linear Logarithmic Logarithmic Adaptive Binary Adaptive Binary