Skip to main content
Daniel Husztikd
Associate II
October 11, 2017
Question

BLDC Motor Control [FOC] Speed ramps

  • October 11, 2017
  • 5 replies
  • 4213 views
Posted on October 11, 2017 at 15:23

I use a BLDC motor with Hall-sensors and ST FOC 4.3 (STSPIN32F0).  Everything works fine, but when I want to use speed ramps, speed just do not change. The software indicates correct speed ramp, but instead, nothing happens. What is this issue? Which component should I use, to have correct speed ramps? Thank you. 

#stspin32f0 #speed-ramp #bldc #hall-sensors #brushless-motor
This topic has been closed for replies.

5 replies

Daniel Husztikd
Associate II
October 11, 2017
Posted on October 11, 2017 at 23:11

I have determined, that the motor always spins at the maximum speed, and I can not slow it down with speed ramps. 

WANG RENDONG
ST Employee
October 12, 2017
Posted on October 12, 2017 at 04:29

Dear Sir

For trying to help you resolve the issue, firstly, would you describe how you implement speed ramp in your FW by using MCI functions?

Thanks.

Best regards,

Wang RD

WANG RENDONG
ST Employee
October 12, 2017
Posted on October 12, 2017 at 07:54

Normally,

void MCI_ExecSpeedRamp(CMCI oMCI, int16_t hFinalSpeed, uint16_t

hDurationms) should be called by setting the target rotor speed and duration time in your FW if you do not use Workbentch(WB) to send this command to FW.

Or, without any modification for FW, ramp command can be sent from WB.  In 'advanced ' label, push button 'Exec ramp', the command (final speed and duration time from present) will be sent to FW.

Best regards,

Wang RD

Daniel Husztikd
Associate II
October 12, 2017
Posted on October 12, 2017 at 12:13

Dear Rengdong!

Thank you for your reply. I use the 

MCI_ExecSpeedRamp function that you mentioned. If I use the FOC algorithm to compute, I can use speed ramps as I want, and thus I can modify the speed during run. If I use Hall-sensors as my main sensor, (and no other sensors) the speed ramps do execute (according to MCI_RampCompleted function), but the duty cycle of the PWM signal stays constant. When starting with Hall-sensor mode, it always spins up the motor to the maximum speed, and I can not change that. I have no idea, what is wrong with my setup. I dont think, that the Hall-sensor mode dont support ramps. Maybe there is an error in the FOC firmware? 

I am waiting for your answer!

Thank you for your time and assistance!

Daniel

Daniel Husztikd
Associate II
October 12, 2017
Posted on October 12, 2017 at 13:00

ADDITIONAL INFO: My motor spins at 6500rpm maximum and has 3 Hall sensors mounted at 120 degrees. 

Hani Chahine
Associate II
October 14, 2017
Posted on October 14, 2017 at 16:44

I had the same issue.

Your speed PI tuning is not right and the speed loop is winding up massively. Try increasing the gains of your speed PI controller. Also, reduce the PI divisors until you are in the correct range. 

I had to make huge changes compared with the small motor that comes with the kit and its standard  project settings because our motor is much bigger so needed higher speed controller gains.  

Daniel Husztikd
Associate II
October 16, 2017
Posted on October 16, 2017 at 09:33

Thanks Hani! I was looking for the issue in the last week. I am very happy, that you said that, I had no more ideas where to search for the issue. I also have a more powerful and bigger motor, than the example. 

Altough, I am not a big expert in tuning PI controllers. 

This is my controller: 

0690X00000608cRQAQ.png

In your motor, what range found out to be sufficent?

Thank you

Daniel
Laurent Ca...
Senior III
June 28, 2021

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