Electro Mechanic Project Last

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

MODERN CONTROL SYSTEM PROJECT

ADDIS ABABA SCIENCE AND TECHNOLOGY


UNIVERSITY
College of Electrical and Mechanical Engineering
Department of Electro-Mechanical Engineering

Modern Control Systems


Group Project
Group Members Id No

1. Kefale Tenaw-------------------------------------0565/09
2. Kirubel Menberu --------------------------------0588/09
3. Natnael Wondimu-------------------------------0765/09
4. Nahom Berhanu----------------------------------0741/09
Submitted To - Instructor Mitiku
17/06/2012 E.C

1
MODERN CONTROL SYSTEM PROJECT

Abstract

Water tankers and DC motors are amongst the common industrial components which need a
reliable, fast and quality controlling mechanism. In this project we will discuss level controlling
mechanisms for two tank system and position control for DC motors via with feedback
controller design, observer controller design and servo controller design.

Introduction

Liquid tanker level when two tankers are connected and there is flow between the tankers is
monitored and controlled in industries such as beverage processing, water boilers, water and
sewage treatment, etc. Motors are used in plenty more applications such as prime movers for
pumps, fans, compressors and more. Controlling the speed and position of the motor in an
issue of interest. Among the plenty options of control, we will use servo controller, forward
gain controller and observer gain controller.

2
MODERN CONTROL SYSTEM PROJECT

QUESTION 1
We are asked to design a servo controller for a DC motor where angular position, angular
velocity and armature current are the states and angular position is the output of the system.

Let us assume for the system given below, 𝑉 is the input voltage, angular position (𝜃) as the
output of the system, and armature current 𝑖, angular velocity (𝜔) and angular position (𝜃) are
the states of the DC motor.

Electronic design of the DC motor

Figure 1: DC Motor electro mechanical representation

Driving the state space representation of our system


Applying KVL on the armature circuit,
𝑑𝑖
−𝑉 + 𝐼𝑅 + 𝐿 +𝑒 =0
𝑑𝑡
But 𝑒 = 𝐾𝑏 𝜔 , (where Kb is back emf constant & Kt is motor torque constant)
𝑑𝑖
−𝑉 + 𝐼𝑅 + 𝐿 + 𝐾𝑏 ѡ = 0
𝑑𝑡
𝑑𝑖
𝐿 𝑑𝑡 + 𝐼𝑅 + 𝐾𝑏 ѡ = 𝑉 − − − − − −(1)

The free-body diagram of J=J1 would be


Applying equilibrium equation on it gives:
∑𝑇 = 0
𝑇𝑚 = 𝐽𝜃̈ + 𝐷𝜃̇
Figure 2: Mechanical model 𝑇𝑚 = 𝐽𝜔̇ + 𝐷𝜔

3
MODERN CONTROL SYSTEM PROJECT

But
𝑇𝑚 = 𝑇𝑒 = 𝐾𝑡 𝐼
𝐽𝜔̇ + 𝐷𝜔 = 𝐾𝑡 𝐼
𝑑𝜔
𝐽 + 𝐷𝜔 = 𝐾𝑡 𝐼 − − − − − −(2)
𝑑𝑡
Let, 𝑢 = 𝑉, 𝑦 = 𝜃, 𝑥1 = 𝑖, 𝑥2 = 𝜔 𝑎𝑛𝑑 𝑥3 = 𝜃
From equation 1
𝐿ẋ1 + 𝑅𝑥1 + 𝑘𝑏 𝑥2 = 𝑢
𝑹 𝒌𝒃 𝒖
ẋ𝟏 = − 𝒙𝟏 − 𝒙𝟐 + − − − − − − − (3)
𝑳 𝑳 𝑳
Form equation 2
𝐽ẋ2 + 𝐷𝑥2 = 𝑘𝑡 𝑥1
𝑲𝒕 𝑫
ẋ𝟐 = 𝒙𝟏 − 𝑱 𝒙𝟐 − − − − − − − − − (4)
𝑱

ẋ𝟑 = 𝒙𝟐 − − − − − − − −(5)
The state space representation becomes
𝑅 −𝑘𝑏
− 0 𝑥 1
ẋ1 𝐿 𝐿 1
[ẋ2 ] = 𝑘𝑡 −𝐷 [𝑥2 ] + [𝐿]
ẋ3 0 𝑥3 0
𝐽 𝐽 0
[ 0 1 0]
𝑥1
𝑦 = [0 0 ] 𝑥
1 [ 2]
𝑥3
𝑦 = 𝑥3

Let, R=20Ω, L=1H, Kb=0.5V/(rad/sec), Kt=0.5Nm/A, J=0.25 Kgm2, D=1NmSec/rad. These constants
are arbitrarily chosen from data found from the internet. They are the most common values.
Therefore, substituting the values gives:
−20 −0.5 0
A =[ 2 −4 0]
0 1 0
1
B = [ 0 ] , C = [0 0 1] , D = 0
0

4
MODERN CONTROL SYSTEM PROJECT

Design of Controller
Step 1: - Checking of controllability
M = [𝐵; 𝐴𝐵; 𝐴2 𝐵; … . ; 𝐴𝑛−1 B] = [𝐵; 𝐴𝐵; 𝐴2 𝐵]
−20 −0.5 0 1 −20
But, AB =[ 2 −4 0] [ 0 ] = [ 2 ]
0 1 0 0 0

−20 −0.5 0 −20 −0.5 0 399 12 0


𝟐
A =[ 2 −4 0] [ 2 −4 0] =[−48 15 0]
0 1 0 0 1 0 2 −4 0

399 12 0 1 399
𝟐
A B = [−48 15 0] [ 0 ] = [−48]
2 −4 0 0 2
1 −20 399
[𝑀] = [0 2 −48] , |𝑀| = 4 ≠ 0
0 0 2
Since the matrix determinant is not singular our matrix is of full rank therefor fully controllable.

Step2: Performance index of our matrix


Here, we select our desired dynamic response for our system. Percent overshoot and peak time
are selected accordingly to meet our desires.
Percentage overshoot is not a desirable property of a system since it may cause damage due to
over load, hence it is kept to a minimum value. For this case we have selected an overshoot value
of 15%. We have selected the settling time to be 2 seconds. Therefore, we can now find the
damping ratio and the natural frequency to determine the closed loop transfer function.
4
𝑇𝑠 =
𝜉𝜔𝑛
−𝜋𝜉
2
%𝑂𝑆 = 𝑒 √1−𝜉
−𝜋𝜉 −𝜋𝜉
√1−𝜉 2 √1−𝜉 2 −𝜋𝜉
0.15 = 𝑒 ⟹ ln(0.15) = ln (𝑒 ) ⟹ −1.9 =
√1 − 𝜉 2

√1 − 𝜉 2 = 1.65347𝜉
1 − 𝜉 2 = 2.7340𝜉 2
𝝃 = 𝟎. 𝟓𝟏𝟔𝟗
5
MODERN CONTROL SYSTEM PROJECT

4
𝜔𝑛 =
𝜉𝑇𝑠
4
𝜔𝑛 = 0.5169∗2
𝒓𝒂𝒅
= 𝟑. 𝟖𝟕 𝒔𝒆𝒄
𝜔2
𝑛 𝟏𝟒.𝟗𝟖
Therefore, 𝐺(𝑠) = 2 =
𝑠 2 +2𝜉 𝜔 𝑛 𝑠+𝜔𝑛 𝒔𝟐 +𝟒𝒔+𝟏𝟒.𝟗𝟖

To make this second order function a 3rd order, we add another pole that is far away to the left
from the dominant pole so that it has very little effect on the overall response. And we assume
that the exponential decay is negligible after five time constants. Thus, the added pole can be
five times farther to the left than the dominant poles. Therefore, let us take the third pole to be
S = -10
11.44
𝐺(𝑠) =
(𝑠 2 + 4𝑠 + 11.44)(𝑠 + 10)
11.44
𝐺(𝑠) =
(𝑠 − (−2 + 𝑗5.46))(𝑠 − (−2 − 𝑗5.46))(𝑠 + 10)
(𝑠 2 + 4𝑠 + 11.44)(𝑠 + 10) = 𝑠 3 + 14𝑠 2 + 51.44𝑠 + 114.4
Therefore, equating this result with equation (6) the results:
𝑠 3 + 14𝑠 2 + 51.44𝑠 + 114.4 = 𝑠 3 + (24 + 𝐾1 )𝑠 2 + (81 + 4𝐾1 + 2𝐾2 )𝑠 + 2𝐾3
14 = 24 + 𝐾1
𝑲𝟏 = −𝟏𝟎
81 + 4𝐾1 + 2𝐾2 = 51.44
81 + 4 ∗ (0) + 2𝐾2 = 51.44
𝑲𝟐 = 𝟓. 𝟐𝟐
114.4 = 2𝐾3
𝑲𝟑 = 𝟓𝟕. 𝟐
Now let we calculate the state space of the servo dc moter.
−20 −0.5 0 −10 5.22 57.2
[ 2 −4 0] -[ 0 0 0 ]
0 1 0 0 0 0

6
MODERN CONTROL SYSTEM PROJECT

−10 −5.22 −57.2 1 −10


A-BK=[ 2 −4 0 ] K1Br=-10[0]r =[ 0 ]r
0 1 0 0 0

ẋ1 −10 −5.22 −57.2 𝑥1 −10


[ẋ2 ] = [ 2 −4 0 ] [𝑥2 ] + [ 0 ]r
ẋ3 0 1 0 𝑥3 0
Y= [0 0 1] X
Then let we check the errors on the servo dc motor
U(∞)=-kx+K1r=0
𝑥1(∞)
=-(-10 5.22 57.2) [ 0 ]-10r
0

𝑟
=-(-10 5.22 57.2) [0]-10r
0

𝑟
=(10 -5.22 -57.2) [0]-10r
0
10r-10r=0
0=0
MATLAB and Simulink results and Observations

A=[-20 -0.5 0;2 -4 0;0 1 0];


B=[1; 0; 0];
C=[0 0 1];
D=0;
SS=ss(A,B,C,D) % Our state space
[num,den]=ss2tf(A,B,C,D);
Tf=tf(num,den) % Our transfer function
step (Tf) %The open loop response of our system

Figure 3 Open loop response

7
MODERN CONTROL SYSTEM PROJECT

K=[1 14 51.44 114.4]


roots (K)
P=roots (K)
k=place(A,B,P) % Here is our controler
Acl=(A-B*k)
[num1,den1]=ss2tf(Acl,B,C,D)
Tf1=tf(num1,den1)
step (Tf1) %The closed loop response of our system

Figure 4 Closed loop response

Bs=B*17.8713
SSsv=ss(Acl,Bs,C,D)
step (SSsv)

Figure 5 Servo controlled

8
MODERN CONTROL SYSTEM PROJECT

Figure 6 (b) System model


Figure 6 (a) Motor model

Figure 7 System response

Here we have managed to reach our desired overshoot and settling time by using a controller K
and by setting the servo controller we have managed to zero down our steady state error.

Designing a constant Gain Ke and K for our controller

Figure 8 Servo controller K


9
MODERN CONTROL SYSTEM PROJECT

QUESTION NUMBER 2:
Design observer and state feedback controller for DC motor
Here we are given a DC motor with only two state spaces, angular velocity and angular position.
To achieve this, we will assume our inductance to be zero, resulting our current component to
disappear resulting in a 2× 2 matrix.

Figure 9 DC Motor Model

Modeling the DC motor


For 𝑉𝑏 = 𝑏𝑎𝑐𝑘 𝑒𝑚𝑓, 𝑉𝑎 = 𝑎𝑟𝑚𝑎𝑡𝑢𝑟𝑒 𝑣𝑜𝑙𝑡𝑎𝑔𝑒 𝐼𝑎 = 𝐴𝑟𝑚𝑎𝑡𝑢𝑟𝑒 𝑐𝑢𝑟𝑒𝑛𝑡
𝜔 = 𝐴𝑛𝑔𝑢𝑙𝑎𝑟 𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦 θ = Angular displacement

𝐽𝑚 = 𝐼𝑛𝑒𝑟𝑡𝑖𝑎𝑙 𝑚𝑎𝑠𝑠, 𝐷𝑚 = 𝑑𝑎𝑚𝑝𝑖𝑛𝑔 𝑓𝑜𝑟𝑐𝑒


𝑅𝑎 = 𝐴𝑟𝑚𝑎𝑡𝑢𝑟𝑒 𝑟𝑒𝑠𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑘𝑏 , 𝑘𝑎 , 𝑘𝑡 = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡
𝑉𝑏 = 𝑘𝑏
𝑉𝑎 = 𝐼𝑎 + 𝑘𝑎 𝜔(𝑡) + 𝑉𝑏
𝑑𝜔(𝑡) 𝐷𝑚 𝑅𝑎 𝜔(𝑡)
𝑉𝑎 = 𝐽𝑚 𝑅𝑎 + + 𝑘𝑎 𝜔(𝑡)
𝑑𝑡 𝑘𝑡
𝑑𝜔(𝑡) 𝑉𝑎 𝐷𝑚 𝑘𝑡 𝑘𝑏
= −( + )𝜔(𝑡)
𝑑𝑡 𝐽𝑚 𝑅𝑎 𝐽𝑚 𝐽𝑚 𝑅𝑎

̇ 0 1 0
( 𝜃 ) =(
θ
) ( )+( )
𝜔̇ 0 − (Dm/Jm + ktkb/JmRa) 𝜔 kt/JmRa

10
MODERN CONTROL SYSTEM PROJECT

Here we have assumed the value of components as such :- La=0, Dm=3, Ra=2, Kt=2,
kb=0.5, Jm=0.5
̇
( 𝜃 ) =(
0 1 θ 0
) ( )+( )
𝜔̇ 0 −7 𝜔 2
θ
Y=(1 0) ( )
𝜔
0 1 0
A=( ) B=( ) C = (1 0)
0 −7 2
0 1 0
A-BK=( ) − ( )*(K1 k2)
0 −7 2
0 1 0 1
=( )−( )
0 −7 2𝑘1 2𝑘2
0 1
=( )
−2𝑘1 − 7 − 2𝑘2
𝑆 −1
SI-A+BK=( )
2𝐾1 𝑆 + 7 + 2𝐾2
Determinant of SI-A+BK= S2+(7+2K2)S+2K1……………..eqn(2.1)

We take 𝜉 and lambda by assuming


% os=15 and
Ts= 2 sec
OS
−ln(% )
100
From 𝜉= 2 2 𝑂𝑆 𝐓𝐬 = 𝟒/ 𝝃𝛚𝐧
√𝜋 +𝑙𝑛 (% )
100

𝝃=0.517 ωn=3.87

ωn^2
G(S)= s^2+2 𝜉ωn s+ ωn^2

From this our desired equation is:


TF= S2+2 𝜉ωnS+ωn2
TF= S2+4S+14.98……………………………………eqn(2.2)
Then We equate eqn (1) & eqn (2):

S2+4s+14.98=s2+(7+2k2)s+2k1

4=7+2k2 k2=-1.5

11
MODERN CONTROL SYSTEM PROJECT

2k1=14.98 k1=7.49

K=(𝟕. 𝟒𝟗 − 𝟏. 𝟓)

After we get the controller k we find the roots of the desired equation using quadratic equation
solving method:

S2+4s+14.98=0

S1,2=-2±j3.313

It is recommended that the poles of an observer should be two to five times faster than the
controller, hence we multiply the controller pole by five.

New roots 5S1,2= 5(-2±j3.313)

Then we can find the desired equation:

(S-5S1) (S-5S2) = S2+20s+374.5…………………………. eqn (2.3)

Next determinant (SI – A + KeC):

𝑠 + 𝑘𝑒1 −1
Determinant of ( )
𝑘𝑒2 𝑠+7

=(s+ke1) (s+7)+ke2

= S2+(7+Ke1)S+7Ke1+Ke2…………………………………….. eqn (2.4)

As we did before we also equate eqn (2.3) and eqn (2.4):

S2+20S+374.5=S2+(7+Ke1)S+7Ke1+Ke2

20=7+Ke1 Ke1=13

374.5=7Ke1+ke2 Ke2=283.5

Finally the matrix Ke become :-

𝑲𝒆𝟏 𝟏𝟑
Ke=( )=( )
𝑲𝒆𝟐 𝟐𝟖𝟑. 𝟓
MATLAB and Simulink results and observations.

12
MODERN CONTROL SYSTEM PROJECT

Here it can be observed that we have managed to achieve our desired overshoots and settling
time. It can also be concluded that the observer is matching the output of the plant (motor), we
can see this by referring to the error value or the difference between the observer output and
the plant output summing up to zero.

A=[0 1; 0 -7];
B=[0; 2];
C=[1 0];
D=0;
SS=ss(A,B,C,D) % Our state space
step (SS)

Figure 10 Open loop response

K=[1 4 14.98] % Our desired characteristic equation


roots (K)
P=roots (K)
k=place(A,B,P) % Here is our controller
Acl=(A-B*k)
[num1,den1]=ss2tf(Acl,B,C,D)
Tf1=tf(num1,den1)
step (Tf1) %The closed loop response of our system

Figure 11 Closed loop response

13
MODERN CONTROL SYSTEM PROJECT

Figure 12 (a)

Figure 12 (b) Motor model Figure 12 (c) Observer model

Figure 13 (a) Motor response Figure 13 (b) Motor state space

Figure 13 (c) Observer state space response Figure 13 (d) Error in observer estimation

14
MODERN CONTROL SYSTEM PROJECT

Designing a constant Gain Ke and K for our controller

Figure 13 Controller Ke

Figure 14 Controller K
15
MODERN CONTROL SYSTEM PROJECT

Question 3 and 4
#3,4. First we need to model the two-tank system

Figure 15 Two tank system

We have been given with, qin as the input flow rate, h2 (height of the second tank) is the
output, and the states as h1 (height of the first tank) and h2 (height of the second tank)
R is the resistance paused by the valve on the liquid flow, for liquid flow in such a pipe or
restriction is defined as the change in the level difference (the difference of the liquid levels of
the two tanks) necessary to cause a unit change in flow rate; that is,
change in level difference,m
𝑅= m-2sec
change in flow rate,m3sec

change in level difference,m


Solving for change in flow rate q= ,so from the figure above we can
R
write;
h2
𝑞𝑜 = -------------------------(1)
R2

h1−h2
𝑞1 = -----------------------(2)
R1

Since Volume V = Area base * height, and volume flow rate is q= Area base * rate change of
height
dh
𝑞 =𝐴∗ dt

Therefore
𝑑ℎ1
qin−𝑞 1= 𝐴1 ∗ ---------------(3)
𝑑𝑡

16
MODERN CONTROL SYSTEM PROJECT

𝑑ℎ2
q1−𝑞 0= 𝐴2 ∗ ---------------(4)
𝑑𝑡

Let us assume, U=qin y=h2 x1=h1 x2=h2


𝑑ℎ1 𝑑𝑥1
from equation (3) qin−𝑞 1= 𝐴1 ∗ =A1* 𝑑𝑡 =A1* Ẋ1
𝑑𝑡
qin−q1
Ẋ1 = , since qin=U and then substituting for q1 from (2)
A1
U−(h1−h2)/R1
Ẋ1 = A1
U h1 h2
Ẋ1 = - +
A1 A1R1 A1R1

U h1 h2
Ẋ1 = - + --------------------(5)
A1 A1R1 A1R1

𝑑ℎ2 𝑑𝑥2
From equation (4) q1−𝑞 0= 𝐴2 ∗ =A2* 𝑑𝑡 =A2* h2
𝑑𝑡
q1−qo
ℎ̇2= A2 then substituting for q1 from (2) and then substituting for qo from (1)
h1−h2 h2
ℎ̇2= R1A2 − R2A2

h1 1 1
ℎ̇2= − ℎ2 ( + )
R1A2 R1A2 R2A2

h1 𝑅1+𝑅2
ℎ̇2= − ℎ2( )
R1A2 R1R2A2

h1 −𝑅1−𝑅2
ℎ̇2= + ℎ2( ) ------------------------(6)
R1A2 R1R2A2

And from the given y=h2------------------------(7)


From equations (5), (6) and (7) the state space representation of the system can be written as
−1 1
1
ℎ1 A1R1 A1R1 ℎ1
( )=( 1 −𝑅1−𝑅2 )( ) +( A1)qin
ℎ2 ℎ2 0
A2R1 R1R2A2

ℎ1
y=(0 1) ( )
ℎ2
Assuming values for the area of each tanks and the resistance of each valves to be:
R1=0.25 m-2sec, R2=0.5 m-2sec , A1=1m2 and A2=0.5m2
ℎ1 −4 4 ℎ1 1
( )=( ) ( ) +( )U ------------------------(8)
ℎ2 8 − 12 ℎ2 0

17
MODERN CONTROL SYSTEM PROJECT

ℎ1
y=(0 1) ( )
ℎ2
The above is the state space representation of the system
Now, we shall select our performance index.
1. The settling time Ts
Ts is the time it takes before the step response remains within p percent of its steady state
value. The value p = 2 % is commonly used. It is given by;
𝟒
𝑻𝒔 = 𝛏𝛚𝐧

Since speed of response is indicated by The settling time as it is related to the time constant
of the control system, we will limit the location of the poles by specifying settling time value.
To compromise these two opposing requirements, we take a reasonable value of 2 second for
the settling time.
Ts= 2 sec
2. Percent overshoot, %OS.
Percent overshoot is the amount that the waveform overshoots the steady-state, or final, value
at the peak time, expressed as a percentage of the steady-state
value. It is given by;

To find ξ
𝐎𝐒
−𝐥𝐧(% )
𝟏𝟎𝟎
𝝃= 𝑂𝑆
√𝜋 2 +𝑙𝑛2 (% )
100

In many situations it is desirable to have an over-damped response with no overshoot. but in


real physical systems damping is unavoidable and that the underdamped second order system
is a common model for physical problems.
% 0S = 15%
Steady state error = 0.
Since with integral action in the controller, the steady-state error is always zero, we will take
zero value for the steady state error.
From these values of the performance indexes the required closed loop poles of the system will
be determined as follows.

18
MODERN CONTROL SYSTEM PROJECT

𝐎𝐒
−𝐥𝐧(% )
𝟏𝟎𝟎
𝝃= 𝑂𝑆
√𝜋 2 +𝑙𝑛2 (% )
100

−𝐥𝐧(𝟎.𝟏𝟓)
𝝃 =√𝜋2 =0.5169
+𝑙𝑛2 (0.15)

From settling time, we will calculate ωn


𝟒
𝑻𝒔 = 𝛏𝛚𝐧

𝟒
𝟒= , ωn=3.869
𝟎.𝟔∗𝛚𝐧

Since the poles are given by the following formula substituting the vales we will get;

Our poles will become:


The real part
δd= -ξωn=0.5169*3.869= -2
The imaginary part

ωd= ωn√𝜉 2 − 1)=3.869*√0.51692 − 1 =3.3


so
S1 =-2+j3.3 and S2=-2-j3.3 are the desired closed poles for our system.

To find our controller K first, we will check state controllability, the controllability matrix is
given by;
1 −4
Qc=[B AB]=( )
0 8
Then, |Qc|=8 i.e. different from 0, the system is completely state controllable.
We then determine of the state feedback gain matrix K, using direct substitution method
Let K= (𝑘1 𝑘2)
|sI - A + BK |=0
𝑠 0 −4 4 1
sI - A + BK=( )-( )+( ) (K1 K2)
0 𝑠 8 − 12 0
𝑠+4 −4 𝐾1 𝐾2 𝑠 + 4 + 𝐾1 𝐾2 − 4
( )+ ( )=( )
−8 𝑠 + 12 0 0 −8 𝑠 + 12

19
MODERN CONTROL SYSTEM PROJECT

𝑠 + 4 + 𝐾1 𝐾2 − 4
|( )|=0
−8 𝑠 + 12
S2 +(16+ K1)S+12K1+8K2+16=0------------------(9)
From the desired closed poles of the system
Equating equations (9) and (10) gives then comparing corresponding coefficients
S2 +3.998S +14.95= S2 +(16+ K1)S+12K1+8K2+16-----------------(10)
16+ K1 =3.998 12K 1+8K2+16=14.95
K1=-12.002 K2=17.87
state feedback gain matrix then becomes

K= (−𝟏𝟐. 𝟎𝟎𝟐 𝟏𝟕. 𝟖𝟕)

QUESTION NUMBER 3 CONTINUED FROM K


MATRIX
After we have controlled using K feedback the state space model of our servo controller for the
tank becomes:
𝟖. 𝟎𝟎𝟏𝟕 −𝟏𝟑. 𝟖𝟕
A-BK=[ ]
𝟖 −𝟏𝟐
8.002 − 13.87 ℎ1 −12.002
(Ḣ1) = ( ) ( ) +( )r
Ḣ2 8 − 12 ℎ2 0
ℎ1
Y=[0 1] ( )
ℎ2
U(∞)=-kh-k1r
ℎ1(∞)
=−(−12.002 17.87) ( ) -12.002r
ℎ2(∞)
𝑟
=(12.002 − 17.87) ( )-12.002r
0
=12.002 ∗ 𝑟-12.002r
0=0

U(∞)=0

20
MODERN CONTROL SYSTEM PROJECT

FOR THE QUESTION NUMBER 4 CONTINUED FROM K


VALUES
Here we have chosen the observer poles to be 5 times faster than the controller poles.
S1=5*(-1.9995+j3.31) = -9.998+j16.55
S2=5*(-1.9995-j3.31) = -9.998-j16.55
Solving for the matrix Ke, first we need to check the observability of the system. The
observability matrix is given by;
0 1
Qo= [C* C*A*] = ( )
8 − 12
Then, |Qo|= -8 which is different from 0, the system is completely observable.
Next, we need to find the observer gain matrix Ke by direct substitution method;
the characteristic equation for the observer becomes |sI - A + Ke C|=0
𝑠 0 −4 4 𝐊e1 (𝟎
sI - A + Ke C = ( ) -( )+( ) 𝟏)
0 𝑠 8 − 12 𝐊e2
𝐬+𝟒 −𝟒 0 𝐊e1 𝐬+𝟒 𝐊e1 − 𝟒
=( )+( )=( )
−𝟖 𝒔 + 𝟏𝟐 0 𝐊e2 −𝟖 𝐊e2 + 𝒔 + 𝟏𝟐

𝐬+𝟒 𝐊e1 − 𝟒
Then, |sI - A + Ke C|=|( )|=0
−𝟖 𝐊e2 + 𝒔 + 𝟏𝟐
= S2 +(16+ Ke2)S+8Ke1+4Ke2+16 = 0----------------------(11)
16+Ke2=19.996,
Ke2=3.996
8Ke1+4Ke2+16=373.86
Ke1=42.73
𝟒𝟐. 𝟕𝟑
Observer gain matrix then becomes Ke=( )
𝟑. 𝟗𝟗𝟔

̃̇ = (A - Ke C) 𝒉
𝒉 ̃ + Bu + Key------------------(13)

The control signal is ̃ ------------(14), substituting this to (13) gives


𝑢 = −𝑘𝒉

̃̇ = (A - KeC- BK)𝒉
𝒉 ̃ + Key

21
MODERN CONTROL SYSTEM PROJECT

̃̇ −4 4 42.73 (0 1 ̃ 42.73
(𝒉1) =(( )-( ) 1)-( ) ∗ (−12.002 17.86)) (𝒉𝟏)+( )y
̇𝒉
̃2 8 − 12 3.996 0 ̃
𝒉𝟐 3.996
The observer equation becomes

̃̇ 8.002 − 56.6 ̃ 42.73


(𝒉1) =( ) (𝒉𝟏) +( )y ---------------------- (15)
̃̇ 2
𝒉 8 − 15.996 𝒉 ̃𝟐 3.996

Since the Block diagram representation of system with a controller-observer is given by the
following diagram, the transfer function of the observer-controller is then, Transfer function of
the observer-controller becomes;
𝐔(𝐬)
=
−𝐘(𝐬)

Figure 16 Block diagram of controller-observer

Fig.2 Block diagram representation of system with a controller-observer.


𝐔(𝐬) −𝟒𝟒𝟏.𝟒𝐬+𝟒𝟒.𝟏
= ----------(16)
−𝐘(𝐬) s2 +7.996 s + 324.8

which is the transfer function of the observer-controller.


The transfer function of the plant is:
𝟖
TF = s2 +16 s + 16

Closed loop transfer function of the system


𝐘(𝐬) 𝐂(𝐬) ∗ 𝐆(𝐬)
=
𝐑(𝐬) 1 + G(s) ∗ C(s)

𝐘(𝐬) −𝟒𝟒𝟏. 𝟒𝐬 + 𝟒𝟒. 𝟏


=
𝐑(𝐬) s4 + 23.99s3 + 468.8s2 + 1797.6s + 5589.2

22
MODERN CONTROL SYSTEM PROJECT

MATLAB and Simulink results and observations.


For both the third and fourth questions we have developed a a forwade controller block, the sysytem
qives our system a desireable character.We will develop a servo controler for the third question while
an observer conteoler is developed for the fourth question. The result feom the servo controller is not 1
hence we use a compwnsator of inverse gain (1/9.6354), this will give us an ut put of unit step with our
desired properties. The same gain is applied over our observer controller. Our observer will develop an
ouput that is equvalent to the moters, hence the difference of the out put sums up to 0.

A=[-4 4; 8 -12];
B=[1;0];
C=[0 1];
D=[0];
SS=ss(A,B,C,D)
step (SS)

Figure 17 open loop response

K=[1 4 14.8225] % Our desired


characteristic equation
P=roots(K)
k=place(A,B,P);
Acl=(A-B*k);
[num1,den1]=ss2tf(Acl,B,C,D);
Tf1=tf(num1,den1);
step (Tf1)

Observed-state feedback control system the dynamics of the observed-state feedback control

Figure 17 Closed loop response


23
MODERN CONTROL SYSTEM PROJECT

system is given by;

Servo controller response

Figure 18 (a) Servo controller

Figure 18 (b) Tanker model

Figure 19 System output

24
MODERN CONTROL SYSTEM PROJECT

Figure 20 (a) Controller- Observer model

Figure 20 (c) Observer model

Figure 18 (b) Plant model

Figure 20 (a) Plant response Figure 20 (b) Plant state space response

Figure 20 (c) Observer state space response 25


Figure 20 (d) Error in observer estimation
MODERN CONTROL SYSTEM PROJECT

Comparing the height level of the two tankers

Figure 21 Height level comparison

As the filling process begins, the rate at which height two reaches the rise time value quicker
but the rise time value of h1 is greater than h2. Again, height two will reach its peak value faster
than h1 but the value of h1 is still greater. H1 seem to reach stability faster than h2 and the
steady state value of h1 remains greater than that of h2 for the rest of the system operation.

26
MODERN CONTROL SYSTEM PROJECT

Designing a constant Gain Ke and K for our controller

Figure 21 Observer tank Ke

27
Figure 22 Observer K
MODERN CONTROL SYSTEM PROJECT

Figure 23 Servo controller

Ke and K can be designed using amplifiers (Inverting op-amp, noninverting op-


amp and summing op amps). By carefully selecting the resistance one can achieve
certain amount of gain.

28

You might also like