Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Nucleo_spi 2015_denziben_i2c_S2 Nucleo_Motor Nucleo_Motor
Fork of PID by
PID.h
- Committer:
- kikoaac
- Date:
- 2015-08-18
- Revision:
- 3:34f4f22b18e7
- Parent:
- 2:14176355508a
- Child:
- 4:a3c85727f0f6
- Child:
- 5:3519920d064d
File content as of revision 3:34f4f22b18e7:
#ifndef PID_H
#define PID_H
#include "mbed.h"
class PID
{
public:
PID(float tauKc, float tauKi, float tauKd);
double s_dErrIntg ,dErr_prev;
void Start();
void Reset();
void setInterval(double inter);
//Getters.
void stop();
double dTarget; double dPoint;
// PI制御ゲイン
double GAIN_P ;//1.5 // 比例ゲイン
double GAIN_I ;//2.8 // 積分ゲイン
double GAIN_D ;//0.2
double data;
private:
Timer timer;
Ticker T;
float interval;
void PIDctrl();
};
#endif
