0

The title is a bit inaccurate. But I don't know how to be more precise. Feel free to edit it.

I have data stream. Every cycle (a few milli seconds) I get a new set of 3 floats that represent an acceleration. So basically the acceleration on the X-, Y- and Z-axis.

I have a function f(x) : R^3 -> R^3. In this case I can split f(x) into threee different functions. f(X), f(Y), f(Z). f(Z) = 0 for all Z. f(Y) = 0 for all Y. Let's say f(X) looks like the density normal derivation with my = 2 and sigma = 1, so N(2,1).

Now I want to check if the values from the data stream actually match the function f(x). Of course they won't match completely. Therefore I would like to know if the values follow a similar curve like f(x).

The question is, how do I do that mathmatically and programmatically? (Don't really need source code. Just an idea how to solve this problem)

Sheradil
  • 407
  • 3
  • 14

1 Answers1

2

Here are a few ideas:

  1. Calculate the sum of squared errors at each point in time. Since these will only increase as you add more points, you might want to normalize these by the total measurement time and determine what your cutoff value should be.
  2. Calculate the FFT of the data and compare it to the FFT of the known function.
  3. Calculate the student's T test to see if the known and measured distributions have the same mean.
  4. Calculate F-test to see if the known and measured distributions have the same standard deviation.
  5. Investigate time series analysis techniques to see what is typically done to compare streams of time-dependent data.
duffymo
  • 305,152
  • 44
  • 369
  • 561
  • I got a few questions Let's say, the matching function is x^2 and the data stream approximates to (x/2)^2. So it is stretched along the x-axis. If I use FFT, is it independent of the x-axis-scale? So, would FFT actually "say: 'they match' "? Same question to SSE: Is SSE independent of the stretching? Because, obviously, if the rate at which I get new values is very small. Like 5ms, then the values won't change fast and it is stretched along the time-axis and I would still have to get the result "they match" – Sheradil Nov 21 '17 at 11:15
  • FFT would say the frequency distribution of the two functions match, but the amplitude of the second one is half that of the first. SSE would increase at a rate of x^2/2. – duffymo Nov 21 '17 at 11:30