Sei sulla pagina 1di 33

DIGITAL SIGNAL

PROCESSING

CHAPTER 2

SAMPLING THEOREMS

9/26/2019 Norizam 1
FKEE/Chapter 2
SAMPLING THEOREMS
PERIODIC SAMPLING

• Periodic Sampling is performed in order to obtain or


process data from Analog signals. Once the Analog
signals are sampled, it will become Discrete-time
signals.

• The device or digital hardware used to perform this


operation is called Analog-to-Digital Converter (ADC).

• The device called DAC is used to perform the reverse


operation from digital form back to analog form.

• In order to make the input signal to ADC remains


constant in amplitude and minimize the error. One
more device is needed. The device name is Sample-2
9/26/2019
and-Hold (S/H) circuit.
SAMPLING THEOREMS
PERIODIC SAMPLING

• Block diagram of the operation of the analog signal


to discrete signal.

9/26/2019 Norizam 3
FKEE/Chapter 2
SAMPLING THEOREMS
PERIODIC SAMPLING

• As mentioned in the previous chapter, the notation for


Sampling Period & Frequency, Digital Frequency and
Normalized & Max. Frequency is shown below :-

 Sampling Period => TS

 Sampling Frequency => Fs = 1 / TS

 Digital (Discrete) Frequency => f = F / FS


 Normalized Digital Frequency => ω = ΩTS

 The Maximum Input Frequency => FB = Fs / 2


(Input Signal Bandwidth)
Norizam 4
9/26/2019
FKEE/Chapter 2
SAMPLING THEOREMS
PERIODIC SAMPLING

• F, f, ω and Ω are called frequency variables and their


relationship is shown below:

1. F, Ω are used for Continuous-time Signals where


Ω = 2πF, F is input signal frequency

2. f, ω are used for Discrete-time Signals where


ω = 2πf, f is digital (discrete) signal frequency

9/26/2019 Norizam 5
FKEE/Chapter 2
SAMPLING THEOREMS
PERIODIC SAMPLING

• The mathematical equations and formula from


continuous signal to discrete signal;

xa[t] = Acos(2Ft+θ) Sampling, Tx[n]=


s xa[nTs] = Acos(2fn+θ)
xa[t] = Acos(Ωt+θ) x[n]= xa[nTs] = Acos(ωn+θ)

f = F / FS (normalized frequency)
ω = ΩTS (normalized angular frequency)

9/26/2019 Norizam 6
FKEE/Chapter 2
SAMPLING THEOREMS
PERIODIC SAMPLING

• The processed discrete-time signal can be


converted back to analog form by
interpolation, resulting in reconstructed analog
signal xa[t]

Sampling, Ts
xa[t] x[n]= xa[nTs]

Reconstruction
x[n] xr[t]
9/26/2019 Norizam 7
FKEE/Chapter 2
SAMPLING THEOREMS
PERIODIC SAMPLING

• It is wrong to say that we are going to loss the data


from the input signal by sampling. The reality is when
sampling is done in high sampling frequency, we able
to capture all the data from the continuous input signal.

• The analog signal is basically written in the form of

xa[t] = Acos(Ωt + Φ)

where A = Amplitude, Ω = 2πF (Angular Frequency)


and Φ = Phase Shift.

9/26/2019 Norizam 8
FKEE/Chapter 2
SAMPLING THEOREMS
PERIODIC SAMPLING

• After sampling, the analog signal will become discrete signal in the form
of

x[n] = xa[nTs] = Acos(ΩnTs + Φ) ,


Since,

t nTs or n / Fs

Then,
x[n] = xa[nTs] = Acos(2πFnTs + Φ)
= Acos(2πnF/Fs + Φ)
= Acos(2πfn + Φ)
= Acos(ωn + Φ),
Where n is a time index.

9/26/2019 Norizam 9
FKEE/Chapter 2
SAMPLING THEOREMS
PERIODIC SAMPLING

• Example 1 :
The input continuous signal which have frequency of 2kHz enter
the DTS system and being sampled at every 0.1ms. Calculate
the digital and normalized frequency of the signal in Hz and rad.
Solution :
1. Calculate the Sampling Rate :
Fs = 1 / Ts = 1 / (0.1ms) = 10 kHz.

2. Now, calculate the normalized digital frequency.


f = F / Fs = 2 kHz / 10 kHz = 0.2 Hz.

3. The digital frequency in radian,


ω = 2πf = 2π (0.2) = 0.4π rad.

4. The normalized digital frequency


9/26/2019 Norizam
(angular) in radian, 10
ω = = ΩTs = 2πFTsFKEE/Chapter
= 2π(2kHz)(0.1ms)
2 = 0.4.
SAMPLING THEOREMS
PERIODIC SAMPLING

Example 2:
If the analog signal is in the form of :

xa[t] = 3cos(1000πt-0.1π)- 2cos(1500πt+0.6π) + 5cos(2500πt+0.2π)

Determine the signal bandwidth and How fast to sample the signal
without losing data ?

Solution :
1. There are 3 frequencies components in the signal which is
Ω1 = 1000π, Ω2 = 1500π, Ω3 = 2500π

2. The Input Frequencies are :

F1 = Ω1 / 2π = 500 Hz, F2 = Ω2 / 2π = 750 Hz, F3 = Ω3 / 2π =1250 Hz


9/26/2019 Norizam 11
FKEE/Chapter 2
SAMPLING THEOREMS
PERIODIC SAMPLING

Continued from Example 2 :

3. Thus the Bandwidth Input signal is :

FB = 1250 Hz or 1.25 kHz

4. Thus the signal should be sampled at


frequency more than twice the Bandwidth
Input Frequency,
Fs > 2FB
Thus the signal should be sampled at 2.5 kHz
in order to not lose the data. In other words, we need
more than 2500 samples per seconds in order to not lose the data
9/26/2019 Norizam 12
FKEE/Chapter 2
SAMPLING THEOREMS
NYQUIST THEOREMS & ALIASING

 The Sampling Frequency more than twice the bandwidth input


frequency is called :

NYQUIST ‘S SAMPLING THEOREM

 The theorem said the Sampling Frequency, Fs ≥ 2FB


 Fs = 2FB is called Nyquist Rate.
 T = 1/2FB is called Nyquist Interval or Period.
 From the theorem, it can be said, the Bandwidth input Frequency
is defined as :-

FB ≤ Fs / 2
9/26/2019 Norizam 13
FKEE/Chapter 2
SAMPLING THEOREMS
NYQUIST THEOREM & ALIASING

The input signal frequency is ideally bandlimited


as below :

FB < F c < Fs – FB

where FB is maximum input frequency, Fc is


Cut-Off Frequency and Fs is the sampling
frequency.
• FB is also denoted as Fm or Fmax.

9/26/2019 Norizam 14
FKEE/Chapter 2
SAMPLING THEOREMS
NYQUIST THEOREM & ALIASING

• Aliasing is an error in signal when the sampling


frequency less than twice the maximum input
signal bandwidth as defined below :
Fs < 2FB

• It happens due to the overlap of the input signal


with its sampled signal. When this occurred, the
original shape of input signal is lost and cannot
be reconstructed.

9/26/2019 Norizam 15
FKEE/Chapter 2
SAMPLING THEOREMS
NYQUIST THEOREM & ALIASING

• An Aliasing signal is shown in figure below :

9/26/2019 Norizam 16
FKEE/Chapter 2
SAMPLING THEOREMS
NYQUIST THEOREM & ALIASING

• In order to avoid aliasing and be able to


reconstruct the input continuous signal from its
sampled signal, the sampling frequency must
be greater than or equal to twice the highest
frequency in the continuous signal. To cater
this, the LOW PASS ANTIALIASING FILTER is
used prior to sampling.
xa[t] xa[t] xa[nTs] xa[t]
Antialiasing
Filter, Sampler, Reconstruction
Fc = FB < Fs/2 Fs = 1/Ts Filter
9/26/2019 Norizam 17
FKEE/Chapter 2
SAMPLING THEOREMS
NYQUIST THEOREM & ALIASING

• Example 3 :
The analog signal that enters the DTS is in the form of :
xa[t] = 3cos(50πt) + 10sin(300πt) - cos(100πt)
a. Determine the input signal bandwidth.
b. Determine the Nyquist rate for the signal.
c. Determine the minimum sampling rate required to avoid
aliasing.
d. Determine the digital (discrete) frequency after being sampled
at sampling rate determined from c.
e. Determine the discrete signal obtained after DTS.
Solutions :
a. The frequencies existing in the signals are :
F1 = Ω1 / 2π = 50π / 2π = 25 Hz.
F2 = Ω2 / 2π = 300π / 2π = 150 Hz.
F3 = Ω3 / 2π = 100π / 2π = 50 Hz.
FB = Maximum input frequency = 150 Hz.
9/26/2019 Norizam 18
FKEE/Chapter 2
SAMPLING THEOREMS
NYQUIST THEOREM & ALIASING

• Continued from Example 3,


b. The Nyquist rate is defined as :
FN = Fs = 2FB = 2(150 Hz) = 300 Hz.
c. The minimum sampling rate required to avoid aliasing
is Fs ≥ 2FB = 300 Hz.
d. f1 = F1 / Fs = 25 Hz / 300 Hz = 1/12
f2 = F2 / Fs = 150 Hz / 300 Hz = 1/2
f3 = F3 / Fs = 50 Hz / 300 Hz = 1/6

e. The discrete signal after DTS is :


x[n] = xa[nTs] = 3cos[2πn(1/12)] + 10sin[2πn(1/2)]-
cos[2πn(1/6)]
9/26/2019 Norizam 19
FKEE/Chapter 2
SAMPLING THEOREMS
NYQUIST THEOREM & ALIASING

• It can be seen that the input signal is the


sinusoids in term of:
xa[t] = Acos(2πFk t + Φ) where
Fk = F0 + kFs , k = ±1, ±2, …
If the signal is sampled at rate Fs, the sampled
signal is:
x[n] = xa[nTs] = Acos 2π F0 + kFs n + Φ
Fs
= Acos(2πnF0 / Fs + Φ + 2πkn)
9/26/2019 Acos(2πf0n + Φ )
= Norizam 20
FKEE/Chapter 2
SAMPLING THEOREMS
SAMPLING RATE CONVERSIONS

• The multimedia such as CD Players, Digital Audio


Tapes (DAT) & Digital Broadcasting are operating at
different sampling frequencies.
• CD Player is operating at 44.1 kHz, DAT is operating
at 48 kHz and Digital Broadcasting is operating at 32
kHz.
• If we want to play the same signal using different
technologies, we need to change the sampling
frequency.
• A process of changing Sampling Rate or Frequencies
to cater the development of technologies are called
Resample.
• Resample means the Sampling Frequency can be
increased or reduced.
9/26/2019 Norizam 21
FKEE/Chapter 2
SAMPLING THEOREMS
SAMPLING RATE CONVERSION

• The process of changing sample rate or resampling is shown


below:

9/26/2019 Norizam 22
FKEE/Chapter 2
SAMPLING THEOREMS
SAMPLING RATE CONVERSIONS

• The sampling rate of sequence can be reduced with


another “Sampling” by a factor of M or D. The process
of reducing the sampling is called DOWNSAMPLING
or DECIMATION
• The system is called DECIMATOR.

• The downsampling process is used when the system


is operating at very high sampling frequency more
than the Nyquist rate. In Decimation, we reduce the
number of samples per second.

• The new sampling frequency is defined as :

9/26/2019 23
Fs’ = Fs / M
SAMPLING THEOREMS
SAMPLING RATE CONVERSIONS

• The downsampling process is shown


below :

x[n] = xa[nTs] M x[nM]=xa[nMTs]

Fs’ = Fs / M, thus
Ts’ = 1 / Fs’ = MTs
9/26/2019 Norizam 24
FKEE/Chapter 2
SAMPLING THEOREMS
SAMPLING RATE CONVERSIONS

• Example 4:
The discrete signal, x[n] with discrete frequency of 48 kHz is downsampled by factor
of 2 as shown below. What is the new sample frequency and the output of the
discrete signal?
xa[t] DTS Systems, x[n] 2 x[n2]=xa[n2Ts]
Sampler Decimator
The Sampling Frequency of the DTS, Fs = 48 kHz, and Downsampling Factor, M = 2,
thus the new sampling Frequency will be,

Fs’ = Fs / M = 48 kHz / 2 = 24 kHz

If the value of discrete signal, x[n] = {…,-2, -1, 3, 5, 4, 9, 7,11, 13…}


and down sampled by 2, the discrete signal will be :
x[n2] = {…,-2, 3, 4, 7, 13…}

The Downsampling will decrease the sampling frequency by a factor of M or D by


keeping one sample out of the sequences.
9/26/2019 Norizam 25
FKEE/Chapter 2
SAMPLING THEOREMS
SAMPLING RATE CONVERSIONS

• The process of increasing the sampling rate by a factor


of L or I is called UPSAMPLING or INTERPOLATION.
The system that operates this process is called
INTERPOLATOR. In Interpolation, we increase the
number of samples per second.

x[n] = xa[nTs] L x[n/L] = xa[nTs/L]

Where n = 0, ±L, ±2L, ±3L, …,

Fs’ = Fs L, thus
9/26/2019 26
Ts’ = 1/Fs’ = Ts / L
SAMPLING THEOREMS
SAMPLING RATE CONVERSIONS

• Example 5:
The discrete signal, x[n] with discrete frequency of 48 kHz is downsampled by factor of
2 as shown below. What is the new sample frequency and the output of the discrete
signal?
xa[t] x[n] x[n/2]=xa[nTs/2]
DTS Systems, 2,
Sampler Interpolator
The Sampling Frequency, Fs = 48 kHz, and L = 2, thus the new
sampling Frequency will be,

Fs’ = Fs L = 48 kHz (2 ) = 96 kHz

If the value of discrete signal, x[n] = {…,-2, -1, 3, 5, 4, 9, 7, 11, 13…}


and upsampled by 2, the discrete signal will be :
x[n2] = {…, 0,-2, 0, -1, 0, 3, 0, 5, 0, 4, 0, 9, 0, 7, 0, 11, 0, 13…}

Upsampling will increase the sampling frequency by a factor of L or I by adding


more samples with zero values.Norizam 27
9/26/2019 FKEE/Chapter 2
SAMPLING THEOREMS
SAMPLING RATE CONVERSIONS

• The Downsampling and Upsampling


process can be combined as shown
below :
x[n] x[n/L] x[nTsM/L]
L M
Ts’
= TsM / L
Fs’ = Fs L / M
9/26/2019 28
SAMPLING THEOREMS
SAMPLING RATE CONVERSIONS

9/26/2019 Norizam 29
FKEE/Chapter 2
SAMPLING THEOREMS
CHANGE SAMPLING RATE

• Example 6:
The discrete signal, x[n] with discrete frequency of 48 kHz is upsampled by
factor of 2 and then downsampled by a factor 4 as shown below. What is the
new sampling frequency and the output of the discrete signal?
x[n] x[n/2]=xa[nTs4/2]
2 4
Interpolator Decimator
The Sampling Frequency, Fs = 48 kHz, L = 2 and M = 4, thus the new
sampling Frequency will be
Fs = Fs L / M = (48 kHz) (2 / 4) = 24 kHz

If the value of discrete signal, x[n] = {…,-2, -1, 3, 5, 4, 9, 7, 11, 13…}


and upsampled by 2, the discrete signal will be :
x[n/2] = {…, 0,-2, 0, -1, 0, 3, 0, 5, 0, 4, 0, 9, 0, 7, 0, 11, 0, 13…}
then downsampled by 4, thus the discrete signal become :
9/26/2019 x[n4/2] = {…, 0,-2, 0, 0, 3, 0, 0, 4, 0, 0, 7, 0, 0, 13…} 30
SAMPLING THEOREMS
SAMPLING RATE CONVERSIONS

• Example 7: The process of Downsampling and Upsampling are


visualized
below:

9/26/2019 Norizam 31
FKEE/Chapter 2
SAMPLING THEOREMS
SAMPLING RATE CONVERSIONS

9/26/2019 Norizam 32
FKEE/Chapter 2
SAMPLING THEOREMS
SAMPLING RATE CONVERSIONS

Example 8: Smartphone or CellPhone System

9/26/2019 Norizam 33
FKEE/Chapter 2

Potrebbero piacerti anche