0% found this document useful (0 votes)
9 views10 pages

Final Examination

This document is a final examination lab report for a Signal System course at Vietnam National University – Ho Chi Minh City, submitted by Nguyen Phuoc Trong Nhan. It includes a grading guideline, a table of contents, and detailed experimental results for four problems involving signal analysis and MATLAB simulations. The report covers topics such as energy calculations, Laplace transforms, and convolution results.

Uploaded by

Nhân Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views10 pages

Final Examination

This document is a final examination lab report for a Signal System course at Vietnam National University – Ho Chi Minh City, submitted by Nguyen Phuoc Trong Nhan. It includes a grading guideline, a table of contents, and detailed experimental results for four problems involving signal analysis and MATLAB simulations. The report covers topics such as energy calculations, Laplace transforms, and convolution results.

Uploaded by

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

VIETNAM NATIONAL UNIVERSITY – HOCHIMINH CITY

INTERNATIONAL UNIVERSITY
SCHOOL OF ELECTRICAL ENGINEERING

SIGNAL SYSTEM LABORATORY

FINAL EXAMINATION

Submitted by
Nguyen Phuoc Trong Nhan – EEEEIU22076

Date Submitted: 23-12-2024


Date Performed: 23-12-2024
Code: 8
Course Instructor: D.N.Hung

GRADING GUIDELINE FOR LAB REPORT


Number Content Score Comment

1 Format (max 9%)

- Font type Yes No

- Font size Yes No

- Lab title Yes No

- Page number Yes No

- Table of contents Yes No

- Header/Footer Yes No

- List of figures (if exists) Yes No

- List of tables (if exists) Yes No

- Lab report structure Yes No

2 English Grammar and Spelling (max 6%)

- Grammar Yes No

- Spelling Yes No

3 Data and Result Analysis (max 85%)

Total Score

Signature:

Date:
International University School of Electrical Engineering

Table of Contents

List of Figures................................................................................................................................... ii

1 Experimental Results................................................................................................................. 1
1.1 Problem 1................................................................................................................................................... 1
1.2 Problem 2................................................................................................................................................... 1
1.3 Problem 3................................................................................................................................................... 1
1.4 Problem 4................................................................................................................................................... 1

[Course’s name] [Course number]


International University School of Electrical Engineering

List of Figures
Figure 1: Circuit diagram 1........................................................................................................................... 2
Figure 2: Circuit diagram 2........................................................................................................................... 2
Figure 3: Simulation for experiment 1......................................................................................................3

[Course’s name] [Course number]


International University School of Electrical Engineering

1 Experimental Results

1.1 Problem 1
t=-4:0.01:4;

g_t= @(t) (-2*t-6).*(heaviside(t+3)-heaviside(t+2)) +


(3*t+4).*(heaviside(t+2)-heaviside(t+1)) + (t+2).*(heaviside(t+1)-
heaviside(t)) + (-3*t+2).*(heaviside(t)-heaviside(t-1)) + (4*t+-
5).*(heaviside(t-1)-heaviside(t-2)) + (-3*t+9).*(heaviside(t-2)-heaviside(t-
3));
g_values = g_t(t)
%a:
figure;
subplot(3,1,1);
plot(t, g_values , 'b', 'LineWidth', 2);
title('Task a: Plot of g(t)');
xlabel('Time (t)');
ylabel('g(t)');
grid on;
%energy of x_t:
energy = trapz(t, abs(g_values).^2);
disp(['the energy of g(t) is: ', num2str(energy)]);
%b:

y_t = @(t) 2*g_t(2*t -1);


y_values = y_t(t);

subplot(3,1,2);
plot(t,y_values, 'b', 'DisplayName','2x(2t-1)');
xlabel('Time (t)');
ylabel('Amplitude');
legend;
grid on;
E_y = trapz(t, abs(y_values).^2); % Numerical integration using trapezoidal
rule
disp(['Energy of y(t): ', num2str(E_y)]);

[Course’s name] 1 [Course number]


International University School of Electrical Engineering

1.2 Problem 2
% MATLAB Script for the Given Problem

% Define the range of n


n = -10:10; % Extended range for calculations

% Define x(n) as a piecewise function


x_n = zeros(size(n)); % Initialize with zeros
for i = 1:length(n)
if -2 < n(i) && n(i) < 8
x_n(i) = n(i) + 2 *sin(pi*n(i)/4);
else
x_n(i) = 0; % Outside the specified ranges
end
end

% Plot x(n)
figure;
subplot(2, 1, 1);
stem(n, x_n, 'b', 'LineWidth', 1.5);
xlabel('n');
ylabel('x(n)');
title('Plot of x(n)');
grid on;

% Calculate the energy of x(n)


% Energy is the sum of the squared magnitudes of the sequence
energy_x = sum(x_n.^2);

% Display energy values


disp(['The energy of x(n) is: ', num2str(energy_x)]);

[Course’s name] 2 [Course number]


International University School of Electrical Engineering

1.3 Problem 3
syms t s
%Define x(t) and y(t)
x_t = 2*(heaviside(t+1) - heaviside(t - 1)); % x(t) = 1 for -1 < t < 1
h_t = (-2*t+2) * (heaviside(t) - heaviside(t - 1)); % y(t) = t for 0 ≤ t < 2
%Compute Laplace Transforms
X_s = laplace(x_t, t, s);
H_s = laplace(h_t, t, s);
%Convolution in Laplace domain
Convolution_s = X_s * H_s;
%Inverse Laplace Transform to find the result
convolution_t = ilaplace(Convolution_s, s, t);
%Simplify results
convolution_t = simplify(convolution_t);
% Display results
disp('The convolution result in the time domain is:');
disp(convolution_t);
% Plot x(t), h(t), and convolution result
figure;
% Plot x(t)
subplot(3, 1, 1);
fplot(x_t, [-3, 3]);
xlabel('t');
ylabel('x(t)');
title('Signal x(t)');

[Course’s name] 3 [Course number]


International University School of Electrical Engineering

grid on;
% Plot y(t)
subplot(3, 1, 2);
fplot(h_t, [-1, 3]);
xlabel('t');
ylabel('h(t)');
title('Signal h(t)');
grid on;
% Plot Convolution result
subplot(3, 1, 3);
fplot(convolution_t, [0, 3]);
xlabel('t');
ylabel('Convolution Result');
title('Convolution of x(t) and h(t)');
grid on;

[Course’s name] 4 [Course number]


International University School of Electrical Engineering

1.4 Problem 4
n=[2 -4];
d=[3 -4 1 -9];
[R,P,K]=residue(n,d)
sym s
X1=poly2sym(n,s)/poly2sym(d,s);
disp('Partial fraction expression:');
pretty(X1)
x1=ilaplace(X1);
disp('Inverse Laplace Transform:');
pretty(x1)

[Course’s name] 5 [Course number]


International University School of Electrical Engineering

[Course’s name] 6 [Course number]

You might also like