cancel
Showing results for 
Search instead for 
Did you mean: 

Tunning the gains of FOC loop in the ACIM implementation

carlos_gtronix
Associate

Hello everyone,

I'm working on a proposal for an STM32 MC SDK AC Induction Motor using the STEVAL-IHM023V3, NUCLEO-G431RB, and NUCLEO-IHM09M1 boards in the development environment. I've encountered some challenges while setting up the project and testing.

Setting Up LSO Gains

While creating the project in MC Workbench (MC WB), I came across some variables whose values I'm unsure about, such as the KP and Ki gains for the LSO observer. The ST documentation mentions a general gain range of 1-1.5 for the observer, but it doesn't provide information about the controller bandwidth or how to manually edit KP and Ki.

carlos_gtronix_0-1721745937021.png

 

Current and Speed Controller Gains

Based on my understanding of FOC loop theory, I estimated the KP and Ki values for the speed and current controllers. However, during testing with Motor Pilot, it seems the values have specific units, and I'm unsure how to adapt my values to them (see attached image).

carlos_gtronix_0-1721745096585.png

Experimental Issues

Using some estimated values, I was able to build the project. However, in most cases, I've encountered stability issues when the current and speed Ki values are non-zero. Additionally, the observed speed doesn't match the actual speed. Furthermore, if the motor attempts to reach its nominal speed (around 1700 rpm), instability occurs upon reaching that speed, with errors like "speed feedback error" or "overcurrent error" appearing in Motor Pilot.

 

NOTE: I understand that some of these problems might be related to the motor's electrical parameters. However, it's important to note that these parameters weren't obtainable through the profiler because it's unavailable for these boards. I had to rely on experimental testing and estimations to obtain them.

 

Finally, I would greatly appreciate any information or suggestions you might have to help me troubleshoot these issues.


More details about my setup :
[
VERSION]:  MCSDK 6.2.1
[TOOL]: MC WB & Motor Pilot

1 REPLY 1
Floflo
ST Employee

 

Hello Carlos,

The Kp/Ki of the observer are used to compute the observed electrical angle : the integral part of a PI is used as an integrator. The PI is fed with the observed speed so we can retrieve the observed rotor angle -> d(theta)/dt = speed. These Kp/Ki (of the observer) have to be set in order to get acceptable BW and to be in line with the max electrical speed/current/.. of your system.

Starting from scratch I would recommend to use an external speed sensor that would give you the rotor speed reading.  From there you can adjust the torque/flux current controller BW thanks to the torque/flux Kp+Ki together with a current probe (same Kp/Ki value for torque and flux is fine to start with)... you can check the motor current in 1 phase until the Kp/Ki provide satisfactory current waveform whatever load is applied to the rotor... Too high values will give a noisy current signal waveform and that will be the upper limit.

Same applies for the speed loop gains: you may start with low values for the speed Ki/Kp  and increase them until you get satisfactory overshoot/undershoot while applying target speed changes.

 

The observer 'k' common gain is used to the vary the lunberger observer gain matrix parameters as per shown in the code :
/* Online computation of Observer parameters */
k1 = -((k-1)/fsigma)*(divftaur + divftaus);
k2 = (k-1)*fRotorElSpeed_obs_rads;
k3 = ((k-1)/(1-fsigma))*(divftaur - k*divftaus);
k4 = ((k-1)*fRotorElSpeed_obs_rads*fsigma)/(1-fsigma);

 

This k gain can be fine tuned in real time but you can start with the value suggested. Best would be running again the system with speed sensors, fine tune the k gain by varying the speed & load in order to get an accurate observed rotor speed output together with your desired slip frequency for optimal efficiency (with your flux reference to vary versus the applied torque).

Once all fine-tuned with sensors and with the lunberger observed rotor angle being correctly rebuilt at any load condition, you may switch to pure sensorless drive with the FOC controller relying only on the lunberger sensorless rebuilt angle. 

B.Rgds