Quick questions on mechanical vibrations (desperate for help)

1 回表示 (過去 30 日間)
yung zhen lek
yung zhen lek 2018 年 12 月 2 日
回答済み: Steve Miller 2022 年 12 月 20 日
a)Use the same model as in first case but for c=0.2 and let the driving frequency be constant ωdr=4 with zero initial conditions. Plot the motion of the system and describe the motion.
b) Let the force be accelerating such that (F sin(5t^2 /1000)). Plot the response (for c=0.2) for each mass as function of angular frequency. Explain the result
I have already solved part a) and i am currently stuck at part B)
It requires me to plot the response for each mass as a function of angular frequency, does any one have any idea on how do I go about it?
I need to plot a Response curve however I only have managed to plot a single frequency curve right now.
How do i simulate the system for TIME DEPENDENT frequency?
My code is shown below:
function R = myfunction()
global A B F Z I wdr
c=0.2;
mass=1:3; % masses
% loop for each mass
R = cell(length(mass),1) ; %Result
for i = 1:length(mass)
m = mass(i) ;
k=100;
c=0.2;
F0=10;
t0=0;
t1=100;
M=[m 0 0 ;0 m 0 ; 0 0 m];
K=[2*k -k 0;-k 2*k -k;0 -k k];
C=[2*c -c 0;-c 2*c -c;0 -c c];
for t=t0:t1
wdr=(5*t/1000)%driving frequency
end
f=[0 0 F0*sin(wdr*t)]';% Force vector
A=M\K;
B=M\C;
F=M\f;
Z=zeros(3); % Zero matrix
I=eye(3); % Diagonal matrix
x0=[0 0 0 0 0 0]'; % Initial conditions
[t,x]=ode45('Fun1',[t0 t1],x0);
R{i}=[t,x] ;
plot(t,x(:,1),t,x(:,2));
title(sprintf('mass = %s',num2str(m)))
drawnow
end
Fun1:
%Fun1.m
function dx = dyn1(t,x)
global A B F Z I wdr
dx=zeros(6,1);
dx = [Z I;-A -B]*x+[[0 0 0]'; F]*sin(wdr*t);
end

回答 (1 件)

Steve Miller
Steve Miller 2022 年 12 月 20 日
You could very easily model this system in Simscape and use the results of that simulation to check your equations and plots. This model is only one copy-and-paste away from the system you are trying to model: Double Mass-Spring-Damper in Simulink and Simscape
--Steve

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by