What is the Vector Math behind X-Drive? Why do you add the Y components on an X-Drive, and not add them on a Tank Drive (0degree wheels)? Technically if you add the Y components: why can’t you have a one degree wheel so when you add the Y components its almost double the regular force (I know it’s not realistic, I just wanna know the math)? Thank You!
I’ve been debating how to answer this for about an hour. I think the best way is to break your post into 3 parts.
- Why does vector addition work differently in X-Drive?
This is the easiest of the three questions. Tank drives have effectively 2 wheels with 2 different force vectors. He’s where the important distinction comes in; the directions of the force vectors are parallel, resulting in robot-relative 1D forces. Forward and backward motion result when both force vectors are equal. Conversely, rotational motion occurs when the two force vectors are not equal.
X-Drives are different in three key ways: firstly, there are 4 wheels. Secondly, wheels are offset 90 degrees relative to their neighbor, and usually 45 degrees relative to the robot. Lastly, they’re made out of omni-wheels that allow unrestricted perpendicular motion with respect to the wheel.
This means each wheel’s motion contributes to both X and Y movement. To move forward, the motors spin so the diagonal force vectors add up in Y. Each wheel generates a vector at ±45°:
- Vector magnitude = V
- Y component = V * sin(45°) = V/√2
- X component = V * cos(45°) = V/√2
Now, these vectors add together to produce net Y motion.
- Why are Y components added in X-Drive?
Because the wheel’s force vector is diagonal, and you have two wheels pointing +45° and two at -45°, their X components cancel, and Y components add.
- Net_Y = 4 * (V/√2) * sin(45°) = 4 * (V/√2) * (1/√2) = 4 * (V/2) = 2V
That’s why you see a √2 gain in speed — or more precisely, why X-Drives move faster than tank drives by √2, assuming constant motor power. It’s because you’re summing orthogonal components.
- Why can’t you just make a 1° wheel to “Hack” this?
Here’s the math. If you angle the wheels at θ° from horizontal, then:
- Y contribution = sin(θ)
- X contribution = cos(θ)
If you angle the wheels at just 1°, then:
- sin(1°) ≈ 0.01745
- cos(1°) ≈ 0.99985
This means nearly all the force is in the X direction, and almost none in Y. If you now rotate 4 such wheels “the right way” to move forward, then you’re summing the tiny Y components, and…
Technically, yes: If you push with 100% power, you only get ~1.7% of it in the Y direction. But if you sum 4 of these small Y-components, you get:
- 4 * V * sin(1°) ≈ 4 * V * 0.01745 ≈ 0.07V
So… that’s 7% of your total motor effort being converted into forward movement. The rest is lost in the opposing X-direction force.
So even though you’re adding the Y components, you’re losing force efficiency.
If you tried this:
- The robot would move super slowly
- Your motors would fight each other
- You’d be wasting 99% of your torque on cancelling sideways forces
In summary:
-
Why Does Vector Addition Work Differently in X-Drive?
Tank Drive wheels point forward (0°) and can’t apply force sideways — only 1D motion, no Y components.
X-Drive wheels are angled at ±45°, so each wheel produces both X and Y forces. The Y components add together, and X components cancel when driving straight -
Why Not Use a 1° Wheel to Boost Y Components?
Technically, yes, tiny Y components from 1° wheels can be added.
But the resulting Y force is tiny (~7% of motor power).
Most energy is wasted fighting opposing X forces — very inefficient and nearly useless.