You are on page 1of 4

1. Consider a four-bar linkage shown.

a) Write a computer program to calculate angles θ3 and θ4, the angular velocities ω3, ω4, the
acceleration α3, α4 when the lengths of the links and angles θ 2 are given. The program
should work for both open and crossed linkages. Use your program to find angles θ 3 and
θ4, the angular velocities ω3, ω4, the acceleration α3, α4 for the data in Table 1. The
angular velocity of the crank is 10 rad/second for all rows of tables. You can use any
computer language you want. In the solution provide the equations you used, the source
code of your program and a printout of the output. You can use the algebraic method or
use complex numbers to get the equations.

Link 1 Link 2 Link 3 Link 4 θ2 (degree)


6 2 7 9 40
6 6 7 9 60
19 12 12 12 30
12 7 11 6 110
9 7 11 6 100
Table 1: Data for problem
Solution part a):
The total length of the horizontal length component of link 2, link 3 and link 4 (from the given
figure) equals the length of link 1. The following mathematical expression is obtained after
resolving the component:
l 1=l 2 cos θ2 +l 3 cos θ3−l 4 cos θ 4 (1)
As we know:
cos ( 180 −θ )=−cosθ
°
(2)
Similarly, resolving the lengths vertically, we obtained the following mathematical expression:
l 2 sin θ 2+l 3 sin θ3=l 4 sin θ 4

1
This stands right for open and crossed linkages if the value of different angles is provided as
demonstrated in the given figure. As shown in the figure, θ 4 is present between 0 and 180° for
open linkage and for crossed linkage, it lies between 180° and 360°. θ 3 and θ4 are unknown in
mathematical expression (1) and (2) and their values can be obtained because there are two
unknowns and mathematical expressions.
Satisfied Grashof’s Condition:
Sr. No. Condition Status
1 11+6 > 9+7 Doesn’t satisfy Grashof's condition
2 12+6 = 11+7 Satisfies Grashof's condition
3 19+12 > 12+12 Doesn’t satisfy Grashof's condition
4 9 + 6 > 7+6 Doesn’t satisfy Grashof's condition
5 19+5 < 9+17 Satisfies Grahof's condition

12 cos 2° +13 cos 3° −14 cos 4° =4

cos ( 180 −θ )=−cosθ


°

Matlab work

clear all;
close all

l1=17
l2=5
l3=9
l4=19
r1=l1;r2=l2;r3=l3;r4=19;
t = 0:5/180:10;
ang_speed = pi/5;
theta2 = ang_speed*1.5*t;
theta1 = deg2rad(0);
len = length(theta2)-1;

for i=1:length(theta2)
theta2_prime(i) = theta2(i) - theta1;
delta(i) = sqrt(r1^2 + r2^2 -2*r1*r2*cos(theta2_prime(i)));
beta(i) = acos( (r1^2 + delta(i)^2 - r2^2) / (2*r1*delta(i)));
psi(i) = acos( (r3^2 + delta(i)^2 - r4^2) / (2*r3*delta(i)));
lambda(i) = acos( (r4^2 + delta(i)^2 - r3^2) / (2*r4*delta(i)));
if(theta2_prime<=pi)
theta3(i) = psi(i)-(beta(i)-theta1);

2
theta4(i) = pi-lambda(i)-(beta(i)-theta1);
gamma(i)= acos( (r3^2+r4^2-delta(i)^2) / (2*r3*r4)) - pi/2;
else
theta3(i) = psi(i)+(beta(i)+theta1);
theta4(i) = pi-lambda(i)+(beta(i)+theta1);
gamma(i)= acos( (r3^2+r4^2-delta(i)^2) / (2*r3*r4)) - pi/2;
end
omega4(i) = ang_speed * (r2*(sin(theta3(i)-theta2(i)))) / (r4*(sin(theta3(i)-theta4(i))));
MA(i) = ( r4*sin(theta4(i)-theta3(i)) )/( r2*sin(theta2(i)-theta3(i)) ); %mechanical advantage
Ax(i) = r2*cos(theta2(i));
Ay(i) = r2*sin(theta2(i));
Bx(i) = r2*cos(theta2(i))+r3*cos(theta3(i));
By(i) = r2*sin(theta2(i))+r3*sin(theta3(i));
Box(i) = r1*cos(theta1);
Boy(i) = r1*sin(theta1);
%plot([0 Ax(i)], [0 Ay(i)],'ro-','LineWidth',5);hold on; %r2
%plot([Ax(i) Bx(i)], [Ay(i) By(i)], 'go-','LineWidth',5); hold on; %r3
%plot([Bx(i) Box(i)], [By(i) Boy(i)], 'bo-','LineWidth',5); hold on; %r4
%plot([Box(i) 0], [Boy(i) 0], 'co-','LineWidth',5);hold off; %r1
%grid on
%axis([-7 20 -15 15]);
%pause(0.001);
end
subplot(2,1,1)
plot(rad2deg(theta2),rad2deg(theta3));
title(' Coupler angle ')
xlabel('\theta2')
ylabel('\theta3')
grid on
subplot(2,1,2)
plot(rad2deg(theta2),rad2deg(theta4));
title(' Rocker angle ')
xlabel('\theta2')
ylabel('\theta4')
grid on
theta3_rad=rad2deg(theta3)
theta4_rad=rad2deg(theta4)
theta2_rad=rad2deg(theta2)

l1 =

17

l2 =

l3 =

3
9

l4 =

19

Published with MATLAB® R2020a

You might also like