PID Simulator
How your drivetrain would respond to your PID gains, driving to a distance.
Inputs
The drivetrain
Weigh it with the battery in.
Measure across the wheel.
With the motors unpowered, pull the robot slowly along the tiles with a spring or luggage scale. Read the force while it’s moving steadily, not the jerk to get it started.
The controller
How near the target counts as there. Sets the settling time.
Output percent for each inch of error.
Type 0 if you don’t use it.
Type 0 if you don’t use it.
The wait at the end of your control loop.
Your code’s cap on the output. 100 is full power.
Results
Settles within your tolerance at
—s
Rise time, 10% to 90%
—s
Overshoot
—in
Short of the target at the end
—in
Top speed of this drive
—in/s
With no load, from the cartridge’s free speed.
Time to reach 63% of top speed
—s
Full power from standing, ignoring friction.
Show the numbers behind this chart
Distance and output every tenth of a second.
To use it: Describe the drive, measure its rolling friction, then type your target and gains.
Easy to miss: A model is a rehearsal. Gains that look good here still need checking on the robot.
Worked example
With your numbers
How this is calculated
A motor pushes hardest when it’s stalled and not at all at its top speed, in a straight line between the two. That line comes from the cartridge. The gearing and the wheel turn it into a push at the floor and a top speed for the robot. Friction pushes back. The robot’s weight decides how quickly the push changes its speed.
push = stall force × (output − speed ÷ top speed) − friction speed changes by push ÷ mass, every half millisecond output = kP × error + kI × Σ(error × loop time) + kD × change in error ÷ loop timeWhat this doesn’t cover
The output is treated as a share of full voltage, the way a voltage command works. The motor’s own speed controller, the battery sagging under load, wheels slipping, backlash in the gears and the robot’s turning are all left out. Real drives respond a bit slower and a bit messier. Use it to see which way a change pushes the response, then confirm on the robot, and measure there with the PID Analyzer.
Make a notebook page
Turns this calculation into a dated engineering notebook page: the setup, data, results, figures, working and sources, numbered and cited. You add the goal, the decision and the reflection in your own words, plus photos and sketches. Print it, paste it into Google Docs, or download a Word file or slides.
Save this run, and compare
Keeps what is on screen so you can change something and see both sides of the change. Saved in this browser only, never uploaded.
Sources & assumptions
Published: the 100 RPM cartridge’s 2.1 N·m stall torque and each cartridge’s free speed. Derived: the 200 and 600 RPM stall torques, from the same motor behind different gearing.
Weight, wheel, gearing, friction and gains are yours. The response is simulated from them with the steps above.
- VEX Robotics: V5 Smart Motor & Gear Cartridges (276-4840) — checked August 2026
- Purdue SIGBots Wiki: VEX Motors — checked August 2026