In AP Physics C and Calculus, we treat surfaces as flat, forces as instant vectors, and materials as perfectly rigid bodies.

Then you build a physical robot and discover that mechanics is an ongoing war against perfect calculus.


📉 The Theoretical PID Loop

A Proportional-Integral-Derivative (PID) loop calculates an error value as the difference between a desired setpoint and a measured process variable:

On paper, this produces a textbook critically-damped step response. The robot moves to position and stops gracefully.


🚜 What Physics Actually Does

In the physical world:

  1. Mechanical Flex: The aluminum frame flexes under acceleration, introducing high-frequency shear waves that vibrate the IMU accelerometer.
  2. Wheel Slip: The optical encoder records 100 revolutions, but the rubber tire slipped on smooth concrete for 12 of those revolutions.
  3. Backlash & Friction: Static friction () holds the motor stuck until ramps high enough, causing the motor to suddenly jerk forward past the target position.
[PID Output: Smooth Step] ───> [Real Frame: Shear Waves + Slip] ───> [Sensor Drift + Chaotic Noise]

Calculus gives you the smooth theoretical curve. Physical friction and mechanical flex will always append a chaotic to your differential equations. 🤖