Clear Filters
Clear Filters

how can i write this equation in state space form ?

3 views (last 30 days)
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;

Answers (1)

Ameer Hamza
Ameer Hamza on 1 May 2020
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.

Categories

Find more on Simulink in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!