Giter Club home page Giter Club logo

carnd-pid-control-project's Introduction

CarND-Controls-PID

Self-Driving Car Engineer Nanodegree Program


Reflection

Describe the effect each of the P, I, D components had in your implementation

As expected, the P component affected how aggressively the vehicle steered when attempting to correct for crosstrack errors. Increasing this value would increase the responsiveness around turns (especially at high velocities, i.e. >50mph) but also increase the amount of overcorrecting and oscillations that occurred. Adjusting this parameter always required tweaking the D component, which affected the countersteering as the crosstrack error approached zero. This is again as expected. The I component did not appear to affect much of anything, and I suspect little to no systematic bias exists in the simulator.

My final parameters at safe speeds can be seen in the GIF below:

CarND simulator running a car that mostly stays in the middle of the lane lines.

The affect of the P and D parameters were, as noted above, most noticeable at high speeds. Increasing P would increase the responsiveness in sharp turns (which is all of them at 90mph), but also greatly increase oscillations from overcorrecting. Increasing D would help with this, but could also end up reducing the sharpness of a correction throughout a turn. These parameters may need to be adjusted in respect to the velocity of the vehicle, or whether or not a curve is being taken.

My project in reckless driving mode (RECKLESS = true, MAX_THROTTLE = 1.0) can be seen below.

CarND simulator running a car traveling approximately 90mph and veering within lane lines, though mostly succeeding at staying on the road.

In both examples, the PID throttle control can be seen. In my case, I choose to subject the error from the max throttle, but scale the aggressiveness of the error by the velocity of the vehicle. This ensured that the vehicle would brake hard when needing to correct for large crosstrack errors at high speeds, but would still allow acceleration of the vehicle at low, safe speeds even if the car was off-center.

Describe how the final hyperparameters were chosen.

I first attempted to use the twiddle method to adjust the hyperparameters P/I/D, but after implementing the twiddle algorithm, I found that tuning was difficult to do in a manner that was time effective, since errors taken over anything but the entire course was far too subject to noise.

I instead resorted to manually tuning the parameters and observing the effects at high speeds. I settled on the selected parameters because they give enough countersteering (D) to keep the car stable at low speeds, but still provide aggressive enough proportional steering to keep the car on the track at high speeds.

Likewise, the PID used for throttle controller was manually tuned until braking would incur properly at high CTEs.

carnd-pid-control-project's People

Contributors

baumanab avatar davidobando avatar domluna avatar htuennermann avatar jaxbot avatar swwelch avatar

Watchers

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