Sunday, December 31, 2017

Simple data filtering

I looked through some of yesterday's data using GNU Octave with a goal of understanding how digital filtering can be used to smooth it a bit. I've been thinking of Kalman filters, but am realizing that I really don't have a predictive model of my system -- it's not like I can do some sort of dead reckoning from my current state to a new one. So for now I'm considering simple lowpass filters.

The main tradeoff from my viewpoint is the phase delay of the filters -- roughly speaking, the more smoothing, the more delay in the response of the smoothed output. This is rather bad for an instrument that attempts to give the pilot an "instant" view of their airdata.

On the other hand, I do think, from my earlier tuft experiments, that the airflow in my road testing is really horribly turbulent. I look forward to flight tests where I can quantify what things really look like off an airplane wing.

For now, I'm going with the assumption that if I can do a little bit of filtering to eliminate much of the jitter, that will be good preparation for any future contingency. And it's easy to implement a filter on the display side, and just as easy to disable it if I find I don't need it.

With that in mind, I used Octave's FIR filter design tools to come up with a grid of filtering options, with filter order ranging from N = 5 to 40 taps, and lowpass cutoff frequency ranging from f = 0.4 to 1.0 Hz. Here are the time domain results. Note that this is a very high-resolution image -- you can click on it and zoom as you wish.
The striking thing is that the most important criterion is filter order, not cutoff frequency. That has the most effect on time domain qualitative "smoothness" and phase delay. And it appears that at N = 5, our delay is less than 1/4 of a second or so, which seems reasonable for an aircraft instrument.

On this basis, I think a simple digital filter in the display along the lines of the above is a good idea, and I'll be adding it and reporting back as to the results.

No comments :

Post a Comment