Hyoungseo Son
Convex Optimization
Contents · Convex Optimization

Part 0 · Convexity

Part 1 · Quadratic Programs

Part 3 · Cones

  • Cones, SOCP, and the Friction Cone

Part 3 · Cones

Cones, SOCP, and the Friction Cone

The friction cone is not just a picture. It is a second-order cone, the same object that defines a whole class of convex programs. Naming it that way is what lets a contact solver borrow decades of conic optimization: solving contact becomes optimizing over, or projecting onto, this cone.

A convex cone

A set KRn\mathcal{K} \subseteq \mathbb{R}^n is a cone if it is closed under nonnegative scaling: xKx \in \mathcal{K} and λ0\lambda \ge 0 imply λxK\lambda x \in \mathcal{K}. It is a convex cone if it is also convex, equivalently if it is closed under nonnegative combinations,

x,yK, α,β0  αx+βyK.x, y \in \mathcal{K}, \ \alpha, \beta \ge 0 \ \Longrightarrow \ \alpha x + \beta y \in \mathcal{K}.

Scaling a force keeps it admissible and adding two admissible forces keeps them admissible, so the set of forces a contact can exert is a convex cone.

The second-order (Lorentz) cone

The workhorse is the second-order cone (also Lorentz or ice-cream cone), split coordinates into a vector tRmt \in \mathbb{R}^{m} and a scalar zz:

K={(t,z)Rm×R:tz}.\mathcal{K} = \{\, (t, z) \in \mathbb{R}^{m} \times \mathbb{R} : \lVert t \rVert \le z \,\}.

At each height zz the slice is a ball of radius zz; the boundary is the curved wall t=z\lVert t \rVert = z. A second-order cone program (SOCP) minimizes a linear objective subject to membership in such cones,

minx cxs.t.(Aix+bi, cix+di)Ki.\min_{x} \ c^{\top} x \quad \text{s.t.} \quad (A_i x + b_i,\ c_i^{\top} x + d_i) \in \mathcal{K}_i .

Linear and convex quadratic programs are special cases, and interior-point methods solve SOCPs in polynomial time.1

The friction cone is a second-order cone

Coulomb's law bounds the tangential force by the scaled normal force,

ftμfn,\lVert f_t \rVert \le \mu\, f_n ,

which is exactly K\mathcal{K} after the rescaling z=μfnz = \mu f_n. So the set of admissible contact forces is a second-order cone. This is why modern contact is posed as a conic program: MuJoCo, for instance, solves a convex program over elliptic (second-order) friction cones.2 The physics companion article on the friction cone works through the contact model itself; here the point is the geometry, and its central operation is projection onto K\mathcal{K}.

Projecting onto the cone

Given a point (t0,z0)(t_0, z_0), its Euclidean projection onto K\mathcal{K} has a closed form with three cases:1

ΠK(t0,z0)={(t0,z0),t0z0(inside),(0,0),t0z0(below the polar),t0+z02(t0t0, 1),otherwise.\Pi_{\mathcal{K}}(t_0, z_0) = \begin{cases} (t_0, z_0), & \lVert t_0 \rVert \le z_0 \quad (\text{inside}), \\[4pt] (0, 0), & \lVert t_0 \rVert \le -z_0 \quad (\text{below the polar}), \\[4pt] \dfrac{\lVert t_0 \rVert + z_0}{2}\left(\dfrac{t_0}{\lVert t_0 \rVert},\ 1\right), & \text{otherwise}. \end{cases}

The middle case is the polar cone K={tz}\mathcal{K}^{\circ} = \{ \lVert t \rVert \le -z \}, which points the opposite way and collapses to the apex. The third case splits the excess t0+z0\lVert t_0 \rVert + z_0 evenly between the tangential and normal directions, landing on the curved boundary.

Worked example. Take μ=1\mu = 1 so K={tz}\mathcal{K} = \{\lVert t \rVert \le z\}, and project the point (t0,z0)=(3,1)(t_0, z_0) = (3, 1). Here t0=3>z0=1\lVert t_0 \rVert = 3 > z_0 = 1, so it is not inside; and z0=1>3z_0 = 1 > -3, so it is not below the polar. Apply the boundary formula:

ΠK(3,1)=t0+z02(t0t0,1)=3+12(1,1)=2(1,1)=(2,2).\Pi_{\mathcal{K}}(3, 1) = \frac{\lVert t_0 \rVert + z_0}{2}\left(\frac{t_0}{\lVert t_0 \rVert}, 1\right) = \frac{3 + 1}{2}\,(1, 1) = 2\,(1, 1) = (2, 2).

Check that the result sits on the boundary: t=2=z\lVert t \rVert = 2 = z, so (2,2)K(2, 2) \in \partial\mathcal{K}. The correction moved the point straight toward the cone wall, shortening the oversized tangential part and lifting the normal part until Coulomb's law holds with equality, which is exactly the onset of sliding.

Projection onto the friction coneinteractive

cone cross-section (drag the force point)

tz
‖t₀‖
1.60
μ·z₀
0.60
‖t₀‖ ≤ μ·z₀ ?
no
proj p
(1.10, 1.10)

projected to sliding boundary.

A cross-section: horizontal axis t (tangential), vertical axis z (normal). The wedge |t| <= μz is the cone; the faint red region below is the polar. Drag the force point; its projection is the accent dot, joined by a dashed line. Inside the cone it maps to itself, below the polar it collapses to the apex, otherwise it lands on the sliding boundary.

The linearized alternative

The curved wall is nonlinear, so a solver can instead replace the cone with a polyhedral (pyramidal) approximation: an inscribed NN-facet pyramid whose faces are linear inequalities dkftμfnd_k^{\top} f_t \le \mu f_n. That turns contact into a linear complementarity problem, which classic pivoting solvers handle well, but the pyramid is anisotropic: friction along a facet direction differs from friction between facets, so the limit depends on direction. The true second-order cone is isotropic and exact, at the cost of a nonlinear (conic) subproblem. The trade between the two is the recurring theme of cone-based contact.

Footnotes

  1. Boyd & Vandenberghe, Convex Optimization (2004). 2

  2. MuJoCo docs, Computation.