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.

FOC and PMSM. Waveform oscillation.

Other Parts Discussed in Thread: TMS320F28016

Hello,

 

I’m being implementing a FOC controller for a PMSM motor, using a TMS320F28016 with a 256 pulses encoder. I’m close to the end of my project, but right now I have some problems. Specifically, when the motor is stopped with torque, if I set the speed value, the acceleration oscillates. In order to clarify, I copy an image with the acceleration.

 

  • Zone A. The motor is stopped with torque. The acceleration is 0.
  • Zona B. I set up a new speed value with only two points, from speed_low to speed_medium. I hope a triangle  waveform (as zona D but negative), but I get a oscillation.
  • Zona C. The motor is into the steady-state, with no acceleration.

 

Any idea? I’m a little bit loose. I’m thinking in modify the speed PID again, but I prefer wait an expert opinion before change the regulators.

 

Thank you in advance.

  • Hi Masky

    So, you mean things in zone B will not happen if the motor stopped in A without external torque?

    Anyway I think it normal that if the motor stopped with torque, when you restart the motor with new speed command, at the very begin of the PID process, the external torque will force the motor running CW or CCW little which will produce a higher speed error into the PID controller that makes the outputs reacting too much and then causing the speed ocsillation.

    This could be improved if your PID parameters still have the room to optimized. I think too "hard" PID will make it worse. But too "soft" will give you too slow speed response.

    Besides, a higher level encoder should be help to limit the ocsillation range.

    Thanks.

  • Hello Wilson,

    about your questions...

    So, you mean things in zone B will not happen if the motor stopped in A without external torque?

    An oscillation happens, but not as high as with torque.

    This could be improved if your PID parameters still have the room to optimized. I think too "hard" PID will make it worse. But too "soft" will give you too slow speed response.

    Any advice? Maybe reduce KI and KP in spd PID? Or reduce the values into the currents PID affect too?

    Besides, a higher level encoder should be help to limit the ocsillation range.

    This is not an option.

     

    Thank you.

  • Hi Masky

    I think you have a position PID control as well above the speed loop, right?

    So you may need to adjustment from the bottom loop (the current loop) to get this ocsillation improved. You may have three times PI(D) parameters to adjustment for each loop (current, speed, position).

    First, tuning the current loop to get fast current response (give you the best torque response) by measure the current waveform.

    Then, tuning the speed loop to achieve better speed response.

    At last, tuning the position loop to have less error in positioning when there is external loads.

    Right now, I think the issue maybe caused by a too "soft" position loop and a too "hard" speed loop, but that is just one of the possibilities.

    You need to keep in mind on what behavior is "better" during all the tuning. It is a trade off between fast and overshoot all the time.

    For the PID parameters adjustment method, it is more like a try and error way by experience. You can search on the website and there are lots of tips on how to start the tuning.

    Thanks.

  • Hi Wilson,

     

    I only have 3 PIDs: iq, id and spd. So, If have understood well, first I may tune iq and id PIDs by measure the current waveform, and then tune the spd PID, right?

     

    Thank you. 

  • Hi Masky

    Yes. The tuning is always start from the bottom layer to the top layer in FOC.

    Also I think it's better for you to put the questions related to the detailed parameters tuning of the control algorithm to the C2000 forum.

    http://e2e.ti.com/support/microcontrollers/c2000/f/171.aspx

    Thanks.