0% found this document useful (0 votes)
24 views

Control System

Uploaded by

vishnuraju2003
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Control System

Uploaded by

vishnuraju2003
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

BMS INSTITUTE OF TECHNOLOGY AND

MANAGEMENT
YELAHANKA – BANGALORE - 64
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING

CONTROL SYSTEM
AAT-2
BY
P V SAI ESHWAR-1BY22EC067
VISHNU A SHARMA-1BY22EC124
VISHNU RAJU B-1BY22EC125

UNDER THE GUIDANCE OF:


DR.SUREKHA R GONDKAr
PROBLEM NO:1
Determine the overall transfer function of a control
system.
THOERY: A transfer function is a compact way of representing the
relationship between the input of a system, and its output. It is a
mathematical model that captures the linear time invariant
dynamics of a system.

The transfer function H(s) is defined as the ratio of the Laplace


transform of the output Y(s) to the Laplace transform of the input
X(s), assuming all initial conditions are zero:
H(s)=Y(s)/X(s)
BLOCK DIAGRAM:

TO FIND: TF=C(S)/R(S)= 18 s^3 + 18 s^2 + 72 s + 72


s^5 + 3 s^4 + 6 s^3 + 24 s^2 - 10 s + 60

CODE: clc
clear all
close all
num1=[1]
den1=[1 0 4]
sys1=tf(num1, den1)

num2=[0 0 6]
den2=[0 1 0]
sys2=tf(num2, den2)

res1=feedback(sys2, sys1, +1)

num3=[0 0 3]
den3=[0 1 2]
sys3=tf(num3, den3)

res2=series(sys3,res1)

num4=[0 0 1]
den4=[0 1 1]
sys4=tf(num4, den4)

res1=feedback(res2, sys4)
RESULT:
num1 =

den1 =

1 0 4
sys1 =

1
-------
s^2 + 4

num2 =

0 0 6

den2 =

0 1 0

sys2 =

6
-
s

res1 =

6 s^2 + 24
-------------
s^3 + 4 s - 6

num3 =

0 0 3

den3 =

0 1 2

sys3 =

3
-----
s + 2

res2 =

18 s^2 + 72
------------------------------
s^4 + 2 s^3 + 4 s^2 + 2 s - 12

num4 =

0 0 1
den4 =

0 1 1

sys4 =

1
-----
s + 1

res1 =

18 s^3 + 18 s^2 + 72 s + 72
----------------------------------------
s^5 + 3 s^4 + 6 s^3 + 24 s^2 - 10 s + 60
PROBLEM NO:2
Determine rise time, peak time, peak overshoot and settling time
for the given transfer function.

THEORY: The time response of control system consists of two parts.


Transient response and steady state response. C(t)= Ctr(t) + Css(t).
Most of the control systems use time as its independent variable.
Analysis of response means to see the variation of output with
respect to time. The output of the system takes some finite time to
reach to its final value. Every system has a tendency to oppose the
oscillatory behavior of the system which is called damping. The
damping is measured by a factor called damping ratio of the
system. If the damping is very high then there will not be any
oscillations in the output. The output is purely exponential. Such
system is called an over damped system. If the damping is less
compared to over damped case then the system is called a critically
damped system. If the damping is very less then the system is
called under damped system. With no damping system is
undamped.

CODE: clc;
clear all;
close all;
num=input('enter the numerator coefficients');
den=input('enter the denominator coefficients');
system=tf(num,den);
system
step(system)
grid on;
wn=sqrt(den(1,3));
zeta= den(1,2)/(2*wn);
wd=wn*sqrt(1-zeta^2);
disp('Delay time in seconds is')
td=(1+0.7*zeta)/wd
disp('Rise time in seconds is')
theta=atan(sqrt(1-zeta^2)/zeta);
tr=(pi-theta)/wd disp('Peak time in seconds');
tp=pi/wd disp('Peak overshoot is');
mp=exp(-zeta*pi/sqrt(1-zeta^2))*100
disp('settling time in seconds is');
ts=4/(zeta*wn)

RESULT:
enter the numerator coefficients
[100]
enter the denominator coefficients
[1 12 100]

system =

100
----------------
s^2 + 12 s + 100

Delay time in seconds is

td =

0.1775

Rise time in seconds is

tr =

0.2768

Peak time in seconds

tp =

0.3927

Peak overshoot is

mp =

9.4780

settling time in seconds is

ts =

0.6667
PROBLEM NO:3
Determination of frequency response of a second order System

THEORY: By the term frequency response, we mean the steady-


state response of a system to a sinusoidal input. Industrial control
systems are often designed using frequency response methods.
Many techniques are available in the frequency response methods
for the analysis and design of control systems.

Consider a system with sinusoidal input r(t)= Asin ωt


The steady-state output may be written as, c(t)= Bsin (ωt+ φ).

The magnitude and the phase relationship between the sinusoidal


input and the steady state output of a system is called frequency
response.

The frequency response test is performed by keeping the


amplitude A fixed and determining B and Φ for a suitable range of
frequencies. Whenever it is not possible to obtain the transfer
function of a system through analytical techniques, a frequency
response test can be used to compute its transfer function. The
design and adjustment of the open-loop transfer function of a
system for specified closed-loop performance is carried out more
easily in the frequency domain. Further, the effects of noise and
parameter variations are relatively easy to visualize and assess
through frequency response.
The transfer function T(s)=C(s)/R(s) is then:
CODE: %Frequency Response of second order system
clc;
clear all;
close all;
num= [100];
den= [1 12 100];
%Transfer function
sys=tf(num, den);
disp(sys);
wn=sqrt(den (1,3))
zeta= den(1,2)/(2*wn)
w=linspace (0,1);% to take 100 points between 0 and 1, normalized
value
u=w/wn;
len=length(u)
for k=1: len
m(k)=1/(sqrt((1-u(k)^2)^2 +(2*zeta*u(k)) ^2));
phi(k)=-atan((2*zeta*u(k))/(1-u(k)^2)) *180/pi;
end
subplot (2,1,1);
plot (w, m);
xlabel ('normalized frequency');
ylabel('magnitude');
subplot (2,1,2);
plot (w, phi);
xlabel ('normalized frequency');
ylabel('phase');
disp ('resonant peak is');
mr=1/(2*zeta*sqrt(1-zeta^2))
disp ('resonant frequency in rad/sec is');
wr=wn*sqrt(1-2*zeta^2)
disp ('bandwidth in rad/sec is');
wb=wn*sqrt(1-2*zeta^2+sqrt(2-4*zeta^2+4*zeta^4))
disp ('phase margin in degrees is');
pm=180+(atan (2*zeta/sqrt (-2*zeta^2+sqrt (4*zeta^4 +1))))
*180/pi

RESULT: sys = 100 ---------------- s^2 + 12 s + 100


wn = 10
zeta = 42 0.6000
len = 100
resonant peak is:
mr = 1.0417
resonant frequency in rad/sec is:
wr = 5.2915
bandwidth in rad/sec is:
wb = 11.4824
phase margin in degrees is:
pm = 239.1873
PROBLEM NO:4
To obtain and plot the Unit step, Unit ramp response of a closed
loop control system.

THEORY:
a)Unit step and Unit ramp response of a closed loop control system
using direct method

CODE: clc
close all
clear all
num=[0 0 4]
den=[1 5 4]
t=0:0.005:2;
r=t;
c1=step(num,den,t);
c2=lsim(num,den,r,t);
subplot(2,1,1)
plot(t,c1)
title('Unit Step response')
xlabel('t in secs')
ylabel('c1(t)');
subplot(2,1,2)
plot(t,c2)
title('Unit Ramp response')
xlabel('t in secs')
ylabel('c2(t)');
RESULT:

b)Unit step and Unit ramp response of a closed loop control system
using Inverse Laplace transform command.

CODE: clc
close all
clear all
syms s
complex t=0:0.005:2;
R1=1/s;
T=4/(s^2+5*s+4);
C1=R1*T;
c1=ilaplace(C1)

x1=exp(-4*t)/3 - (4*exp(-t))/3 + 1;

R2=1/s^2; T=4/(s^2+5*s+4);
C2=R2*T;
c2=ilaplace(C2)
x2=t + (4*exp(-t))/3 - exp(-4*t)/12 - 5/4;

subplot(2,1,1)
plot(t,x1)
title('Unit Step response')
xlabel('t in secs')
ylabel('c1(t)');
subplot(2,1,2)
plot(t,x2)
title('Unit Ramp response')
xlabel('t in secs')
ylabel('c2(t)')

RESULT: c1 =

exp(-4*t)/3 - (4*exp(-t))/3 + 1

c2 =

t + (4*exp(-t))/3 - exp(-4*t)/12 - 5/4


PROBLEM NO:5
Determine gain margin, phase margin, gain crossover frequency
and phase crossover frequency for Bode plot of the given transfer
function.

THEORY: One of the most useful representation of transfer function


is a logarithmic plot which consists of two graphs, one giving the
logarithm of [G (jw)] and the other phase angle of G(jw) both
plotted against frequency in logarithmic scale. These plots are
called bode plots. The main advantage of using bode diagram is
that the multiplication of magnitudes can be converted into
addition. Bode plots are a good alterative to the Nyquist plots.
Frequency response specifications:
1. Gain cross over frequency wgc = It is the frequency at which
magnitude of G (jw) H (jw) is unity ie 1.
2. Phase cross over frequency wpc = It is the frequency at which
phase angle of G(jw) H(jw) is -180o
3. Gain margin G.M = It is defined as the margin in gain allowable
by which gain can be increased till system reaches on the verge of
instability. Mathematically it is defined as the reciprocal of the
magnitude of the G(jw) H(jw) measured at phase cross over
frequency.
4. Phase margin P.M = Amount of additional phase lag which can be
introduced in the system till system reaches on the verge of
instability. Mathematically it can be defined as P.M = 180o +
∟G(jw)H(jw) at w=wgc

CODE:
a)Given Transfer fuction : 36 / (s3+6s2+11s+6) .
Program :
num = [36];
den = [1 6 11 6];
sys = tf (num , den)
bode (sys)
margin(sys)

RESULT: sys =

36
----------------------
s^3 + 6 s^2 + 11 s + 6

You might also like