Spektralanalyse / Spectral Analysis

Non-Equidistant Spectral analysis

Apparently, smartphones do not sample time signals in an equidistant matter as known from AD-converters in standard applications. If apps want to use time signals from any of the various sensors, they end up with a list of time-stamp and amplitude values where the time-stamps are not with an equal time distance from each other. This jitter in time stamps does not allow for standard-dft-operations to be done. Although most of common apps do not care about this fact, you should care about this fact. There is a workaround for this problem, which I will present here.




What I did is, using the list of timestamp/amplitude pairs to make a spline-approximation to the function. This ensures that the approximated function will hit all of the real-world sampled points and is continued without steps to the neighbor points (first derivative in each point is the same). The result is a smooth function through all the sampled points, but now we have the opportunity to resample the approximationfunction in an equidistant time manner - even oversampling may be done!

You may resample any number of points, e.g. a power of 2 although you only sampled an arbitrary number of samples. You therefore asure that your fast DFT will deliver results fastly.

The working beta code proved to be stable and meaningful in a first evaluation round. First run-time apps for Android using this feature will follow.

Nicht-äquidistante Frequenzanalyse

Offensichtlich tasten Smartphones Zeitsignale nicht in einer äquidistanten Weise von den zahlreichen Sensoren ab, so wie dies von Standard-AD-Wandlern in anderen Industrieanwendungen üblich ist. Stattdessen erhält eine Android-App eine Liste mit Zeitstempel/Amplituden-Paaren, wobei die Zeitstempel eben keine gleichbleibenden Zeitabstände haben. Dieser sog. Jitter in den Zeitstempeln verhindert eigentlich, dass man das Zeitsignal in eine Standard-Fouriertransformation-Funktion gibt, um eine Leistungsspektrum zu berechnen. Die meisten Apps kümmert dies offenbar nicht. Richtig ist das nicht, aber es gibt eben einen Ausweg, den ich hier kurz skizzieren will.

Was ich gemacht habe ist, die Zeit-/Amplitudenpaare mittels einer kubischen Spline-Interpolation zu approximieren. Das sichert zu, dass die Approximation auf jeden Fall durch jeden Samplepunkt geht und darüber hinaus immer stetig ist, auch zu Nachbarpunkten hin. Das Ergebnis ist eine schöne glatte Kurve durch alle "echten" Signalpunkte, aber jetzt haben wir die Möglichkeit, die Approximation digital neu zu erfassen! Man kann damit jetzt z.B. zu äquidistanten Zeitpunkten samplen, aber auch ein Oversampling ist möglich! Plötzlich muss man nicht mehr mit Nullen auffüllen, sondern macht ein Oversampling mit z.B. einer Zweierpotenz und bekommt so ein schnelles Ergebnis aus seiner DFT.

Der erste Beta-Code hat bewiesen, dass das Verfahren stabil ist und sehr gute Ergebnisse liefert. Die ersten Android-Apps, die dieses Feature nutzen werden sind in Arbeit.


In this article, a different approach ist used: http://en.wikipedia.org/wiki/Least-squares_spectral_analysis

It is called Lomb-Scargle periodogram, mainly being used when data is not complete.

Kommentar schreiben

Kommentare: 0