+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Matlab Question

  1. #1
    Senior Member
    Join Date
    Aug 2011
    Location
    Lawrence, KS
    Posts
    151
    I would like to know if there is a fast way to make Matlab to find a section of raw data from our TTC files (a sweep of slip ratios at a given load & camber angle), then "average out" the hysteresis & asymmetry in the raw data. Basically I want it to create a Fy vs SA curve fit that intersects 0 at 0 slip angle, the curve above & below 0 slip angle is symmetric, and the curve fits an average of the "up-sweep" and "down-sweep" of the Fy values.

    I'm doing this to create an MRA non-dimensional tire model. My current method has been very inefficient and slow. I've basically been going into the raw data file, manually finding the section of data I want, telling Matlab which cells to import, splitting the positive and negative SA data into 2 variables, curve fitting each section, averaging the positive SA and negative SA curves, and curve fitting that average until it looks the way I want it to. I am horrible at matlab so I know there has to be a better way than this. If anybody can help it would be greatly appreciated, and I would be glad to share my completed code when finished.

  2. #2
    Senior Member
    Join Date
    Aug 2011
    Location
    Lawrence, KS
    Posts
    151
    To make it more clear what I am looking for...

    Can I import the whole raw data file into Matlab as a matrix, then make it search for the segment of data that meets some user-specified criteria (ie: load = 350 +/- 10, camber = 0 +/- .1, slip angle between -12 and 12). Then save that segment of data as a separate matrix that I can work with more easily.

    From that point, is there another function that can make the plot symmetric about (0,0), and make a curve fit of the new points?

  3. #3
    Have you considered just using the Pacejka model that comes with the TTC data? If you want to work in Matlab that sounds like it would be by far easier. It even comes with scripts to do the exact lookups you're talking about, and you don't even need to do any fitting. I've never messed directly with the raw data myself, but I hear it can be pretty messy.
    Dr. Adam Witthauer
    Iowa State University 2002-2013 alum

    Mad Scientist, Gonzo Racewerks Unincorporated, Intl.

  4. #4
    Look at the data and find the range you want to look at (in numbers, i.e. rows of the matrix between 10500 and 17500). Then use the fit command to fit the plot. This will average out the hysteresis for an increasing and decreasing sweep.

    Why do you want the fit to intersect (0,0), and why does it need to be symmetric? From memory the Goodyear tyres at least aren't symmetric, so I wouldn't model them to be symmetric. And most of your operating conditions (hopefully) will be at some negative camber, inducing a y axis offset?

    I agree with Adambomb: use the existing Pajecka or MRA models.
    "He who dies with the most toys wins"

  5. #5
    Senior Member
    Join Date
    Mar 2008
    Location
    Brighton, MI
    Posts
    686
    You can use slip velocity as a differentiator of sweep data (pun intended). Also, I posted a method to remove the hysteresis using the cross correlation function on the TTC forum. The hysteresis value is an important tire property if you plan to use the tire data in a sim model with a driver controller.

    You can fit a spline function to the data and sample it at slip values you prescribe.

    Averaging the hysteresis data gives you the wrong answer, though. Tires don't work that way.

  6. #6
    Originally posted by BillCobb:
    You can use slip velocity as a differentiator of sweep data (pun intended). Also, I posted a method to remove the hysteresis using the cross correlation function on the TTC forum. The hysteresis value is an important tire property if you plan to use the tire data in a sim model with a driver controller.

    You can fit a spline function to the data and sample it at slip values you prescribe.

    Averaging the hysteresis data gives you the wrong answer, though. Tires don't work that way.
    "Wrong" is a bit harsh of a word. Just as "wrong" as a bicycle vehicle model or using a tire model with the exact grip and response values as seen on a flat track.

    At the FSAE level I think it best to keep things simple. The fundamentals are generally misunderstood by many, probably better to focus there than chase secondary effects.

    For that matter... doing tire data fitting "in house" at this level is just duplicating work that's already been done for you. I would argue it is not the best use of time.

  7. #7
    Senior Member
    Join Date
    Sep 2002
    Location
    Birmingham, England
    Posts
    765
    Originally posted by BillCobb:
    You can use slip velocity as a differentiator of sweep data (pun intended). Also, I posted a method to remove the hysteresis using the cross correlation function on the TTC forum. The hysteresis value is an important tire property if you plan to use the tire data in a sim model with a driver controller.

    You can fit a spline function to the data and sample it at slip values you prescribe.

    Averaging the hysteresis data gives you the wrong answer, though. Tires don't work that way.
    Sorry Bill, I'm gonna call you on this as exFSAE has.

    You are right to say that "tyres don't work that way" but if you want to be like that you can just as easily say "tyres don't work like a Pacejka model, so don't bother at all" particularly of you use a reduced version of Pacejka that you've done here in the past.

    I'll invoke Box - "all models are wrong, some models are useful"

    Ben
    -

  8. #8
    Without just giving you a direct answer - I have put quite some time into pretty much just what you're trying - I think I can put you on the right track with one line of code:

    >> help delaunay

    Welcome to big boy MATLAB, haha. Otherwise it's pretty much simple matrix manipulation and curve fitting they teach in COMP 101 to get a model like you want. Newer versions of MATLAB have a curve/surface fitting toolbox that may cut out the middle man if you want something fast but not quite as good.

    Also, I'm with woodsy96 about symmetry - there are shift components in Pacejka for a reason.

    Send me a PM if you have more specific questions.
    Austin G.
    Tech. Director of APEX Pro LLC
    Auburn University FSAE
    War Eagle Motorsports
    Chief Chassis Engineer 2013
    Vehicle Dynamics 2010-2012

  9. #9
    Senior Member
    Join Date
    Mar 2008
    Location
    Brighton, MI
    Posts
    686
    You are right to say that "tyres don't work that way" but if you want to be like that you can just as easily say "tyres don't work like a Pacejka model, so don't bother at all" particularly of you use a reduced version of Pacejka that you've done here in the past.

    I'll invoke Box - "all models are wrong, some models are useful"

    Ben

    Project Manager GT Development - Dunlop Motorsport
    Alumnus of University of Birmingham
    www.ubracing.co.uk and Formula Student Design Judge
    OK fine, I accept the change. But, why then average the data? Just feed both + and - slip rate data to the Solvers and let it do the fitting job unabridged? All I was getting at was the use of + sliprate data reduces the dataset size included in the fitting process and the hysteresis value gives you a relaxation approximation. I include Pacejka model options in all my Vehicle Dyanamic sims, even including a 4 term LapSim version which I highly recommend as a first cut.

    The solution is much more satisfactory if you fit the data without hysteresis: either remove it or choose the side of the data that's most meaningful to your vehicle program. If Pacejka is your model, then make sure you weight the fitting algorithm to optimize for limit handling fidelity. Otherwise you get a compromised fit which when used in an open or closed loop vehicle simulation may give the wrong readings because the tire comparisons will be out of resolution. You're not going to get all your tires operating at the peak slip, but probably only at the highest curvature region.

    If this were a class of high school students learning Matlab I'd be much more gentle. If you are a graduate student in this subject, you just flunked. Probably a good thing I turned down those graduate class asst. professorships, eh?

  10. #10
    Senior Member
    Join Date
    Jun 2006
    Location
    Oxfordshire
    Posts
    119
    For cornering test, the "ASCII Mixed" data sets have come "SA'd", which is Calspan's hysteresis removal procedure. The "TIRF-SA_procedure" document comes with the data and describes how this is accomplished and what the resulting data looks like.

    If you use the non "SA'd" data, make sure you take into account that there is more data in one slip direction than the other (two zero crossings in one direction, only one in the other). If you don't, your fit will not be centered on the loop.

    I agree with the others, it is most likely not the best use of your time to fit your own models. Unless of course your goal is to learn how to fit tire models...
    Chris Patton
    Vehicle Dynamics
    Global Formula Racing '10-'12
    OSU Beaver Racing '05-'09

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts