Public Member Functions

state_space Class Reference

Continuous state space system. More...

List of all members.

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.

Detailed Description

State space model

\[ y = cx + du \dot{x} = ax + bu \]

Continuous state space system.


Member Function Documentation

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 ]

Parameters:
filenameThe 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).

Parameters:
aState transition matrix
bInput matrix
cOutput matrix
dFeedthrough matrix
ml_matrix state_space::RHS ( const ml_matrix &  x,
const ml_matrix &  u 
)

Update the state space system.

Parameters:
xState
uInput
Returns:
Updated state
bool state_space::CheckDimensions ( void   )

Checks state space system dimensions.

Returns:
True if dimensions are correct.