Quantcast
Channel: DIAdem topics
Viewing all articles
Browse latest Browse all 3196

Channel filter needing more than one pass to give acceptable results

$
0
0

Hello,

 

I've just noticed a problem with the digital filter feature that hasn't occurred to me before. As a test I ran the following script on some accelerometer data:

Option Explicit 'Forces the explicit declaration of all the variables in a script. FiltStruc = "IIR" FiltStyle = "Butterworth" FiltType = "Low pass" FiltDegree = 2 FiltLimit = 3 FiltLowLimit = 0 FiltUppLimit = 0 FiltWave = 1.2 FiltSamples = 25 FiltWndFct = "Hamming" FiltZeroPhase = True FiltCorrection = True '------------ Command ------------------- Set ChnResult = ChnFiltCalc("[1]/Time", "[1]/Latac", "/FilteredSignal_1", "IIR", "Butterworth", "Low pass", 2, 3, 0, 0, 1.2, 25, "Hamming", True, True) Set ChnResult = ChnFiltCalc("[1]/Time", "[1]/FilteredSignal_1", "/FilteredSignal_2", "IIR", "Butterworth", "Low pass", 2, 3, 0, 0, 1.2, 25, "Hamming", True, True) Set ChnResult = ChnFiltCalc("[1]/Time", "[1]/FilteredSignal_2", "/FilteredSignal_3", "IIR", "Butterworth", "Low pass", 2, 3, 0, 0, 1.2, 25, "Hamming", True, True) Set ChnResult = ChnFiltCalc("[1]/Time", "[1]/FilteredSignal_3", "/FilteredSignal_4", "IIR", "Butterworth", "Low pass", 2, 3, 0, 0, 1.2, 25, "Hamming", True, True)

All it does it repeatedly filter the data so I can look at how it progresses. I was surprised to see how much content there was above the 3 Hz limit. The red trace is the original data, the green is the first filter pass, then blue, orange and purple.

 

Simon_Aldworth_0-1610544143551.png

 

Is this due to the filter degree being only two, so that the roll off is too gentle?

 

If so, and assuming I use 'force zero phase' and 'correct start/end offset' (and as it happens I'm treating all the channels the same), is there any reason why I can't just wind the filter order right up to give a steeper roll off?

 

Is the repeated filtering (approximately) the same as increasing the filter order?

 

An additional point of confusion is the reduction in amplitude below the 3 Hz limit, as seen in an FFT of each filtered signal:

Simon_Aldworth_1-1610544545418.png

 

Any advice on a better approach?

 

Thanks, Simon.

 


Viewing all articles
Browse latest Browse all 3196

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>