Page 110 - Singiresu S. Rao-Mechanical Vibrations in SI Units, Global Edition-Pearson (2017)
P. 110
1.12 examples usinG matlab 107
for i = 1: 101
x2(i) = A/2 - A * sin(w*t(i)) / pi;
end
subplot(233);
plot(t,x2);
xlabel('t');
title('Two terms');
for i = 1: 101
x3(i) = A/2 - A * sin(w*t(i)) / pi - A * sin(2*w*t(i)) / (2*pi);
end
subplot(234);
plot(t,x3);
ylabel('x(t)');
xlabel('t');
title('Three terms');
for i = 1: 101
t(i) = tau * (i-1)/100;
x4(i) = A/2 - A * sin(w*t(i)) / pi - A * sin(2*w*t(i)) / (2*pi)
- A * sin(3*w*t(i)) / (3*pi);
end
subplot(235);
plot(t,x4);
xlabel('t');
title('Four terms');
■
Graphical representation of beats
example 1.22
A mass is subjected to two harmonic motions given by x 1 1t2 = X cos vt and x 2 1t2 = X cos 1v + d2 t
with X = 1 cm, v = 20 rad/s, and d = 1 rad/s. Plot the resulting motion of the mass using
MATLAB and identify the beat frequency.
Solution: The resultant motion of the mass, x(t), is given by
x1t2 = x 1 1t2 + x 2 1t2
= X cos vt + X cos1v + d2t
dt d
= 2X cos cos¢v + ≤t (E.1)
2 2
The motion can be seen to exhibit the phenomenon of beats with a beat frequency
v b = 1v + d2 - 1v2 = d = 1 rad/s. Equation (E.1) is plotted using MATLAB as shown below.
% ex1_22.m
% Plot the Phenomenon of beats
A = 1;
w = 20;
delta = 1;
for i = 1: 1001
t(i) = 15 * (i-1)/1000;
x(i) = 2 * A * cos (delta*t(i)/2) * cos ((w + delta/2) *t(i));
end
plot (t,x);
xlabel ('t');
ylabel ('x(t)');
title ('Phenomenon of beats');