Sunteți pe pagina 1din 11

1

EGR 544 Communication Theory


Z. Aliyazicioglu
Electrical and Computer Engineering Department
Cal Poly Pomona
4. Coding Techniques for Analog Signal
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 2
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.
2
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 3
Temporal Waveform Coding
Most common used methods:
Pulse-code modulation (PCM)
Differential pulse-code modulation (DPCM)
Delta modulation(DM)
Pulse-code modulation (PCM)
Lets have continuous source function x (t ) and each sample
taken from x (t ) is x
n
at sampling rate f
s
2W, where W is
the highest frequency in x (t ) .
In PCM, each sample is quantized to one of 2
R
amplitude level,
where number of binary digits used to represent each sample.
The bit rate will be Rf
s
[bit/s]
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 4
Pulse-code modulation (PCM)
The quantized value will be and
n
x
Assume that a uniform quantizer is used, then PDF of
quantization error is
n n n
x x q =
q
n
quantization error
1
if
( ) 2 2
0 . .
q
p q
o w

2
R
=
is step size and obtained
3
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 5
Pulse-code modulation (PCM)
/ 2
2 2 2 2
/ 2
1 1
( ) ( ) 2
12 12
R
E q q p q dq

= = =

Mean square value of the quantization error (or noise) power is


Mean square value of the quantization error power in dB
Quantization noise decreases by 6dB/bit
Quantization noise for 8 bit -58.8 dB
2 2 2
1 1
( ) 10log 10log 2 10.8 6 [dB]
12 12
R
dB
E q R

= = =
It can be measured by signal-to-quantization noise ratio (SQNR) in dB
1.76 6.02 [dB] SQNR R = +
2
( verage power of source signal)
10log [dB]
E(q )
P a
SQNR =
If source is sinusoidal
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 6
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
log(1 )
log(1 )
x
y

+
=
+
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
4
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 7
Example of -law
=20
=100
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 8
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 x
n
denote the current sample from the source and let denote
the predicted value of x
n
, defined as
is weighted linear combination of the past p samples and {a
i
}
are the predicted coefficient that are selected to minimize the
error between x
n
and
1
1

p
n i n
i
x a x

=
=

n
x

n
x

n
x

5
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 9
Differential pulse-code modulation (DPCM)
The mean square error between x
n
and is given
2
2
1
2
1 1 1
( )
( ) 2 ( ) ( )
p
p n n i n i
i
p p p
n i n n i i j n i n j
i i j
E e E x a x
E x a E x x a a E x x


=

= = =
(
| |
= = (
|
\ . (

= +


Selecting {a
i
} to minimize the MSE
n
x

Assume that source output is stationary and (m) shows the


autocorrelation function of x
n
1 1 1
(0) 2 ( ) ( )
p p p
p i i j
i i j
a i a a i j
= = =
= +

To minimize
p
set
1
( ) ( )
p
i
i
a i j j
=
=

Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 10
Differential pulse-code modulation (DPCM)
If autocorrelation function is not known, it may be estimated as
1
1

( )
N n
i i n
i
n x x
N


+
=
=

Encoder
1

p
n i n i
i
x a x

=
=

n n n
e x x =
difference
1
p
n n i n i
i
e x a x

=
=

( )

n n n n n
n n n
n n n
e e e x x
e x x
x x q
=
= +
= =

Quantization error
Predicted value of x
n
Predicted output is
1

p
n i n i
i
x a x

=
=


6
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 11
Differential pulse-code modulation (DPCM)
Decoder
n n n
x x q = +
To low-pass filter
The quantized sample differs from the input x
n
by quantization error q
n
n
x
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 12
Delta Modulation
Source Decoder
To transmitter
Output
1 1 1

n n n n
x x x e

= = +

( )
n n n
n n n
q e e
e x x
=
=

( )
n n n
e x x =
1 1

n n n
x x q

= +
Source Encoder
Predicted (estimated)
value
7
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 13
Delta Modulation
Equivalent realization of Delta modulation
Source Decoder
To transmitter
Output
Source Encoder
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 14
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
Slope-overload
distortion
Granular noise
8
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 15
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)
Slope-overload
distortion
Granular noise
1 1 n n
k

= +
Otherwise
If has same sign
1 2
, , and
n n n
e e e


1 2 n n
k

= =
where 0 1 < <
1 2
1 k k >
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 16
Source: http://www.owlnet.rice.edu/~elec301/Projects99/adda/dmod.html
9
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 17
Spectral Waveform Coding
Filter the source output signal into a number of frequency
subband and separately encode the signal in each subband.
Each subband can be encoded in time-domain waveform or
Each subband can be encoded in frequency-domain waveform
Source signal (such as speech or image) is divided into small
number of subbands and each subband is coded in time-
waveform
More bits are used for the lower-frequency band signal and fever
band used for higher-frequency band
Subband Coding
Filter design is important in achieving good performance
Quadrature-mirror filters (QMFs) used most used in practice
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 18
Subband Coding
Lets assume that Speech signal bandwidth is 3200Hz.
Example:
The first pair of QMFs divides the spectrum into two
Low: 0-1600Hz, and High: 1600-3200Hz.
The Low band split into two using another pair of QMFs
Low: 0-800Hz, and High: 800-1600Hz.
The Low band split into two again using another pair of QMFs
Low: 0-400Hz, and High: 400-800Hz.
We need 3 pairs of QMS and we have signal in the frequency band
0-400,400-800,800-1600,and 1600-3200
10
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 19
Adaptive Transform Coding (ATC)
The source signal is sampled and subdivided into frames of Nf
samples.
The data in each frame is transformed into the spectral domain
for coding
At the decoder side, each frame of spectral samples is
transformed back into the time domain and signal is synthesized
from the time domain samples
For efficiency, more bit is assigned to more important spectral
coefficients and less bit is assigned to less important coefficients
For transform from time to frequency domain, DFT or Discrete
cosine transform (DCT) can be used
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 20
Model-based Source Coding
The Source is modeled as a linear system that results in the
observed source output.
Instead of transmitted samples of the source, the parameters of
the linear system are transmitted with an appropriate excitation
table.
If the parameters are sufficient small, provides large
compression
X x
1
( )
1
p
k
k
k
G
H z
a z

=
=

Linear predictive coding (LPC)


Lets have sampled sequence xn, n=0,1,,N-1 and assume that
is generated by discrete time filter that gives transfer function
11
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 21
Model-based Source Coding
Suppose that the input sequence id denoted by v
n
, n=0,1,2,
Then the output sequence of the digital filter satisfy the
difference equation
1
p
n k n k n
k
x a z Gv

=
= +

If the input is a white noise sequence or an impulse, we may


estimate (predict) of x
n
by weighted linear combination
1
, 0
p
n k n k
k
x a x n

=
= >

The difference between x


n
and
1

p
n n n n k n k
k
e x x x a x

=
= =


n
x
The filter coefficients {a
k
} can
be selected to minimize the
mean square error
Cal Poly Pomona Electrical & Computer Engineering Dept. EGR 544-2 22
Encoding methods for Speech signal
Speech signal band limits 200-3200Hz.
Sampling frequency 8000samples/s for all encoder except DM
2400-9600 LPC/CELP
96,000
36,000-64,000
32,000-48,000
24,000-32,000
32,000-64,000
16,000-32,000
12 bits
7-8 bits
4-6 bits
3-4 bits
1 bit
1 bit
Linear
Logarithmic
Logarithmic
Adaptive
Binary
Adaptive Binary
PCM
Log PCM
DPCM
ADPCM
DM
ADM
Transmission
rate(bits/s)
Coder Quantization Encoding
method

S-ar putea să vă placă și