[5] | 1 | /* |
---|
| 2 | * perturb_esc_nd.h |
---|
| 3 | * |
---|
| 4 | * Created on: Aug 1, 2012 |
---|
| 5 | * Author: 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 perturbation based extremum seeking control |
---|
| 10 | * |
---|
| 11 | * * References: |
---|
| 12 | * - K. B. Ariyur and M. Krstic, "Real-Time Optimization by Extremum-Seeking Control", Wiley, 2003. |
---|
| 13 | * - B. Calli, W. Caarls, P. Jonker, M. Wisse, "Comparison of Extremum Seeking Control Algorithms for Robotic Applications", IROS 2012. |
---|
| 14 | */ |
---|
| 15 | |
---|
| 16 | #ifndef PERTURB_ESC_ND_H_ |
---|
| 17 | #define PERTURB_ESC_ND_H_ |
---|
| 18 | |
---|
| 19 | #include <vector> |
---|
| 20 | #include <cmath> |
---|
| 21 | #include <stdio.h> |
---|
| 22 | #include "esc_common/esc.h" |
---|
| 23 | class PerturbESCND:public ESC{ |
---|
| 24 | protected: |
---|
| 25 | double sin_amp_,sin_freq_,corr_gain_,high_pass_pole_,low_pass_pole_,comp_pole_,comp_zero_,period_,obj_val_old_, hpf_out_old_, cycle_count_; |
---|
| 26 | std::vector<double> pos_ref_, signal_demodulated_old_, lpf_out_old_,corr_signal_, phase_shift_,comp_old_; |
---|
| 27 | unsigned int opt_dim_; |
---|
| 28 | bool initialized_,state_initialized_, old_vals_initialized_; |
---|
| 29 | |
---|
| 30 | public: |
---|
| 31 | PerturbESCND(); |
---|
| 32 | PerturbESCND(double sin_amp, double sin_freq, double corr_gain, double high_pass_pole, double low_pass_pole, double comp_zero, double comp_pole, double period); |
---|
| 33 | void init(double sin_amp, double sin_freq, double corr_gain, double high_pass_pole, double low_pass_pole, double comp_zero, double comp_pole, double period); |
---|
| 34 | std::vector<double> step(std::vector<double> state, double obj_val); |
---|
| 35 | inputType getInputType(); |
---|
| 36 | outputType getOutputType(); |
---|
| 37 | std::vector<double> monitor(); |
---|
| 38 | std::vector<std::string> monitorNames(); |
---|
[22] | 39 | void reset(); |
---|
[5] | 40 | }; |
---|
| 41 | |
---|
| 42 | #endif /* PERTURB_ESC_ND_H_ */ |
---|