Practical 3
Practical 3
MATLAB
Symbolic Math Toolbox
Control Toolbox
Simulink
Recommended Books:
Feedback Control Systems by Charles L. Phillips & Royce D. Harbor
Control Systems by Norman Nise
Activity Time Boxing
Theory
In control engineering, a transient response is the response of a system to any change from an equilibrium
or a steady state. The purpose of transient response is to determine the behavior of a system subjected to
time varying excitations. It is not necessarily tied to abrupt events but to any event that affects the
equilibrium of a system. Transient excitation is explicitly defined in time domain.
Effect of Pole location on Transient Response Specifications
Poles and zeros of a transfer function are the frequencies for which the value of the denominator and
numerator of transfer function becomes zero respectively. The values of poles and the zeros of the system
determines whether the system is stable or not, and how well the system performs.
Figure 3.1 Pole location response
An idea of Feedback
Pole moves as feedback is introduced. Pole location is very critical because it determines the system's
response and its stability as well.
Time Domain specifications:
Settling Time:
The settling time is the time domain elapsed from the application of an ideal instantaneous step input to
the time at which the amplifier output has entered and remained with a specific error band, usually
symmetrical about the final value.
T s=4 τ
Rise Time:
Rise time refers to the time required for a signal to change from a specified low value to a specified high
value. Usually, these values are 10% to 90% of the step height.
1.8
T r=
ωn
Overshoot:
Overshoot refers to an output exceeding its final, steady state value. For a step input, the percentage
overshoot (PO) is the maximum value minus the step value divided by the step value. In the case of unit
step, the overshoot is just the maximum value of the step response minus one.
M p=e−πζ / √ 1−ζ
2
Peak Time:
The time taken by the system to achieve the peak value in the step response.
π
T p=
ωd
Figure 3.2 Rise time, peak time, settling time and overshoot analysis of a step response function
Lab Task 1:
Lab Task:
Q2.a) Take the step response of the following Second-Order Transfer functions and determine
the system stability using MATLAB
Q2.c) How these transient response specifications can be improved? Proof it using MATLAB.
(Hint: Feedback)
Q2.d) Plot graphs using Simulink for open loop and closed loop for Step Response and Impulse
Response for all
25
G(s) =
( s¿¿ 2+10 s+25)¿
Input:
num=[25];
denum=[1 10 25];
sys=tf(num,denum)
step(sys)
stepinfo(sys)
[z,p]=tf2zp(num,denum)
Output:
sys =
25
---------------
s^2 + 10 s + 25
Continuous-time transfer function.
ans =
RiseTime: 0.6717
SettlingTime: 1.1668
SettlingMin: 0.9008
SettlingMax: 0.9999
Overshoot: 0
Undershoot: 0
Peak: 0.9999
PeakTime: 2.3900
z =
Empty matrix: 0-by-1
p =
-5
-5
Simulink Model
a) How can transient response specifications improve?
Simulink Model:
i) Step Response:
500
G(s) =
( s¿¿ 2+14.14 s+ 25)¿
Input:
num=[500];
denum=[1 14.14 25];
sys=tf(num,denum)
step(sys)
stepinfo(sys)
[z,p]=tf2zp(num,denum)
Output:
sys =
500
------------------
s^2 + 14.14 s + 25
Continuous-time transfer function.
ans =
RiseTime: 1.0878
SettlingTime: 1.9794
SettlingMin: 18.0139
SettlingMax: 19.9679
Overshoot: 0
Undershoot: 0
Peak: 19.9679
PeakTime: 3.1977
z =
Empty matrix: 0-by-1
p =
-12.0685
-2.0715
Simulink Model
500
G(s) =
( s¿¿ 2+10 s+500) ¿
Input:
num=[500];
denum=[1 10 500];
sys=tf(num,denum)
step(sys)
stepinfo(sys)
[z,p]=tf2zp(num,denum)
Output:
sys =
500
----------------
s^2 + 10 s + 500
ans =
RiseTime: 0.0553
SettlingTime: 0.7561
SettlingMin: 0.7639
SettlingMax: 1.4852
Overshoot: 48.5150
Undershoot: 0
Peak: 1.4852
PeakTime: 0.1474
z =
num=[25];
denum=[1 0 25];
sys=tf(num,denum)
step(sys)
stepinfo(sys)
[z,p]=tf2zp(num,denum)
sys =
25
--------
s^2 + 25
Simulink Model
Figure.3.6 Simulink Model
100 s
G(s) =
( s¿¿ 2−25)¿
Input:
num=[100 0];
denum=[1 0 -25];
sys=tf(num,denum)
step(sys)
stepinfo(sys)
[z,p]=tf2zp(num,denum)
Output:
sys =
100 s
--------
s^2 - 25
Continuous-time transfer function.
ans =
RiseTime: NaN
SettlingTime: NaN
SettlingMin: NaN
SettlingMax: NaN
Overshoot: NaN
Undershoot: NaN
Peak: Inf
PeakTime: Inf
z=
0
p=
5
-5
Simulink Model
Figure.3.7 Simulink Model
Y (s) 30 (s−6)
=
X (s) s (s 2 +4 s+ 13)
Q3.d) Use MATLAB to plot the altitude time history for a 1 degree impulsive elevator input Compare
your result with analytical solution. . Explain the response.
Input:
num=[0 30 180];
denum=[1 4 13 0];
sys=tf(num,denum)
step(sys)
stepinfo(sys)
[z,p]=tf2zp(num,denum)
% Step response
t = 0:0.01:10; % Time vector
impulse_response = impulse(sys, t); % Impulse response
% Plotting
figure;
plot(t, impulse_response, 'b', 'LineWidth', 2);
xlabel('Time');
ylabel('Altitude');
title('Altitude Time History (Impulsive Elevator Input)');
grid on;
% Analytical Solution
t_analytical = 0:0.01:10; % Time vector for analytical solution
altitude_analytical = 30*(1 - exp(-6*t_analytical)); % Analytical solution
hold on;
plot(t_analytical, altitude_analytical, 'r--', 'LineWidth', 2);
legend('MATLAB Solution', 'Analytical Solution');
Output:
sys =
30 s + 180
------------------
s^3 + 4 s^2 + 13 s
Continuous-time transfer function.
ans =
RiseTime: NaN
SettlingTime: NaN
SettlingMin: NaN
SettlingMax: NaN
Overshoot: NaN
Undershoot: NaN
Peak: Inf
PeakTime: Inf
z=
-6
p=
0.0000 + 0.0000i
-2.0000 + 3.0000i
-2.0000 - 3.0000i
Simulink Model
Observations/Analysis:
Write your analysis in the given space.
A step response is the response when the input is a step, i.e., when the
input is suddenly increased to a constant value. And impulse response is
to an impulsive input, i.e., an input that occurs for a brief instant of time.
A poles and zeros map shows the stability of the system. If the poles lie
in the quadrants to the right of the origin, the system is unstable
whereas if the poles lie in the quadrants to the left of the origin, the
system is stable.
As feedback is introduced, poles move towards the left, i.e., the stable
region. This means the system begins to stabilize
Ramp Response:
Impulse Response:
Step input= the system's response will show overshoot and settling to a new equilibrium.
Impulse input=the system's response will show a sharp peak followed by decaying oscillations
due to the inertia and damping.
Ramp input= the system's response will steadily increase without overshooting or oscillating,
reflecting a steady-state behavior.
b. For the given car suspension system, find the displacement of the car with respect to the impulse
as well as step input.
Evaluation Criteria:
Lab Instructor: