[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lsim vs. filter for simulation in Octave 2.1.50
From: |
Geraint Paul Bevan |
Subject: |
Re: lsim vs. filter for simulation in Octave 2.1.50 |
Date: |
Fri, 17 Oct 2003 13:34:03 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
E. Joshua Rigler wrote:
|>If I have numerator and denominator filter coefficients:
|>
|> A = [1.0 .33]
|> B = [0.2 .10]
|> lag = [0 1] ;; not necessary for anything
|>
|>
|>...or if I have a system derived from a state-space description with:
|>
|>
|> A = -.33
|> B = .10
|> C = 1
|> D = 0.2
|> sys = ss2sys (A,B,C,D,1,0,1)
|>
I think the problem here is with your conversion from your ARMAX model
to a state space representation. Try this instead
Problem:
A = [1, 0.33]
B = [0.2, 0.1]
Y1 + 0.33 Y0 = 0.2 U1 + 0.1 U0
Let:
Y = Y1
X1 = Y0
X2 = U0
U = U1
Y = -0.33 X1 + 0.1 X2 + 0.2 U
dX1 = Y - X1
~ = -1.33 X1 + 0.1 X2 + 0.2 U
dX2 = U - X2
State space:
A = [ -1.33, 0.1 ; 0, -1 ];
B = [ 0.2; 1 ];
C = [ -0.33, 0.1 ];
D = [ 0.2 ];
sysd = ss2sys(A,B,C,D,1)
sysc = d2c(sysd)
- --
Geraint Bevan
http://homepage.ntlworld.com/geraint.bevan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAj+QN3YACgkQcXV3N50QmNO9TwCePH6MUz4EBqKBKCyLgLThgYQC
Rg0AnRAKcEQUZ6N/VuBjbcPEPU7ZoRuB
=goYg
-----END PGP SIGNATURE-----
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------