source: trunk/extremum_seeking/esc_nn/include/esc_nn/nn_esc_1d.h @ 5

Last change on this file since 5 was 5, checked in by wcaarls, 12 years ago

Imported extremum_seeking at revision 987

File size: 1.5 KB
Line 
1/*
2 * nn_esc_1d.h
3 *
4 *  Created on: Jul 26, 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 one dimensional neural network based extremum seeking control
10 *
11 * * References:
12 * - M. Teixeira and S. Zak, “Analog neural nonderivative optimizers,” IEEE Transactions on Neural Networks, vol. 9, pp. 629–638, 1998.
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 NN_ESC_1D_H_
18#define NN_ESC_1D_H_
19
20#include <vector>
21#include <string>
22#include "esc_common/esc.h"
23#include "stdio.h"
24class NNESC1D : public ESC {
25public:
26        enum { monitorSwitch, monitorPeak };
27
28protected:
29        double A_,M_,ddelta_,A,delta_,B_, mpd_init_, w_switch_old_, a_switch_old_,yr_,period_;
30        double min_peak_,vel_ref_,w_switch_;
31        bool initialized_,min_peak_detect_init_;
32
33public:
34        NNESC1D();
35
36        NNESC1D(double A,double M, double B, double ddelta, double delta, double period);
37
38        void init(double A, double M, double B, double ddelta, double delta, double period);
39
40        std::vector<double> step(double obj_val);
41        inputType getInputType();
42        outputType getOutputType();
43        std::vector<double> monitor();
44        std::vector<std::string> monitorNames();
45protected:
46        double wSwitch(double e_minus);
47        double minPeakDetect(double e_minus);
48        double aSwitch(double e);
49
50};
51
52
53#endif /* NN_ESC_1D_H_ */
Note: See TracBrowser for help on using the repository browser.