Coding questions with regards to Mechanical Vibrations (desperate for help)
4 views (last 30 days)
Show older comments

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?
i assume that the driving frequency (wdr= 5t^2/1000) is that correct?
My code is shown below:
% Simulation of forced 2DOF system with ode45
clear all
clc
global A B F Z I wdr
c=0.2;
m=1;
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];
f=[0 0 F0]';
for t=t0:t1
w=5*t/1000;
end
wdr=w; % Driving frequency
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);
dx=[t,x]
plot(t,x(:,1),t,x(:,2),t,x(:,3));
Function 1 file:
function dx=Fun1(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
please help me solve the problem =(
0 Comments
Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!