You are on page 1of 6

ADDIS ABABA UNIVERSITY

Addis Ababa Institute of Technology


Center of Biomedical Engineering

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

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:


 Increased our level of MATLAB knowledge;
 Learnt to write the Mathematical Model of some systems using
MATLAB;
 Been able to build MATLAB/Simulink model of physical systems.
Exercise 1: Dynamics of Train System
b. MATLAB function that relates input engine force, F(t), and the output linear
displacement, x1(t).

function [ Transfer_Function ] = Lab2_Exercise1_TF( M1,M2,K,B)


%This Function Calculates the Transfer Function of the Dynamics of Train System when
the input
%parameters mass1(M1), mass2(M2), Spring Constant(K),and Damper Coefficient(B) are
given.

Numerator = [M2 B K]; Denominator = [M1*M2 B*(M1+M2) K*(M1+M2) 0 0];


Transfer_Function = tf(Numerator, Denominator);

end

Published with MATLAB® R2014b

c. MATLAB/Simulink Model for the system


Exercise 2: Dynamics of Single tank fluid level control system

i. Assuming inlet flow rate, Qi(t) as input variable and output flow rate,
Qo(t) as output variable.
b. MATLAB function that evaluates the system model

function [ Transfer_Function ] = Lab2_Exercise2i_TF( Cf,Rf )


%This Function Calculates the Transfer Function of the Dynamics of Singl Tank Fluid
Level Control System
%when the input parameters Fluid Capacitance Of the Tank(Cf), And Fluid Resistance Of
the Valve are given.

Numerator = [1]; Denominator = [Cf*Rf 1];


Transfer_Function = tf(Numerator, Denominator);

end

c. MATLAB/Simulink Model for the system


ii. Assuming Qi(t) as an input and h(t) as an output
b. MATLAB function that evaluates the system model

function [ Transfer_Function ] = Lab2_Exercise2ii_TF( Cf,Rf )


%This Function Calculates the Transfer Function of the Dynamics of Single Tank Fluid %
%Level Control System when the input parameters Fluid Capacitance Of the Tank(Cf), And
%Fluid Resistance Of the Valve are given.

Numerator = [Rf]; Denominator = [Cf*Rf 1];


Transfer_Function = tf(Numerator, Denominator);

end

Published with MATLAB® R2014b

c. MATLAB/Simulink Model for the system


Exercise 3: Dynamics of Multiple Tank System

b. MATLAB function that evaluates the system model

function [ Transfer_Function ] = Lab2_Exercise3_TF( Cf1,Cf2,Rf1,Rf2 )


%This Function Calculates the Transfer Function of the Dynamics of Multiple Tank
%System when the input parameters Fluid Capacitance of Tank1(Cf1), Fluid Capacitance
%of Tank2(Cf2), Fluid Resistance of Valve1(Rf1),and Fluid Resistance of Valve2(Rf2)
%are given.

Numerator = [1]; Denominator = [(Cf1*Cf2*Rf1*Rf2) (Cf2*Rf2 + Cf1*Rf1 +Cf1*Rf2) 1];


Transfer_Function = tf(Numerator, Denominator);

end

Published with MATLAB® R2014b

c. MATLAB/Simulink Model for the system

You might also like