/* * approx_esc_1d.h * * Created on: Jul 30, 2012 * Author: Berk Calli * Organization: Delft Biorobotics Lab., Delft University of Technology * Contact info: b.calli@tudelft.nl, web: www.dbl.tudelft.nl * * Header file of the class for one dimensional approximation based extremum seeking control * * * References: * - C. Zhang and R. Ordonez, “Robust and adaptive design of numerical optimization-based extremum seeking control,” Automatica, vol. 45, pp. 634–646, 2009. * - B. Calli, W. Caarls, P. Jonker and M. Wisse, "Comparison of Extremum Seeking Control Algorithms for Robotic Applications," IROS 2012. */ #ifndef APPROX_ESC_1D_H_ #define APPROX_ESC_1D_H_ #include "esc_common/esc.h" #include #include #include "stdio.h" class ApproxESC1D:public ESC{ protected: int data_size_, poly_degree_,sampling_; double k_grad_, init_vel_, vel_ref_,state_curr_; bool initialized_; int sample_, ptr_; Eigen::VectorXf states_; Eigen::VectorXf obj_vals_; public: ApproxESC1D(); ApproxESC1D(int data_size, int poly_degree, double k_grad, double init_vel, int sampling = 1); void init(int data_size, int poly_degree, double k_grad, double init_vel, int sampling = 1); std::vector step(std::vector state, double obj_val); inputType getInputType(); outputType getOutputType(); std::vector monitor(); std::vector monitorNames(); void reset(); }; #endif /* APPROX_ESC_1D_H_ */