Questions tagged [moving-average]
The moving-average tag has no usage guidance.
125
questions
0
votes
0
answers
769
views
Fixing drift in a recursive fixed point filter
I'm implementing a 80-72-64-48 multi pass moving average filter for a embedded system in C and in fixed point. The implementation is a circular buffer where i'm keeping a running sum and calculating
...
0
votes
0
answers
412
views
extrapolate turning points for a sine weighted moving average?
On a stationary signal a sine-weighted moving average is calculated (SWMA: the coefficient vector looks like the first (>0) part of a sinusoid). The SWMA looks like this: very smooth:
The future is ...
1
vote
0
answers
49
views
Yule walker equation limited matrix size
Definitions
For an ARMA model
$$x_n=-\sum_{p=1}^P a_px_{n-p}+\sum_{q=0}^Qb_qw_{n-q}$$
where $w_n$ is zero mean stationary white noise with unit variance.
It is straightforward to show that the ...
8
votes
7
answers
79k
views
How to implement a moving average in C without a buffer?
Is it possible to implement a moving average in C without the need for a window of samples?
I've found that I can optimize a bit, by choosing a window size that's a power of two to allow for bit-...
1
vote
0
answers
593
views
Realization of IIR resonator
The measure of a given frequency $\omega$ in a signal $x(t)$ is:
$\frac{1}{N}\sum\limits^N_{t=0}x\left(t\right)e^{^{-i \omega t}}$
This is basically an average of the correlation between the signal ...
1
vote
0
answers
802
views
Extraction of fundamental signal information-Fourier full cycle algorithm
After filtering my noisy input signal using an anti-aliasing and FIR filter, I now wish to get the basic signal information (peak voltage and impedance; $R$ and $X$) from the pre-filtered as well as ...
1
vote
2
answers
2k
views
When should we using moving average in algorithm design?
I'm new to signal processing. And I just read G.720.1. I find there is a lot of moving average used.
And I can also recall there is a lot of moving average been used in other audio processing ...
1
vote
1
answer
339
views
How to filter uniform noise in a microcontroller?
By uniform noise I mean a band of a fixed width, no spikes, etc. This has to be one of the simplest examples. I'm looking for the appropriate theoretical approach as much as something relatively ...
2
votes
1
answer
160
views
How to remove historical values from exponential filter
Suppose I have two time series $A:=[0,0,0,4,5,6]$ and $B:=[1,2,3,4,5,6]$. I implement the following filter (with initial value at the first element):
$$ f(t) = f(t-1) + \alpha*(f(t)-f(t-1))$$
with $\...
2
votes
1
answer
922
views
Is step detection the correct approach to this problem? what if not?
I'm looking for some advice on where and what to start reading for learning to solve this.
I've the time series of the position coordinates (x,y) of an animal in an open field (just a cage). I want ...
4
votes
1
answer
238
views
Conceptual Question from Signal Processing - Impulse Response and AR Coefficients
In continuation to the previous question Conceptual questions from signal processing I have a doubt which is: Consider an Autoregressive model (AR(2)):
$$
y(t) = ay(t-1) + by(t-2)
$$
and a FIR (...
0
votes
0
answers
1k
views
Moving average on the frequency domain - (Welch's Method?)
Is there a name for a filter that is using a moving average on the frequency domain?
I am searching for such a filter to filter out long "pads" (synths) from music.
Do any of you know about such ...
3
votes
4
answers
2k
views
Is there an algorithm for second order filtering of data where the filter frequency is not known a priori?
It is well known that a moving average algorithm done in the time domain is equivalent to a filter with frequency response $\mathrm{sinc}(\omega\tau)$ where $\tau$ is the averaging time. (see this ...
2
votes
0
answers
244
views
Deconvolution of non-stationary, 1-D signal?
I have a time series that has been measured after convolution with a moving average filter. Knowing the parameters of the moving average filter, is it possible to reconstruct/constrain the values of ...
0
votes
1
answer
5k
views
Exponential average with time constant of slow, fast and impulse
I have been studying about exponential average. There are enough explanations about this at Internet, but they do not explain about the time constant.
I have one channel with a $T$ seconds time ...
31
votes
2
answers
60k
views
What is the cut-off frequency of a moving average filter?
I need to design a moving average filter that has a cut-off frequency of 7.8 Hz. I have used moving average filters before, but as far as I'm aware, the only parameter that can be fed in is the number ...
0
votes
1
answer
4k
views
How to determine the window size and weights in Weighted Moving Average (WMA), given desired cut-off frequency?
I am trying to smooth my discrete-time data points using the method of WMA.
Currently, I am using n as the window size and the weight array, ...
2
votes
1
answer
613
views
Gain function calculation (frequency response)
Define moving average process $y_t := 0.5 x_t + 0.5 x_{t-1}$ where $x_t := e^{i2 \pi t}$. Its frequency response is then:
$$H(f) = 0.5 + 0.5 e^{-i2\pi f}$$
Recall that the frequency response in ...
4
votes
3
answers
6k
views
Weight vector of an exponential moving average?
With weight vector I mean the vector with weights that you have to multiply the observations in the window that slides over your data with so if you add those products together it returns the value of ...
3
votes
1
answer
2k
views
Equivalent 2D mask of moving-average
I have the moving-average mask as
mask = [1 1 1; 1 1 1; 1 1 1];
and then I compute the convolution 3 times
...
4
votes
1
answer
2k
views
How can I smoothly interpolate between 2 position?
I've got a 1D signal (position of a servo motor over time) and I've extracted 'peaks'/'key' positions picking running average "local extrema" points.
Below is are 2 plots from 2 servos and the white ...
3
votes
3
answers
2k
views
Averaging filters
If a signal undergoes repeated averaging (n times) with a filter (h) of size m. Is it possible to achieve the same averaging result with an averaging filter(H) of a larger size?
h = {1/m, 1/m... m ...
11
votes
5
answers
11k
views
How should a moving average handle missing data points?
I'm writing a program that averages the user's weight across different days. I'm planning to use a 5-point moving-average (current day, two before and two after). Sometimes, a data point is missing ...
7
votes
1
answer
451
views
"Ensemble averaging ... cannot track dynamic changes"?
A book claims this as a motivation for introducing exponential averaging:
A disadvantage of ensemble averaging is that the resulting estimate cannot track dynamic changes occurring in the observed ...
5
votes
1
answer
3k
views
How to decide whether to use AR or MA for smoothing data?
Imagine I've got some offline data that I want to smooth. I could use an auto-regressive or moving-average filter of some appropriate order for conducting the smoothing. On which criteria should I ...