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.

FFT Plot in CCS v3.3 - Magnitude unit

Other Parts Discussed in Thread: TLV320ADC3101

Hi All,

 I am using CCS to plot FFT for an array of 24 bit data. X-axis gives me the Frequency content of the signal. I dont see an unit in the Y-Axis.

The divisions are numbered as 2.8e+6,5.7e+6 ... so on till 3.4e+7 along the Y axis

I am getting my peak at 3.4e+7. I want this to convert into dB scale or Voltage value.

1) Is this the formula  -20log(Peak Val/2^23)    correct??? for dBu conversion

2) Is there a setting for this in the plot?

 

Thanks

Lakshminarayanan

  • FFT results are unitless, or we should rather say that units are arbitary - it's consequence of fft's nature. Since these values depends on length of buffer, fft spectrograms, with different amount of samples, will have different magnitudes of same peaks. I just want to say that FFT gives us informations about which frequencies makes our signal, and compare their magnitudes, no exact amplitudes. All what you need to make to reach your goal is divide FFT results by (0.5*samples amount). You can export results from CCS, read them with matlab or octave, and then divide. For example - if you have buffer with 1024 samples, divide by 512. Now you will have data set sine amplitude vs frequency. Also dB conversion will be easier now  -> Adb=20log(A/Aref)   where A is set from previous step, and Aref is amplitude of reference signal, usually 1.       

  • Hi Michal,

    My buffer size is 2560. I am getting a FFT peak at 8.5e+5.

    So dividing this by 1280 gives me 664.0625. This is the relative amplitude of that frequency component.

    Taking Aref as 1, Adb gives me 56.44 db. This cannot be correct as its a very high value.

    How do i get Aref in my case? The samples values result from digital conversion of a  0.22V peak to peak signal of a single frequency.

     

    Thanks

    Lakshminarayanan

  • It's hard to say, because You haven't described your application. Tell me what is the purpose of DSP and describe what is source of your signal. Another important thing is A/D conversion - reference voltage, resolution and way you read data from ADC (float, signed/unsigned integer). I don't understand what you wanted to say in last sentence, so if You could, please explain also that. With these informations probably I will be able to help You.  

  • Application is sampling signals in audio range(20 - 20kHz). I am using TLV320ADC3101. 24 bit resoln, fsampling 48khz.

    No processing blocks like filters in DSP are implemented. Input is just sampled.

    From the signal generator, Input is a sine wave signal of single frequency component.

    This 24 bit data (signed)  is plotted for FFT in ccs. I want to find the magnitude of the peaks in dBu.

     

  • Use my calculations as example:

    peak after divide is at 8.5e5. Range of 24-bit ADC is (2^24)/2=8388608, division by 2 because signed type, then range is from -8388608 to +8388608. Amplitude of analog input signal is   Va=Vref*8.5e5/8388608=0.1*Vref, you have to know what is value of reference voltage in your system. If we assume that Vref=3.6 -> Va=0.36 [V]. To calc dBu you must refer to 0.775 [V], so  Vadbu=20log(Va/0.775)= -6.66 [dBu].

    You are using generator so it's easy to check and eventually correct these calculations. Sine wave with known amplitude is generated, so there is just one peak so you can directly compare Va calc result with generator settings. However, what i've presented here would work fine for ADC. It's not that easy for CODEC, because it probably provide not only conversion, but also some processing. You have to study settings of that IC, to exactly know what happens with the signal  inside CODEC and what mean digital word reading from it.