Author Topic: BLDC motor current control  (Read 1795 times)

0 Members and 1 Guest are viewing this topic.

Offline fx991exTopic starter

  • Contributor
  • Posts: 27
  • Country: 00
BLDC motor current control
« on: August 16, 2018, 02:56:04 pm »
I am designing a driver for a BLDC motor. The motor I am trying to control is Maxon 339267 (3 phase, 4 pole, 9V, hall sensors).

Let's say that I do it with three mosfets and a microcontroller. I am trying to figure out what would be the best way of implementing current control. I would like to have adjustable current limit so I can control the motor's torque.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5875
  • Country: de
Re: BLDC motor current control
« Reply #1 on: August 16, 2018, 03:33:34 pm »
You can't control torque. Torque is defined by what your mechanical load demands.
What you can do is limit torque to protect either motor or load. This of course means that the load rotates slower or stops.

The easiest way is to measure the current in either the positive or negative supply rail. There's no reason to measure the different phases individually (symmetry).

 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1352
  • Country: si
  • I like to measure things.
Re: BLDC motor current control
« Reply #2 on: August 16, 2018, 05:44:26 pm »
You can't control torque. Torque is defined by what your mechanical load demands.
You sure as hell can.

The thing you need to implement is field-oriented control (FOC). Whether or not you actually want to spend the time to develop it is another question. ::)

A brief introduction. This will hopefully give you an idea of the complexity of the application in question.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 
The following users thanked this post: NiHaoMike, CM800, jbb

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5875
  • Country: de
Re: BLDC motor current control
« Reply #3 on: August 17, 2018, 07:53:51 am »
You can't control torque. Torque is defined by what your mechanical load demands.
You sure as hell can.

The thing you need to implement is field-oriented control (FOC). Whether or not you actually want to spend the time to develop it is another question. ::)

A brief introduction. This will hopefully give you an idea of the complexity of the application in question.

No you can't. Imagine the (extreme) scenario where you tell an unloaded motor to deliver a certain amount of torque. It will accelerate to infinity.

Apart from that, FOC is great for induction motors, for BLDC I consider it a complete overkill. Also, the OP's motor has Hall sensors, so it makes no sense.
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1352
  • Country: si
  • I like to measure things.
Re: BLDC motor current control
« Reply #4 on: August 17, 2018, 02:08:34 pm »
No you can't. Imagine the (extreme) scenario where you tell an unloaded motor to deliver a certain amount of torque. It will accelerate to infinity.
You really can.
Your argument is the same ridiculous one that some people used in the constant current vs current limited supply debate we had on the forum the other day. The current is regulated within a limited output voltage range just like the torque can be regulated within a limited RPM range.

If you request a torque from an unloaded motor, it's just going to spin the rotor up to its maximum permissible speed (configured within the FOC). The torque at that point is going to be close to zero (just enough to overcome bearing friction and air resistance) - the same way an unloaded current source would hit its compliance voltage and the current on the output would be zero.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 
The following users thanked this post: NiHaoMike, CM800, Siwastaja

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8172
  • Country: fi
Re: BLDC motor current control
« Reply #5 on: August 17, 2018, 02:35:43 pm »
I never understood the FOC, really. I have the bad habit that before I implement something, I want to understand it. I spent about a year reading on AC induction motor FOC (which, to be fair, is an order of magnitude more complex as a whole than BLDC FOC, including an additional "rotor flux estimator" black box no one was ever able to describe in any terms to me), trying to make sense, and the more I delved into maths, the more apparent it became that people writing all these manuals, appnotes, academic papers, etc., didn't have a clue either, just copypasting the same fancy math terms they had read about previously. And, you can't teach something you don't really understand! What became apparent was that I'd need to find someone who really understands it, and then have they personally teach it to me, so I can ask all the stupid questions I need to. I never found anyone.

This hasn't prevented me from creating great and usable motor drives - including torque control (yes, you can only control it within limits, just like in constant current lab supply there are limits as well) - for both AC induction motors, and BLDC. They are very efficient, as well.

FOC is typically presented as one huge black box with a massive "curriculum vitae" for "benefits" such as "high efficiency" over "competing" (what exactly?) control schemes.

OTOH, "crap in, crap out" applies. Books have been written on tuning the FOC to work at all.

And, for each person, the acronym "FOC" may mean completely different things.

In BLDC, the FOC seems to sometimes mean sensorless operation where the phase synchronization happens based on current direct measurement of two phases.

For me, the FOC seems an equivalent of compensating a voltage controlled switch mode supply - a great academic discussion of 1970's, difficult to achieve stability with, requiring careful tuning of PID loops. Other simpler schemes would be equivalent to current mode controlled converter, but I don't see much discussion on anything but FOC. "DTC" or "direct torque control" was a term I saw a few times in the induction motor world, and it made more sense to me, although I never understood that completely, either, just that it's closer to my "inherently stable, simpler current mode converter" analogy.


In the end, I don't know. All BLDC controllers I have designed use low-side current sensing on two phases, just to support any control scheme requiring this. OTOH, every current limit I have actually ended up implementing would work from the DC bus current measurement as well, as long as it doesn't include too much bulk capacitance after the shunt. OTOH, I use hall sensing to sense the rotor angle for phase synchronization. I can imagine that a well tuned current measurement could get me more resolution than the limited 60 electrical degrees I get from the halls, especially during load changes at high speeds.

TL;DR:
FOC can really mean anything. The presentation is often unnecessary complex and involved in math. FOC, in any form, may not be necessary for you, or it may be the best thing ever for you. If you find it overwhelming, implement something of your own first, which is exactly what I have always done, and never ended up with FOC so far.
« Last Edit: August 17, 2018, 02:37:37 pm by Siwastaja »
 

Offline fx991exTopic starter

  • Contributor
  • Posts: 27
  • Country: 00
Re: BLDC motor current control
« Reply #6 on: August 17, 2018, 11:59:11 pm »
Thank you all for the responses, it made some things clearer.

I figured out that it would be a lot easier to control the fets with a dedicated drive than a microcontroller. I did some reaserch and I think I figured out what I need. So I would need a dedicated three phase BLDC drive which can be either integrated or gate drive with external fets. The drive needs input for three hall sensors. I need sinusoidal current supply because it produces lower noise and smaller torque ripple. Supply voltage for the drive should be 6V or more.

I stumbled upon Allegro A5939-49 gate drive and based on the information on their website I think it fits my needs. https://www.allegromicro.com/en/Products/Motor-Driver-And-Interface-ICs/BLDC-Drivers.aspx

I emailed Allegro for the datasheet but no response yet after 24 hours. I don't understand why they don't just publish the datasheet on their website.

Is there any other drive similar to A5939-49 out there? What other manufacturers should I check out?
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: BLDC motor current control
« Reply #7 on: August 18, 2018, 12:35:25 am »
A micro with advanced timers, like the ATXMega series, and probably a lot of 16 and 32 bit MCUs, will do.  Given that you need to implement all the control logic yourself, whereas a ready made chip does everything for you. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 2591
  • Country: us
  • Not An Expert
Re: BLDC motor current control
« Reply #8 on: August 18, 2018, 06:16:49 am »
Not to be too much of a dick about it but based on what you are saying here, you are a long ways off from being successful on this one.  You are better off going and buying an actual commercial servo amplifier from ebay.  It will ultimately save you a TON of time and money.  If this is for an real project where there is some volume, that's even a better reason not to screw around and just find a company that can sell you a servo drive.

Here are the specs for that maxon motor (they make good motors by the way).  At 9V and 3A peak you should be able to get a drive solution for a reasonable price.

Values at nominal voltage
   Nominal voltage    9 V
   No load speed    3720 rpm
   No load current    74.7 mA
   Nominal speed    2060 rpm
   Nominal torque (max. continuous torque)    24.5 mNm
   Nominal current (max. continuous current)    1.06 A
   Stall torque    68.3 mNm
   Stall current    3.06 A
   Max. efficiency    71 %
Characteristics
   Terminal resistance    2.95 Ω
   Terminal inductance    1.61 mH
   Torque constant    22.4 mNm/A
   Speed constant    427 rpm/V
   Speed / torque gradient    56.3 rpm/mNm
   Mechanical time constant    20.6 ms
   Rotor inertia    35 gcm²
Thermal data
   Thermal resistance housing-ambient    12.1 K/W
   Thermal resistance winding-housing    4.99 K/W
   Thermal time constant winding    8.69 s
   Thermal time constant motor    135 s
   Ambient temperature    -40...+100 °C
   Max. winding temperature    +125 °C
Mechanical data
   Bearing type    ball bearings
   Max. speed    10000 rpm
   Axial play    0 - 0.6 mm
   Max. axial load (dynamic)    4.8 N
   Max. force for press fits (static)    45 N
   (static, shaft supported)    1000 N
   Max. radial load    14 N, 5 mm from flange
Other specifications
   Number of pole pairs    4
   Number of phases    3
   Number of autoclave cycles    0
Product
   Weight    57 g
 

Offline fx991exTopic starter

  • Contributor
  • Posts: 27
  • Country: 00
Re: BLDC motor current control
« Reply #9 on: August 18, 2018, 11:28:34 am »
I am clearly not an expert in this field but I am trying to get some perspective of how it's done.

I am developing a prototype of a mechanical device and I would rather go with a brushed DC motor since it is easier to control but I couldn't find one with similar size, speed and torque characteristics. The end goal is to have inputs for speed, direction and current limit. I am probably going to order ESCON Module 24/2 to use in a prototype but in the end I will need a more compact solution. ESCON Module 24/2 cannot be used in the final product because of space limitations.

I am familiar with the motor specs. Why is A5939-49 drive from Allegro not compatible with my motor?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf