Continuous state space system. More...
Public Member Functions | |
state_space (void) | |
Constructor. | |
void | Initialize (const char *filename) |
Initialize with a filename. | |
void | Initialize (const ml_matrix &a, const ml_matrix &b, const ml_matrix &c, const ml_matrix &d) |
Initialize with matrices. | |
ml_matrix | RHS (const ml_matrix &x, const ml_matrix &u) |
Update the right-hand-side. | |
ml_matrix | GetOutput (const ml_matrix &x, const ml_matrix &u) |
Get the output. | |
bool | CheckDimensions (void) |
Check the matrix dimensions. |
State space model
Continuous state space system.
void state_space::Initialize | ( | const char * | filename ) |
Initialize the model from an ASCII text engine data file.
The matrices are a b c d Each begins with [ and ends with ]
filename | The file name |
void state_space::Initialize | ( | const ml_matrix & | a, |
const ml_matrix & | b, | ||
const ml_matrix & | c, | ||
const ml_matrix & | d | ||
) |
Initialize the state space system x(k+1) = ax(k) + bu(k) y(k) = cx(k) + du(k).
a | State transition matrix |
b | Input matrix |
c | Output matrix |
d | Feedthrough matrix |
ml_matrix state_space::RHS | ( | const ml_matrix & | x, |
const ml_matrix & | u | ||
) |
Update the state space system.
x | State |
u | Input |
bool state_space::CheckDimensions | ( | void | ) |
Checks state space system dimensions.