ARMSLab/slmpc

regarding the slmpc

Closed this issue · 8 comments

Hi,
I have run the code which you have developed, working fine. Its nice code, writen in simple manner.
I have develop the code for 4 states, 1 input, 2 output system. But it's not working.
I have to test it in real time. How to do it?
plz help me regarding to it.
shall i send you my code?

please share it here and the error you have.

Hi,
I checked your code. System you are trying to control is extremely unstable or possibly uncontrollable. For example, small deviation for any initial state (except state 1 ) leads to instability. Could you check if your system dynamics are correct? I would suggest you to try to solve Ocp first and see if it is possible to stabilize the system. If your system dynamics equations are correct, then I would suggest you to:

  1. Change the sampling time. If your system has natural frequency much higher than sampling frequency it would be problematic to control.
  2. Change Horizon length np. Increasing the horizon length often solves the problem.
  3. Try to tune the coefficients for Q,R matrices.

@spdiwan I think @bexultanrakhim answered the questions via email.