cancel
Showing results for 
Search instead for 
Did you mean: 

ST PMSM motor control debug problem

JackyCheung
Associate II
Posted on May 23, 2014 at 13:28

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

9 REPLIES 9
Gigi
Senior
Posted on May 26, 2014 at 09:55

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

Gigi

JackyCheung
Associate II
Posted on May 26, 2014 at 10:12

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?

                                                         Jacky

Gigi
Senior
Posted on May 26, 2014 at 10:27

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

Gigi 

JackyCheung
Associate II
Posted on May 26, 2014 at 12:02

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?

                                                                   Jacky

Gigi
Senior
Posted on May 26, 2014 at 12:11

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

Gigi

JackyCheung
Associate II
Posted on May 26, 2014 at 15:15

Gigi:

       Thank you for your reply.

       Set a proper speed n position sensor (ENCODER), It is set in the WORKBENCH software? Because my motor is not ENCODER, My application of the sensorless mode.

                                            Jacky

Gigi
Senior
Posted on May 26, 2014 at 15:41

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

Gigi

JackyCheung
Associate II
Posted on May 26, 2014 at 17:25

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 .

                                          Jacky

Laurent Ca...
Lead II

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