next up previous contents index
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) = $ \sum_{{j=0}}^{{N-1}}$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.

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

    p(x) = $\displaystyle \sum_{{j=0}}^{{N-1}}$pjexp(ijx),    p(xk) = fk

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

    $\displaystyle \sum_{{j=0}}^{{N-1}}$pjexp(i$\displaystyle {\frac{{j2k\pi}}{{N}}}$) = fk

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

    (pk) = $\displaystyle {\frac{{1}}{{N}}}$FN( (fk) )

    If the function f is real, p-k = $ \overline{p}_{k}^{}$, hence depending whether N is even or odd:
    p(x) = p0 +2$\displaystyle \Re$($\displaystyle \sum_{{k=0}}^{{\frac{N}{2}-1}}$pkexp(ikx)) + $\displaystyle \Re$(p$\scriptstyle {\frac{{N}}{{2}}}$exp(i$\displaystyle {\frac{{Nx}}{{2}}}$))  
    p(x) = p0 +2$\displaystyle \Re$($\displaystyle \sum_{{k=0}}^{{\frac{N-1}{2}}}$pkexp(ikx))  

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

    f (xk) = yk,    xk = $\displaystyle {\frac{{2k\pi}}{{N}}}$, 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:

    $\displaystyle \sum_{{-\frac{N}{2} \leq n<\frac{N}{2}}}^{}$cnexp(inx)

    Hence we want a numeric approximation of

    cn = $\displaystyle {\frac{{1}}{{2\pi}}}$$\displaystyle \int_{0}^{{2\pi}}$f (t)exp(- int)dt

    The numeric value of the integral $ \int_{0}^{{2\pi}}$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$ \pi$). If $ \tilde{{c_n}}$ is the numeric value of cn obtained by the trapezoidal rule, then

    $\displaystyle \tilde{{c_n}}$ = $\displaystyle {\frac{{1}}{{2\pi}}}$$\displaystyle {\frac{{2\pi}}{{N}}}$$\displaystyle \sum_{{k=0}}^{{N-1}}$ykexp(- 2i$\displaystyle {\frac{{nk\pi}}{{N}}}$),     - $\displaystyle {\frac{{N}}{{2}}}$ $\displaystyle \leq$ n < $\displaystyle {\frac{{N}}{{2}}}$

    Indeed, since xk = 2k$ \pi$/N and f (xk) = yk:
    f (xk)exp(- inxk) = ykexp(- 2i$\displaystyle {\frac{{nk\pi}}{{N}}}$),  
    f (0)exp(0) = f (2$\displaystyle \pi$)exp(- 2i$\displaystyle {\frac{{nN\pi}}{{N}}}$) = y0 = yN  

    Hence :

    [$\displaystyle \tilde{{c}}_{0}^{}$,..$\displaystyle \tilde{{c}}_{{\frac{N}{2}-1}}^{}$,$\displaystyle \tilde{{c}}_{{\frac{-N}{2}}}^{}$,..c-1] = $\displaystyle {\frac{{1}}{{N}}}$FN([y0, y1...y(N-1)])

    since

    Properties

    Example, input
    f(t):=cos(t)+cos(2*t)
    x:=f(2*k*pi/8)$(k=0..7)
    Output :
    $ \tt x=\{2,(\sqrt
2)/2,-1,-((\sqrt2)/2),0,-((\sqrt2)/2),-1,(\sqrt2)/2\}$
    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) = $ \sum_{{j=0}}^{{n-1}}$ajxj and Q(x) = $ \sum_{{j=0}}^{{m-1}}$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) = $\displaystyle \sum_{{j=0}}^{{n+m-1}}$(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)


next up previous contents index
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