Same real permanent-magnet DC gearmotor model as the 3D version, viewed through its torque-speed curve. Every frame integrates the coupled electrical and mechanical equations:
I = (V − Kb·ωm) / R (armature current, ωm = motor speed)
τm = Kt·I (motor torque from current)
ωm = N·ωj, τj = η·N·τm (gear reduction N:1, efficiency η)
J·dωj/dt = τj − τload − b·ωj
V is the applied armature voltage, R the winding resistance, and Kb the back-EMF constant — the faster the motor spins the more voltage it generates against itself, so current (and torque) fall linearly as speed rises. That line is exactly what's plotted on the right: stall torque τstall = η·N·Kt·V/R at ω=0, no-load speed ω0 = V/(Kb·N) at τ=0. The horizontal line is the load you set; where it crosses the motor line is the predicted steady-state operating point, and the dot is where the simulation's actual dynamics currently sit as it converges there.
- Supply voltage — raises both stall torque and no-load speed, sliding the whole line outward.
- Load torque — a heavier load intersects the motor line at lower speed and higher current, which is why current spikes and speed sags under load.
- Gear ratio — higher N multiplies output torque but divides output speed and squares the reflected inertia N²·Jm, trading top speed for stall torque.
Efficiency (output mechanical power ÷ input electrical power) is genuinely computed each frame, not looked up — it is near zero at stall (all power dissipated as I²R heat) and near zero at no-load (no useful torque), peaking somewhere in between, exactly as a real gearmotor datasheet shows.