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.

MOTORWARE: Instaspin FOC - Motor identification fails for specific motor

Part Number: MOTORWARE
Other Parts Discussed in Thread: DRV8305, TMS320F28027F,

Hi,

I'm working with TMS320F28027F and DRV8305 EVMs for instaspin FOC tests. I have previously identified and run several motors successfully using lab 2c and 3a.

Repeating the process with a slightly different motor (GM4108H-120T), the identification process seems to be unable to complete.

I have updated the parameters according to this spreadsheet

I'm using the following parameters (additionally to the ones from the spreadsheet):

#define USER_R_OVER_L_EST_FREQ_Hz (100)

#elif (USER_MOTOR == GM4108H_120T)
#define USER_MOTOR_TYPE                 MOTOR_Type_Pm
#define USER_MOTOR_NUM_POLE_PAIRS       (11)
#define USER_MOTOR_Rr                   (NULL)
#define USER_MOTOR_Rs                   (NULL)
#define USER_MOTOR_Ls_d                 (NULL)
#define USER_MOTOR_Ls_q                 (NULL)
#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          (1.5)
#define USER_MOTOR_FLUX_EST_FREQ_Hz     (9.0)

When I start the identification process, the motor starts spinning (speed estimate looks off) and when it reaches the rated flux calculation it stops spinning. After this point it does very small movements and finishes the process returning excessively big values for flux and inductance. Resistance looks to be ok (5.7ohms).

Any guide on how to debug this or something working with my parameters?

Thanks,

David

  • Is there any load on the motor? What's the rated current of the motor? You may try to tune the identification variables in the file of the user.h according to the spec. of  motor.

    #define USER_MOTOR_RES_EST_CURRENT      (1.0)                               // A -  10-30% of rated current of the motor

    #define USER_MOTOR_IND_EST_CURRENT      (-1.0)                             // A -  10-30% of rated current of the motor,  just enough to enable rotation

    #define USER_MOTOR_MAX_CURRENT            (5.0)                               // A -  30~150%  of rated current of the motor

    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (40.0)                            // Hz - 10~30% rated frequency of the motor

  • Hi Yanming,

    Thanks for the input, will try tuning with these numbers. Rated current is 1.5A per below link:

    https://shop.iflight-rc.com/ipower-motor-gm4108h-120t-brushless-gimbal-motor-pro217

    The motor is not loaded. Should it be?

    Thanks,

    David

  • You might try to run the lab02c with the below identification parameters, please share some current waveform if still has any issues.

    #define USER_MOTOR_RES_EST_CURRENT      (1.0)                  

    #define USER_MOTOR_IND_EST_CURRENT      (-0.5)                         

    #define USER_MOTOR_MAX_CURRENT            (3.0)                             

    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (60.0)                          

  • Hi Yanming, 

    I have tried the settings you have proposed and also tried playing with these values. The motor spins pretty well during ramp up and RS calculation is accurate. As soon as the motor reaches the rated flux estate it halts and doesnt move anymore.

    Any idea on what could cause it to stop at this estate?

    Is a current oscilloscope capture of one of the phases good enough or would it be better to have the 3? I could measure the three through sense resistors since I only have 1 current probe.

    Thanks,

    David

  • Hi David,

    What pole pairs does the motor have? You might try to increase/reduce the USER_MOTOR_IND_EST_CURRENT from (-2.0) to (-0.25) without changing anything else.

    You might just need to use current probe to measure one phase current. It's better to capture multiple waveform in different states. I want to know if the setting current is too large to cause the motor stall, or too small to start spin motor.

    Can you try to run the motor using lab01c in motorWare, and to know what reference current can spin the motor smoothly?

  • Hi Yanming, 

    I have done a few more tests. As you mentioned I tried different values for USER_MOTOR_IND_EST_CURRENT from (-2.0) to (-0.25) and did not see any improvement.

    I ran lab01b and lab01c with this motor, lab01b worked well but lab01c did not get it to spin (played with a different values for Iq, Id). To make sure this is not an issue with the PCBA HW I ran lab01c with a different motor (which I have successfully identified in previous tests) and got it to spin.

    What could be the cause of lab01c failure? Bad motor maybe? or maybe some bad connection to it? This motor has 35cm of 24 AWG wire between each phase and the EVM.
    I'm using the EVM kit with minor modification and it works with other motor so I'm pretty sure the issue is not coming from there.

    For reference, this is the list of all the variables I have modified for this case:
    #define USER_IQ_FULL_SCALE_FREQ_Hz       (110.0) //considering a max speed of 400RPM and 22 poles (11 pairs)
    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (23)
    #define USER_ADC_FULL_SCALE_VOLTAGE_V       (44.30)
    #define USER_IQ_FULL_SCALE_CURRENT_A         (7.0)
    #define USER_ADC_FULL_SCALE_CURRENT_A        (55.0)
    #define USER_PWM_FREQ_kHz                (45.0)
    #define USER_NUM_PWM_TICKS_PER_ISR_TICK        (3)
    #define USER_R_OVER_L_EST_FREQ_Hz (100) // Restricted due to full scale freq Hz
    #define USER_VOLTAGE_FILTER_POLE_Hz  (1044.3)

    #define USER_MOTOR_TYPE                 MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS       (11)
    #define USER_MOTOR_RES_EST_CURRENT      (1.0)
    #define USER_MOTOR_IND_EST_CURRENT      (-0.25) // Trying different values from -2.0 up to -0.1
    #define USER_MOTOR_MAX_CURRENT          (3.0)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (60.0)
    Thanks,
    David
  • I have some experience with lab1c and the motor does not spin if there is no values for Rs and inductace. What is this pole pairs number? Are you sure this motor has an odd pole pairs number? I had the same problem on lab2a with a hoist motor. My ID process stops on flux est. So I increased the max current and the RES_EST current. The values are connected RES_EST =0.1MAX_CURRENT. The hoist motor has an internal break and demands a higher current to start spinning. So may be you need something similar. As far as I know the MAX current is determined by the max inrush current of the motor which can be up to 7 times higher than the nominal.

    I hope this could help!

    Best regards!

  • Thanks for the input Yanming, and Pavlin. Since lab01c didnt run as expected it seemed something was wrong with the motor, so I checked the BEMF on a scope (probe phases and spin motor manually):

    Phase A to phase B : 4.44V pk-pk

    Phase B to phase C : 13.3V pk-pk

    Phase C to phase A : 12V pk-pk

    The motor was not spinning exactly at the same speed but it was close. Anyway, it seems obvious then that phase A to B has some issue.

    Could this explain the behavior I mentioned?

  • Hi David,

    You might try to run the motor with lab01b, and monitor the 3-phase current waveform that should be very similar on the scope if the motor runs smoothly. And then try to run the motor with lab01c. Both lab01b and lab01c don't need exact electrical parameters (Rs, Ls and Flux). You just need to set the right v/f profile according to the spec. of the motor like rated voltage, frequency as below.

    #define USER_MOTOR_FREQ_LOW                             (10.0)                        // Hz - suggested to set to 10% of rated motor frequency

    #define USER_MOTOR_FREQ_HIGH                             (180.0)                      // Hz - suggested to set to 100% of rated motor frequency

    #define USER_MOTOR_FREQ_MAX                              (200.0)                      // Hz - suggested to set to 120% of rated motor frequency

    #define USER_MOTOR_VOLT_MIN                                (3.0)                          // Volt - suggested to set to 15% of rated motor voltage

    #define USER_MOTOR_VOLT_MAX                               (18.0)                        // Volt - suggested to set to 100% of rated motor voltage

    If the lab01c or lab01b can't run the motor, that means something is wrong on the motor or hardware kit.

    #define USER_ADC_FULL_SCALE_CURRENT_A        (55.0)

    It seems like the maximum current of the inverter you used is too high for this motor, the current sensing resolution could be not enough to run/identify the motor well. If possible, you might try to improve the phase current sampling resolution by changing the current sensing circuit on the inverter board.

    It's better to increase the shunt resistor to make the USER_ADC_FULL_SCALE_CURRENT_A to 6~9A since the load current of this motor is only 1.5A.

    BTW, it's better to set USER_IQ_FULL_SCALE_FREQ_Hz to 200Hz since the maximum speed is 1025rpm and pole pairs is 11.

  • Hi Yanming, thanks for the input, running lab01c just confirmed my theory on the motor being damaged. Since I have other motors working and this one returns different BEMF per phase I will assume problem with the motor.