View Single Post
  #15   Spotlight this post!  
Unread 28-11-2011, 19:56
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 802
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: [DFTF] Closing the loop on Wheel Velocity...

Quote:
Originally Posted by Joe Johnson View Post
I have never done this in a FIRST robot, but my background in controls, everything I have read, and my gut tells me that wheels should be driven in closed loop mode (not open loop mode, i.e. set a PWM value) AND that the closed loop should be based on velocity not position (well, I lied. It should use position but only in autonomous mode and even then a fast acting velocity loop should be then wrapped in a relatively slow acting position loop).

Drivers should command wheel velocities not motor voltages.
I think you are over thinking it.

While you can get better performance by closing the loop, driving using just PWM works pretty well. All 3 robots on the winning alliance this year drove using PWM. I would highly recommend downloading 254's code from this year, or last year, and trying the drive code that we use. It is remarkably responsive, and encourages the driving style that 254 drives with. The driver will need to correct the path of the robot as he/she is driving anyways. Closed loop control will not remove this need, and also adds in a set of corner cases that need to be carefully considered (sliding next to a wall comes to mind).

On a similar note, I believe that what you really want is to control the radius of the turn that the driver is making, like a car. This results in more consistent driving across many different velocities. This can be done with either open or closed loop control. See our code for how we do this.

FYI, I believe that the Jaguar samples at around 1 MHz. I remember getting this specification out of the manual, but it has been a while. (It debounces the signal, and the decoder runs on the peripheral clock which is probably configured at 1/4 of the speed of the main clock). If your application actually cares about this number, then I will contend that you are doing something wrong.

254's 2 tube auto mode was done with encoders to close the loop on the wheels, and a gyro to slowly update an offset between the wheels to deal with the wheels slipping relative to each other. Driving distance was done by just using the encoders, and all turns weren't declared "done" until both the gyro and the encoder errors were below a threshold. It worked well enough, and unless Auto mode becomes more complicated in future years, we will likely reuse some variant of that method.
Reply With Quote