You are on page 1of 9

ADDIS ABABA UNIVERSITY

Addis Ababa Institute of Technology


Center of Biomedical Engineering

Laboratory Report
Course Name: - Control Engineering
Course Code: - ECEG-4150
Experiment No:- 3

Group Members
Name ID.No.
1. Tilahun Aligaz ATR/3575/08
2. Sofani H/Selassie ATR/1975/08
3. Robel Tekeba ATR/5236/08
4. Semere Yitfessah ATR/6332/08
5. Melake Shiferaw ATR/2871/08
6. Yohannes Kebbebe ATR/8396/08

Submitted to: Inst. Behailu G.


Submission Date: Dec. 21, 2018
Learning Outcomes

After completing this Lab Experiment, we have:


 Learnt MATLAB commands that would be used to reduce linear
systems block diagram using:
 Series,
 Parallel, and
 Feedback Configurations
 Understood block diagram reduction algebra.
Exercise 1

%Lab Experiment Number 3: Block Diagram Reduction


%Exercise 1
%Declaration and Initialization of G1
numG1=[1]; denG1=[1 10];
G1=tf(numG1,denG1);
%Declaration and Initialization of G2
numG2=[1]; denG2=[1 1];
G2=tf(numG2,denG2);
%Declaration and Initialization of G3
numG3=[1 0 1]; denG3=[1 4 4];
G3=tf(numG3,denG3);
%Declaration and Initialization of G4
numG4=[1 1]; denG4=[1 6];
G4=tf(numG4,denG4);
%Declaration and Initialization of H1
numH1=[1 1]; denH1=[1 2];
H1=tf(numH1,denH1);
%Declaration and Initialization of H2
numH2=[2]; denH2=[1];
H2=tf(numH2,denH2);
%Declaration and Initialization of H3
numH3=[1]; denH3=[1];
H3=tf(numH3,denH3);
%We defined all the blocks one by one in the above.
%Now to get closed loop transfer function :-

%After the take off point is shifted beyond G4 block we get G4 G3 in series
sys1=series(G3,G4); %Series combination of G3 and G4
sys2=series(H2,1/G4); %Series Combination Of H2 And 1/G4
% 1/G4 is due to the shifting of take off point.

sys3=feedback(sys1,H1,+1);%Positive feedback with Feedback Gain H1


sys4=series(G2,sys3);
sys5=feedback(sys4,sys2,-1);
sys6=series(G1,sys5);
sys7=feedback(sys6,H3,-1);
System_TF = minreal(sys7)%canceling common factors

%We can get the poles and zeros of the transfer function as follows:-
Poles = pole(System_TF)
Zeros = zero(System_TF)
System_TF =

0.08333 s^4 + 0.25 s^3 + 0.25 s^2 + 0.25 s + 0.1667


-------------------------------------------------------
s^5 + 16.08 s^4 + 72.75 s^3 + 137 s^2 + 123.7 s + 59.33

Continuous-time transfer function.

Poles =

-10.1174 + 0.0000i
-2.4403 + 0.0000i
-2.3493 + 0.0000i
-0.5882 + 0.8228i
-0.5882 - 0.8228i

Zeros =

-2.0000 + 0.0000i
-1.0000 + 0.0000i
0.0000 + 1.0000i
0.0000 - 1.0000i

Published with MATLAB® R2014b


Exercise 2

%Lab Experiment Number 3: Block Diagram Reduction


%Exercise 2
% a)
J=10.8e+08;
k=10.8e+08;
a=1;
b=8;
NumCont = [k k*a]; % Numerator of the transfer function of the Controller Block
DenCont = [1 b]; % Denominator of the transfer function of the Controller Block.
Cont_TF = tf(NumCont, DenCont); % Transfer Function of the Controller Block
NumSpc = [1]; % Numerator of the transfer function of the Spacecraft Block
DenSpc = [J 0 0]; % Denominator of the transfer function of the Spacecraft Block.
Spc_TF = tf(NumSpc, DenSpc); % Transfer Function of the Controller Block
SeriesCombination = series(Cont_TF, Spc_TF); %Series combination of the two Blocks
FeedBack = feedback(SeriesCombination,[1],-1); %Negative Feedback Combination of
% SeriesCombination with Unity Gain
System_TF = minreal(FeedBack); %Cancelling common factors to get closed loop TF

% b)Computation And Ploting Of The Step Response To a 10 degree Step Input


Phase = (10*pi)/180; % Converting the degree to Radian
x = Phase * System_TF; % Multiplying the closed loop gain by the phase angle
step(x)
grid on
hold on

% c)Step Response Performance of the Spacecraft When the Moment of Inertia Decreases
% i) When J decreases by 20%, The new value of J becomes 80% of the Nominal Value
J = 0.8*10.8e+08;
NumCont = [k k*a]; % Numerator of the transfer function of the Controller Block
DenCont = [1 b]; % Denominator of the transfer function of the Controller Block.
Cont_TF = tf(NumCont, DenCont); % Transfer Function of the Controller Block
NumSpc = [1]; % Numerator of the transfer function of the Spacecraft Block
DenSpc = [J 0 0]; % Denominator of the transfer function of the Spacecraft Block.
Spc_TF = tf(NumSpc, DenSpc); % Transfer Function of the Controller Block
SeriesCombination = series(Cont_TF, Spc_TF); %Series combination of the two Blocks
FeedBack = feedback(SeriesCombination,[1],-1); %Negative Feedback Combination of
% SeriesCombination with Unity Gain
System_TF = minreal(FeedBack); %Cancelling common factors to get closed loop TF
y = Phase * System_TF;
step(y,'r-.')
hold on
% ii) When J decreases by 50%, the new value of J becomes 50% of the Nominal Value
J = 0.5*10.8e+08;
NumCont = [k k*a]; % Numerator of the transfer function of the Controller Block
DenCont = [1 b]; % Denominator of the transfer function of the Controller Block.
Cont_TF = tf(NumCont, DenCont); % Transfer Function of the Controller Block
NumSpc = [1]; % Numerator of the transfer function of the Spacecraft Block
DenSpc = [J 0 0]; % Denominator of the transfer function of the Spacecraft Block.
Spc_TF = tf(NumSpc, DenSpc); % Transfer Function of the Controller Block
SeriesCombination = series(Cont_TF, Spc_TF); %Series combination of the two Blocks
FeedBack = feedback(SeriesCombination,[1],-1); %Negative Feedback Combination of
% SeriesCombination with Unity Gain

System_TF = minreal(FeedBack); %Cancelling common factors to get closed loop TF


z = Phase * System_TF;
step(z,'k--')
legend('x = Nominal J', 'y = 80% of Nominal', 'z = 50% of Nominal J')
ylabel('SpaceCraft Response')

% DISCUSION:
% As it can be seen from the graph, as J decreases, the time duration until the output
settles down decreases.
% From this we can conclude that the performance gets better as the moment of Inertia,
J, Decreases.
Published with MATLAB® R2014b
Exercise 3

%Lab Experiment Number 3: Block Diagram Reduction


%Exercise 3
% a)
NumCont = [1]; % Numerator of the transfer function of the Controller Block
DenCont = [1 1]; % Denominator of the transfer function of the Controller Block
Cont_TF = tf(NumCont, DenCont); % Transfer Function of the Controller Block

NumPlant = [1 2]; % Numerator of the transfer function of Plant Block


DenPlant = [1 3]; % Denominator of the transfer function of the Plant Block
Plant_TF = tf(NumPlant,DenPlant); % Transfer Function of the Plant Block

SeriesCombination = series(Cont_TF, Plant_TF); %Series combination of the two Blocks


FeedBack = feedback(SeriesCombination,[1],-1); %Negative Feedback Combination of
% SeriesCombination with Unity Gain
System_TF = minreal(FeedBack) % Cancelling common factors

% b)Plot of unit Step Response of the System


step(System_TF)
grid on
ylabel('Plant Response')

% As it can be seen from the Plot, the final value of the Output is 2/5 = 0.4.

System_TF =

s + 2
-------------
s^2 + 5 s + 5

Continuous-time transfer function.


Published with MATLAB® R2014b

You might also like