Hi. I am using incremental encoders, and as I understand it, the FOC algorithm requires alignment after every restart of the microcontroller. I can’t align at every startup because I have a load on the motor, and it can’t move in order to align. How can I fix this problem?
Hi @Soheil_Davoudi , welcome to SimpleFOC!
There are a few solutions, but it’s a tricky problem…
-
switch to using an absolute encoder, such as a magnetic encoder. These are absolute from start-up. Then you do the calibration once in unloaded state, and store the values for later use when starting in loaded state.
-
if your encoder is not absolute from start-up, but it has an index pin you can start the motor in open loop mode until you find the index pin… and then use a stored calibration to switch to FOC mode.