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.

TMS320F28034: Digital Power Library questions

Part Number: TMS320F28034
Other Parts Discussed in Thread: CONTROLSUITE

Dear C2000 expert,

I'm currently using TI's PFC demo to design my PFC power stage, and my PFC has been powered up correctly. But it's PF and ITHD is not very good. After trying to increase currently loop bandwidth, I found that the b0 and b1 should be larger than 1.0(IQ26 format) to have a good PF value, is there any risk if b0 and b1 above 1.0?

And my current loop is 1p1z structure, but I used 2p2z loop code, so what the a1's value should be if b0 and b1 above 1.0?

CNTL_2P2Z_CoefStruct1.b2 =_IQ26(0.0); // B2
CNTL_2P2Z_CoefStruct1.b1 =_IQ26(-0.3131);// B1
CNTL_2P2Z_CoefStruct1.b0 =_IQ26(0.5506); // B0

CNTL_2P2Z_CoefStruct1.a2 =0.0; // A2 = 0
CNTL_2P2Z_CoefStruct1.a1 =_IQ26(1.0); // A1 = 1

Regards,

Jack

  • Hello,

    You can increase b0 and b1 above 1 up to the limit set by the Q format used. In this case I5Q26 format is used with a 32-bit device. This means the integer part can go up to 32. You will have to still be careful when tuning the loop and must have some clamping at the output of the controller to limit max and min outputs.

    For a 1p1z implementation, you will need to tune a1 to get desired controller performance. For a true 1p1z, I believe b1 should also be 0 and b0 should also be tuned for desired performance. The single pole should be placed at DC. Why do you want to use the 2p2z structure to implement a 1p1z controller? 

    Hrishi

  • Hi Hrishi,

    Thanks for your reply.

    The reason of using  2p2z structure for implement 1p1z controller is because that I didn't found 1p1z code at controlsuite, so I think put the second pole and second zero at the same position, that could compensate each other. In addition, PFC is the 1st order system, pure 1p1z could be able to meet performance enough. 

    For your comments,  For a true 1p1z, I believe b1 should also be 0 and b0 should also be tuned for desired performance. why does b1 should be 0?

    I have converted the ti's 2p2z structure as PID, and get the parameter transform as below:

    b0 = kp + ki + kd;

    b1= -kp + ki -2kd;

    b2 = kd;

    a1 = 1;

    a2 = 0;

    For a pure 1p1z controller, that is the same with pure PI turning, so KD = 0, then I can get:

    b0 = kp + ki

    b1 = -kp + ki

    b2 = 0;

    a1 = 1; 

    a2 = 0;

    Here I can use PI turning theory to move pole position and increase/decrease gain.

    My question is that, if b0 and b1 are above 1, what value of a1 should be? Is it still can be 1?

    If you have some simulation files(matlab or mathcad), can you please share it with me? That would help me to turn the parameters. 

    Thanks and Regards,

    Jack

  • Dear Hrishi,

    Do you have any update?

    Regards,
    Jack
  • Hello,

    Any update about this?

    Thanks,
    Jack
  • Hi Jack,


    Sorry for the delayed response.

    The quick answer is yes, A1 should be 1. Your equations look correct.

    A PID controller can be easily mapped to the 2p2z structure. This is done in some of our example application code. Please take a look at this digital power workshop code. This code allows users to implement pole-zero based tuning and also PID based tuning using coefficient mapping. Here is the correct mapping for this:

    // Coefficient init

    Coef2P2Z_1[0] = Dgain * 67108;  // B2

    Coef2P2Z_1[1] = (Igain - Pgain - Dgain - Dgain)*67108;  // B1

    Coef2P2Z_1[2] = (Pgain + Igain + Dgain)*67108;  // B0

    Coef2P2Z_1[3] = 0;  // A2

    Coef2P2Z_1[4] = 67108864;  // A1

    Coef2P2Z_1[5] = Dmax[1] * 67108;  // Clamp Hi limit (Q26)

    Coef2P2Z_1[6] = 0x00000000;  // Clamp Lo

    I hope this helps.

    Hrishi

  • Hi Hirshi,

    Thanks for your comments here. Can you please let me know where I can get digital power workshop code?

    Thanks again,
    Jack
  • Hi Jack,

    It can be downloaded from the same wiki page. Look for " Workshop Application Code (.zip file)" after the entry on "2. Computer with CCSv5 installed" under the section "Workshop Material".

    Hope this helps.

    Hrishi