- #1
mloo01
- 9
- 0
The exponentially weighted moving average is essentially a first order low pass filter:
y(t)=(1-a)*y(t-1) + a*u(t)
where y(t) is the present filter output, u(t) is the present filter input, y(t-1) is the filter output at the previous time and a is the smoothing factor or filter parameter.
From the derivation of the Lowpass filter:
a = h/(T+h) where h is the time step and T is the time constant.
When using this LPF as an EWMA, I want to smooth/average the values received between times t1 and t2 for example. Hence, would it be appropriate to set the Time Constant to (t2-t1) ? Or because it is a LPF does it mean that because I am using the time constant as the interval over which to be averaged that it will only reach 63.2% of its final value? I.e. Should I set it to 5*(t2-t1)?
Any help or discussions on setting the Time constant would be gratefully appreciated.
y(t)=(1-a)*y(t-1) + a*u(t)
where y(t) is the present filter output, u(t) is the present filter input, y(t-1) is the filter output at the previous time and a is the smoothing factor or filter parameter.
From the derivation of the Lowpass filter:
a = h/(T+h) where h is the time step and T is the time constant.
When using this LPF as an EWMA, I want to smooth/average the values received between times t1 and t2 for example. Hence, would it be appropriate to set the Time Constant to (t2-t1) ? Or because it is a LPF does it mean that because I am using the time constant as the interval over which to be averaged that it will only reach 63.2% of its final value? I.e. Should I set it to 5*(t2-t1)?
Any help or discussions on setting the Time constant would be gratefully appreciated.