LinearStateSpace
ptolemy.domains.ct.lib.LinearStateSpace

Linear state space model in the CT domain.

The State-Space model implements a system whose behavior is defined by:

 dx/dt = Ax + Bu
 y = Cx + Du
 x(0) = x0
 
where x is the state vector, u is the input vector, and y is the output vector. 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.
 
The actor accepts m inputs and generates r outputs through a multi-input port and a multi-output port. The widths of the ports must match the number of rows and columns in corresponding matrices, otherwise, an exception will be thrown.

This actor works like a higher-order function. It is opaque after construction or the change of parameters. Upon preinitialization, the actor will create a subsystem using integrators, adders, and scales. After that, the actor becomes transparent, and the director takes over the control of the actors contained by this actor.

Author(s): Jie Liu
Version:$Id: LinearStateSpace.java,v 1.51 2005/07/08 19:58:05 cxh Exp $
Pt.Proposed Rating:Red (liuj)
Pt.Accepted Rating:Red (cxh)


input
Multi-input port.

output
Multi-output port.

stateOutput
State output multiport.



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 equal to the number of rows of the A matrix. The number of columns must equal to the width of the input port. The default value is [[1.0]].

C
The C matrix in the state-space representation. The number of columns must equal to the number of columns of the A matrix. The number of rows must equal to the width of the output port. The default value is [[1.0]].

D
The D matrix in the state-space representation. The number of columns must equal to the width of the input port. The number of rows must equal to the width of the output port. The default value is [[0.0]].

initialStates
The initial condition for the state variables. This must be a vector (double matrix with only one row) whose length equals to the number of state variables. The default value is [0.0].