How can i discretize the following nonlinear system. Im using Matlab and Casadi for Model Predictive Control. The Constant C is betwenn 0 and 1.
dx/dt = C * x/(x^2 + 1)
Thank you for your time and Help.
How can i discretize the following nonlinear system. Im using Matlab and Casadi for Model Predictive Control. The Constant C is betwenn 0 and 1.
dx/dt = C * x/(x^2 + 1)
Thank you for your time and Help.
Well if you want to use the file to discretize a differential equation, there are a lot of methods such as simple Euler, Runge-Kutta, and so on. Let me say how to use the Euler method. based on the differential definition:
here i is the discretization index and dt is sample time (typically 0.01). If I have to use your equation:
after simplification:
this is your discretized model. In matlab, just use the following code: