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.

InstaSpin FOC DRV8312 Not working and Identification data not repeatable

Other Parts Discussed in Thread: DRV8312, MOTORWARE, DRV8301, BOOSTXL-DRV8301, INSTASPIN-BLDC, CCSTUDIO, CONTROLSUITE, TMDSCNCD28069ISO, TMDSCNCD28035ISO

We are attempting to run InstaSpin FOC with a Piccolo F28069 card on a DRV8312 Rev D board.  The supplied motor works correctly.  The test setup is Win7, CCS 5.5, MotorWare 1.0.11 and Piccolo compiler version 6.2.4 as recommended in this forum.

We are trying to get a prototype, ironless, high-speed motor going.  It works just fine with hobby ESCs.  Both the GUI and the labs have the same characteristics with the new motor.  They seem happy identifying the motor (including spinning it at a few hundred rpm during identification) but will not run it at all in the next step of either the GUI or the lab.  The identification process also comes up with numbers that can be an order of magnitude different from run to run.


The numbers they it comes up with in either the GUI or the labs are similar and random:

Rs  .11  (That is about right.  I have sen it come up with everything from 8e-6 to 5 ohms)

Ld    Who knows?  It has come up with anything from 4.9e-10 to .0006

Lq    Who knows?  It has come up with anything 4.9e-10 to .0006

Flux .118 is most common though it has gotten as low as .035

I am at a loss as to how to proceed and would greatly appreciate your help.

Thank you,
Norm Dawley

  • Hello, Norm.

    You have yourself a low inductance motor, probably high speed, yes?

    These are a bit tougher to identify the Ls values (and most high speed motors also have low flux which makes them tough to ID also).  But don't fear, we can ID and run motors with ultra low Ls (2.5 uH) and ultra low flux (0.002 V/Hz).  It just takes some special SW settings and sometimes HW settings.

     You can NOT use the GUI to ID.  It has fixed software scaling which has to be changed   You MUST use MotorWare projects.  I will start you with proj_lab02b, but that will likely fail as well.  We have created a new project that changes some of the speed/current controllers during ID and resets some limits, we call this proj_lab02c.  Unfortunately we only put this project in MotorWare for the DRV8301 based hardware because most of these low inductance motors have much higher currents than would be used with DRV8312....so that is a question for you. What is the maximum current rating of the motor under full load?

    Short circuit current is defined as the Flux V/Hz / 2*pi / Ls.  Considering your Flux may be quite large this suggests that you have a motor with very high short circuit current. This means it will have high current ripple. Which means that the DRV8312 MAY not be the right inverter platform to use.

    So let's first discuss that...what do you know about your motor?

    Once we get you on the correct inverter we must discuss some limitations of the inverter.
    1. What is your bus voltage?  If you are using a low voltage motor, say <14V, you are giving away a tremendous amount of resolution on the DRV8312 and DRV8301 EVMs that are scaled to over 66V.  Especially with low flux motors you must re-scale the HW to get best performance and accurate ID.  It is one of the reasons we built the BOOSTXL-DRV8301 inverter, scaled for 6-24V motors up to 10A.

    2. We must set-up the scaling values in user.h correctly. Here is a post with a spreadsheet that shouls be used

    http://e2e.ti.com/support/microcontrollers/c2000/f/902/t/319433.aspx

    Note that low inducatnce motors typicaly need higher PWM, so I like to use 45 KHz with the /3 option and run at 15 KHz control/estimator initialy.  To decrease current ripple even further you have to increase yoru PWM rate higher. Do NOT do this for ID....we can talk about that later.  45 KHz / 15 KHz should get us started.

     

    You are not the first one to struggle with these motors. They are very chalenging and our defalut configuratoin of things does not support these type of motors...but we CAN get it to work!

     

  • Chris,

    Thank you for the quick reply.


    About the motor:  It is intended to be very high speed, 100,000 rpm with this general platform.  We are in pursuit of extreme efficiency also.  The eventual input voltage will be 100 to 400 volts and a power rating in the 2 kilowatt range. 

    However for safety, our intent is to run this set of tests at 30,000 rpm.  Somewhat randomly we choose 30 volts and 5 amps which fits into the DRV3812's parameters.  That is plenty of power as this phase is spin testing.   We could easily step up to 60 volts if that is better..  As I have said it is ironless in the stator areas. But through the use of very large magnets there is 1Tesla in the airgap.  The current winding is 12 turns per coil.  I am coming from the mechanical and non-embedded software side of the world so do really understand what "Short circuit current is defined as the Flux V/Hz / 2*pi / Ls" means in this world.

    We have also been trying a Stellaris LM3S card on the DRV8312.  We find the InstaSpin code there easier to grasp and have written a small start up and driver module which hands running over to an instance of InstaSpin.  It also exposes the parameters we think we need.  It works at up to about 3000 rpm (It takes about 500 mils @ 30 V to run it at 3000 rpm.) and then the inverter board red lights and it all drops out of sync for reasons we do not yet understand.  Attached are some graphs when it is running perfectly and when it fails by increasing the PWM% by 1 more %.

    Our product will be expensive and the cost of a set of Hall sensors not significant.  Can we save engineering and debugging time and have a more rugged system if we add Halls and go sensored?

    Thank you,
    Norm Dawley

     

     

    2-13-14 Proto4 Instaspin Graph of Problem.rtf
  • Norm,

    Is this a 2 pole machine?  100 krpm with 2 poles = 1666 Hz.  Just want to understand what we are dealing with.

    2 kW motor @ 100-400V bus...means 5-20A. So this is a 20A capable motor?  This is potentially too high to use with the DRV8312 kit (start-up currents may be too large). You should use the DRV8301-69M-KIT. 

    You mention running InstaSPIN-BLDC with the LM3S card...just to be sure,  the motor spins up with this solution on DRV8312 board to about 3000 RPM before it faults, correct?  If this is the case we should be able to use DRV8312 for InstaSPIN-FOC as well....although with only 24V bus I'm not sure the Motor ID will be precise enough if this is a 400V motor.  I've done it before with standard large Bemf motors, but it sounds like you have an unusual motor.... 

    A 1 Tesla = 1 Wb = 6.28 V/Hz.
    So at 3000 RPM, if this is a 2 pole machine, that is 50 Hz which means you are generating 314 V of Bemf!!!

    This is impossible.

    You mentioned you are measuring more like 0.12 V/Hz at some point in the ID process.  That is more likely. This would give you 200V of Bemf at 1666 Hz and 6V of Bemf at 50 Hz (which is no problem).  This means you are limited to about 200 Hz (12 krpm 2 poles) before your Bemf swamps your 24V Vbus.

     

     Halls will be extrememly challenging at the speeds you want to run. As long as you can handle some possible roll-back / reversing (1/2 a revolution) at start-up InstaSPIN-FOC is the best solution for you.

     

    Does this happen to be a CORE motor?

     

    If you remain stuck we could potentially get on a webex or you can send me the motor and I'll get it running.

     

  • Chris,

    It is a 2 pole, outrunne,r axial machine, not a CORE motor.  I see that I was somewhat confusing in giving you the ultimate design point numbers and also the current instance.


    What we have in hand is a version wound for much lower voltage than the ultimate machine.  The 1T number comes from a reasonably good gauss meter probing the air gap.  When it coasts down from the Stellaris tests we get 8.3 V @ 60 Hz.  (Obviously still way too many turns for 30 kRPM @ 30V).  The bench power supply we are using has two outputs which you can supposedly put in series giving a max of 60 V @ 10 amps.  We should be able to dial that back to the 55 V  and 6 amps that the DRV8312 can handle.  The motor is certainly capable of handling the 5 -20 amps needed.  So far the DRV8312 red lights if it even gets close to 1 amp (why?).  Though the acceleration needs to be quite slow, we were getting the 3600 rpm with a total DC draw of .61 amps (the board seems to take .13 when not running anything, so the motor is using < 500 mils).  The model airplane ESC delivers much more current and speed but I have killed several:-(

    What parameters should we use for an InstaSpin FOC test, at say 50 V?  We are ready to give it a whirl this afternoon.

    Roll-back on start up is not a problem. 

    I am obviously a newbie at this, but why would the Halls have trouble at 1 or 2 kHz?  Their data sheets say that switching rates of 10 kHz are OK. 

    We really appreciate your help,

    Norm

  • Norm,

    Are you ready to use a MotorWare project and CCStudio? You can't use the GUI.

    I've attached a user.h that should work initially for you to try to run proj_lab2a. 

    Place it here:

    C:\ti\motorware\motorware_1_01_00_11\sw\solutions\instaspin_foc\boards\drv8312kit_revD\f28x\f2806xF\src\

    I would use a bus voltage of 40V and limit your supply to 6A.

    Follow the instructions from here

    C:\ti\motorware\motorware_1_01_00_11\docs\labs\instaspin_labs.pdf

     

    I'm at a customer this afternoon, so we can discuss more next week.

     

    As I mentioned, we may need to port proj_lab2c over to the DRV8312 kit to run the motor ID for high speed / low inductance motors, if that is indeed what you have.  To do that simply copy this folder

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

    to

    C:\ti\motorware\motorware_1_01_00_11\sw\solutions\instaspin_foc\boards\drv8312kit_revD\f28x\f2806xF\projects\ccs5

    and then edit these files with a text editor

    .project
    .cproject

    to find/replace drv8301 with drv831

    save, then import for DRV8312 project and follow the instructions for proj_lab02c

     

    user.h
  • Chris,

    Many thanks for the very quick reply.  We will try it as you direct and let you know how it goes.

    Hope you have a very pleasant weekend,

    Norm

  • Chris,


    We have tried it as you suggested.  The result of Lab 2a with your user.h is about the same as we had before:

    Rs     0.157
    Lsd    0.0262
    Lsq     0.0262
    Flux   0.159
    The motor spins nicely during identification never to move again.  Bizarrely, after the initial identification, when I turned identify on again and it re did Rs, it got 8.87e-7.

    Moving on to Lab2c.  It compiles after you remove the reference to gate.c which does not seem to exist for the DRV8312.  It then appears to be running correctly.  Below is some data from the runs.

    I think the actual values for this motor are are:
    Rs = .13 Ohms for one coil;
    Inductance of one winding ~46uH (though as they are never driven singly and overlap I really do not know what you need to have)
    Flux V/Hz = .14 from several tests while coasting down after Stellaris runs.

    2/15/2014 Tests InstaSpin FOC Lab 2a with Chris Clearman user.h

    Run1 @ 20V

     

    Run 2 @ 40V

     

     

    Identify

    test set Run_Ident 1

    Identify

    test set Run_Ident 1

    gMotorVars.Rs_Ohm

    0.1201501

    0.1008

    0.1877

    0.0825

    gMotorVars.Lsd_H

    8.30E-10

     

    2.66E-08

     

    gMotorVars.Lsq_H

    8.30E-10

     

    2.66E-08

     

    gMotorVars.Flux_VpHz

    0.1135232

     

    0.31587

    0.2844

    comment

    spun up to 150 rpm

    will not go

    spun up to 100 rpm

    Ticking but no start. Spun by hand still no start

     

     

     

     

     

    2/15/2014 Tests InstaSpin FOC Lab 2c with Chris Clearman user.h

    Run1 @ 20V

     

    Run 2 @ 40V

     

     

    Identify

    test set Run_Ident 1

    Identify

    test set Run_Ident 1

    gMotorVars.Rs_Ohm

    0.1227

    0.1222

    0.1512

    0.0706

    gMotorVars.Lsd_H

    6.64E-09

     

    3.24E-12

     

    gMotorVars.Lsq_H

    6.64E-09

     

    3.24E-12

     

    gMotorVars.Flux_VpHz

    0.07111

    0.101

    0.10036

    0.10029

    comment

    spun up to 700 rpm

    Motor speed oscillating between 20 and 150 rpm. Set speed ref to 1k. Sped up to 300 rpm then apparently lost sync. speed and current dropped

    spun up to 600 rpm

    deader than a door nail

  • The low inductance not being able to identify doesn't totally surprise me. You need to have proper scaling and have to get settings just right.

    What DOES surprise me is the Rs and Flux values are all over the place. These should be extremely consistent...unless you have some strange motor whose flux is changing at different loads or current injection.

     

    Do you have any interest in sending me one of these motors?  I will get it running then provide you the user.h back and any instructions required to run appropriately.

     

  • Chris,

    It would be very difficult to get you the motor as it is the only prototype that exists.  I cannot see how anything that could be done with a few hundred mils could affect resistance and flux.  The winding is #18 wire and not much of it and the magnets are N52 and very large, 0.625" deep in the magnetized direction.

    I just checked the motor supplied with the kit and indeed its measurements are repeatable within 5%.  However, since the motor I am trying to run is much, much larger, what is the chance that the DRV8312 board I have is flaky?  That could account for inconsistent results.  Any suggestions on how to check the board further? What board would you recommend if we were to get another one?

    Perhaps most importantly at this point, I would appreciate your insight on why Halls would be a problem at 1,666 Hz.  Just to get our show on the road I am interested in trying Halls now in the 30,000 rpm range, 500 Hz.  Could you please point us to the most appropriate sensored solution code for the Piccolo/DRV8312 hardware we have and some description of what Hall signals are expected (60 or 120 degree spacing, how many state changes per e-rev and when the states should change.)

    Thank you,

    Norm

  • Norman,

    That's too bad you can't send a motor.  I think most likely this has to do with current ripple during the ID process.  I feel confident that I could get the motor running in person.

     

    For Hall based BLDC control for the DRV8312 EVM you can use this project

    C:\ti\controlSUITE\development_kits\DRV8312-C2-KIT_v128\BLDC_Sensored

    Note that this was done with the small NEMA17 motor included in the kit and on a non-low inductance motor, so the PWM is set-up for only 20 KHz.

    the controlCARD used is the TMDSCNCD28035ISO or the TMDSCNCD28069ISO.  You select the 3x or 6x in CCS by right clicking on the imported project --> Build Configurations --> Set Active.

    Note that for InstaSPIN-FOC you are using the TMDSCNCD28069MISO. This is NOT the exact same as the 69ISO.  This 69ISO project in controlSUITE uses IQMath (as most of our projects do) which exists and is called from the ROM of the 69 device. However, the 69M device does not have all of IQMath in the same locations in ROM as we added all the InstaSPIN  FOC and MOTION libraries to ROM.

    Just letting you know that if you try to run this project with your 69MISO card it won't work innitially. I think you should be able to link in the IQMath library

    C:\ti\controlSUITE\libs\math\IQmath

    and run it on the 69MISO though. Haven't done it myself.

     

    Halls at 500 Hz shouldn't be a problem, but as you start going higher in speed you are going to run into a typical control loop problem of sample to output delay causing late commutations.  This is very common and just something to be aware of....it is why most high speed is done w/o sensors (or some sort of delay compensation is added).