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.

Motor spins in lab02c, but doesn't work in 3a

I have a low inductance high speed motor. (Link: http://www.nmbtc.com/motors/part-numbers/Brushless-DC-25mm/BLDC24P16A-06V/6462

I'm able to get it to detect and spin in lab02c. When re-enabling identify_run after the identification steps, in runs fairly stable. I'm able to adjust the speed between 500 RPM and ~8000 RPM, and have verified with a flashlamp that gMotorVars.Speed_krpm is reporting correctly. The identification reports Rs=0.172515, and Ls=11.86E-6. My motor parameters appear as follows:

#elif (USER_MOTOR == PMDM_BLDC24P16A)
#define USER_MOTOR_TYPE                 MOTOR_Type_Pm
#define USER_MOTOR_NUM_POLE_PAIRS       (3)
#define USER_MOTOR_Rr                   (NULL)
#define USER_MOTOR_Rs                   (0.172515)
#define USER_MOTOR_Ls_d                 (1.186E-5)
#define USER_MOTOR_Ls_q                 (1.186E-5)
#define USER_MOTOR_RATED_FLUX           (NULL)
#define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
#define USER_MOTOR_RES_EST_CURRENT      (1.0)
#define USER_MOTOR_IND_EST_CURRENT      (-1.0)
#define USER_MOTOR_MAX_CURRENT          (4.8)
#define USER_MOTOR_FLUX_EST_FREQ_Hz     (40.0)

When I run lab03a with the above user parameters, the motor chatters and rotates at an extremely slow speed (usually less than 20 RPM.) The user setting gMotorVars.SpeedRef_krpm does not have any effect. Additionally, gMotorVars.Speed_krpm reports wildly changing values of speed between -2000 RPM and +2000 RPM. 

When running lab04 (torque controller), I'm able to get the motor turning mostly smoothly, but gMotorVars.Speed_krpm reports incorrect values. With gMotorVars.IqRef_A=1.0, the flashlamp measured speed of the motor is ~1000 RPM, but gMotorVars.Speed_krpm varies between 8640 RPM and 8790 RPM. Additionally, the motor loses control with IqRef values much past 1.0.

Questions:

* What would cause incorrect speed reporting?

* Why does speed reporting work in lab02c, but not in others?

* If lab02c detects an Ls value that slightly disagrees with my meter measured value (Eg, 1.18E-5 vs measured 1.63E-5), should I use my measured value, or lab02c's detected value?

* Should the measured value of Ls be varying with PWM frequency? I observe the following:

60 KHz: Ls=0.479E-5

70 KHz: Ls=1.02E-5

80 KHz: Ls=1.30E-5

90 KHz: Ls=2.65E-5

Thanks,

Grant

  • in labs 3/4 are you Enabling/Disabling the flag for OffsetRecal?
    do you have the values found for your adcBias stored in user.h? can you verify these values are being set the same into the controller?

    can you verify the values you ID'd and put in user.h are actually getting set into the controller? sometimes people don't save the user.h or are updating a file that their project is not using.


    if it runs after ID there is no reason it shouldn't run in subsequent labs unless the offset information is incorrect
  • I was able to figure it out- I was missing USER_MOTOR_RATED_FLUX in user.h. It was preventing speed detection on the motor. It was a bit confusing since page 32 of the instaspin lab document says that it "Must be zero for PMSM motors." A later section mentions to set it to the gMotorVars.Flux_VpHz value.

    Grant

  • " It was a bit confusing since page 32 of the instaspin lab document says that it "Must be zero for PMSM motors." A later section mentions to set it to the gMotorVars.Flux_VpHz value."

    It should be (NULL) when you start and want to do motor ID. For induction motors you need to set this to a specific value FOR motor ID.

    After Motor ID in lab02 the documentation tells you to update the Flux_VpHz value into user.h


    Glad you figured it out!