IR Light Follower for Wall-E2, Part IX – PID Tuning

Posted 16 November 2016

In my last post on this subject, I described by attempt to add PID control functionality to WallE’s IR light-following algorithm, and this is now looking pretty promising.  As an added bonus, I managed to suck my stepson Ken Frank, who graduated from Cornell with a MS in control theory, into helping me tune the PID controller. His first comment (well, the first comment after the obligatory “what have you gotten me into now, Ollie!”) was something like “you are over-controlling – you should simplify the problem and start with just ‘P’ – no ‘I’ or ‘D’. Then add P/I as necessary after getting the P value right.  Wish I had thought of that! ;-).

Anyway, I revised the code to do just that – with PID tuning parameters of 4,0,0 for both the far away and near cases, and re-ran my ‘floor range’ field test, as shown in the following video clip and plots.

Left/Right Differential (input to PID engine) and Output

Left/Right Differential (input to PID engine) and Output

All data from the run

All data from the run

More to follow…

 

After taking the above video and data, it occurred to me that it was possible (although not very probable, IMHO), that the PID engine might not normalize the tuning parameters before computing the new output.  So, I ran two more tests – one with a PID of 1,0,0, and another with a PID of 10,0,0.  These tests, along with the ones for 4,0,0, should provide some insight into that question.  As can be seen from the plots, the tracking behavior for all three PID = X,0,0 conditions are pretty similar.  I also included a video clip of the PID = 1,0,0 condition.

 

161116_floorfieldtest15data 161116_floorfieldtest16data

 

More to follow

Frank

 

620 Total Views 2 Views Today

Leave a Reply

Your email address will not be published. Required fields are marked *