0% found this document useful (0 votes)
14 views22 pages

5 To 11 Control System Manual

The document outlines several experiments conducted in a Control System Lab, focusing on analyzing the step response, time response to arbitrary inputs, steady-state errors, and creating state space models of linear continuous systems using MATLAB. Each experiment includes objectives, required equipment, theoretical background, MATLAB code, and results. Additionally, it poses viva questions related to the concepts covered in the experiments.

Uploaded by

khushi211104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views22 pages

5 To 11 Control System Manual

The document outlines several experiments conducted in a Control System Lab, focusing on analyzing the step response, time response to arbitrary inputs, steady-state errors, and creating state space models of linear continuous systems using MATLAB. Each experiment includes objectives, required equipment, theoretical background, MATLAB code, and results. Additionally, it poses viva questions related to the concepts covered in the experiments.

Uploaded by

khushi211104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Control System Lab

KEC-652
EXPERIMENT NO.-5
OBJECTIVE:

tunit step response of given


transfer function and finds delay
peak overshoot.
time, rise time, peak time
and
EOUIPMENT REQUIRED:
Hardware required
Software Required.
PC
MATLAB R2017a
THEORY:

Control systems are generally


Higher order control systems designed with damping less than one that is
than unity that dominate usually have a oscillatory step response.
over the other poles. pair of complex conjugate poles with damping
order control systems to a Therefore, the time response less
response characteristics of astep input is generally of damped oscillatory. In of second and higher
control system to a unit step
1. input, we usually specifying the transient
specify the following:
Delay time
2. Rise time
3. Peak time
4 Peak overshoot

-1.5
Y{t)
First overshoot
M Allowable
tolerance
(2% to 5%)

+-0.5/

Fig.5.1: Response of an under


Department of damped system
Electronics & Communication
Engineering, GCET Gr. NODA
Page 22
Control System Lab
KEC-652
Delay time ta:

Time required for the response to


reach 50% of the final value at first
instance.
1 + O.7

Rise timne tr:

Time reauired for the response to rise


from 10% to 90% of the final
tams and 0 to 100% of the final value for over damped
value for under damped systems, at
first instance.
COS
t,. =
72)
Peak time tp :
Time required for the response to reach the
peak value of time response.

Peak overshoot Mp:


It is the normalized difference between the peak value of time
response and the steady state value

() x 100%
Settling time ts:
1e required for the response to
reach and stay within
Usually, the tolerance band is 2% a specified tolerance band of its final value
Or steady state value
or 5% .
MATLAB CODE:
clc
close all % clear Command window
clear all % close figure window
Wns % clear all variable
zeta=input('Enter natural frequency of system
input('Enter
-input(Enter damping ratio for
(rad/sec)=);
underdamp close loop
tolerance band (%)=); system =)};
wd-num-(wn2];
wn*sqrt(1-zeta^2);
Department of
Electronics & Communication Engineering, GCET Gr. NOIDA Page 23
Control System Lab KEC-652

num):
den=[ I 2*zeta*wn
system
transfer function= tf(num,den)
subplot(1,2,1)
pzmap(system_transfer function):

axis((-33 -3 3);
[ps zs]=pzmap(system_transfer function):
poles of the_systeml= ps
zero of the system Zs
t-0:0.001:10;

subplot( 1,2,2)
step(num, den, t);
[yx t<= step(num,den,t);
ymax=max(y);
maximum value of response =F ymax
peak timne = pi/wd
delay_ time-(1+0.7*zeta)/wn
rise time= (pi- cosd(zeta))/(wd)
sateling time = (-1)*reallog(n*0.01)/(zeta*wn)
peak overshoot = ymax-1
percentage of maximum overshoot = peak overshoot* 100
grid on

OUTPUT:

Pole-~ero Map
14 Step Response

IA(mseacgxoindrsy') 1.2

Amplitude

Real AxIs (seconds')


Time (seconds)

Department of
Electronics & Communication
Engineering, GCET Gr. NOIDA Page 24
KEC-652

Control System Lab

( a d / s e c )

2 e t e n

9ygte.
Command window
£ r e a u e n c y
£ c i 3 e
U n e r d a m

n a t u r a 2

r a i o

E n t e r
damping

bad ()
Enter ttoleeraace

Enter
s t e r f u n c t i o n .

s y ' s t c m _t r a n s

s^2 + 2
txans Cer
Continaou-tme

poles_of_the_sSter,3

- 1.73211
- 1 . 0 a Q O

zero_of_the_System

a-Oy-2
Empty matrix :

Jhaximum_ v a l u e I e S p o s e

1 . 1 6 3 0

Comnma wins

deav tire

1.236S

s.9120

peakverhGGt
1630

5eCentae af maimMoTerehoGt
26- 3a:34

RESULT:
Ine study of unit step response of given transfer function and
and peak overshoot has been done finds delay time, rise time, peak time
successfully.
VIVA QUESTIONS:
1. What is
delay time & rise
What do you timne?
3. Define mean by maximum overshoot in step response?
the term
un-damped, under damped, critical damped & over
damped system.

Departmnent of
Electronics &
& Communication Engineering, GCET Gr.
NODA Page 25
KEC-652

ControlSystem Lab

EXPERIMENT NO.-6

any arbitrary input.


OBJECTIVE:

the given system subjectedto


the time
response of
Determine

EOUIPMENT REQUIRED:

Software Required.
Hardware required

MATLAB R2017a

PC

THEORY:

signal:
Definition of some basic
denoted by u(t). It is defined as
Step signal: Unitstep function is
1. Unit

zu(t)=

called unit step signal.


When A=1, the step is samples having unit
sequence is a sequence of discrete
The unit impulse
2. Unit impulse signal: magnitude at all other
samnple instants".
magnitude at origin and zero

S)

called Unit impulse signal


When A=l then the impulse signal is
Exponential signal is in the form of x(t)
= exp(at)
3. Exponential signal:
cos(w0+) or A sin(w0+¢).
Sinusoidal signal: Sinusoidal signal is in the form of x(t) = A
4.
MATLAB CODE:

clc % clear command window


close all % close figure window
clear all % clear all variable.
sys =tf([8 18 32],/1 6 14 24]);
subplot(2,2,1 )
step(sys)
title('System Response When Excitation is Unit Step Signal')

Page 26
Department of Electronics & Communication Engineering, GCET Gr. NOIDA
Control System Lab
KEC-652

grid on
subplot(2,2,2)

impulse(sys)

title('System Response When Excitation is Impulse Signal")


grid on
subplot(2,2,3)
t= 0:0.01:4;
u= sin(10*t); %consider sine wave as input
%simulates time response of dynamic systems to arbitrary inputs.
lsim(sys,u,t) % u,t define the input signal
title(System Response When Excitation is Sine Wave')
grid on
subplot(2,2,4)
t=0:0.01:4;
u= exp(-2*t); %consider sine wave as input
%Simulate time response of dynamic systems toarbitrary inputs.
Isim(sys,u,t) % u,t define the input signal
title("System Response When Excitation is Exponential signal")
grid on

OUTPUT:

System Res ponse When Excitation is Unit Step Signal System Response When Excitatíon is Impulse Signal

Amplitud

2 4 25
Time (seconds) Time (seconds)

System Response When Excitation is Sine Wave System Response When Excitation is Exponential signal

05 1 2 25
Time (seconds) Time (seconds)

Department of Electronics & Communication Engineering, GCET Gr. NOIDA Page 27


Control System Lab
KEC-652

RESULT:

mhe study of time response of the given system subjected to any arbitrary
successfully.
input has been done

VIVA QUESTIONS:

1. What is step response of a system?


2. Define impulse Response of a second order
system.
3. Define transfer function?
4 What is final and initial value theorem?

Department of
Electronics & Communication Engineering, GCET Gr. NODA
Page 28
Control System Lab
KEC-652

EXPERIMENT NO.-7
OBJECTIVE:

Determine the steady state errors of a given transfer function.


EQUIPMENT REQUIRED:
Hardwarerequired Software Required.
PC MATLAB R2017a
THEORY:

Steady-state error is defined as the difference between the input (command) and the output of a
system in the limit as time goes to infinity (i.e. when the response has reached steady state). The
steady-state error will depend on the type of input (step, ramp, etc.) as well as the system type (0, 1,
or II).

Steady-state error can be calculated from the open- or closed-loop transfer function for unity
feedback systems. For example, let's say that we have the system given below.

+
R(S) ES) Y(s)
Gs)

We can calculate the steady-state error for this system from either the open- or closed-loop
transfer function using the Final Value Theorem. Recall that this theorem can only be applied if
the subject of the limit (sE(s) in this case) has poles with negative real part.
sR(s)
lim
e(oo) = s--+0 sE(s) = lim
s-+0 1+G(s)
NOW, let's plug in the Ianlace transforms for some standard inputs and determine equations to
alale Steady-state error from the open-loop transfer function in each case
.Step Input (R(s) = 1/s):

Department of Electronics & Communication Engineering, GCET Gr. NOIDA Page 39


Control System Lab
KEC-652

1
e(oo) =
1+ lim, o G(s) 1+ K, ’ K, = lim
8-0
G(s)
Ramp Input (R(s) = 1l s^2):
1
e(oo) = ’ K, = lim sG(s)
lim,-0 sG(s) K,
Parabolic nput (R(s) =1/s^3):
1 1
e(oo) = ’ K, =im s'G{s)
lim,-o s2G(s) Ka
Transfer Function: For the given transfer function:

(s + 1)(s +3)
s(s +2)(s +3)
MATLABCODE:

FOR STEP INPUT

clo %
clear Command window
close all% close figure window
clear all% clear all variable
S=tf('s);
G= (s+1)*(s+3)/(s^2* (s+2)*(s+3));
sys_cl=feedback(G, I);
lyt] = step(sys cl); %step input
u= ones(size(t);
steady _State_error = | -y(end): % steady-state error is 1(desired value) minus the final output
disp([Steady-state error:', num2str(steady
plot(t,y,;b' t,u,'g')
state_error)]);

axis([0,48,0,2)
xlabel(Time(secs)')
ylabel('Amplitude')
title('Input-green, Output-blue')
Department of Electronics & Communication Engineering, GCET Gr. NOIDA Page 40
Control System Lab
KEC-652

OUTPUT FOR STEP INPUT:

Input-green, Output-blue
1.8

1.6

Amplitude 1.4

1.2

0.8

0.6

0.4

0.2

10 15 20 25 30 35 40 45
Time(se cs)

FOR RAMP INPUT

clo % clear command window


close all % close figure window
clear all % clear all variable
s=tf('s);
G=(stl)*(s+3))/(s^2*(s+2)*(st3));
sys cl = feedback(G,1);
t=0:0.1:50;
u=t;
[y,t,x] =Isim(sys_cl,u,);
Steady_state error =| -y(end): % steady-state error is 1(desired value) minus the final output
disp(|'Steady-state error:", num2str(steady _state _error)]);
plot(t,y,;'b',t,u,'g)
xlabel(Timne(secs)')
ylabel('Amplitude')
title('Input-grecn, Output-blue')

QUTPUT FOR RAMP INPUT:

Department of Electronics &Communication Engineering, GCET Gr. NODA Page 41


Control System Lab
KEC-652

60 Input-green, Output-blue

50

Amplitude 40

30

20

10

10 15 20 25 30 35 40 45 60
Time(secs)
FOR PARABOLICINPUT

clc % clear command window


close all% close figure window
clear all% clear all variable
S=tf('s');
G-(st1)*(s+3))/(s^2*(s+2)*(st3);
sys cl =feedback(G, 1);
t=0:0.1:20;
u=0.5*t,*t:
[y,x]= Isim(sys cl,u,t);
Stcady_state_error= 1-y(end); %steady-state error is 1(desired value) minus the final output
disp([('Steady-state error:', num2str(steady _state_error)|);
plot(t,y,b',t,u, g')
xlabel("Time(secs))
ylabel('Amplitude')
title('Input-green, Output-blue')

Puent of Electronics & Communication Engineering, GCET Gr. NOIDA Page 42


Control System Lab
KEC-652

OUTPUT FOR PARABOLIC INPUT:

200 Input-green, Output-blue


180

160

140

120

apndug 100

80

60 +

40

20

12 14 16 18
Time(secs) 20

RESULT:
The study of Determine the steady state errors
successfully. of a given transfer
function has been done
VIVA QUESTIONS

What is the difference


What does steady state
between transient and steady
error mean?
state response?
Define the steady state error
Why do we find steady for a unity feedback
state error? system for step input.
How can the steady state
error ina system be
reduced?

Department of
Electronics & Communication
Engineering, GCET Gr. NOIDA
Page 43
Control System Lab
KEC-652

EXPERIMENT NO.-8
OBJECTIVE:

Create the state space model of a linear


continuous system.
EQUIPMENT REQUIRED:
Hardware required Software Required.
PC MATLABR2017a
THEORY:

State variable: The state of a system is a set of variables such that


the knowledge of these
variables and the input functions will, with the equations describing the
dynamicsS, provide the
future state and output of the system.
State space Models are time-domain representation of LTI system.

dx Axi) + Bu(t)
dt

ylt)= C+ Dui )

Where x(t) the state vector, u(t) is input vector, and y(t) is the output trajectory. State-space
models are derived from the differential equations describing the system dynamics. For example,
consider the second-order ODE for a simple electric motor:

+244 50 = 31
dt'

Where I is the driving current (input) and theta is the angular displacement of
the rotor
(Output).This ODE can be rewritten in state-space form as:

B=
dt

0= C1+ D ('= | 0) D= 0

Department of Electronics & Communication Engineering, GCET Gr. NOIDA Page 32


Control System Lab
KEC-652

MATLAB CODE:

% clear command window


clc
close all % close figure window
clearall % clear all variable

A=[01;-5-2 ];
B=[0;31

C=[10):
D=0;
H= ss(A,B,C,D)

OUTPUT:

x2

x2 -5

x2

Continuous-tirne state-gpaCe rodel.

RESULT:
done
of a linear continuous system. has been
ne study of Create the state space model
successfully.
VIVA QUESTION:

" Define nth order diferential equation?


systems?
What is controllabilityand observabilityin control
Define LTIsystem.
system.
ine how state variable related to the output of

Page 33
Department of Electronics & Communication Engineering,
GCET Gr. NOIDA
Control System Lab
KEC-652

EXPERIMENT NO.-9

OBJECTIVE:

Determine the state space representation offthe given


transfer functions.
EQUIPMENT REQUIRED:
Hardware required Software Required.
PC MATLABR2017a
THEORY:

There are three methods for obtaining state model from


(i)Phase variable method
transfer function:
(ii) Physical variable method
(ii) Canonical variable method
Out of three methods given above canonical
form is
converting from the transfer function of a system to probably the most straightforward method for
"controllable canonical form." This term comes from state space model is to generate a model in
important to us. To see how this method of Control Theory, but its exact meaning is not
order differential transfer function generating a state space mode works, consider the
third

H(s) = Y(S) (b,S + bË S+ b)


U(S) (S3 + aSZ + azS + a3)
We start by multiplying by Z(s)/Z(s) and
then solving for Y(s) and U(s) in terms
We also convert back to a of Z(s).
differential equation.
Y(s) = (boS + bË S+ b) Z(s)Y = bo~+
b~+ b,Z
U(s) = (S' + a,s² + a, S + az) Z(s)U=
We can now }+ aj~+ a,|+ anz
choose z and its first two derivatives as
our state variables
4, = Z 4, ={ 4,
4, ={= 43
, =}=U- a,|-a,| -az y=b|+
b,| +b,z
From these =U- a,43 - a,4, -a,4, = bo4, + b,42 + b,4,
results we can easily form
the state space nmodel:
Department of Electronics
&
Communication Engineering, GCET Gr. NOIDA
Page 34
ControlSystem Lah

KEC-652
0 1
#= Aq+Bu = 0
1 (+0u
-a, 1
y = Cq +Du =b, b,
b]q+0 -u
MATLAB CODE:

clc
close all
clear all
nc=-input('Enter a numerator cocfficient of system');
de=input('Enter.a denominator coetticient of systen"');
H-tf(nc,de);
transfer function_ of system=H
A, B, C, D] = tf2ss (nc,dc)

OUTPUT:
Command Wincto
NUerato coetticient system 1 2 53
Eater
6
denomiRator

trasfer £anctioa of_Syetem

£unction.
traR3£er
Cort:

De Page 35
Department of Electronics & Communication
Engineering, GCET Gr.
NOIDA
Control System Lab KEC-652

RESULT:

of'sstate space representation of the gIven transfer functions has been donesuccessfully.
Thestudy
VIVA QUESTION:

What is state space variable?


What is controllability and Observability in control systems?
The transfer functions for the state representation of the continuous time LII
system.
Is state space model unique?
What are the advantages of state space analysis?

Department of Electronics & Co


Communication
Engineering,GCET Gr. NOIDA Page 36
Control System Lab KEC-652

EXPERIMENT NO.-10

O B J E C T I V E :

Plots bode
plot of given transfer function. Also determine the relative stability by measuring gain
and phase margins.

EQUIPMENT REQUIRED:

Hardware required Software Required.


MATLAB R2017a
PC
THEORY:

response of LTI models. When invoked


Bode computes the magnitude and phase of the frequency
screen. The magnitude is plotted in
without left-side arguments, bode produces a Bode plot on the
calculation for mag is computed as
decibels (dB), and the phase in degrees. The decibel
20log10(|Hjw)), where H(w) is the system's frequency response.
Bode plots are used to analyze
margin, DC gain, bandwidth, disturbance
system properties such as the gain margin, phase
rejection, and stability.

MATLAB CODE:

clc to clear command window


%
close all % toclose the figure window
clear all %toclear previous variable
function');
un= input('enter the numerator of the transfer
den= input('enter the denominator of the transfer function');
h=tf(num,den) %transfer function of system
lgm pm wep wcg] =margin(h) % to find bode plotparameters
bode(h) Ooto plot bode plot
grid on

OUTPUT:
Page 37
Department of Electronics & Communication Engineering,
GCET Gr. NOIDA
Control System Lab
KEC-652

the nmeratox
en t e
the txans£er
ente aeOm1nato Cunctíon t1 3
transLer £unctiOn(9 S 4 oj

CoatiuOu9-tim,e
trngfer function.

5 . o o o n

Bode Diagram

(oB)
Magnitude

-150
-90

(deg)
Phase -135

-180

-225

-270! 10
102
Frequency (rad's)

RESULT:
measuring
Also determine the relative stability be
ouay of bode plot of given transfer function.
oH aid phase margins functions has been done successfully.
VIVA QUESTIONS:

What is gain margin in Bode plot?


What is phasc margin in Bode plot?
What is gain crossovcr frcqucncy?

Page 38
Jepartment of Electronics &Communication Engineering, GCET Gr. NOIDA
Control System Lab
KEC-652

EXPERIMENT NO. 11
O B J E C T I V E :

Plot root locus of given transfer function, locate closed loop poles for different values of k.

EOUIPMENT REQUIRED:

Hardware required Software Required.


MATLAB R2017a
PC
THEORY:

The root locus of an (open-loop) transfer function KG(s)H(s) is a plot of all possible closed-loop
poles with some parameter, often a proportional gain K, varied between 0 and infinity. The figure
helow shows unity-feedback architecture, but the procedure is identical for any open-loop transfer
functionH(S), even if some elements of the open-loop transfer function are in the feedback path.

R(s) K G($) Y(S)

H(S)
The closed-loop transfer function in this case is:

Y(S) K.G(S)
R(S) 1+K.G(s). H(s)
KG(s) H(s) - loop gain of the system
Numerator of KG(s) H(s) =0 gives open loop zero
Determinate of KG(s) H(s) =0 gives open loop polesof Ssuch that
Thus the poles of the closed-loop system are values
1+ KG(s) H(s) =0
lf we write. H(s) rewritten as:
=S
a(s) then this cquation can be

Page 29
Department GCET Gr. NOIDA
of Electronics & Communication Engineering,
Control System Lab

KEC-652

a(s) + Kb(s) = 0
a(s)
K + b(s) =0

Let n be the
of a(s) and mbe the
order
order of b(s) (the order of
the polynomial corresponds to the
highest power of s).

Plotting the root locus of a transfer function:


Consider an open-loop system which has a transfer
function of
H(s) Y(s) S+7
R(s)
S(S+5)(S+15)(S+20)
MATLAB CODE:

Clc % clear
Close all command window
% close figure
Clear all window
% clear all variable
s= tf('s);
system = (s + 7)/(s*(s + 5)*(s t 15*(s%transfer
+ 20))
function
rlocus(system)
axis([-22 4 -20 20]) % minimum and
zeta = 0.7; maximum value of x-axis and y-axis
wn = 1.8; % damping ratio
sgrid(zeta,wn) % damping frequency
(k,poles] =rlocfind(sys)
OUTPUT:

(AxsImecaognidas'r)y R o t LoCUs

-1(
Rea Axis (seconds)

Department of
Electronics & Communication Engineering, GCET Gr. NOIDA
Page 30
Control System Lab KEC-652

Root Locus

1:

(AseImcoaxng1dIsa'ry 10

1 8,

-10

16 -10
Real Axis (seconds)

trsnscer

3.79.S3

--7. g 6 3

RESULT:

The study of root locus of given transfer function, locates closed loop poles for different
values k.
Also find out Wa (Damping frequency) and W, (Natural frequency) for agiven root has been done
successfully.
VIVA QUESTIONS:

Define root locus technique.


What are the conditions of stability in root locus criteria?
What is the advantage of root locus technique?

Cpartment of Electronics &Communication Engineering, GCET Gr. NOIDA Page 31

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy