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.

HVPSFB kit questions

Other Parts Discussed in Thread: CONTROLSUITE

Hello !

I have some questions about HVPSFB kit in PCMC-mode:

1. I don't understand why it is need to change connection for PWM1,2,4 in PCMC and VMC mode by J2 and J3
What is the problem or may be what the reason is ?

2. The part of code in PCMC\HVPSFB-Main.c (lines 866 - 870 )

// Voltage setting calculated by:
// Vref = Gui_VfbSet * iK_Vfbout, where iK_Vfbout = 1/K_Vfbout (i.e. inverse K_Vfbout)
// view and set following variable in Watch Window as:
// Gui_VfbSet = Q10 (Used as Q15 below)
Vref = ( (long) Gui_VfbSet * (long) iK_Vfbout ) >> 5; // (Q15 * Q14) >> 5 = Q24

In this example the result Vref = (Q10 * Q14) >> 5 = Q24 >> 5 = Q19 so why Q24 ?
I'm not understand how Gui_VfbSet may be used as Q15 ? Where is conversion to Q15 ?


3. The another part of code in PCMC\HVPSFB-Main.c (lines 763 - 778 )


// This is an example code for implementing the slew rate control in
// a slower state machine instead of implementing it in the ISR.
// VfbSlewRate should be set as a positive value
Vfb_slew_temp = Vref - VfbSetSlewed;

if (Vfb_slew_temp >= VfbSlewRate) // Positive Command
{
VfbSetSlewed = VfbSetSlewed + VfbSlewRate;
}
else
{
if ((-1)*(Vfb_slew_temp) >= VfbSlewRate) // Negative Command
{
VfbSetSlewed = VfbSetSlewed - VfbSlewRate;
}
}

Question:

VfbSlewRate = 25600, it is 0.0015 (Q24)

What is the reason of correction of VfbSetSlewed value by so small value ?


Best regards, Grigory

  • Grigory,

    I was not the one that designed the PSFB but I will try to answer your questions.

    1) The PWM re-connection is necessary due to differences in PWM configuation on the SW side.

    2) In this situation, it is important to understand that Q-format is used to make it easier for humans to understand the numbers.  As far as the math goes, it does not matter what Q-format it is, only the data bits.  We can say Gui_VfbSet is any Q-format we want, Q0-Q15 (since it is 16 bits long with 15 data bits). 

    We normally use Gui_VfbSet as Q10 so that value goes from 0-32 to make it easier for humans to use.  If we choose to use Gui_VfbSet such that the value goes from 0-1 it turns into Q15 format.  With this interpretation, the math works out as stated in the comments.  This is valid because the number of data stored in the bits is the same, regardless of the Q-format used to interpret the data.  Our goal is Q24 since that is the format the control loop expects Vref to be in. 

    I can elaborate further if this is still not clear.

    3) The output voltage slew is used to ramp the output voltage target up/down in a controlled fashion to prevent sudden jumps in the control loop output.  The rate of the ramp (slew rate) is calculated based on the desired ramp slope (eg - V/s) and how often the ramp calculation is being performed.

  • Thank  you Daniel, but it is not still clear 

    1. From the SW side I don't see differences (configuration yes, but order - no) , differences are only from the HW side. So I don't see the reason to change the first leg to start - it will be left leg or right leg, there is no difference for the transformer. So the SW and HW sides are may be done without changing legs. 

    2. Q format it is not just an interpretation - if you want the number be in Q10 - it is need to shift left by 10 and then if you want to change from Q10 to Q10 - you need to shift rigth by 14. So from that point of view I'm not understand how it may be in Q15 without shifting ?

    Best regards, Grigory 

  • 1. From a PSFB general sense, it does not matter which leg you start with.  However, when I asked the engineer who worked on the board, he said that for this specific board, due to the additional components add to the FB, there were operational benefits when you started with one leg over the other.  I will ask him to comment to provide specific details

    2.  I agree that if you want to convert a number from one Q-format to another, shifts are required.  However, given a set of data bits, you can interpret them in any Q-format without affecting the data bits. 

    For example:

    0x0400 in Q0 is 1024.
    0x0400 in Q10 is 1.

    In both cases, the raw bits are still 0x0400.  All you are changing is the "scaling" or how you interpret the bits.  In the software code, we are not actually converting.  We are merely re-interpreting the bits. 

    Another way to look at the code you mentioned is that we perform math to calculate a Q19 value that goes from 0-32.  We then re-interpret it as a Q24 value that goes from 0-1.  The reason we do this is because the control loop blocks are written such that they expect 24 data bits that, when interpreted as Q24, range from 0-1. 


     

  • Grigory,

    It is advantageous to locate the clamping diodes (in the primary circuit) between the full bridge leg with active to passive switch transitions (leading leg) and the transformer. This reduces the amount of circulating currents through the clamping diodes improving system reliability and efficiency. To maintain the same full bridge leading leg as the PCMC implementation and because of the change in PWM configuration between VMC and PCMC implementations, the VMC implementation requires jumpers.

    Hrishi

  • Hrishi and Daniel !

    Thank you for support, it is clear to me all discussed above. 

    Best regards, Grigory  

  • Hi Hrishi,

     

    Why in VMC mode, there is no CC and CP features like those in PCMC mode?

    Are there any reasons why they are not implemented?

     

    Thank you,

     

  •  Hi Harrison,

    The HVPSFB kit focusses mainly on peak current mode control (PCMC) and not voltage mode control (VMC). This is because PCMC control of a PSFB stage highlights a lot of C2000 MCU's unique on-chip features like on-chip analog comparator and DAC modules, on-chip slope compensation hardware and sophisticated PWM generation mechanism.

    Therefore the default hardware and software configuration for this kit is PCMC. There is no technical reason for not implementing CC and CP modes with the VMC version. I think it was more a matter of schedule at the time. I believe that the CC and CP algorithms implemented with PCMC can be easily ported to VMC.

    Hrishi

     

  • Hi Hrishi,

     

    Thank you very much for your reply.

    one more question, in the schematic of the controller board, Iout1 is connected to ADC-B3, however, I noticed you have commented it out in the code and use Iout2 only;I haven't found anywhere else uses Iout1.

    Is this for something else?

    Thank you,

     

     

  • Hi Daniel,

    Thanks a lot for your explanation.

    so if having Q18 value that goes from 0-64( VfbSet is Q9), we interpret the result Q9*Q14 it as Q24, then the shift should be 6 instead of 5.

    say, if I have Q9 instead of Q10,then

    instaed of the following
    // Gui_VfbSet = Q10 (Used as Q15 below)
    Vref = ( (long) Gui_VfbSet * (long) iK_Vfbout ) >> 5; // (Q15 * Q14) >> 5 = Q24

    it should be like

    // Gui_VfbSet = Q9 (Used as Q15 below)
    Vref = ( (long) Gui_VfbSet * (long) iK_Vfbout ) >> 6; // (Q15 * Q14) >> 5 = Q24

    is it right?

    Thanks a lot

  • John,

    Correct.  You may also want to change your K and iK factors as necessary.

    The following spreadsheet may be useful as you do this (see Vfbout tab):
    \controlSUITE\development_kits\HVPSFB_v1.1\~Docs\


    Thank you,
    Brett

  • Actually, I was wrong above.  It should always be:  _____*(long)iK_Vset_____) >> 5;

    iK will need to change so that your modification will be recognized.


    Thank you,
    Brett

  • HI Brett,

     

    thanks a lot.

    If the shift number should be always 5, but iK need to changed.

    by using the spreadsheet, ik is the same Q14 number, just the value was changed, right?

    then we have actually Q9 * Q 14, but we still shift 5 digits to get Q24?

    a bit confusing for me.

     

    also, could you please help me on this post?

    thanks a lot,

     

    http://e2e.ti.com/support/power_management/digital_power/f/184/t/267005.aspx

  • Hi John,

    I believe you are trying to understand whether the shift by 5 digits will change to 6 if you represent a number in Q9 format instead of the Q10 format (for Gui_VfbSet) in the HVPSFB project. Although you are representing the number as Q9 or Q10 in the watch window, it is still a 16-bit number. This number is treated as a Q15 number in this calculation. In this case there is a multiplication of Q15*Q14, resulting in a Q29 result. To get this result in Q24 format we right shift by 5 bits. It doesn't matter whether you view the Gui_VfbSet variable as a Q9 or Q10 number, the shift should still be equal to 5 bits.

    I hope this helps.

    - Hrishi

  • Hi Hrishi,

     

    Thanks a lot for your help.

    so no matter what Qnumber Gui_VfbSet represents, it always shifts 5 digits.

     

  • John,

    Yes, your understanding is correct.

    Hrishi

  • Help me a lot,thanks.