cancel
Showing results for 
Search instead for 
Did you mean: 

Hall Handling FOC STM32

patrickbuchbauer9
Associate II
Posted on January 07, 2010 at 11:33

Hall Handling FOC STM32

3 REPLIES 3
patrickbuchbauer9
Associate II
Posted on May 17, 2011 at 10:16

Hello,

I'm using the STM3210B-MCKIT. In my application I run my motor with the FOC.

I have a range from 1000rpm to 40000rpm. The motor runs smooth at higher speed. But the problem is when running the motor at lower speed, especially at 1000rpm, the motor is not turning smooth and the torque is very low.

In the SW-Library 2.0 from ST, the Hall Signals were analyzed every 120 degrees. Means that three times in one rotation. Between that the sw interpolate the electrical angle with the help of the rotor frequency, which will be calculated every 120 degrees, too.

My motor has a one pole pair, means at 1000rpm I have a frequency of 16.6Hz. So one rotation takes around 60ms. Three times per rotation a new value will be calculated, so every 20ms I get the new value from the Hall Signals, between it will only interpolate.

My switching frequency is 32kHz, so the function HALL_IncElectricalAngle() will be called half of the switching frequency, means 16kHz so every 60us.

So between two new values from the Hall Sensors I interpolate around 330 values, without knowing exactly the angle.

When I write my variable hElectrical_Angle in a Buffer, I can see that when the software gets a new value every 120 degrees there is a big step up or down, which I can also see in the sine wave of the phase currents.

I only have the big steps at very low speeds.

Reducing the switching frequency has no effect on the behavior of the motor.

Perhaps someone has the same problem or have a tip to improve the behavior.

Thanks in advance

Patrick

stello
Associate II
Posted on May 17, 2011 at 10:16

Hello Patrick,

the behavior you describe is - as you write - due to the fact whe only have an angle synchronization once each 60ms.

The breaktrough in this case is to modify the Hall sensor module so that the angle synchronization is performed each 60 degrees instead of 120 degrees. In fact this is in STM32 capabilities, I'll try to get some code sample for your convenience.

By the way not only the current regulation loop but also the speed loop may not work properly if the sampling time is not properly selected.

For instance, with default sampling time (2ms) the speed PI will act 30 times with the same input error and this may lead to some unstability in the speed regulation. I'd check if reducing for instance to 60ms the speed sampling time introduces some improvement at low speed.

Regards,

Billino

patrickbuchbauer9
Associate II
Posted on May 17, 2011 at 10:16

Hello Billino,

Thanks for your answer. It would be great, if you have an example code or something like that to improve the behaviour at lower speed.

If I can't solve the problem, I have to implement the block commutation to get enough torque at lower speed and switch to FOC at a higher speed.

But if it is possible I want to avoid this.

Thanks in advance.

Patrick