pr7

Dependencies:   mbed

Revision:
0:05dd1de8cc3f
Child:
1:92f175969d90
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PID_Cntrl.cpp	Fri May 03 09:37:27 2019 +0000
@@ -0,0 +1,33 @@
+/*  
+    PI Controller class 
+    
+                    1          s             
+      G(s) = P + I --- + D --------- 
+                    s      T_f*s + p              
+*/
+
+#include "PID_Cntrl.h"
+using namespace std;
+
+PID_Cntrl::PID_Cntrl(float P, float I, float D, float tau_f, float Ts, float uMin, float uMax)
+{
+// ....
+
+    reset(0.0f);
+}
+
+PID_Cntrl::~PID_Cntrl() {}
+
+void PID_Cntrl::reset(float initValue)
+{
+    // here code for resetting variables
+
+}
+
+float PID_Cntrl::update(double e)
+{
+    // here the main code!!!
+    
+    return 0.0f;
+}
+