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 ID problem

Other Parts Discussed in Thread: MOTORWARE

Hi,

I'm still using motorware 11, and I cant get this motor to work. I'm using a 6 pole brushless motor with a KV rating of 4606. I can get the motor to turn, but the movement is erratic, something clearly isn't right. I have a 16V supply voltage, and a 8 A current limit.

It's the third time I'm using the software to ID the motor and the first two times it worked like a charm, but this one I just cant figure out.

Below are my user.h values - and yes I have used the spreadsheet provided by Chris, bit I cant get it right. Any help would be greatly appreciated.

#define USER_IQ_FULL_SCALE_FREQ_Hz        (760)

#define USER_IQ_FULL_SCALE_VOLTAGE_V      (56.1)

#define USER_ADC_FULL_SCALE_VOLTAGE_V       (26.314)

#define USER_IQ_FULL_SCALE_CURRENT_A         (18)

#define USER_ADC_FULL_SCALE_CURRENT_A        (33.0)

#define   I_A_offset    (0.943125010)
#define   I_B_offset    (0.940345228)
#define   I_C_offset    (0.930290639)

#define   V_A_offset    (0.146946788)
#define   V_B_offset    (0.145712852)
#define   V_C_offset    (0.146318614)

#define USER_SYSTEM_FREQ_MHz             (60.0)

#define USER_PWM_FREQ_kHz                (40)

#define USER_VOLTAGE_FILTER_POLE_Hz  (364.682)

#define USER_MOTOR_TYPE                 MOTOR_Type_Pm
#define USER_MOTOR_NUM_POLE_PAIRS       (3)
#define USER_MOTOR_Rr                   (NULL)
#define USER_MOTOR_Rs                   (0.040614090859889984)
#define USER_MOTOR_Ls_d                 (0.0035223709419369698)
#define USER_MOTOR_Ls_q                 (0.0035223709419369698)
#define USER_MOTOR_RATED_FLUX           (0.023964466527104378)
#define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
#define USER_MOTOR_RES_EST_CURRENT      (2.0)
#define USER_MOTOR_IND_EST_CURRENT      (-2.0)
#define USER_MOTOR_MAX_CURRENT          (7.0)
#define USER_MOTOR_FLUX_EST_FREQ_Hz     (150.0)

  • some thoughts.

    you may want to read some of this thread (we start talking about high KV motors on page 2):  http://e2e.ti.com/support/microcontrollers/c2000/f/902/t/329471.aspx?pi303962=2

    For your motor:

    • 4600 KV is a really tough motor. At 16 V that is 73,600 RPM, which is 3680 Hz with 6 poles.  This is really pushing the limit of what you can do with closed loop control.  I'm not confident that it can be done with InstaSPIN-FOC.  And I'm positive it can't be done on the 60 & 90 MHz devices we offer InstaSPIN-FOC on today. 
    • Just general control theory says you need to sample at least 7x the maximum speed, so that's over 25 KHz current control required.  And for FAST it needs to be 8x the maximum frequency, so now you are looking at 30 KHz.
    • The Ls values of these motors are just ridiculous, single uH.  The currents become extremely challenging to control. The 40 KHz PWM is not enough. 
    • Your Ls values are certainly incorrect. You can check that just by R / L =  11.6 Hz.  Ummm, no. You will likely have an R/L of at least 7 kHz.   That will put you rLs in the 6uH range, which is pretty typical of what I've seen. This would then get an Isc = 626A, which is also about what I've seen.
    • Go ahead and put in 6uH for your Ls, PWM at 75 kHz, /3 for PWM, and run your current and estimator at 25 kHz (If you have an F28069M controlCARD...you can't hit these rates with 60 MHz F28207F).  This is about as good as you will get, and you will still have issues.

    What are the two motors that you had success with already?

     

  • Chris, thank you for the reply.

    The first two motors I tested were 12 pole, 12V hobby motors for helicopters,  I ran the ID once, input the values and it worked like a charm. I made a I2C protocol so I can control several motors at the same time from one microcontroler.

    I tried to raise the PWM to 75 kHZ, but when I do that the system stops responding, I cant even make an ID, unless I lower it to 65 kHz, but even then the motor wont move???

    What did you mean by "/3 for PWM"

    I intent to use the motor in the range of 0 - 10 000 RPM - this motor is a part of an underwater thruster I purchased.

    I read the post you recommended, the last part was most interesting - do you think it would make a difference if I raise the input voltage?

  • Oh damn - I mistyped the motor kv :)

    It is 1606, not 4606. I apologize.

  • are you using proj_lab02c for ID? You must for high speed motors.

    Please upload your user.h you are using

     

  • No, Im using project 5b for that, will switch right away. Below I attach my user.h file.

    2055.user.h

    Thank you.

  • You can just leave this at (800.0) default.  Although with your 1KV motor I think you still go over this value, so something like (1000.0) is better.

    #define USER_IQ_FULL_SCALE_FREQ_Hz        (760)

     

    for ID purposes, set this to the bus voltage

    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (56.1)

    only after you ID the flux will you raise this to a level > max_Hz * flux_VpHz

     

    Just go back to

    #define USER_PWM_FREQ_kHz                (45.0)

    #define USER_NUM_CTRL_TICKS_PER_SPEED_TICK  (15)

    #define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK   (15)

     

     

    change this to (20.0) so you can reach the 150 Hz before the state times out

    #define USER_MAX_ACCEL_EST_Hzps           (5.0) 

     

    Your motor should ID with proj_lab2c

     

  • I made the motor ID with the proj_lab2c, and here is what I get,

    I set the #define USER_IQ_FULL_SCALE_FREQ_Hz        (1000)

    #define USER_MOTOR_TYPE                 MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS       (3)
    #define USER_MOTOR_Rr                   (NULL)
    #define USER_MOTOR_Rs                   (0.04006115347146988)
    #define USER_MOTOR_Ls_d                 (0.0006506411591544747)
    #define USER_MOTOR_Ls_q                 (0.0006506411591544747)
    #define USER_MOTOR_RATED_FLUX           (0.007111110724508762)
    #define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
    #define USER_MOTOR_RES_EST_CURRENT      (2.0)
    #define USER_MOTOR_IND_EST_CURRENT      (-2.0)
    #define USER_MOTOR_MAX_CURRENT          (7.0)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (150.0)

    My updated user.h looks like this:

    1462.user.h

    Then I compiled the proj_lab5b, and run the motor - it doesn't run smoothly, it stacks, the direction turns randomly?

  • your ID'd parameters are not correct. you can check your R / L, this should always be > IQ_FREQUENCY.  Your is 6.15, so not close.  It's likely that the Rs is correct (close enough) so that means your Ls is quite a bit off.  To support > 700 Hz your Ls should be < 56uH.

    1. first check your compiler, make sure it is 6.2.3+

    right click on project --> Properties --> compiler version

    When motor ID is occuring

    1. Make sure motor starts spinning during RampUp and continues throughout rest of process until RampDown / Motor Identified.

    2. Make sure that your Estimated Speed at end of RampUp has met your goal speed (reduce yoru 150.0 to 70.0; 10% of rated speed; 70 Hz = 1400 RPM for your 6 pole motor)

    please try 2c again.

     

     

  • OK - Im using the 6.2.3. version of the compiler on motorware 11 project files. For ID i use proj 2c and after imputing the motor values I use 5b.

    When the motor ID is running I can hear the motor making some nose but it is not turning properly (stacking motion) ?

    I noticed that during the ID the Estimated Speed reached a value of about 40?????? and during the LS  has negative values from -5 to -5000?

    Here are the values for the last run - the motor starts spinning but I cant control the speed at all.

    0003.user.h

  • Try increasing this in 0.5A increments until the motor starts spinning at EST_STATE RampUp

    USER_MOTOR_RES_EST_CURRENT      (2.0)

    You may also give the motor a little spin by hand to help it overcome the starting cogging torque. I do this often with outrunner hobby motors.

     

    Until you get  a successful ID it is pointless to try to run the motor under control. It will always fail if the parameters are wildly incorrect.

     

  • wow - the little push did it :) GREAT, thank you Chris.

    Now only two problems still persist:

    1)  every time the motor starts I must give it a little push

    2) when I set the RPM to 7000 it just jumps to 1000 RPM, and then I have to shut down the program if I want to slow down the motor. This happens when the motor reaches about 6200 RPM.

    The values of user.h

    #elif (USER_MOTOR == My_Motor)
    #define USER_MOTOR_TYPE                 MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS       (3)
    #define USER_MOTOR_Rr                   (NULL)
    #define USER_MOTOR_Rs                   (0.042805593460798264)
    #define USER_MOTOR_Ls_d                 (0.00000033848994007712463)
    #define USER_MOTOR_Ls_q                 (0.00000033848994007712463)
    #define USER_MOTOR_RATED_FLUX           (0.0071977186016738415)
    #define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
    #define USER_MOTOR_RES_EST_CURRENT      (6.0)
    #define USER_MOTOR_IND_EST_CURRENT      (-2.0)
    #define USER_MOTOR_MAX_CURRENT          (7.0)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (70.0)

  • Your Ls is much too low. You should never use less than single uH. I'm surprised that you aren't able to ID this easier with lab2c.

    in user.h

    lower this to your bus voltage, which I assume is 24V max and maybe much less?

    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (42)

    right now your miminum flux is 42 / 15 Khz / 0.7 = 0.004.  That should be low enough as it looks like you ID'd 0.007 V/Hz....but still better to lower the value.

    if you want you can try just setting a value of 0.000050 for your Ls, it should work very well for this motor....then you can look at ID later.

     

  • Yes this one is giving me alot of trouble. I set the Ls to 0.000050, and the motor run OK, but only after I give it a little push at the beginning.  And the problem with the RPM persists, after it reaches 6300 RPM it jumps to 10 000 RPM, and stops responding.

    Do you think it would make a difference if I used a 24V power supply?

  • I don't think the 24V will help, no.

    try running 5a in Torque mode and see how much IqRef_A is required to start-up the motor.

    Part of the issue may just be the speed loop tuning. 

  • I run the 5a, and got the IqRef_A of 13, and then the motor starts to spin, how do I implenet this into the user.h?

    Yes the speed tuning nay be the issue - I tried several things today, but I noticed that if I change the Kp (inside the GUI application, on the RIGHT SIDE) to 0.3, the motor will start turning, but then I have to set it back to 0.0127.

    I dont know why there are 2 different Kp and Ki values?

    I also set the Ls to 0.03uH.

    The biggest problem for me is still the RPM jump and the consequent unresponsiveness?

  • You had to set 13A to get the motor to start up?  That's unusual....

    In the GUI, the Kp/Ki on the right side (or on the bottom depending on which GUI) are for the current controllers. This tuning is pre-set based on current loop frequency, R, and L.  There is a set for Id and Iq in one of the GUIs....in the other GUI (Universal) it is combined into one, the same values are set to the individual PI controllers).

    How does the RPM behave in Torque mode?

    - After you get the motor to start spinning (with 13A?), Disable ForceAngle and reduce the IqRef_A as low as you can where it doesn't come to a complete stop.

    - then increase IqRef_A by 0.5A steps and make a plot of the effective speed from lowest to highest.

    do you still get an RPM jump?  How is the current on your power supply? Stable or wildly varrying? Is the motor heating up?

     

  • I know - this is really strange ...

    I compiled the proj_lab05a and run the GUI. I enabled the  "Enable system", "user h. params" and "run" and I set the Iq_ref to 13A, and the motor starts to spin at about 10 000 RPM. I cant control the speed at all, it only stops when i disable the "run"

    If I use lab05b, then the current is relatively stable (the analog display is moving slightley, but deffinatley less than 0.5 A). Im using this power supply: http://www.conrad.com/ce/en/product/511492/VOLTCRAFT-EP-925-375W-Single-Output-Variable-DC-Power-Supply-Linear-Bench-3-15Vdc-25A

    The motor heats up somewhat, nothing special. The BOOSTXL-DRV8301on the other hand gets quite warm.

  • once you are running at 10 KRPM with 5a, reduce the IqRef_A to 0.0A. It will stop the motor....what is the mimimum you can reduce it to to keep the motor spinning?

    1.0A = ___ RPM

    0.5 A = ____ RPM

    0.2 A = _____ RPM

    5b requires you to tune the speed controller. The Kp and Ki will be much too high by default.  Lower them by a factor of  / 10....but prefer you stay with 5a and let's see what we can figure out.

  • Even if I set the IqRef_A to 0.0A the motor still spins at 10 KRPM, the only way I can get it to stop is by turning off the "run"

  • Now that doesn't make much sense...let's Re look at your motor parameters. I'll get back to this tomorrow.

  • Ok, thank you for your help.

  • Rok,

    Sorry, this one slid off the first page and I forgot about it.

    Can you please upload the latest user.h you are using and remind me what bus voltage you are using, etc.  If you filled out the .xls spreadsheet it is helpful to attach that as well.

     

  • Chris, no problem.

    I'm attaching the newest user.h - I switched to a 24V power supply, so I changed it a but. The now power supply resolved the PRM "jump" bug, so it is not an issue anymore. I also updated to motorware 12, and as I did that the motor ID through proj2c starts acting wired. I got extremely low Ls values (2,5e-7), so I discarded them, and used the previous values.

    The motor doesnt start alone, it still needs a gentle push. Do you think that adding induction coils to each of the three phase wires would help solve this problem? I was thinking of 22uh, 18A inductors?

  • Regarding adding inductance, generally YES this usually makes things better.

    As I've mentioned on this forum (and some e2e blogs), these little motors are designed "incorrectly" based on not knowing about a solution like FAST.  The crazy R/L and ultra large Isc values are not a benefit, they bring nothing good to the solution.

    If you were designing a motor to be used with FAST you would want

    Isc = ~3x the rated current = Flux_vph / 2*Pi / Ls

    RoverL > maximum frequency.

    But using your user.h (assuming 10A is your max rated current) we see something else:
    Isc = 0.007 / 2pi / 0.00003  = 37 A
    This actually looks pretty reasonable...because you have such a small flux value it requies an Ls of <90uH to generate enough current.

    And your Rs / Ls is quite reasonable at 1333 Hz if you only plan to run at 1000 Hz.

    I'd say this motor is pretty well designed....are these the parameters of your motor?

     

    The values of Rs and Flux are very similar to a Traxxas hobby motor I'm familiar with...except the Traxxas ID's with 1.7uH of inductance, throwing everything into chaos.  Adding 20uH to this Traxxas motor makes things behave much better.

     

    But in your case, this motor should behave quite nicely if it is indeed ID'd correctly:
    #elif (USER_MOTOR == My_Motor)
    #define USER_MOTOR_TYPE                 MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS       (3)
    #define USER_MOTOR_Rr                   (NULL)
    #define USER_MOTOR_Rs                   (0.042805593460798264)
    #define USER_MOTOR_Ls_d                 (0.000030)
    #define USER_MOTOR_Ls_q                 (0.000030)
    #define USER_MOTOR_RATED_FLUX           (0.007220587693154812)
    #define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
    #define USER_MOTOR_RES_EST_CURRENT      (4.0)
    #define USER_MOTOR_IND_EST_CURRENT      (-2.5)
    #define USER_MOTOR_MAX_CURRENT          (10.0)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (100.0)