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.

TMS320F28027: Phasor estimation and sampling

Part Number: TMS320F28027

HELLO!

We are trying to calculate phasor of sinusoidal voltage signal for power system relaying application. As the first step we need to sample the analog voltage signal taken directly from the source, which we have given to adc input channel A1. Using the samples, we want to use DFT recursive window algorithm to calculate the phasors. We simulated the DFT algorithm in MATLAB for limited number of samples where the magnitude of the phasor was a straight line under steady state conditions. We want to implement it in real time using dsp, but as we were not getting the desired results using DSP. Therefore we think it is the problem with sampling data. Because, we imported the samples from memory browser in the form of .dat file. When we plotted twenty samples, we got a complete cycle of sine wave. So, ideally, we should get 5 cycles with 100 samples, but we are getting more cycles (around 7). 

For our algorithm, we require sampling rate to be 1000Hz (20 samples per cycle for 50Hz signal).

We have kept TB PRD as 03E8 (decimal equivalent is 1000).

Our source signal when viewed on the CRO gives a clean sinusoidal wave. however after sampling it, it has many glitches when viewed using 'graph'.we tried varying TB PRD, but there is no significant change.

Please suggest what can be done to get the desired sampling rate.

Thank you!

  • Kruiti,

    Thanks for reaching out to the TI E2E.  I beleive what is happening is that we are not adequately charging the internal sample and hold capacitor detailed here:

    http://www.ti.com/product/TMS320F28027/datasheet/detailed-description#sprs2305090

    In order to not compromise the bit level of the ADC we need to charge the sample and hold capacitor to at least 1 more bit above; so in this case we need to make the signal 13 bit accurate, or 99.99% of its value.  So even though the PWM period will determine your sampling frequency we still need to sample the input accurately.

    There are 2 ways to address this, one is to increase the ACQPS to let the internal cap charge longer each time the pin is sampled.  I would try this first, since it doesn't involve changing any external HW.

    The other way is to improve the drive strength of the signal coming into the pin with either a buffer(op-amp) or even a larger capacitor to help balance the charge.  The thing to watch about increasing the capacitance is that it may effect your signal.

    Let me know how the above goes and if you need some more assistance.

    Best,

    Matthew