0% found this document useful (0 votes)
21 views4 pages

Lab 9 Exercise - Sampling Theorem - 2024

Uploaded by

jaberhajer68
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views4 pages

Lab 9 Exercise - Sampling Theorem - 2024

Uploaded by

jaberhajer68
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

College of Engineering

Department of Electrical Engineering


ELEC 351 Signals and Systems Lab
Session 9: Sampling & Restoration

Objective: To implement and analyze Sampling Theorem using Matlab

Lab Activity:
• To provide a better understanding Sampling, restoration, aliasing and
quantization.
• Sample and reconstruct signals using MATLAB
Software: Matlab

Introduction:
In this lab, we are going to focus on digital signals. However, to apply digital systems to real
world signals, we need to add the appropriate conversion steps before and after our digital
Processing. The following diagram gives an overview:

The analog signal x(t) is converted by an analog-to-digital (A/D) converter to the sequence
x[n], Which is processed by an LTI system with output sequence y[n]. The output sequence
y[n] is then Converted by an digital-to-analog (D/A) converter to an analog signal y(t).

The task of the A/D converter is:


• Sample the analog signal at a regular rate: Process of converting a continuous-time
x(t) signal into a discrete-time sequence x[n]
• Quantize the samples to a finite number of signal levels

Sampling:

Theoretically, the sampling or C/D conversion consists of two steps:


• Keep the signal values at the sampling times, and set the signal to zero everywhere
else (divide t by the sampling period Ts) (The frequency axis in units of cycles per
sample.)
• Normalize the time axis from seconds to sample index.

The first step can be viewed as multiplying an analog signal x(t) by an analog impulse train s(t),
resulting in a sampled analog signal xs (t ) , as illustrated by the figure below:

The signal’s spectrum is shifted and weighted by the


Impulses in the spectrum of the impulse train signal.
As a result, the sampled analog signal’s spectrum
Is periodic, and its period is equal to the sampling
Frequency.

The Sampling Theorem


• We must have some information about the analog signal especially the frequency content of
the signal, to select the sampling period T or sampling rate Fs.
• To avoid the aliasing problem, sampling rate Fs is selected so that
Fs > 2Fmax
The sampling rate is called the Nyquist rate.

Reconstruction (Restoration)
Simply, reversing all the steps done in
sampling

Restoration filter: (Ideal Low-Pass


Filter) Low-pass filter, Hlp(f), is applied to
the sampled analog signal to remove all
periodic Copies of the spectrum except for
the copy centered at 0 Hz. (must have a gain
of T to correct the change in gain incurred
during sampling)

Bandlimited Waveforms
Definition: A waveform w(t) is (Absolutely Bandlimited) to B hertz if

Definition: A waveform w(t) is (Absolutely Time Limited) if


w(t) = 0, for |t| ≥ T
Theorem: An absolutely bandlimited waveform cannot be
absolutely time limited, and vice versa.

A physical waveform that is time limited may not be absolutely bandlimited, but it may be
bandlimited for all practical purposes in the sense that the amplitude spectrum has a negligible level
above a certain frequency.
Aliasing:
This happens when the sampling frequency is too small.

Lab Task:
Different sampling rates and aliasing
1. Write the Matlab code to generate:
𝑥𝑥(𝑡𝑡) = cos(2𝜋𝜋𝜋𝜋𝜋𝜋) Where f=30 Hz

2. Plot the signal using sub plot


a. in time domain
b. in frequency domain

3. Sample the signal under different sampling conditions:


a. 𝐹𝐹𝑠𝑠 < 2𝐹𝐹𝑚𝑚 Ts<1/2fm aliased with 0.772 cos(40𝜋𝜋𝜋𝜋)
b. 𝐹𝐹𝑠𝑠 = 2𝐹𝐹𝑚𝑚 Ts=1/2fm
c. 𝐹𝐹𝑠𝑠 ≫ 2𝐹𝐹𝑚𝑚 Ts>>1/2fm

4. Multiple plot: the signal sampled under sampling condition and the signal x
a. in time domain
b. in frequency domain
c. Label and Title the plots appropriately.

You might also like