フィルターのクリア

how to solve nonlinear coupled dgl second order

55 ビュー (過去 30 日間)
Christian Dieterich
Christian Dieterich 2018 年 3 月 29 日
Hello everyone,
Does anybody know how to solve the following two differential equotations using ODE45?
My Problem is, that i don't know how to rewrite the phi'' and x'' during the transformation in a system of dgl's first order.
Thanks
  1 件のコメント
Christian Dieterich
Christian Dieterich 2018 年 3 月 29 日
g, l and the masses mw and mk are constant. Fan and Fr can leave away.

サインインしてコメントする。

採用された回答

Abraham Boayue
Abraham Boayue 2018 年 3 月 30 日
Here is an example that I have obtained using ode45; the solution seems quite logical since we a dealing with sine waves.
clear variables
close all
N = 500;
L = 5; g = 9.81; mw = 2; mk = 5; Fan = 4; FR = 2;
q1 = -1/L;
q2 = -g/L;
F1 = -(mk*L)/(mw + mk);
F2 = -F1;
S = (Fan - FR)/(mw + mk);
F = @(t,y) [ y(2) ;
(1./(1-q1*F1*(cos(y(1)).^2))).*(0.5*q1*F2*sin(2*y(1)).*y(2).^2+...
q1*S*cos(y(1)) + q2*sin(y(1)))];
t0 = -2*pi;
tf = 2*pi;
tspan = t0:(tf-t0)/(N-1):tf;
ic = [0 0];
[t,y] = ode45(F, tspan, ic);
figure
plot(t,y(:,1),'-o')
hold on
plot(t,y(:,2),'-o')
a = title('\theta vs \theta_{prime}');
legend('\theta','\theta_{prime}');
set(a,'fontsize',14);
a = ylabel('y');
set(a,'Fontsize',14);
a = xlabel('t [-2\pi 2\pi]');
set(a,'Fontsize',14);
xlim([t0 tf])
grid
grid minor;

その他の回答 (2 件)

Abraham Boayue
Abraham Boayue 2018 年 3 月 30 日
Can you provide some values for the constants?
  1 件のコメント
Christian Dieterich
Christian Dieterich 2018 年 3 月 30 日
Hello Abraham Boayue,
First of all, Thanks for your help. Let's say that mw is 1000 kg and mw is 10 kg. L is 1 m and the initial condition of x' und x are 0, the initial condition of phi' is 0 and the initial condition of phi is 0.4 rad.

サインインしてコメントする。


Abraham Boayue
Abraham Boayue 2018 年 3 月 30 日
  1 件のコメント
Christian Dieterich
Christian Dieterich 2018 年 3 月 30 日
Thanks!!!!! This is my last hope!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by