Other Parts Discussed in Thread: DRV8353,
Hi,
After a lot of work due to incomplete documentation:
I have a motor spinning (sort of) with the universal project of the Motor Control SDK (V4.00) with LAUNCHXL-F280025C & DRV8353.
Motor: Allied Motion KM062 / 15-pole / 24V
Motor params:
#define USER_MOTOR1_TYPE MOTOR_TYPE_PM
#define USER_MOTOR1_NUM_POLE_PAIRS (15)
#define USER_MOTOR1_Rr_Ohm (NULL)
#define USER_MOTOR1_Rs_Ohm (0.192211851f)//meas uni lab (0.201803967)
#define USER_MOTOR1_Ls_d_H (9.02345652e-05f)//meas uni lab (8.16669053e-05)
#define USER_MOTOR1_Ls_q_H (9.02345652e-05f)//meas uni lab (8.16669053e-05)
#define USER_MOTOR1_RATED_FLUX_VpHz (0.0223167749f)//(0.0219697803) //PM motor, so always 0: stated somewhere in docs
#define USER_MOTOR1_MAGNETIZING_CURRENT_A (NULL) //PM motor, so always 0
#define USER_MOTOR1_RES_EST_CURRENT_A (1.5f)
#define USER_MOTOR1_IND_EST_CURRENT_A (-1.5f)
#define USER_MOTOR1_MAX_CURRENT_A (5.0f) //4.1 (4.1*24V =
#define USER_MOTOR1_FLUX_EXC_FREQ_Hz (90.0f) //motor=3600rpm/60sec = 60Hz*15polepare = 900 -> 10-30%
#define USER_MOTOR1_NUM_ENC_SLOTS (500) //Encoder HEDL-5540-A11, not used -> HALL used
#define USER_MOTOR1_INERTIA_Kgm2 (61.0e-06f)
#define USER_MOTOR1_FREQ_NEARZEROLIMIT_Hz (5.0f) // Hz
#define USER_MOTOR1_RATED_VOLTAGE_V (24.0f)
#define USER_MOTOR1_RATED_SPEED_KRPM (3.0f)
#define USER_MOTOR1_FREQ_MIN_HZ (1.0f) // Hz
#define USER_MOTOR1_FREQ_MAX_HZ (900.0f) // Hz
#define USER_MOTOR1_FREQ_LOW_HZ (10.0f) // Hz
#define USER_MOTOR1_FREQ_HIGH_HZ (100.0f) // Hz
#define USER_MOTOR1_VOLT_MIN_V (1.0f) // Volt
#define USER_MOTOR1_VOLT_MAX_V (24.0f) // Volt
#define USER_MOTOR1_FORCE_DELTA_A (0.05f) // A
#define USER_MOTOR1_ALIGN_DELTA_A (0.01f) // A
#define USER_MOTOR1_FLUX_CURRENT_A (0.5f) // A
#define USER_MOTOR1_ALIGN_CURRENT_A (1.5f) // A
#define USER_MOTOR1_STARTUP_CURRENT_A (3.5f) // A
#define USER_MOTOR1_TORQUE_CURRENT_A (2.0f) // A
#define USER_MOTOR1_OVER_CURRENT_A (7.5f) // A
#define USER_MOTOR1_BRAKE_CURRENT_A (1.0f) // A
#define USER_MOTOR1_BRAKE_TIME_DELAY (12000U) // 60s/5ms
#define USER_MOTOR1_SPEED_START_Hz (30.0f)
#define USER_MOTOR1_SPEED_FORCE_Hz (25.0f)
#define USER_MOTOR1_ACCEL_START_Hzps (10.0f)
#define USER_MOTOR1_ACCEL_MAX_Hzps (20.0f)
#define USER_MOTOR1_SPEED_FS_Hz (3.0f)
// only for encoder
#define USER_MOTOR1_ENC_POS_MAX (USER_MOTOR1_NUM_ENC_SLOTS * 4 - 1)
#define USER_MOTOR1_ENC_POS_OFFSET (668)
// Only for eSMO
#define USER_MOTOR1_KSLIDE_MAX (0.75f) //
#define USER_MOTOR1_KSLIDE_MIN (0.15f)
#define USER_MOTOR1_PLL_KP_MAX (6.75f) //
#define USER_MOTOR1_PLL_KP_MIN (0.75f)
#define USER_MOTOR1_PLL_KP_SF (5.0f)
#define USER_MOTOR1_BEMF_THRESHOLD (0.5f)
#define USER_MOTOR1_BEMF_KSLF_FC_Hz (1.0f)
#define USER_MOTOR1_THETA_OFFSET_SF (1.0f)
#define USER_MOTOR1_SPEED_LPF_FC_Hz (200.0f)
// for IS-BLDC
#define USER_MOTOR1_RAMP_START_Hz (3.0f)
#define USER_MOTOR1_RAMP_END_Hz (30.0f)
#define USER_MOTOR1_RAMP_DELAY (5)
#define USER_MOTOR1_ISBLDC_INT_MAX (0.015f)
#define USER_MOTOR1_ISBLDC_INT_MIN (0.010f)
// for Rs online calibration
#define USER_MOTOR1_RSONLINE_WAIT_TIME (60000U) // 5min/300s at 5ms base
#define USER_MOTOR1_RSONLINE_WORK_TIME (24000U) //2min/120s at 5ms base
HALL sensors calibrated according documenatation.
Motor tests:
####################
In DMC_LEVEL_3 (FAST & HALL enabled):
Spinning up the motor to 100Hz takes about 4 seconds (after Enable via CANbus). First 3 seconds motor spins very slow.
Spinning up the motor from ag. 100Hz to 400Hz is pretty resonsive, from 10Hz to 100Hz takes 3-4 seconds.
The motor is/can spin(ning) at low speeds, but in higher speeds it will go in moduleOverCurrent.
In DMC_LEVEL_3 (Only HALL enabled):
Same as above.
When disconnecting the HALL wires from the board the motor will run to the correct speed (although speed_Hz == 0), but ramps very slow.
How? FAST is disabled...
####################
In DMC_LEVEL_4 (FAST & HALL enabled):
Spinning up the motor to 100Hz takes about 4 seconds (after Enable via CANbus). First 3 seconds motor spins very slow.
Spinning up the motor from ag. 100Hz to 400Hz is pretty resonsive, from 10Hz to 100Hz takes 3-4 seconds.
The motor can spin at high speeds without moduleOverCurrent, but low speeds are not so good (wobbely, noisy motor).
Edit:
Sometimes when stopping the motor (via CANbus) and starting again, takes up to 10 secs.
In DMC_LEVEL_4 (Only HALL enabled):
Motor shakes a little bit, then revs up fast (1 sec) and stops due to moduleOverCurrent.
No normal control possible.
When disconnecting the HALL wires, the motor makes a bit of spound, but no is not revving up (also no moduleOverCurrent).
####################
I started this project clean according to what the manual says (spruj26.pdf). Then I copied all files needed to a directory for a stand alone project. (Or else -> change 1 file you will change all your projects, and there is no going back). That being said: there is no difference in behaviour between the freshly installed MC SDK and the standalone project I distilled from it (so it is usable in SVN and there IS a going back).
---
So, what must I do to get this motor spinning nicely?
The hardware seems okay (motor+HALL wires, triple checked), I think.
Also, how to set all the dipswiches LAUNCHXL-F280025C? The documentation shows only a 'new fresh unset' board, it is not clear how to set all the dipswitches (also another board is hiding the dipswitches).
Given the above, there are issues with the code (did not change code except for the CANbus control).
Please guide me, or give me hints where to look. There are very few comments in code and the documentation is lacking of enough parameter explanation.
Has anyone used this universal project with a motor+FAST+HALL and is able to succesfully spin the motor, as advertised?
I can provide more information if needed.
BR,
Ruud