Initializing Controllers

Hello,

After much exploration, it seems like may have finally located the source for my status errors. Let me begin by stating what I am trying to do. I am trying to create a sequence of controllers, for a sequence of tasks. But since I want to transition from one task to the next without delay, I am initializing all controllers with my initial state, at the beginning of the task sequence. This has the consequence, that when initialized the controllers besides the first one, can be initialized with an infeasible state.

The tasks are of course designed to be smoothly transitionable, and when a task terminates, I start the next task with the actual state, with:

acados_solver.set(0, “lbx”, x0)
acados_solver.set(0, “ubx”, x0)

But it seems like if the controller is once initialized in an infeasible state, even though the current initial state is correct, does not compute. Is this a true assumption?

Cheers,

Can

Hi Can,

Just to better understand your problem.
What does it change between different controllers? The model is the same?
How did you check the initial state is actually feasible?

Did you create different acados_solver objects?

Hi,

The model stays the same between controllers, the cost type stays the same and other controller definition parameters stays the same. But everything else, including constraint models, state and control bounds are subjected to change.

The initial state is always feasible, as the sequence of controllers I create cascade their initial constraints to the previous controllers as costs. So any constraint of a controller c_n is transferred to the controller c_(n-1) as a cost expression and the controller c_(n-1) is iterated until the cost converges to a predetermined threshold, which ensures the constraint of c_n stays intact.

Each controllers is initialized as different acados solver objects.

Even though I originally intended to have the controllers to activate immediately after the convergence and termination of the previous controller, I tested the same structure under different conditions. This time, instead of initializing all of the controllers at the beginning, I initialized the controllers after the termination of the previous controllers. This way, there is a compilation pause between the controller transitions, but the initialized state of the controller is guaranteed to be feasible. With this second version, all the controllers work.

So i highly suspect that once a controller is initialized in an infeasible or ill conditioned state, even if you then change the initial state to a feasible one with the “set” method, it will not work properly with the SQP_RTI