Opened 3 years ago

Closed 4 months ago

#72 closed user support (migrated)

CPU overload for qpOASES_e in Simulink Real Time / Matlab

Reported by: Andrea Owned by: ferreau
Priority: normal Milestone:
Component: plain C translation (qpOASES_e) Version: 3.2.1
Keywords: Cc:



I'm trying to run a Simulink Model in real time on a target machine (Linux Computer with 1 CPU) for code generation purposes, I use the C implementation of qpOASES within a matlab function block (meaning the function is called in each simulation step).

The discrete model runs in Simulink multitasking mode, with sample times of 5 and 20 ms. The problem is, the solver throws a CPU overload error at 0.685 seconds unless I restrict CPU time and number of iterations. It works if I set CPU time to 4ms and gradually allow more iterations in each timestep OR if I restrict the number of iterations to 20. Gradually increasing only the iterations without limiting CPU time does not work, nor does setting only the CPU time.

My guess is that some part of the initialisation process takes too long, but I would be grateful about any hints on what could be the issue.

Once I get the model to run properly (e.g. using 5 and 30 ms sample times), it runs pretty fast (TET around 0.04 ms). Using qpOASES in normal mode in an offline Simulink simulation model works, too - the QP problem is solved in max 3 ms even in the first cycle, so I highly doubt that there is a problem with the QP itself.


Change History (1)

comment:1 Changed 4 months ago by stefan

  • Resolution set to migrated
  • Status changed from new to closed

This ticket has been migrated to GitHub and will be resolved there:

Note: See TracTickets for help on using tickets.