|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Programming for a Shifting Gearbox
While looking at Andrew Palardy's spreadsheet, something occurred to me which I had not thought about before. In a two speed shifting gearbox, the "low gear" will have a higher acceleration for a small time frame than the "high gear" would. And this led me to a few questions:
1) Do some teams have logic built into their code to "auto-shift" according to where the acceleration is the greatest? 2) Is there some sort of logic through the use of sensors (or other means) that can be developed so that the robot will know when it is either pushing into a stationary object (whether it be a wall or other robot) so that it can automatically shift into Low Gear to provide the extra torque needed? If other teams have used this method, can you please explain how you developed this logic? Thanks! |
|
#2
|
||||
|
||||
|
Re: Programming for a Shifting Gearbox
We have not used shifters in a few years, but when we did it was a manual shift. Mainly we had problems when we would shift under stress, such as driving at high speeds or in a pushing match. We started to round the gears down. Basically we had to do what you would do in a manual transmission car if you shift without a clutch. As long as everything was moving at about the same speed everything would shift great, but if we were really on the sticks and shifted, it would make a horrible sound due to the grinding gears.
If you are set on doing it though, it should not be too hard. You would need to figure out at what speed you want to shift. Then you would need to have an encoder on the wheels determine when you reach that speed. As for pushing, you may look at monitoring how fast you are going VS current pull. If you have high current an little acceleration, you can think that you are pushing someone or some thing. This is all of course if you are on a flat floor. |
|
#3
|
|||||
|
|||||
|
Re: Programming for a Shifting Gearbox
1. That's John V-Neun's spreadsheet. I added a few columns and a graph, but the majority of it is JVN's.
2. Yes, we have done this. Our 2011 code release includes such functionality. It's in drivetrain/autotrans.vi. Upshift is enabled and was used frequently, downshift was disabled. The driver wanted the robot to stay in high while placing a tube unless he commanded a shift, because a shift would change the turning behavior. We also never calibrated the downshifts as well as the upshift, mostly due to testing time. Since that robot had a 2-speed the logic only calculates upshift when in low and downshift while in high, if we had a multi-speed the architecture would be different but the logic would be the same. The logic works basically in three ways: power-on upshift, kickdown, and coastdown. Upshift occurs based on robot acceleration, vehicle speed, and throttle positions. Kickdown (downshift for power) occurs when the robot is decelerating, is below a vehicle speed threshold (~8fps), and the driver is not requesting slow down (sticks > 0.85). Coastdown (downshift at very low speed) occurs when the driver is not requesting power, and the vehicle speed is very low (~2fps). We never autoshift while turning, and we prevent autoshifts 500ms after any shift. We based the 2011 algorithm off our previous algorithms originating in 2004, which were developed from automatic transmission algorithms for cars. The logic is basically a bunch of thresholds on acceleration, speed, and driver input, and when they are all true it shifts. This algorithm is most useful in high-speed full field games. It is much less useful in short games where the high gear acceleration is higher (due to lower top speed), and it basically requires the shifters to shift synchronously (no servo shifting) or the robot will randomly twist during an unexpected shift, which the driver will not like. Edit: I never had any issue shifting under load with the pneumatically-shifted AndyMark transmissions. The servo transmissions wouldn't shift under load period, but the pneumatic ones seemed fine. The life cycle of an FRC robot is measured in hours, so properly greased gearboxes don't usually wear like cars. Some motorcycle transmissions shift without using the clutch, and they live. Last edited by apalrd : 27-12-2012 at 12:58. |
|
#4
|
|||
|
|||
|
Re: Programming for a Shifting Gearbox
Quote:
Quote:
|
|
#5
|
|||
|
|||
|
Re: Programming for a Shifting Gearbox
We used shifting on our 2011 robot. Our drive train was a 6 wheel tank drive with omni-wheels in front. We mounted encoders on each-side which told us the speed of each side of the robot. If our encoders were saying that both side of the robot were above a certain speed (can't be turning) than we would shift up. If the encoders were going slower then another desired speed then we would shift down. One problem with shifting and using encoders is that shifting causes the robot to slow down briefly. This could cause the robot to isolate between low and high gear. To fix this problem you need two separate "if statements" to shift. (For example you shift up when going faster then 6 ft/second and shift down when going slower then 5 ft/second). Our second problem with shifting was that the gears didn't want to mesh when shifting at high speeds. We fixed this problem by setting both motors to 0 for 0.1 second before shifting.
Hope this helps! |
|
#6
|
|||||
|
|||||
|
Re: Programming for a Shifting Gearbox
Since it's in the code release anyway, I guess I'll write out the shift conditions we used. Assume that we Abs all of the inputs first so there's no directionality differences.
Any shift auto shift: -No shift in last 500ms -Stick differential threshold limit to prevent shifting while turning (for tank drive skid steer). This is pre-Abs of throttles. Upshift (power-on upshift): -Throttles min (already in ft/sec) 20% greater than shift point FPS -Acceleration of throttles not negative (with some deadband for noise) -Wheel acceleration rate greater than constant -Output speed greater than shift point Downshift (kickdown): -Gearbox output speed < 8fps or so (slightly higher than or equal to our peak speed in the lower gear) -Throttles > 80% -Wheel acceleration rate is negative and below a constant (vehicle is rapidly decelerating) Downshift (coastdown): -Gearbox output speed < 2fps We don't do any special execution of the shift. Once we have decided to shift, we set the pneumatic solenoids and are done for at least 500ms. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|