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.

关于电机控制 DQ轴的疑惑



我用的官方的双电机例程,其中有段程序是这样的:

// init stage 1: release 1 electric round
if (gAlignCount[HAL_MTR1] < USER_CTRL_FREQ_Hz)
{
   angle_pu = _IQ(gAlignCount[HAL_MTR1]*INIT_RPM/USER_CTRL_FREQ_Hz*gMotorInitDirection[HAL_MTR1]);
   gIdq_ref_pu[HAL_MTR1].value[0] = _IQ(USER_MOTOR_RES_EST_CURRENT/USER_IQ_FULL_SCALE_CURRENT_A);
}
// init stage 2: wait 1s, and get offset
else if(gAlignCount[HAL_MTR1] < 2*USER_CTRL_FREQ_Hz)
{
   angle_pu = _IQ(1.0*gMotorInitDirection[HAL_MTR1]);
   gIdq_ref_pu[HAL_MTR1].value[0] = _IQ(USER_MOTOR_RES_EST_CURRENT/USER_IQ_FULL_SCALE_CURRENT_A*2);
}

其中 gIdq_ref_pu[HAL_MTR1].value[0] 中的变量应该是D轴的值,这段程序应该是初始化电机位置的,因为用的增量式编码器,需要转动一下来确定位置。

我的疑惑是:为什么只需要改变D轴就可以控制电机转动?不应该是gIdq_ref_pu[HAL_MTR1].value[1]中的Q轴来控制力矩吗?