Borrar filtros
Borrar filtros

I cant plot a graph of ode45 function for state space modeling, I don't know how to define.

3 visualizaciones (últimos 30 días)
syms x1 x2 x3
m=1000; %Mass in Kg
L=3.5; %length in meters
g=9.81; %gravty term in m/s^2
c=1; %damping ratio
I=0.5; %inductance
u=0; %free response
kt=1; % torque constant
kb=1; %back emf constant
R=1;
A=[-R/I -kb/I 0; kt/m*L^2 -c/m*L^2 -g*0.5/L; 0 1 0];
B=[1/I;0;0];
C=[0 0 m*g*L/2];
D=0;
% x3dot=x2;
% x2dot=(1/m*L^2)*(kt*x1-c*x2-m*g*L*sin(x3));
% x1dot=1/I*(u-R*x1-kb*x2);
% y=m*g*L*sin(x3);
plot(t,y)
  1 comentario
Jan
Jan el 1 de Nov. de 2022
Please read the documentation of ODE45, where you find some examples:
doc ode45
For a numerical integration you do not need symbolic variables, but a function to calculate the derivative and an initial value.

Iniciar sesión para comentar.

Respuestas (1)

Sai
Sai el 24 de Nov. de 2022
Hi Jasmin,
Please refer to the follwing link on how to solve state space equation by ODE45
For more information on ode45, please refer to the following documentation link

Categorías

Más información sobre Programming en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by