0% found this document useful (0 votes)
37 views27 pages

Acs Pract File 1

The document describes 6 experiments related to advanced control systems. Experiment 1 involves studying the open and closed loop time/frequency response of first/second order LTI systems using MATLAB. Experiment 2 involves converting transfer functions to state space models and vice versa. Experiment 3 determines the controllability and observability of state space models. Experiment 4 finds the eigenvectors, Jordan forms, and diagonal forms of systems. Experiment 5 converts transfer functions to discrete time state space models. Experiment 6 finds the state transition matrix of a given system.
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)
37 views27 pages

Acs Pract File 1

The document describes 6 experiments related to advanced control systems. Experiment 1 involves studying the open and closed loop time/frequency response of first/second order LTI systems using MATLAB. Experiment 2 involves converting transfer functions to state space models and vice versa. Experiment 3 determines the controllability and observability of state space models. Experiment 4 finds the eigenvectors, Jordan forms, and diagonal forms of systems. Experiment 5 converts transfer functions to discrete time state space models. Experiment 6 finds the state transition matrix of a given system.
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/ 27

1

ADVANCED CONTROL SYSTEM

GURU TEGH BAHADUR INSTITUTE OF TECHNOLOGY

NAME:- Deepanshu Mehalawat


ENROLLMENT NO:- 00413204920
7th Sem EEE
2

EXPERIMENT 1
AIM:- Study of open and closed loop time/frequency response of first/second
order system LTI system.
1(a) Step response of open loop system
2(b) Step response of closed loop system

SOFTWARE USED:- MATLAB R2a2020


MATLAB CODE:-
1(a)
clc;
clear all;
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');

1(b)
clc;
clear all;
close all;
A = [0 1; -2 -3];
B = [0 ; 1];
3

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:-
1(a)
4

1(b)
5

CONCLUSION:- Step response obtained


6

EXPERIMENT 2
AIM:- Conversion of Transfer Function to state model of LTI system and vice
versa.
2(a) Conversion of state space model to transfer function
2(b) Conversion of transfer function to state space model
2(c) Conversion of transfer function to state space model using convolution
2(d) To find transfer function of given state space model

SOFTWARE USED:- MATLAB R2a2020


MATLAB CODE:-
2(a)
clc;
clear all;
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)

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

2(c)
clc;
7

clear all;
close all;
num = [2 8 4];
a = conv([1 0], [1 2]);
den = conv(a, [2 5]);
[A B C D] = tf2ss(num, den)

2(d)
clc;
clear all;
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:-
2(a)

2(b)
8

2(c)
9

2(d)

CONCLUSION:- Conversion of transfer function to state space model and vice


versa obtained
10

EXPERIMENT 3
AIM:- Determine State Space Model of a given system and determine it’s
controllability and observability.
3(a) To find controllability and observability of a given state model
3(b) To find controllability and observability of system when eigen values are
given
3(c) ) To find controllability and observability of system when eigen values are
given

SOFTWARE USED:- MATLAB R2a2020


MATLAB CODE:-
3(a)
clc;
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
11

disp(' system is observable ')


else
disp(' system is unobservable ')
end

3(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

3(c)
clc;
close all;
12

%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:-
3(a)
13

3(b)

3(c)
14

CONCLUSION:- Controllability and observability was determined


15

EXPERIMENT 4
AIM:- 1. 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 R2a2020


MATLAB CODE:-
4(a)
clc;
clear all;
close all;
A = [4 3 -1; -2 0 2; 3 3 0];
B = eig(A)
[V,D] = eig(A)

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

4(c)
clc;
clear all;
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');
16

end
end
A=reshape(A,a,b)

X=int(A)
[V, J] = jordan(X)

4(d)
clc;
clear all;
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

4(e)
clc;
clear all;
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
17

OUTPUT:-
4(a)

4(b)
18

4(c)

4(d)
19

CONCLUSION:- Eigen vectors, JFC,DFC is obtained


20

EXPERIMENT 5
AIM:- Conversion of transfer function to state model of discrete time system
5(a) To find transfer function of a system and convert it to discrete time step
response
5(b) To find transfer function of a given system and convert it to discrete time
step response
5(c) To find transfer function of state space model and convert it to discrete
time step reponse
5(d) To find transfer function of a system and convert it to discrete time step
response with given time

SOFTWARE USED:- MATLAB R2a2020


MATLAB CODE:-
5(a)
clc;
clear all;
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');

5(b)
clc;
clear all;
21

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');

5(c)
clc;
clear all;
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')

5(d)
clc;
clear all;
close all;
A = [0 1; -24 -4];
B = [1 1 ;0 1];
22

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:-
5(a)
23

5(b)

5(c)
24

5(d)
25

CONCLUSION:- Conversion of transfer function to state model of discrete


time is obtained
26

EXPERIMET 6
AIM:- To find the State Transition Matrix of a given system.
SOFTWARE USED:- MATLAB R2a2020
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


27

You might also like