A Quadratic Programming problem (QP) in the form of
xminimizesubject to21xTHx+pTxAeqx=beqAx≥b
where H∈ℜn×n,A∈ℜm×n,p,x∈ℜn,b∈ℜm, can be transformed to a Second-Order Cone Programming (SOCP) problem in the form of
xminimizesubject tofTx∥Aix+bi∥2≤ciTx+di,i=1,…,m
Consider y=∥Fx–c∥, and
y2=∥Fx–c∥2=(Fx–c)T(Fx–c)=xTFTFx–2cTFx+cTc
As cTc is non-negative, minimizing xTFTFx–2cTFx is equivalent to minimizing y2, and hence is equivalent to minimizing y.
If we have H=2FTF and p=−2FTc, then the objective function in QP 21xTHx+pTx can be written as xTFTFx–2cTFx. We can thus minimize y.
Thus, the QP problem can now be written as
yminimizesubject toy∥Fx–c∥≤yAeqx=beqAx≥b
As H, by definition of QP, is symmetric, a symmetric F can be found such that 2H=FTF=F2. If the QP is assumed to be a convex QP, H is positive semidefinite, applying Cholesky factorization gives 2H=UTU (or LLT). In this case, F=U (or LT).
Next, as ∥⋅∥2 is always non-negative, the equality constraint Aeqx=beq can be written as
∥Aeqx–beq∥≤0
Finally, each row in the inequality constraint Ax≥b can be written as
aix–bi≥0,i=1,…,m
where ai is the i-th row of A, and bi is the i-th element of b.
Therefore, a QP problem can be transformed to an equivalent SOCP problem in the following way. We need to introduce a few variables first.
- y=xn+1
- c=−21F−Tp
xminimizesubject towherefxA1A2Ai+2fTx∥A1x+b1∥2≤c1Tx+d1∥A2x+b2∥2≤c2Tx+d2∥A3x+b3∥2≤c3Tx+d3⋮∥Am+2x+bm+2∥2≤cm+2Tx+dm+2=(0,…,0,1)T=(x1,…,xn,xn+1)T=[F,0],b1=21F−Tp,c1=(0,…,0,1)T,d1=0,(2H)=FTF=[Aeq,0],b2=−beq,c2=0,d2=0=0,bi+2=0,ci+2=the i-th row of A,di+2=−(the i-th element of b),i=1,…,mf,x,c1,…,cm+2∈ℜn+1
The sub-vector with the first n elements in the solution of the transformed SOCP problem is the solution of the original QP problem.
SuanShu has implementations to solve both SOCP and QP problems.