# [EVDL] BLDC control design



## EVDL List (Jul 27, 2007)

>I'll take a look at what you're designing and
>hopefully throw in some useful advice. I design BLDC
>controls for my employer, Ametek, but these are low
>voltage (24Vdc for most). I have designed AC inverter

That's excellent. When I get my schematic done up
I'll PDF it and put it on a web server. Overview -
small microcontroller with CAN and 8 timers, 
MC9S08DZ60 or maybe a MC9S12XDP512. I use those
for my ICE control already (my day job). Three
timers do hall effect sampling, three timers do
essentially a feed-through of the hall effect
signal but with phase advance and direction control
done in software - exactly like timing advance
is done in ICE controls. Those outputs go to a UCC3626
BLDC controller which does current control. The
outputs of that go to either a IR21381 with
booster transistors, or (my preferred method) a
set of HCPL316's (also with booster transistors).
Haven't decided yet. I like the simplicity of the
IR21381 part but at these current levels, parasitics
make me a bit nervous. Current sense will be via
voltage drop across the bottom IGBT's. I will be
flipping the high and low drive outs from the
UCC3626 so the high side is chopped and the low
side stays on so I can use the current sense method
used in my Solectria BLDC's. At 300A, the voltage
drop of my IGBT's are pretty constant regardless
of temperature. In regen mode, I will be flipping
the 4QUAD input to the UCC3626 so that the bridge
operates in a boost mode.

I got most of these ideas from looking at the
shortcomings of my Solectria boxes. Mostly, they
have odd control voltages, no redundant sensing
on accelerator or brake input (so a failure can
lead to full-on or full-brake), and no capacity
to deal with a disconnected hall effect sensor
signal gracefully. I want to address these before
putting these in a vehicle - which I've got another
potential glider to check out this weekend.

I actually did work on the vehicle that these
Solectrias came from - maybe 12 or 14 years ago.
The controllers were weak, and that's why they
were replaced with UQM motors and controllers.
Too many repair jobs on the existing controllers.
They had ESR issues on electrolytics, and insufficient
voltage margin between bus and MOSFET ratings.

-Dale

_______________________________________________
For subscription options, see
http://lists.sjsu.edu/mailman/listinfo/ev


----------



## EVDL List (Jul 27, 2007)

One thing I would seriously consider is your choice of
MCU. I realize it's always easier to use something
that you're familiar with, but the MC9S08DZ60 is not a
motor control MCU. Since you're already familiar with
Freescale product, may want to consider something like
the DSP56F80x family of DSP's. They also have example
code already written for sensored BLDC control,
http://www.freescale.com/files/product/doc/AN1916.pdf?fpsp=1
You can get something running pretty quick using the
sample code and they also have low cost development
boards you can use before laying out your own circuit
board.
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=ECMTREVAL&fpsp=1

I realize your just using the MCU to interface with
the UCC3626 BLDC control IC, but I think you may find
some limitations doing it this way. Overall I think
it's easier to start with a MCU/DSP that is intended
for motor control.
Good luck with either path you choose, and keep us up
to date on your progress.
Rod


> --- Dale Ulan <[email protected]> wrote:
> 
> > >I'll take a look at what you're designing and
> > >hopefully throw in some useful advice. I design
> ...


----------



## EVDL List (Jul 27, 2007)

>I realize your just using the MCU to interface with
>the UCC3626 BLDC control IC, but I think you may find
>some limitations doing it this way. Overall I think
>it's easier to start with a MCU/DSP that is intended
>for motor control.

The reason I wanted to use MCU over hardware is that
my motors have very low inductance, and a current-
controlled strategy should result in the cleanest
commutation, lowest switching loss, and lowest possibility
of blow-ups. But only trapezoidal BLDC's need apply
with that approach and since ACIM's are common perhaps
more flexibility is good.

When I calculated out the current feedback
loop gains for these motors, I came up with extremely
low gains for stability, but that makes the control
sluggish without feedforward mapping. I also would
prefer to use leg current reconstruction rather than
LEM's everywhere. Possibly the 0-5V LEM's would be ok
to interface with a micro but I found the accuracy in
the under 20A region to be poor if the controller can
dish out 250 or 300A. Perhaps that all doesn't really
matter and it works anyways?

I may revisit this, and I think I would look at one of
the DSPIC parts if this would be easy to use for others -
Microchip does do a good job of marketing these.

I have toyed with the idea of the IRMCK201 sensorless
sinusoidal FPGA approach, but it requires a precision
encoder, and my motor has hall sensors. Also, its phase
low-leg current reconstruction mode doesn't work - only
motor phase R sense, which is a PITA. You can make a
circuit that converts a LEM signal to that but it's also
a major PITA. They show a LEM into a mux circuit on the
app note but the errata shows that the ADC current sense
does not work, only the PWM current sense.

I don't want to add a high precision encoder since the
hall sensors are plenty accurate. With interpolation
and phasing correction, that is. Certainly the DSP or
even a modified IRMCK201 approach would give the
flexibility of using this controller for ACIM's or
BLDC's (it's only software!!!).

What's your (or other's) take on the IR high-voltage gate
drives vs. optos. I'm strongly in favor of the optos, but
the power supply for them is a bit painful - six channels
of it.

My reference for a design that doesn't quite work right
but has some nice concepts is the BRLS-240 controller,
it's schematic is in the evdl library. It's all hardware
and I thought that adding a micro to that class of design
would be less risky than blowing up a bunch of IGBT's
because of a software error.

-Dale

_______________________________________________
For subscription options, see
http://lists.sjsu.edu/mailman/listinfo/ev


----------



## EVDL List (Jul 27, 2007)

[No message]


----------



## EVDL List (Jul 27, 2007)

>Also, some $11 dsPIC motor control units have
> built-in 3-phase
> (6-output) PWM with dead-time compensation. They
> also have fault
> inputs so the hardware sensors can trigger a fault
> in the hardware
> pwm, killing the outputs without software
> intervention. (The software
> can detect and recover from the fault, though.) That
> way, Microchip
> has already implemented the hardware protection in
> their PIC, but we
> can still control the duty cycle from software,
> allowing us to make
> the controller more flexible.
> 
That may be the digikey price, but in volume some of
these dsPIC's go for less than $3.
I'm currently designing two different BLDC controls
with the dsPIC30F2010.
I'm using the fault shutdown feature (get an
overcurrent into FLTA pin) and it turns off the PWM in
about a microsecond (I've measured this on my present
hardware setup). The feedback circuit delay time and
gate drive will factor into this speed, but overall
the shutdown time is more than appropriate for turning
off the MOSFET's if there is a fault condition. The
Microchip MPLAB tools and application software are
much better than the TI DSP stuff I've used over the
past six years (I have several designs using the
TMS320LF2402, maybe their tools have improved over
time, but I currently prefer the Microchip stuff). 
The Microchip application software for sensored BLDC
got a motor running for me in less than a day. 
There's still lots of stuff you need to add for your
particular application, but just getting the motor to
run is always an encouraging start!
Gate drive - Dale mentioned IR gate drive IC's. I
designed an AC inverter control when I worked at
Baldor Motors & Drives (from 1996-2000). I used the
IR2133 and 2233 for 230 and 460 Vac drives up to 5 HP.
These required bootstrap capacitors for high side
drive and I would only recommend this up to 10HP max,
5 Hp to be on the safe side. Beyond this power level
you really need a good power supply with 3 independent
high side isolated voltages (one for each phase that
can put out much more power than a bootstrap supply). 
We used the HCPL-316's at Baldor along with the power
supply mentioned above. This worked well for drives up
to several hundred horsepower. Some of the Baldor
drives used Semikron modules with all of this built in
(I even have some of those schematics). The easiest
solution is to use a module like Semikron offers with
all of the protection already built in. This is very
costly however, so I can see going the route of roll
your own. This will work if you already have
experience with high power design and don't mind
blowing some stuff up if it doesn't fit together the
way you intended the first time!
Anyhow, good luck with the design and I'll try and
offer advice along the way.
Rod



> --- Morgan LaMoore <[email protected]> wrote:
> 
> > I'm definitely in favor of using something like a
> > dsPIC so the same
> ...


----------



## EVDL List (Jul 27, 2007)

> That may be the digikey price, but in volume some of
> these dsPIC's go for less than $3.

I know the volume prices are cheap, but anyone on this list is likely
to be buying from digikey or mouser in small quantities, not getting
large quantities at volume prices.

> ...
> more great info
> ...


> These required bootstrap capacitors for high side
> drive and I would only recommend this up to 10HP max,
> 5 Hp to be on the safe side. Beyond this power level
> you really need a good power supply with 3 independent
> high side isolated voltages (one for each phase that
> can put out much more power than a bootstrap supply).
> ...

What do you think of an open-loop 3-output flyback converter? That way
you could use a single primary-side supply, and you could really
reduce the cost. You could design a nominal output voltage of 12V or
15V, with an 18V zener for overvoltage protection, so the gate should
never get to 20V.

It seems like overkill to buy 3 separate heavy-duty isolated DC-DC
converters; even big IGBT's gates shouldn't be taking up too much
power. (A 600A ebay IGBT I looked at takes 45mA average gate current
at 15 kHz.)

I'd like to hear other people's opinions on this; is it overly simple?
Would it be worthwhile to include opto-isolated voltage measurements
of the output for closed-loop feedback?

-Morgan

_______________________________________________
For subscription options, see
http://lists.sjsu.edu/mailman/listinfo/ev


----------



## EVDL List (Jul 27, 2007)

Actually Microchip lets you order quite a few samples for free for US
addresses, as do many other component mfg'ers. Just register, look up
parts, put them on your list online, click send, and they'll be at your
door in a few days. You can order the latest top-of-the-line parts.

They only allow a certain number of sample orders per quarter, and a
limited number of samples of any one type per order and a limited number
of types too. They've had to quit foreign addresses entirely because of
people abusing the system for parts to sell (entire freakin Nigerian
village ordering hundreds of parts). So don't abuse it, at least have
some intent to play with the parts.

Microchip Direct is MUCH cheaper than Digikey, about half the price per
part even if you just order *1*. Volume buying can take another quarter
or 3rd off the price, but come on, you're never going to use 10,000 of
them. 100 gets you like 5% off. So basically no there's no real volume
discount for you.

Danny

----- Original Message -----
From: Morgan LaMoore <[email protected]>
Date: Friday, August 31, 2007 1:35 am
Subject: Re: [EVDL] BLDC control design
To: Electric Vehicle Discussion List <[email protected]>

> > That may be the digikey price, but in volume some of
> > these dsPIC's go for less than $3.
> 
> I know the volume prices are cheap, but anyone on this list is likely
> to be buying from digikey or mouser in small quantities, not getting
> large quantities at volume prices.
> 
> > ...
> > more great info
> > ...
> 
> 
> > These required bootstrap capacitors for high side
> > drive and I would only recommend this up to 10HP max,
> > 5 Hp to be on the safe side. Beyond this power level
> > you really need a good power supply with 3 independent
> > high side isolated voltages (one for each phase that
> > can put out much more power than a bootstrap supply).
> > ...
> 
> What do you think of an open-loop 3-output flyback converter? That way
> you could use a single primary-side supply, and you could really
> reduce the cost. You could design a nominal output voltage of 12V or
> 15V, with an 18V zener for overvoltage protection, so the gate should
> never get to 20V.
> 
> It seems like overkill to buy 3 separate heavy-duty isolated DC-DC
> converters; even big IGBT's gates shouldn't be taking up too much
> power. (A 600A ebay IGBT I looked at takes 45mA average gate current
> at 15 kHz.)
> 
> I'd like to hear other people's opinions on this; is it overly simple?
> Would it be worthwhile to include opto-isolated voltage measurements
> of the output for closed-loop feedback?
> 
> -Morgan
> 
> _______________________________________________
> For subscription options, see
> http://lists.sjsu.edu/mailman/listinfo/ev
> 

_______________________________________________
For subscription options, see
http://lists.sjsu.edu/mailman/listinfo/ev


----------



## EVDL List (Jul 27, 2007)

[No message]


----------



## EVDL List (Jul 27, 2007)

[No message]


----------



## EVDL List (Jul 27, 2007)

... flyback converter ...

That's what the Solectria BRLS240 did - it had a single
flyback converter to supply six gate drivers, +15, -15,
and +5 volt rails. It was wound on a pot-core but a toroid
(which you can get from Digikey easily) would be a simpler
approach for DIY... you can get it. I like the idea of all
six drivers being identical - including isolated power
supply for each one. Less potential trouble in the case
of a fault and less sensitive to parasitics.

-Dale

_______________________________________________
For subscription options, see
http://lists.sjsu.edu/mailman/listinfo/ev


----------



## EVDL List (Jul 27, 2007)

>Also, anyone have opinions on my flyback converter
> suggestion from my
> last e-mail?
This method was employed on several of the drives at
Baldor. You would have a multi-winding transformer
with secondaries for 
+15V, +5V logic and -15V (for opamps). On the Anode
side of the +15V supply was 3 primaries for another 3
different transformers. The secondaries of these
transformers supplied voltage to the 3 high side
devices.
I can send a scanned section of the schematic if
you're interested.
Rod

_______________________________________________
For subscription options, see
http://lists.sjsu.edu/mailman/listinfo/ev


----------



## EVDL List (Jul 27, 2007)

[No message]


----------



## EVDL List (Jul 27, 2007)

Hi Morgan,

I've seen a number of industrial inverters use a
single primary transformer with 8 or 9 secondaries. 
They had a secondary for each of the 6 gate drivers, +
& - 15v and 5v supplies and also 24 volts. All
isolated DC supplies using one transformer/primary. 
Usually just called the switchmode power supply. Not
very big at all. I think about 50 kHz.

Jeff M




> --- Morgan LaMoore <[email protected]> wrote:
> 
> > That would be nice, more schematics to get ideas
> > from are appreciated.
> ...


----------



## EVDL List (Jul 27, 2007)

Why not just use one primary, and put the 3 isolated +15V secondaries
for the high IGBTs on the same multi-winding transfer as the +15V,
+5V, and -15V? It seems like getting rid of 3 more primary stages
would be a good thing. Would there be too much capacitance between the
transformer coils if all three IGBT secondary windings used the same
transformer/primary winding?


For big drives, parasitics can make things a bit difficult, but in
theory you should be able to use a common low-side power supply for
all three. But at least a few 'big' drives use separate supplies for
each gate driver. Also, the Valentine book suggests that this would
be prudent for automotive-sized VFD's. Another hint is that the
Powerex/Mitsubishi smart IGBT 6-packs use a common supply for bottoms
up to 200 amps, and above that, they use separate supplies. Just to
prevent blowing up, the added six little windings (+15,-5 for each
driver) should be only a little added trouble. I like to err on the
side of caution as I've repaired enough high-power stuff to not want
too many explosions while working on this.

-Dale

_______________________________________________
For subscription options, see
http://lists.sjsu.edu/mailman/listinfo/ev


----------



## EVDL List (Jul 27, 2007)

> Dale Ulan wrote:
> > The reason I wanted to use MCU over hardware is that
> > my motors have very low inductance, and a current-
> > controlled strategy should result in the cleanest
> ...


----------

