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

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

ความคิดเห็น • 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 3 ปีที่แล้ว

      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

  • @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 3 ปีที่แล้ว

      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?

  • @hanenyaakoubi294
    @hanenyaakoubi294 2 ปีที่แล้ว

    👍