cs.thefarshad
hard

Dynamics

Beyond kinematics — forces, torques, mass and inertia, and integrating the equations of motion.

Kinematics tells you where a robot’s parts are for a given set of joint angles. Dynamics asks the harder question: why they move that way — how forces and torques, fighting mass and inertia, produce acceleration over time. You cannot make a fast arm or a balancing robot without it.

The visualizer integrates a damped pendulum, the simplest non-trivial dynamical system. The left panel swings the bob; the right plots its phase portrait (angle versus angular velocity). Drag the sliders for length, damping, and mass, then press play to step the equations of motion forward in time.

θ = 2.40 radθθ′
t = 0.00s
phase trajectory current state equilibrium
ω 0.00 · KE 0.00 · PE 28.63 J

Kinematics asks only where the parts are; dynamics asks why they move. Gravity supplies a restoring torque proportional to sin θ, damping drains energy, and the integrator steps the state forward in time. Raise the damping and the phase spiral collapses fast to the resting point; drop it to zero and energy is conserved, so the orbit becomes a closed loop. Mass scales the bob and its kinetic energy but cancels from the acceleration itself.

From forces to acceleration

The foundation is Newton’s second law, F=maF = ma, and its rotational twin for spinning bodies,

τ=Iα,\tau = I\,\alpha,

where τ\tau is torque, II is the moment of inertia (how mass is distributed about the axis), and α\alpha is angular acceleration. Mass resists linear acceleration; inertia resists angular acceleration. Both are why a heavy arm cannot stop on a dime.

Equations of motion

For the pendulum, summing the gravitational torque and a damping torque gives a second-order equation of motion:

θ¨=gLsinθ    bθ˙.\ddot{\theta} = -\frac{g}{L}\sin\theta \;-\; b\,\dot{\theta}.

The sinθ\sin\theta term is the restoring pull of gravity; the bθ˙b\dot\theta term bleeds off energy. There is no closed-form solution for large swings, so we simulate.

Integrating forward in time

To animate the system we turn the equation into first-order updates and step it with a small time increment Δt\Delta t (semi-implicit Euler, which stays stable here):

θ˙    θ˙+θ¨Δt,θ    θ+θ˙Δt.\dot{\theta} \;\leftarrow\; \dot{\theta} + \ddot{\theta}\,\Delta t, \qquad \theta \;\leftarrow\; \theta + \dot{\theta}\,\Delta t.

Repeat thousands of times and the trajectory emerges. In the phase portrait, damping makes the state spiral inward to the resting equilibrium at the origin; set damping to zero and energy is conserved, so the orbit becomes a closed loop. Smaller Δt\Delta t means more accuracy at more compute — the same trade-off behind every physics engine.

Why robots care

Robot arms obey the manipulator equation M(q)q¨+C(q,q˙)q˙+g(q)=τM(q)\ddot q + C(q,\dot q)\dot q + g(q) = \tau, where the inertia matrix MM, the Coriolis term CC, and gravity gg all depend on configuration. Inverse dynamics runs it backward — what torques achieve this motion? — to drive motors precisely, plan energy-efficient trajectories, and keep legged robots upright.

Takeaways

  • Dynamics relates forces and torques to acceleration through mass and inertia (F=maF = ma, τ=Iα\tau = I\alpha).
  • A system’s equations of motion are differential equations; most are solved by numerical integration over small time steps.
  • Robot control relies on dynamics — the manipulator equation and inverse dynamics turn desired motion into motor torques.

References