View Single Post
  #4   Spotlight this post!  
Unread 21-08-2012, 20:54
Todd's Avatar
Todd Todd is offline
Software Engineer
FRC #1071 (Team Max)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Connecticut, Wolcott
Posts: 51
Todd is just really niceTodd is just really niceTodd is just really niceTodd is just really niceTodd is just really nice
Re: Programming Puzzle

You could also try using a PID to minimize error, rather than reach a setpoint.

IE: Rather than

My setpoint is currently 4.5 my process variable is at .1

Say

My setpoint is always 0, currently my process variable is -.6 (where -.6 is the circular difference between your 'goal' and your 'actual') then when your goal changes, the frame of reference you use to calculate your process variable changes, and your (probably only proportional gain?) controller will move your motor.
Reply With Quote