You are on page 1of 7

Experiment No: 01

Name of Experiment: Study of unit step response of a control system simulated on a pc


using the 'MATLAB' software.
Objective:
 To determine the output response C(t) of a system for a unit step input r(t)=1.0 and
display the same in time-domain graphically.
 To determine various criteria of time-domain response such as undammed natural
frequency Wn, damping ratio ᶘ, frequency of damped oscillation W d, peak
overshoot Cp, time to reach the peak overshoot t p, per unit overshoot Mo, settling
time ts.
 To observe the effects of varying system parameters or gain upon the response.
Procedures: Let's see the following closed-loop system

Fig. 1: Block diagram of a negative-feedback system


1.From the program menu click on the icon "MATLAB'. A command window will be
opened and >> sign will be automatically displayed for the "MATLAB' users.
2. Consider the following system.
1
G ( s )= 2 ; H(S) = 0 or 1
s + 0.4 s +1
3.Give the value of forward transfer function as follows:
>>G1=tf([co-efficient of sn sn-1…...s0 of the numerator], [co-efficient of sn sn-1.....s0
of the denominator])
4.If feedback is present, give the value of feedback transfer function as follows:
>>H=tf([co-efficientof sn sn-1…...s0 of the numerator], [co-efficient of sn sn-1 .....s0 of the
denominator])
5. Overall Transfer Function
>>G=G1/(1+G1*H);
6. Find the undamped natural frequencyWn using the command and damping ratio Z for
the defined system
>> [Wn,Z]=damp(G);
whereWn stores the value of and Z stores. Write down these values in your notebook.
7.Define the time axis for C(t) vst from 0 to 35 seconds at an interval of 0.1 seconds as
follows
>>t=0:0.1:35;
8. To compute C(t) at the defined times use the command
>>y=step (G, t);
where the vector y stores the response values.
9. Plot and display response C(t) vs t on the screen using the command >>plot(t,y) or
plot(y)
The plot can be made to have grid, title, x-axis label and y-axis label.
10. These all commands can be written in an M-file named Exp1. m. Later, this program
can be run in the command window by simply from tool menu.
MATLAB-M File
clc
% close figure
close all
G1=tf(1,[1 0.4 1]);
H=tf([1],[0 0.04 1]);
Rajib=G1/(1+G1*H)
[W Z]=damp(Rajib);
t=0:.1:30;
y=step(Rajib,t);
plot(t,y);
grid on;
title('Unit step response');
xlabel ('Time in seconds' );
ylabel ('Response C(t)');

11. Estimate from system’s response curve, the frequency of damped oscillation W d, peak
overshoot Cp, time to reach the peak overshoot t p, steady-state value Css, per unit
Cp−Css
overshoot Mo = , settling time ts, (time to reach and stay within 2% of the final
Css
steady-state value).

Calculations:
−ζ π −0.2∗3.14
√1−ζ 2 √1−0.22
C p=1+ e =1+e =1.5266

π π
t p= = =3.2
ω n √1−ζ 2 1∗√1−0.22

4 4
t s= = =20
ζ∗ω n 0.2∗1

MATLAB plots for various Damping ratios:

unit step response


0.9

0.8

0.7

0.6

0.5
C(T)

0.4

0.3

0.2

0.1

0
0 50 100 150 200 250 300 350 400
time in seconds

fig: forζ =0.4


unit step response
0.9

0.8

0.7

0.6

0.5
C(T)

0.4

0.3

0.2

0.1

0
0 50 100 150 200 250 300 350 400
time in seconds

fig: forζ =0.2

unit step response


0.8

0.7

0.6

0.5
C(T)

0.4

0.3

0.2

0.1

0
0 50 100 150 200 250 300 350 400
time in seconds

fig: forζ =0.6


unit step response
0.7

0.6

0.5

0.4
C(T)

0.3

0.2

0.1

0
0 50 100 150 200 250 300 350 400
time in seconds

fig: forζ =0.8


Table:
Graphically Theoretically
ζ Cp tp ts M0 ζ Cp tp ts M0
0.2 0.9002 2.24 38.22 0.8 0.2 1.527 3.2 20 2.053
0.4 0.8192 2.26 18.52 0.638 0.4 1.254 3.43 10 1.508
0.6 0.753 2.28 12.08 0.506 0.6 1.095 3.927 6.673 1.189
0.8 0.698 2.32 9.74 0.396 0.8 1.015 5.236 5 1.03
Study of System Response in Simulink:

System response for unit step function can be also studied by MATLAB Simulink as shown
below.

Simulink Model:

Scope View:

Fig:10
This can be plotted on MATLAB by using following Command in Command Window.
From that we can edit the plot for our requirement.
>> plot(t,y)
Discussion:

A transfer function representation in MATLAB is a convenient way to represent a linear, time-


invariant system in terms of its input-output relationship. Transfer functions are frequently used
in block diagram representations of systems and are popular for performing time-domain and
frequency-domain analyses and controller design. The key advantage of transfer functions is that
they allow engineers to use simple algebraic equations instead of complex differential equations
for analyzing and designing systems.

The response of a system (with all initial conditions equal to zero at t=0 -, i.e., a zero state
response) to the unit step input is called the unit step response. From a practical standpoint,
knowing how the system responds to a sudden input is important because large and possibly fast
deviations from the long term steady state may have extreme effects on the component itself and
on other portions of the overall system dependent on this component. In addition, the overall
system cannot act until the component's output settles down to some vicinity of its final state,
delaying the overall system response. Formally, knowing the step response of a dynamical
system gives information on the stability of such a system, and on its ability to reach one
stationary state when starting from another.

You might also like