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: Migration from Motorware (InstaSpin-FOC) to C2000ware-MotorControl (InstaSpin-FOC)

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

Hey TI -  we are developing a BLDC drive using the F280049C MCU and DRV8343S-Q1 drive.  We are using CCS v9.3.0.00012) and C2000Ware_2_01_00_00 and C2000Ware_MotorControl_SDK_2_01_00_00.

1. In the user.c file, there is a section that defines BWc_rps, BWdelta, and Kctrl_Wb_p_kgm2.  There is an IF statement that looks at USER_BYPASS_MOTOR_ID and pUserParams->flag_bypassMotorId.  The pUserParams->flag_bypassMotorId parameter is NOT defined when this IF statement is called. 

2. What is the purpose of USER_DCBUS_VOLTAGE_SF?  Its define statement requires USER_ADC_FULL_SCALE_DCBUS_VOLTAGE_V which is not defined (at least not in user.h).  Where is USER_ADC_FULL_SCALE_DCBUS_VOLTAGE_V defined?  

3. There are several defines for pole locations.: USER_DCBUS_POLE_rps, USER_OFFSET_POLE_rps, USER_SPEED_POLE_rps...what are these for?  And how are they defined (i.e., are they dependent on something in the design (board, drive, etc)?

4. Does TI have something other than the C2000ware_MotorControl SDK Documentation website?  Will TI update the InstaSPIN-FOC User's Guide (SPRUHJ1H) to address C2000Ware_MotorControl implementation? 

Brett

 

  • 1. You can set flag_bypassMotorId  to true before calling the USER_setParams() if you know the correct USER_MOTOR_INERTIA_Kgm2. The lab uses default parameters for the motor.

    2.  USER_DCBUS_VOLTAGE_SF is for calculating the DC bus voltage with a filter, it's the cut off frequency of this filter. USER_ADC_FULL_SCALE_DCBUS_VOLTAGE_V is not used since the dc bus voltage uses the same voltage sampling circuit as phase voltage, is just reserved for further updates.

    3. To calculate the related variables with a digital low pass filter, these parameters are the cut off frequency of these filters.

    4. The lab guide should include all the contents. No plan to update the user's guide since the same FAST estimator and hardware are implemented on both, only a difference is that floating-point vs. fixed-point.

  • Where are all of these variables that you seem to understand and know defined?  I am trying to understand which i need to worry about and which i dont.  Not having anything documented is making this task fairly painful.

    This is why i was asking about the USER_setParams_Priv() function.  How do i know which parameters in the USER_Params structure are needed (i.e., need to be defined) and which don'?  I understand they are defined for the LaunchPads, etc but that doesn't necessarily mean they are defined for my design.

    Brett

  • You might take a look at the InstaSPIN lab guide and InstaSPIN user's guide (SPRUHJ1H ), that includes all the definition and description of these parameters or variables.

    http://www.ti.com/lit/ug/spruhj1h/spruhj1h.pdf 

  • Right.  

    As an example, the variable flag_bypassMotorId is not defined or explained in any of the old or new documentation.  Yet this variable seems to be key in MotorControl.  Both USER_setParams and USER_setParams_priv functions require it to be set for proper operation of the controller. 

    There are also new defines that are not defined or explained (in any TI documentation I can find) so we are forced into trial and error guesses with this implementation of MotorControl/InstaSpin-FOC.  And because of this I imagine there are lots of frustrated TI customers. 

    Brett

  • Brett Nourrcier said:
    I imagine there are lots of frustrated TI customers. 

    Understatement and we had to modify parts of the inertia check so it would fall through known motor types (pink) top. I tested user.c known type inertia formula and the PI speed control will almost harm the drv8230rs if you let it keep going. It seems TI never tested motors that actually move heavier masses. The little motors (VSI) are fun to play with on the test bench.

    Brett Nourrcier said:
    There are also new defines that are not defined or explained

    Some updates need to be added to chapter 6, SPRUHJ1H–January 2013–Revised June 2019.

  • As you know. In most cases, you only need to change the parameters for a new board or motor in user.h, and these parameters will be set to related variables by calling USER_setParams(). The parameters for USER_setParams_priv doesn't need to be changed by the users.

    Sorry, instaSPIN doesn't have a detailed description of every variable since some variables should be easy to understand by their names. We will try to add related description to these variables in the code or lab guide.

    Almost all parameters are similar in motorcontrolSDK with motorWare, so you might find the definition of these parameters in InstaSPIN user's guide (SPRUHJ1H). Let me know if you can't find it.