Digital Signal Processing Reference
In-Depth Information
5.2.1 The Down-Sampler and the Up-Sampler
A reduction in the sampling rate by a factor of M (where M is a positive integer) is
achieved by retaining every Mth sample and discarding the other samples. The
device that performs this operation is called a down-Sampler, and the output of this
downsampler is a sequence whose sampling rate is 1/M times that of the input
sequence. Figure 5.1 shows a block diagram of the down-sampler. Its operation in
the time-domain can be described mathematically as
y ð n Þ¼ x ð nM Þ:
ð 5 : 1 Þ
According to the above equation, all input samples with indices equal to integer
multiple of M are kept, while all others are discarded.
MATLAB: down-sampling can be achieved using either the ''downsample''
command, or equivalently, the vector command: y ¼ x ð 1 : M : length ð x ÞÞ:
Figure 5.2 shows a sinusoid with frequency = 0.0356 Hz downsampled by a factor
of M = 3. It is obvious that the sampling interval T s of the downsampled signal
(Fig. 5.2 b) is M = 3 times larger than the the original signal period, T s .
An increase in the sampling rate by a factor of L (where L is a positive integer)
is achieved by inserting L - 1 zero samples between each of the existing input
signal samples. Mathematically, up-sampling can be expressed as
y ð n Þ¼ x ð n = L Þ;
n ¼ 0 ; L ; 2L ; ...
ð 5 : 2 Þ
0 ;
otherwise
From ( 5.2 ) it is apparent that the number of samples in the upsampled signal is
L times the number of input signal samples. Figure 5.3 shows the block diagram of
an up-sampler.
MATLAB: Up-sampling (expanding) can be implemented in MATLAB using
the command ''up-sample'', or alternatively, by using the following vector com-
mand scripts:
y ¼ zeros ð 1 ; L length ð x ÞÞ ;
y ð 1 : L : length ð y ÞÞ ¼ x;
Fig. 5.1 Block diagram of a
down-sampler
M
y
( n
)
x
( nM
)
x
( n
)
=
f
1
1
^
s
f =
f
==
s
M
MT
T
s
Search WWH ::




Custom Search