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 problem with F28069

Other Parts Discussed in Thread: CONTROLSUITE

Hi,

 

My customer is facing some problem with Floating point FFT. They are using the F28069 controlSTICK. 

The details of the issue are as below -
 
The code samples the input sine wave on negative edge on GPIO0, the input signal details are 
Input sine wave  = 1.5 + 3sin(2*pi()*1000*t)  (DC offset is just included because ADC don't samples negative values)
ie.     Amplitude = 3V(peak to peak)
         DC offset = 1.5V    
         Frequency = 1KHz 
         Number of Samples  = 256
  
  Perform 256 point FPU FFT on sampled sine samples, then with help of FFT result amplitude of first 5 
  Harmonic is calculated.

  The hardware settings are as given bellow


  1.    GPIO0 as input and assigned to XINT1.
  2.    An ADC is configured for single conversion, set SOC0 channel select to ADCINA2.
  3.    Process starts with negative edge on GPIO0 which is zero cross detector's output and this enable timer0.
  4.    SOC0 start trigger on timer0 overflow on every 100us(so sampling rate will be 10KHz). 
  5.    To take 256 samples, timer0 overflows for 256 times then timer stops.
  6.    RFFT_32f(RFFT_F32_STRUCT *) function to compute FFT.  
 
 
The input signal samples are collected in Signal[256] buffer which hold signal+DC offset. Voltage_ADC2[256] holds only signal(no DC offset) and is input buffer of FFT module. OutBuffer[256] is FFT output buffer.
 
 
Input signal samples are accurate but the FFT output is not correct.
 
The expected output should be 1.5V peak at 1KHz but not getting it.
    
Watch Variables:
                           Signal (Graph settings: Single time, sampling frequency 10KHz)
                           Voltage_ADC2(Graph settings: Single time, sampling frequency 10KHz)
                           Outbuffer(Graph settings: FFT magnitude, sampling frequency 10KHz, FFT Size 256, FFT stages 8)
 
 
This code runs from RAM.

Please help.

Thanks
Suman G.

  • u can try the example code in controlSUITE/libs/dsp/FPU/v120/examples_ccsv4/2833x_RFFT_ADC_RT. that one works for real-time on-chip ADC data acquisition and FPU FFT. but the problem is u need to port that code from 28335 to 28069. might need to change cmd file a little bit.

    in ur case if the setup is correct, the spike of 1KHz should appear at 25 point to 26 point. if no spike in frequency domain then ur setup is incorrect. adjust ur input signal frequency u should be able to see the frequency bin associated with the raw signal frequency moves.