Community
cancel
Showing results for
Did you mean:
Highlighted
Honored Contributor I
1,422 Views

## DSP Builder and FFT

Hi,

I'm doing some simulation with the FFT with the DSP Builder, i'm using the streaming one, I don't understand the meaning of the OUTPUT, source exponent.

The data output consist in the real part , the imaginary part and the exponent. I dont understand what the exponent refers to.

It refers to the binary code? So that I have to shift the numbers to display the correct ouput? I don't think so....

Or it refers to the decimal notation?

I'm trying to have the amplitude spectrum out of the FFT and at the final stage I'm using the FFT scope that the signal processing MATLAB blockset has, but before this I have to convert the 3 output in something understandable for MATLAB, and this is the reason of why I have to understand the output's meaning.

Thx:)
Tags (1)
7 Replies
Highlighted
Honored Contributor I
14 Views

Hello,

yes, the Altera FFT core uses a block floating point architectur, which is described in detail in the users guide. You actually have to shift the output data.

--- Quote Start ---

In comparing the block-floating point output of the Altera FFT MegaCore function to the output of a full precision FFT from a tool like MATLAB, the output should be scaled by 2**(-exponent_out) to account for the discarded LSB's during the transform.

--- Quote End ---

Regards,

Frank
Highlighted
Honored Contributor I
14 Views

Thx,

I've checked everything and now I think that the shifting problem is solved.

But anybody knows where can I find one good exemple a working FFT for DSP builder? Hopefully with an undertandable output, I don't know ,maybe with a amplitude spectrum?

Or better, anybody know how display in an an understable way the output of an FFT in DSP builder? I was trying to use the MATLAB FFT amplitude spectrum..

Thx
Highlighted
Honored Contributor I
14 Views

Hello,

to my opinion, there is no basic difference between Altera FFT core and Matlab FFT function. Matlab is a powerful tool to evaluate different signal processing techniques for a particular measurement task, you can change parameters and display original and processed signals easily.

I agree, that amplitude spectrum (or power spectrum) is a first choice for displaying signal characteristics. It can easily be extracted from complex FFT output by calculating the square sum of real and imaginary part for each frequency and throwing away the upper half which is identical to the lower after this processing. For an linear amplitude scale, calculate the square root for each component.

If the signal is nonzero outside the FFT interval (most likely it is), windowing prior to FFT could be necessary to improve frequency respectively amplitude resolution.

Regards,

Frank
Highlighted
Honored Contributor I
14 Views

Hi again!

After a few (a lot!) months I'm back on my project again..and I'm at the same point.

I'm comparing the MAtlab FFT to the DSP builder megacore FFT 7.2. I would like to see the same results in both of their outputs.

I've some issues in displaying the FFT Megacore output, can you help me, I will post the simulink file.

I've used a streaming 12 bit 256 points FFT.
Highlighted
Honored Contributor I
14 Views

Here... check this posting... I have commented on something similar before: http://www.alteraforum.com/forum/showthread.php?t=3367&highlight=fft+matlab

Also, if you want a good FFT example, I also have posted a FFT-IFFT unity gain example on the forum as well. Please search for it and check it out.

Hope this helps.
Highlighted
Honored Contributor I
14 Views

Regarding the use of the Exponent Output of the FFT block, I have made a DSP builder function to convert the floating point value into an integer.

I'm attaching this block. Please note that the attachment only contains the function in question (I simply copied an pasted it into a new MDL file). I cannot send the whole design because it is confidential.
Highlighted
Honored Contributor I
14 Views

thanks for the reply, i've solved my problem but I will try also your scheme.

Thx again