2021-01-01 07:09 PM
Hello I have a question directed for the developers of the "X-CUBE-MCSDK: FOC motor control library" or anyone who has knowlege on the subject.
Question: My understanding of the FOC (field oriented control) tech is that encoders are not needed due to the fact that that voltage sensors are used on the phase contacts to measure "back EMF" in order to know location and implement control of the motors rotor using algorithms like Cordic,PLL. My question is about the inner workings of the motor control library. I have chosen to use an encoder as the main commutation device and the motors hall sensor as the second auxilary sensor. Now my understanding is if an encoder is going to be used as the main commutation device it must first be aligned.
And as stated in the FOC library documention if an encoder is chosen as the main device in addition to a secondary sensorless "virtual sensor device(cordic,etc.)" that uppon the first start of the motor the encoder will be aligned using the "virtual sensor device(FOC, Cordic, etc.)".
But the docs doesnt state anything about the hall sensor use for encoder alignment uppon first start.
So if my setup has an encoder as main sensor and a hall sensor as auxilary sensor will the encoder be aligned at first start using the hall sensor?
My PMSM Moror has a quadrature encoder and also a hall sensor.
Motor control board STM32H7
Motor Amp Device: x-nucleo-ihm08m1
2021-02-25 12:07 AM
Dear @Bmuha.1
Is it a general question or do you work specifically on a motor model?
Best regards
==
Laurent Ca...
2021-02-25 12:26 AM
It's basically a general question pertaining to the underworkings of the MCSDK.
No specific motor model. But the model I am using as of now has a hall sensor and encoder. Just was wanting to know the under workings of the MCSDK when it comes to aligning ( zeroing at start up ).
I know that sensorless device is used as commutation device as default but I have chosen the encoder as main commutation device. So uppon start up does the foc algorithm use the sensorless device to align encoder am I correct? Even though I have chosen encoder as main?
2021-04-06 11:56 PM
Hi Bmuha.1
As far as I could find out looking at the code, the file virtual_speed_sensor.c is used for alignment of the quadrature main encoder.
So far you cannot use hall and quadrature encoder at the same time as stated in this thread, except if you rewrite the timer function .
So yes, even if you use quadrature encoder as main encoder will the alignment/revup anyway be done using a virtual speed sensor. But it is possible, to write your own functions to replace the virtual_speed_sensor ones (even if I wasn't successful doing so yet).
Best regards
2021-06-01 01:55 AM
The question has been set only to the "STM32 Motor Control" topic (the question is only about the STM32 SDK).
Best regards
Laurent Ca...