Lecture 7: constrained nonlinear programming
Goal: derive sufficient conditions for local optimality in NLP subject to constraints.
References
- Section 2.1: Stengel, R. F. Optimal Control and Estimation. (Dover, New York, 1994).
- Chapter3: Bertsekas, D. P. Nonlinear Programming. (Athena Scientific, 1999).
Problem formulation
Consider an NLP with constraints:
\[ \min_{w\in\mathbb{R}^\ell} c(w)\ \text{s.t.}\ f(w) = 0 \]
where \(f : \mathbb{R}^\ell\rightarrow\mathbb{R}^n\).
Q: show how you can reduce this problem to an equivalent unconstrained NLP if you can explicitly solve the constraint equation.
Suppose \(w\in\mathbb{R}^\ell\) can be “split” into two pieces, \(w = (x,u)\in\mathbb{R}^d\times\mathbb{R}^m\) and explicitly solve \(f(x,u) = 0\) for \(x\) in terms of \(u\), i.e. \(x : \mathbb{R}^m\rightarrow\mathbb{R}^d\).
Then \(\min_u c(x(u),u)\) is equivalent to the constrained NLP.
Augmented cost
We can’t expect to solve \(f(w) = 0\) in general, so we’ll consider another approach.
Idea: consider the augmented cost function
\[ \tilde{c}(x,u,\lambda) = c(x,u) + \lambda f(x,u) \]
where \(\lambda\in\mathbb{R}^{1\times n}\) is a vector of “Lagrange multipliers” / “dual variables” and find stationary points of \(\tilde{c}\), i.e. we want \((x_0,u_0,\lambda_0)\in\mathbb{R}^{d + m + d}\) such that \(D\tilde{c}(x_0,u_0,\lambda_0)\in\mathbb{R}^{1 \times (d + m + d)} = 0\).
Q: use the necessary condition for \(\lambda_0\) to be stationary to solve for \(\lambda_0\) explicitly (assume \(D_x f(x_0,u_0)\in\mathbb{R}^{d\times d}\) is nonsingular).
\(D_x\tilde{c} = D_x c + \lambda D_x f\) so if \(D_x f(x_0,u_0)\) is invertible then necessarily \(\lambda_0 = - D_x c(x_0,u_0)\left[ D_x f(x_0,u_0) \right]^{-1}\).
Q: why is it reasonable to assume \(D_x f(x_0,u_0)\) is invertible?
Otherwise constraints are redundant! Consider the linear case \(f(x,u) = \left[ L_x, L_u \right] \left[ x^\top, u^\top \right]^\top\). Then if \(L_x\) is singular there is redundancy in the constraints, so you can remove some constraints without changing the constrained set.
Stationarity
The stationary condition \(D\tilde{c}(x_0,u_0,\lambda_0)\) leads to the following definition.
Definition: \((x_0,u_0)\) is a stationary point for \(\min_{x,u} c(x,u)\) s.t. \(f(x,u) = 0\) if \(D_u c(x_0,u_0) + \lambda_0 D_u f(x_0,u_0) = 0\) and \(f(x_0,u_0) = 0\) where \(\lambda_0 = - D_x c(x_0,u_0)\left[ D_x f(x_0,u_0) \right]^{-1}\).
Q: why are stationary points of the constrained NLP the same as those of \(\tilde{c}\)?
The full answer requires some work – check the Wikipedia article on “Lagrange multipliers”. When \(d = 1\) the geometry is easier to understand – see page 103 of Folland’s Advanced Calculus.
Example (Lewis, Syrmos, Vrabie 1.2–1.3)
Consider the constrained NLP with quadratic cost and linear constraint:
\[ \min_{x,u} c(x,u) = \frac{1}{2} x^\top Q x + \frac{1}{2} u^\top R u\ \text{s.t.}\ f(x,u) = x + B u + b = 0. \]
Assume \(Q^\top = Q > 0\), \(R^\top = R > 0\).
Q: write the augmented cost and stationarity conditions.
\(\tilde{c}(x,u,\lambda) = c(x,u) + \lambda f(x,u)\)
\(D_x \tilde{c} = D_x c + \lambda D_x f = x^\top Q + \lambda = 0\)
\(D_u \tilde{c} = D_u c + \lambda D_u f = u^\top R + \lambda B = 0\)
\(D_\lambda \tilde{c} = f(x,u) = x + B u + b = 0\)
Q: solve for stationary \(x_0\), \(u_0\), \(\lambda_0\).
From \(D_x \tilde{c} = 0\) we obtain \(\lambda_0 = -x_0^\top Q\).
From \(D_u\tilde{c} = 0\) we find \(u_0 = - R^{-1} B^\top \lambda_0^\top\).
Combining these we find \(u_0 = - R^{-1} B^\top Q x_0\), which agrees with what we derived in the previous lecture using a Bellman equation.