Experiment # 11: Implementation and Verification of Sampling Theorem in MATLAB Objectives
Experiment # 11: Implementation and Verification of Sampling Theorem in MATLAB Objectives
Experiment # 11: Implementation and Verification of Sampling Theorem in MATLAB Objectives
Objectives
This lab provides an introduction to the concept of sampling and verification of sampling
theorem in MATLAB.
Apparatus
PC having MATLAB
Theory
Period:
For periodic waveforms, the duration of the waveform before it repeats is called the period of
the waveform as shown below.
Period of a waveform
Frequency:
Frequency is the rate at which a regular vibration pattern repeats itself (frequency = 1/period).
The unit for frequency is cycles/second, also called Hertz (Hz). The frequency of a waveform
is equal to the reciprocal of the period.
Frequency = 1/period
Example:
Frequency = 10 Hz
Period = .1 (1/10) seconds
Frequency = 100 Hz
Period = .01 (1/100) seconds
Frequency = 261.6 Hz
Period = .0038226 (1/ 261.6) seconds
Sampling:
Example:
Sampling
Disadvantages of Sampling
The sampling rate (SR) is the rate at which amplitude values are digitized from the original
waveform.
SR = 44,100 samples/second
SR = 22,050 samples/second
SR = 8,192 samples/second
Higher sampling rates allow the waveform to be more accurately represented shows different
sampling rates.
Shannon’s theorem tells us that if we have at least 2 samples per period of a sinusoid, we
have enough information to reconstruct the sinusoid.
Explanation:
According to the Nyquist Theorem, the sampling rate must be at least 2fmax, or twice the
highest analog frequency component. The sampling in an analog-to-digital converter is
actuated by a pulse generator (clock). If the sampling rate is less than 2fmax, some of the
highest frequency components in the analog input signal will not be correctly represented in
the digitized output. When such a digital signal is converted back to analog form by a digital-
to-analog converter, false frequency components appear that were not in the original analog
signal. This undesirable condition is a form of distortion called aliasing.
Aliasing:
One of the limitations of discrete-time sampling is an effect called aliasing. The Nyquist
Theorem states that you need 2 samples per “cycle” of your input signal to define it. Thus,
you can accurately measure the frequency of a signal with frequency f as long as you are
sampling it at greater than 2f. If you try to measure the frequency of signals having a
frequency above f with a sampler operating at 2f, you will alias the signal, or create false
images of this signal at frequencies below f. These false frequencies will appear as mirror
images of the original frequency around the Nyquist frequency. This situation is called
"aliasing back" or "folding back" as described below.
Frequency versus amplitude plot showing an aliased signal, fa, which occurs due to
"aliasing back" from the original signal of 70MHz
Oversampling:
When we sample at a rate which is greater than the Nyquist rate, we say we are oversampling
as shown below.
Under sampling:
When we sample at a rate which is less than the Nyquist rate, we say we are under sampling
and aliasing will yield misleading results as shown.
Output:-
Under sampling
In this lab I learnt about an introduction to the concept of sampling and verification of sampling
theorem in MATLAB. I recall the basic definion of period, time and frequency. I also learnt
about the sampling (Sampling is the reduction of a continuous-time signal to a discrete-time
signal), sampling rate (The sampling rate (SR) is the rate at which amplitude values are
digitized from the original waveform), Nyquist theorem(Shannon’s theorem tells us that if we
have at least 2 samples per period of a sinusoid, we have enough information to reconstruct the
sinusoid) and Aliasing (Limitations of discrete-time sampling is an effect called aliasing). I also
learnt about the under sampling and over sampling and in lab also perform the Simulink task on
them and get their results.