REPORT LAB 4 CONTROL Final
REPORT LAB 4 CONTROL Final
Laboratory Experiment 4
Submitted By:
Abstract:
This experiment holds the basis of performing analysis in MATLAB using different commands
and observing responses under different conditions.
Introduction:
In the following experiment we are going to first simultaneously reduce the block diagrams so
that it becomes easier to solve them in the mentioned software and then the analysis of the
control systems to different conditions will be done using the same software named MATLAB.
The programs will be coded in the command window along with the simulation results being
observed carefully.
Equipment (Softwares):
MATLAB
EXERCISE 1
Code
%EXERCISE 1
sysG1=tf(1,[1 10]);
sysG2=tf(1,[1 1]);
sysG3=tf([1 0 1],[1 4 4]);
sysG4=tf([1 1],[1 6]);
sysH1=tf([1 1],[1 2]);
sysH2=2;
sysH3=1;
sysupper=sysH2/sysG4;
sysG3G4=series(sysG3,sysG4);
sysloop1=feedback(sysG3G4,sysH1,+1);
sysG2loop1=series(sysG2,sysloop1);
sysloop2=feedback(sysG2loop1,sysupper);
% Closed Loop Transfer Function
systf_closed_loop=feedback(sysloop2,sysH3)
%Pole zero map
figure
pzmap(systf_closed_loop)
sgrid
Result
Closed Loop Transfer Function and Pole Zero Map
systf_closed_loop =
Code
% EXERCISE 2
sys_cltf = feedback(sys_series,[1])
figure
step(sys_cltf)
Result
Closed Loop Transfer Function and Step Response
Consider the Figure given below the final value of the step response of the system is 0.4 which is
2/5.
sys_cltf =
s + 2
-------------
s^2 + 5 s + 5
%EXERCISE 3
a=1;
b=8;
k=10.8e8;
j=10.8e8;
% J Reduced by 20%
j1=(10.8e8)*0.8;
% J reduced by 50%
j2=(10.8e8)*0.5;
sys_cont = tf([k k*a],[1 b]);
sys_spacecraft=tf(1,[j 0 0]);
sys_ser = series(sys_cont,sys_spacecraft);
sys_cl = feedback(sys_ser,[1])
t=[0:0.1:100];
% Nominal case
angle=10*pi/180; %Convert angle to radians
sys_cl=sys_cl*angle;
figure
step(sys_cl,t)
figure
step(sys_cl)
hold on
% J1
sys_cont1 = tf([k k*a],[1 b]);
sys_spacecraft1=tf(1,[j1 0 0]);
sys_ser1 = series(sys_cont1,sys_spacecraft1);
sys_cl1 = feedback(sys_ser1,[1]);
sys_cl1=sys_cl1*angle;
step(sys_cl1,t)
hold on
%J2
sys_cont2 = tf([k k*a],[1 b]);
sys_spacecraft2=tf(1,[j2 0 0]);
sys_ser2 = series(sys_cont2,sys_spacecraft2);
sys_cl2 = feedback(sys_ser2,[1]);
sys_cl2=sys_cl2*angle;
hold on
step(sys_cl2,t)
Result
Closed Loop Transfer Function
.
sys_cl =
1.08e09 s + 1.08e09
-----------------------------------------------
1.08e09 s^3 + 8.64e09 s^2 + 1.08e09 s + 1.08e09
Step Response
Step Response of system for J reduced by 20% and 50% and original system on same
graph.
EXERCISE 4
Code
%EXERCISE 4
%Feedback Function
sys_cltf=feedback(sysG,sysH)
figure
pzmap(sys_cltf)
sgrid
pole(sys_cltf)
zero(sys_cltf)
sys_cltf1=minreal(sys_cltf)
figure
pzmap(sys_cltf1)
sgrid
pole(sys_cltf1)
zero(sys_cltf1)
Results
Closed Loop Transfer Function
sys_cltf =
s^2 + 2 s + 1
-------------
s^2 + 4 s + 3
PZ Map
Closed Loop Poles and Zeros
Poles
-3
-1
Zeros
-1
-1
s+1
-----
s+3
-3
Zeros
-1