cancel
Showing results for 
Search instead for 
Did you mean: 

Potential Bug: Motor Speed Limitation on F0/C0 MCUs 6-STEP algorithm

GustavEckerbom
Associate II

Hello there,

I've encountered a problem when running motors with the F0 and C0 families. Perhaps this is already a known limitation, but I thought it still deserves a post.

I don't need this to be solved, as I won’t be using these controllers for my particular project, but it could be a bug, so I figured posting this as a bug report might be a good idea.

Hardware setup:

  • NUCLEO-F030R8 / NUCLEO-C031C6 / NUCLEO-G431RB / NUCLEO-F401RE
  • X-NUCLEO-IHM11M1
  • Custom SM-PMSM Motor: 7 pole pairs / 1.2 Apk / 0.11 Ohm / 0.018 mH

Software:

  • MCSDK 6.3 / 6-STEP Algorithm 

I'm setting up the project through MCWB, and the only changes I make in the project are the REV up parameters and setting up MotorPilot to enable open-loop control. The generated project has a PWM frequency of 50 kHz, and yes, I know that's way above the recommended 10 kHz for an F0/C0 board. However, I have tried altering the PWM frequency to 10 kHz and 25 kHz, among others, and the problem still occurs.

The problem:

When I run the motor on the F0/C0, the motor speed saturates at a fixed ~12k RPM (at least that’s what's reported to the user in MotorPilot). However, if I repeat this process with the F4 or G4, the motor spins much faster, easily reaching 20kRPM. It wouldn’t be surprising if the F0/C0 MCUs don’t support those higher RPMs, but there’s no warning to the user that the MCU is overloaded or anything, so I suspect it could be a bug.

EDIT:
It turns out that the motor actually can spin above 12kRPM when using open loop control, but the motor Pilot gets the wrong value reported. For some reason the motor pilot does not recieve a higher RPM than 12300RPM - even tho the motor spins much faster.

Best regards,

Gustav Eckerbom

1 REPLY 1
Fabrice LOUBEYRE
ST Employee

 

Hi GustavEckerbom,

i do not see any reason why the STM F0/C0 family does not support your project as STM G4/F4 one does. Differences are mainly linked to the 16bits/32 bits computation and the ADC/timer IPs usages.  As 6-step algorithm does not require a lot of MIPs and LL drivers are used, then this should fit your application.

Perhaps sone check and tunings is required on your project to make the motor attempt the wished speed. 

1. Why not set up a PWM frequency around 35KHz.

2. Check that you have 100% duty cycle at full speed (i.e. into structure PWM_Handle_M1 parameter variable CntPh).

3. Decrease the two "positive and negative slope zero crossing delays" for full speed (up to 2) into the "Sensor less ADC" config window of the Motor Pilot tool.

4. Force and decrease the demagnetization delay into the "Sensor less ADC" config window of the Motor Pilot tool.

For that purpose, you need first to change the LF timer definition by changing first the pre-scaler value. The LF timer is used to schedule the commutation and end of demagnetization events. You can set for example #define LF_TIMER_PSC 2 into parameters_conversion_g0xx.h or with STM32CUbeMx tool into the window Categories/MidleWare and SW packs/Motorcontrol/Parameters Settings/ LF_TIMER_PSC 2

This change will help you to set this demagnetization delay in LF timer unit definition. You are able to tune the demagnetization delay into the Sensor less ADC" config window of the Mortor Pilot. by writting value 0 into the "speed at min demag period" and then write the "minimum Demag Period" number in LF timer unit, that depends on the input frequency of the timer (F030R8 i.e 48Mhz) and the pre-scaler value. ftim_psc_ck / (PSC[15:0] + 1)

Best regards.

Fabrice