Controller PID (Proportional Integral Derivative)
Standard/Traditional PID Formula:
u(t)=MV(t)=K_(p ) e(t)+ K_(i ) ∫_0^t▒〖e(T)dT+〗 K_(d ) ((de(t))/dt)
Variable Definitions:
u(t) = Controller Output
MV(t) = Manipulated Variable
K_(p )= Proportional gain
K_(i )= Integral Gain
K_(d )= Derivative gain
e(t) = Error (Setpoint – Process Variable)
t = Present Time
T = Variable of integration (values from time 0 to present t.
e(T) = Error (Setpoint – Process Variable) at the Calculation time of the controller.
dT = Each Calculation time of the controller
ASI Controls PID Algorithm (Absolute):
〖Output〗_n= Proportional Gain x E_(n )+ Integral Gain x (〖 Error Sum〗_(n ) )+ Derivative Gain x (E_n- E_(n-1) )
Variable Definitions:
〖Output〗_n=Controller Output
Proportional Gain= ((Max_Range)/Throttle)
Integral Gain= ((Max_Range)/Throttle)x ((Integral Unit)/(Integral Time))
E_(n )=Control Input Value-Control Setpoint = Error
〖 Error Sum〗_(n )=〖 Error Sum〗_(n-1 )+ E_(n ) = All the errors + current error
Derivative Gain= ((Max_Range)/Throttle)x ((Deriv Time)/(Deriv Unit))
(E_n- E_(n-1) ) = present and previous value of the error.
Question:
How Much will a Chilled Water Valve Signal Change if the Supply Air Setpoint is 55°F and the Supply Air is 60°F in an ASI Control PID Analog Output?
The Control Input, Control SP, Throttling Range, etc. are all in the same units. If the Control Input is in 0.01-degree units, then the Control SP, Throttling Range, etc. are also in 0.01-degree units. The controller sees 60°F as 6000 and 55°F as 5500.
Parameters:
Throttling Range: 2000 (which is 20°F)
Max Range: 255,100%
Calculation time = 60 Seconds
Integral Unit (s) = 60
Integral Time (s) = 240:
ASI Suggestion is to have an integral weight of 0.1 to 0.33 which seems to work in most circumstances. Integral weight is the Integral Units/Integral time.
Deriv Time = 0 This is set to 0 because the Derivative typically isn’t used in HVAC.
Deriv Units = 0 This is set to 0 because the Derivative typically isn’t used in HVAC.
Error:
First Calculate the Error or what is the difference between the Control Input minus the Control Setpoint.
Formula for Error:
E_(n )=Control Input Value-Control Setpoint
Step 1:
E_(n )=6000 (which is 60°F)-5500 (which is 55°F)
Step 2:
E_(n )=500
Proportional Term:
〖Proportional〗_(n )=((Max_Range)/Throttle)x E_(n )=Proportional Gain x E_(n )
Where: Proportional Gain= ((Max_Range)/Throttle)
Since you need to know the Proportional Gain by taking the Max_Range / Throttling Range you can just use that part of the formula above and put in the knowns.
Step 1:
Put the information into this formula: 〖Proportional〗_(n )=((Max_Range)/Throttle)x E_(n )
〖Proportional〗_(n )=(255/2000)x 500
Step 2:
〖Proportional〗_(n )=(0.1275)x 500
Step 3:
〖Proportional〗_(n )=63.75
Integral Term
The Integral Term is calculated based on the sum of the errors. If the final output is limited by max or min then the integral term is recalculated based on those limits to prevent integral wind-up.
The Error Sum over time is saved and used for the calculation.
Error Sumn = Error Sumn-1 + En
Error New = En = 500 (which is 5°F).
Since this is the first error for the first calculation it’s just the new error.
〖Integral〗_(n )=((Max_Range)/Throttle)x ((Integral Unit)/(Integral Time))x (〖 Error Sum〗_(n ) )=Integral Gain x (〖 Error Sum〗_(n ) )
Step 1:
Put the information into this formula:
〖Integral〗_(n )=((Max_Range)/Throttle)x ((Integral Unit)/(Integral Time))x (〖 Error Sum〗_(n ) )=
〖Integral〗_(n )=(255/2000)x ((60 seconds)/(240 seconds))x (500)
Step 2:
〖Integral〗_(n )=(0.1275) x (0.25) x 500
Step 3:
〖Integral〗_(n )=15.9375
Derivative Term
The Derivative Term is calculated based on the present and previous value of the error.
〖Derivative〗_(n )=((Max_Range)/Throttle)x ((Deriv Time)/(Deriv Unit))x (E_n- E_(n-1) )=Derivative Gain x (E_n- E_(n-1) )
Step 1:
Put the information into this formula if using the Derivative function:
〖Derivative〗_(n )=((Max_Range)/Throttle)x ((Deriv Time)/(Deriv Unit))x (E_n- E_(n-1) )
Step 2: In this example Deriv Time and Deriv Unit are both set to 0 so we aren’t using the derivative.
〖Derivative〗_(n )=(255/3500)x (0/0)x (〖 Error Sum〗_(n ) )= 0
Controller Output:
Step 1:
Put the information into this formula:
〖Output〗_(n )= 〖Proportional〗_(n )+ 〖Integral〗_(n )+ 〖Derivative〗_(n )
〖Output〗_(n )= 63.75+ 15.9375+ 0
〖Output〗_(n )= 79.6875