Class StateSpace#
Defined in File StateSpace.h
Nested Relationships#
Nested Types#
Class Documentation#
-
class StateSpace#
Use provided non-linear equations to create a state space model of the form: x_dot = A*x + B*u, y = C*x + D*u from a nonlinear set of equations of the form x_dot = f(x,u), y = g(x,u)
Public Functions
-
StateSpace(int num_inputs, int num_outputs, int num_states, lin_fn state_deriv_fn, lin_fn output_fn, std::string_view mode = "forward")#
Create a StateSpace class. This uses non-linear equations to create a state space model of the form: x_dot = A*x + B*u, y = C*x + D*u from a nonlinear set of equations of the form x_dot = f(x,u), y = g(x,u)
- Parameters:
num_inputs – The number of inputs, u, in the state space model.
num_outputs – The number of outputs, y, in the state space model.
num_states – The number of states, x, in the state space model.
state_deriv_fn – The non-linear function, f, used to create the A and B matrices.
output_fn – The non-linear function, g, used to create the C and D matrices.
mode – The numerical differencing technique to use. “forward” for forward differencing and “central” for central differencing.
-
struct ss#
State space return type. This holds the A, B, C, and D matrices that make up the state space model.
-
StateSpace(int num_inputs, int num_outputs, int num_states, lin_fn state_deriv_fn, lin_fn output_fn, std::string_view mode = "forward")#