cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 PMSM FOC LIBv4.0 encoder feedback algorithm not robust, proposal for improvement

mikemike9141
Associate III
Posted on June 02, 2017 at 21:07

I have several successful designs with STM32 PMSM FOC LIBv4.0, but from time to time I noticed some irregularities, causing the motor to 'click' while spinning (1kW PMSM). It sounds like someone is hitting it with a small hammer. This happened seldomly, and I never could reliably reproduce it in the past, in order to track it down.

Last week I had this situation again, and it happened frequently enough to allow finding the root cause. It turned out to be the library module dealing with the encoder feedback, in combination with a noisy electrical encoder signal. It turned out that the (v.4.0) library module cannot handle a noisy encoder feedback that causes temporary direction reversals. When this happens simultaneously with a timer overflow or underflow, then it calculates wrong speed information, which is causing the 'clicks'.

I have revised the entire encoder module (ENC_F4xx_SpeednPosFdbkClass.c, ENC_F4xx_SpeednPosFdbkPrivate.h) and implemented a more robust algorithm, which is also more efficient and does not need interrupts. I would like to share it with the community, but as the library source code is NDA protected, I am asking the ST team how to proceed here.

#foc-library-stm32
1 REPLY 1
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