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.

CCS/TMS320F28034: PI TUNING OF PMSM

Part Number: TMS320F28034

Tool/software: Code Composer Studio

I have calculated current & speed PI's  parameter based on PI theory, so I get real number of Kp, Ki for current Loop & speed Loop, but  CCS Develop kit need IQ fornat and unity to PU format, can you give me one example how to input my calculation into my CCS program. thank  you!

  • 1. You need to scale the coefficients first.
    The output of the speed PI controller equals the actual input reference current in amperes for the current controller. The output of the current controller equals the actual voltage applied to the motor windings. The PI controller outputs are normalized to per unit scaling where a value of 1 represents the maximum value possible, and a value of -1 represents the minimum value possible.

    The output of current regulator is scaled in such a way that 1 corresponds to 100% PWM, and -1 corresponds to 0% PWM. In these cases, it is required to know the exact scale factor between the PI output and the actual system parameter you are controlling so that you can adjust the PI coefficients accordingly.

    2. Convert it to IQ Format.
    The "IQ Math" library which stands for "Integer Quotient". This allows the user to handle floating point values with ease on a fixed-point machine without suffering from the performance hit you typically get with a full floating-point support device. For example, say you have a 32 bit variable which is typed as an "IQ24" variable type. This means that any variable of this type is assumed to have a 24-bit fractional component, and an 8-bit integer part. For example, you maybe get an integrator gain of 0.1, so you may set it to _IQ(0.1).
  • many thanks for your quickly reply!
    another question: Kp & Ki can be greater than IQ(1.0).
  • Yes, it's ok from _IQ(0.0) to _IQ(127.0) if the IQ format is 24.