New PID library with digital anti-windup and process control
Fork of PID_modified by
Diff: PID.h
- Revision:
- 4:e3c9cb64be44
- Parent:
- 3:d8646d8c994f
- Child:
- 5:016c99bb877f
--- a/PID.h Tue Oct 25 14:19:13 2016 +0000 +++ b/PID.h Wed Oct 26 17:56:01 2016 +0000 @@ -8,6 +8,12 @@ PID(float Kp_in, float Ki_in, float Kd_in, float Sampletime_in); void Compute(float reference_in, float feedbackvalue_in); + + // + void Compute_noWindUP(float reference_in, float feedbackvalue_in); + void Saturation_output(); + void Anti_windup(float delta); // delta_V = Vs - V + // void SetOutputLimits(float setoutputLimits_H, float setoutputLimits_L); void SetInputLimits(float setinputLimits_H, float setinputLimits_L); @@ -23,7 +29,8 @@ float output; float reference; - + float delta_output; // Error by saturating + float Ts; private: