| 1 | /* |
|---|
| 2 | * approx_esc_2d.h |
|---|
| 3 | * |
|---|
| 4 | * Created on: Jul 31, 2012 |
|---|
| 5 | * Berk Calli |
|---|
| 6 | * Organization: Delft Biorobotics Lab., Delft University of Technology |
|---|
| 7 | * Contact info: b.calli@tudelft.nl, web: www.dbl.tudelft.nl |
|---|
| 8 | * |
|---|
| 9 | * Header file of the class for one dimensional approximation based extremum seeking control |
|---|
| 10 | * |
|---|
| 11 | * * References: |
|---|
| 12 | * - C. Zhang and R. Ordonez, âRobust and adaptive design of numerical optimization-based extremum seeking control,â Automatica, vol. 45, pp. 634â646, 2009. |
|---|
| 13 | * - B. Calli, W. Caarls, P. Jonker and M. Wisse, "Comparison of Extremum Seeking Control Algorithms for Robotic Applications," IROS 2012. |
|---|
| 14 | */ |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | #ifndef APPROX_ESC_2D_H_ |
|---|
| 18 | #define APPROX_ESC_2D_H_ |
|---|
| 19 | |
|---|
| 20 | #include "esc_common/esc.h" |
|---|
| 21 | #include <vector> |
|---|
| 22 | #include <eigen3/Eigen/Dense> |
|---|
| 23 | #include "stdio.h" |
|---|
| 24 | class ApproxESC2D:public ESC{ |
|---|
| 25 | protected: |
|---|
| 26 | int data_size_,sampling_; |
|---|
| 27 | double k_grad_, init_vel_; |
|---|
| 28 | bool initialized_; |
|---|
| 29 | int sample_, ptr_; |
|---|
| 30 | Eigen::MatrixXf states_; |
|---|
| 31 | Eigen::VectorXf obj_vals_; |
|---|
| 32 | Eigen::VectorXf vel_ref_,state_curr_; |
|---|
| 33 | public: |
|---|
| 34 | ApproxESC2D(); |
|---|
| 35 | ApproxESC2D(int data_size, double k_grad, double init_vel, int sampling = 1); |
|---|
| 36 | void init(int data_size, double k_grad, double init_vel, int sampling = 1); |
|---|
| 37 | std::vector<double> step(std::vector<double> state, double obj_val); |
|---|
| 38 | inputType getInputType(); |
|---|
| 39 | outputType getOutputType(); |
|---|
| 40 | std::vector<double> monitor(); |
|---|
| 41 | std::vector<std::string> monitorNames(); |
|---|
| 42 | |
|---|
| 43 | }; |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | #endif /* APPROX_ESC_2D_H_ */ |
|---|