LPF/EWMA Time Constant setting

In summary, the exponentially weighted moving average is a first order low pass filter with a smoothing factor or filter parameter, a, that can be calculated from the time step and time constant. When using this filter as an exponentially weighted moving average, the time constant can be set to the interval over which the values should be averaged, but may also need to be adjusted for anti-aliasing filtering.
  • #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.
 
Engineering news on Phys.org
  • #2
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.
 

1. What is the purpose of the LPF/EWMA time constant setting?

The LPF/EWMA (Low Pass Filter/Exponentially Weighted Moving Average) time constant setting is used to adjust the level of smoothing or filtering applied to a data signal. It determines how quickly the filter responds to changes in the data, with smaller time constants resulting in faster response times and larger time constants resulting in slower response times.

2. How do I choose the appropriate time constant for my data?

The appropriate time constant for your data depends on the characteristics of your data and the level of filtering or smoothing desired. Generally, a smaller time constant is suitable for data with frequent and rapid changes, while a larger time constant is suitable for data with slower changes. It is important to test and adjust the time constant to achieve the desired level of filtering without excessively distorting the data.

3. What is the difference between LPF and EWMA time constants?

The LPF and EWMA time constants are both types of filters used to smooth or reduce noise in a data signal. The main difference is that LPF uses a fixed time constant, while EWMA uses a variable time constant that is adjusted based on the rate of change in the data. EWMA is generally preferred for its ability to respond to changes in the data while still providing a smooth output.

4. Can the LPF/EWMA time constant be adjusted in real-time?

Yes, the LPF/EWMA time constant can be adjusted in real-time. This allows for the filter to adapt to changes in the data and provide a more accurate and responsive output. However, it is important to carefully monitor the data and make adjustments cautiously to avoid excessive distortion.

5. Are there any drawbacks to using a smaller or larger time constant?

Using a smaller time constant can result in a more responsive filter, but it may also introduce more noise or distortion into the data signal. On the other hand, using a larger time constant can result in a smoother output, but it may also cause the filter to respond too slowly to changes in the data. It is important to carefully consider the trade-offs and select the appropriate time constant for your specific data and application.

Similar threads

  • Electrical Engineering
Replies
8
Views
1K
  • Electrical Engineering
Replies
4
Views
829
  • Introductory Physics Homework Help
Replies
3
Views
330
  • Engineering and Comp Sci Homework Help
Replies
2
Views
993
Replies
8
Views
527
Replies
5
Views
4K
  • Introductory Physics Homework Help
Replies
16
Views
2K
  • Thermodynamics
Replies
5
Views
1K
Replies
4
Views
935
  • Electrical Engineering
Replies
4
Views
816
Back
Top