|
| 1 | +\section{Sequential Quadratic Programming (SQP)} |
| 2 | + |
| 3 | +% ------------------------------------------------ |
| 4 | +\begin{frame}{What is SQP?} |
| 5 | +\textbf{Idea:} Solve a nonlinear, constrained problem by repeatedly solving a \emph{quadratic program (QP)} built from local models.\\[4pt] |
| 6 | +\begin{itemize} |
| 7 | + \item Linearize constraints; quadratic model of the Lagrangian/objective. |
| 8 | + \item Each iteration: solve a QP to get a step \(d\), update \(x \leftarrow x + \alpha d\). |
| 9 | + \item Strength: strong local convergence (often superlinear) with good Hessian info. |
| 10 | +\end{itemize} |
| 11 | +\end{frame} |
| 12 | + |
| 13 | +% ------------------------------------------------ |
| 14 | +\begin{frame}{Target Problem (NLP)} |
| 15 | +\[ |
| 16 | +\min_{x \in \R^n} \ f(x) |
| 17 | +\quad |
| 18 | +\text{s.t.}\quad |
| 19 | +g(x)=0,\quad h(x)\le 0 |
| 20 | +\] |
| 21 | +\begin{itemize} |
| 22 | + \item \(f:\R^n\!\to\!\R\), \(g:\R^n\!\to\!\R^{m}\) (equalities), \(h:\R^n\!\to\!\R^{p}\) (inequalities). |
| 23 | + \item KKT recap (at candidate optimum \(x^\star\)): |
| 24 | +\[ |
| 25 | +\exists \ \lambda \in \R^{m},\ \mu \in \R^{p}_{\ge 0}: |
| 26 | +\ \grad f(x^\star) + \nabla g(x^\star)^T\lambda + \nabla h(x^\star)^T \mu = 0, |
| 27 | +\] |
| 28 | +\[ |
| 29 | +g(x^\star)=0,\quad h(x^\star)\le 0,\quad \mu \ge 0,\quad \mu \odot h(x^\star) = 0. |
| 30 | +\] |
| 31 | +\end{itemize} |
| 32 | +\end{frame} |
| 33 | + |
| 34 | +% ------------------------------------------------ |
| 35 | +\begin{frame}{From NLP to a QP (Local Model)} |
| 36 | +At iterate \(x_k\) with multipliers \((\lambda_k,\mu_k)\):\\[4pt] |
| 37 | +\textbf{Quadratic model of the Lagrangian} |
| 38 | +\[ |
| 39 | +m_k(d) = \ip{\grad f(x_k)}{d} + \tfrac{1}{2} d^T B_k d |
| 40 | +\] |
| 41 | +with \(B_k \approx \nabla^2_{xx}\Lag(x_k,\lambda_k,\mu_k)\).\\[6pt] |
| 42 | +\textbf{Linearized constraints} |
| 43 | +\[ |
| 44 | +g(x_k) + \nabla g(x_k)\, d = 0,\qquad |
| 45 | +h(x_k) + \nabla h(x_k)\, d \le 0. |
| 46 | +\] |
| 47 | +\end{frame} |
| 48 | + |
| 49 | +% ------------------------------------------------ |
| 50 | +\begin{frame}{The SQP Subproblem (QP)} |
| 51 | +\[ |
| 52 | +\begin{aligned} |
| 53 | +\min_{d \in \R^n}\quad & \grad f(x_k)^T d + \tfrac{1}{2} d^T B_k d \\ |
| 54 | +\text{s.t.}\quad & \nabla g(x_k)\, d + g(x_k) = 0, \\ |
| 55 | +& \nabla h(x_k)\, d + h(x_k) \le 0. |
| 56 | +\end{aligned} |
| 57 | +\] |
| 58 | +\begin{itemize} |
| 59 | + \item Solve QP \(\Rightarrow\) step \(d_k\) and updated multipliers \((\lambda_{k+1},\mu_{k+1})\). |
| 60 | + \item Update \(x_{k+1} = x_k + \alpha_k d_k\) (line search or trust-region). |
| 61 | +\end{itemize} |
| 62 | +\end{frame} |
| 63 | + |
| 64 | +% ------------------------------------------------ |
| 65 | +\begin{frame}{Algorithm Sketch (SQP)} |
| 66 | +\begin{enumerate} |
| 67 | + \item Start with \(x_0\), multipliers \((\lambda_0,\mu_0)\), and \(B_0 \succ 0\). |
| 68 | + \item Build QP at \(x_k\) with \(B_k\), linearized constraints. |
| 69 | + \item Solve QP \(\Rightarrow\) get \(d_k\), \((\lambda_{k+1},\mu_{k+1})\). |
| 70 | + \item Globalize: line search on merit or use filter/TR to choose \(\alpha_k\). |
| 71 | + \item Update \(x_{k+1} = x_k + \alpha_k d_k\), update \(B_{k+1}\) (e.g., BFGS). |
| 72 | +\end{enumerate} |
| 73 | +\end{frame} |
| 74 | + |
| 75 | +% ------------------------------------------------ |
| 76 | +\begin{frame}{Toy Example (Local Models)} |
| 77 | +\textbf{Problem:} |
| 78 | +\[ |
| 79 | +\min_{x\in\R^2} \ \tfrac{1}{2}\norm{x}^2 |
| 80 | +\quad \text{s.t.} \quad g(x)=x_1^2 + x_2 - 1 = 0,\ \ h(x)=x_2 - 0.2 \le 0. |
| 81 | +\] |
| 82 | +At \(x_k\), build QP with |
| 83 | +\[ |
| 84 | +\grad f(x_k)=x_k,\quad B_k=I,\quad |
| 85 | +\nabla g(x_k) = \begin{bmatrix} 2x_{k,1} & 1 \end{bmatrix},\ |
| 86 | +\nabla h(x_k) = \begin{bmatrix} 0 & 1 \end{bmatrix}. |
| 87 | +\] |
| 88 | +Solve for \(d_k\), then \(x_{k+1}=x_k+\alpha_k d_k\). |
| 89 | +\end{frame} |
| 90 | + |
| 91 | + |
| 92 | +% ------------------------------------------------ |
| 93 | +\begin{frame}{Globalization: Making SQP Robust} |
| 94 | +SQP is an important method, and there are many issues to be considered to obtain an \textbf{efficient} and \textbf{reliable} implementation: |
| 95 | +\begin{itemize} |
| 96 | + \item Efficient solution of the linear systems at each Newton Iteration (Matrix block structure can be exploited. |
| 97 | + \item Quasi-Newton approximations to the Hessian. |
| 98 | + \item Trust region, line search, etc. to improve robustnes (i.e TR: restrict \(\norm{d}\) to maintain model validity.) |
| 99 | + \item Treatment of constraints (equality and inequality) during the iterative process. |
| 100 | + \item Selection of good starting guess for $\lambda$. |
| 101 | +\end{itemize} |
| 102 | +\end{frame} |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | +% ------------------------------------------------ |
| 110 | +\begin{frame}{Final Takeaways on SQP} |
| 111 | +\textbf{When SQP vs.\ Interior-Point?} |
| 112 | +\begin{itemize} |
| 113 | + \item \textbf{SQP}: strong local convergence; warm-start friendly; natural for NMPC. |
| 114 | + \item \textbf{IPM}: very robust for large, strictly feasible problems; good for dense inequality sets. |
| 115 | + \item In practice: both are valuable—choose to match problem structure and runtime needs. |
| 116 | +\end{itemize} |
| 117 | +\textbf{Takeaways of SQP} |
| 118 | +\begin{itemize} |
| 119 | + \item SQP = Newton-like method using a sequence of structured QPs. |
| 120 | + \item Globalization (merit/filter/TR) makes it reliable from poor starts. |
| 121 | + \item Excellent fit for control (NMPC/trajectory optimization) due to sparsity and warm starts. |
| 122 | +\end{itemize} |
| 123 | +\end{frame} |
0 commit comments