1.lab02b相对lab02a将ctrl_run()函数开源,
2.控制器有三种状态:
if(ctrlState == CTRL_State_OnLine)
{
CTRL_Obj *obj = (CTRL_Obj *)handle;
// increment the current count
CTRL_incrCounter_current(handle);
// increment the speed count
CTRL_incrCounter_speed(handle);
if(EST_getState(obj->estHandle) >= EST_State_MotorIdentified)
{
// run the online controller
CTRL_runOnLine_User(handle,pAdcData,pPwmData);
}
else
{
// run the online controller
CTRL_runOnLine(handle,pAdcData,pPwmData);
}
}
else if(ctrlState == CTRL_State_OffLine)
{
// run the offline controller
CTRL_runOffLine(handle,halHandle,pAdcData,pPwmData);
}
else if(ctrlState == CTRL_State_Idle)
{
// set all pwm outputs to zero
pPwmData->Tabc.value[0] = _IQ(0.0);
pPwmData->Tabc.value[1] = _IQ(0.0);
pPwmData->Tabc.value[2] = _IQ(0.0);
}
idle:PWM输出置0;
offline:CTRL_runOffLine()函数进行offset计算(一阶滤波),和将PWM置0;
online:如果电机辨识完成,运行CTRL_runOnLine_User(handle,pAdcData,pPwmData);//FOC实现程序,将2a的代码开源
电机未辨识,运行CTRL_runOnLine(handle,pAdcData,pPwmData);电机进行R、L、RATED_FLUX是否是在这里进行,估算器EST代码是否开源:
就是实现电机参数辨识的算法,在CTRL_runOnLine()函数没有找到相关代码。
对比CTRL_runOnLine_User(handle,pAdcData,pPwmData)函数和CTRL_runOnLine_User(handle,pAdcData,pPwmData)函数并没有太大的区别,这是怎么实现的电机参数辨识算法?
3.FAST observer是FAST观测器 ,输出Flux、angle 、speed、torque.
估算器EST指的就是运行电机参数辨识的程序吗,
这两个是不同的,是吗?谢谢~