PID制御計算用ライブラリ

Dependents:   ROBOCON2017_archan ROBOCON2017_suchan

cal_PID.hpp

Committer:
Akito914
Date:
2016-08-26
Revision:
0:52549f6dd024
Child:
1:f1f6c98a4b12

File content as of revision 0:52549f6dd024:


#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