I cant plot a graph of ode45 function for state space modeling, I don't know how to define.
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Jan
le 1 Nov 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.
Réponses (1)
Sai
le 24 Nov 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
0 commentaires
Voir également
Catégories
En savoir plus sur Ordinary Differential Equations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!