Hier stopt het draaien
Two weeks ago, I highlighted how Tesla moved from waves to bits in our motor and charge controller in the PEM. You might have left with the impression that as of June 2007, when the DMC replaced the analog controller, our work as DMC firmware engineers was complete. Fortunately for us (this is fun, remember!), that was far from true. Although the inner control loops of the DMC were tuned and functioning well at that point (the motor torque-producing loop and line-voltage syncing charge control loop, for instance), outer loops like cruise control, traction control, and optimal charge profiles were still to be implemented.
Traction control implementation and validation soon became my highest priority, as it was considered to be safety critical. To do so, starting in June 2007, I embarked on a side project, building on Greg Solberg’s former algorithm development in Sweden with EP10. Fundamentally, traction control systems are relatively simple to describe: their goal is to maintain the driven wheel speeds at or near the speeds of the un-driven wheels. The difference between front and rear speeds is referred to as wheel slip. Properly controlling wheel slip can avoid wheel slip-induced yaw while accelerating in turns, or rear-wheel lockup due to regenerative braking (in an EV) or engine compression (in an ICE) on slick road conditions.
For the roadster, with rear-wheel drive and a lot of torque, a good traction control system is essential. Although our vehicle is rear-weight-biased, if a roadster’s tires are worn or the road isn’t particularly smooth and sticky, it’s easy to send the car’s rear wheels spinning, even in straight line accelerations. Additionally, regenerative braking without traction control can lead to difficulty when cornering. Many sports-car enthusiasts are aware of “twitchy” throttle lift-off in corners in high-powered rear-wheel drive cars. The sequence of events is this: with your foot off the throttle, engine compression braking (or in our case, regenerative braking) leads to vehicle deceleration, weight transfer forward, rear tires unloading, and sudden vehicle oversteer. Even worse – this type of oversteer is often correctable only by accelerating – the exact opposite response most drivers expect is needed.
Traction control systems for ICE vehicles usually have a few options to maintain wheel slip at prescribed levels: ECUs can kill engine spark, reduce fuel supply, or use electronic throttle control to actively modulate the user’s throttle request. By far, the most common method involves killing engine spark. If you ever hear your engine sputtering rhythmically and loudly when you’re driving on snow, that’s likely what’s happening. All of the above methods can only help control wheel slip while accelerating. In order to reduce engine braking during deceleration, it is possible to provide the engine with more fuel or by opening valves to reduce compression, though both of these methods come with complications.
The overriding truth for ICE traction control, however, is that each method is limited by the inherently poor torque control (in terms of both response time and accuracy) of ICEs. Fundamentally, it is nearly impossible to maintain near-zero output torque from an ICE, whereas such tiny torques are categorically simple to maintain in an electric drivetrain. TC is often a crude and intrusive safety system in an ICE car; in EVs, it can be a seamless, if not rather intuitive, control system.
This, at least, was my gut feeling when I began working on the project back in June. I wanted to bring active control to all aspects of traction; be it straight line launch, cornering at high speed, throttle lift-off on high and low-friction surfaces, I knew that the responsiveness and accuracy of the DMC motor control would allow us to do great things. For inputs, I had my modeling and understanding of the roadster’s vehicle dynamics and speeds for each wheel from the Conti-ABS unit. For an output, I had only one thing – a dynamic torque limit. And the goal, however ambiguous it may sound, was to make the Roadster as safe as possible without compromising its sporty character.
So, it was off to the races for me! To Altamont Speedway actually, where Phil Luk, Dave Brown—a Tesla friend and bay area race car driver on the side—and I spent June 26, 2007 testing my benchtop-developed algorithms on the road. VP-9, my vehicle of choice, performed excellently, the AC handily dealing with the searing heat (95+F) blowing in from the central valley.
At the end of the first day of tests, it was clear TC development was far from complete. Launch control (standing start from zero speed) worked well when we tried it in the dirt parking lot, but the transition to slip control (wheel slip regulation at higher speeds) was hard to pin down and would allow undesirable loss of the rear end. On the track, we wet down corner four with a water truck, and I quickly determined the throttle lift-off problem wasn’t going to be an easy fix. Initially, I had assumed regen traction control would be as simple as drive traction control in reverse. Not so, I learned; no matter what negative slip I tried to regulate, Dave Brown would send VP-9 into uncontrolled 360s. Luckily, I’m able to stare at real-time plots on diagnostic screens while spinning uncontrollably without losing my lunch!
Repeatedly, we arrived at corner four at 40mph, initiated the turn, and lifted the throttle. Dave would leave the wheel uncorrected, allowing the roadster to oversteer if it wished. Time after time, the vehicle would slowly yaw from the rear, until eventually the tailspin was unstoppable. I tweaked set points, gains, and even started playing with regen levels, hoping to see the TC catch and correct the situation. By the end of the day, it became clear that if we wished the Roadster to have the customer-desirable high levels of regen, we would need to do something more complicated. After a day of algorithm attempts and data collection, I drove VP-9 home a bit disappointed.
This track was the site of most of our wet
and low-mu handling testing. The basalt tile
turning circles are especially fun ~ especially for drifting!
Thus began a series of traction control testing and development dates. I went back to Altamont a second time, then flew to Birmingham in the UK to work with Alan Clark--Iain and Greg’s compatriot at Arvidsjaur—at MIRA, a large vehicle durability and thermal testing facility. While at MIRA, my TC algorithms were faced with their first true low-mu testing. MIRA has ice-like wet basalt-tiles, which are extremely slippery—perfect for ABS and traction control system development. While there I learned that we needed to improve the response time of the TC system to respond to transient road conditions, and that we needed to try to respond differently in cornering situations versus in a straight line. After three solid days on the test tracks, we had what I would call a marginal system. The TC loops were stable; the roadster was safe; but you couldn’t have the same fun around corners anymore, even on high-grip surfaces.
I brought my code back to the US, checked it into the vehicle release process, and immediately emails arrived in my inbox detailing “loss of torque while cornering”, “hard to get the car sideways on the highway onramp”, etc, etc. As many of you readers likely know, the geography immediately surrounding Tesla’s headquarters in San Carlos is rife with windy serpentine mountain roads that are perfect for flashy electric roadsters. When staff members take the roadster home, they expect to let loose on the accelerator unfettered. And TC was leaving quite a lot of performance on the table.
So, the directive came: a number of TC refinements were in order. In response, I spent a week or so logging data on our favorite roadster stomping grounds: Skyline Drive, Pagemill Rd, Hwy 84 from Woodside to the Ocean… I promise it wasn’t all fun and games—Phil Luk was driving after all, and remember, my eyes were glued to my laptop screen. I needed to relax the traction control setpoints while maintaining safety—what may have seemed like an impossible task. I experienced first hand the loss of the roadster’s sporty nature, and fleshed out a number of ideas on how to improve the system. After some experiments in the peninsula foothills, Greg Solberg, Phil, and I headed off with VP-9 to Nevada Automotive Test Center outside of Carson City, where we could use a straight, wet, polished concrete track and a large high speed circuit alongside large military vehicles and farm equipment!
Over at NATC, Greg, Phil, and I pulled together our engineering minds to attack the problem. By day two on polished concrete, we had improved the TC response time by fundamentally changing the way the system engaged and tying it closer to the torque commanded by the user at the moment of wheel slip. We fixed the transition between launch and slip regulation with an easy and robust solution. Also, I implemented a run-time observer for lateral forces on the rear tires during turns, using wheel speed information and vehicle dynamics.
Lateral forces must be minded to properly limit torque in turns – see this discussion of the “friction circle” for more info; accounting for them allowed me to greatly improve our cornering TC performance. With the lateral G observer, I can predict the maximum achievable regen in a given corner before the driver can command it, avoiding the throttle-lift off oversteer problem entirely. This type of feedforward traction control can be hugely beneficial; for instance, it's much safer to avoid wheelspin altogether than react to it. Often, by the time you've measured wheelspin and begun to react it's too late, especially when a huge majority of the vehicle's weight is loaded up on the outer rear tire while the driver is cornering hard!
VP9 on the Skidpad, TC on
VP9 on the Skidpad, TC off
By day three at NATC, we were very pleased with our system. We could lock the wheel at any speed, floor the accelerator, and the vehicle would hold a line, gracefully understeering at the traction limit of the surface, a much safer condition than violent oversteer. We tried throttle stomps on the polished concrete and transitions under a variety of conditions and it was very difficult for user-inputs to send the rear end around. And we had a lot of fun getting VP-9 dusty in the desert!
At this point it was September 2007. I had been living and breathing traction control development for two solid months and still didn’t feel the system was ready. Nonetheless, it was good enough for the stream of email complaints in my inbox to slow to a trickle. Over the next few weeks, I’d occasionally head into the hills, trying to improve the calibration, particularly of the lateral force observer. I also used some absorbed knowledge regarding vehicle geometry to avoid nuisance regen-cutouts at low speed when steering hard. By October, I was ready.
VP9 in the Dirt, TC off
VP9 in the Dirt, TC on
But, due to scheduling problems, it wasn’t until November 19th that Greg Solberg and I arrived in Birmingham to demonstrate and validate the final system. In the end, Greg and I spent Thanksgiving with two Tesla UK validation engineers, Alan Clark from Lotus, VP-3 and VP-6 from Hethel, and a “Federal Spec” Lotus Elise. The week went extremely well, with everybody impressed with the final system’s performance on the slick, in the wet, and, most importantly, on dry pavement. The VPs performed equal to or better than the Elise in most conditions, and in time trials (okay, we were having too much fun, perhaps) on Mira’s wed handling circuit, our VP roadsters actually beat the Elise, handling themselves safely and impressively around the loop. Greg and I made final adjustments to solve the throttle lift-off problem and the skilled drivers present decided we should leave regen traction control on at all times for safety. (The user can still disable forward traction control if they’re trying to do burnouts, of course…) We concluded the Tesla traction control system is effective, safe, and smooth. And, perhaps what is most impressive, the TC’s ability to maintain traction allows even expert drivers to achieve higher performance than they are otherwise capable.
Before we left Birmingham, Greg and I sat down to Thanksgiving dinner at a pub in the English countryside with much to be thankful for. Our epic adventure of wheel spin and oversteer with LCD screens in our laps had come to a fruitful end. Now if only the weather hadn’t been below freezing and rainy in the UK—that really would have sealed the deal!