Digital Signal Processing(DSP)
Dr. Shiref Aboelnour Abdalla
𝑛
Find 𝑦 𝑛 = 𝑥 3𝑛 𝑎𝑛𝑑 𝑦 𝑛 = 𝑥
3
where x(n)= {2,-1,3,5,7}
Compute the convolution 𝑦(𝑛) of the
signal
∝𝑛 , −3 ≤ 𝑛 ≤ 5
𝑥 𝑛 = ቊ
0, 𝑒𝑙𝑠𝑤ℎ𝑒𝑟𝑒
1, 0 ≤ 𝑛 ≤ 4
ℎ 𝑛 = ቊ
0, 𝑒𝑙𝑠𝑤ℎ𝑒𝑟𝑒
LECTURE(4)
SAMPLING THEOREM
What will be covered today?
What is a Sampling?
Sampling Theorem
Methods of Sampling
Significance of Sampling Rate
Anti-aliasing Filter
What is a quantization?
Quantization Error
What is a coding?
INTRODUCTION
A digital signal is superior to an analog signal because it is more
robust to noise and can easily be recovered, corrected and amplified.
An analog signal: amplitude can take any value over a continuous
range.
Digital signals: amplitude can take only discrete and finite values.
Analog to digital conversion
Analog to digital conversion
SAMPLING PROCESSS.
➢ The sampling process is a basic operation in the digital communication.
➢ Sampling is the processes of converting continuous-time analog signal,
S(t), into a discrete-time signal by taking the "samples" at discrete-time
intervals t = nT𝑠 , where T𝑠 , is the sampling period.
➢ It is necessary to choose the sampling rate properly, so the sequence of
samples uniquely defines the original analog signal.
SAMPLING THEOREM
The sampling theorem states that a band-limited signal x(t) with a
bandwidth B (𝑓max is the highest frequency) can be reconstructed from
1
its sample values if the sampling rate (frequency) f𝑠 = , is greater than
𝑇𝑠
or equal to twice the max frequency of x(t)
𝑤𝑠 ≥ 2 𝐵 𝑓𝑠 ≥ 2𝑓𝑚𝑎𝑥
The minimum sampling rate 𝑓𝑠 for an analog band-limited allowed for
reconstruction without error is called the Nyquist frequency and the
Nyquist Rate.
𝑤𝑠 = 2 𝐵 𝑓𝑠 = 2𝑓𝑚𝑖𝑛
Note that if 𝑤𝑠 ≥ 2 B, the replicas of X(e𝑗𝑤 ) do not overlap in the frequency
domain. We can recover the original signal exactly
RECOVERING THE ANALOG SIGNAL
➢ One way of recovering the original signal from sampled signal X.(f) is to pass it
through a Low Pass Filter (LPF) as shown below
➢ If 𝑓𝑠 > 2B then we recover x(t) exactly
➢ Else we run into some problems and signal is not fully
recovered
SIGNIFICANCE OF SAMPLING RATE
• If the waveform is under sampled (i.e. fs < 2B) then there will be spectral overlap in the
sampled signal
• The signal at the output of the filter will be different from the
original signal spectrum
This is the outcome of aliasing!
• This implies that whenever the sampling condition is not
met, an irreversible overlap of the spectral replicas is
produced
SAMPLING METHODS
There are 3 sampling methods:
• Ideal - an impulse at each sampling instant
• Natural - a pulse of short width with varying amplitude
• Flattop - sample and hold, like natural but with single amplitude value
QUANTIZATION
➢ The sampling results is a series of pulses of varying amplitude values ranging
between two limits: a min and a max.
➢ This is achieved by dividing the distance between min and max into L zones, each of
height ∆
(𝑚𝑎𝑥 − 𝑚𝑖𝑛)
∆=
𝑙
QUANTIZATION
➢ Assume we have a voltage signal with
amplitudes 𝑉𝑚𝑖𝑛 = −4𝑉 𝑎𝑛𝑑 𝑉𝑚𝑎𝑥 = 4
➢ We will use L=8 quantization levels.
4−−4
➢ Zone width ∆= =1
8
➢ The zones are :
➢ -4 to -3, -3 to -2,-2 to -1,-1 to 0, 0 to 1,
1 to 2,…..
➢ The difference between actual and midpoint
➢ The midpoints are : value is referred to as the quantization error.
➢ -3.5, -2.5, -1.5, -0.5, 1.5, 2.5, 3.5 ➢ The more zones, the smaller ∆ which results
in smaller errors.
ENCODING
In combining the process of sampling and quantization, the specification of the
continuous-time analog signal becomes limited to a discrete set of values.
Representing each of this discrete set of values as a code called encoding process.
Code consists of a number of code elements called symbols.
ASSIGNING CODES TO ZONES
In combining the process of sampling and quantization, the specification of the
continuous-time analog signal becomes limited to a discrete set of values.
Representing each of this discrete set of values as a code called encoding
process.
Each zone is assigned a binary code.
The binary code consists of bits.
The 8 zone (or level) codes are therefore: 000, 001, 010, 011, 100, 101, 110, and
111
Assigning codes to zones:
• 000 will refer to zone -4 to -3
• 001 to zone -3 to -2, etc.
With an example explain the sampling process?
Assume the sampling theorem states that a band-limited signal x(t) with
a bandwidth B can be reconstructed from its sample values if the
sampling rate (frequency) 𝑓𝑠 ≥ 2𝑓𝑚𝑎𝑥