Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
How can I use an ODE solver to solve for the velocities of this system of equations?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/222358/image.png)
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 Commenti
Bjorn Gustavsson
il 2 Giu 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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/222394/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/222395/image.png)
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/222396/image.png)
HTH
Risposte (0)
Questa domanda è chiusa.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!