SPRACN4 August   2019 66AK2G12 , 66AK2H06 , 66AK2H12 , 66AK2H14 , OMAP-L132 , OMAP-L138 , TMS320C6452 , TMS320C6454 , TMS320C6455 , TMS320C6457 , TMS320C6652 , TMS320C6654 , TMS320C6655 , TMS320C6657 , TMS320C6672 , TMS320C6674 , TMS320C6678 , TMS320C6742 , TMS320C6743 , TMS320C6745 , TMS320C6746 , TMS320C6747 , TMS320C6748

 

  1.   Using DSPLIB FFT Implementation for Real Input and Without Data Scaling
    1.     Trademarks
    2. 1 Real Input Introduction
      1. 1.1 Prerequisites
      2. 1.2 Computing a Length N/2 Complex FFT From a Length N Real Input Sequence
      3. 1.3 Returning to a Length N Real Sequence Using a Length N/2 Complex IFFT
      4. 1.4 Benchmark of the Efficient Compute of FFT
    3. 2 Fixed Point FFT With No Data Scaling
      1. 2.1 Suggested Change
      2. 2.2 Example Application
    4. 3 Summary
    5. 4 References

Returning to a Length N Real Sequence Using a Length N/2 Complex IFFT

Let G(k) be a N-point complex valued sequence derived from a real-valued sequence g(n). You want to get back g(n) = IFFT{G(k)}. However, you want to do this with an N/2-point IFFT. This can be accomplished using the following procedure:

Xr(k) = Gr(k)IAr(k) – Gi(k)IAi(k) + Gr(N/2–k)IBr(k) + Gi(N/2–k)IBi(k), for k = 0, 1, ..., N/2–1 and G(N/2) = G(0) Xi(k) = Gi(k)IAr(k) + Gr(k)IAi(k) + Gr(N/2–k)IBi(k) – Gi(N/2–k)IBr(k)
  1. Find X(k) using the above equations.
  2. Compute the N/2-point inverse FFT of X(k) to get x(n) = x1(n) + jx2(n). Note that the IFFT should be performed with bit reversal.
  3. Get g(n) from x(n) using the following equations:
g(2n) = x1(n), for n = 0, 1, ..., N/2–1 g(2n+1) = x2(n)

The above equations look similar to those used in our forward FFT computation. However, the pre-computed coefficients are slightly different. The following C code can be used to initialize IA(k) and IB(k), again, even indices contains the real part and odd indices contain the imaginary part.

for (i = 0; i < N/2; i++) { IA[2 * i] = 0.5 * (1.0 - sin (2 * PI / (double) (2 * N) * (double) i)); IA[2 * i + 1] = 0.5 * (1.0 * cos (2 * PI / (double) (2 * N) * (double) i)); IB[2 * i] = 0.5 * (1.0 + sin (2 * PI / (double) (2 * N) * (double) i)); IB[2 * i + 1] = 0.5 * (-1.0 * cos (2 * PI / (double) (2 * N) * (double) i)); }

Note that IA(k) is the complex conjugate of A(k) and IB(k) is the complex conjugate of B(k).