PID制御計算用ライブラリ
Dependents: ROBOCON2017_archan ROBOCON2017_suchan
Diff: cal_PID.hpp
- Revision:
- 0:52549f6dd024
- Child:
- 1:f1f6c98a4b12
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cal_PID.hpp Fri Aug 26 11:30:08 2016 +0000 @@ -0,0 +1,36 @@ + +#ifndef __CAL_PID_HPP__ +#define __CAL_PID_HPP__ +#include "mbed.h" + + +class cal_pid{ +public: + cal_pid(); + ~cal_pid(); + void param(float _p_gain,float _i_gain,float _d_gain); + void period(float _control_period); + void output(signed long _min,signed long _max); + void reset(); + signed long get_pid(signed long position,signed long targ); +private: + signed long error; + signed long past_error; + signed long egral_error; + signed long integral_error; + signed long differential_error; + float p_gain; + float i_gain; + float d_gain; + float control_period; + signed long p_part; + signed long i_part; + signed long d_part; + signed long output_min; + signed long output_max; + signed long operate; +}; + + + +#endif \ No newline at end of file