Homework 2 Solution - Purdue College of Engineering

ME 352 - Machine Design I
Name of Student______________________________
Fall Semester 2016
Lab Section Number___________________________
Homework No. 2. Parts (i)-(iv) are due at the beginning of lecture, Wednesday, September 7th. (20
points). Part (v) is due at the beginning of lab, Monday, September 12th, or Tuesday, September 13th, or
Wednesday, September 14th. (20 points).
Recall that the important notes for the homework assignments are printed at the top of
Homework 1.
Section 2.12, see pages 77-79, presents five different approaches for the position analysis of planar
single degree of freedom linkages. The approaches are illustrated by Example 2.5 which is a slidingblock linkage and Example 2.6 which is a planar four-bar linkage. This homework focuses on these
techniques for the position analysis of a planar four-bar linkage with the following link dimensions:
Ground Link 1:
Input Link 2:
200 mm
90 mm
Coupler Link 3:
150 mm
Output Link 4:
170 mm
The fixed X and Y-axes are specified as horizontal and vertical, respectively, and the origin is
coincident with the ground pivot of the input link 2. The orientation of the ground link relative to the Xaxis is 1  15 counterclockwise; i.e., oriented above the X-axis.
(i)
For the input angle 2  30 counterclockwise from the X-axis, choose a suitable scale and
accurately draw the four-bar linkage in its two possible configurations. Measure the values of the
joint variables 3 and 4 for each configuration.
Use the law of sines and the law of cosines to determine the joint variables 3 and 4 for the open
configuration.
(iii) Use the closed-form solution to solve for the joint variables 3 and 4 . (Recall that the closedform solution for a planar four-bar linkage is commonly referred to as Freudenstein's equation, see
Uicker, et al., Section 10.11, Equations (10.23)-(10.26), pages 451 and 452. Note, however, that
(ii)
these equations are for 1  0o ). Compare your answers for the two joint variables 3 and 4 with
the answers from Part (i).
(iv) Set up and carry out the Newton-Raphson iteration procedure (see Uicker, et al., Section 2.8, page
65) to solve for the joint variables 3 and 4 (for the open configuration) when the input angle
2  30. Use the initial estimates for 3 and 4 given by Part (i) above. Continue to iterate until
(v)
3 and 4 converge to within 0.01. Please show all the steps for each iteration.
Write a computer program using Matlab which uses the Newton-Raphson iteration procedure to
solve for 3 and 4 (for the open configuration) given initial estimates for these joint variables
(and the input angle 2 and the link lengths). To check your program, use the initial estimates
given by Part (i) above and print out the joint variables 3 and 4 when the input angle 2  30.
Solution to Homework Set 2.
(iu) Graphical (5 Points). The link dimensions and joint angles specified in the problem statement are:
Ground Link:
Input Link:
Coupler Link:
Output Link:
R1 = 200 mm
R2 = 90 mm
R3 = 150 mm
R4 = 170 mm
θ1 = 15˚
θ2 = 30˚
θ3 = ?˚
θ4 = ?˚
For the specified input angle 2  30 (measured from the X-axis), the two possible configurations of
the four-bar linkage are as shown in Figure 1. The loop O2 A B1 O4 is the open configuration and the
loop O2 A B2 O4 is the closed (or crossed-over) configuration of the four-bar linkage.
Radius 170 mm
Radius 150 mm
Figure 1. The graphical solution for the four-bar linkage.
Scale: 1 mm = 4 mm.
Measuring the scaled drawing, the coupler angle and the output angle are:
For the Open Configuration:
For the Closed Configuration:
3  81o
3   75o
and
and
4  123o
4   117o
(ii) Trigonometry (5 Points). The notation for the open and closed (or crossed-over) configurations of
the four-bar linkage are shown in Figure 2. The law of cosines, for the triangle O2AO4, can be written as
AO42  R12  R 22  2R1R 2 cos(2  1)
(1a)
AO4  R12  R 22  2R1R 2 cos(2  1)
(1b)
or as
2
Substituting the given values into this equation gives
AO4  202  92  2(20)(9)cos15
(1c)
Therefore, the distance between point A and point O4 is
AO4   11.544 cm
(2)
Obviously, this distance cannot be a negative value, therefore, the length AO4  11.544 cm . The
notation for the angles for the open and closed (or crossed-over) configurations are shown in Figure 2.
Figure 2. The notation for the angles for the open and closed (or crossed-over) configurations.
The angle O4 AO2   can be determined from the law of sines; i.e.,
R1
AO4

sin  sin (2  1)
(3)
which gives
 20 sin15 

  153.36
11.544


  sin 1 
(4)
Therefore, the angle   O2O4 A can be determined from the sum of the angles of triangle O4O2 A ;
i.e.,
  180    ( 2  1 )  11.64
3
(5)
The triangle O4 AB has the same lengths and angles in both configurations, however, the influence of
these angles on the joint angles 3 and  4 are different.
For the open configuration. The angles are
R32  R42  AO42
  cos (
)  41.71
2 R3 R4
1
and
  sin 1 (
Therefore, the angle
  180      59.82
Therefore, the joint angles are
which can be written as
3   2  180    
3  30  180  153.36  78.47  81.83
and
which can be written as
R4 sin 
)   78.47
AO4
 4  1  180    
 4  15  180  11.64  59.82  123.54
(6)
(7)
(8)
(9a)
(9b)
(10a)
(10b)
For the closed configuration. The joint angles for links 3 and 4 are
3   2  180    
which can be written as
3  30  180  153.36  78.47  75.11
and
which can be written as
 4  1  180    
 4  15  180  11.64  59.82  243.18  116.82
(11a)
(11b)
(12a)
(12b)
(iii) The closed-form solution for the joint variables 3 and 4 ; i.e., Freudenstein’s equation (5 Points).
This an analytical method (a vector loop approach). The vector loop that is chosen for the four-bar
linkage is as shown in Figure 3.
The vector loop equation (VLE) can be written as
 I  ?  ? 
R 2  R 3  R 4  R1  0
(1)
The X and Y components of Eq. (1) are
and
R2 cos  2  R3 cos 3  R4 cos  4  R1 cos 1  0
(2a)
R2 sin  2  R3 sin 3  R4 sin  4  R1 sin 1  0
(2b)
4
Freudenstein's Equation, see Section 10.13, Eqs. (10.23)-(10.26), pages 451 and 452, can be written
in terms of the output angle as
A cos 4  B sin 4  C
(3)
Figure 3. The vectors and the vector loop for the four-bar linkage.
The coefficient A in Eq. (3) can be written as
A  2 R1 R 4 cos 1  2 R 2 R 4 cos 2
(4a)
Substituting the known data into Eq. (4a) gives
A  2  20  17 cos 15  2  9  17 cos 30   391.83 cm2
(4b)
The coefficient B in Eq. (3) can be written as
B  2 R1 R 4 sin   2 R 2 R 4 sin 
1
2
(5a)
Substituting the known data into Eq. (5a) gives
B  2  20  17  sin 15  2  9  17  sin 30   23.00 cm2
(5b)
The coefficient C in Eq. (3) can be written as
C  R 32  R12  R 22  R 24  2 R1 R 2 cos (1  2 )
(6a)
Substituting the known data into Eq. (6a) gives
C  152  202  92  172  2 x 20 x 9 cos (15  30 )   197.27 cm2
5
(6b)
Substituting Eqs. (4b), (5b), and (6b) into Eq. (3) gives
391.83cm 2 cos   23.00 cm2 sin    197.27 cm 2
4
4
(7a)
391.83cm 2 cos   23.00 cm2 sin   197.27 cm 2  0
4
4
(7b)
which can be written as
To determine the output angle we can write this transcendental equation as an algebraic equation,
(namely, a quadratic equation). The procedure is to use the tangent of the half-angle relationship; i.e.,

Z  tan ( 4 )
2
(8a)
which gives
sin 4 
2Z
and
1  Z2
cos 4 
1  Z2
1  Z2
(8b)
Substituting Eqs. (8b) into Eq. (3), and rearranging, gives
(A  C) Z2  (2 B) Z  (C  A)  0
(9)
The solution to this equation can be written as
Z
B  B2  (A  C)(C  A)
AC
(10a)
Substituting Eqs. (4b), (5b), and (6b) into Eq. (10a) gives
Z
23.00  23.002  [391.83  (197.27)(197.27  391.83)]
391.83  (197.27)
(10b)
that is
Z
23.00  529  (194.56)(589.10)
194.56
(10c)
Z
23.00  339.33
 0.1182  1.7441
194.56
(10d)
or
Therefore, the two values for Z are
Z   1.8623 rads
or
Z   1.6259 rads
(10e)
Rearranging Eq. (8a), the output angle can be written as
4  2 tan 1 Z
(11a)
Substituting Eqs. (10e) into Eq. (11a), the two answers for the output angle are
4  123.53
and
6
4  116.81
(11b)
Substituting Eqs. (11b) into Eqs. (2) gives the two answers for the joint variable 3.
4  123.53
and
3  81.82
For Configuration 1:
For Configuration 2:
4   116.81
3   75.10
and
(12a)
(12b)
Note that the answers for the joint variables 3 and 4 are in good agreement but more accurate than
the answers from the graphical solution. The answers are also in good agreement with the answers from
the trigonometric solution.
(iv) Numerical Method – The Newton-Raphson Iterative Technique (5 Points).
From the vector loop equation, see Eqs. (2a) and (2b), the error equations can be written as
and
R2 cos θ2 + R3 cos  3 * – R4 cos  4 * – R1 cos θ1 =  X
(13a)
R2 sin θ2 + R3 sin  3 * – R4 sin  4 * – R1 sin θ1 =  Y
(13b)
where  X and  Y are the X and Y components of the error vector. To linearize these two equations, the
first-order Taylor’s Series can be written as
  X 
  X 

 3 *  
  4 *   X    X
  4 * 
 3 * 
(14a)
  Y 
  Y 

 3 *  
  4 *   Y    Y
  4 * 
 3 * 
(14b)
and
where 3 * and  4 * are the two corrections to the joint angles for links 3 and 4. In matrix form, these
two linear equations can be written as
 a11 a12   3 *    X 
a



 21 a22    4 *    Y 
(15)
The coefficients of the 2x2 matrix on the left-hand side of Eq. (15) can be written from Eqs. (13) as
a11 =
 X
= – R3 sin  3 *
 3 *
a21 =
 Y
= + R3 cos  3 *
 3 *
and
and
and
a12 =
 X
= + R4 sin  4 *
 4 *
a22 =
 Y
= – R4 cos  4 *
 4 *
(16a)
(16b)
Using Cramer’s rule, the two corrections can be written as
 X
3 * 
a12
 Y a22   X  a22     Y  a12 

a11 a12
DET
a21 a22
and
7
(17a)
 X
a11
 4 * 
a21  Y
  Y  a11     X  a21 

a11 a12
DET
a21 a22
(17b)
The determinant of the coefficient matrix in Eq. (16) is
DET 
a11
a 21
a12
 a11 a 22  a12 a 21
a 22
(18a)
Substituting Eqs. (16a) and (16b) into Eq. (18a), the determinant can be written as
DET  R3 R4 sin (3   4 )
(18b)
For the second iteration, the coupler angle and the output angle can be written as
3 *NEW  3 *OLD  3 *
 4 *NEW   4 *OLD   4 *
and
(19)
The First iteration. Begin with the initial guesses for the coupler angle and the output angle. From a
scaled drawing of the open configuration, see Part (i), the coupler angle and the output angle were
measured as
3  81
and
(20)
 4  123
Note that the accuracy of the final values for the angles should be within 0.01˚ = 0.0001745 rads. From
Eqs. (13a) and (13b), the errors are
 X   0.0811 cm
and
 Y   0.1185 cm
(21)
From Eqs. (15a) and (15b), the coefficients are
and
a11 =  14.815 cm
and
a12 = + 14.257 cm
(22a)
a21 = + 2.347 cm
and
a22 = + 9.259 cm
(22b)
  14.815cm  14.257 cm   3    0.0811cm 

  2.347 cm  9.259 cm  



  4    0.1185cm 
(23)
Substituting Eqs. (21) and (22) into Eq. (16) gives
Substituting Eqs. (22) into Eq. (18a), the determinant is
DET =  170.63 cm2
(24)
From Eqs. (17), the two corrections are
3 
( 0.0811cm)(  9.259cm)  (  0.1185cm)( 14.257 cm)
  0.01430 rads
 170.63cm 2
and
8
(25a)
4 
( 0.1185cm)(  14.815cm)  ( 0.0811cm)(2.347 cm)
  0.00917 rads
 170.63cm 2
(25b)
Therefore, the new values for the coupler angle and the output angle from Eq. (19), and using the
accuracy of the final values for the angles within 0.01˚ = 0.0001745 rads, are
3 NEW  81.82
4 NEW  123.53
and
(26)
The Second iteration. Substituting Eqs. (26) into Eqs. (13a) and (13b) the errors are
 X   0.00031 cm
and
Y   0.00014 cm
(27)
Therefore, Eq. (16) can be written as
  14.847 cm 14.171cm   3    0.00031cm 



9.390 cm   4    0.00014 cm 
 2.134 cm
(28)
The determinant of the coefficient matrix in Eq. (28) is
DET =  169.654 cm2
(29)
and the two corrections are
3 
( 0.00031cm)(  9.390 cm)  ( 0.00014 cm)( 14.171cm)
  2.885 x 10 5 rads
 169.654 cm 2
(30a)
4 
( 0.00014 cm)(  14.847 cm)  (  0.00031cm)(  2.134 cm)
  8.353 x 10 6 rads
 169.654 cm 2
(30b)
and
Therefore, the new values for the coupler angle and the output angle from Eq. (19), and using the
accuracy of the final values for the angles within 0.01˚ = 0.0001745 rads, are
3 NEW  81.82
4 NEW  123.53
and
(31)
Note that these answers are the same as the answers given by the second iteration, see Eqs. (26). A third
iteration would show that these answers are acceptable within the accuracy of the final values for the
angles within 0.01˚ = 0.0001745 rads.
Summary of the answers: For the coupler angle and the output angle (after two iterations):
Open Configuration:
3  81.82
and
4  123.53
(32a)
Closed Configuration:
3   75.10
and
4   116.81
(32b)
Note that the answers given by Eqs. (32) are in complete agreement (to four significant figures) with the
answers obtained from Freudenstein’s equation, see Eqs. (12) in Part (iii).
(v) 20 Points. A computer code could be written as follows:
%% Initialize correction
9
dt_3=1; dt_4=1;
resolution = 0.01*pi/180;
iteration=0;
%% Estimating theta 3 and theta 4 values (from the Newton-Raphson technique)
while ( ( abs ( dt_3) > resolution ) | ( abs ( dt_4) > resolution ) )
iteration = iteration + 1 ;
“insert error equation”
“insert partial equation”
“insert Cramer’s rule”
“new angle values”
if ( iteration > 10 )
display ( ' Error - Number of iterations exceeds 10 ' )
break
end
end
10