1

I need to implement the 4th order Runge-Kutta method to propagate an affine non linear system. My doubt is in regards on how the input should be treated when calculating the k parameters. To be more specific, consider the affine non linear system $$\dot{y}(t)=f(t,y)+u(t)$$ where t is time, y is the output, u is the input and the derivative is with respect to time. The Runge Kutta parameter $k_{2}$ is given by $$k_{2}=f(t_{n}+\frac{h}{2}, y_{n}+h\frac{k_{1}}{2})$$ where h is the step length. Should the input be passed to the function as is, ie, simply as u thus resulting in the following equation for $k_{2}$? $$k_{2}=f(t_{n}+\frac{h}{2}, y_{n}+h\frac{k_{1}}{2})+u_{n}$$ I tried to search for related literature but couldn't find. If anyone can give me some links to related literature would be great.

Thanks in advanced.

  • 1
    Don't get me wrong, but is the right hand side just $F(t,y) := f(t,y) + u(t)$, hence, e. g. $$k_2 = F(t_n + h/2, y_n + hk_1/2) = f(t_n + h/2, y_n + hk_1/2) + u(t_n + h/2) $$ – martini Jan 12 '22 at 11:46
  • Doesn't this mean that I would need to known the input in the future? My system will be controlled and I will run the RK4 in real time so I will only have available inputs at time n or previous. – Darren DeBattista Jan 12 '22 at 12:00
  • What form does the control take? Is it a zero-order hold? Is it the result of a PID controller? The implementation of $u$ should match the actual control closely in its smoothness if the simulation is to give realistic results. If that differs too much, the order of the method gets reduced to effectively one, with corresponding consequences on the global error. – Lutz Lehmann Jan 13 '22 at 18:12
  • Thanks for the reply. The control input is a zero order hold and coming from an optimal controller (thus having a PD structure). The RK4 will be used for the model propagation in an Extended Kalman filter. – Darren DeBattista Jan 13 '22 at 23:33

0 Answers0