# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Re : Signal extrapolation with FFT

Any idea or example  to convert FFT Coefficients (z = a + i.b) to Frequency, Amplitude and Phase ?

Message 11 of 24
(790 Views)

## Re : Signal extrapolation with FFT

up

Message 12 of 24
(767 Views)
Solution
Accepted by topic author nferry
08-27-2015 04:09 PM

## Re : Signal extrapolation with FFT

Ok I found a solution.

The VI extrapolate a given periodic signal,

it just seems that amplitude coef may be not exactly the same at reconstruction for some signals.

But demonstrating the concept.

Best regards

Message 13 of 24
(736 Views)

## Re : Signal extrapolation with FFT

You are kidding yourself!

All you are doing is repeating the fft with a lot of unecessary code. Please read again Darin's first reply.

Message 14 of 24
(721 Views)

## Re : Signal extrapolation with FFT

altenbach wrote:

You are kidding yourself!

For demonstration, compare the result of your code with a simple partial repeat of the original data. The attached  quick modification shows both. (See also this honorary mention )

(Of course the "green version" needs a little bit more code in case the appended size is larger than the input array, but it should still show you the general concept. Modify as needed.)

Message 15 of 24
(706 Views)

## Re : Signal extrapolation with FFT

altenbach wrote:

(Of course the "green version" needs a little bit more code in case the appended size is larger than the input array, but it should still show you the general concept. Modify as needed.)

Here's one possibility that also works if the extrapolated lenght is larger thatn the input. (Make sure y is positive).

Message 16 of 24
(694 Views)

## Re : Signal extrapolation with FFT

Hello Altenbach,

Think you for your contribution but

the "repeat approach" does not consider a potential change of resolution of the signal,

where FFT coef is a mathematical representation of the signal, so is more resolution independant.

The "fourier extrapolation" can also reduce the signal initial lenght, where the "repeat method" cannot without code adding.

Like Lynn says, the "repeat method" have also phases discontinuities at boundaries.

Just try with fixing a signal lenght of 733 for example.

But after verification this true also for the "Fourier extrapolation"...

I'm myself a person who looking for the "simplest/best code way",

but please be careful while applying this philosophy to mathematical representation,

because in computer science, we can think with finite discrete elements,

but keep in mind this is an approximation of the reality...

(To my mind mathematical is also an approximation...)

Neverthelees, your optimization is quite interesting, thanks.

And at final "fourier extrapolation" sound more effective for purely periodic signal.

I try to add "Wavelet decomposition" to handle aperiodic signals,

Decomposing into multiple scales signals and then apply fourier extrapolation at eaxh scale.

But the result appear to be similar to the simple fourier extrapolation way.

I provide you some signals (doppler, etc...),

whereas a humain brain can easily apply an extrapolation,

I searching a way to predict these kinds of signals, but not for purely noisy or wall street curves.

Best regards

Nicolas

they can made there home opinion. Thanks.

Message 17 of 24
(652 Views)

## Re : Signal extrapolation with FFT

nferry wrote:

... where FFT coef is a mathematical representation of the signal, so is more resolution independant.

The "fourier extrapolation" can also reduce the signal initial lenght, where the "repeat method" cannot without code adding.

Just throwing more math at it does not add anything new to the data. Adding code for a "shortening" is also trivial. A simple "array subset" or "reshape array" will do. Anything is better than your monster code.

nferry wrote:

Like Lynn says, the "repeat method" have also phases discontinuities at boundaries.

Just try with fixing a signal lenght of 733 for example.

But after verification this true also for the "Fourier extrapolation"...

Of course it is also true. Both methods are mathematically equivalent! FFTs are not some magical elixier, they have an exactly defined meaning. (You are just getting potentially more rounding errors due to all the extra computations. )

nferry wrote:

they can made there home opinion. Thanks.

I thought the RG post has a link. Right? Look on the second line there.

Message 18 of 24
(627 Views)

## Re : Signal extrapolation with FFT

nferry wrote:

The "fourier extrapolation" can also reduce the signal initial lenght, where the "repeat method" cannot without code adding.

You don't really need to add much code to support negative y inputs, here's one possibility.

Message 19 of 24
(615 Views)

## Re : Signal extrapolation with FFT

Hello,

nferry wrote :

the "repeat approach" does not consider a potential change of resolution of the signal,

where FFT coef is a mathematical representation of the signal, so it is more resolution independant.

That's why, FFT can be used for interpolation (see Labview Fourier Interpolation VI)

but not for extrapolation because it performs signal repeats in the time domain,

and it suffers from boundaries discontinuities.

I credit you for a Kudo for the optimization,

and my initial hypotesis to use Fourier is wrong here.

At final extrapolation cannot be done without signal assumptions.

Nicolas

Message 20 of 24
(600 Views)