View Single Post
  #8   Spotlight this post!  
Unread 06-08-2012, 23:33
Ziv Ziv is offline
Has code to be writing...
FRC #0125 (Nutrons)
Team Role: Alumni
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Boston
Posts: 39
Ziv is a glorious beacon of lightZiv is a glorious beacon of lightZiv is a glorious beacon of lightZiv is a glorious beacon of lightZiv is a glorious beacon of light
Re: Design Process: 2012 Shooters

Brandon outlined earlier our iteration on the shooter itself. Controlling it was another interesting journey.

As he mentioned, I initially thought that controlling hood angle would be easier than controlling wheel speed. While this is certainly the case for a lead-screw hood, it is not necessarily the case that controlling shot distance with that angle is easy. Furthermore, we'd still be at the mercy of the precision of wheel control. At the scrimmage, I found as operator that I could adjust shooting distance enough with the wheel speed that a fully controllable hood was not necessary, making a pneumatic hood the correct choice.

Controlling that wheel speed was still an issue. We ended the build season and went through our regionals with a typical integrated PD loop (that is, a PID controlling the change in shooter speed with kI = 0). It gave us a short spin-up time from rest to both our fender and key speeds, with little-to-no overshoot while doing so. However, we had significant overshoot after firing each basketball that took 1-3 seconds to settle. We were having lots of other problems that were more important, and I was getting the hang of firing the next shot at the right time, so the issue was put on the back burner.

Enter championships. Anticipating more fender defense than encountered at our two regionals, we decided to focus on key shooting, and the more sensitive situation meant we needed a tighter control algorithm. Playing around with gains showed us that it was the kD term that was causing most of the overshoot. Programming the controller to recognize when we were taking shots and setting kD to 0 while the shooter speed quickly plummeted and restoring it during the following spin-up eliminated the overshoot but retained the quick shot turnaround we had previously.

At some point—I think between the Boston Regional and champs—we tried a bang-bang controller. It worked really well control-wise, but the pinions in our gearbox couldn't take it. Perhaps a faster update rate could have solved the problem.

Another interesting observation we made was that using Victors caused our speed to oscillate. Even with small gains, this didn't go away. We wonder if this might be something to do with either back-EMF or the resolution of the speed controller, but someone with a more solid control theory background would know better. Our team usually prefers Vics to Jags, but we made an exception for this.

Tom (from 254) had suggested a state-space controller to us earlier in the season, but I never had the time to go over the prerequisite math in enough detail to implement and tune one myself.