DriveTrain Ramp Up

The hardware team said that the drive motors should ramp up instead of going whatever speed the driver pushes because it draws too much current.

I have read a bit about PID loops (don’t fully understand them) and something about jaguars having hardware PID if you use CAN.

I was wondering what the best way to implement this ramp up is and how fast a good ramp up rate is.

Our robot is using Jaguars for the drivetrain and Java command based programming.

Code is here:

Any help is appreciated.

It would help to describe your drive train setup, motors, gear ratios, wheel sizes, etc. Ideally, you should design your drivetrain so that you don’t draw too much current. That might mean adding more motors or changing the gear ratio so that your top speed is a little slower and the load is less.

Our general philosophy is that a well trained driver is better able to handle issues like this, rather then the code. A driver can easily learn to ramp up on the joysticks in normal cases, but push it when really needed.

We did use a ramp up in autonomous, which made it a little more repeatable. We ramped to full speed in 1 second in high gear, and to full speed in 1/5 of second in low gear. This was implemented as a command that took an input and checked the difference between that input and the previous input, and clamped the change if it was too large.

The Jaguars do have an automatic ramp feature (independent of the PID feature). See the Jaguar FAQ.

PID is overkill if all you want to do is implement a ramp.

*The ramp-up your team is talking about does not require PID. It can be accomplished with a very simple slew rate limiter on the joystick command.

Or, if you are using Jaguars, they have built-in voltage ramping.

If you’re using a normal drivetrain, you don’t need to do this. The FRC control system is capable of providing a lot of current to the drive motors during quick acceleration. Ask your hardware team why they think they need to do this.

Because they’re using Jags. If you don’t have the voltage ramping enabled and the gearing isn’t low enough the Jags are prone to tripping the overcurrent sensing (at least they were before Vex took over) when subjected to sudden large throttle movements (like full forward to full reverse).

I’ll echo what Joe Ross said up there. It’s far more important to have a competent driver who knows what he or she is doing than to mollycoddle him or her with fancy code. Hard to know when you’ll need that burst of power at a crucial moment, but your ramping code won’t allow it…

In any case, unless your driver is going from full forward to full back on the throttle very quickly (if this is the case, fire him/her), you should be alright.

Wow guys thanks for all the input. Its seems like I will opt for the Jaguar voltage ramping.
I agree with Joe Ross and T^2 on the driver argument but we are still pretty inexperienced and I think the driver still needs a little coddling. If that does not work I will probably do it in soft and provide an override if necessary.
Any input?

If your ramping code interferes with “that burst of power at a crucial moment” then you haven’t implemented it correctly.

The purpose of the ramping is to prevent that “burst of power at a crucial moment” from causing your Jags to shut down.

Third way: no ramping, use Talons?

We were running a 4 cim 2 550 drive (using talons) and had problems with blowing the main breaker on quick direction changes. Adding in a very small(1/8 second I believe) voltage ramp completely fixed this problem. It doesn’t need to be very big at all and was unnoticeable to drivers anyways(you can’t accelerate instantly anyways so it is pretty unnoticeable).