Part Number: TMS320F28069M
Hi Champs,
My customer ran motion lab12b and found out that motor spun back and forth when they applied dyno. Customer found out that when they commented out angle pu = electricalAngle; // Update electrical angle from the sensor in ctrlQEP.h. They used EST_getAngle_pu() to get angle and motor spin smoothly. That means estimator angle is right and encoder angle is wrong,
After traced back code, ENC_getElecAngle(encHandle) output electricalAngle. And ENC_calcElecAngle() calculated electricalAngle. Could you please tell me which variable should I modify to get right eletricalAngle base on encoder feedback ? I checked ENC_calcElecAngle() and there is an enc_zero_offset variable. this offset is gotten from ENC_setZeroOffset() which is in below code. Does is mean user must to do Rs Recalculation to get encoder offset ?
// if we are forcing alignment, using the Rs Recalculation, align the eQEP angle with the rotor angle
if((EST_getState(obj->estHandle) == EST_State_Rs) && (USER_MOTOR_TYPE == MOTOR_Type_Pm))
{
ENC_setZeroOffset(encHandle, (uint32_t)(HAL_getQepPosnMaximum(halHandle) - HAL_getQepPosnCounts(halHandle)));
}
There is a weird thing which is that customer increase USER_MOTOR_RES_EST_CURRENT and solve this problem. But customer don't know why this variable will effect result. And i have no idea either. Could anyone can help to check? thanks!