
LinearDifferenceEquationSystem |
ptolemy.actor.lib.LinearDifferenceEquationSystem |
Linear Difference Equation System.
The linear state-space model implements a system whose behavior
is defined by:
x(k+1) = Ax(k) + Bu(k)
y(k) = Cx(k) + Du(k)
x(0) = x0
where x is the state vector, u is the input vector, and y is the
output vector. (Note that in Ptolemy II, vectors are double matrices
with one column or one row.) The matrix coefficients must have the
following characteristics:
A must be an n-by-n matrix, where n is the number of states.
B must be an n-by-m matrix, where m is the number of inputs.
C must be an r-by-n matrix, where r is the number of outputs.
D must be an r-by-m matrix.
For each firing, the actor accepts one input DoubleMatrixToken of
dimension m x 1, and generates one output DoubleMatrixToken of
dimension r x 1.
In addition to producing the output y through port
output, the actor also produce the state values x
through port state.
Author(s): Jie Liu and Elaine Cheong
Version:$Id: LinearDifferenceEquationSystem.java,v 1.28 2005/10/28 20:14:49 cxh Exp $
Pt.Proposed Rating:Yellow (celaine)
Pt.Accepted Rating:Yellow (celaine)
state
Output port that produces DoubleMatrixToken of dimension
r x 1 (see class comment).
A
The A matrix in the state-space representation. It must be a
square matrix.
The default value is [[1.0]].
B
The B matrix in the state-space representation. The number of
rows must be equal to the number of rows of the A matrix. The
number of columns must be equal to the number of rows in the
input token. The default value is [[1.0]].
C
The C matrix in the state-space representation. The number of
columns must be equal to the number of columns of the A
matrix. The number of rows must be equal to the number of
columns in the output token. The default value is [[0.0]].
D
The D matrix in the state-space representation. The number of
columns must be equal to the number of rows in the input token
(a DoubleMatrixToken of dimension m x 1. The number of
rows must be equal to the number of columns in the output
token (a DoubleMatrixToken of dimension r x 1. The
default value is [[0.0]].
initialStates
The initial condition for the state variables. This must be a
column vector (double matrix with only one column) whose
length is equal to the number of state variables. The default
value is [0.0].
NOTE: Changes to this parameter will be * applied at the next
time when fire() is called.