Hello,

I was trying to solve an periodic OCP for 25 seconds for an AWE system but after the first iteration I get an NaN error. What is this due to?

Thank you

Hi Mohammed,

NaNs in the first iterations typically indicate a bad initial guess leading to a division by zero/log of a negative number/etc.

Please make sure to provide a reasonable initialization both for the state and the controls in particular when working on highly nonlinear problems such as AWE systems.

In general, I’m not sure if acados is the right tool for solving periodic OCPs. Maybe consider solving the problem with CasADi and IPOPT first.

Best, Katrin

Hello Kaethe,

Thank you for your suggestion. In fact, I tried the same formulation using openOCL and IPOPT’s ‘mumpy solver and it worked just fine. If you don’t mind, I’d like to ask whether openOCL has the option to return the algebraic variables’ trajectory since this is not mentioned in its API.

Thank you

I haven’t used openOCL, so not sure about algebraic variables there. But did you manage to initialize the acados solver with this solution and solve the problem with acados as well?

Yes, I formulated the exact same problem with acados with the same trajectory initialization and I got qp-solver failure. Maybe its because it was a periodic OCP with a period of 44 seconds. However, generally acados has been very problematic in its use to generate power producing trajectories for rigid wing AWE systems similar to what was presented in this paper: "Performance assessment of a rigid wing Airborne Wind Energy pumping system*.

Which QP solver are you using?

I am using partial-condensing-hpipm. For more clarity, I initialized the openOCL code using a geometric reference trajectory and I tried acados with the same geometric reference trajectory. However, I did not get the output trajectory from openOCL and initialize it in acados.