You are on page 1of 25

Sampled Data

Systems
Sampling
Effects of sampling

We shall discuss
Sampling

Quantization

Up sampling

Down sampling

Effects of sampling on the signal shape.


Sampled data systems
As mentioned earlier an important class of linear
systems includes systems which deal with
discrete / digital signals.
Such systems are referred to as Sampled data
systems.
Continuous
system
x(t) y(t)
Discrete
system
x(n) y(n)
Input signal output signal
Input sequence
output sequence
Need for Sampling
Most real signals originate in continuous time
and in order to utilise the processing power of
modern digital processors it is necessary to
convert these analog signals into some form
which can be stored and processed by digital
devices.

The standard method is to sample the signal
periodically and digitize it with an A to D
converter using a standard number of bits 8, 16
etc.

Sampling contd..
Digital signal processing is primarily concerned
with the processing of these sampled signals. The
diagram below illustrates the situation.

The blue line shows the analog signal while the
red lines shows the samples arising from periodic
sampling at intervals T.

Sampling Theorem - Definition
Any bandlimited signal can be recovered after
sampling provided the signal is sampled at more
than twice the maximum frequency content in it .

This theory has been attributed to Shannon and
has had many modifications and variations over
a period of time.

Modifications like non uniform sampling,
sampling of non bandlimited signals to name a
few.
The process of sampling
ADC
DAC
Digital
Signal
Processor
Analogue
to Digital
Converter
Digital to
Analogue
Converter
Input
Signal
Output
Signal
ADC
[1 0 1
Digital
Signal
Processor
[1 0 1
DAC
More on sampling
Assume an analog signal contains three frequencies
and is the maximum frequency contained in it.
This signal is to be processed by a digital device.
The signal is passed through a sampler where it is
picked at fixed events.
The sampler here can be assumed to be a switch which
is ON only at certain instants.
max
f
Sampler
Sampling contd..
This process can be explained mathematically as
follows

The switch is on after fixed intervals.
n e {, -2, -1, 0, 1, 2,}, Ts is the sampling
period.

The output of the sampler would be


The rate at which the switch operates is the sampling
rate say .

( ) signal continous t s =
s
s
T
f
1
=
( ) signal Discrete nt s =
Digitizing
The signal has now been discretized.
The aim is now to represent the signal as a
combination of 0s and 1s so that it can be stored in a
register, or memory device.
Hence we quantize the signal amplitude and allow it
to take only fixed levels in a given range.
If we have an n bit A/D converter we would be able to
represent only levels of amplitude.
The signal value at any sample time is rounded to one
of these allowed levels.
n
2
Quantization
The output of the quantizer is series of binary
digits.
In case we have a 3 bit A/D converter, 3 bits
would be used to represent one sample of the
signal and maximum of 8 levels would be
allowed.
Effects
The process of sampling is Non Invertible.

This means that once a signal has been sampled it loses
its originality and the reverse process of digital to analog
conversion can only reconstruct the signal back to a
certain degree of accuracy but perfectly restore it.

Quantization by its very nature introduces errors.

There are two primary sources of errors. One is
sampling, which only takes the amplitude of the signal at
a point in time and holds it until the next sample.
Effects
The second source of errors comes from the quantizer,
which pulls up or pushes down the amplitude of the
signal to its digital representation.

The quantization graph above shows the kind of error
levels involved in our case. This error produces an effect
which is called quantization noise.

In audio or speech applications, this error appears as
noise on the output. If we take a typical DSP application
with a 10- to 12-bit ADC, the quantization noise is usually
negligible compared to other noise sources.


Aliasing
Another additional limitation is the sampling rate.
As explained earlier the sampling rate places a constraint
on the range of frequencies that can be digitized.
For given signal with as the maximum frequency,
the minimum sampling rate should be greater than

Here is called the Nyquist frequency
If this condition is not met then signals greater than half
the sampling frequency will be represented as other low
frequencies distorting the signal. This effect is called
aliasing
max
f
max
2 f
max
2 f f
s
=
Aliasing contd.
Assume a sampling rate of
8 hertz .
This means that signals
with frequencies less than
4 hertz can only be
sampled without
distortion ( 2*4 = 8 Hertz
= sampling rate ).
Let us take a cosine wave of 1 hertz. The sampling rate is
good enough as we have 8 points picked up in one cycle of
the signal .


Aliasing contd.
What happens when the
same sampling rate is used
to represent a 8 hertz cosine.
The same eight samples are
now representing an 8 hertz
signal.
As you can see in the figure
the rate criteria is not met
and the reconstructed signal
would still look like a single
cycle cosine wave. In other
words the high frequency
signal has aliased into the
low frequency region.
Prevention of Aliasing
When sampling is done at a rate which is not
enough to ensure the reconstruction of all the
frequencies of the original signal, we say it has
been under sampled.

Practical systems with a fixed sampling rate have
an antialiasing filter which is an analog low pass
filter which limits the analog frequencies to less
than half the sampling rate before it is passed
through the sampling device.
Sample rate conversion
The sampling rate may
not be fixed all through the signal processing
operation.
This may be required when cascading systems
which are operating at different sampling rates.
Sometimes it may also be required when a signal
can be sampled at a lower rate as in Filter banks.
This area is called multirate signal processing
For example assume we have a set of filter banks,
one acting as a low pass filter to allow only
frequencies upto 100Hz and another acting as a
high pass filter to allow frequencies beyond
200Hz.
Sample rate conversions
In such a scenario though the sampling rate to
the input of these filter banks has to be more
than400Hz.
But since output of the low pass filter is not more than
100Hz we can reduce the sampling rate from 400Hz .

Hence this may be sampled just more than 200Hz .

This may help relax the memory and speed
constraints.

Down sampling
Reduction in the sampling rate is called down
sampling.
Analog signal is sampled at rate of fs . Let T
be the sampling time.


Now if the sampling frequency is reduced by half
the sampling time will increase by 2. Hence the
signal can now be represented as
( ) signal d Downsample nT s = 2
( ) signal Digital nT s =
( ) t s
] [ ] [ Mn x n x
d
=
) ) 2 ( (
1
) (
1
0
1

=
M
i
d
k M X
M
X
i
t
M
x[n] x
d
[n]
1 , , 0 = M k
i

Downsampling
In general Downsample by M
Input M samples with index

Output first sample
(discard M1 samples)
Discards data
May cause aliasing
Down sampling
Signal down sampled by skipping 4 samples

Care should be taken when down sampling so that
aliasing does not occur.
Upsampling
Upsample by L
Input one sample
Output the sample
followed by L1 zeros
Adds data
May cause imaging
L
x[n] x
u
[n]
) ( ) ( L X X
u
=

e
=

otherwise
n L if n L x
n x
u
0
] [
] [
1 1
Upsampling
Signal upsampled by a factor of 2
Summary Rate conversion
Filter 1

Filter 2
Filter 3
X(n)
2
4
1
Sampling Rate reduced by 2
Sampling Rate increased 4
Sampling Rate un changed

You might also like