suivant: Fast Fourier Transform : monter: Discrete Fourier Transform précédent: The properties of the   Table des matières   Index

### Applications

1. Value of a polynomial
Define a polynomial P(x) = cjxj by the vector of its coefficients c : = [c0, c1,..cN-1], where zeroes may be added so that N is a power of 2.
• Compute the values of P(x) at

x = ak = = exp(),    k = 0..N - 1

This is just the discrete Fourier transform of c since

P(ak) = cj()j = FN(c)k

Input, for example :
P(x):=x+x^2; w:=i
Here the coefficients of P are [0,1,1,0], N = 4 and = exp(2i/4) = i.
Input :
fft([0,1,1,0])
Output :
[2,-1-i,0,-1+i]
hence
• P(0)=2,
• P(-i)=P(w^-1)=-1-i,
• P(-1)=P(w^-2)=0,
• P(i)=P(w^-3)=-1+i.

• Compute the values of P(x) at

x = bk = = exp(),    k = 0..N - 1

This is N times the inverse fourier transform of c since

P(ak) = cj()j = NFN-1(c)k

Input, for example :
P(x):=x+x^2 and w:=i
Hence, the coefficients of P are [0,1,1,0], N = 4 and = exp(2i/4) = i.
Input :
4*ifft([0,1,1,0])
Output :
[2,-1+i,0,-1-i]
hence :
• P(0)=2,
• P(i)=P(w^1)=-1+i,
• P(-1)=P(w^2)=0,
• P(-i)=P(w^3)=-1-i.
We find of course the same values as above...

2. Trigonometric interpolation
Let f be periodic function of period 2, assume that f (2k/N) = fk for k = 0..(N - 1). Find a trigonometric polynomial p that interpolates f at xk = 2k/N, that is find pj, j = 0..N - 1 such that

p(x) = pjexp(ijx),    p(xk) = fk

Replacing xk by it's value in p(x) we get:

pjexp(i) = fk

In other words, (fk) is the inverse DFT of (pk), hence

(pk) = FN( (fk) )

If the function f is real, p-k = , hence depending whether N is even or odd:
 p(x) = p0 +2(pkexp(ikx)) + (pexp(i)) p(x) = p0 +2(pkexp(ikx))

3. Fourier series
Let f be a periodic function of period 2, such that

f (xk) = yk,    xk = , k = 0..N - 1

Suppose that the Fourier serie of f converges to f (this will be the case if for example f is continuous). If N is large, a good approximation of f will be given by:

cnexp(inx)

Hence we want a numeric approximation of

cn = f (t)exp(- int)dt

The numeric value of the integral f (t)exp(- int)dt may be computed by the trapezoidal rule (note that the Romberg algorithm would not work here, because the Euler Mac Laurin developpement has it's coefficients equal to zero, since the integrated function is periodic, hence all it's derivatives have the same value at 0 and at 2). If is the numeric value of cn obtained by the trapezoidal rule, then

= ykexp(- 2i),     - n <

Indeed, since xk = 2k/N and f (xk) = yk:
 f (xk)exp(- inxk) = ykexp(- 2i), f (0)exp(0) = f (2)exp(- 2i) = y0 = yN

Hence :

[,..,,..c-1] = FN([y0, y1...y(N-1)])

since
• if n 0, = yn
• if n < 0 = yn+N
• = exp(), then =

Properties

• The coefficients of the trigonometric polynomial that interpolates f at x = 2k/N are

pn = ,     - n <

• If f is a trigonometric polynomial P of degree m , then

f (t) = P(t) = ckexp(2ikt)

the trigonometric polynomial that interpolate f = P is P, the numeric approximation of the coefficients are in fact exact ( = cn).
• More generally, we can compute - cn.
Suppose that f is equal to it's Fourier serie, i.e. that :

f (t) = cmexp(2imt),    | cm| <

Then :

f (xk) = f () = yk = cm,     = yk

Replace yk by it's value in :

= cm

If m n(mod N), is a N-th root of unity different from 1, hence:

= 1,     = 0

Therefore, if m - n is a multiple of N ( m = n + l . N) then = N, otherwise = 0. By reversing the two sums, we get
 = cm = c(n+l . N) = ...cn-2 . N + cn-N + cn + cn+N + cn+2 . N + .....

Conclusion: if | n| < N/2, - cn is a sum of cj of large indices (at least N/2 in absolute value), hence is small (depending on the rate of convergence of the Fourier series).
Example, input
f(t):=cos(t)+cos(2*t)
x:=f(2*k*pi/8)\$(k=0..7)
Output :

fft(x)=[0.0,4.0,4.0,0.0,0.0,0.0,4.0,4.0]
After a division by N = 8, we get
c0 = 0, c1 = 4.0/8, c2 = 4.0/2, c3 = 0.0,
c-4 = 0, c-3 = 0, c-2 = 4.0/8, = c-1 = 4.0/8
Hence bk = 0 and ak = c-k + ck is equal to 1 if k = 1, 2 and 0 otherwise.

4. Convolution Product
If P(x) = ajxj and Q(x) = bjxj are given by the vector of their coefficients a = [a0, a1,..an-1] and b = [b0, b1,..bm-1], we may compute the product of these two polynomials using the DFT. The product of polynomials is the convolution product of the periodic sequence of their coefficients if the period is greater or equal to (n + m). Therefore we complete a (resp b) with m + p (resp n + p) zeros, where p is choosen such that N = n + m + p is a power of 2. If a = [a0, a1,..an-1, 0..0] and b = [b0, b1,..bm-1, 0..0], then:

P(x)Q(x) = (a*b)jxj

We compute FN(a), FN(b), then ab = FN-1(FN(a) . FN(b)) using the properties

NFN(x . y) = FN(x)*FN(y),    FN(x*y) = FN(x) . FN(y)

suivant: Fast Fourier Transform : monter: Discrete Fourier Transform précédent: The properties of the   Table des matières   Index
giac documentation written by Renée De Graeve and Bernard Parisse