<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>iRacing.com &#187; DaveK</title>
	<atom:link href="http://www.iracing.com/author/davek/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iracing.com</link>
	<description>The world’s leading online race simulation service.  Race the world’s fastest cars on the world’s coolest tracks against the world’s best sim-racers.</description>
	<lastBuildDate>Tue, 15 May 2012 17:25:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Q circles: The crop circles of iRacing?</title>
		<link>http://www.iracing.com/q-circles-the-crop-circles-of-iracing/</link>
		<comments>http://www.iracing.com/q-circles-the-crop-circles-of-iracing/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 20:33:42 +0000</pubDate>
		<dc:creator>DaveK</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.iracing.com/?p=5846</guid>
		<description><![CDATA[<a href="http://www.iracing.com/q-circles-the-crop-circles-of-iracing/"><img align="right" hspace="5" width="200" src="http://www.iracing.com/wp-content/uploads/2011/02/iracing-qcircles1.jpg" class="alignright wp-post-image tfe" alt="Who is this man and what does he have to do with qualifying at Talladega? (Hint: he’s the greatest mathematician of all time)" title="iracing-qcircles1" /></a>One of the strangest story lines in the history of iRacing is the Q circle phenomenon. It is an eerie tale, and if words like quaternion and eigenvalue send shivers up your spine, then you might do well to stop reading, toss some salt over your shoulder, and just walk away.   Our story begins many [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_5848" class="wp-caption alignright" style="width: 205px"><img class="size-full wp-image-5848" title="iracing-qcircles1" src="http://www.iracing.com/wp-content/uploads/2011/02/iracing-qcircles1.jpg" alt="Who is this man and what does he have to do with qualifying at Talladega? (Hint: he’s the greatest mathematician of all time)" width="195" height="227" /><p class="wp-caption-text">Who is this man and what does he have to do with qualifying at Talladega? (Hint: he’s the greatest mathematician of all time)</p></div>
<p>One of the strangest story lines in the history of iRacing is the Q circle phenomenon. It is an eerie tale, and if words like quaternion and eigenvalue send shivers up your spine, then you might do well to stop reading, toss some salt over your shoulder, and just walk away.  </p>
<p>Our story begins many years ago, during the development of Grand Prix Legends, when unbeknownst to anyone, an insidious, barely perceptible flaw was introduced into the physics code. It lay dormant for several years until the release of Nascar 4. Sometime after that, astute oval racers discovered something very odd: laptimes at Talladega and Daytona had a strange tendency to bounce up and down every other lap, even though the car was being driven nearly identically. The time variation was small, mere hundredths of a second. When I first heard about it, I was skeptical. Surely these drivers were just seeing patterns where there weren&#8217;t any; superstition was slowly growing into urban legend. I figured the non-issue would soon go away, unreproducible in true, scientific, back to back tests. After all, what on earth could explain such a bizarre claim?  </p>
<div id="attachment_5849" class="wp-caption alignleft" style="width: 205px"><img src="http://www.iracing.com/wp-content/uploads/2011/02/iracing-qcircles2.jpg" alt="William Rowan Hamilton, the guy pretty much responsible for Q circles." title="iracing-qcircles2" width="195" height="227" class="size-full wp-image-5849" /><p class="wp-caption-text">William Rowan Hamilton, the guy pretty much responsible for Q circles.</p></div>
<p>And yet, the issue didn&#8217;t go away. iRacing competition director Shannon Whitmore showed me one day how it worked, and sure enough, his laptimes fluctuated up and down, every other lap, by a few hundredths. Even more worrisome was the fact that this could be used to advantage in qualifying. Apparently, simply pretending to do a lap, by driving in a circle in pitlane before qualifying, would shift the good laptime/bad laptime fluctuation from odd/even laps to even/odd! This was key in qualifying at the superspeedways, since the best laptime is usually obtained on the second flying lap, after the car has had a longer time to reach top speed. By shifting the bizarre good laptime to the second qualifying lap, you could gain an advantage of a few hundredths, which is a pretty significant time difference, especially at the top levels of simracing.  </p>
<p>And so the &#8220;Q circle&#8221; was born. Racers being racers, constantly on the lookout for a competitive advantage of any kind, we began to see the ritual of driving in a circle before qualifying at the superspeedways. It became downright embarrassing. People took sides, and argued vehemently for or against the practice. Was it a legitimate competitive advantage, or an unsporting cheat that should be banned? In the Nascar World Championship Races, the Q circle issue exploded into a contentious debate, with the solution being to have the drivers all send in a replay of their qualifying laps so we could insure  that nobody was Q circling!</p>
<p>  How could this be addressed? How could we even detect that it was being done? If someone happened to spin on their outlap, thereby gaining the Q circle advantage, how could we legitimately disqualify them? We needed to solve the mystery of the Q circles. We had quite a few discussions amongst the engineers, but to no avail. We couldn&#8217;t figure out how it could be happening. Theories abounded, but none, when researched, could explain it. Subtle differences in lap timing and scoring? Couldn&#8217;t find anything. Some fluctuation in air density or some other calculations every minute or so? Nope. How could the millions of calculations that were being done every second lead to behavior that was so predictable based on the mere number of laps completed—or actually the mere number of circles completed? It was a complete and utter mystery, and a very bizarre one at that.  </p>
<blockquote><p>Apparently, simply pretending to do a lap, by driving in a circle in pitlane before qualifying, would shift the good laptime/bad laptime fluctuation from odd/even laps to even/odd!</p></blockquote>
<p>One day iRacing president Tony Gardner and Shannon came into my office and said we needed to establish a ruling on the Q circles. Should we allow them or not? Things were coming to a head. Tempers were rising. The legitimacy of iRacing as a fair arbiter of competition was being called into question. Things looked bad. I envisioned my career in a shambles, derailed by the Q circle conundrum. What could they be? What could be causing them?  </p>
<div id="attachment_5850" class="wp-caption alignright" style="width: 205px"><img src="http://www.iracing.com/wp-content/uploads/2011/02/iracing-qcircles3.jpg" alt="Eeeeek!!! It’s a quaternion! " title="iracing-qcircles3" width="195" height="227" class="size-full wp-image-5850" /><p class="wp-caption-text">Eeeeek!!! It’s a quaternion! </p></div>
<p>It was at this very moment that a flash of realization came to me. It had to do with quaternions, I was almost sure of it! I said so to Tony and Shannon, but this did not seem to register with them. Shannon gave me a look that said, “stop joking around,” and Tony muttered, “what the heck is a Q-bonian?”  While they continued to talk about how we should address the Q circle &#8220;exploit&#8221; I fired up the sim in the debugger and set a breakpoint (a way to stop the sim in mid-computation) where I knew I could get a look at the player car&#8217;s quaternion.</p>
<p>  Of course, I should explain what a quaternion is. It is a mathematical entity (invented by the mathematician William Rowan Hamilton, famous for the Hamiltonian matrix) that provides a very useful way to represent the 3D orientation of an object. You are more likely to have heard about Euler angles, the well known yaw, pitch, and roll. These were invented by Leonhard Euler, the greatest mathematician of all time, who probably did more to change the modern world than any other human you can think of. If you&#8217;ve heard about race cars being pitch-sensitive, or having too much body roll in the turns, you know about Euler angles. Euler angles work for representing the rotation of an object in 3D, but they have some serious shortcomings. It&#8217;s difficult to take an object&#8217;s angular velocity (how fast it&#8217;s spinning) and update the object’s orientation using Euler angles. Also, there are orientations (the dreaded gimbal lock) where Euler angles suddenly change direction in a very non-linear way. A better way to represent orientations lies in a theorem that was proved by none other than…Euler. He showed how any rotation of an object in 3D can be accomplished by picking some axis through the object, and rotating it by some angle around that axis. Euler had discovered the basic idea behind quaternions, but it would take more than sixty years after Euler’s death for William Hamilton to turn this idea into something useful (in 1843).</p>
<p>A quaternion is made up of four numbers. Three of them specify the axis (a vector) about which an object is rotated, and one specifies the single angle of rotation about that axis, basically. They work very nicely for representing rotations, since they can be easily rotated by an object’s angular velocity, plus they don’t have a gimbal lock orientation. Quaternions are actually a little more complicated than that, and the reason I&#8217;m going on about this is that you need to know more to understand Q circles. The single angle number is actually the cosine of half the angle of rotation. The vector part representing the axis is scaled by the sine of half the angle of rotation. How Hamilton dreamed all this up, I have no idea. But the key thing is that it takes 720 degrees of rotation of an object, or two full circles, to take the cosine and sine parts through a complete cycle. Quaternions are not unique, that is, there are two quaternions representing any given rotation. Think about it: if you rotate an object by some angle around some axis, then that&#8217;s the same as rotating the object around the axis pointing exactly in the opposite direction by the negative of the same angle. So for a given orientation of your race car, there are two ways to specify it: with the positive or negative version of some quaternion.  So this is what I was looking for in the debugger. I wanted to see if the player car&#8217;s quaternion was the positive or negative version. The sim stopped at my breakpoint and I looked at the values. Quaternion was positive. Then I restarted the sim, and drove in a circle. Sure enough, my quaternion had become negative, just as I suspected, since I hadn&#8217;t gone through 720 degrees of rotation! Another circle and it was positive again. So at last it seemed I had found something that could potentially be related to the Q circles.  But the hunt wasn&#8217;t over yet. This was certainly something that varied every other lap, and could be affected by driving a Q circle. But the quaternions aren&#8217;t used for much except generating a rotation matrix (more math for handling rotations), and the positive and negative version of a quaternion both generate identical rotation matrices, according to the math. It shouldn’t matter whether your quaternion is positive or negative, the formulas give the same matrix, and that matrix is used everywhere else to actually rotate all the vectors used by the physics. Aerodynamic drag and downforce, tire forces, and even gravity are all manipulated using this identical rotation matrix. But maybe there was a bug—a mistake in the formulas coded in the simulation that would give a slightly different matrix for the positive and negative quaternion. With any luck, there might be a bug, and I could fix it!</p>
<blockquote><p>A quaternion is made up of four numbers. Three of them specify the axis (a vector) about which an object is rotated, and one specifies the single angle of rotation about that axis, basically.</p></blockquote>
<p>Unfortunately, there didn’t appear to be a bug. I pored over the matrix from quaternion routines and they were just what they were supposed to be. Still, I needed to check by running the code. I set another breakpoint, and stopped the code just at the instant the player’s car was placed on track. I wrote down all nine numbers from the rotation matrix, and all four numbers from the quaternion. I changed the code so that the negative quaternion was generated first, instead of the positive, when the car was first placed on track. It occurred to me that I could “fix” the problem by randomly assigning each driver a positive or negative quaternion, so that nobody would know whether they should drive a Q circle or not! I had to laugh, knowing the controversy that would erupt. No, I would have to fix this the right way. If it turned out to be some difference between the positive and negative quaternion, then I could easily force the code to always use only the positive one. But if there was no difference, the Q circles would return to their legendary status as eerie mystery. I digress. So here I was, now looking at the rotation matrix generated by the negative quaternion. The numbers weren’t all exactly the same as those from the positive case, but they were so close that it couldn’t really matter. Less than one part in four million difference for the numbers that were different, and some of the numbers were exactly the same.</p>
<div id="attachment_5851" class="wp-caption alignleft" style="width: 205px"><img src="http://www.iracing.com/wp-content/uploads/2011/02/iracing-qcircles4.jpg" alt="Even half a cent added up for an entire lap is real money! " title="iracing-qcircles4" width="195" height="227" class="size-full wp-image-5851" /><p class="wp-caption-text">Even half a cent added up for an entire lap is real money! </p></div>
<p>Some of you may be wondering why the numbers were different at all. Some of you may be wondering why you’re still reading this. Some of you aren’t still reading this. For the first group, I’ll tell you: round-off error. Arithmetic on a computer is almost always done with a limited amount of precision, and the precision used in iRacing is generally the twenty three bits of mantissa in an IEEE format floating point number. That jargon is pretty much demanding an explanation, but time is too short for that. The only important thing to know is that one part in four million is a difference of plus or minus one bit of precision in a floating point number. Round-off error is just what you get when you’re trying to split the bill for $25.85 at a restaurant two ways, and you get $12.92 and a half cent. There is no such thing as a half cent, just as there is no such thing as a twenty fourth bit of precision in an IEEE float. Someone’s going to have to pay $12.93, and someone gets a better deal at $12.92. In restaurant bill terms, the negative quaternion was getting stuck with $40,000.01, and the positive quaternion was getting off with $40,000.00. Round-off error just doesn’t matter, for the most part, since it tends to be random and cancel itself out. Split a million restaurant bills, and you’re not going to save a ton of money on the round-off  . . .  unless you always get to save the half cent. But here is the interesting thing: the negative quaternion was always getting the larger restaurant bill!</p>
<p>The reason that’s the case has to do with the computer’s “round-off” mode, which controls which way the half cent (half bit) gets rounded. And it turns out to be significant. Almost all the force vectors, velocity vectors, and acceleration vectors that are used to move the car in the simulation are multiplied by this rotation matrix. That means on average, when the quaternion is negative, all these vectors end up being about one bit of precision (one part in 4 million or so) longer than when the quaternion is positive. When you use all these very slightly longer vectors for an entire lap at Talladega, you get a measurable time difference. That’s because you’d have a teeny amount more downforce, and a teeny amount more cornering force, and a teeny amount more velocity, plus probably other effects that helped you go just a teeny amount faster! So there wasn’t a bug, but just a piling up of round-off error one way or another for an entire lap. Amazingly, the top twenty drivers in the Nascar iRacing Driver’s World Championship field qualified entirely within that accumulated round-off error!</p>
<p>So the mystery is now understood (and fixed with an update scheduled this week), and I can sleep better at night without these eerie Q circles interrupting my dreams. And you can just roll straight out of pitlane, confident that if other drivers are driving in a circle, they’re only making themselves dizzy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iracing.com/q-circles-the-crop-circles-of-iracing/feed/</wfw:commentRss>
		<slash:comments>93</slash:comments>
		</item>
		<item>
		<title>The Sticking Points in Modeling Tires</title>
		<link>http://www.iracing.com/the-sticking-points-in-modeling-tires/</link>
		<comments>http://www.iracing.com/the-sticking-points-in-modeling-tires/#comments</comments>
		<pubDate>Mon, 24 May 2010 14:58:40 +0000</pubDate>
		<dc:creator>DaveK</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.iracing.com/?p=3826</guid>
		<description><![CDATA[<a href="http://www.iracing.com/the-sticking-points-in-modeling-tires/"><img align="right" hspace="5" width="200" height="140" src="http://www.iracing.com/wp-content/uploads/2010/05/a_000285_large-200x140.jpg" class="alignright wp-post-image tfe" alt="a_000285_large" title="a_000285_large" /></a>Tires are perhaps the least well understood parts of road-going vehicles, despite the fact that they are one of the most studied. Obviously, since they are typically the only part of a car in contact with the ground (if everything is working right), their behavior is critical in determining how a car handles, how well [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-3878" title="a_000285_large" src="http://www.iracing.com/wp-content/uploads/2010/05/a_000285_large-330x224.jpg" alt="a_000285_large" width="330" height="224" /></p>
<p>Tires are perhaps the least well understood parts of road-going vehicles, despite the fact that they are one of the most studied.  Obviously, since they are typically the only part of a car in contact with the ground (if everything is working right), their behavior is critical in determining how a car handles, how well it grips the road, and so ultimately, how fast it can go.  It has been said that if horses complained, the pneumatic tire would have been invented in ancient times.  But it took until the 1800’s and the invention of the human-powered bicycle before it was discovered that an inflated tube of air (thank you, John Dunlop) covered by vulcanized rubber (thank you, Charles Goodyear) was a darn sight better at rolling across the ground than a wooden hoop covered with a strip of iron.  Maybe if the ancients had invented them, rubber tires would be better understood by now.  I like to joke that I’ve spent my entire adult professional life studying tires, with a few other odd assignments thrown in.  That’s what it feels like, anyway, since everything else seems pretty straightforward by comparison.  Needless to say, most people, when they hear that my specialty is tire physics, tend to turn and walk (or run) away.  So I couldn’t believe my good fortune when Steve asked if I would write a blog post about the tire model I’ve been working on.  This might take a while, so grab a sandwich, or better yet, a strong cup of coffee, and read on:</p>
<p>What is a tire model and why do we need one?  A tire model is a collection of mathematical formulas, along with a bunch of numbers to plug into those formulas, that when given some basic information about how fast and in which direction a tire is going, what it’s contacting and at what angle, can spit out the forces that the tire exerts on the car.  That’s pretty much it.  There are a bunch of other force models needed for a racing simulation as well: the aero model—the forces that air is exerting on the car; spring and damper models—the forces that are exerted by the suspension elements; engine and drivetrain model—the forces that spin the drive wheels; brake model—the forces that stop the wheels from spinning; gravity—a gloriously simple force (from a racing sim’s point of view) that makes things fall and hit the ground.  When we know all these forces, we can plug them into a complicated version of Newton’s F=ma (force = mass times acceleration) equation, and voila, we get the car’s and all of its component parts’ accelerations.</p>
<p>It’s important to be able to figure out how moving things accelerate, since what we really want to know at the end of all the math is where all those moving things are at a particular instant (like the instant we draw a pretty picture from the cockpit of an iRacing car).  To know where things are at any instant, we need to know where they were a short time ago (their positions), and how fast they were moving between then and now (their velocities).  If we know how fast they were moving a short time ago, and we can figure out their accelerations between then and now, then we can do a pretty good job of figuring out their velocities between then and now, and so we can figure out where they are now (at least we can make a pretty informed guess).  If this all sounds kind of circular, like we need to know where we are in order to know where we are, then you are understanding it perfectly.  Two things save us: one, the fact that in our universe stuff doesn’t teleport around like in Star Trek (in other words, positions don’t suddenly change in unpredictable ways, at least for stuff bigger than elementary particles), and two, the velocity of stuff doesn’t change unless a force is acting on it.  The ancients didn’t have that second one quite right. It took thousands of years to figure that out, so don’t feel bad if this is making your head spin.</p>
<blockquote><p>Tires are perhaps the least well understood parts of road-going vehicles, despite the fact that they are one of the most studied.</p></blockquote>
<p>So this is why we need the force models for sim racing.  They give us the accelerations we need (how much the velocities change).  We take those accelerations, add them to the car’s and components’ velocities, take those velocities, add them to the car’s and components’ positions, and repeat, a zillion times a second.  Every once in a while we draw a picture on screen with the car and all its parts in the correct positions (and with all the other cars and their components in the correct positions).  That’s basically it, anyway.  We need to do these calculations many times per second because, while the positions and velocities don’t change very fast (not in a thousandth of a second, anyway), the forces can change very rapidly. To get an accurate simulation, we need to compute those forces really, really  frequently.  We also need to have good models for the forces—that is, the models need to produce the correct forces in any given situation.  Most of the forces are surprisingly simple, or at least they can be modeled fairly simply, and any additional complexities (for example, due to temperature) can be handled fairly easily.  The two main exceptions to this are aerodynamics and tires, and of the two, tires are more difficult to model.  </p>
<p>It turns out that almost all the forces depend primarily on the positions and velocities of the car and its parts.  For example, the force exerted by a spring is a fairly constant multiple of how far it is compressed (or stretched).  The force exerted by a damper (shock absorber) is a fairly simple function of how fast the damper is being compressed (bump) or expanded (rebound).  Aerodynamic forces, while being fairly complex in origin, can be neatly computed from the air speed, air density and a small number of coefficients (fancy term for numbers) that depend only on the orientation of the car relative to the moving air.  Gravity is ridiculously simple, always exerting a fixed force in a fixed direction (downward). </p>
<p>The forces exerted by a tire are not so simple, unfortunately.  They depend on the position and velocity of the wheel on which the tire is mounted, as well as its angle relative to the ground (its camber).  They also depend on the type of surface it’s touching (grass, concrete, asphalt, etc.), the shape of the tire carcass, the tread rubber compound properties, the inflation pressure, the tire temperature (many temperatures, really, around and throughout the tire), the amount of tread rubber wear, the temperature of the road surface, how heavily the tire is compressed into the surface (the load), how fast the wheel is spinning, even the small amount that the tread belt is deflected away from its usual position by these very tire forces!  Let’s not even start on surfaces covered with various lubricants like water, coolant, oil, sand, etc.</p>
<div id="attachment_3881" class="wp-caption alignleft" style="width: 340px"><a href="http://www.iracing.com/wp-content/uploads/2010/05/Dave-Checks-Tire-at-Calspan.jpg"><img class="size-medium wp-image-3881" title="Dave-Checks-Tire-at-Calspan" src="http://www.iracing.com/wp-content/uploads/2010/05/Dave-Checks-Tire-at-Calspan-330x385.jpg" alt="Dave-Checks-Tire-at-Calspan" width="330" height="385" /></a><p class="wp-caption-text">Gathering real-world data for the iRacing tire model – Dave Kaemmer checks a tire on Calspan’s Tire Industry Research Facility test rig.</p></div>
<p>Any attempt to measure tire forces inevitably runs into the problem that all these variables are changing all the time.  It becomes very difficult to determine just which property of a tire is having which effect on the overall force generated.  As you take a tire and steer it on a tire tester, the surface temperature climbs rapidly and heat begins conducting into the tread, changing its characteristics, plus the carcass deflects, which changes the effective steering angle and camber angle.  If you try to see what happens at large sliding angles, the tire wears away rapidly, and the temperature skyrockets (producing a lot of noise and smoke, which is pretty cool, by the way).  This is not helpful when trying to come up with a good tire model.</p>
<p>There are a couple different ways to attack this problem.  One is to measure the forces generated by a tire in as many different configurations as you have the time and money to do (different speeds, loads, pressures, etc.), and come up with “mathematical curve fits” that pass through the measured data as best they can.  This is called an “empirical” model, empirical meaning based on observation or experiment.  The other way is to try and come up with a theory that predicts what the tire forces would be in all these different configurations.  Ideally, such a theory would only need a few basic measurements, and would produce accurate forces in many different situations.  This is called a “theoretical” or “physically-based” model.</p>
<p>There are examples of both that have been used in automotive tire simulation for decades.  The most well-known empirical model is Pacejka’s “Magic Formula” (that really is what it’s called by PhD’s in the field!), which can give very good results, especially when combined with “Tire Data Nondimensionalization”, which is a method for reducing the many possible tire force curves at different loads into a couple of curves, which can then be modeled with the Magic Formula.  There have been many refinements and improvements over the years to this model, and now tire companies will often identify a tire with its “Pacejka coefficients”, the numbers to plug into the Magic Formula to obtain the tire force curves.  The refinements have led to models that account for pressure, load and temperature changes, in addition to other improvements.  Pure theoretical tire models such as “The Brush Model”, and the “Stretched String Model” have tended to be a bit simpler, and are used more to explain why the empirical models’ curves look the way they do than to predict what those curves will be exactly.</p>
<p>I’ve been talking a lot about “tire force curves” without much explanation.  Let’s introduce a picture:</p>
<p><img class="alignnone size-full wp-image-3829" title="tire-graph" src="http://www.iracing.com/wp-content/uploads/2010/05/tire-graph.jpg" alt="tire-graph" width="660" height="379" /></p>
<p>There are several different force curves that we’re interested in with a tire, but this is the important one, and it serves to illustrate a number of things.  Plus you probably only have one cup of coffee, and time is running out on me.  What you see here is a graph of a tire’s force parallel to the road surface versus a quantity called “slip”.  This parallel force could be forward or backward (acceleration or braking), which is called “longitudinal”; it could be sideways (cornering), called “lateral”; or it could be a combination of both together.  This curve has roughly the same shape no matter which direction we’re talking about, basically.  Slip is a measure of the difference in speed between the tire carcass and the road surface.  In the longitudinal direction, the slip is usually referred to as “percent slip”, or % slip.  If a rear wheel is spinning at a speed where the tire carcass is travelling at 110 mph, but the car’s speed over the road is just 100 mph, then the tire is operating at 10% slip.  In the lateral case, if the car is travelling 100 mph, but it is cornering hard and facing left at a 5 degree angle to its direction of travel, the tire is operating at a “5 degree slip angle”.  In both cases, the tire appears to be “slipping” across the road, but in fact the tread rubber is just being stretched when it is in contact with the ground, and then it snaps back into place when it leaves the ground at the back of the “contact patch”.  When the slip exceeds a certain amount (as you move to the right on the graph), the contact patch does start sliding (usually near the back of the contact area where the rubber is stretched the most), soon afterwards the force reaches a peak, and then starts falling as the tire’s slip increases still further.</p>
<p>This is just one representative curve which might be the correct curve for a given tire in one particular situation.  The difficulty is that as conditions change (and they change very rapidly, all the time) the correct curve changes size and shape.  As you drive through a corner, you might travel up one curve, and come back on a different one, because the temperature of the tire has changed, for example.  So we need to figure out how and why these curves change.  The force versus slip curve has certain characteristics that do stay mostly the same, so let’s look at it more carefully.</p>
<blockquote><p>Any attempt to measure tire forces inevitably runs into the problem that all these variables are changing all the time</p></blockquote>
<p>Note that there are three main zones in this force curve: 1) the linear zone in green, when turning the steering wheel more makes the car turn more (i.e. more slip = more force)—where we should always be when driving on public roads, 2) the limit zone in yellow, where the steering wheel becomes just a braking device, the tire starts to squeal happily, and racers make their living (more slip = no real change in force), and 3) the scary zone to the right in red, which is exciting, but not fast, and much rubber is disappearing from the tire surface (more slip = less force).  We have discovered over the years from a lot of driver feedback in the simulation that the width of the limit zone and the steepness of the scary zone as you fall into it have a dramatic effect on the “drivability” of a car, and whether or not the tire model feels like a real tire.  In order for a racing simulation to properly reproduce the handling characteristics of race cars, you need a tire model that reproduces all three zones well.</p>
<p>Right away, this becomes a problem.  The reason is that pretty much nobody is all that interested in the scary zone; they mostly want to avoid it (except for the alternate universe of drifting).  Even when testing tires, the scary zone just does too much damage to the tires and so it’s very expensive to test there.  Hence there’s very little scary data.  If you look at enough measured tire force curves, you’ll see that most of them don’t even extend into the scary zone.  When they do, you’ll notice that while empirical curve fits can be really good in the linear and even the limit zones, they don’t really fit the data well in the scary zone.  But they don’t need to, for most purposes.  No tire company can sell their tires using the pitch, “Our tires have really good scary handling.”  They can sell them based on how good the wet skid resistance is, since that is a number required to be tested for all passenger tires that are sold.  So unlike most of the scary zone, there is a lot of data for the far right, lowest part of the scary zone, which is where wet skid resistance is measured (tire locked up, sliding on wet pavement).  But even that is of little help for tire modeling, since the force at that point is as much a function of the pavement surface as of the tire itself.  Also, water dramatically changes what that zone looks like, so all that data doesn’t help on a nice, dry, sunny day.</p>
<p>It gets even worse when we consider that the limit zone (the racer’s office) depends on what is happening in the scary zone.  This is because what’s really going on in the limit zone is that the tire is doing both some of its linear thing (stretching the tread rubber), and some of its scary thing (whatever that is) at the same time.  The limit zone is just a result of the mixing of the linear and scary zones as we increase the slip.  So if we don’t really understand the scary zone, we don’t really understand the limit zone either.  Up until not too long ago, the scary zone was keeping me up at night.  However, when we did tire measurements last year at a tire test facility, we went ahead and destroyed quite a few tires with different constructions and tread compounds in order to see what they did at very large slip angles and at a bunch of different speeds, loads, and pressures.  We were able to get some good scary data.  I have been digesting that ever since, and am happy to say that I have come up with a model that is both based on some sound theories, and that produces curves that look like our measured data, which is no small thing, since the data is all over the place!</p>
<p>The other good news is that the linear zone is measured and studied a lot, and although it’s pretty complicated (it still depends on load, pressure, camber, tread rubber characteristics, tire carcass shape and stiffness, tread pattern, tread temperature, tread wear, speed, and some other things), it is possible to break it down into understandable pieces, and make some progress toward a theoretical model.  That is what I have been doing, on and off, for quite a while now.  So I think I have a good theoretical model for all three zones.</p>
<p>Why not just use an empirical model and be done with it?  Wouldn’t that be easier?  Well, it would be easier to code up the model, but it’s much more complicated to tweak and tune it so it has the right characteristics in all sorts of conditions (different loads, pressures, temperatures, etc.)  Empirical models work well when the conditions can be considered to be fixed, as they might be for a passenger car with the recommended pressures travelling at highway speeds and below.  But they become unwieldy in the racing environment, with large temperature changes, pressure changes, aerodynamic downforce and high loads from high-speed, high-banked tracks, along with the need to model curb hits well, and so on.  There are just too many different things to measure, and it would be too expensive in terms of tires and time to test them in all necessary conditions.  A decent theoretical model, though, should give reasonable responses even when the tire is doing crazy stuff, which on a race track is a lot of the time.</p>
<p>At the end of the day, what does all this mean?  Well, I hope it means that once I finish this up, driving a race car on iRacing will be even more like the real thing, and the job of getting the tires right for each car will be a lot easier.  That in turn will allow us to improve some of the other force models, as well.  And that will continue to give us all more insight into what’s going on out there on the racetrack, increasing our enjoyment of the world’s greatest sport!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iracing.com/the-sticking-points-in-modeling-tires/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Safety Ratings—a cure for the mayhem in online racing games?</title>
		<link>http://www.iracing.com/safety-ratings-a-cure-for-the-mayhem-in-online-racing-games/</link>
		<comments>http://www.iracing.com/safety-ratings-a-cure-for-the-mayhem-in-online-racing-games/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 20:54:26 +0000</pubDate>
		<dc:creator>DaveK</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.iracing.com/?p=2904</guid>
		<description><![CDATA[<a href="http://www.iracing.com/safety-ratings-a-cure-for-the-mayhem-in-online-racing-games/"><img align="right" hspace="5" width="200" src="http://media.iracing.com/wp-content/uploads/2010/03/DSC_7735-LoRes-Aftermath.jpg" class="alignright wp-post-image tfe" alt="Dave Kaemmer Crash" title="Dave Kaemmer" /></a>Back when sanctioned multiplayer online competition at iRacing was still just a plan brewing, we faced a difficult question: How do we keep people from overdriving their virtual cars and wrecking everyone else (or at least minimize it), in order to make online racing more like real world on-track time? Our answers to this question [...]]]></description>
			<content:encoded><![CDATA[<p>Back when sanctioned multiplayer online competition at iRacing was still just a plan brewing, we faced a difficult question:</p>
<p>How do we keep people from overdriving their virtual cars and wrecking everyone else (or at least minimize it), in order to make online racing more like real world on-track time?</p>
<p>Our answers to this question eventually resulted in the safety rating system that seems to generate a lot of heated debate.  I thought it would be a good idea to explain the philosophy behind the system in more detail, including its historical roots.  That way, there’s more fuel for the debate!</p>
<p>Online racing games, as much as we try to re-create the real-world experience, will probably always permit crashing that is safer, cheaper, and more convenient than in real racing.  That’s why we do it!  However, the lack of fear for personal safety, coupled with the instant repairs and miniscule repair bills, lends sim racing a well-deserved reputation for barely controlled mayhem.  Taking that mayhem as a given, we needed to come up with some incentives at iRacing that would help produce cleaner, more realistic online races.</p>
<p>One of the many ideas we considered was to actually charge small amounts of money for “crash damage.”  This would provide a parallel to real life racing, in that repairs are paid for by the car owner, no matter who is at fault.  However, it could be argued that that would give iRacing an incentive to encourage more crashing, and we definitely don’t want that.  We could address that concern by giving the money to charity, or providing it as prize money.  The biggest downside, though, is that having to pay repair costs, no matter how small, would seriously escalate the bad feelings (i.e. testosterone-fueled anger) that inevitably result from just about any mishap on track.  One good thing about crashing in real life is that you are so happy to be alive afterwards that you feel a lot less angry about it, even if it was somebody else’s fault.  That’s not the case online, which is just another downside to the safety and convenience of simulated crashing.  So we abandoned that idea.  We have no need for more post-crash anger.</p>
<p><a href="http://media.iracing.com/wp-content/uploads/2010/03/DSC_7735-LoRes-Aftermath.jpg"><img class="alignnone size-large wp-image-2913" title="Dave Kaemmer" src="http://media.iracing.com/wp-content/uploads/2010/03/DSC_7735-LoRes-Aftermath.jpg" alt="Dave Kaemmer Crash" width="660" height="313" /></a></p>
<p>In the end, we implemented several things which, taken together, encourage driving in a safer manner.  One is to require drivers to use their real names, in order to provide a little accountability and less anonymity to hide behind.  Before you can race at a real track, you need to show your driver’s license, sign a release under your real name, and generally let other people know who you are.  Keeping our reputations intact is a powerful incentive for (most of) us to behave ourselves.</p>
<p>Another way we try to improve overall safety is by starting new members as Rookies in less powerful cars, and have a racing license progression that allows them into faster, more difficult cars as they learn.  In the real world, no-one steps into an Indy car on Day One of their driving career, and with good reason.  It makes a lot of sense to work up to speed slowly, only moving to faster cars once you have mastered a slower one.  How can we tell when someone has “mastered” a car?  In the real world, the answer is when they have enough money for a faster one.  That is only partly a joke!  In fact, a driver who wrecks a lot of equipment is costing someone a lot of money, and that does tend to trip-up that driver’s career.</p>
<p>In iRacing, we decided that advancement to faster cars should be based only on drivers’ safety records, and not on how fast they are.  In online racing, we need to emphasize safety over speed in order to minimize the on-track mayhem.  In real life, the importance of safety is so obvious as to almost go unstated.  It is just not considered good form to lose control of your race car, for any reason.  “That idiot wrecked me!” only works a few times as an excuse before instructors and officials start raising their eyebrows and wondering if maybe there’s more than one idiot involved.  Being fast is good, but being safe is better.  It turns out that being safe is faster, too, in the long run.  New drivers usually aren’t able to drive the car at the limit of the tires’ capabilities without taking a lot of risks—they reach their own limits as a driver before they reach the limits of the car, so they tend to think that faster = scarier, or, “to go faster I need to be more aggressive.”  As drivers gain experience, they learn to control the car safely even beyond the limit, in the scary, but slower, sliding portion of the tire force curve.  Once drivers are able to do that, then they are able to work on consistently keeping the car at the peak of the tires’ capabilities, while not coming anywhere close to the limits of their ability to control the car.  So the fastest drivers aren’t fast because they are being more aggressive, they’re faster because they have learned more skills.</p>
<p><img class="alignright size-full wp-image-2912" title="safety-rating" src="http://media.iracing.com/wp-content/uploads/2010/03/safety-rating.png" alt="safety-rating" width="182" height="253" /></p>
<p>Unfortunately, it’s not possible to learn those skills without taking some risks.  However, the best way to learn is to find a balance between pushing yourself to go faster, and keeping your aggression under control, so you don’t crash too often.  The iRacing safety rating, or SR, system is designed to give you some clues about how well you’re doing at finding that balance.  A simple rule of thumb is this:  if your SR is in the 2’s or below, you need to work on controlling your aggression—take fewer chances, don’t fight so hard to gain (or maintain) a position, use patience, and concentrate on driving cleanly.  If your SR is above 4, you are doing well at driving safely at your current license level—you could stand to push yourself a little harder to find some more speed.  If your SR is in the 3’s, you’ve found a good balance.</p>
<p>You should generally find that if you work on staying out of trouble, you will have better finishes in races.  If you find that other people are crashing you out all the time, you need to seriously think about whether you would drive the way you are driving if you were in a real car.  In almost any incident involving two or more drivers, all the drivers share some responsibility—maybe not equal blame, but if you are even five percent at fault, you might have been able to avoid it.  If you are truly zero percent at fault, you don’t need to worry too much, since those kinds of accidents are rare, and shouldn’t impact your SR in the long term.</p>
<blockquote><p>How do we keep people from overdriving their virtual cars and wrecking everyone else (or at least minimize it), in order to make online racing more like real world on-track time?</p></blockquote>
<p>Notice that at each license level, the expectation for safe driving is set a little higher.  If you are a Class D, 4.5 SR driver and are promoted to Class C, your SR is reduced by one to 3.5.  In other words, what’s a great level of safety for a Class D racer is only a good level for a Class C racer.  As you move up the license ladder, you’ll need to stay focused on driving safely, but that should become easier as you gain experience.  A lot of people watch their SR too closely—the hundredths digit doesn’t really matter (neither does the tenths, frankly), other than to give you an indication at the end of a session whether your driving during that session was considered safe (SR moves up), or not so safe (it moves down) for your license level.  In the longer term, it will move to where it reflects your safety level, regardless of whether you’ve had a streak of bad luck or good luck.  Then use the 2 (ease up), 3 (good work), 4 (go faster) rule of thumb.  Of course, with the Fast Track promotions, you’ll be put right back at a 3, one license level up, unless you are a Class A driver.  We hope the SR system is helping you to drive within yourself, and to have better races online!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iracing.com/safety-ratings-a-cure-for-the-mayhem-in-online-racing-games/feed/</wfw:commentRss>
		<slash:comments>65</slash:comments>
		</item>
	</channel>
</rss>

