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.

F28069M Lab 5c - InstaSPIN-MOTION Inertia Identification error code 2004

Other Parts Discussed in Thread: BOOSTXL-DRV8301, MOTORWARE, DRV8301

HI,everyone:

               I've got a problem with my development kit,which isLAUNCHXL-F28069M and BOOSTXL-DRV8301.The motor I use for test is a 12V PMSM.In lab 2b,the InstaSPIN-FOC has  successfully identify all the basic parameters of my PMSM motor. Then I copy the motor parameters from the user.h of the InstaSPIN-FOC to the user.h of the InstaSPIN-MOTION,then I skip Lab 5a and Lab 5b.Lab 5c is about "InstaSPIN-MOTION Inertia Identification".I build Lab 5c projects and start debugging.But the motor just won't start.The "gMotorVars.SpinTAC.VelIdErrorID" is 2004 which indicates a high speed setting.But after I reduce the "gMotorVars.SpinTAC.VelIdGoalSpeed_krpm" to 0.01KRPM,it still won't start.

              Here are some situations strange:

    1.Even I delete the motors parameters from  user.h of the InstaSPIN-Motion,the CCS can still build the Projects without indicating any bug.

    2.I can't open the   "user_j5.h" from the right-click pop-up window.

    3.The "gMotorVars.VdcBus_kV"  shows about 9V power supply.But in fact the power voltage is about 13V.

Would anybody please help me figure this problem out?What should I need to post to identify the issue?Or do anything I did wrong?

  • Is your BOOSTXL-DRV8301 connected to J1 or J5?  Which user_jX.h are you using?  My guess is that the correct boosterpack connection isn't being used.

  • Thank you.Actually after I posted the problem on the forum,I check the user.h and found that  the annotations about the J1 & J5.When I changed the Jx in the user.h,it worked.The motor was spinning and the voltage showing value was right.

    Thank you anyway.

    Can I ask you one question?Do you know that the F28069M kit  has added two new experiments"

    Lab 20 – New ctrl Structure
    To provide easier access to the FOC elements of the control, a new ctrl structure has been created. The previous MotorWare ctrl included all of the modules used to implement FOC. The new ctrl only contains the PI controllers, i.e. the speed, Id, and Iq controllers. The rest of the FOC modules are located in the mainISR.
    Lab 21 – Initial Position Detection and High Frequency Injection
    Signals are injected into the motor to find the d-axis initial position when the power is first applied to the motor control. After initial position detection, a frequency much higher than the motor’s operating frequency range is injected to allow for zero speed control of the motor.

    ".

    These two are considered about InstaSPIN-FOC.Lab 21 is used to accomplish a quick start of a salient PMSM.Does InstaSPIN-MOTION has any function to further simplify the quick start tuning?And if the motor is non-salient,it seems that  the Lab 21 is not applicable.

  • Lab 20 and 21 are just supported on DRV8301 EVM today. You can port to the Launchpad if you want...we will do this eventually. These are also torque mode only, no speed loop, so MOTION wouldn't apply. In the future we will add an example of the speed loop as well as support on some other EVM platforms, though it won't be on everything. Most of the motors and applications where IPD can be applied are typically high current.

    "And if the motor is non-salient,it seems that the Lab 21 is not applicable."
    For the most part, yes. It's possible that for low load situations the IPD function will work well enough even on non salient machines (every machine has some saliency). But what you will find is that as the load is increased, current flows through the motor, and the saliency is reduced. So if you don't start with much saliency the IPD eventually won't work.
  • Could I ask you for a help to a similar problem, please?

    I´ve got some issues with the same project lab but I get always the same writing:

    "C:\ti\motorware\motorware_1_01_00_15\sw\solutions\instaspin_motion\boards\boostxldrv8301_revB\f28x\f2806xM\src\user_j5.h", line 345: fatal error #35: #error directive: No motor type specified

    which is interesting because the file user_j5.h where the motor is described looks like this:

    #define MY_MOTOR                       111

    #define USER_MOTOR MY_MOTOR

    #if (USER_MOTOR == MY_MOTOR)                              // Name must match the motor #define
    #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       (7)                // 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                   (0.09744443)             // Identified phase to neutral resistance in a Y equivalent circuit (Ohms, float)
    #define USER_MOTOR_Ls_d                 (0.000008985)              // For PM, Identified average stator inductance  (Henry, float)
    #define USER_MOTOR_Ls_q                 (0.000008985)              // For PM, Identified average stator inductance  (Henry, float)
    #define USER_MOTOR_RATED_FLUX           (0.005232368)             // 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      (2.0)              // During Motor ID, maximum current (Amperes, float) used for Rs estimation, 10-20% rated current
    #define USER_MOTOR_IND_EST_CURRENT      (-2.0)             // During Motor ID, maximum current (negative Amperes, float) used for Ls estimation, use just enough to enable rotation
    #define USER_MOTOR_MAX_CURRENT          (14.0)             // 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     (70.0)             // During Motor ID, maximum commanded speed (Hz, float), ~10% rated
    #define USER_MOTOR_ENCODER_LINES        (1.0)       // Number of lines on the motor's quadrature encoder
    #define USER_MOTOR_MAX_SPEED_KRPM       (6.0)          // Maximum speed that the motor
    #define USER_SYSTEM_INERTIA             (0.02)         // Inertia of the motor & system, should be estimated by SpinTAC Velocity Identify
    #define USER_SYSTEM_FRICTION            (0.01)         // Friction of the motor & system, should be estimated by SpinTAC Velocity Identify
    #define USER_SYSTEM_BANDWIDTH_SCALE        (1.0)


    I can see that my motor is the only one that is actively defined, but still the if condition returns that error.

    In the section Problems - Description, it says C/C++ problem, do you think, it could have anything in common?

    Thank you very much in advance

    PS: I´m using the J5 on the Launchpad.

  • Jiri,

    My guess is that there is an error in the preprocessor directives in your user_j5.h file.  Make sure that you have only one #if directive and the rest are #elif.

  • I really do apologise I´m writing that late. But thank you very much for your help, this was really the problem. Now it works well :).
    Thank you very much again.
  • Jiri,

    No worries.  I'm glad you were able to get it working!