how can i write this equation in state space form ?

2 次查看(过去 30 天)
hello . i wanna write this equation in state space form at simulink .
please help me!
i write in a Matlab function in simulink:
function [dxdt1,dxdt2,dxdt3,dxdt4] = dynfcn(x1,x2,x3,x4,u)
%% parameters
Phils=-0.1104;M=1.1637;K=2.9327;alpha=0.183;
Gamma=0.4537;D=0.6;ws=9.896;F=0.42;G=0.028;
clo=0.28;Lambda=0.0676;
%% 4 states (x):
x1=y;
x2=ydot;
x3=q;
x4=qdot;
%% output
dxdt1=x2;
dxdt2=(1/M)*(-((2*alpha)/(D*ws))*Gamma*x2-K*x1+Gamma*x3+Phils*u);
dxdt3=x4;
dxdt4=ws*G*clo^2*x4-ws^2*q-Lambda*x3^2*x4+((ws*F)/(D))*x2;

回答(1 个)

Ameer Hamza
Ameer Hamza 2020-5-1
See my answer here: https://www.mathworks.com/matlabcentral/answers/521701-state-space-for-inerter-based-suspension-system#answer_429247 which deals with a similar problem using odeToVectorField. If you still have any confusion after trying it that you can mention it in the comment.

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by