# Filter results from force measurements

I was provided with several force measurements. Precisely: The vertical compression force exerted from the milling tool on a working peace. The plot of the force looks reasonable and of course it seems also reasonable to me that the higher the force the higher the noise (because of the milling). I am looking for some criteria to filter the measures. Any suggestion about how I could filter the data?

• suggestions: literally dozens. filtering always depends on the noise and the signal having some math properties that are different, and you don't describe noise or signal, so we can't help you at all :( – Marcus Müller Apr 4 '17 at 9:11
• also, info on the measurement setup from sensor to ADC will absolutely be necessary. Looking at the sharp cutoff at 255 – this data might very well be totally unusable. – Marcus Müller Apr 4 '17 at 9:12
• very bad for me then :( Could you provide me some reference so I can go deeper in the topic? I do not have much experience int he field. Thanks – drSlump Apr 4 '17 at 9:36
• Well, not really, no, aside from a systems and signal textbook. every EE program has one. – Marcus Müller Apr 4 '17 at 9:39
• notice the "might be". I really can't tell, and nobody else could – your graph has 10,000 points compressed to 1000 pixels, so I can't even take an educated guess of how severe that problem is. Really, even with beginner's methods, try to describe the signal as good as possible – zoom in, say what you'd expect of the signal, what you think the noise is and where it comes from, describe what was measured in the first place and so on. Give info, instead of "just" asking questions! – Marcus Müller Apr 4 '17 at 9:51

Signal processing becomes more valuable and useful when applied into the problems of different fields such as mining, seismology, oceaonography, climatology etc (apart from the obvious applications in multimedia, communications and control).

There are devices used to test and measure strength, stress and fracture behaviour of materials that's to be encountered in nature or in man made structures so that a good understanding of the materials stress strain behaviour enables stronger, durable and safer constructions.

One method of obtaining such important information of materials comes from specific lab equipments that test a sample material by providing a controlled force and measure resulting displacements. And the material characteristics is analysed according to the recorded force and displacement measurements.

Therefore the method requires these measurements to reflect the true conditions as accurate as possible in order to make reliable and precise conclusions from them.

There are many reasons why the measurements can be imperfect however. The distortions must have been analysed considering the sample-device mechanical dynamic interactions and any electronic noise or device nonlinearities that can also interfere with the measurements.

Under these circumstances, consider the following imperfect measurement results of a given sample test run:

As can be seen, this is quite an unexpected result from seemingly such a stable (slowly moving) device. One would for example expect a more monotonic curve (though not necessarily a strictly monotonic curve but at least not so much oscillatory either...)

Looking in detail to the first 8000 samples gives the following plot:

A Fourier analysis at this point could be of great help, revealed by the following plot:

Now we are enlightened by the presence of those harmonic spikes that are present at about 8 Hz, 16 Hz and 24 Hz respectively. In addition, there is also a DC looking spike at the origin, but that's actually the signal of interest that we consider as the true measurment which is very slowly (hence DC looking) moving down from -0.5 mV to -1.5 mV on the previous figure.

To verify the presence of 8, 16 and 24 Hz oscillations we further zoom into the signal to observe them directly in time domain rather than indirectly provided by the Fourier analysis computation...

In this very clear cropped portion of length about 100 samples, from the sample 1460 to sample 1560, there are approximately 8 periods of a fundamental oscillation. (And it's also understood from its waveshape that this is not a pure sine wave but involves harmonics of it which create the unsymmetric up down appearence).

Given the sampling period of $Ts=0.01$ seconds approximateley, this makes the fundamental period of oscillations to be $T_0 = 0.01*100/8 = 0.125$ seconds and therefore the fundamental frequency of the oscillations is found about $F_0 = 1/T_0 = 1/0.125 = 8$ Hz, Just as predicted from the Fourier analysis plot.

So therefore we are convinced both directly from the time domain measurement and also indirectly from the frequency domain computation that there are three quasi-oscillatory components at about 8Hz, 16Hz and 24Hz in addition to the signal itself around DC frequencies.

So in this case most probably due to mechanical interaction of the force piston and the sample material, there are uncontrolled vibrations occuring, which are casuing the oscillatory measurements. Or it could as well be electronic noise picked up by some reasons undecidable from the measurements alone.

Now, the are a number of solutions which would enable us to get rid of the unwanted oscillations (provied that these oscillations are indeed unwanted !) One of the simplest of them is to use a lowpass filter with an appropriate cutoff frequency. In the following I'm using a simple FIR lowpass filter of cutoff frequency below 8 Hz so that those oscillaitons are removed, but the useful signal is retained. The resulting plot is the following:

Clearly (or not!) this is an improvement, but a number of extra trials must have been performed in order to decide on the best solutions. The number of taps used was quite high approaching 256. This would induce a group delay of 128 samples, hence care must be taken to interpret the exact timing of the resulting samples. But this is not at all a problem, as long as you can perform non-real time (offline , non-causal) filering and that you know precisely how much delay there will be in the output which is the case here.

A much shother filter could have been designed which would yield much less sample shifts. Also instead of a lowpass filter a harmonic notch filter could also be designed, the decision of which is guided by the useful signal charactheristics.

• How did you determine the number of taps? – drSlump Oct 23 '17 at 9:15
• @drSlump Number of taps depends on the type of filter and its quailty (selectivity). Here for this linear phase FIR lowpass filter you need to consider filter cutoff frequency vs sampling rate Fs and transition width. Here I have chosen, by trail and erro or educated guess, a sharp enough filter to filter the signal. – Fat32 Oct 23 '17 at 10:39