Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

XMC™ Forum Discussions

Vamshi_b
Level 3
Level 3
25 sign-ins 10 replies posted 10 sign-ins

Hi Team,
We are working on Sensor less project with the code "BLDC_SCALAR_SL_XMC13_InductiveSensing". We are using the following.

a) Evaluation Board: KIT_XMC1300_DC_V1
b) Power Board: 3 Phase Demo Board ME/MF DirectFET - 24 V Power supply
c) Motor: RS PRO Brushless DC Motor
--- Supply Voltage: 24V
--- Power Rating: 180W
--- Current Rating: 758mA
--- No Load Speed: 12900rpm
--- Stall Torque: 9.44mNm
--- Back-EMF Constant: 14.8V/1000 rpm
--- Electrical Phasing: 120° electrical

Modulation: High Side
Control Scheme: Speed control

I have gone through the algorithm and got to know that after getting sufficient BEMF, motor will run in the Closed loop. We observed the issue while/before entering to closed loop as below:

1) We updated the Motor parameters and tried to run the motor using Sensor-less method (code). Here, I have observed that the motor taking more current during startup (jerks while running). When we increase the POT then it is running as expected. Again observed the same when POT/speed was reduced to a minimum. This type of behavior is happening and observed every time at startup only.

Then,
a) We increased the current limit to 5Amp. Still, it is behaving (taking 5Amp) the same at startup.
b) Attached is the Phase Voltages, BEMF with POT readings.

Please point to us to the right material to refer and give information on the below points.

1) What might be the reason to cause this Overcurrent issue?
2) In closed loop, will it run at the constant speed or will it change as per POT (analog command input)?
3) What to consider in software and/or hardware to get this working without any overcurrent issue?
4) Do we need to adjust the gain values?

These are the parameters set in the software and attached image is the observation from the log we have taken while testing the motor.

 

/**
 * Control scheme selection:
 * Options - BLDC_SCALAR_VOLTAGE_CTRL, BLDC_SCALAR_SPEED_CTRL, BLDC_SCALAR_CURRENT_CTRL, BLDC_SCALAR_SPEEDCURRENT_CTRL
 */
#define   MOTOR0_BLDC_SCALAR_CTRL_SCHEME            (BLDC_SCALAR_SPEED_CTRL)//(BLDC_SCALAR_SPEED_CTRL)
/**
 * PWM modulation scheme selection:
 * Options - BLDC_SCALAR_PWM_HIGHSIDE, BLDC_SCALAR_PWM_LOWSIDE, BLDC_SCALAR_PWM_HIGHSIDE_SYNCHRECTI
 */
#define   MOTOR0_BLDC_SCALAR_MODULATION             (BLDC_SCALAR_PWM_HIGHSIDE)

/*********************  Control Parameters based upon control scheme  ******************/
#define     MOTOR0_BLDC_SCALAR_ENABLE_RAMP                    (0U)      /*!< Enable (1)/disable(0) linear ramp */

/* Speed control */
#if ((MOTOR0_BLDC_SCALAR_CTRL_SCHEME == BLDC_SCALAR_SPEED_CTRL) || (MOTOR0_BLDC_SCALAR_CTRL_SCHEME == BLDC_SCALAR_SPEEDCURRENT_CTRL))
#define   MOTOR0_BLDC_SCALAR_SPEED_SET            (2000.0F) /*!< speed in rpm, sign represents the motor direction +ve or -ve.
                                                      Motor runs with this set value. This configuration gets overwritten if VADC potentiometer measurement is enabled. */

#define   MOTOR0_BLDC_SCALAR_RAMP_INITIAL_VALUE   (200.0F)     /*!< speed in rpm, sign represents the motor direction +ve or -ve.
                                                                    Motor starts with this value when ramp is enabled and ramps up to set value. */
#define   MOTOR0_BLDC_SCALAR_RAMP_UP_RATE         (500.0F)     /*!< Unit is rpm/s. Range: 1 to MOTOR0_BLDC_SCALAR_MOTOR_NO_LOAD_SPEED*/
#define   MOTOR0_BLDC_SCALAR_RAMP_DOWN_RATE       (500.0F)     /*!< Unit is rpm/s. Range: 1 to MOTOR0_BLDC_SCALAR_MOTOR_NO_LOAD_SPEED*/

#define   MOTOR0_BLDC_SCALAR_SPEED_KP             (10857)//(20972U)//(10857)//(19857)//(14319U)//   /*!< Proportional gain of speed PI in Q15. Range: 0 to 32767*/(10857,2working)
#define   MOTOR0_BLDC_SCALAR_SPEED_KI             (2U) //(2U)//(100U)//(2U)//       /*!< Integral gain of speed PI in Q15. Range: 0 to 32767 */
#define   MOTOR0_BLDC_SCALAR_SPEED_PI_SCALE       (15U)       /*!< Scale of Kp and Ki parameters.*/
#define   MOTOR0_BLDC_SCALAR_SPEED_PI_LIMIT       (100.0F)   /*!< in % with respect to base current in speed inner current control mode
                                                                  or base voltage in speed control mode   */
#define   MOTOR0_BLDC_SCALAR_SPEED_CTRL_EXECUTION_RATE   (1U)   /*!< Speed control loop is executed in PWM interrupt based on execution rate. Range: 1 to 255
                                                                 if execution rate is 2, speed control loop is executed once in two PWM interrupts.*/
#endif

/* ADC Measurement  parameters */
#define   MOTOR0_BLDC_SCALAR_VADC_REF_VOLTAGE              (5.0F)         /*!< Reference voltage of VADC conversion */
#define   MOTOR0_BLDC_SCALAR_CURRENT_AMPLIFIER_OFFSET      (1.0F)//(2.5F)       /*!< Amplifier offset voltage  */
#define   MOTOR0_BLDC_SCALAR_CURRENT_RSHUNT                (1.0F)//(50.0F)       /*!< Current amplifier shunt resistor value in mOhms */
#define   MOTOR0_BLDC_SCALAR_CURRENT_AMPLIFIER_GAIN        (10.0F)//(16.4F)        /*!< Current amplifier gain */
#define   MOTOR0_BLDC_SCALAR_VOLTAGE_DIVIDER_RATIO         (19.65F) //(9.79F)     /*!< Voltage divider ratio in % for DC link voltage measurement */
#define   MOTOR0_BLDC_SCALAR_BEMF_DIVIDER_RATIO            (9.82F)//(19.65F)      /*!< Voltage divider ratio in % for phase voltage measurement */
/*********************************************************************************************************************
 *                                   STARTUP CONFIGURATIONS
 ********************************************************************************************************************/
#define MOTOR0_BLDC_SCALAR_SL_STARTUP_MIN_AMPLITUDE          (10.0F)        /*!< in %. Minimum Duty cycle to be applied for sensorless startup.
                                                                              //  Duty cycle is then controlled by current control loop.
                                                                              //  Range: 0.1 to 10 */
#define MOTOR0_BLDC_SCALAR_SL_FIRST_KICK_TIME                (4.0F)//(4.0F)        /*!< First kick time in mSec. Phase pattern corresponding to identified position
                                                                           //     is energized for this time.
                                                                           //     Min Range: 1/MOTOR0_BLDC_SCALAR_PWM_FREQ */

#define MOTOR0_BLDC_SCALAR_SL_TR_PHASE_ENERGIZATION_TIME     (0.8F) //(0.8F)        /*!< in mSec. Phases are energized in sequence for this time
                                                                               // during transition state from first kick to closed loop.
                                                                               // Min Range: 1/MOTOR0_BLDC_SCALAR_PWM_FREQ */
#define MOTOR0_BLDC_SCALAR_SL_TR_CURRENT_DECAY_TIME          (0.8F) //(0.8F)       /*!< in mSec. Wait time for current to decay.
                                                                               // Min Range: 1/MOTOR0_BLDC_SCALAR_PWM_FREQ */

#define MOTOR0_BLDC_SCALAR_SL_MIN_BEMF_VOLTAGE                (2.0F)//(2.0F)       /*!< in % with respect to MOTOR0_BLDC_SCALAR_NOMINAL_DC_LINK_VOLT
                                                                              // if measured BEMF voltage is less than this voltage during startup, position identification is again performed. */
#define MOTOR0_BLDC_SCALAR_SL_TRANSITION_BEMF_VOLTAGE        (6.0F) //(10.0F)//     /*!< in % with respect to MOTOR0_BLDC_SCALAR_NOMINAL_DC_LINK_VOLT
                                                                             //  Motor switches to closed loop when measured BEMF voltage is greater than this voltage. */
#define MOTOR0_BLDC_SCALAR_SL_STARTUP_COMMUTATION_COUNT      (12U)        /*!< Startup commutation counts before control switches to closed loop. Range: 6 to 255 */

/*********************************************************************************************************************
 *                                   STARTUP CURRENT CONTROL
 ********************************************************************************************************************/
#define   MOTOR0_BLDC_SCALAR_SL_STARTUP_CURRENT_SET           (1.0F)//  (0.4F) //   /*!< Current is in Amps.
                                                                   //Motor runs in current control during transition phase. */
/**
 * Proportional gain of startup current PI. Range: 0 to 32767
 */
#define   MOTOR0_BLDC_SCALAR_SL_STARTUP_CURRENT_KP            (24857)//(24857)//(17857)//(19857)//
/**
 * Integral gain of startup current PI. Range: 0 to 32767
 */
#define   MOTOR0_BLDC_SCALAR_SL_STARTUP_CURRENT_KI            (100)//(3506)//(1800)////(500)//(100)  //
#define   MOTOR0_BLDC_SCALAR_SL_STARTUP_CURRENT_PI_SCALE      (15U)  //(14U)     /*!< Scale of Kp and Ki parameters.*/
#define   MOTOR0_BLDC_SCALAR_SL_STARTUP_CURRENT_PI_LIMIT      (12.0F)    /*!< in % with respect to base voltage */

 


BLDC Testing Infy Support 2023-01-17 152522.png


We have the plan to test our custom motor before that, we need to clear the concept behind it. Can anyone reply to my queries above and help me to resolve this overcurrent issue.



Thank you in Advance,
Vamshi B

0 Likes
1 Reply
Viswa
Moderator
Moderator
Moderator
50 replies posted 250 sign-ins 10 solutions authored

Hi @Vamshi_b 

  • Hope you are using the code base from the following link

https://www.infineon.com/cms/en/search.html#!term=BLDC_SCALAR_SL_XMC13&view=all

  • The following html document available in the project folder gives the details of the code

“BLDC_SCALAR_SL_XMC13_UserGuide”

  • The code is tuned for a different motor/H/W set. Please kindly configure all the parameters needed as per your custom motor.
  • In case it helps the motor datasheet for the part used in the Eval board is

https://www.maxongroup.com/maxon/view/product/267121

 

Regarding your queries

 

  • What might be the reason to cause this Overcurrent issue?

Ans: For this we suggest to go through the manual and check if all the values are programmed as per the motor/H/W setup


2) In closed loop, will it run at the constant speed or will it change as per POT (analog command input)?

Ans: The speed will depend on the potentiometer, please refer the manual for exact details.


3) What to consider in software and/or hardware to get this working without any overcurrent issue?

Please kindly check the BEMF voltages and the switch-over voltage from open-loop to closed-loop. Also try reducing the speed ramp-rate.
4) Do we need to adjust the gain values?

The gain values should be adjusted based on the system configuration.

Best Regards

0 Likes