Proof note for "Cable Anchor Sensitivity Analysis for Reconfigurable Cable Robots."
f ∈ ℝm is the vector of cable forces, w ∈ ℝn is the required wrench, and J(U) ∈ ℝn×m is the structure matrix, depending on the reconfiguration vector U:
Write V*(w,U) for the optimal value of this program. The goal: show the multiplier λ obtained while solving it is exactly the rate at which V* changes, with respect to both w and U.
Two cables, one wrench component: $m=2,\ n=1$. Cable 1's anchor is fixed; cable 2's anchor position is the only free coordinate, called $u$ (one component of the full vector $U$). Then:
Introduce λ ∈ ℝn for the equality constraint and μ ∈ ℝm (μ ≥ 0) for f ≥ 0:
These hold at the optimum $(f^*,\lambda^*,\mu^*)$ for any fixed $(w,U)$, the only facts used below.
With $J(u)=[1\ \ u]$, stationarity and feasibility read:
Fixing $u=1,\ w=4$: $\lambda^*=2$, $f_1^*=f_2^*=2$, and $V^*=\tfrac12(2^2+2^2)=4$.
Fix U and treat w as the variable. This is an exact identity, proved for any m, n, J, not a first-order approximation, and not specific to any example.
The constraint term and the complementary-slackness term both vanish at the optimum, and do so for every nearby w. This is a function identity, not a one-point coincidence:
Each of the three terms below is a product of two factors. In every case, one factor is forced to be exactly zero by a KKT condition, so the whole product is zero, regardless of what the other factor, the messy derivative $df^*/dw$, $d\lambda^*/dw$, or $d\mu^*/dw$, actually equals.
$\partial L/\partial f=f-J^T\lambda-\mu$. This is exactly the stationarity condition, which equals $0$ at the optimum. So this factor is zero, and the whole f-term is $0\times df^*/dw=0$, no matter how complicated $df^*/dw$ is.
$\partial L/\partial \lambda=-(Jf-w)$. By feasibility, $Jf^*=w$, so this is zero. The subtle part: this holds not just at one $w$, but for every $w$ near the baseline, since $f^*(w)$ is defined precisely as the solution that satisfies $Jf=w$ for that $w$. So as a function of $w$, this factor is identically zero, and a function that is identically zero has derivative zero too, which is what lets this whole term drop out.
$\partial L/\partial \mu=-f$, so this term is $-\sum_i f_i^*\,d\mu_i^*/dw$. Check each component $i$ separately:
Either way every term in the sum is zero, so the whole sum is zero.
w appears explicitly in L only in $+\lambda^Tw$, so $\partial L/\partial w=\lambda$. Result, exact:
Fix $u=1$ and repeat Step 2 of the KKT example without substituting a number for w:
Differentiating directly: $\dfrac{dV^*}{dw}=\dfrac{d}{dw}\!\left(\dfrac{w^2}{4}\right)=\dfrac w2=\lambda^*(w)$, matching Step 4 above, for every w:
| w | λ*(w) | dV*/dw | Match |
|---|---|---|---|
| 2 | 1.0 | 1.0 | ✓ |
| 4 | 2.0 | 2.0 | ✓ |
| 6 | 3.0 | 3.0 | ✓ |
Take the case $n=1$, so $w$ is a scalar and $g(f)=J(U)f-w$ is a single scalar-valued constraint function with gradient $\nabla g(f)=J(U)^T$, an $m$-vector. Stationarity, $f^*=J(U)^T\lambda^*+\mu^*$, with $\mu^*=0$ where $f^*>0$, then reads $\nabla V(f^*)=\lambda^*\,\nabla g(f^*)$: the cost's gradient is parallel to, and exactly $\lambda$ times, the constraint's gradient. This is most easily seen by drawing it.
With $u=1$ (so $J(u)f=f_1+f_2$), $f^*=(2,2)$, $\lambda^*=2$:
Section 03 differentiated L with respect to w. The same machinery, unchanged, applies with respect to U instead, holding w fixed. It is Section 03 again with one symbol replaced.
Stationarity, feasibility, and complementary slackness hold along the optimal path as U varies, exactly as they did as w varied. They do not care which parameter is moving.
Here, with w held constant, U appears explicitly in L only inside $-\lambda^TJ(U)f$:
Baseline $u=1,\ w=4$: $f^*=(2,2)$, $\lambda^*=2$. Since $J(u)=[1\ \ u]$, differentiating each entry with respect to $u$ gives $\partial J/\partial u=[0,\ 1]$ (the first entry is constant, the second entry is $u$ itself). Move to $u=1.002$, so $\Delta u=0.002$:
Exact resolve at $u=1.002$: $\lambda^*(1+1.002^2)=4\Rightarrow\lambda^*\approx1.996004$, $f^*\approx(1.996004,1.999996)$:
| Quantity | Value |
|---|---|
| V* before (u=1) | 4.000000 |
| V* after (u=1.002, exact resolve) | 3.992008 |
| ΔV actual | -0.007992 |
| ΔV predicted (no re-solve) | -0.008000 |
With $\Delta u$ shrunk from 0.1 to 0.002 (50x smaller), the gap between predicted and actual shrank from 0.020 to 0.000008, about 2500x smaller, matching the expected $O(\Delta u^2)$ first-order error.
Nothing in Sections 03-05 depended on any example, or on a coordinate being a scalar. Replacing the scalar w with w ∈ ℝn, and replacing a single coordinate u with the full vector U ∈ ℝdr (so $\partial J/\partial u\,\Delta u$ becomes $\frac{\partial J}{\partial U}\Delta U$, summing the contribution of every anchor coordinate), the same argument applies component-wise: λ, already produced as a byproduct of solving the QP for cable forces, is precisely the sensitivity of the optimal cost to a perturbation of U, at no extra computational cost.
Reference. The general statement, with full regularity conditions (LICQ, strict complementarity), is the parametric-NLP sensitivity theorem.
Fiacco, A. V. (1983). Introduction to Sensitivity and Stability Analysis in Nonlinear Programming. Academic Press.
Boyd, S., & Vandenberghe, L. (2004). Convex Optimization, Section 5.6. Cambridge University Press. (Free PDF: web.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf)