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/TMS320F28377D: PI output oscillates

Part Number: TMS320F28377D
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: Code Composer Studio

Hello community

I'm using "PI_CONTROLLER" macro from controlSUITE for controlling speed of PMSM.

However, when I increase the "Kp" the output of PI controller oscillates and I think its abnormal. (see attached photo) I have to increase the Kp in order to output of PI could reach to defined Maximum limit in the speed up process.

What's wrong? Is it a problem related to the coding of PI macro? so in newer versions of developed codes, another macro is used as PI controller? (for example in the latest version of IDDK PM servo)

regards

  • The PI_CONTROLLER that you see in controlsuite is tested well enough for fidelity, so I hesitate to doubt it.

    The oscillation can be due to few reasons
    1. Inherent loop instability due to the choice of Kp and Ki
    2. Noise in the feedback
    3. Noise in the reference

    You will have to monitor the feedback by running the motor in open loop. If it is noisy, increasing Kp will make it more noisier
    Also, monitor the reference, which is fed by the speed loop. If the speed feedback is noisier, then it can bubble into the output of speed PI controller

    For PI controller design, refer to the TI blog
    e2e.ti.com/.../teaching-your-pi-controller-to-behave-part-i
  • Hello Ramesh

    PI feedback is through an incremental encoder which it's output is monitored using DAC (as you can see in the photo attached to the last post). I think it's in a good condition. 

    The reference is given to the system by code. so it can't be noisy.

    I think as you mentioned, the Kp and Ki choice is not good. I don't know why my PI output, unlike the computer simulation, doesn't reach to it's maximum value. Due to this I have increased the Kp extremely and I think this result in oscillation of PI output. 

    I will work on it.

    By the way, is there any sample code for low-pass filter so that I use it for filtering the speed feedback generated by the incremental encoder (Using SpeedFR macro) ?

    Regards

  • Current loop PI controller will reach max value if the running speed is near full speed or if the dc bus voltage is low. Changing Kp too high need not help your case. I suspect that your current feedback is not consistent and may be noise infected.

    Anyway, an LPF in 's' domain O(s) = I(s)1/(1+sT) , where T is the filter time constant

    will translate in dig domain as

    O(n) = O(n-1) + (I(n)-O(n-1))*Ts / T, where Ts is the sampling period.

  • Thank you Ramesh

    I don't use any current PI controller. my control method is not FOC. It is "Model predictive control".
    There is only one PI in this control scheme and this is for controlling "SPEED". This PI generates the "q-axis current" command in its output. q-axis command is proportional to the electromagnetic torque. So for a fast torque response, the output of speed PI controller should reach it's maximum value for mid and large speed variation commands.

    Regards
  • Hello,

    Is the issue resolved? If so, pls close the thread, else let us know how we can help.
  • Lio,

    Since we did not hear back from you in a while, I am closing this thread. If you have any more to discuss on this topic, you can post again and this thread will open up if it is within 30 days. Otherwise, you may have to open a new thread.

    Regards,
    ramesh