Part Number: TMS320F280049C
Hi,
I am trying to use the Ver 2 of InstaSPIN library. I understand that to get the FAST observer to work EST_run must be called. However, before calling EST_run must we have enabled FAST using EST_enable?
I asked this question because I see the following code in is07_speed_control.c
-------------------------------------------------------
if((motorVars.flagRunIdentAndOnLine == true) && (motorVars.flagEnableOffsetCalc == false))
{
if(HAL_getPwmEnableStatus(halHandle) == false)
{
// enable the estimator
EST_enable(estHandle);
// enable the trajectory generator
EST_enableTraj(estHandle);
// enable the PWM
HAL_enablePWM(halHandle);
}
// set the reference to the trajectory of speed
TRAJ_setTargetValue(trajHandle_spd, motorVars.speedRef_Hz);
// set the acceleration to the trajectory of speed
TRAJ_setMaxDelta(trajHandle_spd, (motorVars.accelerationMax_Hzps / USER_ISR_FREQ_Hz));
}
else if(motorVars.flagEnableOffsetCalc == false)
{
// disable the estimator
EST_disable(estHandle);
// disable the trajectory generator
EST_disableTraj(estHandle);
// disable the PWM
HAL_disablePWM(halHandle);
// clear integral outputs of the controllers
PI_setUi(piHandle_Id, 0.0); PI_setUi(piHandle_Iq, 0.0); PI_setUi(piHandle_fwc, 0.0); PI_setUi(piHandle_spd, 0.0);
// clear current references
Idq_ref_A.value[0] = 0.0; Idq_ref_A.value[1] = 0.0;
// clear current offsets
Idq_offset_A.value[0] = 0.0; Idq_offset_A.value[1] = 0.0;
// get the magnetic current for ACIM
motorVars.IdRated_A = EST_getIdRated_A(estHandle);
// clear current and angle for FWC and MTPA
motorVars.VsRef_pu = USER_MAX_VS_MAG_PU;
motorVars.IsRef_A = 0.0;
motorVars.angleCurrent_rad = 0.0;
// clear the trajectory of speed
TRAJ_setTargetValue(trajHandle_spd, 0.0);
TRAJ_setIntValue(trajHandle_spd, 0.0);
}
---------------------------------------
If flagRunIdentAndOnLine is false, EST_disable will always be called even after voltage and current calibrations. Can you please explain?
Thanks,
Dhammika