Question

I'm trying to calculate the inverse Fourier Transform of two real functions with a single IFFT. The best and most straightforward explanation I've found so far is here, where it says:

Use the fact that the FFT is linear and form the sum of the first transform plus i times the second. You have two vectors, x1 and x2, with discrete Fourier Transforms X1 and X2 respectively. Then

x1 = Re[ IDFT[ X1 + i X2 ] ]

and

x2 = Im[ IDFT[ X1 + i X2 ] ].

The problem is that I don't get where the 'i' parameter comes from. Any hint on this would be much appreciated.

Thanks in advance.

EDIT:

After doing some experiments I finally made it work, but now I'm more confused than before as it didn't work as I expected and had to use some imagination to figure out the correct formulas.

I just made up a new complex array where:

Re[n] = X1Re[n] - X2Im[n]
Im[n] = X2Re[n] + X1Im[n]

After doing an IFFT on it x1 = Re and x2 = Im, so wouldn't it be correct to express it like this?

x1 = Re[ IDFT[ X1 - i X2 ] ]
x2 = Im[ IDFT[ X2 + i X1 ] ].
Was it helpful?

Solution

Are you wondering what the 'i' represents? In this case, I believe 'i' is referring to sqrt(-1), the imaginary unit vector.

Then:

Re[ IDFT[ X1 + i X2 ] ]

will be the 'real' part of that transform (anything without an 'i') and

Im[ IDFT[ X1 + i X2 ] ]

will be the 'imaginary' part of that transform (anything multiplied by an 'i').

It is possible I've misunderstood your question and this answer is much too simplistic; if it is, no insult was intended to your intelligence, I just misunderstood you.

OTHER TIPS

If you want to ignore the mathematics of complex variables, multiplying by i is just notation for how you swap and scale a pair of vectors to produce another pair of vectors. And the complex vectors X1 and X2 can each be considered to be just pairs of real-valued vectors (with a "complex" relationship under the transforms of interest). The swap and scale makes the two component vectors more easily separable, after some arithmetic and transforms, into the real valued vector of interest.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top