Digital Signal Processing Notes
Digital Signal Processing Notes
Lian Zhao
Professor
Department of Electrical and Computer Engineering
Ryerson University
a(n)
a(t)
Sampling
{a_q}
Quantizing
Encoding
Modulator
Channel
x(t)
Ts
fs
fs
Mathematically, Denote the original analog signal as x(t), sampling function (pulse train) as
x (t)
!
1. pulse train x (t) = n= (t nTs ) is periodic, and its FS are
1
Dn =
Ts
"
Ts /2
xp (t)ejn2fs t dt =
Ts /2
1
Ts
(fs =
1
)
Ts
(1)
1 #
(f nfs )
Ts n=
(2)
n=
x(t) (t nTs ) =
n=
=
=
1 #
X(f ) X (f ) = X(f )
(f nfs )
Ts n=
1 #
X(f nfs )
Ts n=
(3)
X(f)
2fs
fs
fs
2fs
fs
fs
2fs
Over sampling
2fs
Nyquist sampling
2fs
fs
fs
2fs
Under sampling
2fs fs
fs
2fs
Sampling Theorem
A band-limited signal of finite energy which has no frequency components higher than B Hz,
is completely described by specifying the values of the signal at instants of time separated by
1/2B seconds.
Discussion:
The sampling rate of 2B samples per second for a signal bandwidth of B Hz is called the
Nyquist rate, and 1/2B is called the Nyquist interval.
We can oversample, but cannot undersample.
The sampling process discussed is for baseband (low-pass) signal.
If a signal is not bandlimited, no matter how fast we sample the signal, the signal cannot
be accurately recovered. For example, a square waveform.
10
The distortion is due to fs < 2B (undersampling). This is called aliasing. When aliasing
occurs, {x(nTs )} cannot accurately recover the original signal x(t). To combat the aliasing
error in practice,
Prior the sampling, we use an LPF pre-alias filter to attenuate those high frequency
component of the signal that are not essential to the information be carried by the signal.
Taken account of the guard band of practical LP filter. Sample the signal at a rate slightly
higher than the Nyquist rate (fs > 2B).
11
2fs
fs
fs
2fs
2fs
fs
fsW fs
2fs
fc
X(f)
12
1 #
X(f nfs )
Ts n=
Xs (f ) =
The original signal can be recovered as
X(f ) =
where
1
Xs (f ) rect(f /2B)
fs
1 B f B
rect(f /2B) =
0 o.w.
13
=
=
=
=
1 1
1
F [Xs (f ) rect(f /2B)] = F 1 [Xs (f )] F 1 [rect(f /2B)]
fs
fs
1
2B
xs (t) (2Bsinc(2Bt)) =
xs (t) sinc(2Bt)
fs
fs
$
%
2B #
x(nTs )(t nTs ) sinc(2Bt)
fs n=
F 1 [X(f )] =
2B #
x(nTs )sinc[2B(t nTs )]
fs n=
If fs = 2B, then
x(t) =
n=
(4)
Equation (4) is an interpolation formula for reconstruction the original signal from the
sequence of sample values x(nTs ). The function sinc(2Bt) is the interpolation function.
14
Practical Sampling
Ideal sampling: Ts =
n=
(t nTs ).
Natural sampling: c(t) is a periodic sampling signal. Using Fourier Series analysis, we have
c(t) =
A #
sinc(nfs )ej2nfs t
Ts n=
(5)
where is the pulse width, and A is the pulse amplitude. The sampled signal can be
expressed as
xs (t) = x(t) c(t) =
In the frequency domain.
Xs (f ) =
=
F[xs (t)] =
#
A
x(t)
sinc(nfs )ej2nfs t
Ts
n=
(6)
A #
sinc(nfs ) F[x(t)ej2nfs t ]
Ts n=
A #
sinc(nfs ) X(f nfs )
Ts n=
17
18
q=
Vpp
L
L = 2N : quantization levels;
N : quantization bits
q
q
e
2
2
For a particular signal sample, the quantization error depends on the value of the sample. In
general, with a constant (fixed) peak-to-peak value,
quantization level
step size q =
quantization error
That is, if we want to reduce the quantization error, we need to use more bits to represent
each sampled data.
20
1 q/2 e q/2
q
f (e) =
0
otherwise
then the mean of the quantization error e is
" q/2
me =
ef (e) de = 0
q/2
1 1 x 1
2
fX (x) =
0
otherwise
Yields E[X] = 0, and
2
X
therefore
SNR =
"
x fX (x)dx =
"
1
1
1 2
1
x dx =
2
3
2
X
1/3
=
= 65536 48.16(dB)
q 2 /12
(1/128)2 /12
22
23
a(n)
a(t)
Sampling
{a_q}
Quantizing
Encoding
Channel
Modulator
bits
i.e., each signal level can be represented by a N -bit word. For example, when N = 3, we can
quantize the samples into codeword with 3-bits length to represent L = 8-level PCM signal.
The transmission of an L-level signal as an N -bit codeword (consisting of 0s and 1s with
2-level) is known as Pulse-code Modulation (PCM).
25
3.5
4
3
2.5
1.5
2
1
0.5
t
0.5
1
1.5
2
2.5
3
3.5
4
1.3
1.5
5
101
3.6
3.5
7
111
2.3
2.5
6
110
0.7
0.5
4
0.7
0.5
3
2.4
2.5
1
100
011
001
3.4
3.5
0
000
(7)
N = log2 (L)
How to determine N ? It will depend on how much quantization distortion we are willing
to tolerate. Let the magnitude of the quantization error, |e|, be specified as
|e| pVpp
while
|e|max =
q
Vpp
=
2
2L
Therefore,
Vpp
pVpp
2L
which implies
N
1
=L
2p
N log2
1
2p
(8)
27
g (t)
y(t)
modulator
where
g (t) =
n=
therefore
y(t) = g (t) h(t) =
n=
g(nTs ) (t nTs )
n=
PAM waveforms
Samples
T
Ts
28
Remark:
The information carried in the PAM signal resides in the amplitude value {g(nTs )}.
The width of a PAM signal pulse (T ) is less than or equal to Ts . The ratio T /Ts < 100%
is called the duty cycle.
The sampled values {g(nTs )} are amplitude continuous, therefore, PAM is an analog
signaling scheme.
The information samples without any quantization are modulated on to pulses, the
resulting pulse modulation can be called analog pulse modulation.
When the information samples are first quantized, yielding symbols from an M-ary
alphabet set, and then modulated on to pulses, the resulting pulse modulation is digital
and we refer to it as M-ary pulse modulation.
29
30
TDM
f
s1
s2
s3
s1
fc
s2
s3
t
T_s
Time division multiplexing (TDM): the signal from different information sources are
multiplexed in time domain, and each signal occupies all the bandwidth of the channel
during its time slot.
The pulse duration of the individual inputs has to be shortened from Ts to Tx = Ts /N ,
31
where Tx seconds is allocated to an individual sample during one sample interval. This
results in an expansion of the required bandwidth. That is TDM transmission requires a
wider transmission channel bandwidth.
Example: 10 voice signals each bandlimited to 3.2 kHz are sequentially sampled at 8 kHz
and time multiplexed on one channel.
Sampling frequency fs = 8kHz 2B(B = 3.2kHz), then the sampling interval
Ts = 1/fs = 1/8000 = 125s.
For TDM, each voice signal can occupy to
Ts /N = 125/10 = 12.5s
The bandwidth required to transmit the pulse is roughly 80 kHz.
For FDM system, 8 kHz bandwidth is needed to transmit each signal, but 10 transceivers
are needed for 10 signals.
32
33
34
35