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 main.c

Hello,

 

in the code of main.c, TI's HVPSFB kit,

on line 173:

volatile long VfbSetSlewed = 4187136; // Slewed set point for the FB voltage loop - start from 4V

How did you get this number from 4v to 4187136,

I just could not get the same .

Thanks a lot,

  • anybody can help on this?

    thanks a lot,

  • John,

    Here's the calculation based on the spreadsheet parameters for HVPSFB kit (look in ~Docs folder). 4V is represented in Q10 format but is a Q15 number. This needs to be multiplied by the iKv factor, 32714, (in Q14) from the spread sheet. The result of this multiplication is a Q29 result. Also the input to the slew rate logic is in Q24 format. Therefore, the Q29 result needs to be right shifted by 5 bits to get the correct value to be programmed.

    For 4V, this means,

    4*2^10*32714/2^5 = 4187392.

    I hope this helps.

    - Hrishi


  • Hi Hrishi,

     

    Thanks a lot for your help.

    in main.c

    C2 task

    Row No. 1268

    it is:

    VfbSetSlewed = 2093568;

    // Start ramping up from 2V (Q24)

    here it starts from 2v;

    but in the initialization, it says start from 4v.

    so which one is correct?

     Thanks a lot,


     

  • Hi Hrishi,

     

    another question in main.c:

    in HVPSFB kit's code, main.c, the slope value is 40 and GUI can adjust the value from 20 to 100.

    in the calculation sheet, the slope value, is 0.04v/us.

    how the two numbers are related to each other?say 40 and 0.04v/us?

     

    Thank you very much,

     

  • 2V is correct. I believe that the value programmed at the start (4V) gets overwritten anyway whenever this piece of code in the C2 task gets executed. This should be before the voltage command starts ramping up.

    Hrishi

  • John,

    0.04V/us = (0.04/60) V per system clock (60MHz) = 0.000667 V/SysClk 

    This corresponds to a ramp generator decrement register value (16-bit register) of = 0.000667*2^16/3.3 = 13.3

    This value is multiplied by a safety factor of ~ 3 to get a value of 40 for the slope. The calculation sheet may show a safety factor of 2, but a value of 3 has been used.

    I hope this helps.

    Hrishi

  • Hi Hrishi,

     

    Thanks a lot for your explanation.

     

    in GUI, it says slope can be adjusted from 40- 120, so the safe factor can vary from 3 to 9.

    it seems a very large window, how did you decide the safe factor based on what factors then?

    Thanks a lot,

     

     

  • John,

    This is just to let the user experiment with different values of slope. With peak current mode control there is a minimum critical slope value that is required to guarantee stable operation of the converter. Too much slope may deteriorate the system dynamic performance and eventually the system will approach a voltage mode controlled system.

    Hrishi

  • Hi Hrishi,

     

    Thanks a lot for your explanation.

    so the consequences of too much slope is poor dynamic performance and sliding into voltage control systems.

    other than these, any other consequences? say, if I put 200 slope value (the maximum slope allowed in GUI for this kit), will this kit still deliver 12v 50A and stable?

    try to make it safer before doing that.

     

    Thanks a lot,

     

     

  • John,

    Increasing slope will reduce the maximum possible duty cycle. If that happens, output voltage may not be regulated at the set point. This effect is more pronounced at the lower end of the input voltage range and the higher end of rated load. For the HVPSFB board this may not be an issue when the input voltage is 400V and the slope is 200. However, this effect might show up when the input voltage falls to (say) 370V.

    If all control coefficients are kept the same, increasing slope should not make the system go unstable. But keep in mind that this will slow down the system response. This might mean that the output may fall out of acceptable/safe range during transients.

    Hrishi

  • Hi Hrishi,

     

    Thanks a lot for your explanation.

    I have another question about 2p2z parameters:

    Row 2906, in main.c

    int16 b2_Gui=0, b1_Gui=-10945, b0_Gui=12412, a2_Gui=0, a1_Gui=1024, a0_Gui; // 2P2Z coefficients for the voltage loop (Values can be controlled directly from CCS or from GUI by poles and zeroes placement)

    this is the default working mode parameters for 2p2z(with no gui),  a0_Gui is not initialized and I see it appears a random number in debug mode.

    is this designed to be so?

    Thanks a lot,

  • one more question,In GUi, Kdc is the DC gain of the 2P2Z controller in decimal , right?

     

    thanks a lot,