please help me solve this system of ODE

I am trying to optimize the passive suspension design. in order to do so, i need to get my objective function ready. but for that i will need to solve the following system of ODE
Ms*D2Zs = -Ks*(Zs-Zus)- Cs*(DZs-DZus);
AND
Mus*D2Zus = Ks*(Zs-Zus)+Cs*(DZs-DZus))-Kt*(Zus-Zr)-Ct*(DZus-DZr);
note: by "D2" i mean second differential with respect to time and "D" means first differential with respect to time
where Ms,Mus,Ks,Cs,Kt,Ct are all knowns
Zr is a function of time as,
Zr = H*(sin((2*pi*V*t)/L));
where, V,L,H are also known
i need to obtain an objective function,
F = W1*F1 + W2*F2;
where W1,W2 are weighing constants and
F1 is RMS of D2Zs
and F2 is RMS of Zus-Zr
i tried several methods on the internet but none gives me numerical solution so that i can get RMS and then obtain the objective function
Please help me

4 Comments

What is your problem in using ODE45 to solve your differential equations ? How is RMS of D2ZS and RMS of Zus-Zr computed ?
Best wishes
Torsten.
Hi
Steps:
1. Rewrite your system of ODES as a first order system, so that you have dx = f(t,x) as a row vector
2. Write a matlab function of the form in 1
3. call one of the matlab solvers. I usually start with ode45, but your suspension might result in a stiff ode, so you might want to try ode15s if you run into any problems.
The documentation is quite detailed:
4. Compute RMS and evaluate objective function
I am sorry, it may seem very basic question... I am a newbie.. I am not sure how do i convert it to 1st order as i have the variable of second ode in my first ode... Its all getting very confusing.. trust me i have tried several times myself, went and read several online guides on the net.. it would be very kind of u if u elaborate with respect to my particular system of ODEs Thanking you in anticipation
Converting your system into one of first order just means that you only have first derivatives, not second ones.
I'll make a smaller example than the one above, but it should be easy to apply it to the original question.
Let's say you have:
Ms*D2Zs = -Ks*(Zs-Zus)
Mus*D2Zus = Cs*(DZs-DZus)
Then, let's rename the variables: x1 = Zs; x2 = DZs; x3 = Zus; x4 = DZus;
Now you have (which are already only first derivatives!):
Ms*Dx2 = -Ks*(x1-x3);
Mus*Dx4 = Cs*(x2-x4);
The other two equations are trivial (these are necessary because you want to get x1 and x3 as well):
Dx1 = x2
Dx3 = x4
So... all together, you have the following first order system:
Dx1 = x2
Dx2 = -Ks*(x1-x3)/Ms;
Dx3 = x4
Dx4 = Cs*(x2-x4)/Mus;

Sign in to comment.

Answers (0)

Products

Asked:

on 18 Mar 2016

Edited:

Ced
on 24 Mar 2016

Community Treasure Hunt

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

Start Hunting!