0

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?

zy han
  • 3
  • 1
  • 2

1 Answers1

0

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 ]
Erwin Kalvelagen
  • 15,677
  • 2
  • 14
  • 39
  • Thanks a lot for your answer. If use the variable `y` to instead of `Af-b`, the Hessian matrix will be simple during the computition. But I have a question that I can not understand. How should I input the linear equality constraint `y = Af-b` to the Matlab function `quadprog`, as I mentioned before `Af = b`. – zy han Nov 18 '18 at 05:00
  • See the documentation on quadprog. Quadprog supports both equality and inequality constraints. This is very well explained in the documentation. – Erwin Kalvelagen Nov 18 '18 at 08:03
  • Thanks for your patient explaining. In my understanding, `f = min y'Sy + α f'Wf` is changed minimize the `[y ; f]'`, then `Aeq` in the `quadprog` should be `Aeq = Af-b` with `beq = 0`? But `f` is the variable needed to be computed. Or, rewrite the `y=Af-b` to `[I -A] [y ; f]=-b`, then `Aeq=[I -A]`. I don't know how to deal with it? could you please give me a further hint? – zy han Nov 18 '18 at 10:37