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 vs FOC

Other Parts Discussed in Thread: INSTASPIN-BLDC, CONTROLSUITE, LM3S818, DRV8301

Hello,

Regarding brushless dc motor control,

What is the difference between InstaSpin and FOC ?

Which method is more efficient ?

Which method allows better speed resolution ?

  • What is the difference between InstaSpin and FOC ?

    InstaSPIN-BLDC uses a "sensorless/self-sensored" back-emf integration technique to attempt to align commutation correctly at every 60 electrical degrees.  It uses a standard 6-step, 2 legs active 1 leg off switching technique (which makes it simple because you always have a leg off for 60-120 degrees to measure voltage from) which has the benefit of utilizing the the full bus voltage (helps efficiency) but has drawbacks of nasty current ripple during switching, and start-ups are not very well controlled (hurts efficiency).  BLDC techniques can (and usually should) be combined with current/torque and/or speed loops to provide a true control loop based system.

    FOC is at its heart a closed loop current/torque control technique to maximize the torque production by controlling independently the torque producing and magnetizing components of the three phase currents so that the a rotating stator field is produced that allows for most efficient induced field on the rotor. This is done by Controlling the Orientation of these two components (Fields). To control the orientation you need to know the relative locations of the magnetic fields. This can be done through the use of a precise rotor sensor (encoder or resolver) or through sensorless/self-sensing techniques (sensed or reconstructed currents can be used to determine rotor flux magnitude and relative position/angle).  The flux positions of the rotor and stator can be viewed as three dimensional vectors (hence the other term vector control).  The torque control loop for maximum efficiency is based on the concept of aligning the two field vectors to a 90 degree relationship.  This can be very difficult in three dimensions (four when you count the movement), so transforms are used (Clarke and Park) to convert these rotating vectors into easy to control DC components called Iq (Torque) and Id (Magnetizing).  For maximum torque production we control Id to 0 and Iq to our needed torque (which could be fed by an outer speed loop).  Id can also be manipulated for cases like field weakening where you trade off torque (and spend current) to produce much higher speeds.  FOC techniques need to control all three legs of the 3PHI simultaneously, allowing the motor to pull three sine waves phase shifted120 degrees. The biggest challenge with FOC comes from needing to sample current/voltage while continuously switching each leg (this is assuming you are reading legs through a shunt and don't have access to in-line magnetic based measurements).  Well, it's not really continuous because we are using PWM techniques at much faster rates (10-30KHz) to create an average voltage to represent where you are on each Sine Wave, so typically you do have "off-time" where you get the chance to sample the leg....But at very high (+/-) places on the sine wave that window gets very small or non-existent.  And this is if you are measuring all three currents....go to 2 current measurements and you have to play some tricks and limit your duty cycle (really hurts efficiency) to get your samples....go to 1 current measurement and you REALLY have to play some tricks and limit duty cycle (really hurts efficiency.  And yes, you also do things like modified sine waves (space vector) to actually shape the wave pseudo-sinusoidal / trapezoidal to get more bus voltage utilization.

    Which method is more efficient ?

    As you can probably guess, the answer is "depends". In general, all other things being equal the BLDC is going to give you a good baseline efficiency when you talk about efficiency at the operating point of the motor (90%+ of rated speed/torque).  But there are all sorts of caveats here: bi-polar, uni-polar switching techniques, PWM/inverter switching losses, motor construction (some will have more iron losses, current ripple losses), and of course use conditions / profile, and even tuning of current loops.

    Especially compared to a lot of sensorless FOC implementations...which to save "cost" on current sensing end up restricting their duty cycles so that you get less torque/speed.  So you end up spending WAY more on an oversized motor and more electricity costs than paying upfront for current sensing that doesn't limit you.

    But an FOC implementation that is using 3 x current sense with full modulation capabilities is going to be able to match (if not exceed in many cases) the OVERALL system efficiency.

    Plus FOC brings many other benefits: better current control (Start-up and active can reduce ratings on power components), sine wave for less acoustic noise, faster response, tighter control, ability to choose a motor size that will utilize maximum torque during bulk of operation while having the capability to to use field weakening techniques when higher speed operation is needed (which is a smaller % of their lifetime).  As an example, take the case of a washing machine that typically tumbles/spins at 50 RPM (drum rotation) for most of it's cycle, and then up to 500 RPM for initial spin cycle, then a short time at 750 RPM, then 1000 RPM, then 1200 RPM, then 1500 RPM briefly.  What is the best option here? 

    With BLDC control you need to use a motor that can spin at 1500 RPM (15,000 RPM if you use a gear) at full modulation / voltage.  What efficiency will you get when you need to run at 3% of rated (50 RPM, 500 RPM Geared) for most of it's lifetime?  Why not use FOC and choose a motor rated for 500 RPM (5,000 geared). Get better efficiency (smaller motor) at 50 RPM 10% rated and then use field weakening for the brief amount of time to hit the higher speeds.

     

    Which method allows better speed resolution ?

    FOC because you have direct control of the torque.  The output of a speed loop is a torque reference. Typically the speed loop runs at a 10x slower rate, so the torque loop has 10 cycles to control to the same set-point.  FOC allows faster torque response to system changes and hence better speed control (you still need to tune speed loops in either case).  Sensorless FOC can be challenging because the speed of the motor is completely estimate and most estimators introduce phase delay.  So low speed and highest speed operation are very dependent on the quality of the sensing and the observer.  If either are poor the speed loop tuning won't matter much, in which case BLDC would have been more robust.

  • Thanks for the great explanation.

    If I understand you correctly, InstaSpin is a close relative to trapezoidal commutation?

    What I'm looking for is a VERY efficient SENSORLESS commutation method.

    My motors spin at around 3000 (+/- 500) rpm. I do need fine resolution for the +/- 500rpm around the nominal 3000.

    What is the best method for my application?

  • Yes, InstaSPIN-BLDC is completely trapezoidal control.

    It is a sensorless Bemf technique, but based on integration rather than the typical zero cross detection.

    How dynamic is your system (speeds, loads)?

    What is lowest speed / highest speed you need to support?

    Is acoustic noise an issue?

    Cost of the MCU?

    In general I'd suggest starting with InstaSPIN-BLDC for first evaluation since it's so easy.

  • It's very dynamic.

    The lowest speed is 2500 and the highest is 3500 rpm.

    Acoustics aren't an issue, neither is the cost of the controller.

  • I don't consider that range of speed too dynamic, so are you saying that your load is dynamic?

    What voltage / current range?

     

  • Yes the load is dynamic - it's hard for me to say how much...the shaft is attached to a 3D tilting propeller.

    Voltage ~ 12V

    Current ~ 5 to 8 amps 

     

  • Start with InstaSPIN-BLDC and the DRV8301-HC-C2-KIT

    Most of these applications use sensorless BLDC control just fine.

  • Why do you advice against FOC ?

  • I don't advise against it, I advise to start with InstaSPIN-BLDC. Simpler to implement and likely will meet the performance needs.

  • If I understand correctly, InstaSPIN provides, means for tuning performance and the outputs C code to "flash" the MCU/DSP for permanent use.

    This way, I won't have to do any control firmware development myself.

    Is this correct? 

  • Not exactly. The GUI allows you to tune the commutation and then (if you desire) run and tune velocity, current/torque, or velocity+torque.

    You then take the source+library code provided, and can hard-code these settings (or allow some other means of tuning; or sets of values for different use cases).

    It does NOT auto generate the updated code, that is still manual.

  • But it does generate the source code?

    So no firmware development is needed...?

  • The source code and InstaSPIN-BLDC.lib are provided in the kit downloads, StellarisWare or controlSUITE

    But the updates for your specific motor are not auto generated, you will need to update the firmware.

    You'll also need to add your particular user interface / comms functions.

  • I'm primarily interested in FOC.  I have many potential applications.  One that stands out is a direct-drive router motor, which may have two or even one-tooth tooling.  The rotational inertia of this system would be low.  As such the load and accompanying phase lag is highly variable with rotor angle.  As I understand it, FOC will give more reliable results than a BEMF system in this scenario.

    What sort of FOC speed is achievable with the Stellaris LM3S818 when doing FOC?  From what I've seen, the limiting factor here is processing loop time, as FOC is relatively calculating-intense.  I have some motors which would be "nice" to get to the 20,000RPM range, as a 7-pole motor, so poles would need to be processed at 2.333KHz.

    What are the liabilities of running a brushless motor at a significantly lower voltage than the free-running speed?  For example, I have an 800KV motor here, rated for "3 lipo cells"= 3.7v * 3 = 11.1v = 8880RPM.  I have a 24V power supply, that's the basic situation.  I also would need to support lesser speeds, so I'd like to look at the electrical situation for that.

    I used an inductance meter on a motor and see that it's about 30uH.  If this was a 50KHz switching frequency at 50% duty, the ON-time is 10us.  I am a bit unclear on how to model the motor, if I assume the BEMF is negligible (low speed) and had it on for 10us, I would expect the delta-current to be 10us*24v/30uH= +8A from the start of the ON-time to the end of a single PWM cycle.  Is this calculation appropriate?  

    This strikes me as rather high, it is a lot to ask from the input cap and transistors.  But won't an FOC have trouble measuring phase current with such a high ripple in the current?  I see that the DRV8301 could go up to 500KHz, which would be substantially less.  Does this increase the computational issues for a FOC system, or is it just greater switching losses to worry about?  

    Is there any difference in the overall situation if I were to use a motor intended for 11.1v on a 24v supply, but with a BEMF solution?  This strikes me as less reliable, as the phase current is not the feedback, the BEMF is.  If I'm correct in understanding how fast the phase current rises during a PWM ON-time, without measuring phase current, I'd be concerned that in some situations the currents could end up quite high and cause additional problems.

  • Also, I'm using the DRV8301.  The 2 amps they have on-board, these are primarily for FOC, correct?  Aren't 2 all that are needed, since the sum of all 3 must equal 0? 

  • One other thing.... I'm looking at the DK-LM3S-DRV8312 devkit schematics.  They put a 4.7uH inductor in series with each of the 3 motor output legs.  Why is that?  It's not inductance coupled to the motor's core.  I'm guessing it's to make the motor run on higher voltage with less of a ripple issue, but AFAIK it would increase the inductive kick at the end of a cycle.  And they've got to be rated for pretty high currents.  

    I'm just wondering what the design purpose is on these.

  • Danny,

    This is an error in the schematic.  L2, L3, and L4 are actually power ferrite beads.  Please take a look at the BOM in the same directory.  These are 6A rated beads.

    At high voltages (>24V), the device will NOT survive a direct short at the output.  This is described in the datasheet at the top of page 12 (2nd column).  The beads act to throttle, or slow down, a current spike that results from a short on the motor terminals and this allows the device short-circuit protection to behave normally and protect the device. 

     

  • Danny,

    Yes, if you need torque control over variable loads and speeds FOC is a good solution.

    We are not running FOC on LM3S, just on the LM4F. Mostly due to the ADC and "looking forward not backwards".

    Yes, at very high speed you may (probably) have to increase your control frequency which may require more MIPS.  Many very high speed applications use Delfino class 150 MHz FPUs for this very reason.

    For 500 KHz switching it would just be greater losses, but more of an issue is how to generate those PWMs and still time your control loop.  Yes, you have noticed the R/L = theoretical Hz dilema.  High speed motors typically have tiny L. Tiny L has really bad current ripple. You need to switch them more often (higher freq PWM) and sometimes control their current quicker, especially at higher speeds. 

    I don't understand the questions about using 24V power on a motor not rated for 24V. That can destroy the motor.  For most high speed motors, a Bemf real-time technique like InstaSPIN-BLDC is usually a good enough fit. But for maximum efficiency and if the load dynamics are heavy (like I expect a router would be), then you may need to work on something like FOC.

     

  • shai kon,

    InstaSPIN-BLDC is a trapezoidal commutation technique.  You can implement a current (torque) loop and a speed loop if you like.

    FOC is a torque control method, maximizing the torque and minimizing the currrent usage at any given load/speed.

    Efficiency depends on the use case. For a trapezoidally wound motor operating at one speed, the maximum speed of the motor, with a constant load, BLDC techniques will be most efficient.  On the other end of the spectrum, for a sinusoidally wound motor operating at variable speeds with variable loads, the FOC technique will be most efficient.  Obviously most applications fall somewhere along that spectrum....but in general, FOC is being used for highest efficiency applications.

    Speed is a an effect of controlling the torque, so better torque control will typically give you better speed control, so in general - for most real applications - FOC would be better. But BLDC may be "good enough".

     

     

  • I don't see why it would present a danger to the motor.  There's no way 24v would be any problem for the motor winding insulation, nor are there brushes to worry about.

    How the RC folks arrived at motor ratings is somewhat of a mystery to me.  However, from what I can tell, they chose a speed where the Io (no-load) losses were becoming  significant, thus compromising the output of the motor.  Then they divided that speed by the KV rating to arrive at a recommended voltage, without field weakening (these motors are almost always used on BEMF controllers anyways) the maximum drive speed possible would be the target maximum motor speed.

    AFAIK as long as the motor's speed is limited, using a higher power supply voltage shouldn't be a problem.  Even if you were to go faster, I don't think there's an issue of mechanically flying apart until much much higher speeds are employed.  Rather, the maximum continuous-duty shaft work possible decreases because Io losses result in additional core heating that reduce the amount of work that can be loaded within the core's thermal limits.

    However, Io losses come largely from core hysteresis.  Both switching at higher frequencies and using higher currents should increase those losses (and subsequent heat generation) significantly, so yes, that concerns me.  

    I think the real concern here is that if the current reaches a high enough instantaneous value, the core flux will be high enough to permanently demagnetize some of the magnet's strength.  Or the core could undergo saturation and current would increase very, very quickly.