Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

# How can I use an ODE solver to solve for the velocities of this system of equations?

조회 수: 1 (최근 30일)
onamaewa 2019년 6월 2일
마감: MATLAB Answer Bot 2021년 8월 20일
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이전 댓글 1개 표시이전 댓글 1개 숨기기
onamaewa 2019년 6월 2일
I did. I’m new to implementing ode solvers. I don’t know what initial conditions or time have to do with this problem.
Bjorn Gustavsson 2019년 6월 2일
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

### Community Treasure Hunt

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

Start Hunting!

Translated by