Optimal Speed for Differential Swerve

You know you are addicted to FIRST when you are thinking about differential swerve while out doing yardwork…

So, there I was, out doing yardwork, thinking about differential swerve, when it occurred to me that the main reason to build a differential swerve is to have 8 motors applying power to the wheels. But a drivetrain with 8 CIM-class BLDC motors would most likely be highly traction limited if it was geared to the same gear ratio as a typical 4 motor drivetrain.

So, after the yardwork was done, I plugged some numbers into the ILITE drivetrain simulator. For a 4 NEO drivetrain, assuming 4 inch wheels and 150 lbs full-up robot weight and a 20 foot sprint distance, the optimal gear ratio for sprint time is about 5.5:1 or so. This ratio results in a theoretical free speed on 20 ft/s. I realize that this is on the high side, and there are some other factors that come into play when you select a gear ratio, but let’s use this one criteria (minimum sprint time over a 20 ft sprint) as a comparison point.

The first thing I did was just change the number of motors to 8, leaving all other factors the same. The time to 20 ft was improved to 1.4 seconds, but sure enough, the first 8 ft of the sprint was slip limited. Reducing the overall gear ratio to 4:1 improves the sprint time to 1 second and is no longer slip limited. This results in a theoretical free speed of 25 ft/sec. I think most of us who have been around for a few years would consider that speed a bit too close to plaid for comfort (i.e. ludicrous).

So, I am left with a dilemma. If we set the gear ratio of a differential swerve to get a free speed that we are comfortable with from our traditional 4 motor drivetrain experience, then I am not actually able to take advantage of 8 motors because at stall I am slip limited. If I reduce the overall gear ratio to the point where I am no longer slip limited at stall, I end up with a ludicrous speed that the drivers probably won’t be able to actually utilize.

I’m inclined to gear a diff swerve for the lowest speed that is just above slip (i.e. ~25 ft/s). My thought is that you can put a speed cap on the system (in code) if it turns out to be too much and you may actually be running the motors at a higher efficiency point of the motor curve when driving in the 16-18 ft/s range.

7 Likes

I feel like this is a better aspect of the equation to look at- with 8 motors, you’re going to be draining your battery quickly. Maybe gearing to minimize electrical consumption during a maneuver is the right move. (“Putting the motors in maximum efficiency range” is a close relative of this, but ultimately, isn’t what you care about… similar to free speed :wink: )

Using your numbers in my calculator: https://thaddeus-maximus.github.io/everycalc/generalmech

The 5.5:1 uses 221 Amp-seconds.
The 4:1 uses 394 Amp-seconds.

There’s certainly value in trading some speed for the ability to last a match (or put that energy elsewhere).

Charles-Augustin de Coulomb rn: :neutral_face:

29 Likes

Can you elaborate on how you determined this? Based on testing that 33 has done over the last 2 seasons with 4 NEO/Falcon 20fps free for a 20ft sprint does not sound like the correct optimal gearing at all so I would be curious to see how you determined this.

1 Like

I think you’re missing one of the bigger drivers of differential swerve speed in this consideration: the turning ratio. The faster you make the drive speed, the less reduction and therefore less torque you’ll have to turn the module (assuming the internals of the differential bit remain unchanged and you don’t do anything fancy like adding a reduction/upduction after the differential). One of the big challenges of designing a differential swerve is finding a combination of gears that gives both fast enough driving and slow enough turning.

When adding more motors on a drivetrain you run into a dismissing returns situation. The battery becomes the limiting factor. A really good battery will have an internal resistance of around 0.014 ohms. You can only pull 300ish Amps before the voltage drops low enough to be concerned about browning out. The more motors you add, the lower you will need to set the current limits on the motor controllers and the less performance you get from each motor. I am doubtful much performance increase would be seen in real life when running 8 CIM class brushless motors on a drivetrain vs 6 or 4. It would be cool for someone to do some real life testing. In my opinion teams often overlook using good batteries. Running top notch batteries can have a big effect on robot performance.

12 Likes

Hey Nick,

As I said, I was only looking at the sprint time for a 20 ft distance. There are other factors that come in to play, but, I wanted to directly compare the two concepts using a single subjective measure.

Here is the calculations for a 4 NEO drivetrain showing the optimal gear ratio of somewhere between around 5:1 and the sprint time of 1.7 seconds:

Note: I realized as I was re-running these calculations that the ILITE simulator only accepts integers for the driving and driven gear inputs. I had tried to simplify my earlier test by just putting in decimal values for the gear ratio, but it just rounded it off. So my earlier statement about 5.5:1 was not correct. The ILITE simulator was actually using 5:1 for that calculation.

Here is the calculations I ran with the 8 motor drivetrain. First with the same 5:1 geartrain showing the wheel slip and the 1.5 second 20 foot sprint time and the wheel slip limit for the first 8 feet:

And then with the 4:1 ratio which reduces the 20 foot sprint distance time to 1.4 seconds and no longer hits the wheel slip limit:

As an aside, I looked at shorter sprint distances for the 4 NEO drivetrain with 4" wheels. Based on those studies, the ILITE simulator suggests that the optimal gear ratio is:

  • 6:1 for a 14 foot sprint
  • 7:1 for a 9 foot sprint
  • 8:1 for a 7 foot sprint
  • 9:1 for a 4 foot sprint

Here is the plot for a 4 foot sprint:

Also, the ILITE definition of ‘sprint distance’ is the acceleration distance (i.e. the distance to get to the max speed before you start decelerating). The full 0-Max-0 distance is longer than that. That may not have been clear in my initial post.

Edit: Something else that happens with the 9:1 ratio example is that you start to see wheel slip in the early acceleration (you are slip limited at stall):

So the 9:1 gear ratio sprint time for the 4 ft sprint is the same as the 8:1 gear ratio sprint time according to the calculator (0.6s). In real life the 9:1 might be worse if you let the wheels actually slip because the friction coeffiecient when slipping is lower than when not slipping such that you can’t get as much acceleration. and the 9:1 ratio results in a lower free speed, yadda, yadda, yadda. So, when you become slip limited you have hit a performance wall that you cannot push through and adding more torque is with a higher gear ratio is no longer helping the short sprints and is actually hurting you in the longer sprints due to the lower free speed. Thus, it is always a balancing act between short sprints and long runs and each game and each game strategy presents a different optimal point.

1 Like

Hey @AriMB ,

I agree. Before I headed out to do my yardwork the other day, I had read the 4x4x5 differential swerve thread and I was contemplating ways to build on this concept. The vertical shafts in the module and the bevel gearsets give you some options to adjust the ratio and turning speed (twist ratio) somewhat independently. In the 11th post in that thread, the OP made some adjustments to bring the twist speed down but also brought the free speed down which is what got me to thinking about the optimal speed and drive ration before i started playing with the various gearsets to see what was possible.

2 Likes

The results seem about right, although battery resistance should be increased to include wires. @Nick_Coussens can you share the data that you believe disagrees?

1 Like

I guess whenever I look at optimal gear ratios, I look at a time to distance overall, I’m not sure what good looking at the “sprint distance” of the acceleration distance does for me. If my cycle distance is 20ft, I want to optimize how long it takes to travel that entire distance from standstill.

1 Like

I do not have data in a publishable state at this time; this was internal testing we have done as a team over the last couple years.

Typically I understand that spring distance includes acceleration distance, unless you mean slowing down and coming to a stop as well. I’d be interested in seeing your data once it’s ready to compare, but until then 20fps sounds about right for maximal speed medium sprints (although as we know, these are typically rare).

Differential swerve will have a new set of optimal ratios that aren’t going to match existing swerves.

Since you’re using the same motors for both outputs, you need velocity overhead on both to allowed combined motion. You likely want to be able to steer when going what you’d consider full speed after all.

What is the right over head? I don’t think anyone really has optimized that yet.

My crude guess is you probably want to size for the ability to go X fps and spin modules at .5Y to Y rpm at the same time… X and Y being whatever your equivalent traditional swerve is.

6 Likes

I agree that the overall 0-Max-0 distance is what matters. I am not completely satisfied with the way the ILITE simulator handles the deceleration portion. The “Brake” option seems to slow (generally the deceleration distance is 150% of the acceleration distance in this mode). The “Reverse” option seems too aggressive (the stopping distance is 25% of the acceleration distance). I could be convinced that the deceleration distance is less than 100% of the acceleration distance given the way that motors work. But, I am struggling with the 25% number.

I have seen good agreement on our 2020 robot between the acceleration and max speeds predicted by the ILITE simulator compared to the Zebra Dart data. But I can’t really get the deceleration data to line up with any of the models.

For 2020, we geared our swerve to 8:1 which ILITE said should have given us the optimal sprint time over 7-10 foot acceleration (15-20 ft total 0-Max-0 cycles). what we saw in the Zebra Dart data was that we were hitting the maximum speed for sustained periods on most cycles. We looked at what the ILITE simulator showed for 6:1 and it predicted that we would see a cycle time improvement, so this summer we switched our gear ratio to 6:1 and we noticed an improvement in our cycle performance on the practice field.

Anyway, back to this subject. In order to compare two different designs, I chose one subjective measure (realizing that it does not simulate the full scoring cycle) to compare different drivetrain options. Since the sprint distance is one of the inputs into the ILITE simulator, I just chose that parameter. I could have picked a different distance, but optimizing for the 20 ft sprint distance seems to result in better performance for 2020 (and presumably 2021) than optimizing for a 10 ft sprint distance.

1 Like

I’ve always thought that the advancements we need in drivetrain tech for FRC won’t come in the form of fancy mechanical engineering for gearboxes and stuff, they’re going to come in materials science…

1 Like

Why not both?

< insert your favorite why not both meme here >

2 Likes

More accurately - Charles-Augustin de Coulomb rn: :skull:

1 Like

For some real world numbers, we geared our 2020 diff swerve bot at 6.84:1 into 4.5" wheels with 8 Falcons. We were probably 20 lbs underweight. We were traction limited when pushing a wall. No brownout issues. Steering ratio was 8.8:1 which worked fine.

Ryan Shoff
4143

5 Likes

Do you have designs for that module you are willing to share? If not CAD then maybe just some pictures? I’d love to see it more close up.

They released their pre-2020 version for R15

1 Like