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.

CCS/BOOSTXL-DRV8301: Lab 2a '' Record the watch window values with the newly defined motor parameters in user.h ''

Part Number: BOOSTXL-DRV8301
Other Parts Discussed in Thread: MOTORWARE

Tool/software: Code Composer Studio

I am new to ccs and Motor Ware, I am doing lab2a as stated in the instaSpin-lab and achieved the first part of this lab

''start the motor identification, Set the variable “gMotorVars.Flag_enableSys” equal to 1. Set the variable “gMotorVars.Flag_Run_Identify” equal to 1. After “gMotorVars.Flag_Run_Identify” is equal to 0, the motor parameters have been identified.'' But the NULL values in user.h (user_j1.h) are not updated(nothing has changed). Should I update them manually ? or they should be automatically changed to

(USER_MOTOR_Rr = gMotorVars.Rr_Ohm’s value (ACIM motors only)
o USER_MOTOR_Rs = gMotorVars.Rs_Ohm’s value
o USER_MOTOR_Ls_d = gMotorVars.Lsd_H’s value
o USER_MOTOR_Ls_q = gMotorVars.Lsq_H’s value
o USER_MOTOR_RATED_FLUX = gMotorVars.Flux_VpHz’s value
o USER_MOTOR_MAGNETIZING_CURRENT = gMotorVars.MagnCurr_A’s value (ACIM
motors only) )

One more question is it correct to add the motor parameters into user_j1.h and not on user.h ?since im using boostxl on j1,4 on f28069m 

Thanks.

  • Due to holidays, you can expect a response in the first week of Jan 2020.

  • 1. Right. You need to update the identified parameters in user.h by manual.

    2. Right, it's user_j1.h if you used the site 1 (J1~J4).

  • thank you for your reply. 

    I have changed the parameters manually in user_j1.h after the motor parameters were identified, but my BLDC motor didnt spin as a second step. 

    I did as required ''To run the motor,Set the variable “gMotorVars.Flag_Run_Identify” equal to 1 again.The control will re-calibrate the feedback offsets and then re-measure Rs_Ohm. After the measurements are done, the motor shaft will accelerate to the default target speed. ''

    I also faced this error ''Description Resource Path Location Type
    #35 #error directive: The motor type is not defined in user.h .ccsproject /proj_lab02a line 231, external location: C:\ti\motorware\motorware_1_01_00_18\sw\solutions\instaspin_foc\boards\boostxldrv8301_revB\f28x\f2806xF\src\user.h C/C++ Problem''

    and this warning ''Description Resource Path Location Type #48-D incompatible redefinition of macro "USER_MOTOR" (declared at line 210) .ccsproject /proj_lab02a line 225, external location:C:\ti\motorware\motorware_1_01_00_18\sw\solutions\instaspin_foc\boards\boostxldrv8301_revB\f28x\f2806xF\src\user_j1.h C/C++ Problem''

    1-Should I change something in user.h? what is causing this error ? 

    2- If I repeat motor parameters identification (debugging again) I am getting different motor parameters each time, why ? 

    I don't know if I did it right, but when identifying the new motor I added these to user_j1.h , I will copy paste and highlight the added part 

    #define Estun_EMJ_04APB22           101
    #define Anaheim_BLY172S             102
    #define Tamagawa_A0100              103
    #define Teknic_M2310PLN04K          104
    #define Drone_A2212_1000KV   105
    #define Drone_A2313_960KV   106

    #define MY_MOTOR                    113

    #define USER_MOTOR MY_MOTOR
    // IPM motors
    // If user provides separate Ls-d, Ls-q
    // else treat as SPM with user or identified average Ls
    #define Belt_Drive_Washer_IPM       201
    #define Anaheim_Salient             202
    // ACIM motors
    #define Marathon_5K33GN2A           301
    //! \brief Uncomment the motor which should be included at compile
    //! \brief These motor ID settings and motor parameters are then available to be used by the control system
    //! \brief Once your ideal settings and parameters are identified update the motor section here so it is available in the binary code
    //#define USER_MOTOR Estun_EMJ_04APB22
    #define USER_MOTOR Anaheim_BLY172S
    //#define USER_MOTOR Tamagawa_A0100
    //#define USER_MOTOR Drone_A2313_960KV
    //#define USER_MOTOR Teknic_M2310PLN04K
    //#define USER_MOTOR Belt_Drive_Washer_IPM
    //#define USER_MOTOR Marathon_5K33GN2A
    //#define USER_MOTOR Anaheim_Salient

    #elif (USER_MOTOR == MY_MOTOR)
    #define USER_MOTOR_TYPE MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS (4)
    #define USER_MOTOR_Rr (NULL)
    #define USER_MOTOR_Rs (NULL)
    #define USER_MOTOR_Ls_d (NULL)
    #define USER_MOTOR_Ls_q (NULL)
    #define USER_MOTOR_RATED_FLUX (NULL)
    #define USER_MOTOR_MAGNETIZING_CURRENT (NULL)
    #define USER_MOTOR_RES_EST_CURRENT (1.0)
    #define USER_MOTOR_IND_EST_CURRENT (-1.0)
    #define USER_MOTOR_MAX_CURRENT (3.0)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz (20.0)

  • I have posted the problem I faced above, can you help. 

  • You should set the following variables in user.h based on the spec. of your motor, ensure the motor spins smoothly to get correct parameters, and then copy the identified parameters (Rs, Ls, Flux) to user.h for run the motor. There is no other way, just tune these 4 variables if you are using TI's EVM kit. You have to make sure that the current&voltage sensing signals are good if you are using your own board. You need to use lab02c for identification and use a higher PWM frequency if the motor is a low inductance motor.

    #define USER_MOTOR_RES_EST_CURRENT (1.0)
    #define USER_MOTOR_IND_EST_CURRENT (-1.0)
    #define USER_MOTOR_MAX_CURRENT (3.0)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz (20.0)