DC 1
DC 1
Lab Report
1 Experiment
Sampled Signal Generation using Impulse Train
Introduction
This experiment involves generating a sampled signal from a continuous-time
sinusoidal signal using an impulse train. Sampling is essential in converting
continuous-time signals into discrete-time signals for digital processing,
enabling the storage and manipulation of signals in various applications such
as audio, image processing, and telecommunications. According to the Nyquist
theorem, the sampling frequency must be at least twice the maximum
frequency of the signal to avoid aliasing and ensure accurate signal
representation.
Theory
The continuous-time sinusoidal signal can be expressed as:
m(t) = sin(2πfm t)
where fm is the frequency of the signal. Sampling is a critical process in
digital signal processing that involves converting continuous-time signals into
discrete-time signals. This is done using an impulse train defined as:
∞
X
Impulse Train = δ(t − nTs )
n=−∞
1
where Ts is the sampling interval (the time between samples), and fs = T1s is
the sampling frequency. The impulse train serves as a tool for sampling,
whereby it effectively ”picks” values from the continuous signal at regular
intervals. According to the Nyquist criterion, the sampling frequency must be
at least twice the frequency of the signal (fs ≥ 2fm ) to avoid aliasing and
preserve the signal’s integrity.
Code (Octave)
The following Octave code was used to generate the plots for the impulse
train, continuous sinusoidal signal, and the sampled signal:
clc; % Clear command window
clear all; % Clear workspace variables
close all; % Close all figure windows
fs = 1000; % Sampling frequency
T = 0.2; % Observation time
interval = 0.001; % Time interval
t = 0:interval:T; % Time vector
% Impulse Train
impulse = ones(size(t)); % Create impulse train
subplot(3,1,1); % Create subplot for impulse train
stem(t, impulse);
title(’Impulse - Train’); xlabel(’Time - (s)’); ylabel(’Amplitude’);
% Sinusoidal Signal
fm = 5; % Frequency of the sinusoid
mt = sin(2 * pi * fm * t); % Generate sinusoidal signal
subplot(3,1,2); % Create subplot for sinusoidal signal
plot(t, mt);
title(’Continuous - Sinusoidal - Signal’); xlabel(’Time - (s)’); ylabel(’Amplitude’);
% Sampled Signal
2
sampling = mt .* impulse; % Generate sampled signal
subplot(3,1,3); % Create subplot for sampled signal
stem(t, sampling);
title(’Sampled - Signal’); xlabel(’Time - (s)’); ylabel(’Amplitude’);
Results
The sampled signal accurately captures the behavior of the original sinusoidal
signal at discrete time points. With a sampling frequency of fs = 1000 Hz,
which is significantly higher than twice the signal frequency, aliasing is
effectively avoided. This ensures that the signal is represented accurately in
the sampled domain. If the sampling frequency were lower, important features
of the sinusoidal signal would be missed, causing distortion and loss of
information.
Conclusion
This experiment successfully demonstrates the process of sampling a sinusoidal
signal using an impulse train. The sampled signal retains the essential features
of the original continuous-time signal, validating the effectiveness of the
sampling process when the sampling frequency is sufficiently high as per the
Nyquist criterion. The results confirm that proper sampling avoids aliasing
and ensures the signal can be accurately represented in the discrete domain.