Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

ADVANCED CONTROL SYSTEMS

Practical File
SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR
THE AWARD OF THE DEGREE OF

BACHELOR OF TECHNOLOGY
(Electrical & Electronics Engineering)

SUBMITTED BY:
Isha Verma
(42113204917)
7th Sem

SUBMITTED TO:
Mrs. Deepali Sharma

DEPARTMENT OF EEE
GURU TEGH BAHADUR INSTITUTE OF TECHNOLOGY
(AFFILIATED TO GURU GOBIND SINGH INDRAPRASTHA UNIVERSITY, DELHI)
NEW DELHI – 110064
NOVEMBER 2020
INDEX

1. Study of open loop and closed loop time/frequency responses of first/second


order LTI system.
2. Conversion of transfer functions to state model of LTI system and vice-
versa.
3. Determine State Space Model of a given system and determine its
controllability and observability.
4. Determine Eigen vectors, JCF, DCF.
5. Conversion of transfer functions to state model of discrete time system.
6. To determine state transition matrix of a given system.
7. Study of saturation and dead zone non-linearity using describing function
technique of a relay control.
8. To draw a phase trajectory of a given non-linear system.
EXPERIMENT 1
Aim - Study of open and closed loop time/frequency response of first/second
order system LTI system.
a. Step response of open loop system
b. Step response of closed loop system
Software used - MATLAB R2020b
MATLAB Code -
a).
clc;
clear;
close all;
A = [0 1; -2 -3];
B = [0 ; 1];
C = [1 0];
D = [0];
step(A,B,C,D,1)
grid on;
title('step response plot');
t=0:0.05:10;
xlabel('time t(sec)');
ylabel('output');

b).
clc;
clear;
close all;
A = [0 1; -2 -3];
B = [0 ; 1];
C = [1 2;0 2];
a= input('enter no. of rows ');
b= input('enter no. of columns ');

for i=1:a
for j=1:b
D(i,j)= input('enter values ');
end
end
D= reshape(D,a,b)
G= ss(A,B,C,D)
x0= [-1;0];
t=0:0.05:10;
initial(G,x0,t)
grid on;
title('step response plot');
xlabel('time t(sec)');
ylabel('output');
Output -
a).

b).
Conclusion - Step response obtained
EXPERIMENT 2
Aim - Conversion of Transfer Function to state model of LTI system and vice
versa.
a. Conversion of state space model to transfer function
b. Conversion of transfer function to state space model
c. Conversion of transfer function to state space model using convolution
d. To find transfer function of given state space model
Software used - MATLAB R2020b
MATLAB Code -
a).
clc;
clear;
close all;

A = [0 1 0; 0 0 1; -1 -5 -3];
B = [0; 5; -10];
C = [1 0 0];
D = [0];
[num, den] = ss2tf(A, B, C, D)

b).
clc;
clear;
close all;
num = [0 0 1 0];
den = [1 12 60 124];
[A, B, C, D] = tf2ss(num, den)

c).
clc;
clear;
close all;
num = [2 8 4];
a = conv([1 0], [1 2]);
den = conv(a, [2 5]);
[A B C D] = tf2ss(num, den)
d).
clc;
clear;
close all;
A = [0 1 0; 0 0 1; -5 -13 -7];
B = [0; 0; 7];
C = [1 0 0];
D = [0];
[num, den] = ss2tf(A, B, C, D)
G = tf(num, den)

Output -
a).

b).
c).

d).

Conclusion - Conversion of transfer function to state space model and vice


versa obtained.
EXPERIMENT 3
AIM - Determine State Space Model of a given system and determine its
controllability and observability.
a. To find controllability and observability of a given state model
b. To find controllability and observability of system when eigen values are
given
c. To find controllability and observability of system when eigen values are
given

Software used - MATLAB R2020b

MATLAB Code -

a).
clc;
clear;
close all;
A=[0 1;4 2];
n=2;
B=[1 ;0];
C=[0 1];
P=ctrb(A,B)
K=rank(P)
if K==n
disp(' system is controllable ')
else
disp(' system is uncontrollable ')
end
Q=obsv(A,C)
L=rank(Q)
if L==n
disp(' system is observable ')
else
disp(' system is unobservable ')
end
b).
clc;
close all;
%The eigen values are -1, -2, -3, -4
A=[1 0 0 0; 2 0 1 0 ; 0 0 4 5; 1 0 2 0];
n=4;
B=[1 ;1 ;1 ;1];
C=[1 1 1 0];
P=ctrb(A,B)
K=rank(P)
if K==n
disp(' system is controllable ')
else
disp(' system is uncontrollable ')
end
Q=obsv(A,C)
L=rank(Q)
if L==n
disp(' system is observable ')
else
disp(' system is unobservable ')
end

c).
clc;
close all;
%The eigen values are -1, -2, -3, -4
A=[1 0 0 0; 2 0 1 0 ; 0 0 4 5; 1 0 2 0];
n=4;
B=[0 ;1 ;1 ;0];
C=[1 0 1 0];
P=ctrb(A,B)
K=rank(P)
if K==n
disp(' system is controllable ')
else
disp(' system is uncontrollable ')
end
Q=obsv(A,C)
L=rank(Q)
if L==n
disp(' system is observable ')
else
disp(' system is unobservable ')
end
Output -
a).

b).
c).

Conclusion - Controllability and observability was determined.


EXPERIMENT 4
Aim1. For the third order system find the eigen vectors
2. Find the JFC of the system
3. Find the DFC of the system
Software Used - MATLAB R2020b
MATLAB Code -
a).
clc;
clear;
close all;
A = [4 3 -1; -2 0 2; 3 3 0];
B = eig(A)
[V,D] = eig(A)

b).
clc;
clear;
close all;
A = [0 6 -5; 1 0 2; 3 2 4];
[V, J]=jordan(A)

c).
clc;
clear;
close all;
a= input('enter no. of rows');
b= input('enter no. of columns');
for i=1:a
for j=1:b
A(i,j)= input('enter values');
end
end
A=reshape(A,a,b)

X=int(A)
[V, J] = jordan(X)
d).
clc;
clear;
close all;
A = [0 1 0; 0 0 1; -6 -11 -6];
B = eig(A)
T = [1 1 1;-1 -2 -3; 1 4 9];
C = inv(T)*A*T

e).
clc;
clear;
close all;
a= input('enter no. of rows ');
b= input('enter no. of columns ');
for i=1:a
for j=1:b
A(i,j)= input('enter values ');
end
end
A= reshape(A,a,b)
B = eig(A)
T = [1 1 1;B';(B.^2)'];
C = inv(T)*A*T

Output -
a).
b).

c).
d).

e).

Conclusion - Eigen vectors, JFC, DFC is obtained.


EXPERIMENT 5
Aim - Conversion of transfer function to state model of discrete time system
a. To find transfer function of a system and convert it to discrete time step
response
b. To find transfer function of a given system and convert it to discrete
time step response
c. To find transfer function of state space model and convert it to discrete
time step response
d. To find transfer function of a system and convert it to discrete time step
response with given time
Software used - MATLAB R2020b
MATLAB Code -
a).
clc;
clear;
close all;
num=[1]
den=[1 1 0]
sys=tf(num,den)
sysd=c2d(sys,1,'zoh')
td=0:0.1:0.25
step(sysd,td)
grid on;
title('step response plot');
xlabel('time');
ylabel('amplitude');

b).
clc;
clear;
close all;
num=[0 1 2 3]
den=[2 3 4 5]
G=tf(num,den)
gd=c2d(G,0.1,'zoh')
gd1=c2d(G,0.1,'zoh')
td=0:0.1:0.2
step(gd,td)
step(gd1,td)
grid on;
title('step response plot');
xlabel('discrete time');
ylabel('amplitude');
c).
clc;
clear;
close all;
A = [0 1; -24 -4];
B = [1 1 ;0 1];
C = [1 0;0 1];
D = [0 0; 0 0];
ts=0.01;
[F,G,H,J]= c2dm(A,B,C,D,ts,'zoh')

d).
clc;
clear;
close all;
A = [0 1; -24 -4];
B = [1 1 ;0 1];
C = [1 0;0 1];
D = [0 0; 0 0];
ts=0.01;
[F,G,H,J]= c2dm(A,B,C,D,ts,'foh')

Output -
a).
b).
c).
d).
Conclusion - Conversion of transfer function to state model of discrete time
is obtained.
EXPERIMENT 6
Aim - To find the State Transition Matrix of a given system.
Software used - MATLAB R2020b
MATLAB Code -
clc;
close all;
a=input('Enter the system matrix')
S=s;
I= eye(2,2);
y=[S*I];
z= [y-a];
x= inv(z);
STM= ilaplace(x)

Output -

Conclusion - STM of a given system is obtained.

You might also like