DRV8316REVM: Defining BLDC Motor parameters in Universal Motor Control Lab Project

Part Number: DRV8316REVM

Tool/software:

Hi,

I am testing/developing   firmware   with DRV8316R-EVM + LaunchXL- F280025C for my BLDC motor with Universal Motor Control Lab.  

I am modifying the default Teknic_M2310PLN04K

I extracted the values for Rs_Ohm, Ls_d_H, Ls_q_H, RATED_FLUX_VpHz from instaSPIN GUI (https://dev.ti.com/gallery/view/BLDC/DRV8316xEVM_InstaSPIN_Universal_GUI/ver/1.0.0/)

NUM_POLE_PAIRS, MAX_CURRENT_A  was taken from the motor spec

FREQ_MAX_Hz was calculated using the following formula: Freq = (Poles*RPM)/120 

FREQ_MIN_Hz was set to 0.01 as I am interested in a rather very slow and smooth rotation for my BLDC.

Looking at the motor specs it seems that some of the information is missing in order for me to define all the constants in user_mtr1.h file

Please help in defining the rest Motor related parameters in user_mtr1.h file

SN #if (USER_MOTOR1 == Teknic_M2310PLN04K) GL80_KV30
1 #define USER_MOTOR1_TYPE MOTOR_TYPE_PM
2 #define USER_MOTOR1_NUM_POLE_PAIRS (4) 21
3 #define USER_MOTOR1_Rr_Ohm (NULL)
4 #define USER_MOTOR1_Rs_Ohm (0.393955578f) 0.8452
5 #define USER_MOTOR1_Ls_d_H (0.000190442806f) 0.001258
6 #define USER_MOTOR1_Ls_q_H (0.000190442806f) 0.001258
7 #define USER_MOTOR1_RATED_FLUX_VpHz (0.0399353318f) 0.0587
8 #define USER_MOTOR1_MAGNETIZING_CURRENT_A (NULL)
9 #define USER_MOTOR1_RES_EST_CURRENT_A (1.5f)
10 #define USER_MOTOR1_IND_EST_CURRENT_A (-1.0f)
11 #define USER_MOTOR1_MAX_CURRENT_A (6.6f) 2.8
12 #define USER_MOTOR1_FLUX_EXC_FREQ_Hz (60.0f)
13 #define USER_MOTOR1_INERTIA_Kgm2 (7.06154e-06)
14 #define USER_MOTOR1_RATED_VOLTAGE_V (24.0f) // V 24
15 #define USER_MOTOR1_FREQ_MIN_Hz (9.0f) // Hz 0.01
16 #define USER_MOTOR1_FREQ_MAX_Hz (600.0f) // Hz 157.5
16 #define USER_MOTOR1_FREQ_LOW_Hz (5.0f) // Hz
19 #define USER_MOTOR1_FREQ_HIGH_Hz (400.0f) // Hz
19 #define USER_MOTOR1_VOLT_MIN_V (1.0f) // Volt
20 #define USER_MOTOR1_VOLT_MAX_V (24.0f) // Volt
21 #define USER_MOTOR1_FORCE_DELTA_A (0.05f) // A
22 #define USER_MOTOR1_ALIGN_DELTA_A (0.01f) // A
23 #define USER_MOTOR1_FLUX_CURRENT_A (0.5f) // A
24 #define USER_MOTOR1_ALIGN_CURRENT_A (1.5f) // A
27 #define USER_MOTOR1_STARTUP_CURRENT_A (3.5f) // A
28 #define USER_MOTOR1_TORQUE_CURRENT_A (3.0f) // A
28 #define USER_MOTOR1_OVER_CURRENT_A (7.5f) // A
29 #define USER_MOTOR1_SPEED_START_Hz (35.0f) // Hz
30 #define USER_MOTOR1_SPEED_FORCE_Hz (30.0f) // Hz
31 #define USER_MOTOR1_ACCEL_START_Hzps (10.0f) // Hz/s
32 #define USER_MOTOR1_ACCEL_MAX_Hzps (20.0f) // Hz/s
33 #define USER_MOTOR1_SPEED_FS_Hz (3.0f) // Hz
34 #define USER_MOTOR1_BRAKE_CURRENT_A (1.0f) // A
35 #define USER_MOTOR1_BRAKE_TIME_DELAY (12000U) // 60s/5ms

Thanks,
Dima

  • Dima,

    Apologies for the delay in response. Have you had a chance to look at the Universal Motor Control Lab User's Guide, specifically Appendix A, which describes how to set most of these parameters?

    Looking over the parts you do not have, I'll provide the guidance listed in the guide, with emphasis on the portions that are relevant to you. Where the guidance may not be sufficient or is lacking in context, I'll add other comments:

    USER_MOTOR1_TYPE The two valid values for this parameter are MOTOR_TYPE_PM (for BLDC, PMSM, SMPM, or IPM
    motors) and MOTOR_TYPE_INDUCTION (for Asynchronous ACI motors)
    USER_MOTOR1_Rr_Ohm This parameter defines the rotor resistance of the motor in Ohms for induction motors. For non-induction
    motors, set to NULL. This parameter is used only by InstaSPIN-FOC FAST.
    USER_MOTOR1_MAGNETIZING_CURRENT_A This parameter defines the rated current value of the motor in the direct direction in Amps for induction motors only. For other motors, set to NULL. This parameter is used only by InstaSPIN-FOC FAST.
    USER_MOTOR1_FLUX_CURRENT_A This parameter defines the current used to run the motor in forced open-loop, in A.
    This parameter should be set to 5%-50% of the rated current of the motor. Specific values should be
    decided according to system performance requirements.
    USER_MOTOR1_ALIGN_CURRENT_A This parameter defines the current used to run motor rotor alignment, in A.
    This parameter should be set to 5%-50% of the rated current of the motor. Specific values should be
    decided according to system performance requirements.
    USER_MOTOR1_STARTUP_CURRENT_A This parameter defines the current, in A, used to run the motor in closed-loop when the speed is below the
    defined startup speed (USER_MOTOR1_SPEED_START_Hz).
    This parameter should be set to 10%-100% of the rated motor current.
    USER_MOTOR1_SPEED_START_Hz This parameter defines the startup speed threshold of the motor, in Hz.
    This parameter should be set higher than the minimum rotation speed of the motor, and typically falls
    between 10%-50% of the rated motor speed.
    USER_MOTOR1_SPEED_FORCE_Hz This parameter defines the force open-loop speed threshold of the motor, in Hz.
    This parameter should be set higher than the minimum rotation speed of the motor, and typically falls
    between 5%-30% of the rated motor speed.
    USER_MOTOR1_ACCEL_START_Hzps This parameter defines the motor acceleration during startup.
    This parameter should be set less than the maximum acceleration of the motor
    (USER_MOTOR1_ACCEL_MAX_Hzps), and otherwise should be set according to system performance
    requirements.
    USER_MOTOR1_ACCEL_MAX_Hzps This parameter defines the maximum acceleration of the motor.
    This parameter should be set according to system performance requirements and motor hardware
    limitations.
    USER_MOTOR1_TORQUE_CURRENT_A

    This parameter defines the initially assigned value for motor startup current, in A.

    • Other comments: This parameter can be assigned to the same value as USER_MOTOR1_STARTUP_CURRENT_A.
    USER_MOTOR1_OVER_CURRENT_A

    This parameter defines the over-current threshold of the motor, in A. This value is used to calculate the
    CMPSS peripheral's DAC values, which in turn trigger the PWM's trip zone fault handling.
    This parameter should be set to a motor and system-dependent value that is typically 50% to 300% of the
    rated motor current.
    NOTE: If this value of this parameter is set greater than the maximum peak current value of the motor,
    defined as 47.5% of the ADC full scale current in this example, this parameter is ignored and the
    maximum peak current is used instead.

    USER_MOTOR1_INERTIA_Kgm2

    This parameter defines the moment of inertia of the mass rigidly coupled with the motor in kg · m2 . This contributes to the speed controller gain constant calculation.

    • Other comments: This parameters is defined based on the motor datasheet. If this value is not known, we generally advise to select from the pre-existing motors and find one similar in size to the motor you are using. In my experience, basic functionality can be achieved without tuning this value. To optimize the closed speed loop in particular, you want this to be known.
    USER_MOTOR1_SPEED_FS_Hz

    This parameter defines the flying-start speed threshold of the motor, in Hz.
    This parameter should be set higher than the minimum rotation speed of the motor, and typically falls
    between 0.1%-5% of the rated motor speed.

    • Other comments: This parameter is only used if the Flying Start functionality is enabled.
    USER_MOTOR1_BRAKE_CURRENT_A
    USER_MOTOR1_BRAKE_TIME_DELAY
    • Other comments: These parameters are only used if the BRAKE_ENABLE functionality is utilized. This functionality is not explicitly documented in the user's guide, and as such, I generally do not recommend utilizing it without confident understanding of the firmware. If you enable this functionality, refer to Appendix A for tuning guidance for these parameters.
    USER_MOTOR1_RES_EST_CURRENT_A
    USER_MOTOR1_IND_EST_CURRENT_A
    USER_MOTOR1_FLUX_EXC_FREQ_Hz
    • Other comments: These parameters are used for the Motor ID process. If motor ID has already been successfully completed or is being skipped, these can be ignored. If you want to tune them, refer to Appendix A.

    USER_MOTOR1_FREQ_LOW_Hz
    USER_MOTOR1_FREQ_HIGH_Hz
    USER_MOTOR1_VOLT_MIN_V
    USER_MOTOR1_VOLT_MAX_V

    • Other comments: These parameters are typically only used in the open loop V/F operation of the motor in Build 2. If Build 2 has already been completed or is being skipped, these can be ignored. If you want to tune them, refer to Appendix A.
    USER_MOTOR1_FORCE_DELTA_A
    USER_MOTOR1_ALIGN_DELTA_A
    • Other comments: These parameters are not located in the user's guide because they are not used in the project and can be ignored. This is either legacy content meant to ensure back-compatibility with other projects or it is future content that is not yet fully implemented.

    Regards,
    Jason Osborn