Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    05.05.13
    Location
    Albany, Oregon
    Posts
    5
    Liked: 2

    Default Lap time simulation

    I was looking into writing a lap time simulation program. I am a second year ME student. I have taken CS160(python programming), but I don't know enough to even think about where to start. Any suggestions from people that have or are willing to share their code. Doesn't matter what language, but prefer python and matlab as those are the tools I use most.

  2. #2
    Senior Member
    Join Date
    09.25.03
    Location
    near Athens, GA
    Posts
    1,652
    Liked: 854

    Default

    Pat,
    From the description of your proposed program, I don't understand what it is that you are wanting to do. What is your definition of a 'lap time simulator' ? Are you thinking in terms of a data acquisition program? Are you thinking in terms of a program that draws a representation of a race car on the screen to be controlled (a 'game') .. a racing SIMULATOR? I really have no idea what a lap time simulator might be in your mind .
    Steve
    Steve, FV80
    Racing since '73 - FV since '77

  3. #3
    Senior Member
    Join Date
    01.11.05
    Location
    Zionsville, Indiana
    Posts
    3,173
    Liked: 1412

    Default

    I think you will come up short of your goal. I played a bit with simulations, very simple models. The limitation was the tire data and how to model that accurately. There just was not enough tire information to construct a useful model. I was working as an Indy Lights engineer at the time.

    But maybe there is sufficient tire data for you to succeed. Tires on race cars are like wings on airplanes. We have a way better understanding of how wings work that tires.

  4. #4
    Contributing Member TimH's Avatar
    Join Date
    12.13.10
    Location
    Tempe, AZ
    Posts
    2,643
    Liked: 1117
    Caldwell D9B - Sold
    Crossle' 30/32/45 Mongrel - Sold
    RF94 Monoshock - here goes nothin'

  5. #5
    Senior Member
    Join Date
    05.11.07
    Location
    Southeast MI
    Posts
    735
    Liked: 254

    Default Build your own

    Quote Originally Posted by ApexMotorsports View Post
    I was looking into writing a lap time simulation program. I am a second year ME student. I have taken CS160(python programming), but I don't know enough to even think about where to start. Any suggestions from people that have or are willing to share their code. Doesn't matter what language, but prefer python and matlab as those are the tools I use most.
    I suspect you'll have a hard time starting with someone else's code or a pre-developed program. Part of the issue is that if you don't understand how the calculations are made you'll never have a real solid confidence in the results. Garbage in = garbage out. Without a good understanding of the assumptions the authors have taken you can't really have an accurate understanding of what the results output. Part of the reason for this is the requirement to correlate on track data with the simulation. As much time is spent correlating the car to the sim as is spent iterating thru designs on the sim.

    My suggestion would be to build your own sim. About 10 years ago I built an Excel based simulation. It was pretty simple, but for the purposes I wanted to use it was worthwhile. There was a lot I learned throughout the process. The goal was to evaluate some high level design paths (downforce vs drag/power). Using on track data it was possible to build something reasonable enough to quantify which path would be more fruitful. The sensitivity to the changes was beyond the noise factor. It was time consuming and limited to 1 track but it did teach me a lot and pushed me in a direction that indeed made my car quicker. The follow up, which I never got around to, was to program it into Matlab so that I could stream line the process of calculating a conclusion. The math to build such a model is well within a 2nd year ME's capability. In the end you'll learn way more than simply plugging values into a previously existing sim.

    Plus, you can develop it further as you go. Adding in higher fidelity modeling as you see fit.

  6. The following members LIKED this post:


  7. #6
    Senior Member David Ferguson's Avatar
    Join Date
    09.06.02
    Location
    Paso Robles, CA
    Posts
    1,165
    Liked: 286

    Default

    If you want to do this for the programming challenge, then have at it. If you want to learn how a simulator might work, or just get good at using one before you start writing your sim, I suggest you start with the free OptimumLap from Optimum G:

    http://www.optimumg.com/software/optimumlap/
    David Ferguson
    Veracity Racing Data
    Shift RPM App for iOS
    805-238-1699

  8. #7
    Senior Member
    Join Date
    01.11.05
    Location
    Zionsville, Indiana
    Posts
    3,173
    Liked: 1412

    Default

    Pat,
    You are getting advise from some guys who rally know what the are talking about. Follow their suggestions.

  9. #8
    Member
    Join Date
    05.05.13
    Location
    Albany, Oregon
    Posts
    5
    Liked: 2

    Default

    Quote Originally Posted by 2BWise View Post
    I
    Using on track data it was possible to build something reasonable enough to quantify which path would be more fruitful.
    I have access to several lap time tools that are very impressive. I am doing it mostly to learn, not that I don't have other ways to find solutions. (I have limited access/ budget for chassis sim, have optimum lap on my computer, etc). My dream job is being a race engineer, so learning this type of thing is pretty much a must in my estimation.

    More or less the reason I want to build a simulation program. I think the problem I am having is figuring out is the sequencing. Suggested reading?

    I am at the point where I am fine with solving problems in class. But trying to do the programming is like reading tea leaves lol. ( had a fair amount of help to write a hangman program). I have figured out some handy things to do with logged data. (Second year since it's summer lol)

  10. #9
    Senior Member
    Join Date
    01.11.05
    Location
    Zionsville, Indiana
    Posts
    3,173
    Liked: 1412

    Default

    Quote Originally Posted by ApexMotorsports View Post
    My dream job is being a race engineer, so learning this type of thing is pretty much a must in my estimation.
    I spent over 20 years working as a race engineer. I came to that job as some one who had designed race cars and driven what I had designed. I started driving FV and moved to FF and finally FSV. I was at the beginning of the expansion of rear engine, small bore, formula cars to oval tracks. I raced FF and FSV on ovals.

    I think that it is important to have some driving experience before you start a career as an engineer. People drive race cars, not computers. What is hard to explain about data from a race car is how what you see relates to what the driver is thinking as he drives. The driver's mind in ahead of the car. He comes up to a corner and executes a plan. What you see on the data is what the result of that planned execution plus any reflexive reactions he had as he executed the plan. His mind is way down the road from what you are looking at.

    One of the very best engineers I ever worked with would spend an hour debriefing a driver and never look at the data until he had finished with the driver. He then would ask to see some data to confirm or explore some thing he had learned from the driver. This particular engineer had been a good driver in his day. Even built a car as I remember.

    In short you need to get to a race track. I would recommend that you start with go carts and work up from there. If you can get data when you drive, you will be miles a head and many of the questions you have will answer themselves as you learn to drive.

  11. The following members LIKED this post:


  12. #10
    Senior Member
    Join Date
    05.11.07
    Location
    Southeast MI
    Posts
    735
    Liked: 254

    Default

    Quote Originally Posted by ApexMotorsports View Post
    I have access to several lap time tools that are very impressive. I am doing it mostly to learn, not that I don't have other ways to find solutions. (I have limited access/ budget for chassis sim, have optimum lap on my computer, etc). My dream job is being a race engineer, so learning this type of thing is pretty much a must in my estimation.

    More or less the reason I want to build a simulation program. I think the problem I am having is figuring out is the sequencing. Suggested reading?

    I am at the point where I am fine with solving problems in class. But trying to do the programming is like reading tea leaves lol. ( had a fair amount of help to write a hangman program). I have figured out some handy things to do with logged data. (Second year since it's summer lol)
    You're going about learning the right way. It is best to understand all the tools, but I would add a lot of vehicle dynamics readings to your must-read-list as well; Gillespie, Milliken, Carroll Smith. Again, having an understanding of the inputs to a sim from a theory standpoint will help solidify your understanding of the application.

    I'm just wary of the sims if you don't have a way to correlate what you're looking to understand. I've used several of the entry level sims as well as the high end ones. They all suffer the same problem. You have to have an expectation for the output and a way to compare a real vehicle to the simulated one to have any confidence in what the sim spits out. This is especially true as you start working in suspension parameters because they can be very subtle.

    Think of building a sim similar to doing an FBD. Break down the course into different parts; straights, corners, combined events. How would you calculate the acceleration down a straight away? How do you define those initial conditions, and what are the end conditions, how do those end conditions influence the upcoming initial conditions for the following corner? Start by building an understanding of how you would build a sim first. You can do a large portion of it by hand or with excel. Then learn the coding part of it. At least, that's my opinion of how I would attack the problem.

    I can't speak for race engineers (Steve L can confirm or deny) only as a vehicle dynamics engineer, but being able to use the tools (data, sims, etc) is only a part of what it takes to be a good engineer. Having a solid understanding of the system (a vehicle) and how it functions in the real world is a huge part of it and often overlooked. The engineer with hands on, real world experience is often more useful than the one that can sit at the desk and pick out the best theoretical setup. Which is why he suggested getting out and driving yourself. Practical application of theory is the most important part.

  13. #11
    Member
    Join Date
    05.05.13
    Location
    Albany, Oregon
    Posts
    5
    Liked: 2

    Default

    Great stuff guys!

    More on my background. After I got out of the military I went to the Russell Racing School- Mechanics training program. For my trouble I got 2 classes, the Techniques of racing and advanced racing course. Also techniques of carting, easy to forget that one lol. Followed by 6 months of racing the russell series in their formula mazda style race car. I certainly wasn't the fastest, but I do have a decent finishing record... I totally get where you guys are coming from.

    I have experience in what I would say was dag/ assistant engineer type work. Before that I was an IMSA/ SCCA/ Grand Am mechanic. (I really do prefer open wheel or prototypes). So I have a decent level of physical experience with cars. However if you asked me to model an intake and simulate valve timing I would still be a little behind the curve. Moving forward, I think a lot of the design and such is going to be largely AI/ Machine learning. But I still think there needs to be an experienced driver/ engineer calling the shots. I know that a lot of simulated "setups" are undrivable for various reasons. Be it low stability index or the simulation ai knowing where the limit is all the time. I don't wanna be a guy that just depends on software tools. In my estimation I would be better overall if I could write the software tools and still be able to complete all of the mechanical engineering type work. Maybe not having the most polished programs, but being able to throw things around in python, matlab etc and come up with usable conclusions.

    I have a copy of Milliken (maybe 2), nowlan, my mentor made sure I had every smith book. I think the thing that was messing with me was where to start and how to link them together.

    Thanks for the help !! Off to class.

    https://scontent-sea1-1.xx.fbcdn.net...18&oe=5DACBEDD
    Last edited by ApexMotorsports; 07.22.19 at 5:55 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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




About Us
Since 2000, ApexSpeed.com has been the go-to place for amateur road racing enthusiasts, bringing together a friendly community of racers, fans, and industry professionals. We're all about creating a space where people can connect, share knowledge, and exchange parts and vehicles, with a focus on specific race cars, classes, series, and events. Our community includes all major purpose-built road racing classes, like the Sports Car Club of America (SCCA) and various pro series across North America and beyond. At ApexSpeed, we're passionate about amateur motorsports and are dedicated to helping our community have fun and grow while creating lasting memories on and off the track.
Social