Está en la página 1de 3

Tanques en serie

syms x1 x2 x3 s1 s2 s3 a12 a23 as2 as3 q


f=[(1/s1)*(q-a12*sqrt(x1-x2)); (1/s2)*(a12*sqrt(x1-x2)-as2*sqrt(x2)-a23*sqrt(x2-x3));
(1/s3)*(a23*sqrt(x2-x3)-as3*sqrt(x3))];
x=[x1, x2, x3];
A=jacobian (f, x)
B=jacobian (f,q)
A=
[-a12/(2*s1*(x1 - x2)^(1/2)), a12/(2*s1*(x1 - x2)^(1/2)), 0]
[a12/(2*s2*(x1-x2)^(1/2)),-(as2/(2*x2^(1/2)+a12/(2*(x1 - x2)^(1/2))+a23/(2*(x2x3)^(1/2)))/s2,a23/(2*s2*(x2-x3)^(1/2))]
[0, a23/(2*s3*(x2 - x3)^(1/2)), -(as3/(2*x3^(1/2)) + a23/(2*(x2 - x3)^(1/2)))/s3]
B=
1/s1
0
0
q=2.78e-5;
s1=pi*(0.04/2)^2;
s2=pi*(0.04/2)^2;
s3=pi*(0.04/2)^2;
a12=0.72*pi*(0.0068/2)^2*sqrt(2*9.81);
a23=0.72*pi*(0.0054/2)^2*sqrt(2*9.81);
as2=0.72*pi*(0.0036/2)^2*sqrt(2*9.81);
as3=0.72*pi*(0.0036/2)^2*sqrt(2*9.81);
x2=(q/(as2+as3*sqrt(a23^2/(as3^2+a23^2))))^2
x1=(q/a12)^2+x2
x3=(a23^2/(as3^2+a23^2))*x2
A=[-a12/(2*s1*(x1 - x2)^(1/2)), a12/(2*s1*(x1 - x2)^(1/2)),0;a12/(2*s2*(x1-x2)^(1/2)),(as2/(2*x2^(1/2))-a12/(2*(x1 - x2)^(1/2))-a23/(2*(x2- x3)^(1/2)))/s2,a23/(2*s2*(x2x3)^(1/2));0,a23/(2*s3*(x2 - x3)^(1/2)),-(as3/(2*x3^(1/2)) + a23/(2*(x2 - x3)^(1/2)))/s3]
B=[1/s1;0;0]
C=[1,0,0]
D=0
sys = ss([A],[B],[C],[D]);
tf(sys)
sys = ss(A,B,C,D)

x2 =
0.2002

x1 =
0.2578

x3 =
0.1672

A=
-0.1920 0.1920
0
0.1920 -0.3808 0.1599
0 0.1599 -0.1915

B=
795.7747
0
0

C=
1

D=
0

ans =
795.8 s^2 + 455.4 s + 37.68
-------------------------------------s^3 + 0.7643 s^2 + 0.1204 s + 0.002031
Continuous-time transfer function.

sys =
a=
x1
x2
x3
x1 -0.192 0.192
0
x2 0.192 -0.3808 0.1599
x3
0 0.1599 -0.1915
b=
u1
x1 795.8
x2
0
x3
0
c=
x1 x2 x3
y1 1 0 0
d=
u1
y1 0
Continuous-time state-space model.

También podría gustarte