Commonly used optimization functions in physics-based character motion control

Actively animating virtual characters using simulated physics is a challenging task. Controllability and robustness of the controller are usually conflicting with the quality and the versatility of the produced motions. A motion is therefore considered as 'good' when it fulfills a set of criteria on its visual quality, physical realism, efficiency etc. Based on these criteria, an optimal motion can be calculated but these criteria need to be mathematically formalized (usually an expression to minimize or maximize). This page provides a non exhaustive list of such mathematically formalized criteria, usually called objective functions (in quadratic programming, optimization approach, e.g. CMA or gradient-descent), reward functions (in reinforcement learning approach), or fitness functions (in evolutionary approach). These functions can also, most of the time, be adapted for online feedback loops (e.g. instead of minimizing the accumulated error to a desired trajectory, an actuator value can be produced at each simulation step to reduce the current pose error).

Functions are given especially for balancing/standing and locomotion, but also for any motor task. More functions can be found for less common tasks as listed hereafter. In [AlBorno2013]: getting up, handstand, handwalk, headspin, handspin, flips, push-ups, crawling. In [Alborno2014]: cartwheel, flips, diving, backhandspring, pirouette, front aerial. In [deLasa2010] : jumps. In [Hamalainen2014] : getting up and rolling. In [Jain2009] : climb and swing. In [Liu2013] : obstacle clearing. In [Tan2011] : swimming. In [Tan2014] : bicycle stunts. In [Zhao2013] : grasping.

The following notations are used (additional notations are given in the table when necessary).

$t=1:T$ : the time (frame number or time index) from 1 to $T$ the duration of the time window used for optimization (entire motion or limited horizon)
$j=1:J$ : the DOF index from 1 to $J$ the total number of rotational joint DOFs
$m=1:M$ : the muscle (MTU) index from 1 to $M$ the total number of muscles
$q=(q_r,q_j),\dot{q},\ddot{q}$ : the kinematic pose, velocity and acceleration, where $q_r$ is the translation of the root joint and $q_j$ the joints rotations
$c,\dot{c},\ddot{c}$ : the position, velocity and acceleration of the center of mass of the character
$x,y,z$ : the local coordinate system, where $x$ is positive forward, $y$ is positive upwards and $z$ is positive to the right of the character
$\tau_{j,t}$ : the control torque at time $t$ on DOF $j$
$\theta_{j,t}$ : the angle representation of DOF $j$ at time $t$
$\bar{v}$ : the desired value for $v$ (user or automatically defined)
$\alpha,\beta,\gamma$ : constants

Motor task Description (we want to ...) Example function References (see below)
Any task
Penalize control torque
Penalize (mass weighted) angular acceleration
Penalize rate of metabolic expenditure (per unit moving distance $D$) with muscle activation and maintenance heat rate $\dot{A}$ and $\dot{M}$, shortening heat rate $\dot{S}$ and positive mechanical work rate $\dot{W}$
Penalize the (weighted) muscle activations and/or derivatives
Resolve muscle redundancy from muscle activation and volume
Penalize joint weighted muscle force usage $Q_m$
Penalize work done by actuated joints when below user defined bound
Model muscle fatigue over time
Track reference (angular) trajectory
Track reference angular acceleration
Track reference (angular) trajectory and velocity
Track reference or reduce angular momentum $L$ about the COM
Track reference linear momentum $p$ derivative
Avoid damage from the $i=[1,...,n_c]$ body contacts of velocity $v_i$ and normal $n_i$ using soft threshold function $g$
Avoid collision of limbs pairs $(a,b)$ using their distances and sizes
Avoid self-intersection by voxelizing limbs and counting overlapping cells
Assure motion smoothness from mean squared acceleration and jerk of the limbs.
Assure motion smoothness and energy efficiency from specific power $S$ and weighted rate of change of muscular tensions $D$
Move $k$ end effectors at their desired heights
Reduce risk of foot sliding from tangential ground reaction forces
Constrain joint angles within limits $[\theta_{llim},\theta_{hlim}]$
Detect if the character has fallen down
$\sum_t \sum_j \tau_{j,t}^2$
$\sum_t \sum_j w_j\ddot{\theta_{j,t}}^2$
$\frac{1}{D} \sum_t \sum_m \dot{A}_m+\dot{M}_m+\dot{S}_m+\dot{W}_m$
$\sum_t \sum_m (w_m a_m)^2$ or $\sum_t \sum_m \frac{1}{2}(\alpha \dot{a_m}^2 + \beta \ddot{a_m}^2)$ or $\sum_t \sum_m \alpha(a_m)^2 + \beta(\dot{a_m})^2$
$\sum_t \sum_m V_m a_m^2$
$\sum_t \sum_j \alpha_j Q_{m_j}^2$
$\sum_t \sum_j \tau_{j,t}\dot{\theta_{j,t}}^2$ if $ < bound$, $0$ otherwise
$\sum_t \sum_m (\frac{f_m}{f_{m_{max}}})^2$
$\sum_t \sum_j (\theta_{j,t}-\bar{\theta}_{j,t})^2$ or $\sum_t \|q_t-\bar{q_t}\|^2$
$\sum_t \sum_j (\ddot{\theta_{j,t}}-\bar{\ddot{\theta}_{j,t}})^2$
$\sum_t \sum_j (|\theta_{j,t}-\bar{\theta_{j,t}}|+|\dot{\theta_{j,t}}-\bar{\dot{\theta}_{j,t}}|)$ or $\sum_t (\|q_t-\bar{q_t}\|+\|\dot{q_t}-\bar{\dot{q_t}}\|)$
$\sum_t \sum_j \|\dot{L_j}-\bar{\dot{L_j}}\|$ or $\sum_t \sum_j \|L_j\|$
$\sum_t \|\dot{p}-\bar{\dot{p}}\|$
$\max_ig(|v_i \cdot n_i|)$ if $n_c > 0$, $1$ otherwise
$\sum_t \sum_{a,b} \{dist(a,b)-(size_a+size_b)\}_+^2$
$\sum_t n_{cell}V_{cell}$
$e^{-\frac{1}{2}(\frac{\ddot{q}}{\alpha}+\frac{\dddot{q}}{\beta})}$
$S+\omega_0D$
$\sum_t \frac{1}{k}\sum_k \|y_k - \bar{y_k}\|$
$\sum_t \|GRF_{x,z}\|^2$
$\sum_t \sum_j \{\theta_{j,t}-\theta_{hlim_{j,t}}\}_+^2 + \{\theta_{llim_{j,t}} + \theta_{j,t}\}_+^2$
$\sum_t f(c_y)$, $f(c_y)=1$ if $c_y < \epsilon_y$, $0$ otherwise
[AlBorno2013][deLasa2010][Han2014][Muico2009][Muico2011][Numes2012][Safonova2004][Wampler2009][Wampler2014][Wang2009][Wang2010][Wang2012][Wu2010][Zhang2014]
[Fang2003][Popovic1999][Safonova2004][Wampler2014]
[Wang2012][Geijtenbeek2013][Lee2014][Mordatch2013]
[Grzeszczuk1995][Lee2009][Lee2014][Sueda2008]
[Thelen2006]
[Liu2005][Liu2006]
[Tan2011]
[Komura2000]
[Coros2011][Fang2003][Kwon2010][Lee2014][Muico2011][Popovic1999][vdPanne1995][Vondrak2012][Si2014]
[Abe2007][daSilva2008a][deLasa2010][Han2014][Lee2014][Macchietto2009]
[daSilva2008b][Liu2010][Muico2009][Muico2011][Tedrake2004][Ye2010][Zordan2014]
[deLasa2010][Macchietto2009][Mordatch2010][Wang2009][Wang2010][Ye2010][Zordan2014]
[Macchietto2009][Zordan2014]
[Hamalainen2014]
[Mordatch2013]
[Tan2011]
[Hamalainen2014]
[Hase2003]
[Liu2010]
[Liu2012]
[Mordatch2013]
[Wang2009][Wang2010][Wang2012]
Balancing/Standing
Move COM to vertical of centroid of base-of-support (at user defined height): $\bar{c}$
Constrain the feet on the ground
Track upper body rest pose $\bar{\theta}_{j,t}$ or up direction
$\sum_t \|c-\bar{c}\|^2$
$\sum_t y_{lfoot}^2+y_{rfoot}^2$
$\sum_t \sum_{j \in UPPER}(\theta_{j,t}-\bar{\theta}_{j,t})^2$
[AlBorno2013][deLasa2010][Jain2009][Liu2010]
[AlBorno2013][deLasa2010][Mordatch2010][Numes2012]
[AlBorno2013][deLasa2010][Jain2009][Liu2012][Mordatch2010][Numes2012][Wampler2013][Hamalainen2014]
Locomotion
Move the character at the desired COM velocity $\bar{\dot{c}}$ or as fast as possible
Control the velocity of the character (displacement $v$, goal position $g$, direction $x$, or travel most distance)
Track COM trajectory
Move the character forward
Control the heading of the character (to target orientation $\bar{\theta}_{root}$ or target forward direction $\bar{x}$)
Keep the head stable
Track head velocity
Ensure heel-strike at proper time
Constrain stance foot on the ground during stance and rolling
Reduce impact from the ground
Track the desired end-effectors $E$ height accelerations or velocity (feet and/or torso)
Track user defined step duration
Track user defined step length
Encourage symmetric gaits from differences in state durations
Smoothen the motion with small COM accelerations
Track desired motion state while allowing deviation in the short term
Reduce the use of external torques $\tau_{ext}$
Avoid sudden movements
Coactuate knee and ankle joints
Actuate the lower limbs according to torque ratio $\bar{r_\tau}$
$\sum_t \|\dot{c}-\bar{\dot{c}}\|$ or $\sum_t \frac{1}{\dot{c_x}^2}$
$\sum_t \|(c_T-c_1)-v\|^2$ or $\|c_T-g\|^2$ or $\sum_t (c_{x_t}-c_{x_{t+1}})$ or $(c_{x_T}-c_{x_1})$
$\sum_t \|c-\bar{c}\|^2$ or $\sum_t \|\ddot{c_{x,z}}-\bar{\ddot{c_{x,z}}}\|^2$
$\sum_t \alpha\max(|x_{hindmostfoot} - x_c)|,\beta)+\gamma t$
$\sum_t (\theta_{root,T}-\bar{\theta}_{root})^2$ or $\sum_t\arccos(x\cdot\bar{x})$ or $(\sum_t \|\dot{c_{y,z}}\|^2) + \lambda(\dot{c_{x,1}}-\bar{\dot{c_x}})$
$\sum_t \|\ddot{head}\|$ or $\sum_t |\ddot{\theta_{head}}|^2$ or $\sum_t \|\dot{head_{y,z}}\|^2$
$\sum_t \|\dot{head}-\bar{\dot{head}}\|$
$\sum_t y_{swingHeel}^2$
$\sum_t y_{stanceToe}^2$
$\sum_t \|GRF\|^2$
$\sum_t \|\ddot{E_y}-\bar{\ddot{E_y}}\|^2$ or $\sum_t \|\dot{E}-\bar{\dot{E}}\|^2$
$\sum_t (T_{step}-\bar{T_{step}})^2$
$\sum_t (d_{step}-\bar{d_{step}})^2$
$\|stride_{right}-stride_{left}\|^2$
$\sum_t |\ddot{c}|$
$\sum_t ((\frac{t}{T})^2+c)(q_t-\bar{q_t})^2$
$\sum_t \|\tau_{ext}\|^2$
$\sum_t \sum_j |\dot{\theta_{j,t}}|$ or $\sum_t \sum_j |\ddot{\theta_{j,t}}|$
$\sum_t (\theta_{knees}-\theta_{ankles})^2$
$\sum_t \sum_{j \in LOWER}\|\frac{\tau_{j,t}}{\tau_{LOWER,t}}-\bar{r_\tau}\|^2$
[Coros2010][Geijtenbeek2013][Kwon2010][Numes2012][Wang2009][Wang2010][Wang2012]
[AlBorno2013][Grzeszczuk1995][Liu2013][Tan2011][vdPanne1993][vdPanne1995][Wampler2013][Wu2010]
[AlBorno2013][deLasa2010][Mordatch2010][Ye2010]
[Allen2009]
[AlBorno2013][Coros2009][Coros2010][Liu2013][Mordatch2010][Tan2011][vdPanne1993][Wampler2013][Wang2009][Wang2010][Wang2012]
[Coros2010][deLasa2010][Geijtenbeek2013][Mordatch2010][Wampler2009][Wampler2014][Wang2009][Wang2010][Wang2012]
[Geijtenbeek2013][Liu2013]
[AlBorno2013]
[AlBorno2013][deLasa2010][Geijtenbeek2013]
[Lee2014][Muico2009][Ye2010]
[Lee2014][Ye2010]
[Mordatch2010]
[Mordatch2010][Wang2009][Wang2010]
[Wang2009][Wang2010]
[Mordatch2010]
[Sok2007]
[vdPanne1995]
[Jain2009][Wampler2009]
[Wampler2014]
[Wang2009][Wang2010]


References

[Abe2007] Multiobjective Control with Frictional Contacts, Abe et al., 2007
[AlBorno2013] Trajectory Optimization for Full-Body Movements with Complex Contacts, AlBorno et al., 2013
[AlBorno2014] Feedback Control for Rotational Movements in Feature Space, AlBorno et al., 2014
[Allen2009] Evolved Controllers for Simulated Locomotion, Allen and Faloutsos, 2009
[Coros2009] Robust Task-based Control Policies for Physics-based Characters, Coros et al., 2009
[Coros2011] Locomotion Skills for Simulated Quadrupeds, Coros et al., 2011
[daSilva2008a] Simulation of Human Motion Data using Short-Horizon Model-Predictive Control, da Silva et al., 2008
[daSilva2008b] Interactive Simulation of Stylized Human Locomotion, da Silva et al., 2008
[deLasa2010] Feature-Based Locomotion Controllers, de Lasa et al., 2010
[Fang2003] Efficient Synthesis of Physically Valid Human Motion, Fang and Pollard, 2003
[Geijtenbeek2013] Flexible Muscle-Based Locomotion for Bipedal Creatures, Geijtenbeek et al., 2013
[Grzeszczuk1995] Automated Learning of Muscle-Actuated Locomotion, Grzeszczuk and Terzopoulos, 1995
[Hamalainen2014] Online Motion Synthesis Using Sequential Monte Carlo, Hamalainen et al., 2014
[Han2014] On-line Real-time Physics-based Predictive Motion Control with Balance Recovery, Han et al., 2014
[Hase2003] Human gait simulation with a neuromusculoskeletal model and evolutionary computation, Hase et al., 2003
[Jain2009] Optimization-Based Interactive Motion Synthesis, Jain et al., 2009
[Komura2000] Creating and retargetting motion by the musculoskeletal human body model, Komura et al., 2000
[Kwon 2010] Control Systems for Human Running using an Inverted Pendulum Model and a Reference Motion Capture Sequence, Kwon and Hodgins, 2010
[Liu2005] Learning Physics-Based Motion Style with Nonlinear Inverse Optimization, Liu et al., 2005
[Liu2006] Composition of Complex Optimal Multi-Character Motions, Liu et al., 2006
[Liu2010] Sampling-based Contact-rich Motion Control, Liu et al., 2010
[Liu2012] Task-driven Posture Optimization for Virtual Characters, Liu et al., 2012
[Liu2013] Terrain Runner - Control Parameterization Composition and Planning for Highly Dynamic Motions, Liu et al., 2013
[Lee2009] Comprehensive Biomechanical Modeling and Simulation of the Upper Body, Lee et al., 2009
[Lee2014] Locomotion Control for Many-Muscle Humanoids, Lee et al., 2014
[Macchietto2009] Momentum Control for Balance, Macchieto et al., 2009
[Mordatch2010] Robust Physics-Based Locomotion Using Low-Dimensional Planning, Mordatch et al., 2010
[Mordatch2013] Animating Human Lower Limbs Using Contact-Invariant Optimization, Mordatch et al., 2013
[Muico2009] Contact-aware Nonlinear Control of Dynamic Characters, Muico et al., 2009
[Muico2011] Composite Control of Physically Simulated Characters, Muico et al., 2011
[Numes2012] Using Natural Vibrations to Guide Control for Locomotion, Numes et al., 2012
[Popovic1999] Physically Based Motion Transformation, Popovic and Witkin, 1999
[Safonova2004] Synthesizing Physically Realistic Human Motion in Low-Dimensional Behavior-Specific Spaces, Safonova et al., 2004
[Si2014] Realistic Biomechanical Simulation and Control of Human Swimming, Si et al., 2014
[Sok2007] Simulating Biped Behaviors from Human Motion Data, Sok et al., 2007
[Sueda2008] Musculotentdon simulation for hand animation , Sueda et al., 2008
[Tan2011] Articulated Swimming Creatures, Tan et al., 2011
[Tan2014] Learning Bicycle Stunts, Tan et al., 2014
[Tedrake2004] Stochastic Policy Gradient Reinforcement Learning on a Simple 3D Biped, Tedrake et al., 2004
[Thelen2006] Using computed muscle control to generate forward dynamic simulations of human walking from experimental data, Thelen and Anderson, 2006
[vdPanne1993] Sensor-Actuator Networks, van de Panne and Fiume, 1993
[vdPanne1995] Guided Optimization for Balanced Locomotion, van de Panne and Lamouret, 1995
[Vondrak2012] Video-based 3D Motion Capture through Biped Control, Vondrak et al., 2012
[Wampler2009] Optimal Gait and Form for Animal Locomotion, Wampler and Popovic, 2009
[Wampler2013] Animal Locomotion Controllers From Scratch, Wampler et al., 2013
[Wampler2014] Generalizing Locomotion Style to New Animals With Inverse Optimal Regression, Wampler et al., 2014
[Wang2009] Optimizing Walking Controllers, Wang et al., 2009
[Wang2010] Optimizing Walking Controllers for Uncertain Inputs and Environments, Wang et al., 2010
[Wang2012] Optimizing Locomotion Controllers Using Biologically-Based Actuators and Objectives, Wang et al., 2012
[Wu2010] Terrain-Adaptive Bipedal Locomotion Control, Wu and Popovic, 2010
[Ye2010] Optimal Feedback Control for Character Animation Using an Abstract Model, Ye and Liu, 2010
[Zhang2014] Leveraging Depth Cameras and Wearable Pressure Sensors for Full-body Kinematics and Dynamics Capture, Zhang et al., 2014
[Zhao2013] Robust Realtime Physics-based Motion Control for Human Grasping, Zhao et al., 2013
[Zordan2014] Control of Rotational Dynamics for Ground and Aerial Behavior, Zordan et al., 2014