digital-filter

Exponential Moving Average Sampled at Varying Times

馋奶兔 提交于 2019-11-27 10:44:11
I have a continuous value for which I'd like to calculate an exponential moving average . Normally I'd just use the standard formula for this: S n = αY + (1-α)S n-1 where S n is the new average, α is the alpha, Y is the sample, and S n-1 is the previous average. Unfortunately, due to various issues I don't have a consistent sample time. I may know I can sample at the most, say, once per millisecond, but due to factors out of my control, I may not be able to take a sample for several milliseconds at a time. A likely more common case, however, is that I simple sample a bit early or late: instead

How to implement band-pass Butterworth filter with Scipy.signal.butter

假装没事ソ 提交于 2019-11-26 21:17:25
UPDATE: I found a Scipy Recipe based in this question! So, for anyone interested, go straight to: Contents » Signal processing » Butterworth Bandpass I'm having a hard time to achieve what seemed initially a simple task of implementing a Butterworth band-pass filter for 1-D numpy array (time-series). The parameters I have to include are the sample_rate, cutoff frequencies IN HERTZ and possibly order (other parameters, like attenuation, natural frequency, etc. are more obscure to me, so any "default" value would do). What I have now is this, which seems to work as a high-pass filter but I'm no

calculate exponential moving average in python

一笑奈何 提交于 2019-11-26 19:13:03
问题 I have a range of dates and a measurement on each of those dates. I'd like to calculate an exponential moving average for each of the dates. Does anybody know how to do this? I'm new to python. It doesn't appear that averages are built into the standard python library, which strikes me as a little odd. Maybe I'm not looking in the right place. So, given the following code, how could I calculate the moving weighted average of IQ points for calendar dates? from datetime import date days = [date

Exponential Moving Average Sampled at Varying Times

邮差的信 提交于 2019-11-26 17:57:44
问题 I have a continuous value for which I'd like to calculate an exponential moving average. Normally I'd just use the standard formula for this: S n = αY + (1-α)S n-1 where S n is the new average, α is the alpha, Y is the sample, and S n-1 is the previous average. Unfortunately, due to various issues I don't have a consistent sample time. I may know I can sample at the most, say, once per millisecond, but due to factors out of my control, I may not be able to take a sample for several

High-pass filtering in MATLAB

瘦欲@ 提交于 2019-11-26 15:24:47
问题 Does anyone know how to use filters in MATLAB? I am not an aficionado, so I'm not concerned with roll-off characteristics etc — I have a 1 dimensional signal vector x sampled at 100 kHz, and I want to perform a high pass filtering on it (say, rejecting anything below 10Hz) to remove the baseline drift. There are Butterworth, Elliptical, and Chebychev filters described in the help, but no simple explanation as to how to implement. 回答1: There are several filters that can be used, and the actual