# Analog Signal Treatment for FFT with Padding

My education and career has been focused in mechanical and materials science; sorry if the following is well known, but I haven't been able to find the appropriate SEO terms. Wanting input to further study the proposed method or other, better approaches.

Have a project in which a mobile DAQ system is being developed. To minimize transmission costs of data and to sample at maximum card rates, have created code to filter data with a 'continuum' mindset. Essentially, really only interested in signal inflection points. An easy example of this would be a vehicle suspension. This data will generate databases for machine learning and fatigue rainflow.

The signal is padded, similar to a Laplacian treatment, but with a negative half parabolic and decay while maintaining tangency between signal and added functions. Constants are determined from the entry and exit secants of the signal. By doing so, it seems that Gibbs ringing is eliminated and allows for cleaner filtering of the derivative. Zero crossings are determined and controlled with Boolean logic and standard deviations.

The first image below is a simple LVDT response in which the points shown on its graph are what I'm after (the output of this filter). The second image has padding applied which takes the discrete signal ends to zero. The third image is the padded signal derivative obtained by FFT and shows no ringing between the five functions. The fourth is the filtered derivative and has the zero crossings identified. Those zero crossings are then used in the time domain to identify which points of the signal are kept.

So far this seems to be working well. It should avoid disturbances introduced by windowing and seems to simplify the approach by not requiring overlapping. Again, looking for help to study something like this further for optimization, or to be introduced to better techniques.

• Very interesting! I must admit I've never thought about signals where inflection points matter; my gut feeling is that I'd try to run Linear Prediction Coding on the first or second derivative (plus safe the one or two constants necessary to reverse the differentiation). Then, entropy-encode them. Jul 16 '21 at 22:15

A pure derivative is a high pass filter, and thus will enhance high frequency noise, which is problematic for zero crossing detection. If it is known that a zero crossing can only occur within $$\tau$$ time, this can be used to improve the robustness of any competing algorithm.
My immediate reaction is using the FFT to compute a derivative would be processing intensive compared to FIR (Finite Impulse Response) filtering approaches that could also operate directly in the time domain and ideal for streaming samples since it performs convolution directly. Discrete time derivatives using the forward or backward Euler approaches are performed with simple differencing. To minimize the noise enhancement and assuming $$\tau$$ is greater than one sample I would suggest the following approach for comparison:
First perform a moving average over $$N$$ samples where the time duration of $$N$$ is equal to $$\tau$$. Then with the output on the moving average compute a difference over $$N$$ samples as the derivative computation and from that detect the zero crossings. Note that once the moving average is completed the output of the moving average can be decimated by $$N$$ (select every $$N$$th sample) and then adjacent differences can be computed, which would minimize the processing required.