Manual - Control System Lab
Manual - Control System Lab
Required Hardware/Software:-
Brief Theory:
MATLAB has various tool boxes and some of them are given below:
MATLAB has a rich collection of functions immediately useful to the control engineer or
system theorist. Complex arithmetic, eigenvalues, root-finding, matrix inversion, and FFTs
are just a few examples of MATLAB’s important numerical tools. More generally,
MATLAB’s linear algebra, matrix computation, and numerical analysis capabilities provide a
reliable foundation for control system engineering as well as many other disciplines. The
Control System Toolbox builds on the foundations of MATLAB to provide functions
designed for control engineering. The Control System Toolbox is a collection of algorithms,
written mostly as M-files that implement commonly.
Control system design, analysis, and modeling techniques are convenient graphical user
interfaces (GUI’s) simplify typical control engineering tasks. Control systems can be
modelled as transfer functions, in zero-pole-gain, or state-space form, allowing you to use
both classical and modern control techniques. You can manipulate both continuous-time and
discrete-time systems. Conversions between various model representations are provided.
Time responses, frequency responses, and root loci can be computed and graphed. Other
functions allow pole placement, optimal control, and estimation. Finally, the Control System
Toolbox is open and extensible. We can create custom M-files to suit particular application.
1. clc (Remove items from workspace, freeing up system memory) clears all input and
output from the Command Window display, giving "clean screen." After using clc,
the scroll bar cannot be used to see the history of functions, but still the up arrow can
be used to recall statements from the command history.
2. close (Remove specified figure): close deletes the current figure or the specified
figure(s). It optionally returns the status of the close operation.
3. xlabel, ylabel, zlabel (Label x-, y-, and z-axis) : Each axes graphics object can have
one label for the x-, y-, and z-axis. The label appears beneath its respective axis in a
two-dimensional plot and to the side or beneath the axis in a three-dimensional plot.
xlabel('string') labels the x-axis of the current axes.
ylabel(...) and zlabel(...) label the y-axis and z-axis, respectively, of the current
axes.
4. title( Add title to current axes) : Each axes graphics object can have one title. The title
is located at the top and in the center of the axes.
title('string') outputs the string at the top and in the center of the current axes.
5. subplot (Create axes in tiled positions): subplot divides the current figure into
rectangular panes that are numbered row wise. Each pane contains an axes object.
Subsequent plots are output to the current pane.
subplot(2,1,1), plot(income)
subplot(2,1,2), plot(outgo) plots income on the top half of the window and outgo on
the bottom half.
r = roots(p) which returns a column vector whose elements are the roots of the polynomial
specified by the coefficients row vector p. For vectors, roots and poly are inverse
functions of each other, up to ordering, scaling, and round off error.
P = angle(Z) returns the phase angles, in radians, for each element of complex array
Z. The angles lie between + π and – π.
1. Bode Plot
Ex: Create a Bode plot of the following continuous-time SISO dynamic system.
2. Nyquist Plot
Ex: Plot the Nyquist response of the system
Conclusion: Overview of different toolboxes in MATLAB was done and detail introduction
of control system toolbox was studied.
Experiment No. 2
Required Hardware/Software:-
Brief Theory:-
Matrix algebra approach is a useful means for compact representation of lengthy and sometimes
complex formulas. A matrix is a rectangular array of elements arranged in horizontal rows and
vertical columns. The number of rows and columns may vary from one matrix to another, so we
conveniently describe the size of a matrix by giving its dimension, that’s the number of its rows
and columns. A matrix is said to have size n x m, read “n by m” if it has n rows (horizontal lines)
and m columns (vertical lines). The number of rows is always stated first. A square matrix is one
for which m=n. The most direct way to create a matrix in MATLAB is to type the entries in the
matrix between square brackets one row at a time. To enter a matrix, use commas on the same
row, and semicolons to separate columns.
Program:
Output:
4 -6 4
3 0 4
2 -3 3
Conclusion:- Using MATLAB program, transpose and inverse values of given matrix was
calculated.
Experiment No.:3
Objective:- Plot the pole-zero configuration in s-plane for the given transfer function.
Required Hardware/Software:-
Brief Theory:-
pzmap creates a pole-zero plot of the system. For SISO systems, pzmap plots the transfer
function poles and zeros. The poles are plotted as x's and the zeros are plotted as o's.
Pole-zero plot can be used to check whether system is stable or not. It can also be used to predict
that out of more than one system, which system will be relatively more stable.
Matlab Program:
Conclusion:- Using MATLAB, pole-zero plot of given system was successfully drawn.
.
Experiment No.:4
Objective:- Determine the transfer function for given closed loop system in block diagram
representation.
Required Hardware/Software:-
Brief Theory:-
For knowing stability of overall close loop control system, it is essential to know overall transfer
function. For knowing overall transfer function of any close loop control system, we apply rules
of block diagram reduction techniques. Using MATLAB also, we can find out overall transfer
function of any close loop control system.
Matlab Program:
clc;
clear all;
close all;
G1NUM=[1 1];
G1DEN=[1 5];
G2NUM=[1 0 1];
G2DEN=[1 3 7];
G3NUM=[1 0];
G3DEN=[1 10];
G4NUM=[1 20];
G4DEN=[1 1];
H1NUM=[1 4];
H1DEN=[1 7];
G1=tf(G1NUM,G1DEN);
G2=tf(G2NUM,G2DEN);
G3=tf(G3NUM,G3DEN);
G4=tf(G4NUM,G4DEN);
H1=tf(H1NUM,H1DEN);
T1=series(G1,G2)
T2=parallel(T1,G4)
T3=series(T2,G3)
T_final=feedback(T3,H1,-1)
Output
T1 =
s^3 + s^2 + s + 1
-----------------------
s^3 + 8 s^2 + 22 s + 35
Continuous-time transfer function.
T2 =
2 s^4 + 30 s^3 + 184 s^2 + 477 s + 701
--------------------------------------
s^4 + 9 s^3 + 30 s^2 + 57 s + 35
Continuous-time transfer function.
T3 =
2 s^5 + 30 s^4 + 184 s^3 + 477 s^2 + 701 s
----------------------------------------------
s^5 + 19 s^4 + 120 s^3 + 357 s^2 + 605 s + 350
Continuous-time transfer function.
T_final =
2 s^6 + 44 s^5 + 394 s^4 + 1765 s^3 + 4040 s^2 + 4907 s
--------------------------------------------------------------
3 s^6 + 64 s^5 + 557 s^4 + 2410 s^3 + 5713 s^2 + 7389 s + 2450
Continuous-time transfer function.
Result:- Using MATLAB, transfer function for given closed loop system in block diagram
representation was determined.
Experiment No.:5
Objective:- Plot unit step response of given transfer function and find rise time, peak time
and peak overshoot .
Required Hardware/Software:-
2. PC 8GB RAM
Brief Theory: In electronics engineering and control theory, step response is the time behavior
of the outputs of a general system when its inputs change from zero to one in a very short time.
The concept can be extended to the abstract mathematical notion of a dynamical system using
an evolution parameter.
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.
Circuit Diagram:
Matlab Program
clc;
clear all;
close all;
num=[1 4 7]
den=[3 5 7 8]
H=tf(num,den)
step(H)
grid on
num =
1 4 7
den =
3 5 7 8
system =
s^2 + 4 s + 7
-----------------------
3 s^3 + 5 s^2 + 7 s + 8
Continuous-time transfer function.
Result: We have plot the unit step response of given transfer function and also find out the rise
time, peak time and peak overshoot.
Experiment No.: 8
Required Hardware/Software:-
Brief Theory:- The use of state space approach for the analysis of the control systems enables to
overcome the shortcomings of transfer function approach. The state of a dynamic system is the
smallest number of variables (called state variables) such that the knowledge of these variables at
t=to, together with the knowledge of the input for t=to, completely determine the behavior of the
system for any time t > to. State variables need not be physically measurable or observable
quantities.
In this experiment, command used for the creation of create state space model of a linear
continuous system is sys=ss(A,B,C,D)
MATLAB Program
B=[0;3];
C=[0 1];
D=[0];
sys=ss(A,B,C,D)
Result:
A=
x1 x2
x1 0 1
x2 -5 -2
B=
u1
x1 0
x2 3
C=
x1 x2
y1 0 1
D=
u1
y1 0
Conclusion: State space model of a linear continuous system was successfully created.
Experiment No.: 9
Objective:- To determine the state space representation of the given transfer function.
Required Hardware/Software:-
Brief Theory:- The use of state space approach for the analysis of the control systems enables to
overcome the shortcomings of transfer function approach. The state of a dynamic system is the
smallest number of variables (called state variables) such that the knowledge of these variables at
t=to, together with the knowledge of the input for t=to, completely determine the behavior of the
system for any time t > to. State variables need not be physically measurable or observable
quantities.
In this experiment, command used for the representation of the given transfer function into state
space model is [A,B,C,D] = tf2ss(b,a) where ‘b’ and ‘a’ are coefficients numerator and
denominator of the given transfer function.
b = [0 0 1];
a = [1 2 5];
[A,B,C,D] = tf2ss(b,a)
Result:
A=
-2 -5
1 0
B=
0
C=
0 1
D=
Conclusion: State space representation of the given transfer function was evaluated and verified.
Experiment No.: 10
Required Hardware/Software:-
Brief Theory:- In control theory and stability theory, root locus analysis is a graphical method for
examining how the roots of a system change with variation of a certain system parameter, commonly a
gain within a feedback system. This is a technique used as a stability criterion in the field of classical
control theory developed by Walter R. Evans which can determine stability of the system. The root locus
plots the poles of the closed loop transfer function in the complex s-plane as a function of a gain
parameter.
Stability of a closed-loop control system is determined from the location of the root of the
characteristics equation 1 + G(s)H(s) = 0. For a system to be stable, the roots of its characteristics
equation should be located in L.H.S. of a plane.
MATLAB Program
num = [2 5 1]
den = [1 2 3]
h = tf(num,den)
rlocus(h)
Graph: