Sampling
Sampling
Applications
HETT403
Eng. Matsiya B
brianmatsiya@gmail.com
ANALOG-TO-DIGITAL AND DIGITAL-TO-ANALOG
CONVERSION
Sampling, Quantization & Coding
Elements of a Digital Signal Processing System
Most of the signals encountered in science and engineering are analog in
nature, i.e. the signals are functions of a continuous variable, such as time
or space, and usually take on values in a continuous range.
Such signals may be processed directly by appropriate analog systems
(such as filters or frequency analyzers) or frequency multipliers for the
purpose of changing their characteristics or extracting some desired
information.
In such a case we say that the signal has been processed directly in its
analog form, as illustrated in Fig. 2.1.
Fig 2.1: Analog Signal processing
In Fig 2.1 both the input signal and the output signal are in analog form.
Digital Signal processing System
Digital signal processing provides an alternative method for processing the
analog signal, as illustrated in Fig.2.2.
In applications where the digital output from the digital signal processor is to be
given to the user in analog form, such as in speech and visual communications,
we must provide another interface from the digital domain to the analog domain.
Such an interface is called a digital-to-analog (D/A ) converter or DAC.
Application of ADC
In the modern world of growing technology, we are dependent on digital devices. These digital
devices operate on the digital signal. But not every quantity is in digital form instead they are in
analog form. So an ADC is used for converting analog signals into digital signals.
The applications of ADC are limitless. Some of these applications given below
Cell phones operate on the digital voice signal. Originally the voice is in analog form, which is
converted through ADC before feeding to the cell phone transmitter.
Images and videos captured using camera is stored in any digital device, is also converted into
digital form using ADC.
Medical Imaging like x-ray & MRI also uses ADC to convert images into Digital form before
modification. They are then modified for better understanding.
Music from the cassette is also converted into the digital form such as CDs and thumb
drives using ADC converters.
Digital Oscilloscope also contains ADC for converting Analog signal into a digital signal for display
purposes & different other features.
Air conditioner contains temperature sensors for maintaining the room temperature. This
temperature is converted into digital form using ADC so that onboard controller can read & adjust
the cooling effect
ANALOG-TO-DIGITAL CONVERSION (ADC)
Most signals of practical interest, such as speech, biological signals, seismic signals, radar signals, sonar signals, and
various communications signals such as audio and video signals, are analog. To process these signals “digitally”, it is first
necessary to convert them into digital form. This procedure is called analog-to-digital (A/D) conversion, and the
corresponding devices are called A/D converters (ADCs). Conceptually, we view A/D conversion as a three-step process.
This process is illustrated in Fig. 2.3.
Coding
In the coding process, each discrete value 𝑥𝑞 𝑛 is represented by a b-bit
binary sequence.
Although we model the ADC as a sampler followed by a quantizer and
coder, in practice the A/D conversion is performed by a single device
that takes an analog signal 𝑥𝑎 𝑡 and produces a binary-coded number.
sampling period
S(t) is band-
limited signal
Sampling Process
There are many ways to sample an analog signal but we limit our
discussion to periodic or uniform sampling, which is the type of
sampling used most often in practice.
Periodic sampling
This is the conversion from a continuous-time signal in to a discrete-time signal
obtained by taking “samples’" of the continuous-time signal at discrete-time instances.
(2.1)
(2.4)
Comparing, (2.4) with:
(2.5)
Which is the expression for a discrete signal, one can note that the frequency variables 𝑭 and 𝒇 are linearly
related as
(2.6)
By substituting from (2.6) and (2.7) into (2.9), we find that the frequency
1
of the continuous-time sinusoid when sampled at a rate 𝐹𝑠 = must fall
𝑻
in the range.
(2.10)
Or, equivalently.
(2.11)
With aliasing :
- Some of the frequencies in the original signal will be lost in the
reconstructed signal
- unwanted components will be presence in the
reconstructed signal. these components were not present
when the original signal was sampled.
In addition,.
Aliasing occurs because signal frequencies will overlap if the
sampling frequency is too low.
Aliasing
Aliasing of a undersampled 1D
sinusoidal signal
Aliasing of a undersampled 2D
image
From the previous case, if we are given the sampled values generated by
𝜋𝑛
𝑐𝑜𝑠 there is some ambiguity as to whether these sampled values
2
correspond to 𝑥1 (𝑡) or 𝑥2 (𝑡).
This is a common problem in digital signal process.
Aliasing in digital signal process
Since 𝑥2 (𝑡) yields exactly the same values as 𝑥1 (𝑡) when the two are sampled at
Fs = 40 samples per second, we say that the frequency F2 = 50 Hz is an alias of the
frequency F1 = 10 Hz at the sampling rate of 40 samples per second.
It is important to note that F2 is not the only alias of F1.
In fact at the sampling rate of 40 samples per second, the frequency F3 = 90 Hz is also an alias
of F1, as is the frequency F4 = 130 Hz, and so on.
All of the sinusoids 𝑐𝑜𝑠2𝜋 𝐹1 + 40𝑘 𝑡, k = 1, 2, 3, 4, .... sampled at 40 samples per second,
yield identical values. Consequently, they are all aliases of F1= 10 Hz.
In general, sampling a continuous-time sinusoidal signal;
𝑥𝑎 𝑡 = 𝐴𝑐𝑜𝑠(2𝜋𝐹0 + 𝜃)
with a sampling rate 𝐹𝑠 , results in a discrete-time signal;
𝑥 𝑛 = 𝐴𝑐𝑜𝑠(2𝜋𝑓0 𝑛 + 𝜃)
In this case, the relationship between 𝐹0 and 𝑓0 is one-to-one, and hence it is possible to
reconstruct the analog signal 𝑥𝑎 𝑡 from the sample 𝑥 𝑛 .
On the other hand, if the sinusoids
where
Given any analog signal, how should we select the sampling period T or, equivalently, the sampling rate 𝑭𝒔 ?
To answer this question, we must have some information about the characteristics of the signal to be sampled.
In particular, we must have some general information concerning the frequency content of the signal.
Sampling Theorem
The information content of such signals is contained in the amplitudes, frequencies, and
phases of the various frequency components, but detailed knowledge of the characteristics of
such signals is not available to us prior to obtaining the signals.
In fact, the purpose of processing the signals is usually to extract this detailed information.
However, if we know the maximum frequency content of the general class of signals (e.g.. the
class of speech signals, the class of video signals, etc.). we can specify the sampling rate
necessary to convert the analog signals to digital signals.
For example, we know generally that the major frequency components of a speech signal fall
below 3200Hz.
On the other hand, television signals, in general, contain important frequency components up
to 5MHz.
Sampling Theorem
Let us suppose that any analog signal can be represented as a sum of sinusoids of different
amplitudes, frequencies, and phases, that is;
Where N denotes the number of frequency components. All signals, such as speech and
video, lend themselves to such a representation over any short time segment.
The amplitudes, frequencies, and phases usually change slowly with time from one time
segment to another.
However, suppose that the frequencies do not exceed some known frequency, say 𝑭𝒎𝒂𝒙 . For
example,𝑭𝒎𝒂𝒙 = 𝟑𝟐𝟎𝟎 𝑯𝒛 for speech signals and 𝑭𝒎𝒂𝒙 = 𝟓𝑴𝑯𝒛 for television signals.
Sampling Theorem
From our knowledge of 𝑭𝒎𝒂𝒙 , we can select the appropriate sampling rate. We know that the
highest frequency in an analog signal that can be unambiguously reconstructed when the signal
is sampled at a rate 𝐹𝑠 = 1/𝑇 𝑖𝑠 𝐹𝑠/2. Any frequency above Fs/2 or below -Fs/2 results in
samples that are identical with a corresponding frequency in the range −𝐹𝑠/2 ≤ 𝐹 ≤ 𝐹𝑠/2.
To avoid the ambiguities resulting from aliasing, we must select the sampling rate to be
sufficiently high. That is, we must select Fs/2 to be greater than 𝑭𝒎𝒂𝒙 . Thus to avoid the
problem of aliasing, Fs is selected so that;
𝐹𝑠 > 2𝑭𝒎𝒂𝒙
Or equivalently;
Practice Example 2.2
Consider the analog signal;
𝑥𝑎 𝑡 = 3𝑐𝑜𝑠50𝜋𝑡 + 10𝑠𝑖𝑛300𝜋𝑡 − 𝑐𝑜𝑠100𝜋𝑡;
What is the Nyquist rate for the signal?
Solution 2.2
Practice Example 2.3
Consider the analog signal;
𝑥𝑎 𝑡 = 3𝑐𝑜𝑠2000𝜋𝑡 + 5𝑠𝑖𝑛6000𝜋𝑡 + 10𝑐𝑜𝑠12000𝜋𝑡;