Coder Social home page Coder Social logo

kartlapsim's Introduction

Go-kart lap time simulation

This repo contains a simple lap time simulation algorithm, applied to go-karts.

Method

It's a quasi-steady-state method, vehicle model is a point-mass. Lateral acceleration limit is determined by tyre friction. Longitudinal acceleration limit is determined by weight distribution, brake config (4 wheels or rear wheels) and tyre friction. Combined acceleration limit determined by an ellipse, defined by long and lat acc limits. Other model features:

  • Apex definition: intersection of ax for max ay with gradient of v for max ay.
  • Forward/backward calculation from apexes: longitudinal acceleration at speed (previous +- acc x euler step) and curvature includes slip angle drag, rolling and aerodynamic resistance and track inclination.
  • Euler integration used in forward-backwards calculation
  • Longitudinal tyre slip in presence of speed dependent engine torque limit (defined by torque curve) is solved using the brentq solver of scipy.optimize.

Applications

  • Example_1 is a simple lap time simulation for a mini kart at the circuit of Mariembourg
  • Example_2 contains a scan of final drive ratio options for this circuit.

The curvature data was obtained using gps logging (Mariembourg, 2019). The engine torque characteristic comes from dyno testing.

Dependencies

Tested for python 3.6 (should work above) ---Packages:---

  • matplotlib
  • numpy
  • math
  • pickle (or cPickle for Python 2)
  • scipy (specifically for scipy.optimize)
  • itertools

Develop branch

To improve precision of the method, it was attempted to include a two-track model. Solving the apex solution and acceleration is now done numerically. So far the method was not succesfull. With the scipy optimizers no reliable optima could be found.

kartlapsim's People

Contributors

svennevs avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.