As its exam time I have been carefully avoiding revision with a mix of counterstrike and micromouse work. New PCBs are 95% ready to be ordered and so my focus has turned to the controllers.
After implementing a fixed point maths system for the controller (10.5bits signed for those who care) and ziegler-nichols tuning the PI controller I had a one wheel mouse – putting a bit more effort in I got it to two wheels – yay.
Tuning it was a bit of a chore – so automation is king and I was able to produce this graph (yes, no axis labels, minus 2 marks for me, x is the time, y (going back into the scene) is as the gain increases and z (going up) is the velocity for said gain:
The idea is to find the point where oscillations occur, the above plot was far too noisy so a 16 point moving average was applied:
I got a value of about 1.2, but it is questionable, will compare against some simulated controllers to see if it seems a likely value – it does however work well enough to control the motors!
Now the results:
It is nice having onboard bluetooth for this sort of debugging, anyhow, things look nice – the integral term does push things out of whack when going from zero or getting down to zero – but possibly an artefact of the controller being ill tuned – there is still a large overshoot to a step input which is not what you would expect from a z-n tuned controller…
Video, go to http://www.youtube.com/watch?v=AYmkJvthVJw and click on view in HD at the bottom! or watch it in small size bellow:
Next time it will be slower and have a straight line controller built in, after that its onto cornering!
Twitter
- Wow, this hasn't been touched in a while 2 months ago
- @TMobileUKhelp Any news on the Galaxy Nexus? Some places have started reselling T-Mobile contracts, well lising them at least 2 months ago
- Woot, another train. Have coffee to keep me company tho. Crap - there are babies 2 years ago
- Interview went well, gonna take 3 hours on public transport to get back tho... 2 years ago
- Omg. £30 for a single, if I come back in peak time its gonna cost £50. My expenses claim is going to be interesting. 2 years ago
Tags
button c30 circuit diagram controller crc cybernetics desk distance dspic graph i2c infrared laser led microchip microcontroller Micromouse micromouse sensors minos name pic pic24 pic32 picture rapid prototype reading reading university robot schematic sensor sensors shapeways switch timer tmr0 tsl250 university of reading video voltage regulator wall sensor






