CSE Labmanul and Assignment
CSE Labmanul and Assignment
CONTROL SYSTEMS
(3131101)
Certificate
Place: __________
Date: __________
Course Outcomes:
After learning the course the students should be able to:
Sr. CO statement
No.
CO-1 Analyze and Evaluate system behavior in time and frequency domains
based on the mathematical model of the system.
CO-2 Apply control theory to linear system for system modeling using
differential equations and transfer function realizations.
CO-3 Analyze and apply all the stability techniques for closed loop
system
performance parameters.
CO-4 Comprehend the need of different types of controllers and
compensators to obtain the required dynamic response of the system.
CO-5 Synthesis system equations for state space models of linear systems.
Preface
Main motto of any laboratory/practical/field work is for enhancing required skills as well as
creating ability amongst students to solve real time problem by developing relevant
competencies in psycho-motor domain. By keeping in view, GTU has designed competency
focused outcome-based curriculum for engineering degree programs where sufficient weightage
is given to practical work. It shows importance of enhancement of skills amongst the students
and it pays attention to utilize every second of time allotted for practical amongst students,
instructors and faculty members to achieve relevant outcomes by performing the experiments
rather than having merely study type experiments. It is must for effective implementation of
competency focused outcome-based curriculum that every practical is keenly designed to serve
as a tool to develop and enhance relevant competency required by the various industry among
every student. These psycho-motor skills are very difficult to develop through traditional chalk
and board content delivery method in the classroom. Accordingly, this lab manual is designed
to focus on the industry defined relevant outcomes, rather than old practice of conducting
practical to prove concept and theory.
By using this lab manual students can go through the relevant theory and procedure in advance
before the actual performance which creates an interest and students can have basic idea prior to
performance. This in turn enhances pre-determined outcomes amongst students. Each
experiment in this manual begins with competency, industry relevant skills, course outcomes as
well as practical outcomes (objectives). The students will also achieve safety and necessary
precautions to be taken while performing practical.
This manual also provides guidelines to faculty members to facilitate student centric lab
activities through each experiment by arranging and managing necessary resources. It also gives
an idea that how students will be assessed by providing rubrics.
Utmost care has been taken while preparing this lab manual along with assignments
however always there is chances of improvement. Therefore, we welcome constructive
suggestions for improvement and removal of errors if any. Also this is a suggested list of
Experiments/Assignments, faculty may modify & add as per the feasibility and the
resources available change & update in any part/program or else as per the requirement.
CONTROL SYSTEMS (3131101)
Sr. CO CO CO CO CO
Objective(s) of Experiment
No. 1 2 3 4 5
Plot the various continuous time signals using
1. √
MATLAB.
Plot the various discrete time signals using
2. √
MATLAB.
To plot the continuous time signals & discrete
3. time signals (Mathematical Functions like sin, √
cos, etc.) using MATLAB.
To evaluate transfer function model using
4. √
different MATLAB SYNTAX.
To perform block diagram reduction using
5. √
MATLAB commands.
Reduce the block diagram using MATLAB
6. √
function.
Using Simulink check Step function and
7. impulse function and verify with MATLAB √
code.
To plot Root Locus of different system using
8. √
MATLAB.
11. Assignment 1 √ √
12. Assignment 2 √ √
13. Assignment 3 √ √ √
CONTROL SYSTEMS (3131101)
Sr.
Objective(s) of Experiment Date Sign
No.
Plot the variouscontinuous time signals using
1.
MATLAB.
Plot the various discrete time signals using
2.
MATLAB.
To plot the continuous time signals & discrete time
3. signals (Mathematical Functions like sin, cos, etc.)
using MATLAB.
To evaluate transfer function modelusing
4.
different MATLAB SYNTAX.
To perform block diagram reduction using
5.
MATLAB commands.
Reduce the block diagram usingMATLAB
6.
function.
Using Simulink check Step function and impulse
7.
function and verify withMATLAB code.
To plot Root Locus of different systemusing
8.
MATLAB.
11. Assignment 1
12. Assignment 2
13. Assignment 3
Guidelines for Faculty members
1. Teacher should provide the guideline with demonstration of MATLAB/SCILAB based program to the
students with all features positively.
2. Teacher shall explain basic concepts/theory related to the experiment to the students before starting of
each practical.
3. Involve all the students in performance of each practical.
4. Teacher is expected to share the skills and competencies to be developed in the students and ensure that
the respective skills and competencies are developed in the students after the completion of the
experimentation.
5. Teachers should give opportunity to students for hands-on experience after the demonstration.
6. Teacher may provide additional knowledge and skills to the students even though not covered in the
manual but are expected from the students by concerned industry.
7. Give practical assignment and assess the performance of students based on task assigned to check
whether it is as per the instructions or not.
8. Teacher is expected to refer complete curriculum of the course and follow the guidelines for
implementation.
Sr. No. Objective(s) of Experiment Page Date of Date of Assessm Sign. of Remar
No. perfor submis ent Teacher ks
mance sion Marks with
date
Plot the variouscontinuous time
1.
signals using MATLAB.
Plot the various discrete time signals
2.
using MATLAB.
To plot the continuous time signals &
discrete time signals (Mathematical
3.
Functions like sin, cos, etc.) using
MATLAB.
To evaluate transfer function model
4.
using different MATLAB SYNTAX.
To perform block diagram reduction
5.
usingMATLAB commands.
Reduce the block diagram using
6.
MATLAB function.
Using Simulink check Step function
7. and impulse function and verify with
MATLAB code.
To plot Root Locus of different system
8.
using MATLAB.
To plot bode plot using MATLAB
9.
functions.
To perform PID controller using
10.
MATLAB Simulink.
11. Assignment 1
12. Assignment 2
13. Assignment 3
Total
EXPERIMENT: - 1
2. Subplot: - subplot function can show more than 1 graph in the output window
at the same time.
Subplot function takes three parameters, the first is number of rows the
second is number of columns and the third is graph number.
Function syntax: subplot(rows, columns, no. of graph)
MATLAB code: -
n=-5:1:5;
y=(n==2)
subplot (3,1,1)
plot(n,y)
xlabel('t')
ylabel('u(t)')
n=0:0.5:10;
y=(n>=3)
subplot (3,1,2)
plot (n,y)
xlabel('t')
ylabel('u(t)')
n=0:1:10;
y=n;
subplot (3,1,3)
plot(n,y)
xlabel('x')
ylabel('y')
output: -
EXPERIMENT: - 2
MATLAB code: -
n=0:0.2:10;
y=(n==4);
subplot (3,1,1)
stem(n,y)
xlabel('t')
ylabel('u(t)')
n=0:0.2:10;
y=(n>=5);
subplot (3,1,2)
stem(n,y)
xlabel('t')
ylabel('u(t)')
n=-5:0.2:5;
y=n;
subplot (3,1,3)
stem(n,y)
xlabel('x')
ylabel('y')
Output: -
EXPERIMENT: - 3
AIM: - To plot the continuous time signals & discrete time signals (Mathematical Functions
like sin, cos, etc.) using MATLAB.
MATLAB functions: -
MATLAB code: -
t=0:0.2:20;
y =exp(t);
subplot (4,2,1);
plot(y,'r');
title('exponential');
subplot (4,2,2);
stem(y,'r');
title ('exponential discrete');
t=0:0.2:20;
y=sin(t);
subplot (4,2,3);
plot(y,'g');
title('sin');
subplot (4,2,4);
stem(y,'g');
title ('sine discrete');
t=0:0.2:20;
y=cos(t);
subplot (4,2,5);
plot(y,'b');
title('cos');
subplot (4,2,6);
stem(y,'b');
title ('cos discrete');
t=-1.5:0.1:1.5;
y=tan(t);
subplot (4,2,7);
plot(y,'y');
title('tan');
subplot (4,2,8);
stem(y,'y');
title ('tan discrete');
OUTPUT: -
EXPERIMENT 4
Aim: - To evaluate transfer function modelusing different MATLAB SYNTAX.
MATLAB Functions: -
2. tf2zpk: - this function returns value of zeros, poles, and gain of input transfer
function.
Function syntax: [z, p, k] = tf2zpk (num, den)
3. zp2tf: - function zp2tf is use for conversion of zero, poles, and gain to transfer
function.
Function syntax: [num, den] = zp2tf (z, p, k)
6. pzmap: - pzmap computes the poles and zeros of the dynamic system and plots
them in the complex plane. The poles are plotted as x's and the zeros are plotted
as o's.
Function syntax: pzmap (num, dem)
[p, z] = pzmap(sys) returns the poles and zeros of the system in two
column vectors p and z. No plot is drawn on the screen.
Part A
Aim: - To get transfer function using tf function.
Input: -
num = input ('enter numerator')
den = input ('enter denotator')
sys = tf (num, den)
Output: -
enter numerator [ 4 5 6]
num =
4 5 6
enter denotator [ 8 3 4 2]
den =
8 3 4 2
sys =
4 s^2 + 5 s + 6
8 s^3 + 3 s^2 + 4 s + 2
Part B
Aim: - To get all zeros, poles, and gain value from the transfer function.
Input: -
num = input ('enter numerator')
den = input ('enter denotator')
sys = tf (num, den)
[z, p, k] = tf2zpk (num, den)
Output: -
enter numerator [ 2 3 6 1]
num =
2 3 6 1
enter denotator [ 1 5 9 6 3]
den =
1 5 9 6 3
sys =
2 s^3 + 3 s^2 + 6 s + 1
z=
0.0000 + 0.0000i
-0.6595 + 1.5252i
-0.6595 - 1.5252i
-0.1811 + 0.0000i
p=
-2.1726 + 0.9491i
-2.1726 - 0.9491i
-0.3274 + 0.6531i
-0.3274 - 0.6531i
k=
Part C
Aim: - To get transfer function from the value of zeros, poles, and gain.
Input: -
z = input ('Enter the value of Zeros:')
p = input ('Enter the value of poles:')
k = input ('Enter the value of k:')
sys = tf (num, den)
rev = zpk (z, p, k)
Output: -
Enter the value of Zeros: [ 1 2 3]
z=
1 2 3
Enter the value of poles: [2 6 7 3]
p=
2 6 7 3
k=
2
sys =
2 s^3 + 3 s^2 + 6 s + 1
rev =
Part D
Aim: - To find roots of the transfer function and print graph on pzmap.
Input: -
num = input ('enter numerator')
den = input ('enter denotator')
sys = tf (num, den)
poles = roots(den)
zeros = roots(num)
pzmap (num, den)
Output: -
enter numerator [ 26 35 22 20]
num =
26 35 22 20
11 25 36 34 40
sys =
26 s^3 + 35 s^2 + 22 s + 20
poles =
-1.2680 + 0.9262i
-1.2680 - 0.9262i
0.1317 + 1.2073i
0.1317 - 1.2073i
zeros =
-1.1811 + 0.0000i
-0.0825 + 0.8028i
-0.0825 - 0.8028i
EXPERIMENT 5
Aim: - To perform block diagram reduction usingMATLAB commands.
MATLAB Function: -
1. Series: - series function can do Series connection of two input/output
models.
Function syntax: M = series (M1, M2, OUTPUTS1, INPUTS2)
Part A
Aim: - use series function to reduce given block diagram.
Input:
num1 = input ('enter the value of numerator :')
den1 = input ('enter the value of denominator :')
num2 = input ('enter the value of numerator :')
den2 = input ('enter the value of denominator :')
[num12, den12] = series (num1, den1, num2, den2)
printsys (num12, den12);
Output:
enter the value of numerator: [1 0]
num1 =
1 0
enter the value of denominator: [9 17]
den1 =
9 17
enter the value of numerator:9*[1 3]
num2 =
9 27
enter the value of denominator: [2 9 27]
den2 =
2 9 27
num12 =
0 9 27 0
den12 =
18 115 396 459
num/den =
9 s^2 + 27 s
Output
num1 =
1 0
den1 =
9 17
num2 =
9 27
den2 =
2 9 27
num12 =
9 27 0
den12 =
18 115 396 459
num/den =
9 s^2 + 27 s
Input:
num1 = input ('enter the value of numerator:')
den1 = input ('enter the value of denominator:')
num2 = input ('enter the value of numerator:')
den2 = input ('enter the value of denominator:')
[num12, den12] = parallel (num1, den1, num2, den2)
printsys (num12, den12)
Output:
enter the value of numerator: [1 2]
num1 =
1 2
enter the value of denominator: [1 2 3]
den1 =
1 2 3
enter the value of numerator: [1 3]
num2 =
1 3
enter the value of denominator: [1 -4 1]
den2 =
1 -4 1
num12 =
0 2 3 2 11
den12 =
1 -2 -4 -10 3
num/den =
2 s^3 + 3 s^2 + 2 s + 11
Input:
num = 9;
den = [1 5]
[numcl, dencl] = cloop (num, den, -1);
Printsys (numcl, dencl)
Output:
num =
9
den =
1 5
num/den =
9
s + 14
Part D
Aim: - If the feedback is not unity then we can use feedback command to simplify
the canonical form.
Input:
num1 = input ('enter the value of numerator:')
den1 = input ('enter the value of denominator:')
num2 = input ('enter the value of numerator:')
den2 = input ('enter the value of denominator:')
[numcl, dencl] = feedback (num1, den1, num2, den2, -1)
Printsys (numcl, dencl)
Output:
enter the value of numerator:[1]
num1 =
1
enter the value of denominator: [1 1]
den1 =
1 1
enter the value of numerator: [2]
num2 =
2
enter the value of denominator: [1 0]
den2 =
1 0
numcl =
0 1 0
dencl =
1 1 2
num/den =
s
s^2 + s + 2
EXPERIMENT: - 6
Aim: - Reduce the block diagram using MATLAB function.
Question. 1
1
s2
1
s
Input
numk = 10;
denk = 1;
num1 = 1;
den1 = [1 1];
numf1 = 1;
denf1 = [1 2];
numf2 = 1;
denf2 = [1 0];
output
sys1 =
s+1
sys2 =
10
s+1
sys3 =
10 s + 20
s^2 + 3 s + 12
sys =
10 s^2 + 20 s
s^3 + 3 s^2 + 22 s + 20
Input
numk = -10;
denk = 1;
num1 = [7 7];
den1 = [1 3 0];
num2 = 1;
den2 = [1 2 1];
output
sys1 =
7s+7
s^2 + 3 s
sysk1 =
-70 s - 70
s^2 + 3 s
sys12 =
sysf =
s^6 - 63 s^5 - 331 s^4 - 743 s^3 - 889 s^2 - 551 s - 140
Question. 3
Input
num1 = 1
den1 = [1 3]
num2 = 2
den2 = [1 1]
num3 = 1
den3 = [1 0]
numf1 = 0.3
denf1 = 1
numf2 = 0.4
denf2 = 1
numk = 10
denk = 1
sys = tf(num,den)
Output
sys1 =
10
s+3
10
s+6
sys3 =
20
s^2 + 7 s + 6
sys4 =
20
s^2 + 7 s + 14
sys =
20
s^3 + 7 s^2 + 14 s
1. Step Function
Simulink Diagram
Output
2. Impulse Function
Simulink Diagram
Output
MATLAB Code
num = input ('Enter the value of Numerator:')
t = tf (num, den)
subplot (2,1,1)
stepplot(t)
subplot (2,1,2)
impulseplot(t)
Output
Enter the value of Numerator:[1]
num =
den =
4 2 5
t=
4 s^2 + 2 s + 5
rlocus (sys, k): - rlocus (SYS, K) uses a user-specified vector K of gain values.
rlocus (sys1, sys2, …): - rlocus (SYS1, SYS2, …) draws the root loci of several
models SYS1, SYS2, ... on a single plot. You can specify a color, line style, and marker
for each model,
for example: rlocus (sys1,'r’, sys2,'y:’, sys3, 'b')
Part A
MATLAB Code
num = input ('Enter the value of numerator:')
rlocus(s)
Output
Enter the value of numerator: [ 1 3 10]
num =
1 3 10
den =
1 4 105 202
s=
s^2 + 3 s + 10
s^3 + 4 s^2 + 105 s + 202
Part B
MATLAB Code
num = input ('Enter the value of numerator:')
den = input ('Enter the value of denominator:')
k = input ('Enter the value of gain')
s = tf (num, den)
r = rlocus (s, k)
rlocus (s, k)
Output
Enter the value of numerator: [ 1 2]
num =
1 2
den =
1 5 8 0 0
Enter the value of gain [10]
k=
10
s=
s+2
r=
-2.7286 + 0.7401i
-2.7286 - 0.7401i
0.2286 + 1.5652i
0.2286 - 1.5652i
Part C
MATLAB Code
num = input ('Enter the value of numerator:')
s = tf (num, den)
[r, k] = rlocus(s)
rlocus (s, k)
Output
Enter the value of numerator: [ 1 2]
num =
1 2
den =
1 5 8 0 0
s=
s+2
r=
1.0e+02 *
Columns 1 through 6
0.0000 + 0.0000i 0.0000 + 0.0001i 0.0000 + 0.0001i 0.0000 + 0.0001i 0.0000 +
0.0002i 0.0000 + 0.0002i
0.0000 + 0.0000i 0.0000 - 0.0001i 0.0000 - 0.0001i 0.0000 - 0.0001i 0.0000 - 0.0002i
0.0000 - 0.0002i
-0.0250 - 0.0132i -0.0250 - 0.0132i -0.0250 - 0.0132i -0.0250 - 0.0132i -0.0250 - 0.0132i
-0.0250 - 0.0132i
Columns 7 through 12
0.0000 - 0.0002i 0.0000 - 0.0002i 0.0000 - 0.0003i 0.0000 - 0.0003i 0.0000 - 0.0004i
0.0000 - 0.0004i
-0.0250 - 0.0132i -0.0250 - 0.0132i -0.0250 - 0.0132i -0.0250 - 0.0132i -0.0250 - 0.0132i
-0.0250 - 0.0132i
Columns 13 through 18
0.0000 - 0.0005i 0.0000 - 0.0006i 0.0000 - 0.0007i 0.0000 - 0.0008i 0.0000 - 0.0009i
0.0000 - 0.0010i
-0.0250 - 0.0132i -0.0250 - 0.0132i -0.0250 - 0.0132i -0.0250 - 0.0132i -0.0250 - 0.0132i
-0.0250 - 0.0132i
Columns 19 through 24
0.0000 - 0.0012i 0.0000 - 0.0014i 0.0000 - 0.0016i 0.0000 - 0.0018i 0.0000 - 0.0021i
0.0000 - 0.0024i
-0.0250 - 0.0132i -0.0250 - 0.0132i -0.0250 - 0.0132i -0.0250 - 0.0131i -0.0250 - 0.0131i
-0.0250 - 0.0131i
Columns 25 through 30
0.0001 + 0.0028i 0.0001 + 0.0033i 0.0001 + 0.0038i 0.0001 + 0.0044i 0.0002 +
0.0051i 0.0002 + 0.0059i
0.0001 - 0.0028i 0.0001 - 0.0033i 0.0001 - 0.0038i 0.0001 - 0.0044i 0.0002 - 0.0051i
0.0002 - 0.0059i
-0.0251 - 0.0130i -0.0251 - 0.0130i -0.0251 - 0.0129i -0.0251 - 0.0127i -0.0252 - 0.0126i
-0.0252 - 0.0124i
Columns 31 through 36
0.0003 - 0.0068i 0.0005 - 0.0079i 0.0006 - 0.0091i 0.0009 - 0.0105i 0.0013 - 0.0121i
0.0018 - 0.0140i
-0.0253 - 0.0121i -0.0255 - 0.0117i -0.0256 - 0.0112i -0.0259 - 0.0105i -0.0263 - 0.0097i
-0.0268 - 0.0086i
Columns 37 through 42
0.0024 - 0.0160i 0.0032 - 0.0182i 0.0036 - 0.0192i 0.0040 - 0.0202i 0.0040 - 0.0202i
0.0040 - 0.0202i
Columns 43 through 48
0.0042 + 0.0206i 0.0053 + 0.0232i 0.0067 + 0.0260i 0.0082 + 0.0291i 0.0099 +
0.0324i 0.0119 + 0.0361i
0.0042 - 0.0206i 0.0053 - 0.0232i 0.0067 - 0.0260i 0.0082 - 0.0291i 0.0099 - 0.0324i
0.0119 - 0.0361i
Columns 49 through 54
0.0140 + 0.0400i 0.0164 + 0.0443i 0.0190 + 0.0490i 0.0219 + 0.0542i 0.0251 +
0.0599i 0.0287 + 0.0661i
0.0140 - 0.0400i 0.0164 - 0.0443i 0.0190 - 0.0490i 0.0219 - 0.0542i 0.0251 - 0.0599i
0.0287 - 0.0661i
Columns 55 through 57
k=
1.0e+06 *
Columns 1 through 11
Columns 12 through 22
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000
Columns 23 through 33
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000
Columns 34 through 44
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000
Columns 45 through 55
0.0000 0.0000 0.0001 0.0001 0.0001 0.0001 0.0002 0.0003 0.0003 0.0005
0.0006
Columns 56 through 57
6.8615 Inf
Part D
MATLAB Code
num1 = input ('Enter the value of numerator1:')
s1 = tf (num1, den1)
s2 = tf (num2, den2)
Output
Enter the value of numerator1: [ 1 2]
num1 =
1 2
1 5 8 0 0
s1 =
s+2
num2 =
1 3 10
den2 =
1 4 105 202
s2 =
s^2 + 3 s + 10
bode (SYS, {WMIN, WMAX}): - bode (SYS, {WMIN, WMAX}) draws the Bode
plot for frequencies between WMIN and WMAX in radians/Time Unit (relative to
the time units specified in SYS. Time Unit, the default being seconds).\
bode (SYS, W): - bode (SYS, W) uses the vector W of frequencies (in
radians/Time Unit) to evaluate the frequency response. See LOGSPACE to generate
logarithmically spaced frequency vectors.
bode (SYS1, SYS2, ….., W): - bode(SYS1,SYS2,...,W) graphs the Bode response
of several systems SYS1,SYS2,... on a single plot. The frequency vector W is optional.
You can specify a color, line style, and marker for each model, for
Part A
Input
num=input (‘Enter the numerator:’)
bode (sys)
grid on
Output
Enter the numerator:
[20]
num =
20
[ 0.1 1.0 0]
den =
0.1000 1.0000 0
sys =
20
0.1 s^2 + s
grid on
Output
num1 =
20
den1 =
0.1000 1.0000 0
num2 =
80
Enter the denominator2: [1 22 40 0]
den2 =
1 22 40 0
sys1 =
20
0.1 s^2 + s
sys2 =
80
s^3 + 22 s^2 + 40 s
Part C
Input
num1=input ('Enter the numerator1:')
grid on
Output
num1 =
20
den1 =
0.1000 1.0000 0
num2 =
80
den2 =
1 22 40 0
sys1 =
20
0.1 s^2 + s
sys2 =
80
s^3 + 22 s^2 + 40 s
Part D
Input
num=input (‘Enter the numerator:’)
grid on
Output
Enter the numerator: [20]
num =
20
den =
0.1000 1.0000 0
sys =
20
0.1 s^2 + s
bode(sys)
grid on
Output
num = 20
den =
0.1000 1.0000 0
sys =
20
0.1 s^2 + s
Page | 54
mag(:,:,34) = 0.0544
mag(:,:,26) =
0.5803
3.6180 mag(:,:,43) =
mag(:,:,35) = 0.0400
mag(:,:,27) =
0.4398
2.9890 mag(:,:,44) =
mag(:,:,36) = 0.0293
mag(:,:,28) =
0.3307
2.4469 mag(:,:,45) =
mag(:,:,37) = 0.0215
mag(:,:,29) =
0.2471
1.9822 mag(:,:,46) =
mag(:,:,38) = 0.0158
mag(:,:,30) =
0.1837
1.5875 mag(:,:,47) =
mag(:,:,39) = 0.0115
mag(:,:,31) =
0.1361
1.2560 mag(:,:,48) =
mag(:,:,40) = 0.0085
mag(:,:,32) =
0.1005
0.9819 mag(:,:,49) =
mag(:,:,41) =
0.0062
mag(:,:,33) = 0.0740
0.7588 mag(:,:,50) =
mag(:,:,42) =
Page | 55
0.0045
phase(:,:,7) =
mag(:,:,59) =
mag(:,:,51) = -91.4615
2.7327e-04
0.0033
phase(:,:,8) =
mag(:,:,60) =
mag(:,:,52) = -91.7083
1.9999e-04
0.0024
phase(:,:,9) =
phase(:,:,1) =
mag(:,:,53) = -91.9967
-90.5729
0.0018
phase(:,:,10) =
phase(:,:,2) =
mag(:,:,54) = -92.3337
-90.6697
0.0013
phase(:,:,11) =
phase(:,:,3) =
mag(:,:,55) = -92.7275
-90.7829
9.5256e-04
phase(:,:,12) =
phase(:,:,4) =
mag(:,:,56) = -93.1874
-90.9151
6.9715e-04
phase(:,:,13) =
phase(:,:,5) =
mag(:,:,57) = -93.7245
-91.0697
5.1022e-04
phase(:,:,14) =
phase(:,:,6) =
mag(:,:,58) = -94.3515
-91.2504
3.7340e-04
Page | 56
phase(:,:,15) = -107.2295
-95.0832 phase(:,:,32) =
phase(:,:,24) =
-141.6477
phase(:,:,16) = -109.9262
-95.9363 phase(:,:,33) =
phase(:,:,25) =
-145.9069
phase(:,:,17) = -112.9652
-96.9302 phase(:,:,34) =
phase(:,:,26) =
-149.9273
phase(:,:,18) = -116.3517
-98.0866 phase(:,:,35) =
phase(:,:,27) =
-153.6483
phase(:,:,19) = -120.0727
-99.4301 phase(:,:,36) =
phase(:,:,28) =
-157.0348
phase(:,:,20) = -124.0931
-100.9872 phase(:,:,37) =
phase(:,:,29) =
phase(:,:,21) = -160.0738
-128.3523
-102.7867
phase(:,:,38) =
phase(:,:,30) =
phase(:,:,22) = -162.7705
-132.7662
-104.8580
phase(:,:,39) =
phase(:,:,31) =
phase(:,:,23) = -165.1420
-137.2338
Page | 57
phase(:,:,48) =
phase(:,:,40) = -178.9303
-176.2755
-167.2133
phase(:,:,57) =
phase(:,:,49) =
phase(:,:,41) = -179.0849
-176.8126
-169.0128
phase(:,:,58) =
phase(:,:,50) =
phase(:,:,42) = -179.2171
-177.2725
-170.5699
phase(:,:,59) =
phase(:,:,51) =
phase(:,:,43) = -179.3303
-177.6663
-171.9134
phase(:,:,60) =
phase(:,:,52) =
phase(:,:,44) = -179.4271
-178.0033
-173.0698 wout =
phase(:,:,53) = 1.0e+03 *
phase(:,:,45) =
-178.2917 0.0001
-174.0637 0.0001
0.0001
phase(:,:,54) = 0.0002
phase(:,:,46) = 0.0002
-178.5385 0.0002
-174.9168 0.0003
0.0003
phase(:,:,55) = 0.0003
phase(:,:,47) = 0.0004
-178.7496 0.0005
-175.6485 0.0006
0.0007
phase(:,:,56) = 0.0008
Page | 58
0.0009 0.0126 0.1796
0.0010 0.0148 0.2099
0.0012 0.0173 0.2454
0.0014 0.0202 0.2868
0.0017 0.0236 0.3353
0.0019 0.0276 0.3919
0.0023 0.0322 0.4582
0.0027 0.0377 0.5356
0.0031 0.0441 0.6261
0.0036 0.0515 0.7318
0.0042 0.0602 0.8555
0.0050 0.0704 1.0000
0.0058 0.0823
0.0068 0.0962
0.0079 0.1124
0.0092 0.1314
0.0108 0.1536
Page | 59
Part F
Input
num=input (‘Enter the numerator:’)
bode (sys)
grid on
Output
Enter the numerator:
[20]
num =
20
[0.1 1 0]
den =
0.1000 1.0000 0
sys =
Page | 60
20
0.1 s^2 + s
Page | 61
mag(:,:,13) = 9.3610
mag(:,:,24) =
19.9007
mag(:,:,19) = 3.2980
mag(:,:,14) = 7.9441
mag(:,:,25) =
17.7727
mag(:,:,20) = 2.7116
mag(:,:,15) = 6.7240
mag(:,:,26) =
15.1639
mag(:,:,21) = 2.2076
mag(:,:,16) = 5.6718
mag(:,:,27) =
12.9275
mag(:,:,22) = 1.7775
mag(:,:,17) = 4.7630
mag(:,:,28) =
11.0088
mag(:,:,23) = 1.4142
mag(:,:,18) = 3.9773
mag(:,:,29) =
Page | 62
mag(:,:,40) =
1.1116
mag(:,:,35) = 0.0462
0.8633 0.0339
mag(:,:,36) =
0.6631 0.0249
mag(:,:,37) =
0.5044 0.0199
mag(:,:,38) =
0.3804 0.0182
mag(:,:,39) =
0.2849 0.0133
Page | 63
mag(:,:,51) = -90.5729
mag(:,:,46) = 0.0020
phase(:,:,2) =
0.0098
mag(:,:,52) = -91.1458
mag(:,:,47) = 0.0015
phase(:,:,3) =
0.0071
mag(:,:,53) = -91.3398
mag(:,:,48) = 0.0011
phase(:,:,4) =
0.0052
mag(:,:,54) = -91.5666
mag(:,:,49) = 7.9984e-04
phase(:,:,5) =
0.0038
mag(:,:,55) = -91.8318
mag(:,:,50) = 1.9999e-04
phase(:,:,6) =
0.0028
phase(:,:,1) = -92.1418
Page | 64
phase(:,:,7) = -95.4629
phase(:,:,18) =
-92.5042
phase(:,:,13) = -101.8119
phase(:,:,8) = -95.7106
phase(:,:,19) =
-92.9277
phase(:,:,14) = -103.7421
phase(:,:,9) = -96.3811
phase(:,:,20) =
-93.4225
phase(:,:,15) = -105.9593
phase(:,:,10) = -97.4508
phase(:,:,21) =
-94.0005
phase(:,:,16) = -108.4908
phase(:,:,11) = -98.6949
phase(:,:,22) =
-94.6754
phase(:,:,17) = -111.3587
phase(:,:,12) = -100.1393
Page | 65
phase(:,:,23) = phase(:,:,34) =
-139.4647
phase(:,:,24) = phase(:,:,35) =
-143.8228
phase(:,:,25) = phase(:,:,36) =
phase(:,:,26) = -147.9802
phase(:,:,37) =
-126.1772
phase(:,:,32) = -166.2579
phase(:,:,27) = -151.8636
phase(:,:,38) =
-130.5353
phase(:,:,33) = -168.1881
phase(:,:,28) = -155.4251
phase(:,:,39) =
-135
Page | 66
-169.8607
phase(:,:,45) = -177.8582
phase(:,:,40) = -175.3246
phase(:,:,51) =
-171.3051
phase(:,:,46) = -178.1682
phase(:,:,41) = -175.9995
phase(:,:,52) =
-172.5492
phase(:,:,47) = -178.4334
phase(:,:,42) = -176.5775
phase(:,:,53) =
-173.6189
phase(:,:,48) = -178.6602
phase(:,:,43) = -177.0723
phase(:,:,54) =
-174.2894
phase(:,:,49) = -178.8542
phase(:,:,44) = -177.4958
phase(:,:,55) =
-174.5371
phase(:,:,50) = -179.4271
Page | 67
0.0039 0.2287
0.0046 0.2674
0.0063 0.3656
0.0086 0.5000
0.0002 0.0117
0.0002 0.0137
0.0003 0.0160
0.0003 0.0187
0.0004 0.0219
0.0004 0.0256
0.0005 0.0299
0.0006 0.0350
0.0007 0.0409
0.0008 0.0478
0.0010 0.0559
0.0010 0.0654
0.0011 0.0765
0.0013 0.0894
0.0015 0.1000
0.0018 0.1046
0.0021 0.1223
0.0024 0.1430
0.0029 0.1672
0.0033 0.1955
Page | 68
Page | 69
EXPERIMENT 10
Aim: To perform PID controller using MATLAB Simulink.
SYS = pid (Kp, Ki, Kd, Tf) creates a continuous-time pid controller
Ki Kd*s
Kp + +
s Tf*s+1
The scalars Kp, Ki, Kd, and Tf specify the proportional gain,
integral gain, derivative gain, and filter time constant. The Tf
Kp,Ki,Kd,Tf are all real, and of type GENSS if one of the gains
Kd
Kp + Ki * IF(z) + --------------
Tf + DF(z)
where IF(z) and DF(z) are the discrete integrator formulas for the
'ForwardEuler' Ts/(z-1)
Page | 70
'BackwardEuler' Ts*z/(z-1)
'Trapezoidal' (Ts/2)*(z+1)/(z-1)
Simulink Diagram:
Page | 71
Output:
Page | 72
ASSIGNMENT – 1
1) Define open loop and close loop control system. Enlist the differences between N
open loop and close loop control system.
2) Discuss block diagram reduction techniques with diagram. A
3) Compare Block diagram reduction and Signal Flow graph. N
4) Obtain the Transfer Function for the given electrical circuit. E
Fig. 1
E
Fig. 2
7) For a signal flow graph shown in figure, determine transfer function using E
Mason’s Gain Formula.
Page | 73
ASSIGNMENT – 2
1) Derive the expression for unit step response of under damped second order N
system.
2) Derive an expression for the rise time for a 2nd order control system subjected to N
a unit step input.
3) Define the term i) Rise time ii) Peak time iii) Settling time iv) Peak Overshoot N
4) Define sensitivity and justify that closed loop control system is better than open A
loop control system in the context of sensitivity.
5) Derive the equation of steady state error for closed loop transfer function. A
6) A unity feedback control system is characterized by the open loop transfer E
function G(s) =1/[s(s+1)]. Determine the steady state errors for unit step, unit
ramp and unit acceleration input.
7) Determine type of system and error coefficients for unity feedback system E
having following open loop transfer function.
ASSIGNMENT – 3
1) Define Routh’s criteria. State advantages and limitations of Routh’s criteria. N
2) Construct Routh’s array and determine the stability of the system whose E
characteristic equation is s6+2s5+8s4+12s3+20s2+16s+16=0
3) Enlist the rules for the construction of root locus. R
4) Draw the root locus for the given open loop transfer function E
G(s) = K/[s(s+1)].
5) Explain Nyquist criterion for the stability in brief. R
6) Construct bode plot for the system whose open loop transfer function is given E
by: G(s)H(s)= 100s/s+2. Comment on stability for the given system.
7) Write a brief note on correlation between transient response and frequency U
response.
8) Draw the polar plot for the system whose open loop transfer function is 10/s+10. E
9) List advantages of state variable analysis. U
Page | 74