The Evolution of Motor Control: from Waves to Bits

When we last discussed motor control on this blog, EP10 was drifting around on the frozen lake in Arvidsjaur, Sweden. At that time (January 2007), we were in the process of co-evaluating Conti-Teves’ ABS system in tandem with Tesla’s motor control. We left the lake thinking highly of the Conti system and moderately pleased with the Roadster’s motor control and traction control algorithms.

Greg pointing happily to the DMC
spinning a motor for the first time.

Meanwhile, back in San Carlos, we were mulling over a number of slight imperfections with our motor controller. In a variety of transient and highly demanding conditions, the motor control algorithm didn't perform as well as we would have liked, leading to instability and even control faults (equivalent to ICE misfires or stalls). Our favorite driver, Phil Luk, could sometimes trick the controller into instability with one or two quick flicks of his foot. Sudden throttle lunges were not unheard of, and drivers generally needed to learn the subtleties of driving without introducing oscillation.

Early investigations implicated component variability and lack of control bandwidth as issues inherent in what we refer to now as the analog controller’s design. JB Straubel, Tesla’s CTO, was wary of shortcomings with analog control from Tesla’s inception. By the time EP10 was on the frozen lake, he had tasked a team of 4 Tesla engineers, including myself, with producing a competing design—a digital motor controller (DMC)—to hopefully replace our existing technology.

Colin and I enjoy our first
DMC drive in EP1

Everything began in November 2006—whiteboard design sessions, in-depth brainstorms with friends in academia and industry, round table discussions of needed improvements—and our first deadline was to spin a motor by the new year. A month of long days and some head scratching later, we met our deadline 10 days ahead of schedule. The months of January and February were a blur of hours of dynamometer time and the unique squeal of “digital” torque. I remember the first time I played with DMC transient response; stable full torque reversals at high speed and under load could be heard throughout the San Carlos warehouse. People would come up to me remarking at the racket and noting they could always tell when I was running the dyno, even through conference room walls!

Our reward for hard work came in March of 2007, when Troy, Greg, Colin and I enjoyed a DMC weekend crowned by 200 mile maiden voyages in EP1 and VP1! Luckily, Tesla’s marketing staff had scheduled a photoshoot for that weekend, so we drove away from 1050 Bing in style with cameras in tow. The only problem with the vehicles all weekend was with EP1’s transmission – a harbinger of things to come?

The team (minus Greg) pose while troubleshooting
the new controller in a parking lot.

Finally, after six months of full-time effort, JB’s concept of a digital signal processor (DSP)-powered motor and charge controller in the PEM was a reality. In June of 2007, Tesla executives decided to make the DMC the plan of record for all future PEMs. Prior to that decision, the DMC had been put through its paces and performed extremely well for a number of reasons.

Most importantly, in the DMC, the motor control technique we employ is stator flux-oriented vector control. Vector control is complicated mathematically (thus our need for a 150MHz DSP), but it allows us to directly control magnetic flux density and torque as DC quantities. The former analog system controlled AC current frequency and magnitude, a much simpler task from a programming standpoint (an 8bit PIC can hack it), but much more difficult to get right from a stability perspective and generally lower performance.

Troy and I drive VP1 and EP1 north on 101
in spitting distance of the photography van.
Right after this photo I totally burned the trailing Porsche.

When all was said and done, the new controller gains in a number of key areas. We improved motor peak torque by up to 5%, stability across the operating envelope, and transient response by leaps and bounds, all while maintaining or increasing efficiency, gaining flexibility and repeatability of key user interface characteristics (regenerative braking, throttle response, pedal scheduling), and adding in-depth diagnostics and fault-handling. Overall, we took a giant step forward in the robustness of the PEM, the brain or heart (depending on your perspective :) ) of the Tesla drive-train. The project was incredibly fun to be a part of, and a fine example of Tesla’s engineering intensity and rigor at work.