how to represent this state space model in matlab using A,B,C,D matrix?

In this x5dot equation there is a term like sgn(x6)*x5/Aa*x6. how to enter this term interms of A B C D matrix in state space.

댓글 수: 3

i written a code as you said using ode solver. this is active suspension so it has two input . road r voltage u
the profile of road is given in cktt.m file . but when i run this i am getting error. i took u as 1 for simplicity.
how to interface this road profile to ode solver.
Don't know what your error message was (you should always include that), but I copied your code over and it worked for me after one change.
The ode45 expects a function handle, which you can find by putting an @ character in front of the function name as follows:
[t,x]=ode45(@cktt,tspan,x0);
... Now, when I look at the results, it seems like the only state that gives me a non-NaN output is state 6. However, the code runs and you can look into the equations now to see if they're okay :)
- Sebastian
thank you for your reply. now i written simulink code for entire active suspension. i attached file here. when i ru n the simulation , i am geeting singularity error at integrator.i tried many things. it wont work. something wrong in that integrator which i dont know. please help me.
Actually i written simulink code for above equation only.i changed diffrent solver, and tolerance value. but not acting any answer.getting singularity error at integrator in actuator.
i attached file with PID when i run without connecting PID. it is working correctly. when i connect ,it wont work. i took some random value for PID intially.
ALso i put some saturation value for integrator inside actuator.then only it will work. without saturation value it gives singularity error.
something wrong in integrator which i dont know.please help me in that point.i attached road input also . the values of constant are there in simulink file.

댓글을 달려면 로그인하십시오.

 채택된 답변

Sebastian Castro
Sebastian Castro 2015년 8월 13일

0 개 추천

As soon as you introduce nonlinearities like that square root and the "sgn" function, you cannot express a system using state-space.
The two ways to create nonlinear models both involve implementing each of the above first-order equations in the form xdot_k = f(x_1,x_2,...,x_k,...x_n-1,x_n). These are:
- Sebastian

추가 답변 (0개)

카테고리

태그

질문:

2015년 8월 13일

댓글:

2015년 8월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by