I am inputing a sinus wave into an ADC, the ADC is ploting 16bit data that is tranformed to the FFT core of the altera (8192 samples). The outputs of the FFT component are getting into mul_adder (real*real+imag*imag) and the into a sqrt mega wizard, I take the q output of the sqrt component as my results, the remainder output is left open.
The output results are fine at the begining (on low power signals) but then I get the same area of results and can't calibrate my software. The frequency is identified fine too.
this are the average results I get:
-20dBm: 65420288
-25dBm: 65114869
-30dBm: 63979786
-35dBm: 60896972
-40dBm: 58222571
-45dBm: 49719808 -- from here and further it seems pretty good.
-50dBm: 27982940
-55dBm: 13918141
-60dBm: 6952663
-65dBm: 3486031
-70dBm: 2057009
-75dBm: 1140961
-80dBm: 637734
-85dBm: 367587
-90dBm: 280281
Does anyone knows why it may happen? I have no idea of where the problem may come from..
I think it depend on the used model , I had try the 4 bits Multiply Circuit with simple block but there're some error, 15 years ago . If you try to add designing enough, mean that to meet good region of frequency response , the error be less...
I actually succeded solving the problem some days ago. The problem was that the FFT block needs to get signed input data while the ADC I am using is producing unsigned data results. So I converted the ADC output word to become a signed data and it all worked out pretty well.
Thanks anyway ;-)
I am not using the exponent option, the block produce two 32 bits output (real and imaginary) and I made a component that will take this two words and calculate the complex number magnitude. The output of this component is the result I am using to detect the power of each frequency bin.