• ### FFT and DWT for any kind of signal (25Hz, 200Hz, 1kHz) ???

Hi there,

I begin to have quite an headache wondering how I can do that properly.

I mean
I get a signal from sensors, the sample frequency is 200Hz, and I want to make FFT and DWT analyse of this signal.

Yet the [FFT~] makes analysis from sound signal, so I convert my signal to a sound with [sig~]

It makes my signal from 200Hz to 44.1kHz, all right

The problem is that when I use [sig~] the signal doesn't put "0" between two samples, it keeps the value of the previous sample until it changes (so it's not like to raise the frequency rate and it modifies the spectrum...)

Any idea (the same problem with DWT)

because if I can get that I just have to put a low-pass filter after the upsampling and it's allright

Well the REAL question is "How can i upsample this signal properly from 200Hz to 44.1kHz "

Thanks

• Posts 5 | Views 5540
• I propose to have a look at the [block~] object to do up or downsampling. Have a look at it's helpfile and probably you'll get along, or otherwise the fft guru's over here will help you.

|] [] |.| ][|-| -- http://soundcloud.com/domxh

• Why do you want to zero out the samples between the updated ones? Wouldn't you just want to interpolate them? I mean, the events that happen between the recorded ones exist, and interpolation will at least try to guess those events. But filling them with zeroes assumes nothing happened, which is probably less correct than just holding those values until they get updated with the next one. I would think low-pass filtering the signal you have now is what you would want to do (though it would be more accurate to use [vline~] than [sig~]). Or, generate a linearly interpolated signal using a [vline~] with a ramp length of 1/200 seconds.

But then again, I don't really know what you're doing. What is DWT?

• Well

I wanted to put zero in between to make the interpolation.
During upsampling the converters generally put zero between then there is a low-pass filter that makes the interpolation.

This is why I wanted to put zeros in between, yet you might be right, i'm gonna try with another software to make the interpolation the way you suggest and look if it does change the spectrum a lot, then if it works do it back in "real-time" with Pd

Then DWT is a "wavelet transform" it's quite close to a fourier transform but there are some very important differences
the base of projection is not made of sinus but of a "family of wavelet" that are some translated and dilated version of a "mother-wavelet"
It makes the transform able to work for signal which spectrum changes during time, and other kind of stuff (it is used for compression too, etc... very powerful and as long as IDS-analysis of Laurent Millot won't be able on Pd...)

This is a very useful way to analyse very low frequency (much better than fourier), and the phenomenon i'm working on seems to happen in very low frequency (between 0-20Hz )

I thought [block] just was up to decide the number of samples in a sound-block (then it makes you calculate FFT on different number of samples with the consequences on the precision of the frequency-axis) then I did look and ther is something about up and downsampling... gonna look too

• try to set the samplerate in the settings to 400hz (200 nyquist) and just work with this

with block you can up/downsample too

pd redefining mathematics |expr fact(0)|==0

Posts 5 | Views 5540
Internal error.

Oops! Looks like something went wrong!