Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Experiment # 11: Implementation and Verification of Sampling Theorem in MATLAB Objectives

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Experiment # 11

Implementation and Verification of Sampling Theorem in MATLAB

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:

To represent waveforms on digital computers, we need to digitize or sample the waveform.


In signal processing sampling is the reduction of a continuous-time signal to a discrete-time
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. 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 as shown below in Fig. A theoretical ideal sampler produces samples equivalent to the
instantaneous value of the continuous signal at the desired points.

Example:

Sampling

Disadvantages of Sampling

 Introduces some noise


 Limits the maximum upper frequency range
Sampling Rate

The sampling rate (SR) is the rate at which amplitude values are digitized from the original
waveform.

 CD sampling rate (high-quality):

SR = 44,100 samples/second

 Medium-quality sampling rate:

SR = 22,050 samples/second

 Phone sampling rate (low-quality):

SR = 8,192 samples/second

Higher sampling rates allow the waveform to be more accurately represented shows different
sampling rates.

Different sampling rates

Nyquist Theorem and Aliasing


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.

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:-

Post lab task

1-Make a model in Simulink which under sample and oversample the


continuous time signal?
Over sampling

Under sampling

Comment and conclusion:

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.

You might also like