Formulate a steady state target optimization

Greetings

I am new to acados, and currently working on implementing a steady-state economic optimization problem (for use in an MPC loop) in acados.
The goal is to find the steady-state variables x_s, u_s that maximize an economic profit function g^\top y, subject to steady-state and constraints.

\begin{align} (x_s,\,u_s,\,y_s) &:= \arg\max_{x,\,u,\,y}\; g^\top y \\[2mm] \text{s.t.}\quad x &= A x + B u, \\ y &= C x + C_d\,\hat d(k), \\ u_{\text{min}} \le u_i & \le u_{\text{max}}, \\ y_{\text{min}} \le y_i & \le y_{\text{max}}. \end{align}

Specifically, how to formulate the terminal constrains of the dynamics (steady state) and impose constraints both on u and y ?

Any tips, example scripts, or guidance on the most efficient formulation would be very helpful! :folded_hands:
Thanks a lot in advance!

Hi :waving_hand:

this is a general optimization problem, i.e. it does not have OCP structure. You can formulate it using acados by setting the horizon N_horizon to zero. In this case, you have only a terminal stage. Therefore, x, y and u in your example should in this case be modeled as AcadosModel.x. The bounds can be implemented via idxbx_e and lbx_e, ubx_e. The linear constraints via C_e, lg_e, ug_e.

Such a problem is formulated for example here:

As you cost is not positive definite, I recommend to use a Levenberg Marquardt term or some other regularization provided by acados.

Hope this is helpful,
Katrin

1 Like

Hi Katrin, thanks a lot for the detailed answer — that makes things much clearer!

Could you please elaborate a bit on your recommendation to “use a Levenberg–Marquardt term or some other regularization provided by acados”?

Your cost function is linear, i.e. its Hessian is zero. Most QP solvers used in acados expect a strictly convex QP. You should thus add some regularization for example by setting AcadosOcpOptions.levenberg_marquardt to some small positive value.

1 Like