Questions tagged [moving-average]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
203 views

Differences in moving window rms due to sampling rate

I have a 10 second recorded signal band pass filtered from 100-500 Hz. The original sampling rate is 10 kS. Now I run a moving window RMS with a window length: 10 ms on the signal (10/1000 * sampling ...
sk7's user avatar
  • 3
1 vote
2 answers
240 views

How to discard deviating values from standard deviation and running average

I'm building a inductive vehicle loop detector. By measuring the frequency of a LC-oscillator where the cars will pass over the inductor of the LC-Oscillator. If the cars pass over the inductor the ...
Bruce's user avatar
  • 111
1 vote
1 answer
1k views

Moving average filter for sound in MATLAB [closed]

y[n] = b0x[n] +b1x[n-1] I have this MA filter in matlab as following ...
Adam's user avatar
  • 17
0 votes
2 answers
419 views

Calculating filter coefficients of a Moving average with error correction

I have an oversampling ADC where I need to correct Gain/offset errors 'during' each conversion. This also links to my previous question - Moving average and linearization of two piecewise linear ...
sundar's user avatar
  • 343
1 vote
0 answers
165 views

Moving average and linearization of two piecewise linear systems

I have 2 oversampling ADC's running parallelly, each to process data in a specific range of the input as shown below: Each ADC can process only half cycle range of a sine wave. Each ADC adds its own ...
sundar's user avatar
  • 343
1 vote
1 answer
1k views

Is there a clever way to implement cascaded moving average filters?

I'd like to effeciently approximate a gaussian filter's step response using cascaded moving average filters. I know about recursive moving average, but is there some clever algorithm to cascade them ...
Albin Stigo's user avatar
0 votes
2 answers
104 views

How do you properly organize data to compute multiple (independent) recursive filters at the same time taking advantage of SIMD instructions?

I'm processing multiple (independent) Exponential Moving Average 1-Pole filters on different parameters I have within my Audio application, with the intent of smooth each param value at audio rate: <...
markzzz's user avatar
  • 35
0 votes
1 answer
199 views

ARMA & MA methods: how do you know the error terms?

Reading the ARMA model for the first time, and I'm confused. Let's say I have a time series x = [1, 2.1, 2.9, 3, 4.1] According to the ARMA model, $X_t$ is a ...
blue_note's user avatar
  • 123
2 votes
2 answers
2k views

Moving Average for Notch filtering

I have a periodic signal(ECG) with period of ~1 seconds. It does not have features that are shorter than 0.04 seconds. For removal of 60Hz, I thought instead of implementing a notch filter, doing a ...
doubleE's user avatar
  • 263
1 vote
2 answers
616 views

Moving average algorithm that conserves integral

Suppose I have point array $y_i$ of size $N$. How to implement moving average algorithm that conserves quantity $$ I = \sum_{i=1}^{N}y_i $$ NOTE: I don't want time shift so I would prefer to use ...
LRDPRDX's user avatar
  • 125
2 votes
1 answer
197 views

A general conceptual understanding of moving average

I have a conceptual question here. I understood how to calculate a Moving Average(MA). For example : x(n) = 0, 1, 2, 3, 4, 5 MA = 0, 1/2, 3/2, 5/2,7/2, 9/2, where for calculation of the MA we only ...
gklearning's user avatar
5 votes
6 answers
1k views

Optimal $ n $ -th Order IIR /AR Approximation of a Moving Average Filter

I would like to approximate a moving average filter with an IIR filter of much lower order than the tap-length of the moving average filter. Optimality shall refer to the $L_2$ norm of the impulse ...
burnpanck's user avatar
  • 169
2 votes
2 answers
575 views

Mean delay for a M tap harmonically weighted filter

I am trying to derive the mean delay for $M$ filter taps harmonically weighted: $$y[n] = \frac{M\,x[n] + (M-1)x[n−1]... + 1 \cdot x[n−M+1]}{\tfrac12 M (M + 1)}$$. For a uniformly weighted filter, I ...
Srilakshmi Alla's user avatar
1 vote
3 answers
2k views

Denoising a signal

I'm starting hydraulic experiments, where I'd have to measure velocity in an unsteady flow with a device called Acoustic Doppler Velocimeter. In DSP terms, I'd have a nonstationary signal in a shape ...
Yassine's user avatar
  • 27
0 votes
1 answer
883 views

Sampling multiple sensors at different rates

I have a question regarding how best to sample data from multiple sensors when they are all updating at different/changing rates. I am new to data acquisition so please bear with me. For my Master's ...
user34578's user avatar
0 votes
2 answers
312 views

How to make the impulse response sparse? How does one know that the channel is sparse?

I am new to sparse channel estimation algorithms and reading research articles. One such paper is blind sparse channel estimation using a modification of the BOMP technique titled, "Blind Acoustic ...
Ria George's user avatar
-1 votes
1 answer
695 views

Should I use window or any filtering to average my data?

I have 80 seconds of data and I have to score my data by taking the average or median (or some other method) every 10 seconds. What's the best way to do this ? Should I just use a regular rectangular ...
Baid's user avatar
  • 1
0 votes
2 answers
59 views

Confusion regarding model order and lags

I have similar questions as the one asked in these posts: https://stackoverflow.com/questions/47083890/fir-filter-length-is-the-intercept-included-as-a-coefficient-matlab/47085339?noredirect=1#...
SKM's user avatar
  • 601
4 votes
1 answer
316 views

Underdetermined deconvolution of windowed output

Consider a discrete 'blurred' output $h[t]$ given by the convolution of filter $f[t]$ and signal $g[t]$. This question considers recovering $g[t]$ from a window (subset) of $h[t]$. This causes the ...
egg's user avatar
  • 143
5 votes
1 answer
309 views

Model Validation After Estimation for System Identification Task (Assistance with MATLAB Code)

QUESTION: I want to determine how well the estimated model fits to the future new data. How do I validate the estimated model...what is the procedure? After system identification, how to do model ...
Ria George's user avatar
4 votes
1 answer
5k views

Lowpass : What is wrong with average filtering?

The question is : What is wrong with averaging as low pass filter ? The details : I want to lowpass filter a signal to downsample it. The constraints are : I have no RAM available and I work in ...
Mac's user avatar
  • 51
1 vote
1 answer
194 views

Why dft of moving average impulse response has 0 angle

I wanted to visualise angle and magnitude of moving average DFT. I used python3 for that: ...
Trismegistos's user avatar
1 vote
4 answers
5k views

Group delay of moving average filter

I have implemented a moving average filter (in Python) where I fill a list with values and average them. When new values arrive the oldest will be deleted. Now I am wondering how much delay I get ...
ce_guy's user avatar
  • 13
1 vote
0 answers
45 views

Multitapering in time domain to obtain smoother filtered signals?

Suppose we want to approximate the instantaneous power $z(n) = |y(n)|^2$ of the discrete-time signal $y(n)$, where $y(n)$ is the result of filtering $x(n)$ with a given window $h(n)$, $y(n) = x(n) \...
antamoeba's user avatar
2 votes
1 answer
616 views

autoregressive moving average code implementation

I am new to DSP and i am trying to take a wav (human speech) file and apply ARMA filter and plot its PSD graph in python. I see that there are a lot of AR implementations but almost none ARMA. I ...
Richard's user avatar
  • 31
7 votes
5 answers
11k views

What Is the Transfer Function of a Moving Average (FIR Filter)?

To make post-processing easier, I export scope measurements as CSV files, which are then post-processed (mostly in Microsoft Excel, which is not the best tool for the job, but it is all I have at my ...
Sclrx's user avatar
  • 271
2 votes
1 answer
141 views

Terminologies - lags, order in time series model

I am facing some difficulties with the terminologies - lag ($p$) and sequence length (number of data points) (N) used in time series model such as Moving average and Autoregressive model. Considering ...
Srishti M's user avatar
  • 616
1 vote
2 answers
323 views

MATLAB: Implementing Least Squares Estimator for a Given Model

The formula to estimate $\mathbf{h}$ is then $$\hat{\mathbf{h}} = (X^T X)^{-1} X^T \vec{y}\tag{2}$$ I think this can be implemented in Matlab using ...
SKM's user avatar
  • 601
1 vote
1 answer
220 views

How to Apply Least Squares Estimation for Sparse Coefficient Estimation?

The model is expressed as, $$y(n) = \sum_{i=0}^{p-1} r(i) x(n-i) + v(n) \tag{1}$$ where $\mathbf{r} = [r_1,r_2,\ldots,r_p]^T$ is the sparse channel coefficients of length $p$, $\mathbf{x} = [x_1,x_2,....
SKM's user avatar
  • 601
2 votes
2 answers
919 views

MAD and RMS SNR relation

Recently I've found a formula relating mean average deviation (MAD) SNR to root mean square (RMS) SNR: $$\text{SNR}_\text{MAD} = \sqrt{\frac{2}{\pi}} \text{SNR}_\text{RMS} $$ which assumes Gaussian ...
nadlr's user avatar
  • 123
3 votes
1 answer
781 views

Determination of periodicity in data and finding mean

I have to find whether there is any pattern (I mean periodicity or close to periodicity) and if there is, for one cycle i have to perform numerical integration to determine mean. In the first picture ...
Fringe Emanuel's user avatar
0 votes
1 answer
765 views

How to approximate the sample rate?

I have a simple program that captures audio from an audio device. I have configured a nominal sample rate of 48000Hz and a buffer size of 1 millisecond. The audio sub system should execute my capture ...
Jan Deinhard's user avatar
0 votes
1 answer
572 views

$N$ point moving average filters in state space

I am new to this filter, I did read about them, but could find out a state space notation of these: $$y(n)=\frac{1}{N}\sum_{m=0}^{N-1}x(n-m)$$ Are moving average filters an LTI systems? And how do ...
Aashu10's user avatar
  • 85
6 votes
1 answer
6k views

Difference between Gaussian and moving average filters for peak detection and doppler shift detection?

Consider having a signal in the time domain, and you want to smooth the signal. Moving average and Gaussian filters that are used. How do you choose which is used for what? What are the conditions ...
DVG's user avatar
  • 171
4 votes
1 answer
1k views

How does this "simple filter" work?

I'm new to DSP, and I'm using this basic "1-pole LPF" Param Smooth filter which "smooth" param when I change it. The code is pretty simple: ...
markzzz's user avatar
  • 35
1 vote
1 answer
79 views

Help in problem formulation for estimation of image as a feature vector - SISO or MIMO FIR channel model?

Based on the paper Blind Image deconvolution: A feature vector is a list of numbers used to represent an image. The feature vector for my case takes values as symbols $-1,1$. An instance or an ...
Srishti M's user avatar
  • 616
1 vote
2 answers
3k views

Moving Average of sinusoid

If you calculate a simple moving average over a window length that is equal to the period of the sinusoid, you get a straight line (=0 because the wave is symmetric around the X-axis): the wave has a ...
MisterH's user avatar
  • 317
3 votes
1 answer
89 views

Envelop detection with low sample rate?

I have a signal up to $3\textrm{ MHz}$. The ADC that sample it has a rate of $1.5\mu s$. So a full $T$ of the signal is $0.3\mu s$, and I can only sample each $1.5\mu s$. It sounds not enough, but I ...
Curnelious's user avatar
0 votes
3 answers
4k views

Determine whether a signal is increasing or decreasing over time

I have a signal (x-axis: Time, y-axis: Data) which has more than 10000 samples per second. The signal itself represents some physical data (e.g. speed, acceleration, etc.) and has some noise on it. ...
lR8n6i's user avatar
  • 321
2 votes
1 answer
178 views

Generalized/Power means in DSP

Generalized/power means may be used to construct moving-average filters with different properties than regular one which is based on arithmetic mean. This observation seems to be trivial - even ...
tms's user avatar
  • 21
0 votes
1 answer
2k views

How to select the length of a smoothing moving average filter?

I have a time series signal I need to smoothen to get rid of some noise. I decided to apply a moving average filter to this signal. I know the choice of the length of the MA is critical. How should ...
Clément F's user avatar
1 vote
2 answers
100 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 ...
George Theodosiou's user avatar
2 votes
1 answer
7k 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 ...
barnhillec's user avatar
0 votes
0 answers
471 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]$ ...
Basj's user avatar
  • 1,267
7 votes
5 answers
7k views

3dB-Cut off frequency of moving average

I've read the thread: Cut off frequency of moving average And I use the second answer in my algorithm to calculate the 3dB cut off frequency of my filter, which works great, as my filter length is ...
Slev1n's user avatar
  • 157
2 votes
1 answer
188 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 ...
George Theodosiou's user avatar
12 votes
3 answers
31k 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 ...
Basj's user avatar
  • 1,267
2 votes
1 answer
579 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,...
Jay's user avatar
  • 21
5 votes
3 answers
524 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 ...
Dan's user avatar
  • 163
1 vote
1 answer
52 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 ...
Chesnokov Yuriy's user avatar