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.

BOOSTXL-DRV8301: Motor drawing way more current than expected

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

Hi, 

I am currently using a LaunchpadXL TMS320F 28069M with a BOOSTXL-DRV8301 REV B to drive the following motor: FAULHABER MINIMOTOR SA  2444 S 024 B.

I've attached the spec sheet for this 2Ohm, 170uH motor and will also attach my associated user motor settings.

My problem is that I am able to command the motor in speed control but I am unable to achieve anywhere close to the no-load speed on the spec sheet. It is rated for 22,000RPM, but I am not able to achieve over 7,500RPM and would be nervous going higher because the system wants to draw more than it's continuous rated thermal current limit of 1.58A so I am currently limiting the current on my power supply. I don't expect this motor to operate so hot while having no-load at RPMs higher than a few thousand (when amperage increases quickly as a function of speed).

I would ideally like to set very high PWM (100k+) but have tried various settings without avail and realize that the DRV8301 is not advertised as a high PWM motor.

Judging by my user parameters, to be posted, is there any aspect of the system that I still need to experimentally tune or something big that I am missing? As a note, I have tried various values for many of the user parameters. The manual identification of the motor for Rs, Ls, and Flux did not go well so I used the spec sheet and base guidelines for these.

 

  • Hello,

    What Voltage rail are you running the DRV8301 EVM at? 

    Are you using our InstaSPIN libraries?  If so, which lab are you using?

  • Thanks for your response Phil!

    - I have set my power supply unit to 24V (which is what the motor nominal voltage is rated for)

    - I am using the InstaSPIN libraries. I have used a bunch of the labs but some of them I have issues with varying issues which I was going to write as a separate post about.

    When I use:

    FOC Lab01b Open loop control for hardware integrity verification

    I can successfully test the motor after I enable the gMotorVars system and identification.The lab where this works fine for me is. I'd like to use other labs like FOC Lab05b Speed mode and tuning speed PI but the motor does not spin after it's enabled and identified presumably because of the code for the lab.
  • Additionally, here are the relevant parameters:

    #define USER_MOTOR_TYPE MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS (1)
    #define USER_MOTOR_Rr (NULL)
    #define USER_MOTOR_Rs (2.000000)
    #define USER_MOTOR_Ls_d (0.000170)
    #define USER_MOTOR_Ls_q (0.000170)
    #define USER_MOTOR_RATED_FLUX (0.0)
    #define USER_MOTOR_MAGNETIZING_CURRENT (NULL)
    #define USER_MOTOR_RES_EST_CURRENT (0.25)
    #define USER_MOTOR_IND_EST_CURRENT (-0.25)
    #define USER_MOTOR_MAX_CURRENT (1.5)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz (20.0)
    #define IPD_HFI_EXC_FREQ_HZ (750.0) // excitation frequency, Hz
    #define IPD_HFI_LP_SPD_FILT_HZ (35.0) // lowpass filter cutoff frequency, Hz
    #define IPD_HFI_HP_IQ_FILT_HZ (100.0) // highpass filter cutoff frequency, Hz
    #define IPD_HFI_KSPD (15.0) // the speed gain value
    #define IPD_HFI_EXC_MAG_COARSE_PU (0.13) // coarse IPD excitation magnitude, pu
    #define IPD_HFI_EXC_MAG_FINE_PU (0.12) // fine IPD excitation magnitude, pu
    #define IPD_HFI_EXC_TIME_COARSE_S (0.5) // coarse wait time, sec max 0.64
    #define IPD_HFI_EXC_TIME_FINE_S (0.5) // fine wait time, sec max 0.4
    #define AFSEL_FREQ_HIGH_PU (_IQ(15.0 / USER_IQ_FULL_SCALE_FREQ_Hz))
    #define AFSEL_FREQ_LOW_PU (_IQ(10.0 / USER_IQ_FULL_SCALE_FREQ_Hz))
    #define AFSEL_IQ_SLOPE_EST (_IQ((float)(1.0/0.1/USER_ISR_FREQ_Hz)))
    #define AFSEL_IQ_SLOPE_HFI (_IQ((float)(1.0/10.0/USER_ISR_FREQ_Hz)))
    #define AFSEL_IQ_SLOPE_THROTTLE_DWN (_IQ((float)(1.0/0.05/USER_ISR_FREQ_Hz)))
    #define AFSEL_MAX_IQ_REF_EST (_IQ(0.6))
    #define AFSEL_MAX_IQ_REF_HFI (_IQ(0.6))

    #define USER_MOTOR_FREQ_LOW (10.0) // Hz - suggested to set to 10% of rated motor frequency
    #define USER_MOTOR_FREQ_HIGH (100.0) // Hz - suggested to set to 100% of rated motor frequency
    #define USER_MOTOR_FREQ_MAX (120.0) // Hz - suggested to set to 120% of rated motor frequency
    #define USER_MOTOR_VOLT_MIN (3.6) // Volt - suggested to set to 15% of rated motor voltage
    #define USER_MOTOR_VOLT_MAX (24.0) // Volt - suggested to set to 100% of rated motor voltage


    ---------------------------

    //! \brief CURRENTS AND VOLTAGES
    // **************************************************************************
    //! \brief Defines the full scale frequency for IQ variable, Hz
    //! \brief All frequencies are converted into (pu) based on the ratio to this value
    //! \brief this value MUST be larger than the maximum speed that you are expecting from the motor
    #define USER_IQ_FULL_SCALE_FREQ_Hz (200) // 800 Example with buffer for 8-pole 6 KRPM motor to be run to 10 KRPM with field weakening; Hz =(RPM * Poles) / 120

    //! \brief Defines full scale value for the IQ30 variable of Voltage inside the system
    //! \brief All voltages are converted into (pu) based on the ratio to this value
    //! \brief WARNING: this value MUST meet the following condition: USER_IQ_FULL_SCALE_VOLTAGE_V > 0.5 * USER_MOTOR_MAX_CURRENT * USER_MOTOR_Ls_d * USER_VOLTAGE_FILTER_POLE_rps,
    //! \brief WARNING: otherwise the value can saturate and roll-over, causing an inaccurate value
    //! \brief WARNING: this value is OFTEN greater than the maximum measured ADC value, especially with high Bemf motors operating at higher than rated speeds
    //! \brief WARNING: if you know the value of your Bemf constant, and you know you are operating at a multiple speed due to field weakening, be sure to set this value higher than the expected Bemf voltage
    //! \brief It is recommended to start with a value ~3x greater than the USER_ADC_FULL_SCALE_VOLTAGE_V and increase to 4-5x if scenarios where a Bemf calculation may exceed these limits
    //! \brief This value is also used to calculate the minimum flux value: USER_IQ_FULL_SCALE_VOLTAGE_V/USER_EST_FREQ_Hz/0.7
    #define USER_IQ_FULL_SCALE_VOLTAGE_V (24.0) // 24.0 Example for boostxldrv8301_revB typical usage and the Anaheim motor

    //! \brief Defines the maximum voltage at the input to the AD converter
    //! \brief The value that will be represented by the maximum ADC input (3.3V) and conversion (0FFFh)
    //! \brief Hardware dependent, this should be based on the voltage sensing and scaling to the ADC input
    #define USER_ADC_FULL_SCALE_VOLTAGE_V (24) // 26.314 boostxldrv8301_revB voltage scaling

    //! \brief Defines the full scale current for the IQ variables, A
    //! \brief All currents are converted into (pu) based on the ratio to this value
    //! \brief WARNING: this value MUST be larger than the maximum current readings that you are expecting from the motor or the reading will roll over to 0, creating a control issue
    #define USER_IQ_FULL_SCALE_CURRENT_A (2.0) // 20.0 Example for boostxldrv8301_revB typical usage

    //! \brief Defines the maximum current at the AD converter
    //! \brief The value that will be represented by the maximum ADC input (3.3V) and conversion (0FFFh)
    //! \brief Hardware dependent, this should be based on the current sensing and scaling to the ADC input
    #define USER_ADC_FULL_SCALE_CURRENT_A (2.0) // 33.0 boostxldrv8301_revB current scaling

    //! \brief Defines the number of current sensors used
    //! \brief Defined by the hardware capability present
    //! \brief May be (2) or (3)
    #define USER_NUM_CURRENT_SENSORS (3) // 3 Preferred setting for best performance across full speed range, allows for 100% duty cycle

    //! \brief Defines the number of voltage (phase) sensors
    //! \brief Must be (3)
    #define USER_NUM_VOLTAGE_SENSORS (3) // 3 Required

    //! \brief ADC current offsets for A, B, and C phases
    //! \brief One-time hardware dependent, though the calibration can be done at run-time as well
    //! \brief After initial board calibration these values should be updated for your specific hardware so they are available after compile in the binary to be loaded to the controller
    #define I_A_offset (0.00) //
    #define I_B_offset (0.00) // NOTE: have set to defaults without any marked improvement and offset tuning lab is not working for me
    #define I_C_offset (0.00) //

    //! \brief ADC voltage offsets for A, B, and C phases
    //! \brief One-time hardware dependent, though the calibration can be done at run-time as well
    //! \brief After initial board calibration these values should be updated for your specific hardware so they are available after compile in the binary to be loaded to the controller
    #define V_A_offset (0.00) //
    #define V_B_offset (0.00) // NOTE: have set to defaults without any marked improvement and offset tuning lab is not working for me
    #define V_C_offset (0.00) //


    //! \brief CLOCKS & TIMERS
    // **************************************************************************
    //! \brief Defines the Pulse Width Modulation (PWM) frequency, kHz
    //! \brief PWM frequency can be set directly here up to 30 KHz safely (60 KHz MAX in some cases)
    //! \brief For higher PWM frequencies (60 KHz+ typical for low inductance, high current ripple motors) it is recommended to use the ePWM hardware
    //! \brief and adjustable ADC SOC to decimate the ADC conversion done interrupt to the control system, or to use the software Que example.
    //! \brief Otherwise you risk missing interrupts and disrupting the timing of the control state machine
    #define USER_PWM_FREQ_kHz (200.0) // Ideally, I'd like to drive at this rate but have tried lower rates (60-80) without marked improvement. Not sure this board can do PWM this fast.


    //! \brief Defines the maximum Voltage vector (Vs) magnitude allowed. This value sets the maximum magnitude for the output of the
    //! \brief Id and Iq PI current controllers. The Id and Iq current controller outputs are Vd and Vq.
    //! \brief The relationship between Vs, Vd, and Vq is: Vs = sqrt(Vd^2 + Vq^2). In this FOC controller, the
    //! \brief Vd value is set equal to USER_MAX_VS_MAG*USER_VD_MAG_FACTOR. Vq = sqrt(USER_MAX_VS_MAG^2 - Vd^2).
    //! \brief Set USER_MAX_VS_MAG = 0.5 for a pure sinewave with a peak at SQRT(3)/2 = 86.6% duty cycle. No current reconstruction is needed for this scenario.
    //! \brief Set USER_MAX_VS_MAG = 1/SQRT(3) = 0.5774 for a pure sinewave with a peak at 100% duty cycle. Current reconstruction will be needed for this scenario (Lab10a-x).
    //! \brief Set USER_MAX_VS_MAG = 2/3 = 0.6666 to create a trapezoidal voltage waveform. Current reconstruction will be needed for this scenario (Lab10a-x).
    //! \brief For space vector over-modulation, see lab 10 for details on system requirements that will allow the SVM generator to go all the way to trapezoidal.
    #define USER_MAX_VS_MAG_PU (0.5) // Set to 0.5 if a current reconstruction technique is not used. Look at the module svgen_current in lab10a-x for more info.


    //! \brief DECIMATION
    // **************************************************************************
    //! \brief Defines the number of pwm clock ticks per isr clock tick
    //! Note: Valid values are 1, 2 or 3 only
    #define USER_NUM_PWM_TICKS_PER_ISR_TICK (3)

    //! \brief Defines the number of isr ticks (hardware) per controller clock tick (software)
    //! \brief Controller clock tick (CTRL) is the main clock used for all timing in the software
    //! \brief Typically the PWM Frequency triggers (can be decimated by the ePWM hardware for less overhead) an ADC SOC
    //! \brief ADC SOC triggers an ADC Conversion Done
    //! \brief ADC Conversion Done triggers ISR
    //! \brief This relates the hardware ISR rate to the software controller rate
    //! \brief Typcially want to consider some form of decimation (ePWM hardware, CURRENT or EST) over 16KHz ISR to insure interrupt completes and leaves time for background tasks
    #define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1) // 2 Example, controller clock rate (CTRL) runs at PWM / 2; ex 30 KHz PWM, 15 KHz control

    //! \brief Defines the number of controller clock ticks per current controller clock tick
    //! \brief Relationship of controller clock rate to current controller (FOC) rate
    #define USER_NUM_CTRL_TICKS_PER_CURRENT_TICK (1) // 1 Typical, Forward FOC current controller (Iq/Id/IPARK/SVPWM) runs at same rate as CTRL.

    //! \brief Defines the number of controller clock ticks per estimator clock tick
    //! \brief Relationship of controller clock rate to estimator (FAST) rate
    //! \brief Depends on needed dynamic performance, FAST provides very good results as low as 1 KHz while more dynamic or high speed applications may require up to 15 KHz
    #define USER_NUM_CTRL_TICKS_PER_EST_TICK (1) // 1 Typical, FAST estimator runs at same rate as CTRL;

    //! \brief Defines the number of controller clock ticks per speed controller clock tick
    //! \brief Relationship of controller clock rate to speed loop rate
    #define USER_NUM_CTRL_TICKS_PER_SPEED_TICK (15) // 15 Typical to match PWM, ex: 15KHz PWM, controller, and current loop, 1KHz speed loop

    //! \brief Defines the number of controller clock ticks per trajectory clock tick
    //! \brief Relationship of controller clock rate to trajectory loop rate
    //! \brief Typically the same as the speed rate
    #define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (15) // 15 Typical to match PWM, ex: 10KHz controller & current loop, 1KHz speed loop, 1 KHz Trajectory


    //! \brief LIMITS
    // **************************************************************************
    //! \brief Defines the maximum negative current to be applied in Id reference
    //! \brief Used in field weakening only, this is a safety setting (e.g. to protect against demagnetization)
    //! \brief User must also be aware that overall current magnitude [sqrt(Id^2 + Iq^2)] should be kept below any machine design specifications
    #define USER_MAX_NEGATIVE_ID_REF_CURRENT_A (-0.5 * USER_MOTOR_MAX_CURRENT) // -0.5 * USER_MOTOR_MAX_CURRENT Example, adjust to meet safety needs of your motor

    //! \brief Defines the R/L estimation frequency, Hz
    //! \brief User higher values for low inductance motors and lower values for higher inductance
    //! \brief motors. The values can range from 100 to 300 Hz.
    #define USER_R_OVER_L_EST_FREQ_Hz (200) // 300 Default

    //! \brief Defines the low speed limit for the flux integrator, pu
    //! \brief This is the speed range (CW/CCW) at which the ForceAngle object is active, but only if Enabled
    //! \brief Outside of this speed - or if Disabled - the ForcAngle will NEVER be active and the angle is provided by FAST only
    #define USER_ZEROSPEEDLIMIT (0.5 / USER_IQ_FULL_SCALE_FREQ_Hz) // 0.002 pu, 1-5 Hz typical; Hz = USER_ZEROSPEEDLIMIT * USER_IQ_FULL_SCALE_FREQ_Hz

    //! \brief Defines the force angle frequency, Hz
    //! \brief Frequency of stator vector rotation used by the ForceAngle object
    //! \brief Can be positive or negative
    #define USER_FORCE_ANGLE_FREQ_Hz (2.0 * USER_ZEROSPEEDLIMIT * USER_IQ_FULL_SCALE_FREQ_Hz) // 1.0 Typical force angle start-up speed


    //! \brief POLES
    // **************************************************************************
    //! \brief Defines the analog voltage filter pole location, Hz
    //! \brief Must match the hardware filter for Vph
    #define USER_VOLTAGE_FILTER_POLE_Hz (364.682) // 364.682, value for boostxldrv8301_revB hardware
  • you have changed many parameters in your user.h file that you should not. Please go back to a fresh install of MotorWare using user.h without changes. don't change any of the USER_ADC or USER_IQ settings.....don't set the PWM higher than 45.

    set
    #define USER_MOTOR_MAX_CURRENT (4.0) // this isn't the rated current, this is the peak current required to reach the rated torque of the machine

    use proj_lab02c to ID the parameters of the motor

    then run proj_lab05a to find the maximum no load speed under sinewave control.
    you can use proj_lab10a to find the maximum speed under over-modulation (space vector and trapezoidal), but you will need to insure the speed control loops are reasonably tuned. The proj_lab05b+ shows you how to tune the controllers if you are having difficulty.