2014-05-23 04:28 AM
Gigi:
I debug the STM3210E-EVAL Board and trying to drive Three shunt FOC PMSM Motor in FOC SDK V3.4 Now,I set the Motor run in the Open_Loop FOC ENABLE,DAC channel 1 output Iq ref, DAC channel 2 output Iq. the Motor can run in the Open_Loop. my question is How can I tune the Torque PID parameters from watch Iq ref and Iq in oscilloscope.The motor can achieve best performance.Best regards, Jacky
2014-05-26 12:55 AM
Ciao Jacky
To tune the Iq PI (and so the Id PI that usually has the same gains) it is necessary that you have a good speed and position feedback. So a well tuned sensorless or even better an encoder or HALL sensors. After that you can set the torque control and execute step changing in the Iq reference and see how the Iq measured follow the reference. Then you can change the KP and KI (calculated by the workbench) to fine tune the current controls. Ciao Gigi2014-05-26 01:12 AM
Gigi:
Thank you for your reply,But Iq ref at the oscilloscope display horizontal line Voltage is 3.3V,Iq is same. How I look to debug? Jacky2014-05-26 01:27 AM
Ciao Jacky
I suspect that you are still in Open Loop. In that case the current control is done but non used and maybe the Iq ref and Iq is not updated. Try in standard configuration (I mean closed loop operation). Ciao Gigi2014-05-26 03:02 AM
Gigi:
Yes, I'm setting in open_loop mode, OPEN_LOOP_FOC ENABLE, Do you mean I should under closed-loop conditions to observe the changes of Iq ref and Iq? the mode select Speed control or Torque control? Jacky2014-05-26 03:11 AM
Ciao Jacky
Yes. As mentioned in my first reply you need: - Disable OPEN_LOOP_FOC - Set a proper speed n position sensor (ENCODER) - Set torque mode - Make a step change in the Iq and visualize the response (Iq measured) of the system - Fine tune the KP and KI to achieve a good step response Ciao Gigi2014-05-26 06:15 AM
2014-05-26 06:41 AM
Ciao Jacky
So you have to setup the sensorless first, then when the speed & position is ok you can tink to fine tune the current PI. So basicaly I suggest to start with the value computed by the workbenck for the current PI parameters and for the sensorless parameters. This will be sufficient to achieve a good current regulation, then you have to setup the startup according motor inertia and so on (speed regulation, stall condition, ...) When you will be able to run the motor in closed loop then you can tink to set the torque mode and fine tune the current PI, before that is not possible.Ciao
Gigi2014-05-26 08:25 AM
Gigi:
Thank you very much, Before that I always thought to set the PI parameter to enter the closed loop mode.Because I always can not enter the motor from open loop to close loop, so I doubt is the PI parameter is not set . Jacky2021-06-17 07:15 AM
The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK).
Best regards