Vous êtes sur la page 1sur 61

FEDERAL URDU UNIVERSITY

ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

SEVENTH SEMESTER

CONTROL SYSTEMS

COMPUTER SIMULATION LAB


DEPARTMENT OF ELECTRICAL ENGINEERING

Prepared Checked Approved By:


By: By:
Engr. Zain Ul Abidin Engr. M.Nasim Khan Dr.Noman Jafri
Lecturer (Lab) Senior Lab Engineer Dean,
Electrical,
FUUAST- Electrical,
FUUAST- FUUAST-Islamabad
Islamabad Islamabad

CONTROL SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Name: ____________________________________________

Registration No: ____________________________________

Roll No: ___________________________________________

Semester: _________________________________________

Batch: ____________________________________________

CONTROL SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

C ONTENTS
CONTENTS

Exp No List of Experiments

1
INTRODUCTION TO MATLAB BASICS IN CONTROL SYSTEM
2
MATHEMATICAL MODELS
3
LTI MODELS
4
LTI MODELS (USING BLOCK DIAGRAM)
5
OPERATIONS ON LTI MODELS
6
STABILITY
7
STATE SPACE ANALYSIS
8
SIMULINK BASICS
9
STATE VARIABLE MODELS
10
STEADY STATE AND PERFORMANCE ANALYSIS
11 TRANSIENT RESPONSE & GAIN EFFECT

12 TIME DOMAIN INTERPRETATION OF PD, PI, PID CONTROLLER

13 ROOT LOCUS ANALYSIS

14,15,16 PROJECT ASSIGNED BY TEACHER

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

EXPERIMENT NO – 01
INTRODUCTION TO MATLAB BASICS IN CONTROL SYSTEM

OBJECTIVE

To understand the basics of MATLAB

PROCEDURE

This lab is based on following


sections:
Statements and
variables
Matri
xPlot a
function
STATEMENTS AND VARIABLES

MATLAB is usually used in a command driven mode. When single line commands are
MATLAB processes these commands immediately and displays the result. MATLAB is
entered,
capable of executing sequences of commands that are stored in
also
files.
Que: What is the output of the following statements
Ans:
a=10?

Que: That is the output of the following instruction b=[1 2 3;4 5


Ans:
6]?
b=

MATRIX

In MATLAB, the basics computational unit is the matrix. Vectors and scalars are special cases
matrices. Matrix dimensions must be compatible for matrix
of
operations.
Que: >>a=[1 2 3;4 5
6]; >>b=[2 2 2;3 3 3];
>>c=[4 3 2;1 0 2;7 2
What is the output of
1];
command>>d=a+b?
Ans:

Que: When >>d=a+c?


Ans:

Que: When >>a*c?


Ans:

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Que: When>>a*b?
Ans:

PLOT A FUNCTION

MATLAB has a variety of powerful commands used to plot


variables.
Que: What is the output of
Ans:
t=0:0.1:1?

Que: Size of variable can be obtained by


Ans:
>>size(t)?

Que: What is the difference of show() and


Ans:
length()?

Que: Following statements are used to generate a sinusoidal function with 50Hz
>>t=0:0.002:0.04
frequency
;>>y=sin(2*pi*50*t)
;>>Plot(t,y)
;>>grid;
>>xlable(‘time(s)’)
;>>ylabel(‘y’)
;Title(‘sin(2*pi*50*t)’)
;The plot shows 10 values in one cycle how can you do to have 100 values in one
Ans:
cycle?

Que: The following statements are used to plot three phase voltage at
50Hz?
>>t=0:0.0002:0.04
;>>y1=sin(2*pi*50*t)
;>>y2=sin(2*pi*50*t-
>>
2*pi/3);
>>figure
y2=sin(2*pi*50*t+2*pi/3);
;>>hold;
>>plot(t,y1,’r’)
;>>
>>
plot(t,y2,’b’);
>>grid;
plot(t,y3,’g’);

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Sketch the
plot?

For 3D plot of y1,y2,y3


>>plot3(y1,y2,y3)
;

COMMENTS

____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

EXPERIMENT NO – 02
MATHEMATICAL MODELS

OBJECTIVE

To learn how to define a


polynomial
To find roots of
polynomial,
To multiply two
polynomials
To evaluate a polynomial at a value of independent
variable.

PROCEDURE

This lab is based on following


sections:
Section 1
Section 2

SECTION 1

Write three loop current equations for the following


circuit.

R= 1Ω

R= 1Ω R= 1Ω

V=5v
R= 1Ω R= 1Ω

Loop-1:

Loop-2:

Loop-3:

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Write all the matrices required to calculate I1, I2 and I 3. Use Cramer’s
rule.
∆=

I1 = I2 = I3=

Write the MATLAB command to calculate I1, I2 and I


3.

I1= I2= I3=

What are the values returned by the


MATLAB?
I1= I2= I3=

Matrix representation can be used for the loop equations of the circuit
above as IR=V, where R is the resistance matrix, I is the current matrix and V is
shown
voltage matrix. Once these matrices are declared, currents can be calculated
the
I=R^-1V.
as Once all the matrices are defined, enter the following
Command.
MATLAB

I=inv (R)*V

Show how the MATLAB returns values of I1, I2 and I 3.

I1= I2= I3=

SECTION 2

In MATLAB, a polynomial is defined by expressing only the coefficients of


Independent variable in descending order. Enter the following commands to define
the
apolynomial p(s)= s^3 +3s^2 +4 and to compute the roots of
polynomial
this
.
p=[1 3 0 4];
r=roots(p)
;
The third zero in the list of the coefficients is due to the missing term s^1 in the
polynomia
above
l
Write the polynomial and its
roots.
Polynomial
:
Roots:

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

A polynomial can be reassembled from roots


as:
p= poly(r)

MATLAB function poly will return a list of coefficients of the polynomial


descending powers.
in

What are the coefficients of the reassembled


polynomial?
Ans:

Write the polynomial from the MATLAB generated


coefficients.
Ans

Try to reassemble the polynomials by entering various roots


like
poly ( [ 1
2] )
This will return the coefficients of a second order
polynomial.
A fifth order polynomial with all five roots equal to 1 can be reassembled
as:
poly ( [ 1 1 1 1
1] )
Write the polynomial from the MATLAB generated
coefficients.
Ans:

Two polynomials (3s^3 + 2s^2 + 1)(s + 4) can be multiplied as shown below and
apolynomial can be evaluated at a given value of the variable
as:
p = [3 2 0 1] ; q = [1
n4 =
] ;conv (p, q);

Write the polynomial from the MATLAB generated


coefficients
Ans:

Multiply (3s^3 + 2s^2 + 1)(s + 4) manually and write the product and list
coefficients in descending powers of
of
s.
Ans:

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

A polynomial p can be evaluated at a given value of the variable


as:
value =
polyval(p,2)
Write the value returned by the above command and check it
manually.
Ans:

The following commands are used to evaluate polynomials q and n defined


above.
polyval(q,2
)polyval(n,2
)
Note that the above lines are not terminated by semicolons. The output is displayed
pressing enter key after each command and the value is assigned to the generic
after
variable

What is n and value? Multiply the polynomials p = 3s^3 + 3s^2 +1 and q = s^2 +
m
4 anually and verify that the MATLAB generates a correct product of the
Also verify the value of the resultant polynomial at s =
polynomials.
2.
n= value =

Product of two polynomials


=
Value of polynomial at s = 2
=

COMMENTS

____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

EXPERIMENT NO – 03

LTI MODELS
OBJECTIVE

To learn how to find the transfer function of a


system.
To compute the step
response.
To compute the Impulse
response
PROCEDURE

This lab is based on following


steps:
Verification of transfer
function.
Plotting step
response.
Plotting impulse
response.

VERIFICATION OF TRANSFER FUNCTION

DIAGRAM

x(t)
K
M f(t)
B

Verify that the transfer function of the system shown above


is;
G(s) = F(s) / X(s) = 1 / (Ms^2 + Bs + K) = 1 / (s^2 + s +
5)
This transfer function can be defined
as;
Ans: m = 1 ; k = 5 ; b =
1 ; num = [1] ; den = [m b
sys
k] ; = tf(num,
den) ;
num and den must be defined before using the transfer
function.
CONTROL SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

What is the characteristic equation of the


system ?
Ans:

Calculate the frequency of oscillations ω = ωn √ (1- ς^2) from the characteristic


equation.
Ans: ω = rad/sec f=
;

STEP RESPONSE

Step response is the output of a system when step input is


applied
In MATLAB, the step response can be plotted using step function
as;
step(sys
)
Calculate the frequency of oscillations ω from the step response. It should
ωn √ (1- ς^2) you calculated earlier. step response is calculated for
be
20s.
Ans:

PLOT

Sketch the step response for the following three


cases.
Case-1: Eliminate spring (k=0) where m = 1 and b =
1Case-2: Eliminate damping (b=0) where m = 1 and k =
5Case-3: Eliminate mass (m=0) where b = 1 and k =
5

Case-1: Eliminate spring (k=0) where m = 1 and b =


1
PLOT

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Case-2: Eliminate damping (b=0) where m = 1 and k =


5
PLOT

Case-3: Eliminate mass (m=0) where b = 1 and k =


5
PLOT

● Calculate the natural undamped frequency ωn, damping ratio ς, and the
of oscillation ω for each case as shown in the following
frequency
table.

Eliminating Eliminating Eliminating


m = 1; k = 0; b =
Spring m = 1; k = 5; b =
Damping mMass
= 0; k = 5; b = 1;
ωn 1; 0;
ς
ω

IMPULSE RESPONSE

Impulse response describes reaction of the system as a function of time or possibly a


of some other dependent variable that parameterize the dynamic behavior of the
function
system
The impulse response can be plotted by using impulse function
as
Ans:
impulse(sys)
PLOT

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Sketch the impulse response for the following three


cases.
Case-1: Eliminate spring (k=0) where m = 1 and b =
1Case-2: Eliminate damping (b=0) where m = 1 and k =
5Case-3: Eliminate mass (m=0) where b = 1 and k =
5
Case-1: Eliminate spring (k=0) where m = 1 and b =
1
PLOT

Case-2: Eliminate damping (b=0) where m = 1 and k =


5
PLOT

Case-3: Eliminate mass (m=0) where b = 1 and k =


5
PLOT

COMMENTS

____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

EXPERIMENT NO – 04

LTI MODELS (USING BLOCK DIAGRAM)

OBJECTIVE

To learn how to compute the transfer function from the block diagram of a
system.
To compute the step
response.
To compute the impulse
response.
PROCEDURE

This lab is based on following


steps:
Transfer function of system in series with unity
gain.
Transfer function of a non unity feedback
system.
TRANSFER FUNCTION OF SYSTEM IN SERIES WITH UNITY GAIN

BLOCK DIAGRAM

X S+1 / S+3 1 / 5000 S2 X

MATLAB CODE

Derive the transfer function of the above system manually to verify the
generated transfer
MATLAB
function.
numc = [ 1 1] ; denc = [ 1
numg
2 ] ; = [ 1 ] ; deng = [ 500 0
[num1,
0] ; den1] = series (numg, deng, numc,
[num, den] = cloop(num1,
denc);
sys = tf(num,
den1);
den);
Ans:

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

STEP RESPONSE

IMPULSE RESPONSE

TRANSFER FUNCTION OF A NON UNITY FEEDBACK SYSTEM

BLOCK DIAGRAM

X 1 / 5000 S2 X

S+1 / S+2

MATLAB CODE

Derive the transfer function of the above system manually to verify the
generated transfer
MATLAB
function
numg = [ 1 1] ; deng = [ 1
numh
2 ] ; = [ 1 ] ; denh = [ 500 0
[num,
0] ; den] = feedback (numh, denh, numg, deng,
sys = tf(num,
-1);
den);
Ans:

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

STEP RESPONSE

IMPULSE RESPONSE

Answer the following


questions.
What is the settling time of the
system?
Ans:

What are the roots of the characteristics


equation?
Ans:

Show the position of poles in s-


plane?

What is the relationship between the real part of the roots, the time constant and
time
settling
?
Ans:

What is the relationship between the imaginary part of the roots and the frequency
oscillations of the step
of
response?
Ans:

COMMENTS

____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

EXPERIMENT NO – 05
OPERATIONS ON LTI MODELS

OBJECTIVE

To learn to apply arithmetic operations on LTI


To learn different
Models.
characteristics.
PROCEDURE

This lab is based on following


steps:
Addition of LTI
Models.
Subtraction of LTI
Models.
Multiplication of LTI
Feedback and Other Interconnection
Models.
Continuous/Discrete Conversions of LTI
Functions.
Models.

ADDING LTI MODELS

Adding LTI models is equivalent to connecting them in parallel. Specifically the


model
LTI
sys = sys1 + sys2

represents the parallel interconnection shown below.

Write the code for the section in the dashed lines and also find the value of the output
y

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

where sys1 = 1/(s +2) and sys2 = 2/


(s+3)

SUBTRACTION OF LTI MODELS

the subtraction of two LTI


models
sys = sys1 -
sys2
is depicted by the following block diagram.

CONTROL SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

MULTIPLCATION OF LTI MODELS

Multiplication of two LTI models connects them in series.


Specifically,
sys = sys1*sys2

returns an LTI model for the series interconnection shown


below;

Write the code for the section in the dashed lines and also find the value of the output
y

FEEDBACK AND OTHER INTERCONNECTION FUNCTIONS

The following LTI model interconnection functions are useful for specifying closed-loop
open-loop
and
configurations:
● Feedback puts two LTI models with compatible dimensions in a
configuratio
feedback
n
● Series connects two LTI models in
series.

Write the code for the section in the dashed lines and also find the value of the output
y

X S+1 / S+3 1 / 3S2+ 1 X

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Write the code for the section in the dashed lines and also find the value of the output
y

X S+1 / S+2 X

S+1 / S+2

CONTINOUS/DISCRETE CONVERSION OF LTI MODELS

The syntax
sysd =
where Ts is the sampling period in
c2d(sysc,Ts);
sysc=d2c(sysd)
seconds
;

Resampling of Discrete- Time


Models
You can resample a discrete-time
sys2=d2d(sys1,Ts)
TF

Example

H1 = tf([1 0.4],[1 -0.7],


H2=d2d(H1,0.25);
0.1);
Compare the step responses of both H1 and
What command is
H2.
used?

CONTROL SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

STEP RESPONSE OF H1

STEP RESPONSE OF H2

P = 5 e-3.4S / S + 1

This transfer function can be defined


Num=5;
as;
den=[1 1];
P=tf(num,den,’input
delay’,3.4)
As expected, the step response of P is a shifted version of the delay free
response;
P0=tf(num,den)
;Step(po,’b’,p,’r’
)
If the process model has multiple
outputs
P(s)=[ 5 e-3.4S / S + 1 -2 e-2.75 / s + 3]

Num={5 ; -2};
Den={[11] ; [1 3]};
P=tf(num,den,’outputdelay’,[3.4 ;
2.7])
Next consider a multi-input, multi output
model
P(s)=[ 5 e-3.4S / S + 1 1 ]
[ -2 e-2.75 / s + 3 e-0.7s/s ]
num={5 , 1; -2 1};
den={[1 1] , 1; [1 3], [1
p=tf(num,den,’iodelay’,[3.4 0 ; 2.7
0]};
0.7]);
CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

OUTPUT

COMMENTS

____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

EXPERIMENT NO – 06
STABILITY

OBJECTIVE

To learn about stability of the control


To learn different
system.
characteristics.
PROCEDURE

This lab is based on following


steps:
Closed loop transfer
function.
Step response.
Pole zero
maps.
CLOSED LOOP TRANSFER FUNCTION

Find the closed-loop transfer function of the


system.

X K S2– S + 1 /
S2– 2S + 1

Ans:

Now determine the closed-loop transfer function using Matlab and verify
the
transfer function you derived in the previous step. Write Matlab commands
calculate the transfer function when
to
K=1.
Ans:

Write the transfer function derived by


Matlab.
Ans:

CONTROL SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Find the roots of the characteristic equation for K=1, 2 and 5 and check if the system
stable for these values of the controller
is
gain.
K =1

K=2

K=5

STEP RESPONSE

Sketch the step response of the system for K=1, 2 and 5 in the following space. Label
response
each
properly.
FOR K = 1

FOR K = 2

FOR K = 3

FOR K = 5

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

TRANSFER FUNCTION

Consider the transfer


function
S^2 - s + 1
-------------
2 s^2 + s + 2

Calculate roots of the transfer function using Mat


lab.
Ans:

POLE ZERO MAP

Show the position of poles and zeroes in the s-


plane.
Ans: num1=[1 -1 1]
den1=[1 2 1]
[num,den]=cloop(num1,den1
)sys=tf([1 -1 1],[2 1
iopzmap(sys
2])
)
PLOT

What are the positions of the poles in the s-


plane?
Ans: num1=[1 -1 1]
den1=[1 2 1]
[num,den]=cloop(num1,den1
)sys=tf([1 -1 1],[2 1
sgrid;
2])
p=pole(sys
)
PLOT

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Sketch the step response of the


system.
PLOT

COMMENTS

____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

EXPERIMENT NO – 07
STATE SPACE ANALYSIS

OBJECTIVE

To learn about state space


To learn different
analysis.
characteristics.
PROCEDURE

Transfer function.(Mason’s
form)
Signal flow
diagram.
Equation in Matrix
form.
Roots of
equation.
Step response.

TRANSFER FUNCTION (MASON’S FORM)

Consider the transfer


function
-5 S^2 -4s - 12
Ans: ---------------------
2 s^3 + 6s^2 + 3

Write the transfer function in Mason’s


form.

Ans:

SIGNAL FLOW DIAGRAM

Draw the signal flow


graph.

Write the state equations of the system


Ans: above.

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

EQUATION IN MATRIX FORM

Write the state equation in the Matrix-vector


form.
Ans:

ROOTS OF EQUATION

Compute the Roots of the characteristics


equation.
Ans: FOR K = 1

Write Matlab function to find the transfer function of the


system.
Ans:

STEP RESPONSE

Sketch step response of the


system.

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

TRANSFER FUNCTION (MASON’S FORM)

Consider the transfer


function
3S+s-6
---------------------
s^3 + 6s^2 + s + 3

Write the transfer function in Mason’s


form.
Ans:

SIGNAL FLOW DIAGRAM

Draw the signal flow


graph.

Write the state equations of the system


above.
Ans:

EQUATION IN MATRIX FORM

Write the state equation in the Matrix-vector


form.

Ans:

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

ROOTS OF EQUATION

Compute the Roots of the characteristics


equation.
Ans:

Write Matlab function to find the transfer function of the


system.
Ans:

STEP RESPONSE

Sketch step response of the


system.
PLOT

COMMENTS

____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

EXPERIMENT NO – 08
SIMULINK BASICS

OBJECTIVE

To learn about
To observing behavior of different system in
Simulink.
simulink.
PROCEDURE

This lab is based on following


steps:
Simulink
introduction.
Ramp response of transfer
function.
Step function of transfer
function.
SIMULINK INTRODUCTION

Simulink is a graphical extension to MATLAB for modeling and simulation of systems.


Simulink, systems are drawn on screen as block diagrams. Many elements of
In
diagrams are available, such as transfer functions, summing junctions etc. Simulink
block
integrated with MATLAB and data can be easily transferred between the
is
programs.

The simple model consists of three blocks: Step, transfer function, and scope. The step is
asource block from which a step input signal originates. This signal is transferred
the line in the direction indicated by the arrow to the transfer function linear block.
through
transfer function modifies the input signal gives a new signal on the line to the scope.
The
scope is a sink block used to display a signal much like an
The
oscilloscope.

RAMP RESPONSE OF TRANSFER FUNCTION

For a general transfer


function
G(s) = F(s) / X(s) = 1 / (ms^2 + bs +
k)
Observe the waveforms for different values of m, b and k, when ramp input is
applied.

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Case-1: Eliminate spring (k=0) where m = 1 and b =


1

BLOCK DIAGRAM

PLOT

RESULT

Case-2: Eliminate damping (b=0) where m = 1 and k =


5

BLOCK DIAGRAM

PLOT

RESULT

Case-3: Eliminate mass (m=0) where b = 1 and k =


5
BLOCK DIAGRAM

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

PLOT

RESULT

STEP RESPONSE OF TRANSFER FUNCTION

For a general transfer


function
G(s) = F(s) / X(s) = 1 / (ms^2 + bs +
k)
Observe the waveforms for different values of m, b and k, when step input is
applied.
Case-1: Eliminate spring (k=0) where m = 1 and b =
1
BLOCK DIAGRAM

PLOT

RESULT

Case-2: Eliminate damping (b=0) where m = 1 and k =


5
BLOCK DIAGRAM

PLOT

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

RESULT

Case-3: Eliminate mass (m=0) where b = 1 and k =


5
BLOCK DIAGRAM

PLOT

RESULT

Differential equation modeling in


Simulink
Let us solve a simple RC circuit, as shown below, on
simulink,

C
V

SIMULINK MODEL

CONTROL SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Write the differential equation in terms of capacitor


voltage.
Ans:

Sketch the
waveform.
SCOPE 1

SCOPE 2

COMMENTS

____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

EXPERIMENT NO – 09
STATE VARIABLE MODELS

OBJECTIVE

To learn about state variable


To learn about conversion of transfer function to state
models.
variable..
PROCEDURE

This lab is based on following


steps:
State space
conversion.
State space
model.
Differential equation modeling in
Simulink.

STATE SPACE CONVERSION

Write matlab command to determine the closed loop transfer function using the
and denominator polynomials.
numerator

 5s 2 + 4s  12
G ( s)
s 3 + 11s 2  8s + 15

Ans:

In state space representation, simultaneous first order differential equations can


represented
be
by
X=Ax + Bu
Y=Cx + Du

Where the matrices A, B, C and D are the matrices that describe the system. The vectors
and U are the state and input vectors respectively. The vector Y is called output
X
The first equation is called state
vector.
equation.
Transfer function to state space conversion can accomplished using the
function

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

tf2ss

Use matlab help to learn and implement the above


function.
[A B C D] = tf2ss (NUM,DEN)

STATE SPACE MODEL

The following command will print the stae space


model,
Print
sys

Use matlab help to learn and implement the above


function.
Matrices A, B, C and D can be printed by entering the matrix name. Write the matrices
the state space model returned by the
of
matlab.
Ans:

A system expressed in state space can be converted to transfer function.


functionused to convert the state space representation of a system discussed before
Following
transfer
into
function,
ss2tf

STATE SPACE CONVERSION

Write matlab command to determine the closed loop transfer function using the
and denominator polynomials.
numerator

 s 2 + 10s  9
G ( s)
s 3 + 14s 2  7 s + 15

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Ans:

[A B C D] = tf2ss (NUM,DEN)

STATE SPACE MODEL

The following command will print the stae space


model,
Print
sys

Use matlab help to learn and implement the above


function.
Matrices A, B, C and D can be printed by entering the matrix name. Write the matrices
the state space model returned by the
of
matlab.
Ans:

A system expressed in state space can be converted to transfer function.


functionused to convert the state space representation of a system discussed before
Following
transfer
into
function,
ss2tf

COMMENTS

____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

EXPERIMENT NO – 10
STEADY STATE AND PERFORMANCE ANALYSIS

OBJECTIVE

To explore the steady state analysis of a control


To explore the effect of changing parameters on performance of a control
system.
system.
PROCEDURE

This lab is based on following


sections:
Steady state error and DC
gain.
Dominant poles and second order
approximation.

STEADY STATE ERROR AND DC GAIN

Consider the unity feedback system with

G(S)=10s+20/s^2+10

The response of this system to a ramp (triangular) input can be observerd using
function as
lsim
follows
MATLAB COMMAND

Numg=[10 20];
Deng=[1 10 0];
Sysg=tf(numg,deng)
;Sys=feedback(sysg,1)
;T=[0:0.1:8.2]’
;V1=[0:0.1:2];v2=[2:-0.1:-2];v3=[-
U=[v1;v2;v3];
2:0.1:0]’;
[y,T]=lsim(sys,u,t)
;plot(T,y,t,u,’..’)
,xlabel(‘Time(sec)’),Ylabel(‘Amplitude’),gri
d

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Sketch the output in the space


provided.

What is the steady state


error?
Ans:

Find steady state error for ramp input mathematically, using the relation ess=A/Kv
Kv=lim s__0[sG(s)] and ‘A’ is the magnitude of step
Where
input.
Ans:

DC GAIN

The steady state of the system, or simply the dc gain of the system, is determine
evaluating the transfer function of the system at zero frequency I-e the value of s in
by
transfer function must be zero. For example, if a closed loop system is characterized by
the
transfer
the
function.
K n
G(s) = 2
s + 2=+n s  n 2

Then ,the dc gain of the system


is
K n K n
2

G(s) = 2 = = K
s + 2=+n s  n 2 n 2
s=0
Thus ,K is the dc-gain of the
system.
In MATLAB the dc gain of the system can be obtained by using the
dcgain(sys),where ‘sys’ is the transfer function of the
function
system.
Consider the system below, plot the actual output of the open loop system due to a
input
step

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Ans: : numg=[2 5]; deng=[1 4 5


sysg=tf(numg,deng)
0];
;sys=feedback(sysg,1)
;t=[0:0.1:8.2]'
v; 1=[0:0.1:2]'; v2=[2:-.1:-2]'; v3=[-
u=[v1;v2;v3]
2:.1:0]';
;[y,T]=lsim(sys,u,t)
;figure(1
p) lot(T,y,t,u,'--'),xlabel('Time(sec)'),ylabel('Amplitude'),gri
dfigure(2
)step(sys
)dcgain(sys
)
OUTPUT

Using command dcgain(sys),find the dc gain of the open loop


system

What is the steady state


error?
Ans: .

Now construct a unity feedback system as the plant. Plot the actual output of the
loop system due to a step input.
closed-

MATLAB COMMANDS

numg = [2
deng = [1 4 -5 0];
5];
sys=tf(numg,deng)
;t=[0:0.1:8.2]'
;v1=[0:0.1:2]'; v2=[2:-.1:-2]'; v3=[-
u=[v1;v2;v3]
2:.1:0]';
;[y,T]=lsim(sys,u,t)
;figure(1
)plot(T,y,t,u,'--'),xlabel('Time(sec)'),ylabel('Amplitude'),gri
dfigure(2
)
CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

step(sys
)

PLOT

Now a construct a unity feedback system shown below ,the error function is determines
the equation and can directly be found from
by
MATLAB.
e(t) = r(t) – y(t)

To be able to determine the error function in MATLAB, we need first to determine


vector containing the input signal r(t), and the vector containing the actual output
the
y(t). The next step is subtract y(t) from r(t) to obtain the error function. MATLAB
signal
below is an unit step function. The system is defined by the following
code
model.
2s + 3
G(s)
s + 3s + 6
2

MATLAB COMMAND

numg=[2 3]
deng=[1 3 6]
sysg=tf(numg,deng
)%Generate unity feedback
syst=feedback(sysg,1
system
)%Dtermine output and time
[out,t]=step(syst)
vectors
;%Determine error
ref=ones(1,length(t))
function
;err=ref-
plot(t,err
out';
)grid on

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

OUTPUT

DOMINENT POLES AND SECOND ORDER APPROXIMATION

Both Zeros and poles may affect the system response, but the dominant poles are the one
have significant amount of impact on system
who
response.
For the following transfer
function
G(s)=62.5(s+2.5)/(s^2+6s+25)
(s+6.25)
Write MATLAB commands to find poles and
zeros.
Ans:

Plot poles and zeros in s-plane. What is the command that will be
used?

Now find and sketch the step


response.

What is %Overshoot and settling time from the


response?
Ans:
rd
As an approximation we neglect the (real) pole, and again find the response of
system.
3 the

Ans:

Again find step response and values of % Overshoot and settling time for
approximated system.(you can use step(sys1,sys2) for comparison of
the
responses)

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

COMMENTS

____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

EXPERIMENT NO – 11
TRANSIENT RESPONSE & GAIN EFFECT

OBJECTIVE

To explore the transient response of a control


To explore the effect of gain on transient response of a control
system.
system.
PROCEDURE

This lab is based on following


steps;
Open loop transfer
function.
Closed loop unity
feedback.
Closed loop transfer
function.
Unity feedback.

OPEN LOOP TRANSFER FUNCTION

Consider the open-loop


TF
G(s)=5/s2+2s+2
5
When the input is unit step,find the step function ,show the steady state
error .
Ans:

STEP RESPONSE

steady
steady state
state=
error=

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

CLOSED LOOP UNITY FEEDBACK

Obtain the step response of this close loop unity feedback system and also determind
overshoot and steady state
the
error.
G(s)=100/s(s+15
)
Ans:

STEP RESPONSE

percentage
steady state
overshoot=
error=
CLOSED LOOP TRANSFER FUNCTION

Consider the Close loop


TF
T(s)=10k/s2+20s+k

Obtain the step response for k=1,10,100, Co-plot the


responses.

For k=1
clear
k=1
all
a=1
num=[10*k]
den=[1 20 k]
y=tf(num,den
s) ys=feedback(y,1
)step(sys
)title('step responce for
k=1')

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

STEP RESPONSE

For k=10;
clear
clc
all
k=10
a=1
num=[10*k]
den=[1 20 k]
y=tf(num,den
)sys=feedback(y,1
)step(sys
)title('step responce for k=10')STEP
RESPONSE

For k=100;
clear
clc
all
k=100
a=1
num=[10*k]
den=[1 20 k]
y=tf(num,den
)sys=feedback(y,1
)step(sys
)title('step responce for
k=100')
STEP RESPONSE

K Steady
Overshoot
state error Setting Time
1 (sec)

10
100

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

OBSERVATION

As the value of K is increases Overshoot percentage is also increasing and setting time
decreasing and steady state error is
is
same
UNITY FEEDBACK SYSTEM

Consider the unity feedback system

When k=2,a=1 find the steady state value of y(t) and also find Ts at
2%.
Code:

STEP RESPONSE

Steady state value


Value of Ts at 2% =
=

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Consider the Unity feedback System

Ans: FOR PROPORTIONAL CONTROLLER


clear
Gs=2
all
a=1
num=[10]
den=[1 10]
y1=tf(num,den
)num1=[Gs]
den1=[1]
y2=tf(num1,den1
)y=y1*y2
sys=feedback(y,1
)step(sys
)title('Propotional Controller when
Gc=K')
STEP RESPONSE

(FOR PROPORTIONAL INTEGRAL CONTROLLER)

clear
k=2
all
k0=2
k1=20
a=1
num=[10]
den=[1 10]
y1=tf(num,den
)num1=[k0 k1]
den1=[1 0]
y2=tf(num1,den1
)y=y1*y2
sys=feedback(y,1
)step(sys
)title(‘Proportional Integral
Controller’)
CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

STEP RESPONSE

COMMENTS

____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

EXPERIMENT NO – 12
TIME DOMAIN INTERPRETATION OF PD, PI, PID
CONTROLLER
OBJECTIVE

To observe the effect of different controllers on Rise time, overshoot, settling time
steady state
and
error.
PROCEDURE

This lab is based on following


steps;
The three term
controller.
Open loop step
response.
Proportional
control.
PD control.
PI
control.
PID control.

THE THREE-TERM CONTROLLER

The transfer function of PID controller looks like the


following:
Kp+ki/s+kds=kds+kps+ki/
s
Where kp is the proportional gain, Ki is the integral gain, and kd is the derivative
The effects on the closed-loop response of adding to the controller terms kp, ki and kd
gain.
listed in table form
are
below.

CL RISE TIME OVERSHOOT S ERROR SETTLING S-


RESPONSE TIME
Kp Decreases Increases No change
Decreases
Ki Decreases Increases Increases Eliminates
Kd No change Decreases Decreases No change

Note that these correlations are not Exactly accurate, because Kp,Ki,Kd are related to
other. Changing one of these variables can change the effect of the other two. For
each
reason, the table should only be used, as a reference when you are determining the
this
for ki,Kp and Kd by trial &
values
error.

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

OPEN-LOOP STEP RESPONSE

Many PID controllers are designed by the trial & error selection of the variables kp.Ki
kd. There are some rules of thumb that you can consult to determine good values to
and
from; see your controls book for some explanations of these
start
Suppose we have a second-order plant transfer
recommendations.
function;
_____1_______
s^2+10s+20

let’s first view the open-loop step


num=1;
response.
den=[1 10 20];
Step(num,den
)
OUTPUT

The Dc gain of the plant transfer function is 1/20, so 0.05 is the final value of the
for a unit step input. This corresponds to a steady –state error of 0.95, quite large
output
Furthermore, the rise time is about one second, and the settling time is about 1.5
indeed.
Most likely, the response will not be adequate. Therefore, we need to add some
seconds.
control.
PROPORTIONAL CONTROL
From the chart above we see that kp will help us to reduce the steady-state error. Let’s
add a proportional controller into the
first
system.
Num=1;
Den=[1 10 20];
Kp=10;
[numCL,denCL]=cloop(kp*num,den,-
t=0:0.01:2
1);
;step(numCL,denCL,t)

OUTPUT

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

It should also be noted that it is not a good idea to use proportional control to reduce
steady-state
the error, because you will never be able to eliminate the error completely.
fact will become evident
This
Now, the rise time has been reduced and the steady-state error is smaller, if we use
below.
Kp, the rise time and steady-state error will become even smaller Change the
greater
This time we see that the rise time is now about 0.1 second and the steady-state error
Kp=500.
much smaller. But the overshoot has gotten very
is
large.
PD CONTROL

The rise time is now probably satisfactory (rise time is about 0.1 second).Now let’s add
aderivative controller to the system to see if the overshoot can be reduced. Add
variable, Kd, to them-file, set it equal to 10 and return them-
another
file:
Kp=500;
Kd=10;
Numc=[Kd Kp];
[numCL,denCL]=cloop(conv(num,den),den)
;step(numCL,denCL,t)

OUTPUT

The overshoot is much less then before. it is now only twenty percent instead of
forty-five percent. we can now try improve that even more. Try increasing Kd to 100,
almost
will see the overshoot eliminated
you
We now have a system with a fast rise time and ni overshoot. Unfortunately, there is
completely.
about a 5 percent steady-state error. It would seem that a PD controller is not
still
for this system. Let’s try a PI controller
satisfactory
instead.
PI CONTROL

As we have seen, proportional control will reduce the steady-state error, but at the cost
larger overshoot. Furthermore, proportional gain will never completely eliminate
of
steady-state error .For that we need to try integral control. Let’s implement a PI
the
and start with a small
controller
ki.
Kp=500;
Ki=1;
Kd=0;
Numc[Kd Kp Ki];
Denc=[1 0];
[numCL,denCL]=cloop(conv(num,numc),conv(den,denc))
;step(numCL,denCL)

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

OUTPUT

Try Ki=10,

Kp=500;
Ki=10;
Kd=0;
Numc[Kd Kp Ki];
Denc=[1 0];
[numCL,denCL]=cloop(conv(num,numc),conv(den,denc))
;step(numCL,denCL)
axis([0 100 0
1.5])
OUTPUT

PID CONTROL

From the two controllers above, we see that if we want a fast response, small overshot,
no steady-state error, neither a PI nor a PD controller will suffice. Let’s implement
and
controllers and design a PID controller to see if combining the two controllers will
both
the desired response. Recalling that, our PD controller gave us a pretty good
yield
except for a little steady-state
response
error.
Kp=500;
Ki=1;
Kd=100;
Numc=[Kd Kp Ki];
Denc[1 0];
[numCL,denCL]=cloop(conv(num,numc),conv(den,denc))
:step(numCL,denCL)

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

OUTPUT

The settling time is still very long. increase ki to


100.

The settling time is much shorter,but still small enough. Increase ki to 500 and change the
command to
step
step(numCL,denCL,t):

SUMMARY

To design a PID controller, the general rule is to add proportional control to get the
rise time, add derivative control to get desire overshoot, and then add integral control
desired
needed).To eliminate the steady-state
(if
error.
COMMENTS

____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

EXPERIMENT NO – 13

ROOT LOCUS ANALYSIS

OBJECTIVE

To explore the root-locus analysis of a control


system.
PROCEDURE

This lab is based on following


steps;
Section – 1
Section – 2
Section – 3
Section – 4

SECTION – 1

A CLOSED-LOOP control system using a proportional controller and unity-feedback


shown below
is

Determine the open-loop transfer


function.
Ans:

Determine the closed-loop transfer


function.
Ans:

Show the position of poles and zeros of the open-loop transfer function in the s-
plane.
Ans:

OUTPUT

CONTROL SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

Following MATLAB commands can be used to plot the root-locus of a


system.
rlocus(sys)
;
Sketch the output of the above
commands
OUTPUT

What is range of K for a stable


operation?
Ans:

SECTION - 2

In the system shown above, using integral controller K/s and determined the open loop
close loop TF?
and

For Open loop integral


controller
num=[1]
d; en=[1 5 6 0];
sys=tf(num,den
)
For closed loop integral
controller
num=[1]
;den=[1 5 6 0];
sys=tf(num,den
)y=feedback(sys,1
)
Plot the root-locus using MATLAB commands rlocus and sketch the root-
locus.
num=[1]
;den=[1 5 6 0];
sys=tf(num,den
)y=feedback(sys,1
)rlocus(sys
)

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

OUTPUT

How can you identify an integrator in the s-


pane?
Ans:

What is the range of K for a stable


operation?
Ans:

SECTION - 3

In the system shown above, use a proportional integral (PI) controller K(1+1/s)
determine the open-loop and closed-loop transfer
and
functions
For integral open-loop
proportional
num=[1
den=[1 5 6 0];
1];
sys=tf(num,den
)
For close-loop proportional
integral
num=[1
den=[1 5 6 0];
1];
sys=tf(num,den
)y=feedback(sys,1
)
Plot the root-locus using MATLAB command rlocus and sketch the root-
locus.
Ans: num=[1 1];
den=[1 5 6 0];
sys=tf(num,den
)y=feedback(sys,1
)rlocus(sys
)
OUTPUT

CONTROL
SYSTEMS
FEDERAL URDU UNIVERSITY
ELECTRICAL
OFENGINEERING
ARTS, SCIENCE, AND TECHNOLOGY
ISLAMABAD

What is significant effect of using a PI controller on the system


response?
Ans:

What is range of
K?
Ans:

SECTION - 4

The root locus of (open-loop) TF, H(s) is s plot of the location (locus) of all
closed loop poles with proportional gain k and unity feedback;
possible

The closed-loop function


is
Y(s)/R(s)=KH(s)/1+KH(s
)
And thus the poles of the closed loop system are values of such that
Since the root locus is actually the location of all possible closed-loop poles, from the
1+KH(s)=0.
locus we can select a gain such that our closed-loop system will perform the way we
root
if any of the selected poles are on the right half plane, the closed-loop system will
want.
unstable. The poles that ate closest to the imaginary axis have the greatest influence on
be
closed-loop response, so even though the system has three or four poles, it may still
the
like a second or even first order system depending on the location (s) of the
act
pole(s).
dominant

PLOTTING THE ROOT LOCUS OF A TRANSFER FUNCTION

Consider an open loop system which has a TF


of
H(s)=Y(s)/U(s)=s+7/s(s+5)(s+15)
(s+20)
Say our design criteria are 5% overshoot and I second rise
time
num=[1
den=conv(conv[1 0],[1 5]),conv[1 5],[1
7];
sys=tf(num,den
20]));
)rlocus(sys),axis([-22 3 -15
15])

CONTROL
SYSTEMS

Vous aimerez peut-être aussi