2 variables, second order differencial equation system

9 ビュー (過去 30 日間)
MINJEONG KWON
MINJEONG KWON 2015 年 12 月 8 日
回答済み: Torsten 2015 年 12 月 9 日
function dy1dt = two_mass_spring_1(t,y1)
%UNTITLED3 Summary of this function goes here
% Detailed explanation goes here
M1=2.66; M2=2.74; B1=0.3169; B2=0.7748; K1=317.0814;
F=11.2231; R=14.6343; Wr=18.7629;
dy1dt=[y1(2); (B1*y1(2)+K1*y1(1)+B2*y1(2)-B2*y2(2)/M1)];
dy2dt=[y2(2); (F-B2*y2(2)+B2*y1(2))/M2];
function dy2dt = two_mass_spring_2(t,y2)
%UNTITLED3 Summary of this function goes here
% Detailed explanation goes here
M1=2.66; M2=2.74; B1=0.3169; B2=0.7748; K1=317.0814;
F=11.2231; R=14.6343; Wr=18.7629;
dy2dt=[y2(2); (F-B2*y2(2)+B2*y1(2))/M2];
end
clear all
close all
clc
tspan=[0 300];
y_0 = [-0.07 0];
[time,yout]=ode45('two_mass_spring_1',tspan,y_0);
figure
subplot(2,1,1)
plot(time, yout(:,1),'r'); grid on;
xlabel('Time, s')
ylabel('Displacement, m')
title('Mass on spring system free oscillating motion')
subplot(2,1,2)
plot(time, yout(:,2),'b'); grid on
xlabel('Time, s')
ylabel('Velocity, m/s')
M_1=2.66, M_2=2.74, B_1=0.3169, B_2=0.7748, k_1=317.0814, F=11.2231
M_1 y_1^''+ B_1 y_1^'+ k_1 y_1+B_2(y_1^'-y_2^') = 0 M_2 y_2^''+B_2(y_2^'-y_1^') = F
I solve 1 variables, second order differencial equation system but 2 variables cannot solve.. How can i solve this equation?

回答 (1 件)

Torsten
Torsten 2015 年 12 月 9 日
Implement the following system with four unknown functions:
dy(1)/dt = y(2)
dy(2)/dt = -(B_1*y(2)+k_1*y(1)+B_2*(y(2)-y(4)))/M_1
dy(3)/dt = y(4)
dy(4)/dt = (F-B_2*(y(4)-y(2)))/M_2
Here,
y(1)=y_1, y(2)=y_1', y(3)=y_2, y(4)=y_2'
Best wishes
Torsten.

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by