Converting a nonlinear state equation into state dependent matrix form

9 visualizaciones (últimos 30 días)
I have a set of nonlinear state equation with origin convergence. i want the representation in form [Xdot]= [A(x)] * [x]. I tried jacobian but it's not the accurate representation. Would appreciate any suggestion.

Respuestas (1)

Sam Chak
Sam Chak el 10 de Feb. de 2025
Based on your descriptions, it is entirely acceptable to use the nonlinear state equations for simulation purposes. If your manually-defined Jacobian representation yields inaccurate responses, it is possible that the linearization components have been calculated incorrectly.
%% nonlinear state equations
function dx = ode(t, x)
dx(1) = x(2);
dx(2) = - x(2) - sin(x(1));
dx = [dx(1);
dx(2)];
end
%% simulation
[t, x] = ode45(@ode, [0 10], [1 0]);
plot(t, x), grid on

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by