Part 1 (Cont'd) | MPC Model Simulation using Runge Kutta Method

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024
  • NEW: this video shows the MATLAB implementation of the Runge Kutta method for model simulation using Casadi.
    This is a workshop on implementing model predictive control (MPC) and moving horizon estimation (MHE) in Matlab. The implementation is based on the Casadi Package which is used for numerical optimization. A non-holonomic mobile robot is used as a system for the implementation.
    Full Playlist can be found here:
    • MPC and MHE implementa...
    You find this workshop useful? you can cite any of my related work here:
    scholar.google...
    Presenter Website: sites.google.c...
    workshop slides and matlab codes can be found here:
    github.com/MMe...
    Casadi can be downloaded from here:
    web.casadi.org...

Комментарии • 14

  • @FaGa-sc8mi
    @FaGa-sc8mi Год назад

    Can you please tell how did you obtain the exact discrete model from continuous one? I can imagine you expanded around theta + sampling time * theta_dot, which is omega, but the confusion arises from the presence of omega(k) in the denominator, for both x(k+1) and y(k+1)...

    • @MohamedWMehrez
      @MohamedWMehrez  Год назад

      By direct integration of the system model. That's not always possible for the dynamical systems in general.

  • @muhammadhd8407
    @muhammadhd8407 3 года назад

    Hi, shouldn't change the computations of the next initial state in the function shift.m to use RK method too? variable f that we have passed to the function is the same for two methods f = Function('f',{states,controls},{rhs});

    • @dagobertammersee6948
      @dagobertammersee6948 2 года назад

      I don't understand this either?

    • @MohamedWMehrez
      @MohamedWMehrez  2 года назад

      Yeah, you should. I am trying to find sometime to fix this on github.

  • @michaelkonig5186
    @michaelkonig5186 3 года назад

    Hi,
    is it possible to get the whole code?
    Would like to see how you implemented the OCP in Matlab.

    • @MohamedWMehrez
      @MohamedWMehrez  3 года назад

      Hi, Matlab code is linked in the video description. All the best!

    • @michaelkonig5186
      @michaelkonig5186 3 года назад

      @@MohamedWMehrez
      Thank you!
      I am currently also writing a MPC code. However, I still currently have big problems and can not find my error.
      Could you help me with this?
      It is the same procedure but it is a different use case

  • @hanenyaakoubi294
    @hanenyaakoubi294 2 года назад

    👍

  • @ylulnlulsYx1
    @ylulnlulsYx1 4 года назад

    Hi,
    did you also change the shift function with Runge Kutta 4th order? Does it even make any difference?

    • @MohamedWMehrez
      @MohamedWMehrez  4 года назад

      No change is needed to the shift function. We simply changed f which we pass to the shift function and works the same way as f from Euler discretization.

    • @kechidaoussama3511
      @kechidaoussama3511 4 года назад

      how we can add the arrival cost in this program with EK filter ?

    • @MohamedWMehrez
      @MohamedWMehrez  4 года назад

      This can be done by adding (the difference between the estimate of the state at time k-N and the corresponding optimization variable for the state at that time) to the cost variable.

    • @dagobertammersee6948
      @dagobertammersee6948 2 года назад

      Dear Mr. Mehrez, could you please explain why we don't adapt the discretization in the shift function as well? In the shift function we compute the initial state also by a euler discretization, so why don't we use RK4 again?