Docsity

Coupled Spring-Masses: Deriving Equations of Motion and Finding Fixed Points - Prof. Brian, Study notes of Mechanical Engineering

Toggle sidebar
bg1
Problem 9.10: Coupled Spring-Masses
Description
Two masses are attached to a wall by linear springs.
Force balances based on Newton’s second law can be written as
)()(
21122111
2
1
2
1
LwxxkLxk
dt
xd
m
)( 21122
2
2
2
2Lwxxk
dt
xd
m
where ki = the spring constants (N/m), mi = masses (kg), Li = the length of the unstretched
springs (m), and wi = the widths of the masses (m). Initially, the masses are at locations x1,0 and
x2,0.
Objectives
a) Derive these equations of motion using Newton’s 2nd law and free body diagrams.
b) Determine the steady-state or fixed points.
c) Draw the cause/effect diagram for this system.
d) Write a function to numerically solve this system of differential equations.
e) Compute the positions and velocities of the masses as a function of time over the range t=0 to
20 using the following parameters: k1=k2=5, m1=m2= 2, w1=w2= 5, and L1=L2=2. The initial
conditions are x1,0=L1 and x2,0= L1+w1+L2+4 with zero velocity. Construct the following plots:
Figure 1: Displacements x1 and x2 versus time. Indicate the fixed points on this graph.
Figure 2: Velocities v1 and v2 versus time.
Figure 3: Phase-plane plot of x1 versus x2.
pf3
pf4
pf5

Partial preview of the text

Download Coupled Spring-Masses: Deriving Equations of Motion and Finding Fixed Points - Prof. Brian and more Study notes Mechanical Engineering in PDF only on Docsity!

Problem 9.10: Coupled Spring-Masses Description Two masses are attached to a wall by linear springs. Force balances based on Newton’s second law can be written as 21 1 (^11 )^2 (^2112 ) 2 1 k x L k x x w L dt d x m       22 2 (^2112 ) 2 2 k x x w L dt d x m     where ki = the spring constants (N/m), mi = masses (kg), Li = the length of the unstretched springs (m), and wi = the widths of the masses (m). Initially, the masses are at locations x 1,0 and x 2,0. Objectives a) Derive these equations of motion using Newton’s 2nd^ law and free body diagrams. b) Determine the steady-state or fixed points. c) Draw the cause/effect diagram for this system. d) Write a function to numerically solve this system of differential equations. e) Compute the positions and velocities of the masses as a function of time over the range t =0 to 20 using the following parameters: k 1 = k 2 =5, m 1 =m 2 = 2, w 1 =w 2 = 5, and L 1 =L 2 =2. The initial conditions are x 1,0= L 1 and x 2,0= L 1 + w 1 + L 2 +4 with zero velocity. Construct the following plots:  Figure 1: Displacements x 1 and x 2 versus time. Indicate the fixed points on this graph.  Figure 2: Velocities v 1 and v 2 versus time.  Figure 3: Phase-plane plot of x 1 versus x 2.

Analysis a) Equations of Motion k 1 (^) ( x 1  L 1 ) m 1k (^) 2 ( x 2  x 1  w 1  L 2 ) ^ m 2 Apply Newton’s 2nd^ law to each mass in the x-direction to obtain the stated equations of motion. b) Fixed Points The steady or fixed points are where the time derivatives are zero (no motion)). 0  k 1 ( x 1 * L 1 ) k 2 ( x^ * 2  x 1 * w 1  L 2 ) 0  k 2 (^) ( x^ * 2  x 1 * w 1  L 2 ) Arrange as a 2-by-2 matrix

2 1 2 1 1 2 1 2

2

1 2 2 1 2 2 k w L kL k w L x x k k k k k Solve this 2-by-2 system using Cramer’s rule.                  1 1 2 1

2

1 L w L L x x The fixed points correspond to the unstretched positions of the springs. c) Cause/Effect Forcing Functions 1 , 0 2 , 0 1 , 0 2 , 0 , , v v

x x 

System m 1 , m 2 k 1 , k 2 L 1 , L 2 w 1 , w 2

Response t x 1 ( t ), x 2 ( t ) v 1 ( t ), v 2 ( t )

2 1 1 2 2 2 2 1 1 2 1 2 1 1 1 1 4 3 4 3 2 1

y y w L

m

k

y y w L

m

k

y L

m

k

y

y

dt

dy

dt

dy

dt

dy

dt

dy

dt

d y

MATLAB Codes %%% SpringMassesCoupled_Driver % Solution for the motion of a two coupled spring-masses. %% Parameters clc, close all m = [2 , 2]; % kg k = [5 , 5]; % N/m L = [2 , 2]; % m w = [5 , 5]; % m xv0 = [ L(1)+0; L(1)+w(1)+L(2)+4; 0; 0 ]; tmax = 20; % sec %% Compute Solution [t,xv] = SpringMassesCoupled(tmax,xv0,m,k,L,w); x1s = L(1); x2s = L(1)+w(1)+L(2); %% Plots subplot(2,1,1) plot(t,xv(:,1),'b --',t,xv(:,2),'g','linewidth',2) ylabel('x_1, x_2 (m)'), legend('x_1','x_2') line([0 tmax],[x1s,x1s],'color','b','linestyle','--') line([0 tmax],[x2s,x2s],'color','g') title('Displacements of a Coupled Spring/Mass System') subplot(2,1,2) plot(t,xv(:,3),'b --',t,xv(:,4),'g','linewidth',2) xlabel('t (sec)'), ylabel('v_1, v_2 (m)') legend('v_1','v_2'), title('Velocities of a Coupled Spring/Mass System') figure; plot(xv(:,1),xv(:,2),'linewidth',2) xlabel('x_1 (m)'), ylabel('x_2 (m)') title('Phase Plot of a Coupled Spring/Mass System') function [t,xv] = SpringMassesCoupled(tmax,xv0,m,k,L,w) % SpringMassesCoupled: Solution for the motion of a two spring-masses. % Usage: [t,xv] = SpringMassesCoupled(tmax,xv0,m,k,L,w) % Input: % tmax = maximum time (s) % xv0 = [x10 (m), x20, v10 (m/s), v20] = initial conditions % m = [m1,m2] = masses (kg) % k = [k1,k2] = spring constants (N/m) % L = [L1,k2] = spring separations (m) % w = [w1,w2] = lengths of masses(m) % Output: % t = time vector % xv = [x1, x2, v1, v2] = position (m) and velocity (m/s) vectors dxvdt = @(t,xv) [xv(3); xv(4); -k(1)/m(1)(xv(1)-L(1)) + k(2)/m(1)(xv(2)-xv(1)-w(1)-L(2)); -k(2)/m(2)*(xv(2)-xv(1)-w(1)-L(2))]; [t,xv] = ode45(dxvdt,[0,tmax],xv0);