Differential swerve Drive design

I have been looking into swerve drive modules and am working on designing one. I was particularly intrigued by the differential models. While looking at these I noticed that nobody has ever used them, even though by my calculations they are lighter, faster, more powerful. However, it seems that many people seem to see them as hard to design and program. However after lining up the gears and assembling, it seems as though one encoder could be used to measure one of the motors rotation, and one to measure the turning of the module. Then the other motor could have a speed change to match the other so that the module goes straight. I have not played with anything other than WCD before so is it difficult to do this, since it seems to be just a matter of speeding up the calculations as much as possible to correct instantly? Or is there something that I am missing?

That’s basically the main issue. However, straight-gear differentials have low gear ratios, so your module rotation speed can easily end up too fast for comfort (on the order of 1000rpm or more). Plus, it’s conceptually difficult to design if you want to make a good one. Aren’s design is probably the best-executed so far in terms of weight and packaging.

You could be the first! The idea is on the bleeding edge of the technology curve right now- it will take some experiments and failures before you start seeing many differential swerves take the competition field.

The other issue is the variability in the motors. The specification limits are typically +/- 10% on Free Speed. Most motors will not be out that much; but they simply aren’t a perfectly matched device pair.

Output Speed= Free Speed - (Free Speed/Stall Torque) * Torque Load

Thus the torque load vs speed relationship will not be perfectlly equal between the motors. Without adjustment this would cause wheel caster.

Multiply this issue times four swerve modules, and it’s now really mess to fix in code. Then consider replacing a swerve module during competition that might need alternate code compensations.

I won’t even start on cold vs hot motor performance…

Differential Swerve does looks nice on CAD.

This issue exists in all differential drivetrains (but not 4 times over). Generally people have had success mitigating the variability with feedback control in those cases. There are arguments to be made both ways as to whether it’s easier or harder to stabilize a loaded differential swerve module than a 2 wheel drive robot.

I’ve been looking at some of the designs out there over the past year or so. The designs are quite elegant and, in theory, allow you to put the power from the 2 motors into the wheels.
I came to the same conclusion as you: the difficulty comes in controlling the rotation. A PID control on the power to the second motor based on the absolute module rotation encoder input is the only reasonable way to do this. On the surface, it seems like a pretty straight forward problem, but with module high rotation speeds, the system would be so sensitive that the processing cycle times for the code could seriously hinder the response. You might be able to get it stable for steady state wheel speeds, but then when you factor in acceleration and quick direction changes that swerve drives are built for, I think the code would struggle to keep up with all the changing variables.

I’ve seen a few designs that try to incorporate different gearing schemes to try to get the module rotations slower as a proportion of motor speed. But I’m not sure how low the rotation speed ratio needs to be in order to bring the feedback gains into the realm of controllability. Maybe someone with more time than I have can do the math and develop the root locus diagrams for this problem.

I’m also wondering whether the built in PID controllers in the Talons would be better suited to the task than the main code and whether they can be tuned adequately. I’ve been impressed with the built-in capabilities that those motor controller have. It would be a fun experiment to that and see if it could be made stable. So far, this is nowhere near the top of our offseason project list, so I don’t think we will be looking into this any time soon. But maybe someday our students will take a whack at this intriguing control problem.

The tools you need for feedback control of a differential swerve in the Talon firmware were quietly added late in build season (auxiliary PID, custom feedforward, remote sensors, etc). See section 9.10.2 of the Software Reference Manual.

Woah, cool. Crazy 971 mechanisms for everyone!