GithubHelp home page GithubHelp logo

pid-controller's Introduction

PID-Controller

Predicting steering angles using PID controller given the cross track error.

A PID (Proportional, Integral, Derivative) controller is a control loop feedback controller which is widely used in different control systems.

The cross track error obtained from the simulator can be calculated as below: cte = current_position - reference_trajectory

Using only the (P) component or the proportional component of the PID controller, output is proportional to the cte. It takes into account only the present value of cte. But since it only considers present value it overshoots after certain point of time.

Integral term (I) which is the sum of all cte over the entire time is used to reduce systematic bias. But one other thing here i tried is using the sum computed only over the last 10 frames and not complete past time. This seems to work little better partly and not for all regions of the track. It works better certain times because i feel certain errors that may have occurred earlier wouldn't affect the current computation and thus provides better results. Also for certain regions it does not work better and the reason i think is the complete integral over time does help the system in future predictions or measurements by tuning the error terms.

With differential (D) part, the controller output is proportional to the rate of change of cte . The parameter is used to reduce overshooting caused by the P component.

Tuning

Initially twiddle was used to compute the values but then I did not obtain values that worked perfectly without too many wobbles. So I had to tune it manually after certain point of time. Currently it doesn't drive perfectly smooth but lot better than just the values obtained using twiddle.

pid-controller's People

Contributors

vikramnagashoka 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.