Questions tagged [moving-average]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
98 views

How is that after random numbers with their negatives alternating passing through 5, 4, 3 order moving average filter, become quasi sinusoidals?

I have passed random numbers $${89, 58, 13, 70, 24}$$ with their negatives alternating, through 5 order moving average filter and output was positive and negative numbers alternating. After I have ...
1
vote
1answer
4k views

Phase response of moving average filter — how to interpret?

There are many articles on the frequency response of the moving average filter but they all seem to focus on magnitude. However the phase response is intriguing and I find it hard to interpret. The ...
0
votes
0answers
370 views

Smoothing the discrete acceleration

In order to know if my signal is increasing or decreasing, I'm using the discrete derivative $y[n] = x[n] - x[n-1]$ or a smoothed version of it (for example Exponential Weight Moving Average of $y[n]$ ...
1
vote
1answer
152 views

What are the ripple and attenuation in a set of moving average filters?

Ladies, Gentlemen, Consider following set of moving average filters: (1) - 100 coefficients equal to 1/100 (2) --- 95 coefficients equal to 1/95 (3) --- 90 coefficients equal to 1/90 (4) --- 85 ...
6
votes
3answers
18k views

Moving average vs. Moving median

I have read in many places that Moving median is a bit better than Moving average for some applications, because it is less sensitive to outliers. I wanted to test this assertion on real data, but I ...
2
votes
1answer
362 views

Taking the Moving Average of STFT Results

I realize that this seems redundant, but I'm getting consistently better results when performing machine learning techniques that use spectral features extracted using the moving average process below,...
4
votes
2answers
285 views

Frequency response of a rolling linear regression

I am looking for a way to characterise the frequency response of the slope from a linear regression. We are exploring the effect of window length of the regression to the magnitude of the slope of the ...
1
vote
1answer
42 views

Denoising approach for a combination of several ADC voltage channles

I have 2 ADC channels of constant voltage measurement with small amount of high frequency noise only and no low frequency oscillations. The final signal should be the simple sum of those and denoised ...
2
votes
2answers
4k views

Is this code for doing a moving average correct?

Is this code for doing a moving average correct? y=conv(x, ones(1,100)/100); I want to filter my speech signal with moving average filter in code. I think that ...
0
votes
0answers
600 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
0answers
350 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
0answers
38 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 ...
5
votes
5answers
46k 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
0answers
366 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
0answers
702 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
2answers
1k 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
1answer
296 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
1answer
148 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
1answer
759 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 ...
2
votes
1answer
197 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 (...
1
vote
0answers
269 views

ACF and PACF Confidence Levels for ARMA

I'm trying to figure out where exactly to draw the confidence levels for the autocorrleation function (ACF) and the partial autocorrelation function (PACF) for an ARMA model. For PACF I found that a ...
0
votes
0answers
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
4answers
800 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
0answers
230 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
1answer
3k 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 ...
20
votes
2answers
40k 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
1answer
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
1answer
580 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
3answers
4k 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
1answer
1k 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
1answer
1k 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
3answers
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 ...
10
votes
4answers
6k 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
1answer
414 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
1answer
2k 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 ...

1
2