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.

TMS320F28027F: Integrate/Implement Flying Start (Rotor already moving) into Lab11a where there is no CTRL Object

Part Number: TMS320F28027F

I am working to Integrate/Implement the Flying Start (Rotor already moving) feature from Lab10e into more or less the Lab11a where there is no CTRL Object. Are there any suggestions of what to be aware of or to avoid in doing this task?

  • You may follow the Flying Start Control Flowchart in lab10e guide to design the project, most codes for flying start in lab10e can be also re-used in lab11a. The basic control concept is that enable instaSPIN FAST estimator, disable speed close loop, enable current (Id&Iq) close loop and set both to ZERO. The FAST will detect the rotor speed and angle, set the real feedback speed to the target speed of both speed PI regulator and trajectory first before you enable the speed close loop. It should not a challenge for you to do the porting, let me know if you have any further questions.
  • Thank you, the lab10e guide helps. In lab11a what is the recommended mechanism to disable speed close loop?

  • Add two global variables in project as below, use FS_flag_enableSpeedCtrl to replace the flag_enableSpeedCtrl in motor_RunCtrl().

    bool FS_flag_enableSpeedCtrl = false;
    _iq FS_Iq_ref_pu = _IQ(0.0);

    And then change the code in mainISR() as below.

    // when appropriate, run the PID speed controller
    if(FS_flag_enableSpeedCtrl == true)
    {
    if((pidCntSpeed++ >= USER_NUM_CTRL_TICKS_PER_SPEED_TICK) && (!gMotorVars.Flag_enableRsRecalc))
    {
    // calculate Id reference squared
    _iq Id_ref_squared_pu = _IQmpy(PID_getRefValue(pidHandle[1]),PID_getRefValue(pidHandle[1]));

    // Take into consideration that Iq^2+Id^2 = Is^2
    _iq Iq_Max_pu = _IQsqrt(gIs_Max_squared_pu - Id_ref_squared_pu);

    // clear counter
    pidCntSpeed = 0;

    // Set new min and max for the speed controller output
    PID_setMinMax(pidHandle[0], -Iq_Max_pu, Iq_Max_pu);

    // run speed controller
    PID_run_spd(pidHandle[0],TRAJ_getIntValue(trajHandle_spd),speed_pu,&(gIdq_ref_pu.value[1]));
    }
    }
    else
    {
    gIdq_ref_pu.value[1] = FS_Iq_ref_pu;
    }