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.
Dependencies: mbed
PID_Cntrl.h
00001 #ifndef PID_CNTRL_H_ 00002 #define PID_CNTRL_H_ 00003 00004 // PID Controller Class 00005 class PID_Cntrl 00006 { 00007 public: 00008 00009 PID_Cntrl(float Kp, float Ki, float Kd, float Tf, float Ts, float Min, float Max); 00010 00011 float operator()(float error) { 00012 return update((double)error); 00013 } 00014 00015 virtual ~PID_Cntrl(); 00016 00017 void reset(float initValue); 00018 float update(double error); 00019 00020 private: 00021 00022 // controller parameters (member variables) 00023 float Kp, Ki, Kd, Tf, Ts, Min, Max; 00024 // storage for signals (member variables) 00025 float yI, yD, e_old; 00026 }; 00027 00028 #endif 00029
Generated on Tue Jul 12 2022 16:58:28 by
1.7.2