#include <dynamics.h>
Public Types | |
typedef ublas::vector< double > | vector |
Funciton that gives the time derivative of the state x'=f(t,x,u,p). | |
typedef ublas::matrix< double > | matrix |
typedef boost::function < vector(double, vector, vector, vector) > | PredictFun |
Public Member Functions | |
DynamicsModel (PredictFun f, vector x0, vector params) | |
vector | getParameters () const |
Returns the current parameter set (for system identification). | |
vector | getState () const |
Returns the current state. | |
vector | getStateDerivative (vector u) const |
Returns what the state derivative would be given an input. | |
vector | predict (vector x, vector u, double dt) const |
Predicts the next state given an input and a time difference. | |
void | setState (vector x) |
Sets the current state. | |
void | setParameters (vector p) |
Sets the current parameter estimate (for system identification). | |
vector | step (vector u, double dt) |
Simulates the system for a single time step. | |
void | setTime (const double &t) |
Sets the current simulation time. | |
Protected Attributes | |
PredictFun | _dxdt |
x'=f(t,x,u,p) | |
vector | _x |
state estimate | |
vector | _p |
parameter estimate | |
double | _t |
simulation time |
f | non-linear set of first order differential equations | |
x0 | initial state | |
params | initial parameter estimage |
ublas::vector< double > DynamicsModel::getStateDerivative | ( | vector | u | ) | const |
void DynamicsModel::setState | ( | vector | x | ) |
void DynamicsModel::setParameters | ( | vector | p | ) |
Sets the current parameter estimate (for system identification).
p | parameters |
References _p.
DynamicsModel::vector DynamicsModel::step | ( | vector | u, | |
double | dt | |||
) |
void DynamicsModel::setTime | ( | const double & | t | ) |