[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Butter Filters
From: |
A S Hodel |
Subject: |
Re: Butter Filters |
Date: |
Mon, 17 Feb 2003 08:31:51 -0600 |
State space realizations are not unique. (Similarity transformations
allow for a change
of the "invisible" state variables in a state space realization. See
Brogan's book, Modern
Control Theory, for details, or look at my lecture notes
ftp://ftp.eng.auburn.edu/pub/hodel/7500/ControlsNotes.pdf
If the original system was created with tf2sys, Octave's state space
realizations are
in controllable canonical form. If made with zp2sys, then the state
space realization
is in a in a quasi-modal form (not to be confused with the Victor Hugo
novel character
of a similar name).
Example: tf form:
octave:6> sys = tf2sys([1 2 3],[4 5 6 7 8]); sysout(sys,"ss");
Input(s)
1: u_1
Output(s):
1: y_1
state-space form:
4 continuous states, 0 discrete states
State(s):
1: x_1
2: x_2
3: x_3
4: x_4
A matrix: 4 x 4
0.00000 1.00000 0.00000 0.00000
0.00000 0.00000 1.00000 0.00000
0.00000 0.00000 0.00000 1.00000
-2.00000 -1.75000 -1.50000 -1.25000
B matrix: 4 x 1
0
0
0
1
C matrix: 1 x 4
0.75000 0.50000 0.25000 0.00000
D matrix: 1 x 1
0
Same example, but in zp form. Here the A-matrix is in an upper
triangular form with 2x2 blocks corresponding to complex conjugate
pairs:
octave:8> [zer,pol,k] = sys2zp(sys);
octave:9> sysout(zp2sys(zer,pol,k),"ss");
Input(s)
1: u_1
Output(s):
1: y_1
state-space form:
4 continuous states, 0 discrete states
State(s):
1: x_1
2: x_2
3: x_3
4: x_4
A matrix: 4 x 4
0.00000 1.00000 0.00000 0.00000
-1.42101 -1.93614 1.00000 0.00000
0.00000 0.00000 0.00000 1.00000
0.00000 0.00000 -1.40745 0.68614
B matrix: 4 x 1
0
0
0
1
C matrix: 1 x 4
0.39475 0.01597 0.25000 0.00000
D matrix: 1 x 1
0
In both cases, you should get C * inv( s I - A ) * B to be identical.
That's your transfer function.
On Monday, February 17, 2003, at 06:58 AM, Doug Stewart wrote:
I have made the changes to butter.m, so that it now does the same thing
as Matlab's butter.m
I am in the testing phase, and I found that the state space model from
Matlab is different than the SS model from Octave. I am a little weak
on
SS theory but if I remember corectly SS models can be displayed in
different ways.
Is this true?? Would some one please clue me in so I can finish
testing this, and donate it to the Octave group.
I will do cheby1, cheby2 and ellip after I get this tested.
Doug Stewart
Doug Stewart wrote:
_
_ Paul Kienzle wrote:
_
__ Doug Stewart wrote:
__
___ Is there a M file to make laplace space filters rather than Z
space
___ filters?
__
__
__
__ You just need to skip the bilinear command in butter.m. How
__ about checking for a file arg of 's' on the command line and using
__ that to decide if you are going to call bilinear. Patches for
butter,
__ cheby1, cheby2 and ellip will be much appreciated.
__
__ Paul Kienzle
__ address@hidden
_
_
_ I will gladly make these changes. Just thought that they might by
done
_ allready by someone else. If not I will do it.
_ Doug Stewart
_
-------------------------------------------------------------
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
-------------------------------------------------------------
A. S. Hodel, Assoc. Prof, Dept. Elect & Comp Eng, Auburn University, AL
36849-5201
(334) 844-1854 200 Broun Hall address@hidden
http://www.eng.auburn.edu/~scotte
-------------------------------------------------------------
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
-------------------------------------------------------------