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

1 回表示 (過去 30 日間)
Rudra
Rudra 2022 年 11 月 1 日
回答済み: Sai 2022 年 11 月 24 日
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 件のコメント
Jan
Jan 2022 年 11 月 1 日
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.

サインインしてコメントする。

回答 (1 件)

Sai
Sai 2022 年 11 月 24 日
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

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by