Numerical Analysis for Engineering
Brian T. Hurler
Fall 1999
Analysis of a Planar Four Bar Mechanism Using Multiple Methods
December 9, 1999
2
Table of Contents
SYMBOLS: ..................................................................................................................................................... 4
INTRODUCTION: ......................................................................................................................................... 5
GENERAL EQUATIONS: ............................................................................................................................ 5
METHOD 1: ................................................................................................................................................... 7
EX 1: ............................................................................................................................................................. 8
METHOD 2 ................................................................................................................................................... 10
EX 2: ........................................................................................................................................................... 10
EX 3: ........................................................................................................................................................... 11
CONCLUSIONS: ......................................................................................................................................... 11
REFERENCES: ............................................................................................................................................ 13
3
Symbols:
A
Ground Link
B
C
D
H
’
’
’’
Driver
Coupler Link
Follower
Distance from Fixed point of D to moveable point on B
Pi 3.14159….
Angular Position of Driver(“B”) with respect to Ground (“A”)
Angular Position of Follower(“D”) with respect to Ground(“A”)
Relative Angle between Coupler Link(“C”) and Crank(“D”)
Angular Position of Coupler Link(“C”) with respect to Ground(“A”)
Angular Velocity of Driver(“B”) with Respect to Ground (“A”)
Angular Acceleration of Driver(“B”) with Respect to Ground (“A”)
Angular Velocity of Follower(“D”) with respect to Ground(“A”)
Angular Acceleration of Follower(“D”) with respect to Ground(“A”)
4
Introduction:
The four bar linkage is a relatively simple device that is commonly used in mechanism
design to transmit loads. Four Bar mechanisms are widely used and can be found in some
of the oldest as well as the newest machines(Hall, p3). In a day where most problems are
being solved through microprocessors, Four-Bar Linkages can provide a simple cost
effective solution to many problems. In order to effectively use this device, one must
understand how it functions and how to incorporate it into a design.
Under normal constraints, a four bar mechanism need not be constrained to 2 dimensions.
If ball joints are used to connect both ends of the Coupler to both the Driver and the
Follower, the mechanism may occupy real space. In this paper, I will be investigating a
mechanism where all four joints represent pin joints thereby restricting the linkage to
motion purely in one plane.
To further limit the type of Four Bar Linkage, this paper will be investigating only
linkages in which the Driver is allowed to fully rotate. To ensure this, Grashof’s
Inequality needs to be evaluated.
Length of Longest Link + Length of Shortest Link < Sum of other Two Links
If in satisfying this inequality, A or B is found to be the shortest link, the Driver will be
allowed to fully rotate.
Once the mechanism is found to satisfy Grashof’s inequality, it will be evaluated for
Angular Position, Angular Velocity and Angular Acceleration. Required inputs will be
Initial Position of the Crank and Angular Velocity/Acceleration information about the
Crank.
General Equations:
In working with four bar mechanisms, there are some general equations which describe
the system.
For the purpose of this paper, will be considered to be an input into the equation.
The Angular Position of the Follower can be geometrically shown to be:
= cos-1(h2 + a2 -b2 / 2hb) + cos-1 ((h2 + d2– c2)/2hd)
To solve this, h is needed:
h = (a2 + b2 + 2ab * cos())0.5
5
The angle between the Coupler Link and the Follower can be described as:
= cos-1(c2 + d2 – a2 – b2 – 2ab cos())/2cd
Using Maple’s diff() function, the first and second derivatives of can be found. As
illustrated below, these are complicated functions.
2
a sin()
(2 a + 2 a b cos()) a sin()
- -------- + .5000000000 -----------------------------.5
1.5
%1
%1
’:= -2 ------------------------------------------------------- - 2
/
2
2\1/2
|
(2 a + 2 a b cos()) |
|4 - ----------------------|
|
1.0 2
|
\
%1
b
/
2
2
2
2
a b sin()
(a + b + 2 a b cos() + d - c ) a b sin()
- ---------- + .5000000000 --------------------------------------------.5
1.5
%1
d
%1
d
-----------------------------------------------------------------------/
2
2
2
2 2\1/2
|
(a + b + 2 a b cos() + d - c ) |
|4 - -----------------------------------|
|
1.0 2
|
\
%1
d
/
2
%1 := a
2
+ b
+ 2 a b cos()
/
2
2
2
2
| a cos()
a sin() b
%3 a sin() b
’’:= -2 |- -------- - 2.000000000 ------------ + 1.500000000 --------------|
.5
1.5
2.5
\
%1
%1
%1
\
%3 a cos()|
/
+ .5000000000 -----------| /
1.5
| /
%1
/
/
2
\1/2
|
%3
|
|4 - --------|
+
|
1.0 2|
\
%1
b /
/ a sin()
%3 a sin()\
|- -------- + .5000000000 -----------|
|
.5
1.5
|
\
%1
%1
/
/
2
\
| %3 a sin()
%3 a sin()|
|4 ----------- - 2.0 ------------|
|
1.0
2.0
|
\
%1
b
%1
b
/
/
2
\3/2
/
2 2
2
/ |
%3
|
| a b cos()
a b sin()
/ |4 - --------|
- 2 |- ---------- - 2.000000000 -------------
6
/
|
\
1.0
%1
2|
b /
|
\
.5
%1
d
1.5
%1
d
2 2
2
\
%2 a b sin(x)
%2 a b cos()|
/
+ 1.500000000 ---------------- + .5000000000 -------------| /
2.5
1.5
| /
%1
d
%1
d
/
/
2
\1/2
|
%2
|
/ a b sin(x)
%2 a b sin()\
|4 - --------|
+ |- ---------- + .5000000000 -------------|
|
1.0 2|
|
.5
1.5
|
\
%1
d /
\
%1
d
%1
d
/
/
2
\
| %2 a b sin()
%2 a b sin()|
/
|4 ------------- - 2.0 --------------| /
|
1.0 2
2.0 2
| /
\
%1
d
%1
d
/
/
2
\3/2
|
%2
|
|4 - --------|
|
1.0 2|
\
%1
d /
2
2
%1 := a + b + 2 a b cos()
2
2
2
2
%2 := a + b + 2 a b cos() + d - c
2
%3 := 2 a + 2 a b cos()
Method 1:
It is very easy to find distinct positions of a Four Bar mechanism using the above
equations; however, to find every position of the mechanism would require the equations
to be solved an infinite number of times. The results of the mechanism in between data
points where it may have been solved may be important. In order to solve for the Position
of the mechanism at every state, we will need to estimate the data between solutions. An
ideal way of doing this is through approximation and interpolation.
LaGrange Interpolation can prove to be very useful for this application. Theorem 3.2
from Numerical Analysis states:
F(xk) = P(ck) for each k = 0,1,…n.
And
P(x) = f(x0)Ln,0(x)+…+f(xn)Ln,n(x)
Where
7
Ln,n(x) =
(x-x0)(x-x1)…(x-xk-1)(x-xk+1)…(x-xn)
-------------------------------------------------(xk-x0)(xk-x1)…(xk-xk-1)(xk-xk+1)…(xk-xn)
The main drawback to using LaGrange interpolation is that to get a high degree of
accuracy, a large number of points will be needed. As a result of the large number of data
points, the resultant equation will be of high degree. High-degree polynomials have an
oscillatory nature and changes in a small range may result in large change over the entire
curve. To avoid this high order of sensitivity, one need only look to the cubic spline.
There are two types of cubic splines: natural and clamped. Natural splines assume a
shape that passes through each of the data points. Clamped splines do the same the same
thing but also have derivative information at the endpoints. While clamped splines are
typically more accurate than natural splines, the information necessary to evaluate the
clamped spline is not available using this method; therefore, natural splines will be used.
The equation for a cubic spline is:
Sj (x) = aj + bj (x –xj) + cj (x-xj)2 + dj (x – xj)3
Sj(x) will represent the Angular Position of the Follower Link and can be evaluated using
algorithm 3.4 from the text.
Taking the first and second derivatives of Sj(x) yield:
Sj ‘(x) = bj + 2cj (x-xj) + 3dj (x – xj)2
Sj’’(x) = 2cj + 6dj (x – xj)
Since algorithm 3.4 already outputs aj , bj , cj , and dj as part of the program, the syntax
can be easily modified to include Sj’(x) and Sj’’(x)which will represent Angular Velocity
and Angular Acceleration respectively.
Ex 1:
Evaluate a four bar linkage where A, B C, and D equal 20, 30, 25, and 35 respectively.
Use 0 = 0 ; = 2 * sin (*t/2); f(t), t={0, .1, .4, .7, 1.0} and calculate the appropriate
coefficients and plot the resulting curves. Compare the answers for Angular Position,
Angular Velocity, and Angular Acceleration at t ={0,.25,.75, 1.0}.
8
2.5
0
0.015676
0.243167
0.695201
1.27324
h
50
49.99853
49.64571
47.1329
40.64262
1.323834594
1.323908634
1.341515707
1.461211908
1.736381768
2
I
0
1
2
3
A(I)
1.323835
1.323909
1.341516
1.461212
B(I)
0.000497
0.001228
0.171424
0.686111
C(I)
0
0.00730689
0.56001339
1.15561048
D(I)
0.024356
0.614118
0.661775
-1.28401
2.5
2
Angular Position
1.5 1.5
Angular Position
Radians
Radians
2
t
0
0.1
0.4
0.7
1
1
Angular Velocity
1
Angular Velocity
0.5 0.5
Angular
Angular
Acceleration
0
Acceleration
0
0 0
-0.5
0.50.5
11
t t
0
0.25
0.75
1
Actual
1.323834594
1.326661549
1.496869259
1.736381766
h
0
50
0.096919589 49.94365
0.785991866 46.34678
1.273239545 40.64262
Actual ’’
0
0.058265
0.411059
0.557743
Actual ’’
0.602642388
0.598215898
0.391742683
0.215675789
1.323834594
1.326661549
1.496869257
1.736381768
'
''
0.000497
0
0.044873 0.56732
0.792042 1.926017
1.032794 8E-09
Abs Error
Abs Error ’
0.000000000106 1.323835
0.000000000042 0.756519
0.000000002219 0.602173
0.000000001806
1.32385
Abs Error ’’
0.059503
0.069496
0.079474
0.089437
9
Method 2
As mentioned earlier, it is quite easy to evaluate position due to its simple equation.
Evaluating Angular Velocity and Angular Acceleration is a little more difficult as it
requires derivatives and integrals to be evaluated. When dealing with a constant Driver
Angular Velocity (“”) this becomes a straight forward mathematical problem. The
velocity need not always be constant so a manner in which to evaluate those integrals and
derivatives becomes necessary.
As indicated in the introduction, is a function of . Therefore, we must be able to
accurately evaluate first. In the example following cubic splines, was not give but
rather . To determine , the integral is needed. This integration can easily be done by
using Simpson’s Rule:
x2
h
h5
(x) dx = --- [(x) + 4 (x1) + (x2)] - ---- (4)()
xo
3
90
Where h = x2 – x1 = x1 – x0.
Algorithm 4.1 can be used to output the results of Simpson’s Rule to determine .
EX 2:
Find at t={0, .25, .75, 1.0}, given = 2 * sin (*t/2). Evaluate the error.
t
Exact
0
0.25
0.75
1
0
0.09691959
0.78599187
1.27323954
Simpson's
Rule
Abs. Error
0
0
0.09691959 6.29643E-10
0.78602506 3.31945E-05
1.27341090 0.000171355
Once is determined, ’ and ’’ still need to be evaluated. These derivatives can be
difficult to evaluate. The three point formula and five point formula offer a solution to
this task. Equation 4.6 from Numerical Analysis states:
1
’(x0) = ----- [-25 (x0) + 48 (x0 + h) – 36 (x0 + 2h) + 16 (x0 + 3h)
12h
h4
– 3 (x0 + 4h)] + ----- (5)()
5
10
Additionally, the second derivative can be evaluated by:
1
h2
’’(x0) = ----- [(x0 – h) - 2 (x0) + (x0 + h)] - ----- (4)()
h2
12
EX 3:
Evaluate the Angular Velocity and Angular Accelerations using the five point formula
above for t={0, .25, .75, 1.0}, given = 2 * sin (*t/2). Evaluate the error.
0
0.25
0.75
1
'
7.4015E-12
0.04459372
0.75953838
1.11548668
actual ' Abs Error
''
actual '' Abs Error
0
7.4015E-12
0
0.602642 0.602642
0.476375 0.431781 0.5195368 0.321831 0.197706
0.411059 0.34847917 1.8316832 0.391743 1.439941
0.557743 0.55774334 0.8627037 0.215676 0.647028
Conclusions:
Neither method used provided particularly good results for either Angular Acceleration or
Angular Velocity. The main benefit of using the cubic spline was that no knowledge of
how the mechanism functioned was needed. The mechanism could have been
geometrically assembled with graph paper or on a CAD system to provide the initial
inputs. The main draw back to using the free spline as used in method one is that it sets
the initial and final accelerations to 0. This could be the main reason for the error in the
analysis.
Simpson’s Method proved to be a very easy and very efficient way of evaluating integrals.
No knowledge of actual integration techniques were needed and results were accurate to
more than 3 decimal places.
Maple was used to do the error checking in these analyses. The software package is fairly
friendly and has proven to be a better technique at solving this problem. If in the future,
an analysis of a mechanism were needed to be done, I would use that tool.
I believe the results I have obtained may be a direct result of using a non-constant and
improper evaluation of the derivatives resulting.
11
12
References:
(1) Burden, Richard L. and Faires, J. Douglas., Numerical Analysis Sixth Edition,
Brooks/Cole Publishing Company., Pacific Grove, CA, 1997
(2) Hall, Allen S. Jr., Kinematics and Linkage Design, Balt Publishers, West Lafayette,
Indiana, 1961
(3) Rothbart, Harold A., Mechanical Design and Systems Handbook, McGraw-Hill, Inc.,
New York, NY, 1964
(4) Shigley, J.E., and Mischke, C.R., Standard Handbook of Machine Design, McGrawHill, Inc., New York, NY, 1986
13
© Copyright 2026 Paperzz