optimizationquadratic-programmingquadprog

How to reform the quadratic program objective function to fit matlab quadprog?


I have a quadratic problem question with the objective function

f=arg min(A*f-b)^T*S*(A*f-b)+alpha*f^T*W*f
s.t.  d_low < C*f < d_up

where f is the optimization variable, S and W are positive-define weight matrices. A*f-b is a matrix function

A*f=b

my question is how to reform the quadratic objective function to fit the matlab solver quadprog, with the general form

min 0.5*x^T*H*x+f^T*x

could you please give me a tip or example, thanks.

/==========================================/

I asked a classmate, he told me the item (A*f-b)^T*S*(A*f-b) could be expanded as

(A*f-b)^T*S*(A*f-b)=(f^T*A^T-b^T)(S*A*f-S*b)=f^T*A^T*S*A*f-f^T*A^T*S*b-b^T*S*A*f+b^T*S*b=f^T*A^T*S*A*f-2*b^T*S*A*f+b^T*S*b

is it right?


Solution

  • Here is one way to deal with this.

    Let me rewrite your problem slightly

    f = min (Af-b)'S(Af-b) + α f'Wf
    s.t.  d_low <= Cf <= d_up
    

    This can be rewritten further as:

    f = min y'Sy + α f'Wf
    s.t.  d_low <= Cf <= d_up
          y = Af-b
    

    I added a variable y and a linear equality constraint.

    So

    H = [ 2S    0  ]
        [ 0    2αW ]