Laboratory Session#02 Digital Signal Processing
Department of Electrical Engineering NED University of Engineering and Technology
Laboratory Session No. 02
Objective:
An Introduction to Analog to Digital Conversion (Sampling and Aliasing).
Post Lab Exercises:
Question 1:
What do you mean by the term “Sampling”? Discuss it briefly with the help of figure.
Answer
Sampling:
Sampling is a process used to convert continuous time continuous value signal into
discrete time discrete value signal. A common example is the conversion of a sound
wave (a continuous signal) to a sequence of samples (a discrete-time signal).
A sample is a value or set of values at a point in time and/or space. A sampler is a
subsystem or operation that extracts samples from a continuous signal. A
theoretical ideal sampler produces samples equivalent to the instantaneous value of the
continuous signal at the desired points.
Sampling can be done for functions varying in space, time, or any other dimension, and
similar results are obtained in two or more dimensions. For functions that vary with
time, let s(t) be a continuous function (or "signal") to be sampled, and let sampling be
performed by measuring the value of the continuous function every T seconds, which is
called the sampling interval or the sampling period. Then the sampled function is given
by the sequence:
S (n T), (for integer values of n.)
The sampling frequency or sampling rate, Fs, is the average number of samples
obtained in one second (samples per second), its units are samples/sec,
thus,
Fs = 1/T
Laboratory Session#02 Digital Signal Processing
Department of Electrical Engineering NED University of Engineering and Technology
Question 2:
What is sampling theorem? What do you mean by the term Aliasing?
Answer:
Nyquist Frequency Theorem or Nyquist Criteria:
Statement:
“The minimum sampling frequency of a signal that it will not distort its underlying
information, should be double the frequency of its highest frequency component.”
Mathematical Expression:
F max
Fs >
2
Aliasing:
In signal processing and related disciplines, aliasing is an effect that causes different
signals to become indistinguishable (or aliases of one another) when sampled. It also
often refers to the distortion or artifact that results when a signal reconstructed from
samples is different from the original continuous signal.
Aliasing is generally avoided by applying low pass filters or anti-aliasing filters (AAF) to
the input signal before sampling and when converting a signal from a higher to a lower
sampling rate.
Question 3:
Human audible frequency ranges from 20 Hz to 20,000 Hz. Human voice frequency
ranges from 85 Hz to 285 Hz
Question 4:
Laboratory Session#02 Digital Signal Processing
Department of Electrical Engineering NED University of Engineering and Technology
Record audio for 10sec and complete the following table. Show and verify the output file
size through mathematical calculations.
(Hint: Check the Microphone ADC bits and use sampling frequency and the audio record
time to evaluate the file size)
Answer:
S No Sampling File Size Quality
Frequency(Hz) (MB) Comment
1 44100 1.68 Excellent
2 22050 0.84 Excellent
3 10000 0.38 Good
4 6000 0.22 Good
5 4000 0.15 Average
6 2000 0.07 Poor
7 1000 0.03 Poor
Mathematical Verification:
Formula:
Sampling Rate x Resolution x Sample time x Channel
File Size = 8
(To get answer in megabytes we have to multiply our denominator with answer with
1024 x 1024)
For 44100 Hz:
44100 x 16 x 10 x 2
File Size =
8 x 1024 x 1024
File Size = 1.68 MB
Similarly,
For 22050 Hz:
File Size = 0.84 MB
For 10000 Hz:
File Size = 0.38 MB
For 6000 Hz:
File Size = 0.22 MB
Laboratory Session#02 Digital Signal Processing
Department of Electrical Engineering NED University of Engineering and Technology
For 4000 Hz:
File Size = 0.15 MB
For 2000 Hz:
File Size = 0.07 MB
For 1000 Hz:
File Size = 0.03 MB
Question 5:
If an ADC has sampling frequency =1000 Hz and receive analog signals of the following
frequencies what will be the frequency of a signal which is converted back to analog by
a DAC converter?
S No Frequency (Hz)
1 100
2 750
3 1250
4 1900
5 2000
6 2500
Answer:
Formula:
F alias = F max – nF sampling
Observation Table:
S No Frequency (Hz) Aliasing
1 100 No aliasing
2 750 -250
3 1250 250
4 1900 -100
5 2000 0
6 2500 500
Laboratory Session#02 Digital Signal Processing
Department of Electrical Engineering NED University of Engineering and Technology
Working:
1) Frequency = 100 Hz
F alias = No Aliasing
2) Frequency = 750 Hz
F alias = 750 – 1000= -250 Hz
3) Frequency = 1250 Hz
F alias = 1250 – 1000 = 250 Hz
4) Frequency = 1900 Hz
F alias = 1900 – (2 x 1000) = -100 Hz
5) Frequency = 2000 Hz
F alias = 2000 – (2 x 1000) = 0 Hz
6) Frequency = 2500 Hz
F alias = 2500 – (2 x 1000) = 500 Hz