How can I use an ODE solver to solve for the velocities of this system of equations?
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
I generated this system diagram and have written the system of differential equations below it.
How can I implement an ODE solver to solve for the velocities and plot them vs Frequency?

Freq = 1:1000; omega = (2 * pi) * Freq;
time = 1; P0 = 1 * sin(omega * time);
% For this case, since calculations are extensive. Random values are assigned.
Km = 100; Ks1 = 200; Ks2 = 300;
ms = 1; mm = 2;
Rm = 1000; Rs1 = 2000; Rs2 = 3000;
xdds = (1/ms) * (P0 - Rs1 * xds - Ks1 * xs - Rs2 * (xds - xdm) - Ks2 * (xs - xm));
xddm = (1/mm) * (-Rm * xdm - Km * xm + Rs2 * (xds - xdm) + Ks2 * (xs - xm));
3 Kommentare
darova
am 2 Jun. 2019
Did you try?
doc ode45
onamaewa
am 2 Jun. 2019
Bjorn Gustavsson
am 2 Jun. 2019
For a numerical solution you need to integrate you ODE it with some kind of initial conditions, that is to determine the time-development of
and
, for some particular run.
The way you pose your question it seems to want your solution as some kind of amplitude of
. For that case you wont have all that much help from matlab unless you can solve the equations using the symbolic toolbox. But I suggest you do it by hand, have a look at harmonic expansion, once you understand that concept this is a straightforward task. You will get yourself 2 linear equations (with complex coefficients) to solve. Very simple, somewhat tricky to get the signs and all i^n correct. outside of that - trivial.
HTH
Antworten (0)
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!