problem using ODE functions during simulation a nonlinear motion! please help!

1 view (last 30 days)
Hi Everybody,
I am trying to simulate the equation of motion for a rotor-bearing system in time-domain. the quations to solve are the rotor motions equations in x and y direction plus nonlinear unsteady reynold equation for the bearing (in order to obtain the reaction forces in bearing). following state variables are beeing concerned: y1 = x y2 = x_Dot y3 = y y4 = y_Dot y5 = P (pressure in bearing)
deriatives of first 4 variables can be easly formulated but the deriative of pressure need to be calculated as following:
P(n)-P(n-1) / time_step
Now my question: How can I calculate this deriative during solving these 5 variables using ODE functions? How can I save the used time step az previous step by ODE in order to calculate the deriative of pressure because I guess that ODE functions use adaptive time stepping.
many tnx in adavnce
  1 Comment
Sriram Narayanan
Sriram Narayanan on 5 Jun 2015
Hi Hossein, Can you please explain if you are simulating this in MATLAB using the ODE function or is it using Simulink? The variable step ODE solvers like the ODE45, ODE15 and ODE23 series allows for adaptive stepping where you can specify pressure derivative as dP in your ODE function similar to the following example.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!