How Should I Set the Time Constant for LPF/EWMA?

Click For Summary
SUMMARY

The discussion focuses on setting the time constant for the Exponentially Weighted Moving Average (EWMA), which is modeled as a first-order low pass filter (LPF). The formula for the LPF is given as y(t) = (1-a)*y(t-1) + a*u(t), where 'a' is the smoothing factor derived from a = h/(T+h). The key question raised is whether to set the time constant T to the interval (t2-t1) or to a multiple of it, specifically 5*(t2-t1), to ensure the output reaches a significant portion of its final value. Additionally, the importance of an anti-aliasing filter before the A-D converter is highlighted.

PREREQUISITES
  • Understanding of Exponentially Weighted Moving Average (EWMA)
  • Knowledge of Low Pass Filter (LPF) concepts
  • Familiarity with time constants in signal processing
  • Basic principles of anti-aliasing filters
NEXT STEPS
  • Research the mathematical derivation of the Exponentially Weighted Moving Average (EWMA)
  • Learn about the implications of time constants in Low Pass Filters (LPF)
  • Explore the design and implementation of anti-aliasing filters
  • Investigate the effects of different smoothing factors on filter performance
USEFUL FOR

Signal processing engineers, data analysts, and anyone involved in time series analysis or filtering techniques will benefit from this discussion.

mloo01
Messages
9
Reaction score
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.
 
Engineering news on Phys.org
If you are sampling and averaging, then there must be an anti-aliasing filter before the A-D converter. It must filter everything above 1/2 the sampling frequency.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
823
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
16
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K