Giter Club home page Giter Club logo

optimization-f1-dynamics's Introduction

Optimization-F1-dynamics

Everyday, in motorsport ambit, engineers, mathematicians and physicists study how to improve the performance of a competition car. In this report we will study, from a mathematical point of view, the minimum time vehicle manoeuvring problem.

With the aim of solving this problem, we start by defining an optimal control problem, which will provide us the optimal speeds and accelerations over a fixed path. The calculus of the optimal speed for a given path is implemented in Matlab and numerical results will be seen for different circuits. Once we computed the optimal speeds, we will note about the importance of updating the path for improving the fast lap.

In this repository we find the different packages and Matlab scripts needed to compute the optimal speed, the lateral forces and the best lap time.

Results

Example Circuit

For this example, we will use the clockwise circuit above this text. This track has different sections, such as straights, chicanes and open turns. The different parts of this circuit are colorized, so it will be easier to distinguish to visualize the different sections: Green for the straights, red for right turns, black for left turns and cyan for the right open turn.

The track is discretized for making this problem computationally feasible.

Friction Circle

Once the layout and the car dynamics are modelled and the code is executed, we obtain our desired results. The first metric obtained is the optimal friction circle.

The green points (straights) minimize the lateral forces and maximize the longitudinal forces (acceleration and breaking). Some of this points cannot been seen because they are superimposed between themselves. On the other hand, the points of the curves maximize the lateral forces and minimize the longitudinal forces. This means that, if the car accelerates in the middle of the turn, it will lose the control.

Acceleration, breaking and direction graphs

These 2 graphics show us the evolution of the longitudinal and lateral forces of the car along the circuit. These forces were optimized by our Matlab programs.

The first image represents the state of the driver's accelerator and breaking pedals. If the value is 7.5 it means that our fiction driver is pressing the accelerator pedal at its maximum point. On the other hand, when the graph reach the -10 value, the breaking pedal is totally pressed.

We can appreciate that, when the car is in a straight (green) the car is accelerating as much as it cans. When the driver is approaching the curve, he begins to take his foot off the throttle and starts to press the breaking pedal with the aim to enter smoothly into the turn.

The second graph corresponds to the steering wheel state. If the car is along the straights the steering wheel is in the neutral position but, when the driver is on a curve, then the steering wheel is moved to the desired direction. The value is positive for left turns (black) and negative for right turns (red and cyan).

Velocity graphs

The upper graphs show us the tangencial velocity, the tangencial acceleration and the normal acceleration. We are not talking about the last two of them because they correspond to the longitudinal and lateral forces that we mencioned before.

We decided that our car has to begin the lap in a repose state, so it will be easier to appreciate the velocity evolution along the circuit. As we can assume, the car reaches the maximum velocities in the straights and it slow down in the curves. As we mentioned before, the cyan curve has a bigger radius than the black and red curves. Having a bigger radius means that the curvature is lower, so we can deduct that the driver can go faster in this kind of curve. The graphic affirms our suspicions and we can see that the car goes faster in the cyan section than the red and black sections.

Optimal paths along the circuit

To conclude, we are going to show 4 different paths along our circuit and check which one is the best of them. All the pictures has a number above them. This number represents the lap time, so we want to reach the path that provides the fastest time.

The path that goes through the outside of the circuit is clearly the slowest of all of them. A priori, we can think that the path that goes through the inside of the layout could be the faster, because in this way the car travels less distance. The problem with this path is that it forces the car to take all the curve from the inside, so the driver has to break the most of the time. Finally, we have a layout that makes a combination of movements along the circuit, taking the curves as much open as it can. This path provide us the optimal time for our F1 car.

optimization-f1-dynamics's People

Contributors

andresalvcar avatar

Stargazers

Alexandra Spertini avatar  avatar

Watchers

 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.