pr7

Dependencies:   mbed

Revision:
0:05dd1de8cc3f
Child:
1:92f175969d90
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PID_Cntrl.h	Fri May 03 09:37:27 2019 +0000
@@ -0,0 +1,25 @@
+#ifndef PID_CNTRL_H_
+#define PID_CNTRL_H_
+
+// PID Controller Class (Template)
+class PID_Cntrl
+{
+public:
+
+    PID_Cntrl(float P, float I, float D, float tau_f, float Ts, float uMin, float uMax);
+
+    float operator()(float error) {
+        return update((double)error);
+    }
+
+    virtual     ~PID_Cntrl();
+
+    void        reset(float initValue);
+    float       update(double error);
+    
+private:
+
+    // here some local variables are defined
+};
+
+#endif
\ No newline at end of file