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.

New motor, new kit, new problems.

Other Parts Discussed in Thread: DRV8301, BOOSTXL-DRV8301, MOTORWARE, DRV8312, DRV8301-69M-KIT

Hi Chris,

I have upgraded to the DRV8301-69M kit and I have changed motors to a much higher speed, lower inductance motor.

I ran the new kit with the old motor using the same user.h and all worked well.  I tried to characterize the new motor on the new kit and it won't characterize.  I'm assuming I need to fix the user.h parameters but I'm not sure what to set the parameters to.  Using lab02 the motor would spin fine on the initial identify run but would not spin on the second identify run. 

My new motor has 7.5 mohms resistance from phase to neutral and 13 uH inductance from phase to neutral.  I also tried to put these values in and run lab03a but the motor wouldn't spin at all.  This motor can take up to 40 amps under load and spins almost 50,000 RPM under no load.

  • what is the bus voltage?

    if it's low this is going to be an issue with the hardware....I struggle with very low flux motors on the DRV8301 EVM, typicaly have to use the BOOSTXL-DRV8301 to get better voltage scaling and a bit better curent waveforms during ID. 

    did you use the spreadsheet to get your variables in best shape?

    These super low flux, super high short circuit motors are really tough...I'm not totally convinced that when the inductance gets this low that a sensorless FOC low-side current shunt approach is going to be the best solution.

  • Richard,

    One thing we have noticed recently is that for these types of motors with the DRV8301 EVM, it may actually help to limit the PWM frequency to 15 or 20 KHz. 

    #1. set-up ADC scaling as best as possible (HW re-work required if using low bus voltage and want best results).

    #2. set-up IQ scaling and other variables for best results (use spreadsheet)

    #3. try setting the PWM to 15 KHz (use the other ticks to get effective 15 KHz control and 15 KHz estimator, 1 KHz speed/Trajc)

    #4. use proj_lab02c for motor ID.

     

  • Hi Chris,

    Sorry for the late reply.  I was out of town yesterday.  Anyway, I have looked multiple times and I can't find the spreadsheet.  In your post you say it will be near the end of the thread but I didn't see it in later posts in that thread either.  I gave up thinking you removed it after the last update of motorware.  I'll look again.

    Thanks,

    Oh yeah, bus voltage is 28V.

  • Richard,

    It's here

    http://e2e.ti.com/support/microcontrollers/c2000/f/902/p/319433/1163043.aspx#1163043

     

    Use this, update your user.h, and try to ID with proj_lab02c again. Then upload both the spreadsheet and the user.h and I'll take a look.

    How much current can your 28V supply source?  This motor likely takes a very large peak starting current.

     

  • Hi Chris,

    So far, this is what worked.  Both the Rs and Ls are about 2x what they should be but at least it runs.  Also, my speed is 7500 RPM when set to 5000 RPM.

    Before I changed the user.h the code would accurately calculate Rs to 7.3 ohms but would shut off (changed enable and ID to 0) before it could calculate Ls.  I tried 30KHz PWM and it ran best (better than 45KHz or 15KHz) but still did not calculate Ls.  When I plugged in the calculated RATED_FLUX (0.002667 V/Hz) it calculated my Ls and Rs to about 2x and my speed is off by 50% (7500 vs 5000).

    6404.motorware_selecting_user_variables_v2p0 - 3096.xlsx

    22841.user.h 

  • Richard,

    Your user.h is set-up well.

    The problem with ID is that you are trying to ID 0.002 V / Hz (so at 150 Hz rated flux frequency you are looking for 0.3V) out of 66V ADC scaling, or 0.4%.  This is 18 counts of a 12-bit / 4096 count ADC

    Even if you rescaled the hardware to 22V, you only increase these values by 3x, so 1.2% and 56 counts.  This is slighly more feasible, but it will still be tough.

    Most motors have a flux value that limits the top end speed (you actually have to use field weakening to reduce the Bemf / flux to go faster).  Ex: a 0.034 V/Hz motor (the low voltage BLDC) will be limited with 24V to 24 V / 0.034 V/Hz = 685 Hz (10.2 KRPM, 8 poles) and we can demonstrate this with the standard BLDC motor we put in our DRV8312 kit.

    You'll notice with your motor that even at 2 KHz you are producing just over 4V of Bemf....MUCH less than the 28Vbus you are using. 

    Essentially, these ultra highspeed motors are designed with almost no magnetic material (for cost)....just enough to create an attraction....and then they produce torque almost strictly through increased current capability.

    Torque  = Flux * Current * PolePairs * 1.5

    I think if you updated the BOOSTXL-DRV8301 to scale off of 8V, you could ID these motors well enough. But once you moved to a larger voltage scale to run the motor you lose so much resolution that the control would be still be challenging.

    FAST is a flux based observer...and these motors have almost no flux.

    Not to say it can't be done...we are controlling 9mV/Hz well enough...but you get down to 4mV/Hz (the 4KV motor I have) and 2mV/Hz (your motor) it gets tougher, especially with the increased bus voltage / voltage scaling you are using.

     

  • Hold on,

    RATED_FLUX (0.002667 V/Hz)

    You copied this FROM the spreadsheet?  B17 is NOT a calculated value, it is a value YOU enter after completing motor ID.

     

    Let's ignore my last post for a moment and just do a reboot on trying motor ID.

    With the user.h you have, please run proj_lab02c and post what happens during the ID states.

    RoverL = post the controller_obj.RoverL value identified
    Rs = post the Rs_ohm value
    RampUp = Does the motor start and keep spinning? What Speed_krpm is reached?
    RatedFlux = what Flux value is ID'd
    Ls = what Ls value is ID'd

     

     

  • Hi Chris,

    RATED_FLUX (0.002667 V/Hz)

    You copied this FROM the spreadsheet?  

    No. 

    B17 is NOT a calculated value, it is a value YOU enter after completing motor ID.

    Correct.  I got the number from gMotorVars.Flux_VpHz.  I forgot where I was instructed to put that in.  I think it was because of the result of one of the calculations in the spreadsheet said to put this value in.  Anyway, here is the result of the ID.  I don't see RoverL listed in watch window.  Yes it did keep running (but it doesn't keep running all the time, I have to make sure it calculates a reasonable Rs, Ls and keeps running).  The speed is 1.5x command.

  • ok, my previous long post regarding the small flux still applies.

    the speed is off because you are commanding such a low speed and the speed loop isn't tuned....the speed loop default tuning is especially bad for these high speed motors.

    go to proj_lab5b and run this motor at 1.0 KRPM

    at lower speed you will need to dramatically increase the Spd.Kp and Ki gains, try multipling by 10x as a starting point. At higher speeds these gains will have to be decreased significantly (or use InstaSPIN-MOTION with single tunign parameter that works across whole operating range).

    but you will certainly not be able to run significanlty under 1 KRPM with this type of motor and super low flux.  That's not what the motor was built for.  It was built to run REALLY fast.

     

  • Hi Chris,

    I went to lab5b but couldn't make the motor spin at any speed (I only went up to 5Krpm).  Things are very unstable and I almost smoked the controller MOSFETs (need marshmallows).  Anyway, I then went to lab5a thinking I might need to set the current Ki and Kp first but no spin there either.  Finally, I went back to lab3a and the motor won't spin there either.

    I'm thinking of setting this motor aside (it was chosen because we actually have a known fan load for this one so we can do lab5b) and finding another motor that isn't so hot.  We're a motor company so we've got lots of 28V motors.

    If you have any experts near Wichita it would be great if they could stop in some day and help us with this motor.

    Can I move on to the motion labs without successfully completing the lab5's?  If so, I'll put my other motor back on and do some motion experiments.

    Thanks,

  • Richard,

    I'd put aside the 4KV motor...I just don't think a flux based observer (FAST) and even any sort of FOC algorithm is really appropriate.  Perhaps if you added external inductors to get it up to 20-50uH you could make things work out ok.

    Yes, you can move on to 5c+ as long as you have complete labs 2 and 3 and feel good about the motor parameters. Usually running 5a to prove the torque control is functioning is enough.

     

  • Thanks Chris.  That sounds like a plan.  I'll either move on with another motor or try a 3 phase choke and see if I can get the inductance up.  Thanks for all your help on this one.

  • Hi Chris,

    I put some external inductors on the motor and now have 280uH in each leg.  I tried to ID the motor using lab02c and then lab02b.  Each time the motor ran smooth during the resistance calculation but the program stopped before it could calculate the inductance.

    I might be beating a dead horse but I thought I'd try to give this motor one more college try.  It is the only one I have a decent load for.

  • That should work no problem. Post the user.h you are using. 

    Vbus? Current capability of power supply?

  • VBus 28V

    I can get 20 amps out of this supply but I've got it set for 10 now.  If I need more, I have it downstairs. 

    Here is the user.h.

    4762.user.h

  • for your active motor you still are using

    #define USER_MOTOR_Ls_d                 (0.000013)

    If you add external inductance you need to re-ID the motor....our algorithms don't care where the inductance is located (in the motor or out) but it has to be accounted for.

     

    I think I'll try to add some inductors (maybe just 20uH) to my 4KV motor to see how it behaves also...good idea for a training video.

     

  • With the above user.h, the motor spins nicely during the resistance test but spazzes out during the inductance test.  The best results I've seen so far is a reasonable Rs and Ls in the E-10 range.  Usually it won't even calculate Ls. 

    I did have to change USER_VOLTAGE_FILTER_POLE_Hz (375) to get past an error.  It was the default but the program didn't like it.

  • Richard Shank said:
    I did have to change USER_VOLTAGE_FILTER_POLE_Hz (375) to get past an error.

    What error? You should NOT change this value (unless you are "tuning" this value as I have described).

    The error should inform you to change a different value.

    Let's fix this error first, then as you start ID please look at controller_obj   RoverL variable and let me know what it says. 

  • Hi Chris,

    Sorry for the delay.  We lost all internet access up here.  Anyway, this is the error I ran into.  See second item down.  If there is a UserErrorCode, I can't even set the enablesys flag.

    Also, where do I find RoverL.  I've got a couple but I want to make sure I get the right one.

  • Richard,

    Let's debug this together. You can check the Error Code logic that caused this in

    C:\ti\motorware\motorware_1_01_00_12\sw\solutions\instaspin_foc\src\user.c

    there is only one:

      if(USER_VOLTAGE_FILTER_POLE_Hz < (USER_IQ_FULL_SCALE_FREQ_Hz / 4.0))
        {
          USER_setErrorCode(pUserParams, USER_ErrorCode_voltageFilterPole_Hz_Low);
        }

    I agree that the error code is reversed from logical thinking...it should tell you that your FULL_SCALE_FREQ is too high, as that is the thing you can change (the FILTER POLE is fixed from hardware design).

    That means that

    USER_VOLTAGE_FILTER_POLE_Hz  (364.682)

    sets a maximum value of

    4 * 364 = 1456

    so you need to change

    #define USER_IQ_FULL_SCALE_FREQ_Hz        (1495.0)

    to

    #define USER_IQ_FULL_SCALE_FREQ_Hz        (1450.0)

    With your motor, USER_MOTOR_NUM_POLE_PAIRS       (2)

    that is 43,500 RPM for full scale.

    However, as noted in the Spreadsheet, this per unit scaliing (1.0 pu = 43,5000 RPM in this case) is allowed in InstaSPIN-FOC to go up to almost 2.0, so nearly 87 KRPM.

    Which is right on the edge of what you could expect from a 4 KV motor @ 20V.

     

    Also, I noticed that the user.h you posted is from a BOOSTXL-DRV8301....I thought you moved to the DRV8301 EVM?

     

  • Let's debug this together.

    Agreed.  I need to wean myself to be self-teaching.

     the user.h you posted is from a BOOSTXL-DRV8301....I thought you moved to the DRV8301 EVM?

    Oops!  I think I was just sending you the user.h from the wrong directory.  Here is my DRV8301 user.h.

    4118.user.h

  • for the DRV8301-69M-KIT use the user.h at

    C:\ti\motorware\motorware_1_01_00_12\sw\solutions\instaspin_foc\boards\drv8301kit_revD\f28x\f2806xF\src

    and import the projects from

    C:\ti\motorware\motorware_1_01_00_12\sw\solutions\instaspin_foc\boards\drv8301kit_revD\f28x\f2806xF\projects\ccs5

     

  • Hi Chris,

    I think that is what I actually did.  I had an explorer window open to the old user.h from the other kit and I was sending you the wrong one.  I sent you the correct one in my post above.  You apparently read it before I edited it.

    Thanks,

  • I see now.

    My comments above are still accurate

    and

    4118.user.h

    still has HW settings of BOOSTXL-DRV8301.  It is not set-up correctly for DRV8301 RevD EVM.

     

  • Thanks Chris.  I'll try to correct this.  I thought for sure I removed all the projects and pointed to the DRV8301 and the 2806x vs the 2802x.  I'll try again and get back to you.

    Because the question that started this thread really has been answered, I'll start a new one when I get as far as I can through the steps of the DRV8301 project.

  • OK, I'll change threads as soon as I figure out why my DRV8301\2806x directory has the wrong user.h.  Please see a screen shot of where I got the user.h.

    4353.user.h

  • you must have copied it over?

    here is the one from my folder....it's not a fresh version as I use it myself all the time...

     

    user.h
  • I think you're right because I had settings for the first motor I wanted to keep.  I took the user.h you just gave me and put all the defaults back and added my motor.  I'll try this again and see if it makes more sense.

    4201.user.h