0% found this document useful (0 votes)
42 views13 pages

5ENT1124 Introduction and Application of Control System Assessment 1

This document contains a student's MATLAB assignments on control systems topics. It includes: 1) Laplace transform calculations of various functions using symbolic math and MATLAB commands. 2) Examples of creating transfer functions and analyzing their poles, zeros, and multiplication in MATLAB. 3) Simulink simulations of open-loop and closed-loop feedback control systems, comparing step responses for different controller gains. 4) Analysis and comparison of the transient and steady-state behaviors between different simulated control systems.

Uploaded by

abdussamad526
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)
42 views13 pages

5ENT1124 Introduction and Application of Control System Assessment 1

This document contains a student's MATLAB assignments on control systems topics. It includes: 1) Laplace transform calculations of various functions using symbolic math and MATLAB commands. 2) Examples of creating transfer functions and analyzing their poles, zeros, and multiplication in MATLAB. 3) Simulink simulations of open-loop and closed-loop feedback control systems, comparing step responses for different controller gains. 4) Analysis and comparison of the transient and steady-state behaviors between different simulated control systems.

Uploaded by

abdussamad526
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/ 13

5ENT1124 Introduction and Applications of Control

Systems
2023-2024, Semester B

Control System CAD and CAS using MATLAB

Name: Nithila Gomis

Student ID: 21055858

Date: 19th March 2024


Problem 1 – Laplace Transform Calculation

(a)
Code:
% Define the symbolic variable t and the Laplace transform variable s
syms t s

% Define the unit step function u(t)


u = heaviside(t);

% Define the function f(t)


f = t^8 * u;

% Compute the Laplace transform of f(t)


F = laplace(f, t, s)

% Display the result


disp(F);

Answer: F = 40320/s^9

(b)
Code:
% Define the symbolic variables
syms t s

% Define the unit step function u(t)


u = heaviside(t);

% Define the function f(t)


f = exp(-5*t) * cos(7*t) * u;

% Compute the Laplace transform of f(t)


F = laplace(f, t, s);

% Display the result


disp(F);

Answer: (s + 5)/((s + 5)^2 + 49)

(c)
Code:
% Define the symbolic variables
syms t s

% Define the unit step function u(t)


u = heaviside(t);
% Define the function f(t) without the exponential part
f = sin(2*t) * u;

% Compute the Laplace transform of f(t) without the exponential part


F = laplace(f, t, s);

% Apply the first-shift theorem to include the exponential e^(5t)


F_shifted = subs(F, s, s - 5);

% Display the result


disp(F_shifted);

Answer: 2/((s - 5)^2 + 4)

(d)
Code:
% Define the symbolic variable
syms s

% Define the expression to decompose


expr = 1/(s^2 + 10*s + 25);

% Compute the partial fraction decomposition


partial_fractions = partfrac(expr, s);

% Display the result


disp(partial_fractions);

Answer: 1/(s + 5)^2

Problem 2 – MATLAB command environment

(a)
Code:
% Define the coefficients of the numerator of the transfer function
numerator_coeffs = [1];

% Define the coefficients of the denominator of the transfer function


denominator_coeffs = [1 10 25];

% Create the transfer function


G = tf(numerator_coeffs, denominator_coeffs);
% Display the transfer function
disp(G);

Answer:

(b)
Code:
% Define the coefficients of the numerator and the denominator of the transfer function
numerator_coeffs = [1, 1]; % For s + 1
denominator_coeffs = [1, 10, 25]; % For s^2 + 10s + 25

% Create the transfer function


G = tf(numerator_coeffs, denominator_coeffs);

% Find the poles and zeros of the transfer function


poles = pole(G);
zeros = zero(G);

% Display the poles and zeros


disp('Poles of the system:');
disp(poles);
disp('Zeros of the system:');
disp(zeros);

Answer:

(c)
Code:
% Define the coefficients of the numerator and the denominator of the first transfer function (a)
numerator_a = [1];
denominator_a = [1, 10, 25];

% Define the coefficients of the numerator and the denominator of the second transfer function (b)
numerator_b = [1, 1];
denominator_b = [1, 5, 5];

% Create the transfer function objects


G_a = tf(numerator_a, denominator_a);
G_b = tf(numerator_b, denominator_b);

% Multiply the two transfer functions


G_product = G_a * G_b;

% Display the resulting transfer function


disp(G_product)

Answer:

(d)
Code:
% Define the coefficients of the transfer function obtained in (c)
numerator_coeffs = [1, 1];
denominator_coeffs = [1, 15, 80, 175, 125];

% Create the transfer function


sys = tf(numerator_coeffs, denominator_coeffs);

% (a) Obtain the system model in pole-zero format


figure('Name', 'Pole-Zero Map', 'NumberTitle', 'off');
pzmap(sys);
title('Pole-Zero Map');
shg; % Brings the current figure to front

% (b) Obtain the system step response


figure('Name', 'Step Response', 'NumberTitle', 'off');
step(sys);
title('Step Response');
shg;

% Obtain the system impulse response


figure('Name', 'Impulse Response', 'NumberTitle', 'off');
impulse(sys);
title('Impulse Response');
shg;
Answer Part (a):

Answer Part (b):


(e)
Code:
% Define the coefficients of the open-loop transfer function
numerator_coeffs = [1, 1];
denominator_coeffs = [1, 15, 80, 175, 125];

% Create the open-loop transfer function


G = tf(numerator_coeffs, denominator_coeffs);

% Define the coefficients of the feedback path transfer function


feedback_numerator_coeffs = 1;
feedback_denominator_coeffs = [1, 1];

% Create the feedback path transfer function


H = tf(feedback_numerator_coeffs, feedback_denominator_coeffs);

% Calculate the closed-loop transfer function


T = feedback(G, H);

% Display the closed-loop transfer function


disp('Closed-loop Transfer Function:');
disp(T);

% Optionally, if you want to plot the step response:


figure('Name', 'Closed-loop Step Response', 'NumberTitle', 'off');
step(T);
title('Closed-loop Step Response');

Answer:
Problem 3 - Controller Design Using Simulink
(a)

(b)

(c)
Simulated block diagram for part a

Simulated block diagram for part b

Comparison of simulation diagram of A and B


The two block diagrams simulate a similar system with an identical transfer function. Both
display a feedback loop and a steady-state response, but the first image shows a more
pronounced initial ramp-up in its curve, suggesting a difference in transient behaviour. This
could be due to variations in simulation parameters or input signals. The second image's
curve is smoother, indicating a more gradual approach to the steady state, possibly due to
different initial conditions or a modified step input. The exact causes of the differences
cannot be determined without additional details on the simulation setups.
(d)
K1

K5
K10

K15
(e)

Comparison of simulation diagram of B and D K15

The first image depicts a feedback system with a second-order transfer function, exhibiting a
gradually levelling response on the scope, indicative of damping. The second image shows a
different system with a transfer function suggesting a faster, less damped response, and
includes a constant input of 4.25. The comparison reveals distinct transient and steady-state
behaviours, with the first system appearing slower and more damped, while the second reacts
more rapidly to the constant input.

You might also like