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.

PFC Implementation question

Other Parts Discussed in Thread: TMS320F28027, CONTROLSUITE

Hi all,

For a final course project I am going to attempt to build a basic PFC using the TMS320F28027 Launchpad, I am at the stage of just over viewing, and deciding how to implement.  I need to feed three signals back to the ADC, 2 of these should not be an issue, however for the 3rd I am struggling how to sample and get the information I need.

The third signal will be a sample of a rectified AC (~50HZ), the rectified AC will not be smoothed so it will appear to be double the frequency.  This method for counting is referenced in a few PFC documents I have read, and the maths behind it seems fairly simple.  I have enclosed an extract below from the spra902a.pdf

2 things need to be extracted from the sampled rectified signal, the frequency and also the average voltage.  The average voltage is fairly straightforward as just requires samples, but the counting part I am struggling with at the moment!

I am not after code just some pointers and ideas how I might approach this issue with the C2000, and best practice.  I have made a frequency counter before using the LM3S but this was fed with square waves so easy to count edge triggers.

Thanks,

Ant

  • Hi Ant,

    I would like you try using eCAP module for frequency counter. Let me know if its accurate enough.
    .

    Regards,

    Gautam

  • Hi Ant,

    I am not sure if you will be able to use the eCAP directly, since this is an analog signal.  Maybe you could use the following setup?

    • Sample your rectified signal on channel A2 or A4, since these also have comparator inputs (see Figure 4-1 in the datasheet).
    • Set the associated 10-bit DAC to the threshold that you want.
    • Enable the comparator output on a pin
    • Connect the comparator output to eCAP input
    • Use the eCAP to measure the comparator output frequency

    Of course you could just do a software implementation where you count the number of ADC samples above/below some limit in your ADC ISR.  This will have worse temporal resolution (limited by ADC sampling rate, which is probably in the 10's to 100's of kHz) but will have a better threshold resolution (12-bit ADC vs 10-bit DAC).  

  • Hi Guatam and Devin,

    Ok been reading into this further and found some example code for DSP28335, it uses the ADC purely.  I need to decipher what is going on, and also slow it down as the PWM and ADC sampling is running at 160kHz.  I was aiming for 80kHz  but can slow this down further if necessary for the F28027.

    First impressions on the code it looks like it uses a similar technique to what you describe Devin, and gives a good approximate of the line frequency.

    Will test on the signal generator over the next few days and post back the results.

    Cheers,

    Ant

  • Hi, Ant.

    Thanks for sharing your problem. As for me, I have seldom tried to deal with that kind of problem before. Have you ever worked it out? I wonder whether you have any exprience about pdf extracting process. Because there is something wrong with my pdf reader. I need convert pdf into text or other formats. Any suggestion will be appreciated. Thanks in advance.   

    Best regards,

    Pan

  • There is another new interleaved PFC kit software available in TI ControlSUITE. If you have ControlSUITE then you will find this kit info(s/w, docs, design etc) under:

    C:\TI\controlSUITE\development_kits\ILPFC_v1.0

    In this kit s/w there is a new macro called "SineAnalyzer.h" that takes three inputs - the rectified PFC input voltage, the sampling rate and the threshold input level. Based on these information it calculates the frequency, the rms voltage etc. The documentation for this s/w macro is available (DPLib.pdf) under:

    C:\TI\controlSUITE\libs\app_libs\digital_power\f2803x_v3.5\Doc

    Shamim