[R] Fast fourier transformation
ba208 at exeter.ac.uk
Tue Feb 10 14:49:08 CET 2009
A powerful scheme for harmonic inversion of time signals known as
"filter diagonalization method" is available from MIT: http://ab-initio.mit.edu/wiki/index.php/Harminv
I don't know of any R interface, but it might be a good option for
On 10 Feb 2009, at 13:40, Dieter Menne wrote:
> botto <b.otto <at> uke.uni-hamburg.de> writes:
>> here is a practical problem we would like to solve. In a pneumatic
>> post the
>> acceleration of the capsule is measured and plotted over time. From
>> graph achieved we would like to derive some kind of statistic value
>> describes the stress the capsule, or what is in it, is exhibited to.
>> 1) Apply a fourier transformation to the acceleration profile
>> 2) get a number of harmonic waves describing my graph
>> 3) and use the amplitudes of my waves in a weighted fashion to
>> calculate some statistical value.
>> What I tried to do is:
>> A) construct an artificial profile fg for testing purpose like
>> a. f1 <- function(x) 0.5*sin(3*x + pi)
>> X) in my test example I can define the amount of harmonic
>> because here I know that number. Of course afterwards in my natural
>> I won't know.
>> Y) I have to transform the values I get out of the "fft" and
>> functions to estimate the frequency, amplitude and phase of my
> Check function spectrum in stats which also has some methods to
> provide smoothed plots. There is also package signal which I have not
> tried. And don't expect too much of phase plots, I have seen
> of students jumping on these to explain the universum, the EEG and US
> politics because it sound so mysterious, and never seen a working
> coming out of it.
> It would have been good if you had provided a real example series
> then it would have been possible to tell you if you could find a
> estimate of the "true" frequency and acceleration. In general, when
> have only very few oscillations, you get a seemingly lousy estimate,
> is only the consequence of how fft is defined as a rather broad-minded
> model. If you are sure that there is a single frequency with
> other methods such as cyclic gams or even cyclic nlme (see the oestrus
> example in that package) might provide better results.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
School of Physics
University of Exeter
EX4 4QL, UK
Phone: +44 1392 264187
More information about the R-help