[足式机器人]Part4 南科大高等机器人控制课 CH11 Bascis of Optimization

本文仅供学习使用
本文参考:
B站:CLEAR_LAB
笔者带更新-运动学
课程主讲教师:
Prof. Wei Zhang
课程链接 :
https://www.wzhanglab.site/teaching/mee-5114-advanced-control-for-robotics/

南科大高等机器人控制课 Ch11 Bascis of Optimization

  • 1. Motivation
  • 2. Some Linear Algebra
    • 2.1 Real Symmetric Matrices
    • 2.2 Positive Semidefinite Matrices
  • 3. Set and Functions
    • 3.1 Affine Sets and Functions
    • 3.2 Qyadratic Sets and Functions
    • 3.3 Convex Set
    • 3.4 Cone
    • 3.5 Positve Semidefinite Cone
    • 3.6 Operations that Preserve Convexity
    • 3.7 Convex Function
    • 3.8 How to Check a Function of Convex?
    • 3.9 Example of Convex Functions
  • 4. Short Introduction to Optimization
    • 4.1 Nonlinear Optimiazation Problems
    • 4.2 Lagrangian
      • 4.2.1 Lagrangian Dual Problems
      • 4.2.2 Duality Theorems
    • 4.3 General Optimality Conditions
    • 4.4 KKT Conditions
  • 5. Linear Program
  • 6. Quadratic Program


1. Motivation

Optimization is argulably the most important tool for modern engineering

Robotics:

  • Differential Inverse Kinematics
  • Dynamics : ABA(most efficient dynamics algorithm) and LQR
  • Motion planning
  • Whole-body control: formulated as a quadratic program
  • SLAM
  • Preception

Machine Learning

  • Linear regression
  • Support vector machine
  • Deep learning —— minimize ‘loss’ function

Other domains

  • Check system stability : SDP
  • Compressive sensing
  • Fourier transform : keast square problem

Roughly speaking, most engineering problems (finding a better design, ensure certain properties of the solution, develop an algorithm), can be formulated as optimization / optimal control problems.
在这里插入图片描述
Our goal :

  • Basic knowledge/key concepts of opt. theory
  • Formulate / Reformulate opt. problem
  • Educated users of tools/packages

2. Some Linear Algebra

2.1 Real Symmetric Matrices

S n ∈ R n × n \mathcal{S} ^n\in \mathbb{R} ^{n\times n} SnRn×n : set of real symmetric matrices in R n \mathbb{R} ^n Rn , A ∈ S n ⇔ A T = A A\in \mathcal{S} ^n\Leftrightarrow A^{\mathrm{T}}=A ASnAT=A

All eigenvalues are real (diagonalizable) —— Important

There exists a full set of orthogonal eigenvectors A ∈ S n , A = T Λ T − 1 A\in \mathcal{S} ^n,A=T\varLambda T^{-1} ASn,A=TΛT1 nonsigular matrix

Spectral decomposition : If A ∈ S n A\in \mathcal{S} ^n ASn , then A = Q Λ Q − 1 A=Q\varLambda Q^{-1} A=QΛQ1 , where Λ \varLambda Λ diagonal and Q Q Q is unitary —— Q T Q = E Q^{\mathrm{T}}Q=E QTQ=E Q = [ q 1 , . . . , q n ] Q=\left[ q_1,...,q_{\mathrm{n}} \right] Q=[q1,...,qn] q i q_{\mathrm{i}} qi is i i ith-column of Q Q Q —— ⇒ q i T q j = { 0 i = j 1 o t h e r w i s e \Rightarrow {q_{\mathrm{i}}}^{\mathrm{T}}q_{\mathrm{j}}=\begin{cases} 0 i=j\\ 1 otherwise\\ \end{cases} qiTqj={0i=j1otherwise , { q i } \left\{ q_{\mathrm{i}} \right\} {qi} orthonormal

2.2 Positive Semidefinite Matrices

A ∈ S n A\in \mathcal{S} ^n ASn is called positive semidefinite(PSD), denoted by A ⪰ 0 A\succeq 0 A0 , if x T A x ⩾ 0 , ∀ x ∈ R n x^{\mathrm{T}}Ax\geqslant 0,\forall x\in \mathbb{R} ^n xTAx0,xRn

A ∈ S n A\in \mathcal{S} ^n ASn is called positive definite(PD) , denoted by A ≻ 0 A\succ 0 A0 , x T A x > 0 x^{\mathrm{T}}Ax>0 xTAx>0 for all nonzero x ∈ R n x\in \mathbb{R} ^n xRn

S + n \mathcal{S} _{+}^{n} S+n : set of all PSD (symmetric) matrices

S + + n \mathcal{S} _{++}^{n} S++n : set of all PD (symmetric) matrices

PSD or PD matrices can also be defined for non-symmetric matrices : e.g. [ 1 1 − 1 1 ] ⇒ x T [ 1 1 − 1 1 ] x = x 1 2 + x 2 2 \left[ \begin{matrix} 1& 1\\ -1& 1\\ \end{matrix} \right] \Rightarrow x^{\mathrm{T}}\left[ \begin{matrix} 1& 1\\ -1& 1\\ \end{matrix} \right] x={x_1}^2+{x_2}^2 [1111]xT[1111]x=x12+x22

We assume PSD and PD are symmetric (unless otherwise noted)

Notation : A ⪰ B A\succeq B AB (resp. A ≻ B A\succ B AB) means A − B ∈ S + n A-B\in \mathcal{S} _{+}^{n} ABS+n (resp. A − B ∈ S + + n A-B\in \mathcal{S} _{++}^{n} ABS++n) —— A − B A-B AB PSD - defined a partial order on S n \mathcal{S} ^n Sn —— It is possible to have A ⊁ B , A ⋡ B A\nsucc B,A\nsucceq B AB,AB

Other equivalent definitions for symmetric PSD matrices :

  • All 2 n − 1 2^n-1 2n1 principal minors of A A A are nonnegative
  • All eigs of A A A are nonnegative
  • There exists a factorization A = B T B A=B^{\mathrm{T}}B A=BTB

Other equivalent definitions for symmetric PD matrices :

  • All n n n principal minors of A A A are positive
  • All eigs of A A A are strictly positive
  • There exists a factorization A = B T B A=B^{\mathrm{T}}B A=BTB with B B B square and nonsingular
    If A > 0 A>0 A>0 , A = Q Λ Q T = Q Λ 1 2 Λ 1 2 Q T = B T B , B = Λ 1 2 Q T A=Q\varLambda Q^{\mathrm{T}}=Q\varLambda ^{\frac{1}{2}}\varLambda ^{\frac{1}{2}}Q^{\mathrm{T}}=B^{\mathrm{T}}B, B=\varLambda ^{\frac{1}{2}}Q^{\mathrm{T}} A=QΛQT=QΛ21Λ21QT=BTB,B=Λ21QT

Useful facts :

  • If T T T nonsigular(doesn’t need to unitary) , A ≻ 0 ⇔ T T A T ≻ 0 A\succ 0\Leftrightarrow T^{\mathrm{T}}AT\succ 0 A0TTAT0 and A ⪰ 0 ⇔ T T A T ⪰ 0 A\succeq 0\Leftrightarrow T^{\mathrm{T}}AT\succeq 0 A0TTAT0
    Recall : T A T − 1 TAT^{-1} TAT1 : similarity transformation S + n \mathcal{S} _{+}^{n} S+n ; T T A T T^{\mathrm{T}}AT TTAT: congruent transformation S + + n \mathcal{S} _{++}^{n} S++n —— are invariant under congruent transformation

  • Inner product on R m × n \mathbb{R} ^{m\times n} Rm×n : < A , B > = t r ( A T B ) = A ⋅ B <A,B>=tr\left( A^{\mathrm{T}}B \right) =A\cdot B <A,B>=tr(ATB)=AB
    ∀ A ∈ R m × n , B ∈ R m × n    t r ( A T B ) = ∑ i = 1 m ∑ j = 1 n A i j B i j \forall A\in \mathbb{R} ^{m\times n},B\in \mathbb{R} ^{m\times n}\,\,tr\left( A^{\mathrm{T}}B \right) =\sum_{i=1}^m{\sum_{j=1}^n{A_{\mathrm{ij}}B_{\mathrm{ij}}}} ARm×n,BRm×ntr(ATB)=i=1mj=1nAijBij , Angle between A , B A,B A,B cos ⁡ θ = < A , B > < A , A > < B , B > , { A ⊥ B ⇒ t r ( A T B ) = 0 t r ( A T B ) > 0 ⇒ a c u t e \cos \theta =\frac{<A,B>}{\sqrt{<A,A><B,B>}},\begin{cases} A\bot B\Rightarrow tr\left( A^{\mathrm{T}}B \right) =0\\ tr\left( A^{\mathrm{T}}B \right) >0\Rightarrow acute\\ \end{cases} cosθ=<A,A><B,B> <A,B>,{ABtr(ATB)=0tr(ATB)>0acute

  • For A , B ∈ S + n , t r ( A B ) > 0 A,B\in \mathcal{S} _{+}^{n},tr\left( AB \right) >0 A,BS+n,tr(AB)>0 —— A , B A,B A,B square symmetric PSD : < A , B > = t r ( A T B ) = t r ( A B ) ⇒ t r ( A B ) ⩾ 0 <A,B>=tr\left( A^{\mathrm{T}}B \right) =tr\left( AB \right) \Rightarrow tr\left( AB \right) \geqslant 0 <A,B>=tr(ATB)=tr(AB)tr(AB)0

  • For ant symmetric A ∈ S n A\in \mathcal{S} ^n ASn , λ min ⁡ ( A ) ⩾ μ ⇔ A ⪰ μ E \lambda _{\min}\left( A \right) \geqslant \mu \Leftrightarrow A\succeq \mu E λmin(A)μAμE and λ max ⁡ ( A ) ⩽ β ⇔ A ⪯ β E \lambda _{\max}\left( A \right) \leqslant \beta \Leftrightarrow A\preceq \beta E λmax(A)βAβE (easy proof)

3. Set and Functions

3.1 Affine Sets and Functions

Linear mapping : f ( x + y ) = f ( x ) + f ( y ) , f ( α x ) = α f ( x ) f\left( x+y \right) =f\left( x \right) +f\left( y \right) ,f\left( \alpha x \right) =\alpha f\left( x \right) f(x+y)=f(x)+f(y),f(αx)=αf(x) , for any x , y x,y x,y in some vector space , and α ∈ R \alpha \in \mathbb{R} αR

Examples:

  • f ( x ) = A x , x ∈ R 3 , A ∈ S O ( 3 ) f\left( x \right) =Ax,x\in \mathbb{R} ^3,A\in SO\left( 3 \right) f(x)=Ax,xR3,ASO(3)
  • f ( x ) = ∫ x ( τ ) d τ f\left( x \right) =\int{x\left( \tau \right) d\tau} f(x)=x(τ)dτ , for all integrable function x ( ⋅ ) x\left( \cdot \right) x()
  • E ( x ) E\left( x \right) E(x) expection of random variable/vector x x x —— E ( x ) = ∫ x f ( x ) d x E\left( x \right) =\int{xf\left( x \right) dx} E(x)=xf(x)dx
  • f ( x ) = t r ( x ) , x ∈ R n × n f\left( x \right) =tr\left( x \right) ,x\in \mathbb{R} ^{n\times n} f(x)=tr(x),xRn×n

Affine mapping : f ( x ) f\left( x \right) f(x) is an affine mapping of x x x if g ( x ) = f ( x ) − f ( x 0 ) g\left( x \right) =f\left( x \right) -f\left( x_0 \right) g(x)=f(x)f(x0) is a linear mapping for some fixed x 0 x_0 x0

Finite-deimension representation fo affine function : f ( x ) = A x + b f\left( x \right) =Ax+b f(x)=Ax+b —— g ( x ) = f ( x ) − f ( 0 ) = A x + b − b = A x g\left( x \right) =f\left( x \right) -f\left( 0 \right) =Ax+b-b=Ax g(x)=f(x)f(0)=Ax+bb=Ax

Homogeneous representation in R n \mathbb{R} ^n Rn : f ( x ) = A x + b ⇔ f ^ ( x ) = A ^ x ^ , A ^ = [ A b 0 1 ] , x ^ = [ x 1 ] f\left( x \right) =Ax+b\Leftrightarrow \hat{f}\left( x \right) =\hat{A}\hat{x},\hat{A}=\left[ \begin{matrix} A& b\\ 0& 1\\ \end{matrix} \right] ,\hat{x}=\left[ \begin{array}{c} x\\ 1\\ \end{array} \right] f(x)=Ax+bf^(x)=A^x^,A^=[A0b1],x^=[x1]

Linear and affine are often used interchangeably

Linear/affine sets: { x : f ( x ) ⩽ 0 } \left\{ x:f\left( x \right) \leqslant 0 \right\} {x:f(x)0} ofr affine mapping f f f

  • Line/hyperplane : a T x = b a^{\mathrm{T}}x=b aTx=b
    a T x = b ⇒ a T ( x − x 0 ) = 0 ⇒ a T x − a T x 0 = 0 , a T x 0 = b a^{\mathrm{T}}x=b\Rightarrow a^{\mathrm{T}}\left( x-x_0 \right) =0\Rightarrow a^{\mathrm{T}}x-a^{\mathrm{T}}x_0=0,a^{\mathrm{T}}x_0=b aTx=baT(xx0)=0aTxaTx0=0,aTx0=b
  • Half space : a T x ⩽ b a^{\mathrm{T}}x\leqslant b aTxb —— a T x − a T x 0 ⩽ 0 a^{\mathrm{T}}x-a^{\mathrm{T}}x_0\leqslant 0 aTxaTx00
  • Polyhedron : H x ⩽ h Hx\leqslant h Hxh —— H ∈ R m × n , x ∈ R n , h ∈ R m H\in \mathbb{R} ^{m\times n},x\in \mathbb{R} ^n,h\in \mathbb{R} ^m HRm×n,xRn,hRm
    [ H 1 T ⋮ H m T ] x ⩽ [ h 1 ⋮ h m ] \left[ \begin{array}{c} {H_1}^{\mathrm{T}}\\ \vdots\\ {H_{\mathrm{m}}}^{\mathrm{T}}\\ \end{array} \right] x\leqslant \left[ \begin{array}{c} h_1\\ \vdots\\ h_{\mathrm{m}}\\ \end{array} \right] H1THmT x h1hm —— Imposes m m m inequality H i T x ⩽ h i {H_{\mathrm{i}}}^{\mathrm{T}}x\leqslant h_{\mathrm{i}} HiTxhi —— half space
  • For matrix variable X ∈ R n × n X\in \mathbb{R} ^{n\times n} XRn×n, t r ( A X ) ⩽ 0 tr\left( AX \right) \leqslant 0 tr(AX)0 for given constant matrix A ∈ R n × n A\in \mathbb{R} ^{n\times n} ARn×n is halfspace in R n × n \mathbb{R} ^{n\times n} Rn×n
    在这里插入图片描述

3.2 Qyadratic Sets and Functions

Quadratic functions in R n \mathbb{R} ^n Rn : f ( x ) = x T A x + b T x + c , x = [ x 1 ⋮ x n ] , f : R n → R f\left( x \right) =x^{\mathrm{T}}Ax+b^{\mathrm{T}}x+c,x=\left[ \begin{array}{c} x_1\\ \vdots\\ x_{\mathrm{n}}\\ \end{array} \right] ,f:\mathbb{R} ^n\rightarrow \mathbb{R} f(x)=xTAx+bTx+c,x= x1xn ,f:RnR

Quadratic functions (honogeneous form) : x ^ = [ x 1 ] , f ^ ( x ) = [ x 1 ] T [ A b 2 b 2 c ] [ x 1 ] \hat{x}=\left[ \begin{array}{c} x\\ 1\\ \end{array} \right] ,\hat{f}\left( x \right) =\left[ \begin{array}{c} x\\ 1\\ \end{array} \right] ^{\mathrm{T}}\left[ \begin{matrix} A& \frac{b}{2}\\ \frac{b}{2}& c\\ \end{matrix} \right] \left[ \begin{array}{c} x\\ 1\\ \end{array} \right] x^=[x1],f^(x)=[x1]T[A2b2bc][x1] —— f ^ ( x ) = x ^ T A ^ x ^ \hat{f}\left( x \right) =\hat{x}^{\mathrm{T}}\hat{A}\hat{x} f^(x)=x^TA^x^ ( A ∈ S + n ⇔ f ( x ) ⩾ 0 , ∀ x ∈ R n A\in \mathcal{S} _{+}^{n}\Leftrightarrow f\left( x \right) \geqslant 0,\forall x\in \mathbb{R} ^n AS+nf(x)0,xRn) —— f f f - PSD f ( x ) > 0 f\left( x \right) >0 f(x)>0 for all x ≠ 0 x\ne 0 x=0 ; f ( x ) = 0 f\left( x \right) =0 f(x)=0 for all x = 0 x=0 x=0

Quadratic sets : { x ∈ R n : f ( x ) ⩽ 0 } \left\{ x\in \mathbb{R} ^n:f\left( x \right) \leqslant 0 \right\} {xRn:f(x)0} for some quadratic function f f f
eg1: Ball —— { x ∈ R n ∥ x − x c ∥ 2 ⩽ r c 2 } \left\{ x\in \mathbb{R} ^n\left\| x-x_{\mathrm{c}} \right\| ^2\leqslant {r_{\mathrm{c}}}^2 \right\} {xRnxxc2rc2} ⇒ f ( x ) = ( x − x c ) T ( x − x c ) − r c 2 ⩽ 0 \Rightarrow f\left( x \right) =\left( x-x_{\mathrm{c}} \right) ^{\mathrm{T}}\left( x-x_{\mathrm{c}} \right) -{r_{\mathrm{c}}}^2\leqslant 0 f(x)=(xxc)T(xxc)rc20
eg2 : Ellipsoid : { x ∈ R n ( x − x c ) T P − 1 ( x − x c ) ⩽ 1 , P ∈ S + + n } \left\{ x\in \mathbb{R} ^n\left( x-x_{\mathrm{c}} \right) ^{\mathrm{T}}P^{-1}\left( x-x_{\mathrm{c}} \right) \leqslant 1,P\in \mathcal{S} _{++}^{n} \right\} {xRn(xxc)TP1(xxc)1,PS++n}

3.3 Convex Set

Convex Set : A set S S S is convex if any line segment stays in the set
x 1 , x 2 ∈ S ⇒ α x 1 + ( 1 − α ) x 2 ∈ S , ∀ α ∈ [ 0 , 1 ] ⇒ α 1 x 1 + α 2 x 2 , α 1 + α 2 = 1 , α 1 ⩾ 0 , α 2 ⩾ 0 x_1,x_2\in S\Rightarrow \alpha x_1+\left( 1-\alpha \right) x_2\in S,\forall \alpha \in \left[ 0,1 \right] \Rightarrow \alpha _1x_1+\alpha _2x_2,\alpha _1+\alpha _2=1,\alpha _1\geqslant 0,\alpha _2\geqslant 0 x1,x2Sαx1+(1α)x2S,α[0,1]α1x1+α2x2,α1+α2=1,α10,α20

  • convex combination of x 1 , x 2 x_1,x_2 x1,x2
    在这里插入图片描述

Convex combination of x 1 , . . . , x k x_1,...,x_{\mathrm{k}} x1,...,xk :
{ α 1 x 1 + α 2 x 2 + . . . + α k x k : α i ⩾ 0 , ∑ i α i = 1 } \left\{ \alpha _1x_1+\alpha _2x_2+...+\alpha _{\mathrm{k}}x_{\mathrm{k}}:\alpha _{\mathrm{i}}\geqslant 0,\sum_i{\alpha _{\mathrm{i}}}=1 \right\} {α1x1+α2x2+...+αkxk:αi0,iαi=1}

Convex hull-凸包 : c o ‾ { S } \overline{co}\left\{ S \right\} co{S} set of all convex combinations of points in S S S

3.4 Cone

A set S S S is called a cone if λ > 0 , x ∈ S ⇒ λ x ∈ S \lambda >0,x\in S\Rightarrow \lambda x\in S λ>0,xSλxS
在这里插入图片描述
Conic-圆锥的 combination of x 1 x_1 x1 and x 2 x_2 x2 : x = α 1 x 1 + α 2 x 2 , α 1 ⩾ 0 , α 2 ⩾ 0 x=\alpha _1x_1+\alpha _2x_2,\alpha _1\geqslant 0,\alpha _2\geqslant 0 x=α1x1+α2x2,α10,α20 —— c o n e ( x 1 , . . . , x k ) = { ∑ i α i x i : α i ⩾ 0 } cone\left( x_1,...,x_{\mathrm{k}} \right) =\left\{ \sum_i{\alpha _{\mathrm{i}}x_{\mathrm{i}}}:\alpha _{\mathrm{i}}\geqslant 0 \right\} cone(x1,...,xk)={iαixi:αi0}

Convex cone:

  1. a cone that is convex
  2. equivalently,a set that contains all the conic combinations of points in the set

3.5 Positve Semidefinite Cone

The set of positive semidefinite matrices(i.e, S + n \mathcal{S} _{+}^{n} S+n is a convex cone and is referred to as the positive semidefinite(PSD) cone) —— S + n \mathcal{S} _{+}^{n} S+n : set of PSD A ∈ S + n ⇒ λ A ⩾ 0 ⇒ λ A ∈ S + n A\in \mathcal{S} _{+}^{n}\Rightarrow \lambda A\geqslant 0\Rightarrow \lambda A\in \mathcal{S} _{+}^{n} AS+nλA0λAS+n S + n \mathcal{S} _{+}^{n} S+n is a cone
By definition : pick arbitrary A , B ∈ S + n A,B\in \mathcal{S} _{+}^{n} A,BS+n , α A + ( 1 − α ) B ∈ S + n , α ∈ [ 0 , 1 ] \alpha A+\left( 1-\alpha \right) B\in \mathcal{S} _{+}^{n},\alpha \in \left[ 0,1 \right] αA+(1α)BS+n,α[0,1] ( ⇒ x T ( α A + ( 1 − α ) B ) x = α x T A x + ( 1 − α ) x T B x ⩾ 0 \Rightarrow x^{\mathrm{T}}\left( \alpha A+\left( 1-\alpha \right) B \right) x=\alpha x^{\mathrm{T}}Ax+\left( 1-\alpha \right) x^{\mathrm{T}}Bx\geqslant 0 xT(αA+(1α)B)x=αxTAx+(1α)xTBx0)

Recall that if A , B ∈ S + n A,B\in \mathcal{S} _{+}^{n} A,BS+n , then t r ( A B ) ⩾ 0 tr\left( AB \right) \geqslant 0 tr(AB)0 . This indicates that the cone S + n \mathcal{S} _{+}^{n} S+n is acute.

x 1 ∈ R n , x 2 ∈ R n x_1\in \mathbb{R} ^n,x_2\in \mathbb{R} ^n x1Rn,x2Rn
α 1 x 1 + α 2 x 2 \alpha _1x_1+\alpha _2x_2 α1x1+α2x2 linear combination
α 1 x 1 + α 2 x 2 \alpha _1x_1+\alpha _2x_2 α1x1+α2x2 α 1 ⩾ 0 , α 2 ⩾ 0 \alpha _1\geqslant 0,\alpha _2\geqslant 0 α10,α20 conic combination
α 1 x 1 + α 2 x 2 \alpha _1x_1+\alpha _2x_2 α1x1+α2x2 α 1 ⩾ 0 , α 2 ⩾ 0 \alpha _1\geqslant 0,\alpha _2\geqslant 0 α10,α20 α 1 + α 2 = 1 \alpha _1+\alpha _2=1 α1+α2=1 convex combination

3.6 Operations that Preserve Convexity

Intersection of possibly infinite number of convex sets is convex
eg: polyhedron —— H 1 T x ⩽ h 1 , H 2 T x ⩽ h 2 , [ H 1 T H 2 T ] x ⩽ [ h 1 h 2 ] {H_1}^{\mathrm{T}}x\leqslant h_1,{H_2}^{\mathrm{T}}x\leqslant h_2,\left[ \begin{array}{c} {H_1}^{\mathrm{T}}\\ {H_2}^{\mathrm{T}}\\ \end{array} \right] x\leqslant \left[ \begin{array}{c} h_1\\ h_2\\ \end{array} \right] H1Txh1,H2Txh2,[H1TH2T]x[h1h2]
eg: PSD cone

Affine mapping f : R n → R m f:\mathbb{R} ^n\rightarrow \mathbb{R} ^m f:RnRm (i.e. f ( x ) = A x + b f\left( x \right) =Ax+b f(x)=Ax+b)

  • f ( X ) = { f ( x ) : x ∈ X } f\left( X \right) =\left\{ f\left( x \right) :x\in X \right\} f(X)={f(x):xX} is convex whenever X ⊆ R n X\subseteq \mathbb{R} ^n XRn is convex
    e.g. : Ellipsoid : E 1 = { x ∈ R n : ( x − x c ) T P − 1 ( x − x c ) ⩽ 1 } E_1=\left\{ x\in \mathbb{R} ^n:\left( x-x_{\mathrm{c}} \right) ^{\mathrm{T}}P^{-1}\left( x-x_{\mathrm{c}} \right) \leqslant 1 \right\} E1={xRn:(xxc)TP1(xxc)1} or E 2 = { x c + A u : ∥ u ∥ 2 ⩽ 1 } E_2=\left\{ x_{\mathrm{c}}+Au:\left\| u \right\| _2\leqslant 1 \right\} E2={xc+Au:u21}
  • f − 1 ( Y ) = { x ∈ R n : f ( x ) ∈ Y } f^{-1}\left( Y \right) =\left\{ x\in \mathbb{R} ^n:f\left( x \right) \in Y \right\} f1(Y)={xRn:f(x)Y} is convex whenever Y ⊆ R m Y\subseteq \mathbb{R} ^m YRm is convex
    e.g. { A x ⩽ b } = f − 1 ( R + n ) \left\{ Ax\leqslant b \right\} =f^{-1}\left( \mathbb{R} _{+}^{n} \right) {Axb}=f1(R+n) , where R + n \mathbb{R} _{+}^{n} R+n in nonnegative orthant

3.7 Convex Function

Consider a finite dimensional vector space χ \chi χ . Let D ⊂ χ \mathcal{D} \subset \chi Dχ be convex

Definition 1 (Convex Function)
A function f : D → R f:\mathcal{D} \rightarrow \mathbb{R} f:DR is called convex if
f ( α x 1 + ( 1 − α ) x 2 ) ⩽ α f ( x 1 ) + ( 1 − α ) f ( x 2 ) , ∀ x 1 , x 2 ∈ D , ∀ α ∈ [ 0 , 1 ] f\left( \alpha x_1+\left( 1-\alpha \right) x_2 \right) \leqslant \alpha f\left( x_1 \right) +\left( 1-\alpha \right) f\left( x_2 \right) ,\forall x_1,x_2\in \mathcal{D} ,\forall \alpha \in \left[ 0,1 \right] f(αx1+(1α)x2)αf(x1)+(1α)f(x2),x1,x2D,α[0,1]
在这里插入图片描述

  • f : D → R f:\mathcal{D} \rightarrow \mathbb{R} f:DR is called strictly convex if
    f ( α x 1 + ( 1 − α ) x 2 ) < α f ( x 1 ) + ( 1 − α ) f ( x 2 ) , ∀ x 1 ≠ x 2 ∈ D , ∀ α ∈ [ 0 , 1 ] f\left( \alpha x_1+\left( 1-\alpha \right) x_2 \right) <\alpha f\left( x_1 \right) +\left( 1-\alpha \right) f\left( x_2 \right) ,\forall x_1\ne x_2\in \mathcal{D} ,\forall \alpha \in \left[ 0,1 \right] f(αx1+(1α)x2)<αf(x1)+(1α)f(x2),x1=x2D,α[0,1]
  • f : D → R f:\mathcal{D} \rightarrow \mathbb{R} f:DR is called concave if − f -f f is convex

3.8 How to Check a Function of Convex?

Directly use definition

  • First-order condition : if f f f is differentiable over an open set that contains D \mathcal{D} D , then f f f is convex over D \mathcal{D} D iff(if and only if) —— stay above Taylor around x x x
    f ( z ) ⩾ f ( x ) + ∇ f ( x ) T ( z − x ) , ∀ x , z ∈ D f\left( z \right) \geqslant f\left( x \right) +\nabla f\left( x \right) ^{\mathrm{T}}\left( z-x \right) ,\forall x,z\in \mathcal{D} f(z)f(x)+f(x)T(zx),x,zD
  • Second-order condition: Suppose f f f is twicely differentiable over an open set that contains D \mathcal{D} D , then f f f is convex over D \mathcal{D} D iff
    ∇ 2 f ( x ) ⪰ 0 \nabla ^2f\left( x \right) \succeq 0 2f(x)0
    (concave ∇ 2 f ( x ) ⪯ 0 \nabla ^2f\left( x \right) \preceq 0 2f(x)0)
    Many other conditions , tricks,…

3.9 Example of Convex Functions

In general , affine functions are both convex and concave
e.g. : f ( x ) = a T x + b , x ∈ R n f\left( x \right) =a^{\mathrm{T}}x+b,x\in \mathbb{R} ^n f(x)=aTx+b,xRn
e.g. : f ( X ) = t r ( A T X ) + c = ∑ i = 1 m ∑ j = 1 n A i j X i j + c , X ∈ R m × n f\left( X \right) =tr\left( A^{\mathrm{T}}X \right) +c=\sum_{i=1}^m{\sum_{j=1}^n{A_{\mathrm{ij}}X_{\mathrm{ij}}+c}},X\in \mathbb{R} ^{m\times n} f(X)=tr(ATX)+c=i=1mj=1nAijXij+c,XRm×n
f : R m × n → s c a l a r f:\mathbb{R} ^{m\times n}\rightarrow scalar f:Rm×nscalar / affine func of X X X (matrix)

Quadratic functions : f ( x ) = x T Q x + b T x + c f\left( x \right) =x^{\mathrm{T}}Qx+b^{\mathrm{T}}x+c f(x)=xTQx+bTx+c is convex iff Q ⪰ 0 Q\succeq 0 Q0
unsing 2nd-order condition ∇ 2 f ( x ) = [ ∂ 2 f ∂ x 1 ∂ x 1 ∂ 2 f ∂ x 1 ∂ x 2 ⋯ ⋮ ∂ 2 f ∂ x 2 ∂ x 2 ⋯ ⋮ ⋮ ⋱ ] = Q \nabla ^2f\left( x \right) =\left[ \begin{matrix} \frac{\partial ^2f}{\partial x_1\partial x_1}& \frac{\partial ^2f}{\partial x_1\partial x_2}& \cdots\\ \vdots& \frac{\partial ^2f}{\partial x_2\partial x_2}& \cdots\\ \vdots& \vdots& \ddots\\ \end{matrix} \right] =Q 2f(x)= x1x12fx1x22fx2x22f =Q

All norms are convex
e.g. : in R n \mathbb{R} ^n Rn : f ( x ) = ∥ x ∥ p = ( ∑ i = 1 n ∣ x i ∣ p ) 1 / p f\left( x \right) =\left\| x \right\| _{\mathrm{p}}=\left( \sum_{i=1}^n{\left| x_{\mathrm{i}} \right|^p} \right) ^{1/p} f(x)=xp=(i=1nxip)1/p , ∥ x ∥ ∞ = max ⁡ k ∣ x k ∣ \left\| x \right\| _{\infty}=\max _{\mathrm{k}}\left| x_{\mathrm{k}} \right| x=maxkxk
e.g. : in R m × n \mathbb{R} ^{m\times n} Rm×n : f ( X ) = ∥ X ∥ 2 = σ max ⁡ f\left( X \right) =\left\| X \right\| _2=\sigma _{\max} f(X)=X2=σmax

Affine mapping of convex func is still convex
e.g. : suppose f ( x ) f\left( x \right) f(x) convex ⇒ \Rightarrow g ( x ) = a f ( x ) + b g\left( x \right) =af\left( x \right) +b g(x)=af(x)+b is also convex

Pointwise maximum of convex func is convex
e.g. : suppose f 1 ( x ) , f 2 ( x ) f_1\left( x \right) ,f_2\left( x \right) f1(x),f2(x) are convex ⇒ \Rightarrow g ( x ) = max ⁡ { f 1 ( x ) , f 2 ( x ) } g\left( x \right) =\max \left\{ f_1\left( x \right) ,f_2\left( x \right) \right\} g(x)=max{f1(x),f2(x)} is convex
在这里插入图片描述
e.g. : suppose f ( x , θ ) f\left( x,\theta \right) f(x,θ) is convex for each θ ∈ [ 1 , 2 ] \theta \in \left[ 1,2 \right] θ[1,2] , then g ( x ) = max ⁡ θ ∈ [ 1 , 2 ] { f ( x , θ ) } g\left( x \right) =\underset{\theta \in \left[ 1,2 \right]}{\max}\left\{ f\left( x,\theta \right) \right\} g(x)=θ[1,2]max{f(x,θ)} convex —— f ( x , θ ) = θ x + b f\left( x,\theta \right) =\theta x+b f(x,θ)=θx+b ⇒ \Rightarrow g ( x ) = max ⁡ θ ∈ [ 1 , 2 ] { θ x + b } g\left( x \right) =\underset{\theta \in \left[ 1,2 \right]}{\max}\left\{ \theta x+b \right\} g(x)=θ[1,2]max{θx+b}

Pointwise minimum of concave func is concave —— S ( x ) = min ⁡ θ ∈ [ 1 , 2 ] { θ x + b } S\left( x \right) =\underset{\theta \in \left[ 1,2 \right]}{\min}\left\{ \theta x+b \right\} S(x)=θ[1,2]min{θx+b} is concave

4. Short Introduction to Optimization

4.1 Nonlinear Optimiazation Problems

Nonlinear Optimiazation: Primal problem
minimize : f 0 ( x ) f_0\left( x \right) f0(x) —— cost func f : R n → R f:\mathbb{R} ^n\rightarrow \mathbb{R} f:RnR , x = [ x 1 ⋮ x n ] ∈ R n x=\left[ \begin{array}{c} x_1\\ \vdots\\ x_{\mathrm{n}}\\ \end{array} \right] \in \mathbb{R} ^n x= x1xn Rn
subject to : f i ( x ) ⩽ 0 , i = 1 , ⋯   , m , h j ( x ) = 0 , j = 1 , ⋯   , q f_{\mathrm{i}}\left( x \right) \leqslant 0,i=1,\cdots ,m , h_{\mathrm{j}}\left( x \right) =0,j=1,\cdots ,q fi(x)0,i=1,,m,hj(x)=0,j=1,,q —— constrain set C = { x ∈ R n : f i ( x ) ⩽ 0 , h j ( x ) = 0 } C=\left\{ x\in \mathbb{R} ^n:f_{\mathrm{i}}\left( x \right) \leqslant 0,h_{\mathrm{j}}\left( x \right) =0 \right\} C={xRn:fi(x)0,hj(x)=0} , if x ∈ C x\in C xC , then x x x is called feasible

decison variable x ∈ R n x\in \mathbb{R} ^n xRn , domain D \mathcal{D} D, referred to as primal problem

optimal value p ∗ p^* p

is called a convex optimization problem if f 0 , . . . , f m f_0,...,f_{\mathrm{m}} f0,...,fm are convex and h 1 , . . . , h q h_1,...,h_{\mathrm{q}} h1,...,hq are affine —— means objective function f 0 f_0 f0 is convex and constrain set is convex

typically convex optimization can be solved efficiently

  • Categories :
    objective func (Linear/affine) + constrain set/func(Linear/affine) —— Linear Program LP
    objective func (Quardratic - convex) + constrain set/func(Linear/affine) —— Quardratic Program QP
    objective func (Quardratic - convex) + constrain set/func(uardratic) —— Quardratic Constrained Quardratic Program QCQP - Hard to solve
    在这里插入图片描述
  • How to find optimal solutions?
    optimality condition: for unconstrained problems : 1st-order optimality condition x ∗ x^* x is local minimizer then ∇ f ( x ∗ ) = 0 \nabla f\left( x^* \right) =0 f(x)=0 (Taylor expension)
    For convex problem , above condition guarantees x ∗ x^* x is global minimizer

Question : what about constrained optimization?

4.2 Lagrangian

Associated Lagrangian : L : D × R m × R q → R L:\mathcal{D} \times \mathbb{R} ^m\times \mathbb{R} ^q\rightarrow \mathbb{R} L:D×Rm×RqR
L ( x , λ , ν ) = f 0 ( x ) + ∑ i = 1 m λ i f i ( x ) + ∑ j = 1 q ν j h j ( x ) , λ i ⩾ 0 , ν j ⩾ 0 L\left( x,\lambda ,\nu \right) =f_0\left( x \right) +\sum_{i=1}^m{\lambda _{\mathrm{i}}f_{\mathrm{i}}\left( x \right)}+\sum_{j=1}^q{\nu _{\mathrm{j}}h_{\mathrm{j}}\left( x \right)},\lambda _{\mathrm{i}}\geqslant 0,\nu _{\mathrm{j}}\geqslant 0 L(x,λ,ν)=f0(x)+i=1mλifi(x)+j=1qνjhj(x),λi0,νj0
weighted sum of objective and constraints functions
λ i \lambda _{\mathrm{i}} λi : Lagrangian multiplier associated with f i ( x ) ⩽ 0 f_{\mathrm{i}}\left( x \right) \leqslant 0 fi(x)0
ν j \nu _{\mathrm{j}} νj : Lagrangian multiplier associated with h j ( x ) = 0 h_{\mathrm{j}}\left( x \right) =0 hj(x)=0

4.2.1 Lagrangian Dual Problems

Lagrangian Dual Problems : g : R m × R q → R g:\mathbb{R} ^m\times \mathbb{R} ^q\rightarrow \mathbb{R} g:Rm×RqR
g ( λ , ν ) = i n f x ∈ D L ( x , λ , ν ) = i n f x ∈ D { f 0 ( x ) + ∑ i = 1 m λ i f i ( x ) + ∑ j = 1 q ν j h j ( x ) } g\left( \lambda ,\nu \right) =\underset{x\in \mathcal{D}}{\mathrm{inf}}L\left( x,\lambda ,\nu \right) =\underset{x\in \mathcal{D}}{\mathrm{inf}}\left\{ f_0\left( x \right) +\sum_{i=1}^m{\lambda _{\mathrm{i}}f_{\mathrm{i}}\left( x \right)}+\sum_{j=1}^q{\nu _{\mathrm{j}}h_{\mathrm{j}}\left( x \right)} \right\} g(λ,ν)=xDinfL(x,λ,ν)=xDinf{f0(x)+i=1mλifi(x)+j=1qνjhj(x)}

  • g g g is convex(always true - regardless fo whether the primal peoblem is convex or not) , can be − ∞ -\infty for some λ , ν \lambda ,\nu λ,ν
  • Lower bound property : If λ ⪰ 0 \lambda \succeq 0 λ0 (elementwise) , then g ( λ , ν ) ⩽ p ∗ g\left( \lambda ,\nu \right) \leqslant p^* g(λ,ν)p
    Let x ~ \tilde{x} x~ be arbitrary feasible primal variable and λ ⩾ 0 \lambda \geqslant 0 λ0 , f 0 ( x ~ ) ⩾ L ( x ~ , λ , ν ) ⩾ i n f x ∈ D L ( x , λ , ν ) = g ( λ , ν ) ⇒ min ⁡ x ~    f e a s i b l e f 0 ( x ~ ) ⩾ g ( λ , ν ) f_0\left( \tilde{x} \right) \geqslant L\left( \tilde{x},\lambda ,\nu \right) \geqslant \underset{x\in \mathcal{D}}{\mathrm{inf}}L\left( x,\lambda ,\nu \right) =g\left( \lambda ,\nu \right) \Rightarrow \underset{\tilde{x}\,\,feasible}{\min}f_0\left( \tilde{x} \right) \geqslant g\left( \lambda ,\nu \right) f0(x~)L(x~,λ,ν)xDinfL(x,λ,ν)=g(λ,ν)x~feasibleminf0(x~)g(λ,ν)

Lagrangian Dual Problems :
maximize : g ( λ , ν ) g\left( \lambda ,\nu \right) g(λ,ν)
subject to : λ ⪰ 0 \lambda \succeq 0 λ0
⇔ \Leftrightarrow change convex optimization problem
min : − g ( λ , ν ) -g\left( \lambda ,\nu \right) g(λ,ν)
subject to : − λ ⪯ 0 -\lambda \preceq 0 λ0

Fined the best lower bound on p ∗ p^* p using the Lagrange dual function

Dual problem is a convex optimization problem even when the primal is nonconvex

optimal value denoted d ∗ d^* d

( λ , ν ) \left( \lambda ,\nu \right) (λ,ν) is called dual feasible if λ ⪰ 0 \lambda \succeq 0 λ0 and ( λ , ν ) ∈ d o m ( g ) \left( \lambda ,\nu \right) \in dom\left( g \right) (λ,ν)dom(g)

Often simplified by making the implicit constraint ( λ , ν ) ∈ d o m ( g ) \left( \lambda ,\nu \right) \in dom\left( g \right) (λ,ν)dom(g) explicit

例子-见 5

4.2.2 Duality Theorems

  • Weak Duality : d ∗ ⩽ p ∗ d^*\leqslant p^* dp
    always hold (for convex and nonconvex problems)
    can be used to find nontrivial lower bounds for difficult problems
  • Strong Duality : d ∗ = p ∗ d^*= p^* d=p
    not true in general, but typically holds for convex problems
    conditions that guarantee strong duality in convex problems are called constriant qualifications
    Slater’s constraint qualification : Primal is strictly feasible

4.3 General Optimality Conditions

For general optimization problem:
minimize : f 0 ( x ) f_0\left( x \right) f0(x)
subject to : f i ( x ) ⩽ 0 , i = 1 , ⋯   , m , h j ( x ) = 0 , j = 1 , ⋯   , q f_{\mathrm{i}}\left( x \right) \leqslant 0,i=1,\cdots ,m,h_{\mathrm{j}}\left( x \right) =0,j=1,\cdots ,q fi(x)0,i=1,,m,hj(x)=0,j=1,,q

General Optimality Conditions : strong duality and ( x ∗ , λ ∗ , ν ∗ ) \left( x^*,\lambda ^*,\nu ^* \right) (x,λ,ν) is primal-dual optimal ⇔ \Leftrightarrow

  • x ∗ = a r g min ⁡ x L ( x , λ ∗ , ν ∗ ) x^*=arg\min _{\mathrm{x}}L\left( x,\lambda ^*,\nu ^* \right) x=argminxL(x,λ,ν) —— Lagrange optimality
  • λ i ∗ f i ( x ) = 0 , ∀ i \lambda _{\mathrm{i}}^{*}f_{\mathrm{i}}\left( x \right) =0,\forall i λifi(x)=0,i —— Complementarity
  • f i ( x ∗ ) ⩽ 0 , h j ( x ∗ ) = 0 , ∀ i , j f_{\mathrm{i}}\left( x^* \right) \leqslant 0,h_{\mathrm{j}}\left( x^* \right) =0,\forall i,j fi(x)0,hj(x)=0,i,j —— primal feasibility
  • λ i ∗ ⩾ 0 , ∀ i \lambda _{\mathrm{i}}^{*}\geqslant 0,\forall i λi0,i —— dual feasibility

Proof Necessity
Assume x ∗ x^* x and ( λ ∗ , ν ∗ ) \left( \lambda ^*,\nu ^* \right) (λ,ν) are primal-dual optimal slns with zero duality gap

f 0 ( x ∗ ) = g ( λ ∗ , ν ∗ ) = min ⁡ x ∈ D ( f 0 ( x ) + ∑ i = 1 m λ i ∗ f i ( x ) + ∑ j = 1 q ν j ∗ h j ( x ) ) ⩽ f 0 ( x ∗ ) + ∑ i = 1 m λ i ∗ f i ( x ∗ ) + ∑ j = 1 q ν j ∗ h j ( x ∗ ) ⩽ f 0 ( x ∗ ) f_0\left( x^* \right) =g\left( \lambda ^*,\nu ^* \right) =\underset{x\in \mathcal{D}}{\min}\left( f_0\left( x \right) +\sum_{i=1}^m{\lambda _{\mathrm{i}}^{*}f_{\mathrm{i}}\left( x \right)}+\sum_{j=1}^q{\nu _{\mathrm{j}}^{*}h_{\mathrm{j}}\left( x \right)} \right) \leqslant f_0\left( x^* \right) +\sum_{i=1}^m{\lambda _{\mathrm{i}}^{*}f_{\mathrm{i}}\left( x^* \right)}+\sum_{j=1}^q{\nu _{\mathrm{j}}^{*}h_{\mathrm{j}}\left( x^* \right)}\leqslant f_0\left( x^* \right) f0(x)=g(λ,ν)=xDmin(f0(x)+i=1mλifi(x)+j=1qνjhj(x))f0(x)+i=1mλifi(x)+j=1qνjhj(x)f0(x)

Therefore, all inequalities are actually equalities

Replacing the first inequality with equality ⇒ x ∗ = a r g min ⁡ x L ( x , λ ∗ , ν ∗ ) \Rightarrow x^*=arg\min _{\mathrm{x}}L\left( x,\lambda ^*,\nu ^* \right) x=argminxL(x,λ,ν)

Replacing the second inequality with equality ⇒ \Rightarrow complementarity condition

Proof of Sufficiency
Assume ( x ∗ , λ ∗ , ν ∗ ) \left( x^*,\lambda ^*,\nu ^* \right) (x,λ,ν) satisfies the optimality conditions :
g ( λ ∗ , ν ∗ ) = f ( x ∗ ) + ∑ i = 1 m λ i ∗ f i ( x ∗ ) + ∑ j = 1 q ν j ∗ h j ( x ∗ ) = f ( x ∗ ) g\left( \lambda ^*,\nu ^* \right) =f\left( x^* \right) +\sum_{i=1}^m{\lambda _{\mathrm{i}}^{*}f_{\mathrm{i}}\left( x^* \right)}+\sum_{j=1}^q{\nu _{\mathrm{j}}^{*}h_{\mathrm{j}}\left( x^* \right)}=f\left( x^* \right) g(λ,ν)=f(x)+i=1mλifi(x)+j=1qνjhj(x)=f(x)

The first equality is by Lagrange optimality, and the 2nd equality is due to conplementarity

Therefore, the duality gap is zero, and ( x ∗ , λ ∗ , ν ∗ ) \left( x^*,\lambda ^*,\nu ^* \right) (x,λ,ν) is the primal dual optimal solution

4.4 KKT Conditions

For convex optimization problem:
minimize : f 0 ( x ) f_0\left( x \right) f0(x)
subject to : f i ( x ) ⩽ 0 , i = 1 , ⋯   , m , h j ( x ) = 0 , j = 1 , ⋯   , q f_{\mathrm{i}}\left( x \right) \leqslant 0,i=1,\cdots ,m,h_{\mathrm{j}}\left( x \right) =0,j=1,\cdots ,q fi(x)0,i=1,,m,hj(x)=0,j=1,,q

Suppose duality gap is zero , then ( x ∗ , λ ∗ , ν ∗ ) \left( x^*,\lambda ^*,\nu ^* \right) (x,λ,ν) is primal-dual optimal if and only if it satisfies the Karush-Kuhn-Tucker(KKT) conditions

  • ∂ L ∂ x ( x , λ ∗ , ν ∗ ) = 0 \frac{\partial L}{\partial x}\left( x,\lambda ^*,\nu ^* \right) =0 xL(x,λ,ν)=0 —— Stationarity
  • λ i ∗ f i ( x ∗ ) = 0 , ∀ i \lambda _{\mathrm{i}}^{*}f_{\mathrm{i}}\left( x^* \right) =0,\forall i λifi(x)=0,i —— Complementarity
  • f i ( x ∗ ) ⩽ 0 , h j ( x ∗ ) = 0 , ∀ i , j f_{\mathrm{i}}\left( x^* \right) \leqslant 0,h_{\mathrm{j}}\left( x^* \right) =0,\forall i,j fi(x)0,hj(x)=0,i,j —— primal feasibility
  • λ i ∗ ⩾ 0 , ∀ i \lambda _{\mathrm{i}}^{*}\geqslant 0,\forall i λi0,i —— dual feasibility

5. Linear Program

Primal Formulations
minimize : c T x c^{\mathrm{T}}x cTx
subject to : A x + b , x ⩾ 0 Ax+b,x\geqslant 0 Ax+b,x0

Lagrangian func : L ( x , λ , ν ) = c T x + λ T ( − x ) + ν T ( A x − b ) L\left( x,\lambda ,\nu \right) =c^{\mathrm{T}}x+\lambda ^{\mathrm{T}}\left( -x \right) +\nu ^{\mathrm{T}}\left( Ax-b \right) L(x,λ,ν)=cTx+λT(x)+νT(Axb)
⇒ g ( λ , ν ) = i n f x ∈ R n { ( c T − λ T + ν T A ) x − ν T b    } = { − ∞ i f    c T − λ T + ν T A ≠ 0 − b T ν    i f    c T − λ T + ν T A = 0 \Rightarrow g\left( \lambda ,\nu \right) =\underset{x\in \mathbb{R} ^n}{\mathrm{inf}}\left\{ \left( c^{\mathrm{T}}-\lambda ^{\mathrm{T}}+\nu ^{\mathrm{T}}A \right) x-\nu ^{\mathrm{T}}b\,\, \right\} =\begin{cases} -\infty if\,\,c^{\mathrm{T}}-\lambda ^{\mathrm{T}}+\nu ^{\mathrm{T}}A\ne 0\\ -b^{\mathrm{T}}\nu \,\, if\,\,c^{\mathrm{T}}-\lambda ^{\mathrm{T}}+\nu ^{\mathrm{T}}A=0\\ \end{cases} g(λ,ν)=xRninf{(cTλT+νTA)xνTb}={ifcTλT+νTA=0bTνifcTλT+νTA=0
⇒ max ⁡ λ , ν g ( λ , ν ) \Rightarrow \underset{\lambda ,\nu}{\max}g\left( \lambda ,\nu \right) λ,νmaxg(λ,ν) , subject to : λ ⩾ 0 , c T − λ T + ν T A = 0 \lambda \geqslant 0,c^{\mathrm{T}}-\lambda ^{\mathrm{T}}+\nu ^{\mathrm{T}}A=0 λ0,cTλT+νTA=0

Its Dual:
maximize : − b T ν -b^{\mathrm{T}}\nu bTν
subject to : A T ν + c ⩾ 0 A^{\mathrm{T}}\nu +c\geqslant 0 ATν+c0

  • n n n variables q q q equality constraint n n n inequalities ⇒ \Rightarrow q q q variables n n n inequalities constraint

6. Quadratic Program

Unconstrained Quadratic Program : Least Squares

minimize : J ( x ) = 1 2 x T Q x + q T x + q 0 J\left( x \right) =\frac{1}{2}x^{\mathrm{T}}Qx+q^{\mathrm{T}}x+q_0 J(x)=21xTQx+qTx+q0
Problem is convex iff Q ⪰ 0 Q\succeq 0 Q0
When J J J is convex , it can be wrtitten as : J ( x ) = ∥ Q 1 2 x − y ∥ 2 + c J\left( x \right) =\left\| Q^{\frac{1}{2}}x-y \right\| ^2+c J(x)= Q21xy 2+c

KKT condition

Optimal solution

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/271714.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

android jetpack组件一篇搞定

Jetpack 是 Android 官方推出的一套开发库&#xff0c;其中包含众多的组件&#xff0c;可以让 Android 开发者更快更高效地开发应用程序。Jetpack 组件分为四大部分&#xff1a;架构、行为、UI 和基础组件。 下面详细阐述如何合理使用 Jetpack 组件开发 Android 项目。 1. 熟练…

时尚机密防线升级:迅软DSE助力时装企业应对终端泄密挑战

客户简要介绍 某高级时装是国际知名的奢侈品牌控股及管理运营公司。公司依靠丰富的奢侈品市场运作经验、成熟的品牌管理架构&#xff0c;以及对艺术文化的热爱与尊重&#xff0c;发掘低调且优秀的意大利品牌&#xff0c;将其推向市场取得成功。公司在全球范围内践行多品牌发展…

Mesh网格撞击变形

物理碰撞 两个游戏物体发生碰撞的必要条件&#xff1a; 发生碰撞的两个游戏物体有Collider&#xff08;碰撞器&#xff09;组件&#xff1b;其中一个物体有Rigidbody&#xff08;刚体&#xff09;组件。 MonoBehaviour中的相关回调函数&#xff1a; 回调函数详解OnCollisio…

支持多医院使用的云HIS医院信息化管理系统源码 SaaS模式

一、什么是HIS系统 HIS系统&#xff08;Hospital InformationSystem&#xff09;是医院信息化建设的核心组成部分&#xff0c;它是为了管理和运营医院而设计和开发的一套综合性的信息系统。HIS系统通过整合医院各个部门和业务流程的数据和信息&#xff0c;实现了医院内部的信息…

GNN 图神经网络

GCN 邻接矩阵A&#xff1a;adjacency matrix用来表示节点间的连接关系。 度矩阵D&#xff1a;degree matrix用来表示节点的连接数 特征矩阵X&#xff1a;feature matrix用来表示节点的特征

鸿蒙4升级进展:共137款产品加入升级,Mate 20也能升级了

从华为官方发布的鸿蒙升级进展来看&#xff0c;2018年发布的Mate 20系列机型也开始了鸿蒙4系统升级的测试招募。 5年之期已到&#xff0c;再战5年不是梦想&#xff1f; 另外&#xff0c;从明年一季度的升级预告来看&#xff0c;春节前后升级的主要为穿戴手表产品。 目前&…

求求咯,一定要让幼师姐妹们都刷到啊啊啊啊

幼师姐妹还有不知道的吗???再也不用为了写东西而发愁烦恼了&#xff0c;就是这个写什么都可&#xff0c;各种总结&#xff0c;教案&#xff0c;评语&#xff0c;日报等等 都能写!尊嘟有用啊!!

淄博•关爱天使 质子治疗距普通患者又近一步!质子救助持续发热中

儿童肿瘤近年来有增多趋势&#xff0c;其原因可能有很多&#xff0c;与成人肿瘤一样&#xff0c;儿童肿瘤也分为良性和恶性。当孩子长了良性肿瘤时&#xff0c;开始一般不会有明显的症状&#xff0c;只有在肿瘤长到一定大小&#xff0c;开始挤压周围脏器&#xff0c;并影响这些…

SQL server 数据库练习题及答案(练习3)

一、编程题 公司部门表 department 字段名称 数据类型 约束等 字段描述 id int 主键&#xff0c;自增 部门ID name varchar(32) 非空&#xff0c;唯一 部门名称 description varchar(1024) …

暴力破解(Pikachu)

基于表单的暴力破解 先随便输入一下&#xff0c;然后抓包&#xff0c;进行字典爆破 验证码绕过(on server) server服务端要输入正确的验证码后进行爆破 之后的操作没什么不一样 验证码绕过(on client) 这个也需要输入验证码&#xff0c;但是后面进行字典爆破的时候&#xf…

EasyRecovery数据恢复软件好不好用?值不值得购买?

EasyRecovery是一款专业优秀的数据恢复软件&#xff0c;支持硬盘、光盘、U盘、手机、数码相机等设备&#xff0c;可以尽可能恢复被误删的文件数据&#xff08;视频、音频、图片等&#xff09;&#xff0c;欢迎下载。 EasyRecovery-2024mac最新版本下载: https://wm.makeding.c…

Matlab论文插图绘制模板第132期—函数等高线填充图

在之前的文章中&#xff0c;分享了Matlab函数折线图的绘制模板&#xff1a; 函数三维折线图&#xff1a; 函数网格曲面图&#xff1a; 函数曲面图&#xff1a; 函数等高线图&#xff1a; 进一步&#xff0c;再来分享一下函数等高线填充图。 先来看一下成品效果&#xff1a; 特…

CleanMyMac X2024免费许可证及功能详细讲解

一些用户反映自己的CleanMyMac卸载不干净&#xff1f;你的卸载方式正确码&#xff1f;当你在Mac上安装使用CleanMyMac后&#xff0c;需要将软件卸载&#xff0c;你会使用怎样方法完成操作呢&#xff1f;小编今天主要讲解如何卸载CleanMyMac以及卸载这款软件时应该注意的事项。一…

JS 正则表达式(正则匹配RegExp)

JavaScript实现对象深拷贝的方法&#xff08;5种&#xff09; 知识回调&#xff08;不懂就看这儿&#xff01;&#xff09;场景复现核心干货举例引入关于RegExp对象语法修饰符——区分大小写和全局匹配方括号——查找某个范围内的字符元字符——拥有特殊含义的字符量词RegExp对…

Vue项目中使用fontawesome图标库

官方文档https://fontawesome.com.cn/ Font Awesome 1. 使用npm安装核心包&#xff0c;它包含了让图标工作的所有实用工具 npm i --save fortawesome/fontawesome-svg-core2. 安装vue-fontawesome组件库&#xff0c;Vue2.x和Vue3.x稍微有所不同 # Vue2.x npm i --save fort…

2023新能源汽车,吵得越凶,卖得越多

作者 | 辰纹 来源 | 洞见新研社 2023年的汽车行业很残酷&#xff0c;合资大败退&#xff0c;市场份额被自主品牌大幅渗透&#xff0c;三菱退出中国市场&#xff0c;成为真实写照。 新能源车企&#xff0c;威马领头&#xff0c;天际、自游家NIUTRON、恒驰、爱驰、雷丁等造车新…

非对称加密与对称加密的区别是什么?

在数据通信中&#xff0c;加密技术是防止数据被未授权的人访问的关键措施之一。而对称加密和非对称加密是两种最常见的加密技术&#xff0c;它们被广泛应用于数据安全领域&#xff0c;并且可以组合起来以达到更好的加密效果。本文将探讨这两种技术的区别&#xff0c;以及它们在…

【开源】基于Vue+SpringBoot的图书管理系统

目录 一、 系统介绍二、 功能模块2.1 登录注册模块2.1 图书馆模块2.2 图书类型模块2.3 图书模块2.4 图书借阅模块2.5 公告模块 三、 源码解析3.1 图书馆模块设计3.2 图书类型模块设计3.3 图书模块设计3.4 图书借阅模块设计3.5 公告模块设计 四、 免责说明 一、 系统介绍 图书管…

nginx: [error] open() “/var/run/nginx/nginx.pid“ failed (2: No such file or directory)

该错误消息通常表示 Nginx 在启动过程中无法找到指定路径的日志文件或进程号文件。 我这边是因为服务器断电&#xff0c;导致该问题 这个问题可能有几种原因和解决方法&#xff1a; 1. 确保 Nginx 配置文件中的日志路径正确。在 Nginx 配置文件中查找 error_log 和 pid 配置指…

STL:std::array 和 基本数组类型array 浅谈一二三

一、优缺点比较 在C中&#xff0c;std::array是标准库提供的数组容器&#xff0c;相比于基础数据类型的数组&#xff0c;它具有以下优点和缺点&#xff1a; 优点&#xff1a; 安全性&#xff1a;std::array提供了边界检查&#xff0c;可以避免数组越界访问的问题。 可以作为…