1 |
|
|
#ifndef MODEL_H |
2 |
|
|
#define MODEL_H |
3 |
|
|
|
4 |
|
|
#include <ddp-actuator-solver/dynamicmodel.hh> |
5 |
|
|
|
6 |
|
|
class ModelIP : public DynamicModel<double, 5, 1> { |
7 |
|
|
public: |
8 |
|
|
ModelIP(double& mydt, bool noiseOnParameters = 0); |
9 |
|
|
virtual ~ModelIP(){}; |
10 |
|
|
|
11 |
|
|
private: |
12 |
|
|
protected: |
13 |
|
|
// attributes // |
14 |
|
|
public: |
15 |
|
|
private: |
16 |
|
|
double dt; |
17 |
|
|
|
18 |
|
|
private: |
19 |
|
|
double J; |
20 |
|
|
double K_M; |
21 |
|
|
double f_VL; |
22 |
|
|
double R_th; |
23 |
|
|
double tau_th; |
24 |
|
|
|
25 |
|
|
private: |
26 |
|
|
stateVec_t Xreal, dX; |
27 |
|
|
stateVec_t x_next, k1, k2, k3, k4; |
28 |
|
|
stateMat_t Id; |
29 |
|
|
|
30 |
|
|
stateMat_t QxxCont; |
31 |
|
|
commandMat_t QuuCont; |
32 |
|
|
commandR_stateC_t QuxCont; |
33 |
|
|
|
34 |
|
|
protected: |
35 |
|
|
// methods // |
36 |
|
|
public: |
37 |
|
|
stateVec_t computeDeriv(double& dt, const stateVec_t& X, |
38 |
|
|
const commandVec_t& U); |
39 |
|
|
stateVec_t computeNextState(double& dt, const stateVec_t& X, |
40 |
|
|
const commandVec_t& U); |
41 |
|
|
void computeModelDeriv(double& dt, const stateVec_t& X, |
42 |
|
|
const commandVec_t& U); |
43 |
|
|
stateMat_t computeTensorContxx(const stateVec_t& nextVx); |
44 |
|
|
commandMat_t computeTensorContuu(const stateVec_t& nextVx); |
45 |
|
|
commandR_stateC_t computeTensorContux(const stateVec_t& nextVx); |
46 |
|
|
|
47 |
|
|
private: |
48 |
|
|
protected: |
49 |
|
|
// accessors // |
50 |
|
|
public: |
51 |
|
|
}; |
52 |
|
|
|
53 |
|
|
#endif // MODEL_H |