Impulse Based PD Control for Joints and Muscles

Rachel Weinstein, Eran Guendelman, and Ron Fedkiw
Stanford University

Contact: rachellw [at] graphics [dot] stanford [dot] edu

We propose a novel approach to proportional derivative (PD) control that exploits the fact that these equations can be solved analytically for a single degree of freedom. The analytic solution tells us what the PD controller would accomplish in isolation without interference from neighboring joints, gravity and external forces, outboard limbs, etc. Our approach to time integration uses an inverse dynamics style formulation that automatically incorporates global feedback so that the per joint predictions are achieved. Stiffness is decoupled from control without the need for estimating external forces so that we obtain the desired target regardless of a joint's stiffness, which merely determines when a target angle is hit. Whereas PD is typically applied via torques allowing drift, we follow [Guendelman et al. 2003] working with impulse and velocity as opposed to force and acceleration. This also allows for robust incorporation of collisions and contact. In particular, we use the framework of [Weinstein et al. 2006] making heavy use of post-stabilization to implement our PD control method.

Note: Videos are compressed using DivX. Get the codec here for free

Comparison of our PD Control with Traditional PD Control

Traditional PD Control
Zero Gravity
Our PD Control
Zero Gravity
Traditional PD Control
Normal Gravity
Our PD Control
Normal Gravity
With no external forces in zero gravity,
our method performs the same as traditional PD control
With gravity acting as an external force, our method
performs as expected, where as traditional PD control cannot take
the external for into account without increasing stiffness.

Supporting Graphs

Given current data and the size of a time step, our method (blue arrow) exactly achieves the desired angle whereas traditional PD control (red arrow) overshoots. The red arrow is drawn tangent to the curve, which is the result for forward Euler time integration. Other explicit integration schemes such as Runge-Kutta overshoot differently, but the overshoots still cause inaccuracy and time step restrictions.
The red curve shows the results obtained using our method for k_p and k_v along with Euler time integration. The method converges to the analytic solution of the PD equations with k'_p=k_p/2 and k'_v=k_v/2 depicted in black circles. The blue curve shows our method with hat{k}_p=2k_p and hat{k}_v=2k_v, which converges to the solution of the PD equations with k_p and k_v as desired (black x's)
Comparison of our method (blue), traditional PD control (red) and the analytic solution (black) for a medium size time step where errors can be seen. Note that for smaller time steps, all three curves lie on top of each other. We also show the results of our method for an extremely large time step (dotted blue) where the standard force based PD control method becomes unstable and diverges. Our method removes almost all the error in one (rather big) time step as it targets the analytic solution.
Plots of the angle for the examples shown directly above (Comparison of our PD Control with Traditional PD Control) as compared to the analytic solution (black x's). Our method matches the analytic solution without gravity (blue dashed) and with gravity (blue), whereas traditional PD matches it without gravity (red dashed) but fails to with gravity (red).

Variations in Gains (k_p)

k_p = 25 k_p = 50 k_p = 100
k_p = 500 k_p = 1000 k_p = 10000
As we increase the gains, k_p, the joints become "stronger" and can reach their goal state (the circle shape) faster.

Handling External Forces as Collisions

Collision with Static Block 1
Circular goal state
Collision with Static Block 2
Circular goal state
Forces arising from collisions with static objects are handled seamlessly.
The linked chain attempts to reach its circular goal state and reaches equilibrium.
Collision with Dynamic Ball 1
Straight goal state
Collision with Dynamic Ball 2
Straight goal state
Collision with Dynamic Ball 3
Circular goal state
Forces arising from collisions with dynamic objects are handled seamlessly. Although deterred from its original path,
the linked chain recovers and continues to move towards its goal state in a smooth fashion.

Incorporating Bodies into Global Post-stabilization

Unicorporated Block Block Incorporated Halfway Through Simulation
When seen as simply an external force, the link of chains with a horizontal goal state reacts to it (significantly here due to small k_p) (first clip). However, even part way through a simulation, we can incorporate the block into the system through a joint, allowing the simulation to account for the block during postabilization and therefore generate the correct forces to meet the goal state (second video).

Skeleton Examples

Skeleton Swinging Mace Skeleton in a Net - Back View Skeleton in a Net - Front View
Purley dyanmic joints (the mace) can be
coupled with actuated joints (the skeleton)
Global post-stabilization (the skeleton) can be
mixed with iterative post-stabilizatoin (the net)

Muscle Examples

Skeleton Performing Push-up from Front Skeleton Performing Push-up from Side
Bones are moved via impulses applied by the muscles at the attachment points