Peter Nachtwey
Member
Low Pass Filters.
I don't like the term delay but yes. The formula keeps the SP from making step jumps which causes the integrator to wind up.
Yes, but now you are depending totally on the P term to get you to the SP. Also use the BIAS as Steve pointed out above. This is important!
The above is a simple low pass digital filter with one real pole.
If K = .9 then ( 1 - K ) = .1.
Play with this formula.
K should be exp(-t/T)
where t is the sample time and T is the time constant. Don't mix seconds and minutes.
Yes, like the above equation.
PVnew = exp(-t/T)*PVold + (1-exp(-t/T))*PVinput
PVold = PVnew.
The can be simplified by re arranging some terms
PVnew = PVnew + (1-exp(-t/T)*(PVinput-PVnew)
Where t is the sample period and T is the time constant of the filter. T should be greater than t. Usually T > 10*t. Don't mix minutes and seconds.
Example:
If you want the filter to have a Time constant of .5 min and the sample period is .05 minutes the T = .5 and t = .05
(1-exp(-t/T) = (1-exp(-.05/.5) = .095
Your low pass filter would be
PVnew = PVnew + .095*(PVInput-PVnew)
Try this on a excel spread sheet.
GOKALP said:Peter
You mean using a ramp function as a delay of time constant 3.5 minutes.
I don't like the term delay but yes. The formula keeps the SP from making step jumps which causes the integrator to wind up.
GOKALP said:
Isn't it a solution to use a proportional control until you reach some point near the set point and include integral term. So you do not have to deal with ramp function.
Yes, but now you are depending totally on the P term to get you to the SP. Also use the BIAS as Steve pointed out above. This is important!
GOKALP said:
""""From Peter's message
So how does one take the equation:
SP(t) = SP-(SP-SP(0))*exp(-t/3.5)) where t is in minutes
and convert it to an equation that looks like this?
SP(t) = K * SP + (1-K) * SP(t-1)
I have posted this info before, but no one seemed to care at the time.
"""""
I did not understand why you convert the formula to
SP(t) = K * SP + (1-K) * SP(t-1) and what for to use it?
The above is a simple low pass digital filter with one real pole.
If K = .9 then ( 1 - K ) = .1.
Play with this formula.
K should be exp(-t/T)
where t is the sample time and T is the time constant. Don't mix seconds and minutes.
GOKALP said:
I also want to include a filter for the PV to be used with derivative term. I think I should also use a time delay of some time constant. Do you know what is behimd the derivative filter.
Yes, like the above equation.
PVnew = exp(-t/T)*PVold + (1-exp(-t/T))*PVinput
PVold = PVnew.
The can be simplified by re arranging some terms
PVnew = PVnew + (1-exp(-t/T)*(PVinput-PVnew)
Where t is the sample period and T is the time constant of the filter. T should be greater than t. Usually T > 10*t. Don't mix minutes and seconds.
Example:
If you want the filter to have a Time constant of .5 min and the sample period is .05 minutes the T = .5 and t = .05
(1-exp(-t/T) = (1-exp(-.05/.5) = .095
Your low pass filter would be
PVnew = PVnew + .095*(PVInput-PVnew)
Try this on a excel spread sheet.