This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR1642BOOST: The magnitude ratio between the original signal and the FFT data

Part Number: AWR1642BOOST

Hi,

In the index.html,in the section Scaling says"1D processing: If the input to the FFT were a pure tone at one of the bins, then the output magnitude of the FFT at that bin will be (N/(2^(log4(N)-1)) )( N is the FFT order) times the input tone amplitude (because tone is complex, this implies that the individual real and imaginary components will also be amplified by a maximum of this scale)".According to the description,the magnitude ratio between the original  signal and the FFT data at the bins is N/(2^(log4(N)-1))= 2*sqrt (N ) . How  is this ratio obtained?In my derivation,the ratio is N as belows:

 if x(n)=A*exp(j2*pi*f0/fs*n),0 <=n<N-1,

  X(k)=sum(A*exp(j2*pi*f0/fs*n)*exp(-j2*pi*k/N*n))

        =sum(A*exp(j2*pi*n*(f0/fs-k/N )))

 In the bin f0, 2*pi*n*(f0/fs-k/N)=0,

 => X(k)=sum(A) =>X(k)=N*A=>X(k)/A=N.

In the Dss demo, why is the ratio N/(2^(log4(N)-1)) ?Is there any literature to be referred?

Thanks in advanced,

Regards,

Rata

  • Firstly, note the documentation which is using latex to graphically show the formula, when you write it as text is N/ceiling( 2^[log4(N)-1] ), you did not write ceiling so just pointing that out. As you pointed out, the FFT definition would have scaled only by N, the additional reduction by a factor of 1/ceiling(..) is because the DSPLIB FFT function performs an internal scale down between stages to prevent intermediate overflows in the computations as documented in the user guide at  http://www.ti.com/lit/ug/spru565b/spru565b.pdf 

    "Since DSP_fft16x16r and DSP_fft32x32s performs scaling by 2 at each radix-4 stage, the input data must be scaled by 2^ (log2(nx)−cei[log4(nx)−1]) to completely prevent overflow"

  • Somehow the system dropped my last paragraph in the replay, so writing it again:

    We do not scale down the input data due to reasons mentioned in the demo doxygen and the 2^log2(nx) = nx [= what you call N], hence the scaling is N/ceiling(..).
  • Hi Piyush_ ,
    I have read the document you support.In the paper "Since DSP_fft16x16r and DSP_fft32x32s performs scaling by 2 at each radix-4 stage, the input data must be scaled by 2^ (log2(nx)−cei[log4(nx)−1]) to completely prevent overflow. In all other FFT functions, the input data must be scaled by 2^ (log2(nx)) since no scaling is done by the functions".DSP_fft32x32 and DSP_fft16x16 is used in the DSS demo, should the scale be 2^ (log2(nx))?Can you provide some interpretation?
    Regards,
    Rata
  • The document is not crisp about "r" (rounding) versus the non-r (which we use) versions, but both have the same scaling. The DSPLIB is missing this scaling documentation in the API documentation (.chm) that is shipped in the release itself which will be updated in a future release. If you want to check this yourself, you can create a stand-alone test that calls the dsplib functions with a tone with known amplitude (sufficiently low so as not to overflow) and check the output amplitude to find out the scaling factor. If you find different that what I mentioned, you can report back here.

  • Thanks for your reply,I get it.