This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I'd like to double check the following process with you to ensure that we are aligning the motor the right way.
We are using an absolute encoder that returns an absolute position (multiturn count + single turn position) via SPI.
We are actually doing the following process:
if (EST_State_Rs == EST_getState(m_ctrlHandle->estHandle)) { HAL_resetQepPosnCounts(m_halHandle); }
After a power cycle (when the motor is already aligned):
Please note that we use a zero offset for the electrical angle equal to 0, this is why we reset the QEP during alignment.
Could you please confirm this process and give us proposals in case of not optimal?
Regards,
Johann
The QEP module is used for an incremental encoder as a motor position and speed sensor. It can't provide the absolute position of the motor rotor, so the controller needs to know exactly the rotor position before the motor is started. Using the Rs calibration process to implement the alignment during the first motor start, the rotor is aligned to a known position (zero position), and then reset or set the QEP related registers after some stabilization periods. You might have a look at the following link as well.
https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/616625
For an absolute encoder, you might use the alignment process to calibrate the position offset too, but I don't think you need to reset/set the QEP registers if you don't connect the encoder to QEP module.
I forgot to mention that our absolute encoder generates an ABZ signal that we use for position and speed control. We only read the absolute position of the encoder at startup via SPI, set the QEP with this value and then use the QEP for "online" position management. The reason why we do this is that we want to avoid SPI transactions while controlling the motor.
So, by knowing that we use ABZ signal of the absolute encoder, does our alignment process described above make sense and is correct? Or is there any better way (or correct way if our solution is wrong) to do it?
Regards,
Johann
You can still use the force alignment process as a typical incremental encoder if you don't care about the motor position during the inverter first power-up.
Or you might get the rotor position data from the absolute encoder, and then convert and set the position data to the counter register of QEP. You have to write a function to do this by yourself since we don't have such a reference.
Hello,
The process we use now is the following (alignment is only done at the first system power-on):
Sometimes the motor goes to full-speed and cannot be stopped anymore by setting a speed setpoint to 0 (uncontrollable). We face this issue after startup.
Do you have any idea about what could happen knowing that most of the time the system behaves as expected?
To already answer potential questions on your side:
We really need to figure out what is the origin of this strange behavior ASAP since the system cannot tolerate any "uncontrolled" motor movement.
Regards,
Johann
It seems like the alignment and control process you used is right for motor running.
Is it possible to disable the high-priority UART communication to see what happens? We want to know that the issue is from the control algorithm or form system control logic.
Or you might optimize the codes in both motor control and UART communication, make sure all of these codes are running in RAM without branch calling functions in these two ISRs.
An updates? Just wanted to check in and see if there is any update from your side, I haven’t heard from you for about two weeks, so I’m assuming you were able to resolve your issue. Please let me know if you have any questions. We would like to close this thread if no any further questions. Thanks.
I think you can close this post since I've created the following post to address the issue:
https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/908293