public class LTISystem extends java.lang.Object implements LinearSystem
Constructor and Description |
---|
LTISystem(float[][] A,
float[][] B,
float[][] C,
float[][] D,
float[] x0,
Units[] outputUnits)
Each argument is an array of arrays that represents a matrix.
|
Modifier and Type | Method and Description |
---|---|
DynamicalSystem |
clone() |
float[] |
f(float t,
float[] u)
The dynamic equation.
|
float[] |
g(float t,
float[] u)
The output equation.
|
float[][] |
getA() |
float[][] |
getA(float t) |
float[][] |
getB() |
float[][] |
getB(float t) |
float[][] |
getC() |
float[][] |
getC(float t) |
float[][] |
getD() |
float[][] |
getD(float t) |
int |
getInputDimension() |
int |
getOutputDimension() |
Units |
getOutputUnits(int outputDimension) |
float[] |
getState() |
int |
getStateDimension() |
void |
setA(float[][] newA) |
void |
setB(float[][] newB) |
void |
setC(float[][] newC) |
void |
setD(float[][] newD) |
void |
setInputDimension(int dim) |
void |
setOutputDimension(int dim) |
void |
setOutputUnits(int outputDimension,
Units units) |
void |
setState(float[] state) |
void |
setStateDimension(int dim) |
public LTISystem(float[][] A, float[][] B, float[][] C, float[][] D, float[] x0, Units[] outputUnits)
A
- Dynamics matrixB
- Input matrixC
- Output matrixD
- Passthrough matrixx0
- Initial stateoutputUnits
- Units in which each dimension of the output are expressedpublic float[] f(float t, float[] u)
DynamicalSystem
f
in interface DynamicalSystem
t
- Timeu
- Input vectorDynamicalSystem.f(float, float[])
public float[] g(float t, float[] u)
DynamicalSystem
g
in interface DynamicalSystem
t
- Timeu
- Input vectorDynamicalSystem.g(float, float[])
public float[] getState()
getState
in interface DynamicalSystem
DynamicalSystem.getState()
public void setState(float[] state)
setState
in interface DynamicalSystem
state
- New state vectorDynamicalSystem.setState(float[])
public int getInputDimension()
getInputDimension
in interface DynamicalSystem
DynamicalSystem.getInputDimension()
public void setInputDimension(int dim)
dim
- Input dimensionality. Affects B and D.public int getOutputDimension()
getOutputDimension
in interface DynamicalSystem
DynamicalSystem.getOutputDimension()
public void setOutputDimension(int dim)
dim
- Output dimensionality. Affects C and D.public int getStateDimension()
public void setStateDimension(int dim)
dim
- State (x) dimensionalitypublic Units getOutputUnits(int outputDimension)
getOutputUnits
in interface DynamicalSystem
outputDimension
- Numbered from 0DynamicalSystem.getOutputUnits(int)
public void setOutputUnits(int outputDimension, Units units)
outputDimension
- dimensionality of outputunits
- Units to work inpublic float[][] getA(float t)
getA
in interface LinearSystem
t
- Simulation timeLinearSystem.getA(float)
public float[][] getA()
public void setA(float[][] newA)
newA
- New dynamics matrixpublic float[][] getB(float t)
getB
in interface LinearSystem
t
- Simulation timeLinearSystem.getB(float)
public float[][] getB()
public void setB(float[][] newB)
newB
- New input matrixpublic float[][] getC(float t)
getC
in interface LinearSystem
t
- Simulation timeLinearSystem.getC(float)
public float[][] getC()
public void setC(float[][] newC)
newC
- New output matrixpublic float[][] getD(float t)
getD
in interface LinearSystem
t
- Simulation timeLinearSystem.getD(float)
public float[][] getD()
public void setD(float[][] newD)
newD
- New passthrough matrixpublic DynamicalSystem clone() throws java.lang.CloneNotSupportedException
clone
in interface DynamicalSystem
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if something causes clone not to workDynamicalSystem.clone()