• SUPPORT THE SITE AND ENJOY A PREMIUM EXPERIENCE!
    Welcome to Tesla Owners Online, four years young! For a low subscription fee, you will receive access to an ad-free version of TOO. We now offer yearly memberships! You can subscribe via this direct link:
    https://teslaownersonline.com/account/upgrades

    SUBSCRIBE TO OUR YOUTUBE CHANNEL!
    Did you know we have a YouTube channel that's all about Tesla? Lots of Tesla information, fun, vlogs, product reviews, and a weekly Tesla Owners Online Podcast as well!

MountainPass

Top-Contributor
TOO Sponsor Vendor
TOO Advertiser
Joined
May 15, 2018
Messages
549
Location
Toronto, Ontario
Country
Country
Tesla Owner
Model 3
#1
Hi everybody!

We have been working on this article in our spare time and wanted to share our nerdy interests with everyone. It looks like it formats well here, so we can share the entire article! Please don't hesitate to check out our blog for other interesting tech articles.

https://www.mountainpassperformance.com/blog/

Motor Control 101



As with any new technology, there tends to be a lot of misinformation about how new things work. Over the last few years as we’ve gotten into the EV space I have had a lot of difficulty finding relevant information about the control of AC motors in traction (i.e. automotive) applications. It wasn’t until we did a training session with Cascadia Motion (inverter suppliers for Formula 1 among other professional racing series), that some level of understanding developed.

It’s easy to find tons of information on the internet about the fundamental operation of an electrical machine, but how about specific details that relate to operation in an EV? The goal of this article is to cover the basics to establish a bit of a foundation to avoid misinformation and rumors spreading (a classic gasoline-powered car rumor is that exhaust backpressure is needed to make torque, and that untruth has been alive and well for decades!) So let’s dive right into it.

What Does An AC Machine Need?

First, we need to understand what the motor needs to spin. If you’re familiar with the basics of an electrical motor then you know that when an electrical current is passed through the windings of a motor this creates a magnetic field, the strength of that field being roughly proportional to the amount of current.

To put it simply, the motor needs this magnetic field to be oriented in such a way that the rotor of the motor (the rotor is the part in the inside that spins) is inclined to turn. The more current that is applied, the greater the torque on the rotor to spin.

How Does The Inverter Give The AC Machine What It Needs?

With a very basic understanding of what the motor needs, let’s look at what the inverter must do to give the motor what it needs to spin smoothly and with precise control. This is where it gets a little bit more complicated.

The inverter needs to take a DC input voltage and convert it to an AC output of varying frequency and voltage while keeping the positioning of those electrical currents in sync with the position of the motor. The inverter does this by using high power, high-speed transistors (switching the power on and off at a rate of 12,000 times per second or higher) to create a rotating magnetic field that is always just ahead (for forward motion) or just behind (for reverse) the poles of the motor. These transistors switch on and off to create what is effectively a sinusoidal AC voltage waveform.

The trick is in knowing exactly how to time these AC waveforms and how “large” to make them. The larger the waveform requested, the more current is needed to produce that waveform.

The methodology of looking at the currents applied to the motor from the perspective of the spinning rotor is called “field-oriented control.” Looking at the control from this perspective is the most intuitive way to think about it, as you can then set just one value as the target angle for the electromagnetic forces to be applied at. This is sometimes called the “advance” value. From there all that is required is a total current request value and the Field-Oriented control logic in the inverter backs this out (using two steps referred to as the Park Transformation and the Clarke Transformation – you can read more about field-oriented control (also called vector control) here.



Top: The output individual phase voltages for each of the 3 phases
Middle: The Clarke transform converts the phase voltages to a single torque vector, with its Y-axis vector referred to as iβ and the X-axis vector referred to as iα
Bottom: The Park transform then converts those vectors from the Clarke transform into two values that are directly related to the phase angle of the motor. iq is the current electrically perpendicular to the motor poles, and id is the current directly inline with the motor poles.

Animation Credit: Switchcraft.org

This is somewhat akin to thinking of firing a sparkplug for a gasoline-powered motor at “30 degrees before top dead center” – in other words, you’re framing it in terms of the control value to produce the ideal output. The difference is with motor control, there is no “Top-Dead-Centre” – there is just a position ahead of or before the motor pole’s current location. Field-Oriented-Control lets you say, I want to always apply the current X number of degrees ahead or before the pole.

When the inverter wants the motor to spin faster, it will apply current 90 electrical degrees ahead of the poles. This will create a field and a resultant force that will try to turn the motor. When the inverter wants the motor to spin slower, it will do the opposite and apply a current (or sink the back EMF back into the battery – more on that later), 90 electrical degrees behind the poles.

Current * Voltage = Power, right?

One thing to understand is that on either side of the motor, there are two sets of currents and voltages – and they are different! The output of a motor’s current is not the same as the input to the inverters current.
Knowing that current multiplied by voltage is power, you’ll see that this is a pretty confusing situation until you realize that the voltage on either side of the inverter is not the same. Let’s reconcile this.

On the input side of the inverter, the Voltage is obviously the DC voltage of the battery, which doesn’t change that much. During an acceleration run, the current going into the inverter will climb, and eventually level off at peak power, and then taper down as the motor runs out of its efficiency range.

This current closely matches input power. If you log battery current, that will be proportionally close to power as the voltage does not change very much.
On the output of the inverter, Voltage matches the speed of the motor, and the current represents the torque that is produced as we mentioned earlier. More current = more torque.
This is because in a permanent magnet motor the voltage of the motor is very close to the speed of the motor.
When looking at the inverter’s output current, the “curve” of the output current closely matches the torque curve.



At Some Point, You Run Out Of Voltage.

This is where it gets interesting. If we had unlimited voltage, assuming it didn’t exceed the limits of the components inside the inverter, it would be possible to hold the inverter output current (and thus torque) as motor speed continued to rise. Since power is simply torque * rpm, the power would continue to rise as well.

When an inverter is commanded to deliver maximum power it runs to the most current it is programmed to be able to deliver – and that is usually a constant amount of torque limited by the switches and electronics inside the inverter. So what stops the torque from carrying on flat all the way up to the motor’s maximum speed? Why do motor dyno graphs have a distinct “knee” in them where the torque suddenly drops off?



You can clearly see the knee in this dyno graph of a Standard Range Plus Model 3 where the battery runs out of voltage and the inverter enters field weakening – holding output power constant as speed goes up. The “knee” point, also called the “base speed” occurs earlier as the battery State of Charge goes down.

A Bit About About Back-EMF

Before we can cover that, you need to understand Back-EMF – or Back Electromotive Force. You can read all about Back EMF on the internet, but the basics are that when you spin a magnet (the magnet is on the rotor of the motor) inside of a coil (the stator, or outside of the motor’s windings), a voltage is produced in those windings. The faster the motor spins, the higher this voltage becomes. Voltage is proportional to speed.

Keep that point in mind – that the higher the RPM, the higher the Back EMF voltage.

Interesting tidbit – at some speeds this Back-EMF voltage is so high that it could actually damage the inverter if the inverter is suddenly powered off. This is why Tesla mandates that all cars are towed on a flat-bed – tow them by their rear wheels at highway speeds and you could fry the inverter!

Back to running out of Voltage

It takes a certain amount of current to produce a torque in the motor. We know this already. But what I haven’t mentioned, and what is the main key to all of this – is that in order to get that current there must be a voltage differential – i.e. a difference of voltage between the supply (the inverter) and the motor.

The more current commanded, the more voltage must be supplied from the inverter.

When the motor is spinning quickly, the motor voltage can be very high – in the hundreds of volts – even when no power is being applied. This means it requires at minimum that base level of voltage (and then some) to apply a positive torque.

At some combination of battery voltage, motor speed and requested torque, the voltage required exceeds the voltage available! And that is when you see the knee in the torque graph. It’s at that sad moment when you wished that your EV had an 800V battery!

This is called “Base speed.” There are many different ways of looking at base speed, as the “base speed” of a motor also depends on how much torque is being requested. In pure back EMF terms, the base speed might be very high, say 10,000 rpm. But when requesting 1000A the base-speed may be reached at only 4,000rpm, because of the voltage difference required to produce 1000A of current flow through the motor.

Enter Field Weakening

Luckily, motors are able to run above their Base Speed, and actually hold constant power over a pretty extensive speed range using something called Field Weakening. This is something most EVs employ a great deal of, as it allows for a motor to be tuned to have a massive amount of off-the-line torque while still having adequate power at high speeds.

The way Field Weakening works is by injecting a current to cancel out the magnetic field produced by the magnet of the rotor. This process weakens the magnet’s field.

With a weaker magnetic field, the Back EMF voltage is reduced as a result. With lower Back EMF voltage there is now a larger difference between the battery’s input voltage and the voltage of the motor – allowing the inverter to apply more current without running out of voltage.

In the motorsport world, a motor would be wound differently, generally to provide less back-EMF to optimize the power for high-speed operation. In this case, you’d see lower torque down low, but the base speed would be higher, and thus the total power capability of the motor would be greater.



Making More Power

Now that you know how a motor produces power, it’s not too difficult to understand what needs to be done to get more of it. Without changing hardware, you can get more power either by increasing the current to the motor, or by increasing the voltage of the battery to increase the base speed.

Inverters are fairly expensive to make, so OEs generally run them at their maximum safe rated power. As the electronics inside the inverter get hot from running at this load, they will eventually de-rate. This is a big problem with the Tesla Model S inverter for example. It can overheat after only half a lap on the racetrack in some cases! So running even more current on an inverter like that would be possible, but even further reduce the amount of time that power could be produced.

State of the art inverters, such as those found in the Model 3’s LR rear motor have more efficient switching technology which allows them to run at higher currents for longer without overheating – but they too are already tuned to just about their maximum output.

Getting more voltage is difficult and requires entirely redesigning a battery pack. Different cell chemistries will have different levels of internal resistance – which affects how much the voltage sags when a large current is pulled from the battery. Less voltage sag is preferred for power, as more voltage under load equals more power.

The internal resistance of a battery generally goes down as the battery warms up, increasing power potential. That is why Tesla will pre-warm the battery in the Ludicrous cars before drag racing to help decrease battery voltage sag.
So you can see it’s very difficult to get more power from a production EV as they are generally already tuned to their limit, and changing parts is very difficult when the intention is to keep the car a road-going vehicle.



Voltage sag from our Tesla Model S converted Lotus Evora “Blue Lightning” You can see the battery voltage dips when there is a large current draw, and recovers as soon as that load is removed.

Wrapping Up

So those are the main points about how an inverter functions to control the motor. The important point and the purpose for this article was to give a start to finish overview of how motors and inverters work from a practical standpoint understanding the basics that voltage * current must equal power.

Most articles online about motor control hyper-focus on one point, or get extremely mathematical and are written by academics which makes it very difficult to get an understanding of what is actually going on.
So I hope this helps a little bit and perhaps in the future, we can dive in on more details of specific aspects of this incredibly interesting technology!
 

Frully

Top-Contributor
Joined
Aug 30, 2018
Messages
1,061
Location
Calgary, AB. Canada
Country
Country
Tesla Owner
Model 3
#4
My brain hurts and I only made it through the first 25%. LOL. There's a reason my chosen field of Engineering was not Electrical!
just think of motor voltage torque relationship as 'trying to approach the speed of light, the more energy you put in the more energy you have to put in'. :)
 

JWardell

TOO Master Member
TOO Sponsor Vendor
Joined
May 9, 2016
Messages
4,299
Location
Boston
Country
Country
Tesla Owner
Model 3
#5
Nice write up! Are the next posts going to cover more fun topics like Permanent Magnet vs Induction? DC vs AC motors? Radial vs Axial flux? Lamination designs? :)
 

garsh

Dis Member
Moderator
TOO Supporting Member
Joined
Apr 4, 2016
Messages
13,321
Location
Pittsburgh PA
Country
Country
Tesla Owner
Model 3
#6
There's a reason my chosen field of Engineering was not Electrical!
I have an EE degree, concentrating in motors and generators. But I ended up working in software development, so this was a nice trip down memory lane for me. :)
I even remembered some of the theory and terminology. :D
 

Needsdecaf

Top-Contributor
Joined
Dec 27, 2018
Messages
1,307
Location
The Woodlands, TX
Country
Country
Tesla Owner
Model 3
#8
I have an EE degree, concentrating in motors and generators. But I ended up working in software development, so this was a nice trip down memory lane for me. :)
I even remembered some of the theory and terminology. :D
On my EIT exam - Circuits question? Answer "C". No time to waste figuring it out, had to work on the stuff I knew. Remarkably I passed with a decent grade! LOL.