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.

C2000WARE-MOTORCONTROL-SDK: Lab 13 A and 13B: Bandwidth issue and fraction revolution issue.

Part Number: C2000WARE-MOTORCONTROL-SDK
Other Parts Discussed in Thread: TMDSHVMTRINSPIN

Hello, Happy New Year !

1) I have doubt about Lab 13A how much force I have to give for derive USER_SYSTEM_BANDWIDTH And what's the actual procedure for it.

My procedure was

- To start the project, set the variable “gMotorVars.Flag_enableSys” equal to 1.

- To start the current loop controller, set the variable “gMotorVars.Flag_Run_Identify” equal to 1.

- My USER_SYSTEM_BANDWIDTH is set to "20" and I increase parameter gMotorVars.SpinTAC.PosCtlBwScale.

- In how much force I have to stop increasing value? or When I have to stop increase gMotorVars.SpinTAC.PosCtlBwScale.

2) In lab 13B My integer revolution value is execute properly but the fraction revolution value is not execute. Any reason for that ? or I have to mention some where else than  function STPOSPLAN_addCfgState(stObj->posPlanHandle, 0,            ( 0.05),                 200L); // StateIdx0: A

  • You should run lab02b to identify the motor parameters first without adding any load. And then run lab12a to identify the inertia without adding load as well.

    To run the other labs with the adding load/force is less the rated output torque of the motor.

    It's difficult to achieve a very exact friction position if the motor has a higher inertia and it doesn't have a brake to stop the motor.

  • Thank you for your response ,

    I already Run 2b and 12a and the parameter is exact matching as your hardware TMDSHVMTRINSPIN have the parameter value in 2b and 12a. So, that is confirm that the 2b and 12a working fine.

    #define USER_SYSTEM_INERTIA             (0.01521492004)         // Inertia of the motor & system, should be estimated by SpinTAC Velocity Identify
    #define USER_SYSTEM_FRICTION            (0.1210536957)         // Friction of the motor & system, should be estimated by SpinTAC Velocity Identify

    here is my Inertia and friction values, and I don't think so this inertia value is don't have a break stop.

    and other USER parameter are

    #define USER_MOTOR_TYPE                 MOTOR_Type_Pm  // Motor_Type_Pm (All Synchronous: BLDC, PMSM, SMPM, IPM) or Motor_Type_Induction (Asynchronous ACI)
    #define USER_MOTOR_NUM_POLE_PAIRS       (4)            // PAIRS, not total poles. Used to calculate user RPM from rotor Hz only
    #define USER_MOTOR_Rr                   (NULL)         // Induction motors only, else NULL
    #define USER_MOTOR_Rs                   (3.53508401)        // Identified phase to neutral resistance in a Y equivalent circuit (Ohms, float)
    #define USER_MOTOR_Ls_d                 (0.0102759264)//(0.0105140088)// For PM, Identified average stator inductance  (Henry, float)
    #define USER_MOTOR_Ls_q                 (0.0102759264)//(0.0105140088)// For PM, Identified average stator inductance  (Henry, float)
    #define USER_MOTOR_RATED_FLUX           (0.30648753)        // Identified TOTAL flux linkage between the rotor and the stator (V/Hz)
    #define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)         // Induction motors only, else NULL
    #define USER_MOTOR_RES_EST_CURRENT      (1.0)          // During Motor ID, maximum current (Amperes, float) used for Rs estimation, 10-20% rated current
    #define USER_MOTOR_IND_EST_CURRENT      (-1.0)         // During Motor ID, maximum current (negative Amperes, float) used for Ls estimation, use just enough to enable rotation
    #define USER_MOTOR_MAX_CURRENT          (6.5)         // CRITICAL: Used during ID and run-time, sets a limit on the maximum current command output of the provided Speed PI Controller to the Iq controller
    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (20.0)         //(5) During Motor ID, maximum commanded speed (Hz, float), ~10% rated
    #define USER_MOTOR_ENCODER_LINES        (5000.0)       // Number of lines on the motor's quadrature encoder
    #define USER_MOTOR_MAX_SPEED_KRPM       (5.0)          // Maximum speed that the motor

  • You can try to tune the control bandwidth and the trajectory curve as below to implement the motion control.

    // setup the SpinTAC Components
    ST_setupPosConv(stHandle);
    ST_setupPosCtl(stHandle);
    ST_setupPosMove(stHandle);

    More details about InstaSPIN-motion, you may have a look at  InstaSPIN-FOC and InstaSPIN-MOTION User's Guide (https://www.ti.com/lit/spruhj1)

  • Dear ,

    As your suggestion mentioned I already tried lab 13A for bandwidth tuning and I tried bandwidth form 1 to 100 and after 22 value I get the good result of retain the position but it remain same up to 100 there is not much effect of changing gMotorVars.SpinTAC.PosCtlBwScale. So how to decide the value of USER_SYSTEM_BANDWIDTH ?

    and my second question would be same the fraction rotation didn't execute. is it because of wrong value of  USER_SYSTEM_BANDWIDTH ?

  • There is no a specific rule to decide the value of USER_SYSTEM_BANDWIDTH that could be dependent on the performance of the system you want. The 20 for USER_SYSTEM_BANDWIDTH could be fine for most of the motor.

    Yes, it's related to the USER_SYSTEM_BANDWIDTH and the trajectory curve of the motion control.