Other Parts Discussed in Thread: MOTORWARE, INA240, BOOSTXL-DRV8320RS, DRV8312
SDK v2.01
Last posted questions how Clarke transform/s should format I/V alpha/beta for FAST FOC estimator to produce theta angles output for Park transform.
Lab7 has RsRecalculation flag = false (labs.h) and we know ADC offset calculation auto runs enabling SYS prior to set Online = 0x1.
motorVars.flagEnableOffsetCalc = true;
Phase A is producing current shape below (Angular) pattern, indicates bypass RsReCalibration is enabled prior to closed loop? Lab7 OnLine flags are false prior to mainISR, SVGEN_run(), default for Lab7 speed control. It seems FAST estimator mandates RsRecalibration be force enabled during closed loop SVG_run() otherwise phase A current becomes Angular and not Sinusoidal?
Figure 10-8 shows the current and output voltage waveforms when offsets and Rs recalibration is bypassed.
10.4 Startup with No Re-calibration
This startup approach is the fastest method to get the motor running in closed loop. It does not recalibrate offsets or resistance. As soon as the controller is enabled, the motor is run in closed loop. This method should only be used when the offsets and stator resistance are well known. For details of how to handle full-load conditions at start-up, see Chapter 14. Figure 10-7 shows how the motor is run in closed loop right after the idle state, without any recalibration.
// //! \brief Initialization values of global variables // #define MOTOR_VARS_INIT { \ false, /* flagEnableSys */ \ false, /* flagEnableRunAndIdentify */ \ false, /* flagRunIdentAndOnLine */ \ false, /* flagMotorIdentified */ \ false, /* flagSetupController */ \ true, /* flagEnableForceAngle */ \ \ false, /* flagEnableRsRecalc */ \ false, /* flagEnableRsOnLine */ \ false, /* flagEnableUserParams */ \ true, /* flagEnableOffsetcalc */ \ false, /* flagEnablePowerWarp */ \ true, /* flagBypassLockRotor */ \ \ true, /* flagEnableSpeedCtrl */ \ true, /* flagEnableCurrentCtrl */ \ MOTORCTRL_MODE_SPEED, /* motorCtrlMode */ if(EST_isMotorIdentified(estHandle) == true) { if(motorVars.flagSetupController == true) { /* Disable Online Rs Recalibration */ //? motorVars.flagEnableRsRecalc = false; // // update the controller // set custom current and speed controllers gains // updateControllers(); } else { motorVars.flagMotorIdentified = true; motorVars.flagSetupController = true; /* Enable Online Rs Recalibration */ //? motorVars.flagEnableRsRecalc = true; setupControllers(); } }