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.

TMS320F28054M: How to activate instaspin motion ADRC control after inertia detection in lab5C

Part Number: TMS320F28054M


I am trying to modify Lab5C so that I can add instaspin motion controller (single parametr) after inertia identification in the same progrm.
I tried to compare LAb5C and LAb5F but could not detect difference.
In lab5C, after inertia detection, is motor using instaspin motion ADRC or PI for speed control?
How can check the same is there any call?
Are there function calls to set the instaspin motion ADRC control mechanism ?
Finally for instaspin motion bandwidth parameter -> Doses one needs inertia and friction to do some background pre tuning of bandwidth?

  • Mika,

    Mika Bay said:
    In lab5C, after inertia detection, is motor using instaspin motion ADRC or PI for speed control?

    The PI is used for speed control in lab 05c.

    Mika Bay said:
    Are there function calls to set the instaspin motion ADRC control mechanism ?

    Yes, lab 05d should introduce the function calls to use the ADRC-based speed controller.  I'm surprised you didn't detect differences between lab 05c & 05f when looking at the source code.

    Mika Bay said:
    Finally for instaspin motion bandwidth parameter -> Doses one needs inertia and friction to do some background pre tuning of bandwidth?

    The default value for inertia and friction should work fairly well for most bare-shaft motors.  But if you application has appreciable inertia, you should make sure to do the inertia/friction test prior to attempting to tune the single parameter for ADRC.

    The ADRC algorithm relies on the system model information of inertia and friction in order to provide the great performance and easy tuning.

  • Well, I did note the code changes, I started with Lab5c, then added line
    // Dis-able the Library internal PI. Iq has no reference now to disable speed loop coming from PI at the beginning of for()loop,
    CTRL_setFlag_enableSpeedCtrl(ctrlHandle, false);
    & then added function -> ST_runVelCtl(stHandle, ctrlHandle); in lab5C main file

    & following code in interrupt for selecting inertia detection
    or instaspin speed control based on user selection. 

    if(stCnt++ >= ISR_TICKS_PER_SPINTAC_TICK) {
    if(gMotorVars.SpinTAC.VelIdRun)
    ST_runVelId(stHandle, ctrlHandle);
    else
    ST_runVelCtl(stHandle, ctrlHandle);
    stCnt = 1;
    }

    The inertia detection part worked but not spintac control, have I missed anything?

    Also, how do I know if Spintac controller has taken cognizance of inertia detection for bandwidth scaling -> Is there a function to ensure that?

  • Did you also add in the code to initialize and configure SpinTAC Velocity Control?

    You will need to write code to pass the inertia & friction values from SpinTAC Velocity Identify to SpinTAC Velocity Control.  See the API in the SpinTAC header files for the appropriate functions.