Test of pmic GPA with filter

Dependencies:   mbed

Fork of nucf446-cuboid-balance1_strong by RT2_Cuboid_demo

Revision:
0:15be70d21d7c
Child:
1:2e118d67eeae
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PI_Cntrl.h	Wed Jan 10 16:08:07 2018 +0000
@@ -0,0 +1,22 @@
+class PI_Cntrl{
+     public:
+                    PI_Cntrl(float a,float b);
+                    PI_Cntrl(float a,float b,float c);
+                    PI_Cntrl(float a,float b,float c,float d);
+        float operator()(float e){
+         return doStep(e);
+         }                    
+        virtual     ~PI_Cntrl();
+        void        reset(float);
+        float       doStep(float);
+    
+    private:
+    
+        float Tn;
+        float Kp;
+        float Ts;
+        float out_max;
+        float out_min;
+        float i_part_old;
+        float del;
+};
\ No newline at end of file