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.

PID 2p2z controller, integral part becomes negligible?

Other Parts Discussed in Thread: C2000WARE, TMS320F28035, CONTROLSUITE, SFRA

Hello! I want to use the CNTL_2P2Z.asm block (from digital power lib) as PI controller for a PFC application. The constants in the controller can be calculated as in the figure below (from TI's 2p2z PID derivation). KD' will be zero in my case (PI-control).

My concern is that KI' will be very small if the sampling frequency is high, is that correct? If I am performing ADC from sensors with 100 kHz frequency, then KI' will be KI*(10^-5)/2. Therefore b0 and b1 will pretty much equal Kp' and -Kp' respectively. Will that not remove the influence of the integral part?

Am I thinking about this incorrectly? Thankful for answers!

  • Niclas,

    Your understanding is correct, but integral action would still take place even if b0 and b1 were the same. If we set b2 to zero (since Kd = 0), the control law is

    u(k) = b0*e(k) + b1*e(k-1) + u(k-1)

    Ki affects the difference between the first two terms on the RHS which are accumulating the error, with Kp scaling both of them.  Clearly the rate at which the error is accumulated depends on how frequently the controller is run, so the influence of T is to make both b0 & b1 smaller.

    Incidentally, there is a Digital Control Library in C2000Ware which you may find interesting.  It contains C and assembly implementations of the more common control structures, including both PI and 2P2Z (called DF22 in the library).

    I hope this helps.  Please post back if anything's unclear.

    Regards,

    Richard

    6835.Discrete PID controller.pdf

  • Niclas,

    I'd like to modify the first line of my reply: if b0 and b1 were the same there would be no integration. It's the (possibly small) difference between these coefficients which causes the integral effect. If Ki' is very small, numerical resolution may be an issue.

    Regards,

    Richard
  • Thank you! The Digital Control Library does not support the TMS320F28035 it seems, otherwise it would have been nice to use
  • Niclas, 

    You're welcome! 

    Just to add there is a fixed point PI controller in the DCL which would run on the F28035.  It's in the latest v2.1.1 in C2000Ware - look in the header file "DCL32.h".  Probably better to stay with the 2P2Z since you're already using that, but I wanted to mention it in case you run into any issues or need another option later.

    Regards,

    Richard

  • I'd jump at the chance to alter the principal line of my answer: if b0 and b1 were the same there would be no mix. It's the (perhaps little) contrast between these coefficients which causes the indispensable impact.Assignment Help 

  • There is a GUI for parameters conversion. Once inputting the gain, poles and zeros location, and calculate frequency, the parameters will be show directly.

    If you've installed controlsuite, you can find the GUI at this location. Hope it help you

    C:\ti\controlSUITE\libs\app_libs\SFRA\v1_10_00_00\GUI