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.

TMS320F280049: How to adjust sampling rate so that extract data from ADC raw data?

Part Number: TMS320F280049

Hi,

We use ADC to sample signal, and then transmit the data to F280049 after sampling. The data transmission rate is fixed (currently is  62.5 kHz), and the number of sampling points is also fixed at 2048.

F280049  performs FFT operation so that obtain the amplitude and phase of the fundamental frequency, double frequency, etc., the fundamental frequency of the signal will also changed due to the change of the rotational speed of the rotor.

In order to adapt to the fundamental frequency change (ensure the fundamental frequency is the resolution of the FFT operation). we need to adjust F280049 sampling rate.

(for example, if ADC transmits 4000 data, we need extract it to 2048 data, and ensure that the data is equally divided, and make sure the first and last data are read).

Is there a example for this? Thanks a lot. 

  • Hi Daniel,

    I'm not sure that we have an example of this, but I'll investigate with the Systems team.

    How you implement this will depend significantly on the actual potential range of frequencies and how fast the fundamental frequency is changing.   I would assume that the most direct method would be to adjust the frequency of the sampling ePWM based on the detected FFT fundamental frequency from the previous FFT. 

    Bandwidth and memory permitting, you could also oversample such that a shorter, faster capture could be used if the detected frequency in the (decimated) data is too high w.r.t. the FFT frequency range.  Memory and time permitting, you could take a longer duration capture and then decimate further if the detected frequency is too low w.r.t. to the FFT frequency range.      

  • Daniel,

    To provide some contextual numbers to your request:

    With fs = 62.5kHz, FFT_SIZE = 2048, the FFT bin size (or spectral resolution) = 62500/2/2048 = 15.258789…Hz. So you have a FFT that’s capable of measuring from 0 to 31.25kHz, with 2048 bins. If you need higher frequency range, you typically increase the ADC sampling frequency, whereas if you need finer resolution, you typically increase the FFT SIZE.

    Thanks,
    Sira
  • Hi Daniel,

    Do you have any additional questions here? If not, we can close the thread for now and you can use the 'ask a related question' button later if you have additional questions.