Code Monkey home page Code Monkey logo

carnd-pid-parameter-optimization's Introduction

CarND-PID-Parameter-Optimization

Twiddle (Coordinate Ascent)

Term 2 Lesson 16 of the Self-Driving Car Engineer Nanodegree program through Udacity presents a challenge to implement the Twiddle algorithm in Python with a 10ยฐ steering drift.

In the Udacity discussion forum, Andres Castano observed in 2012, that the Twiddle algorithm might be improved some orders of magnitude simply by adjusting the increase/decrease amount from 10% to 72.4%. (See 2012-TwiddlingTwiddle-Castano.pdf in this repository.) I coupled this mechanism with an iterative restart procedure, to converge on a set of parameters that moves a robot/vehicle less dramatically toward the reference line while achieving an error below 1.0e-10.

For comparison, the diagram below illustrates a default parameter optimization using the standard Twiddle algorithm, if initialized with ๐œp=0, ๐œi=0, ๐œd=0. Note how the solid green line overshoots the reference (red) line by more than 0.75 and then doubles back to eventually stabilize.

Reference

On the other hand, when initialized with the values ๐œp=0.86933, ๐œi=0.014547, ๐œd=8.785924, then a different optimal solution approaches the reference (red) line more gradually with minimal overshoot. This result is found in 16 iterations using the modified Twiddle with a tolerance of 1e-07 and total error of 9.25e-11. It is not the lowest error possible, but the resulting trajectory is smoother and more logical.

Results

carnd-pid-parameter-optimization's People

Contributors

jwdunn1 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

carnd-pid-parameter-optimization's Issues

Provide more insight into 10% vs 72.4% value

Hello James - I stumbled across your repo when looking into Twiddle. I think it would be interesting and useful if you provided more context for this line in the README:

In the discussion forum, Andres Castano observed in 2012, that the Twiddle algorithm might be improved some orders of magnitude simply by adjusting the increase/decrease amount from 10% to 72.4%.

I guess this is the same Andres who worked at the robotics division of NASA / JPL. I see he's posted other writeups (like this one) based on Udacity CS373 forum discussions. So I presume he'd have no objection to you do something similar and quoting his posts or the whole thread here for reference.

If moving from 10% to 72.4% leads to such an improvement to Twiddle, it'd be interesting to see a bit more explanation of why this is so - and perhaps some insight into why Sebastian Thrun might have missed this previously. 72.4% sounds very exact, i.e. not just some ball-park figure, it'd be interesting to know how Andres or you came up with this value.

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.