You are on page 1of 31

Persamaan (Model) Ruang Keadaan

(State-Space Model Equations)


Dr. Abdul Wahid Surhim

2017
SISTEM: CSTR EKSOTERMIK
Model Dinamik
• Neraca massa sekitar tank
dV
 Fi   F
dt
• Neraca energi sekitar tank

dTE
 FT Ei  FT E  Q  WT
dt
Model Dinamik
• Neraca massa sekitar jaket
dV j  j
 Fji  j  Fj  j
dt
• Neraca energi sekitar jaket

dT j Fj Q
 (T ji  T j ) 
dt V j V j  j C pj
Persamaan Pemodelan
• Tank
dT F UA(T j  T )
 (Ti  T ) 
dt V Vc p
• Jaket

dT j Fj UA(T j  T )
 (T ji  T j ) 
dt Vj V j  jcp j
Parameter Steady State

Fs = 1 ft3/min V = 10 ft3
Cp = 61.3 Btu/F ft3 Tjis = 200 F
jCpj = 61.3 Btu/ F ft3 Tjs = 150 F
Tis = 50 F Vj = 1 ft3
Ts = 125 F

dT/dt = 0 maka UA = 183.9 Btu/oF min


dTj/dt = 0 maka Fjs = 15 ft3/min
Model Nonlinear Umum
x 1  f1  x1 ,..., xn , u1 ,..., um 
 
x n  f n  x1 ,..., xn , u1 ,..., um 
y1  g1 x1 ,..., xn , u1 ,..., um 
 
y r  g r x1 ,..., xn , u1 ,..., u m 

x adalah vektor dari n variabel keadaan (state variables)


u adalah vektor dari m variabel input dan
y adalah vektor dari r variabel output
Notasi Vektor

x  f x, u 
y  g x, u 
Elemen Matrik Linearisasi

f i
x  Ax  Bu
' ' '

Aij 
x j
x s ,u s y  Cx  Du
' ' '

f i
Bij 
u j
x s ,u s
x  Ax  Bu
g i
Cij 
x j
x s ,u s
y  Cx  Du Umumnya variabel keluaran
g i (y) bukan fungsi langsung
Dij 
u j x  Ax  Bu dari variabel masukan (u)
sehingga D = 0
x s ,u s

y  Cx
Persamaan Pemodelan
• Tank
dT F UA(T j  T )
 (Ti  T ) 
dt V Vc p
• Jaket
dT j Fj UA(T j  T )
 (T ji  T j ) 
dt Vj V j  jcp j

• Ubah ke:
x  Ax  Bu
y  Cx
Variabel-variabel VARIABEL
DEVIASI
• Variabel keadaan: T  Ts  (lihat lagi TIPS
x  LINEARISASI)
T j  T js 

• Variabel input:  F j  F js 
 
 F  Fs  MULTI VARIABEL (MIMO)
u
Ti  Tis  4-INPUT 2-OUTPUT
 
T jin  T jins 
• Variabel output:
T  Ts 
y 
T
 j  T js 
Persamaan Fungsi Dinamik

UA(T j  T )
 f1 T , T j , F j , F , Ti , T ji   (Ti  T ) 
dT F
dt V Vc p

Variabel Output Variabel Input

UA(T j  T )
 f 2 T , T j , F j , F , Ti , T ji  
dT j Fj
(T ji  T j ) 
dt Vj V j  jcp j
Elemen Matrik Ruang-Keadaan (A)

Tutunan parsial terhadap variabel keadaan (output):


f1 f1 f1 Fs UA
A11       0.4
x1  T  Ts  T V Vc p
f1 f1 f1 UA
A12      0.3
x2  T j  T js  T j Vc p
f 2 f 2 f 2 UA
A21      3.0
x1  T  Ts  T V j  j c pj
f 2 f 2 f 2 F js UA
A22       4.5
x2  T j  T js  T j V j V j  j c pj
Elemen Matrik B (1)

Tutunan parsial terhadap variabel input:

f1 f1 f
B11    1 00
u1  F j  F js  F j
f1 f1 f1 Ti  T
B12      7.5
u2  F  Fs  F V
f1 f1 f1 Fs
B13      0. 1
u3  Ti  Tis  Ti V
f1 f1 f1
B14    00
u4  T ji  T jis  T ji
Elemen Matrik B (2)

Tutunan parsial terhadap variabel input:

f 2 f 2 f 2 T jis  T js
B21      50
u1  F j  F js  F j Vj
f 2 f 2 f 2
B22    00
u2  F  Fs  F
f 2 f 2 f
B23    2 00
u3  Ti  Tis  Ti
f 2 f 2 f 2 F js
B24      15
u4  T ji  T jis  T ji V j
Matrik A, B, C

 0.4 0.3 
A 
 3  4.5
 0  7.5 0.1 0 
B 
50 0 0 15
1 0
CI 
0 1 
Penulisan di MATLAB

A=[-0.4 0.3;3 -4.5];


B=[0 -7.5 0.1 0;50 0 0 15];
C=eye(2);
D=[0 0 0 0;0 0 0 0];
G=ss(A,B,C,D);
step(G)
Respon Keluaran (T, Tj) terhada Masukan (Fj,
F, Ti, Tji)
Contoh 2:
Model Dinamik Diabatik CSTR
E
dC A F 
x1 (C A , T , C Af , T f , T j )   (C Af  C A )  k0 e RT C A
dt V

dT F   H   RTE UA
x 2 (C A , T , C Af , T f , T j )   (T f  T )    ko e C A  (T  T j )
 
dt V  C p  VC p

Tentukan matrik A, B, C, dan D


Data Parameter
Parameter Kasus 1 Kasus 2 Kasus 3
F/V, hr-1 1 1 1
k0, hr-1 14.825*3600 9.703*3600 18.194*3600
(-∆H), kcal/kgmol 5215 5960 8195
∆E, kcal/kgmol 11.843 11.843 11.843
cp, kcal/(m3oC) 500 500 500
Tf, oC 25 25 25
CAf, kgmol/m3 10 10 10
UA/V, kcal/(m3oC hr) 250 150 750
Tj, oC 25 25 25
CAs, kgmol/m3 5,518 8,564 2,359
Ts, oC 339,1 311,2 368,1
KONVERSI KE FUNGSI ALIH MATRIK

X(s)  s I A  BU( s )
1

 
Y(s)  Cs I A  B D U( s )
1

Jika D  0 : Y (s)  G( s ) U( s )
G( s )  C s I A  B
1
dengan
 a11 a12 
Jika s I A     ,
a21 a22 
 a22  a12 
maka s I A   
1 1
  a a a a
 21
a a11  11 22 21 12
Fungsi Alih
1 0  0.4 0.3   s  0.4  0.3 
s I A  s   3    3
 0 1    4 .5   s  4.5
s  4.5
s I A 1  
0.3  1
 3 s  0.4 ( s  4.5)( s  0.4)  (3)(0.3)
1 0  s  4.5 0.3 
Cs I A   
1 1
  
s  0.4 ( s  4.5)( s  0.4)  (3)(0.3)
0 1   3
 s  4.5 0.3 
Cs I A   
1 1

s  0.4 ( s  4.5)( s  0.4)  (3)(0.3)
 3
 s  4.5 0.3   0  7.5 0.1 0 
Cs I A  B  
1 1
 
s  0.4 50 
0 1.5 ( s  4.5)( s  0.4)  (3)(0.3)
 3 0
 (50)(0.3)  7.5( s  4.5) 0.1( s  4.5) (3)(1.5) 
Cs I A  B  
1 1

50( s  0.4) (3)( 7.5) (3)(0.1) 1.5( s  0.4) ( s  4.5)( s  0.4)  (3)(0.3)
 15 (7.5s  33.75) (0.1s  0.45) 0.45 
50s  20
  22.5 0.3 (1.5s  0.6)
Ada 8 FUNGSI ALIH
G
s 2  4.9s  0.9 ORDE-2
MATLAB: SS TO TF
A=[-0.4 0.3;3 -4.5];
B=[0 -7.5 0.1 0;50 0 0 15]; Nomor variabel
INPUT yang
C=eye(2);
ingin dilihat
D=[0 0 0 0;0 0 0 0]; fungsi alihnya
[num,den]=ss2tf(A,B,C,D,1)
num =

0 -0.0000 15.0000
0 50.0000 20.0000

den =

1.0000 4.9000 0.9000


T, Tj terhadap Fj

15
g11 ( s) 
s 2  4.9s  0.9

50s  20
g12 ( s) 
s 2  4.9s  0.9
T, Tj terhadap F

 7.5s  33.75
g (s) 
s 2  4.9s  0.9

 22.5
g (s) 
s 2  4.9s  0.9
T, Tj terhadap Ti

0.1s  0.45
g (s) 
s 2  4.9s  0.9

0.3
g (s) 
s 2  4.9s  0.9
T, Tj terhadap Tji

0.45
g (s) 
s 2  4.9s  0.9

1.5s  0.6
g (s) 
s 2  4.9s  0.9
Model dengan Simulink
 15 (7.5s  33.75) (0.1s  0.45) 0.45   F j 
 
T  50s  20  22.5 0.3 
(1.5s  0.6)  F 
T   Ti 
  s 2
 4.9s  0.9
 
j

T ji 
15
1
s2 +4.9s+.9
Fj
Transfer Fcn 1
T
-7.5s-33.75
2
F s2 +4.9s+.9
Transfer Fcn1 Add

.1s+.45
3
Ti s2 +4.9s+.9
15
Transfer Fcn2
s2 +4.9s+.9
.45 Transfer Fcn4
4
Tji s2 +4.9s+.9
-7.5s-33.75
Transfer Fcn3
s2 +4.9s+.9
Transfer Fcn5 2
Tj
.1s+.45
s2 +4.9s+.9
Add1
Transfer Fcn6

.45
s2 +4.9s+.9
Transfer Fcn7
Simulasi dengan Fungsi STEP
15
s2 +4.9s+.9
Fj Transfer Fcn

-7.5s-33.75 T
1
s2 +4.9s+.9
F Transfer Fcn1 Add

.1s+.45
50
s2 +4.9s+.9
15
Ti Transfer Fcn2
s2 +4.9s+.9
.45 Transfer Fcn4
200
s2 +4.9s+.9
-7.5s-33.75
Tji Transfer Fcn3
s2 +4.9s+.9
Transfer Fcn5

.1s+.45 Tj
s2 +4.9s+.9
Add1
Transfer Fcn6

.45
s2 +4.9s+.9
Transfer Fcn7
Menjalankan Simulasi
A=[-0.4 0.3;3 -4.5];
B=[0 -7.5 0.1 0;50 0 0 15];
C=eye(2);
D=[0 0 0 0;0 0 0 0];
stirredtankm = ss(A, B, C, D);
stirredtankm.InputName = {'Fj', 'F', 'Ti', 'Tji'};
stirredtankm.OutputName = {'T', 'Tj'};
step(stirredtankm)
Hasil Simulasi