0% found this document useful (0 votes)
3 views

Lab_Report(14)

This document outlines Lab 13 for EE-232: Signals and Systems, focusing on the exploration of Laplace and Fourier transforms and Parseval's theorem. Students will analyze signals, visualize frequency spectra, and verify energy conservation between time and frequency domains through computational tasks. The lab encourages creativity and independent exploration while providing structured instructions for reporting and analysis.

Uploaded by

ahmadmanahil80
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)
3 views

Lab_Report(14)

This document outlines Lab 13 for EE-232: Signals and Systems, focusing on the exploration of Laplace and Fourier transforms and Parseval's theorem. Students will analyze signals, visualize frequency spectra, and verify energy conservation between time and frequency domains through computational tasks. The lab encourages creativity and independent exploration while providing structured instructions for reporting and analysis.

Uploaded by

ahmadmanahil80
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/ 10

Department of Electrical Engineering

Faculty Member: Dr. Abdullah Mughees Dated: 12/19/24

Section: A Semester: 5th

EE-232 : Signals and Systems


Lab 13 : Open Ended Lab

PLO5 –CLO3 PLO5-CLO3 PLO8- PLO9-CLO5


CLO4
Name Reg. No Viva / Quiz / Analysis of Modern Tool Ethics and Individual and
Lab data in Usage Safety Team Work
Performance Lab
Report

5 Marks 5 Marks 5 Marks 5 Marks 5 Marks


Manahil Ahmad 407744

Hafiza Adeela Arif 420111


Objective of the Lab
The objective of this lab is to deepen students' understanding of fundamental concepts in signal
processing by exploring the Laplace and Fourier transforms, as well as Parseval's theorem.
Through computational analysis and visualization, students will:
1. Investigate how the Laplace and Fourier transforms represent signals in the frequency
domain.
2. Analyze the relationship between the Laplace and Fourier transforms and their respective
applications in signal processing.
3. Demonstrate Parseval's theorem to validate energy conservation between the time and
frequency domains.
4. Gain hands-on experience with plotting and interpreting the magnitude and phase spectra
in both 3D and 2D representations.
Open-Ended Lab:
This lab is open-ended, allowing students to select and analyze any signal of their choice,
encouraging creativity and personalized exploration. Students can experiment with different signal
parameters and observe their impact on the Laplace and Fourier transforms, as well as their spectra.
The flexibility to create custom 2D and 3D visualizations fosters independent thinking and
problem-solving. By applying theoretical concepts to real-world signals, students can deepen their
understanding of signal processing and tailor the lab experience to their interests.
Lab Instructions
 This lab activity comprises of three parts: Lab Exercises, and Post-Lab Viva session.
 The reports are to be submitted on LMS.
 The students should perform and demonstrate each lab task separately for step-wise
evaluation
 Only those tasks that completed during the allocated lab time will be credited to the
students. Students are however encouraged to practice on their own in spare time for
enhancing their skills.
Lab Report Instructions
All questions should be answered precisely to get maximum credit. Lab report must ensure
following items:
 Lab objectives
 MATLAB codes
 Results (graphs/tables) duly commented and discussed
 Conclusion
Introduction to Parseval's Theorem
Parseval's Theorem is a fundamental result in signal processing and Fourier analysis, which
establishes the equivalence of a signal's energy in the time domain and its energy in the frequency
domain. It provides a way to analyze and compare signals across these two domains, offering
critical insights into their properties.
Mathematically, for a continuous-time signal x(t), Parseval's Theorem states:

Here, x(t) is the signal in the time domain, and X(jω) is its Fourier transform.
For a discrete-time signal x[n]and its Discrete-Time Fourier Transform (DTFT) X(ejω), Parseval's
theorem is expressed as:

The theorem demonstrates that the total energy of a signal remains constant, regardless of whether
it is measured in the time or frequency domain.
This principle is widely used in signal processing to analyze the energy content of signals, optimize
systems, and verify computations involving Fourier transforms.

Significance of Laplace and Fourier Transforms


The Laplace transform is a powerful tool for analyzing linear time-invariant (LTI) systems and
transient behaviors in engineering and science. By extending the time-domain signal into the
complex plane, it enables the study of systems with initial conditions, exponential growth or decay,
and stability properties. The Laplace transform is particularly useful in control systems, circuit
analysis, and differential equation solving.
The Fourier transform, on the other hand, is primarily used for frequency-domain analysis of
signals and systems. It decomposes a signal into its constituent frequency components, providing
insights into steady-state behaviors and spectral properties. This makes it a fundamental tool in
fields like signal processing, communications, and spectral analysis.
Relation Between Laplace and Fourier Transforms
The Fourier transform can be seen as a special case of the Laplace transform. In the Laplace
domain, the complex variable is s=σ+ jω, where σ represents the real part and ω the angular
frequency. When σ=0, the Laplace transform reduces to the Fourier transform, making s=jω. This
means the Fourier transform analyzes signals along the imaginary axis in the complex plane,
focusing solely on the frequency-domain representation. The broader framework of the Laplace
transform allows for handling signals that grow or decay exponentially, which the Fourier
transform cannot address directly.

Task 1: Analysis of Laplace and Fourier Transforms


The objective of this task is to compute and analyze the Laplace and Fourier transforms of a chosen
signal. You will study how the signal's parameters influence its frequency spectra, investigate the
connection between the Laplace and Fourier transforms, and visualize the resulting magnitude and
phase spectra in both 3D and 2D plots.
Instructions:
1. Compute the Laplace transform X(s) of the selected signal.
Code:
syms t s a;
x_t = exp(-a*t); % Example signal: e^(-at)
X_s = laplace(x_t, t, s);
disp(X_s);

Screenshot:

2. Create 3D plots for the magnitude and phase spectra of the Laplace transform, with the real
and imaginary components of s as the axes.
Code:
% Define range for real and imaginary parts of s
sigma = linspace(-10, 10 , 10); % Real part of s
omega = linspace(-10, 10, 100); % Imaginary part of s
[Sigma, Omega] = meshgrid(sigma, omega); % Create meshgrid for 3D plot
% Define 'a' as a constant (for example, a = 1)
a = 1;
% Compute X(s) for each pair of sigma and omega
S = Sigma + 1i * Omega; % Complex frequency variable
X_s_numeric = 1 ./ (S + a); % Example Laplace transform: X(s) = 1 / (s + a)
% Compute magnitude and phase
magnitude = abs(X_s_numeric); % Magnitude of X(s)
phase = angle(X_s_numeric); % Phase of X(s)
% 3D plot for magnitude
figure;
surf(Sigma, Omega, magnitude);
title('Magnitude Spectrum of Laplace Transform');
xlabel('Real(s)');
ylabel('Imaginary(s)');
zlabel('Magnitude');
colorbar; % Optional: adds a color bar for the magnitude
% 3D plot for phase
figure;
surf(Sigma, Omega, phase);
title('Phase Spectrum of Laplace Transform');
xlabel('Real(s)');
ylabel('Imaginary(s)');
zlabel('Phase');
colorbar; % Optional: adds a color bar for the phase

Phase:

Magnitude:
3. Derive the Fourier transform by setting s= jω in the Laplace transform. Generate 2D plots
for the magnitude and phase spectra of the Fourier transform.
Code:
% Define range for the imaginary part of s (omega)
omega = linspace(-10, 10, 100); % Imaginary part of s
% Define 'a' as a constant (for example, a = 1)
a = 1;
% Define sigma as 0 (purely imaginary frequency)
sigma = 0;
% Compute X(s) for each omega (using s = i * omega)
S = sigma + 1i * omega; % Complex frequency variable s = i*omega
% Example Laplace transform: X(s) = 1 / (s + a)
X_s_numeric = 1 ./ (S + a);
% Compute magnitude and phase
magnitude = abs(X_s_numeric); % Magnitude of X(s)
phase = angle(X_s_numeric); % Phase of X(s)
% 2D plot for magnitude
figure;
plot(omega, magnitude);
title('Magnitude Spectrum of Fourier Transform');
xlabel('omega');
ylabel('Magnitude');
grid on;
% 2D plot for phase
figure;
plot(omega, phase);
title('Phase Spectrum of Fourier Transform');
xlabel('omega');
ylabel('Phase');
grid on;

Phase:

Magnitude:

Task 2: Verification of Parseval's Theorem


The goal of this task is to prove Parseval's theorem for a chosen signal and demonstrate the
equivalence of its energy in the time and frequency domains.
Instructions:
1. Compute the energy of the signal in both the time and frequency domains to verify
Parseval's theorem.
2. Display plots of the signal for better understanding and visualization.
Code:
syms t omega
f_t = exp(-t^2);
E_t = int(abs(f_t)^2, t, -inf, inf);
E_t = double(E_time);
F_w = fourier(f_t, t, omega);
F_w_sq = abs(F_w)^2;
E_freq = (1 / (2 * pi)) * int(F_w_sq, omega, -inf, inf);
E_freq = double(E_freq);
disp('Energy computed in the time domain:');
disp(E_t);
disp('Energy computed in the frequency domain:');
disp(E_freq);
if E_t==E_freq
disp('Energy is equal in time and frequency domains.');
else
disp('Parseval''s theorem not satisfied.');
end
t_vals = linspace(-5, 5, 1000);
f_t_numeric = matlabFunction(f_t);
f_t_vals = f_t_numeric(t_vals);
figure;
plot(t_vals, f_t_vals, 'LineWidth', 1.5);
xlabel('Time (t)');
ylabel('f(t)');
title('Time-Domain Signal');
grid on;
omega_vals = linspace(-10, 10, 1000);
F_w_numeric = matlabFunction(F_w);
F_w_vals = F_w_numeric(omega_vals);
F_w_sq = abs(F_w_vals).^2;

figure;
plot(omega_vals, F_w_sq, 'LineWidth', 1.5);
xlabel('\omega (rad/s)');
ylabel('F(j\omega)');
title('Frequency-Domain Squared Magnitude Spectrum');
grid on;

Output:

Graphs:
Conclusion:
In this lab, we explored Parseval's Theorem, which asserts that the total energy of a signal is equal
in both the time and frequency domains. This principle is essential in signal processing, as it allows
for the analysis of signals in either domain without losing any information about their energy. We
also discussed the significance of Laplace and Fourier transforms, noting that the Fourier transform
is a special case of the Laplace transform. Through the verification of Parseval's theorem, we
confirmed the equivalence of energy calculations in the time and frequency domains for a chosen
signal.

You might also like