Wednesday, December 15, 2010

Trail-braking: AKA, "Not driving like an idiot"

Let's get ready for the meat of tonight's discussion. You'll probably need to put on some tunes, it gets lengthy. Credit to Laura for this one (an incredibly bright masters degree aerospace engineer with a passion for wedding planning and such - hence the blog).

If you've seen my earlier sim outputs, they drive the corners at constant speed (the apex speed - it's driven as a constant radius corner). In other words, all braking and accelerating is done in a straight line. Only reason for that was for simplicity, ease of coding, and getting something simple up and running. If you were to look at a plot of the driver's instantaneous inverse corner radius along the length of the track, it would look something like this:
In reality if you drive like that, you're going to be at the back of the pack. Not going to go into the details why here - feel free to read any number of racing or driving publications. In any event, given that trail-braking (and throttle modulation out of the corner) accounts for such a big improvement in lap time I was getting pretty skeptical that my sim in it's current form would give accurate direction results at all. As an aside, you can look at 'inverse corner radius' as a way to quantify the line your driver takes over the course of a lap, or a couple laps - even if speed and lateral acceleration change. If you're data logger is grabbing velocity and lateral acceleration it's a snap. Alternatively I believe it's a canned math channel in MoTeC i2. Can't say I came up with it.

Anyway, the other night while laying in bed and I got to thinking - I'm way behind on Christmas shopping, I haven't had Peking Duck in a damn long time, was completely boggled my some woman issues from this summer, and then the next logical thought in the progression was how to solve this combined acceleration problem. Might be easy.

First step - cut in the corner into two halves.
My corners already have an assigned value for apex radius and total length / duration. I'll have to set an additional variable for apex location as a percentage of the total corner duration. This way I can look at which corners benefit from early or late apex (if I'm crazy enough to do that later on). I pick some arbitrary way of defining how the radius transitions through the corner - maybe with a spline or parabola.

Second step - establish combined slip friction ellipse
I've talked about this before here. Earlier I was talking about the ellipsoid being stretched due to downforce but you'll have it from mechanical grip as well. Simple example - you have four tires to brake with, and only two (in this case anyway) to accelerate. In addition to having the ability to specify unique values for braking and acceleration I'll probably also have the ability to have unique values with left- and right-cornering. Don't think a road course car would have an asymmetric setup? Take a look at Lime Rock Park. Might as well be NASCAR in reverse. Only has one left turn, and six rights.

Third step - solve each half's forward velocity trace
Really similar to how you'd solve a straightaway... though this time my acceleration function is going to be based on the engine torque supplied and delivered at the wheels, or the combined slip ellipse (whichever is lower).
For braking, I can do the same shit in reverse for the first half of the corner. Honestly the only hard part is going to be putting in enough code  to make it do something realistic when you have a corner that you don't brake for and accelerate through. I'll have to figure that one out later. Once I get this corner thing figured out though, the straights on either end should still solve themselves just the same. All this work is going to have to be put off until another night anyway. Still got other stuff to do tonight. Apparently there's a pro open-wheel team starting to look for FSAE grads with vehicle dynamics and simulation experience. Hmmmm. Tough life and career decisions, just as I thought I was ready to settle a bit and move back east or west. Then again, who would want to leave the wonderful world of working at a tire company?

As a final note, you'll see that I slightly changed the name of the blog. I got a kick out of it. If you don't "get it," you're missing some good books in your library.

No comments: