Mechanism Kinematics & Dynamics and Vibrational Modeling

conjunctionfrictionΜηχανική

13 Νοε 2013 (πριν από 3 χρόνια και 9 μήνες)

340 εμφανίσεις


Mechanism Kinematics & Dynamics and
Vibrational Modeling


Dr. Robert L. Williams II
Mechanical Engineering, Ohio University


NotesBook Supplement for
ME 3011 Kinematics & Dynamics of Machines
© 2013 Dr. Bob Productions

williar4@ohio.edu
people.ohio.edu/williar4




These notes supplement the ME 3011 NotesBook by Dr. Bob

This document presents supplemental notes to accompany the ME 3011 NotesBook. The outline
given in the Table of Contents on the next page dovetails with and augments the ME 3011 NotesBook
outline and hence is incomplete here.

m

k
x(t)

k
x (t)

x (t)



2

ME 3011 Supplement Table of Contents

1. INTRODUCTION ........................................................................................................................................................................................................................ 3
1.3

V
ECTORS
.

C
ARTESIAN
R
E
-I
M
R
EPRESENTATION
(P
HASORS
) ............................................................................................................................................... 3
1.6

M
ATRICES
.............................................................................................................................................................................................................................. 5
2. KINEMATICS ANALYSIS ...................................................................................................................................................................................................... 14
2.1

P
OSITION
K
INEMATICS
A
NALYSIS
....................................................................................................................................................................................... 14
2.1.1 Four-Bar Mechanism Position Analysis ..................................................................................................................................................................... 14
2.1.1.1 Tangent Half-Angle Substitution Derivation and Alternate Solution Method .................................................................................................. 14
2.1.1.3 Four-Bar Mechanism Solution Irregularities ...................................................................................................................................................... 19
2.1.1.4 Grashof’s Law and Four-Bar Mechanism Joint Limits ...................................................................................................................................... 20
2.1.2 Slider-Crank Mechanism Position Analysis ............................................................................................................................................................... 28
2.1.3 Inverted Slider-Crank Mechanism Position Analysis ................................................................................................................................................ 31
2.1.4 Multi-Loop Mechanism Position Analysis ................................................................................................................................................................. 37
2.2

V
ELOCITY
K
INEMATICS
A
NALYSIS
..................................................................................................................................................................................... 41
2.2.2 Three-Part Velocity Formula Moving Example ......................................................................................................................................................... 41
2.2.5 Inverted Slider-Crank Mechanism Velocity Analysis ................................................................................................................................................ 43
2.2.6 Multi-Loop Mechanism Velocity Analysis ................................................................................................................................................................ 47
2.3

A
CCELERATION
K
INEMATICS
A
NALYSIS
............................................................................................................................................................................. 51
2.3.2 Five-Part Acceleration Formula Moving Example .................................................................................................................................................... 51
2.3.4 Slider-Crank Mechanism Acceleration Analysis........................................................................................................................................................ 53
2.3.5 Inverted Slider-Crank Mechanism Acceleration Analysis ......................................................................................................................................... 54
2.3.6 Multi-Loop Mechanism Acceleration Analysis .......................................................................................................................................................... 60
2.4

O
THER
K
INEMATICS
T
OPICS
................................................................................................................................................................................................ 64
2.4.1 Link Extensions Graphics ........................................................................................................................................................................................... 64
2.5

J
ERK
K
INEMATICS
A
NALYSIS
.............................................................................................................................................................................................. 66
2.5.1 Jerk Analysis Introduction .......................................................................................................................................................................................... 66
2.5.2 Mechanism Jerk Analysis ........................................................................................................................................................................................... 69
2.6

B
RANCH
S
YMMETRY IN
K
INEMATICS
A
NALYSIS
................................................................................................................................................................ 70
2.6.1 Four-Bar Mechanism .................................................................................................................................................................................................. 70
2.6.2 Slider-Crank Mechanism ............................................................................................................................................................................................ 72
3. DYNAMICS ANALYSIS .......................................................................................................................................................................................................... 73
3.1

D
YNAMICS
I
NTRODUCTION
.................................................................................................................................................................................................. 73
3.2

M
ASS
,

C
ENTER OF
G
RAVITY
,
AND
M
ASS
M
OMENT OF
I
NERTIA
......................................................................................................................................... 74
3.4

F
OUR
-B
AR
M
ECHANISM
I
NVERSE
D
YNAMICS
A
NALYSIS
................................................................................................................................................... 85
3.5

S
LIDER
-C
RANK
M
ECHANISM
I
NVERSE
D
YNAMICS
A
NALYSIS
........................................................................................................................................... 88
3.6

I
NVERTED
S
LIDER
-C
RANK
M
ECHANISM
I
NVERSE
D
YNAMICS
A
NALYSIS
.......................................................................................................................... 90
3.7

M
ULTI
-
LOOP
M
ECHANISM
I
NVERSE
D
YNAMICS
A
NALYSIS
................................................................................................................................................ 98
3.8

B
ALANCING OF
R
OTATING
S
HAFTS
................................................................................................................................................................................... 103
4. GEARS AND CAMS ............................................................................................................................................................................................................... 107
4.1

G
EARS
................................................................................................................................................................................................................................ 107
4.1.1 Gear Introduction ...................................................................................................................................................................................................... 107
4.1.2 Gear Ratio ................................................................................................................................................................................................................. 113
4.1.3 Gear Trains ................................................................................................................................................................................................................ 116
4.1.4 Involute Spur Gear Standardization .......................................................................................................................................................................... 118
4.1.5 Planetary Gear Trains ................................................................................................................................................................................................ 127
4.2

C
AMS
.................................................................................................................................................................................................................................. 135
4.2.1 Cam Introduction ...................................................................................................................................................................................................... 135
4.2.2 Cam Motion Profiles ................................................................................................................................................................................................. 138
4.2.3 Analytical Cam Synthesis ......................................................................................................................................................................................... 143
5. MECHANICAL VIBRATIONS INTRODUCTION .............................................................................................................................................................. 150
5.2

M
ECHANICAL
V
IBRATIONS
D
EFINITIONS
.......................................................................................................................................................................... 150
6. VIBRATIONAL SYSTEMS MODELING ............................................................................................................................................................................. 153
6.1

Z
EROTH
-O
RDER
S
YSTEMS
................................................................................................................................................................................................. 153
6.2

S
ECOND
-O
RDER
S
YSTEMS
................................................................................................................................................................................................. 163
6.2.1 Translational m-c-k System Dynamics Model ......................................................................................................................................................... 163
6.2.3 Pendulum System Dynamics Model ......................................................................................................................................................................... 164
6.2.4 Uniform Circular Motion .......................................................................................................................................................................................... 166
6.4

A
DDITIONAL
1-
DOF
V
IBRATIONAL
S
YSTEMS
M
ODELS
..................................................................................................................................................... 167
6.5

E
LECTRICAL
C
IRCUITS
M
ODELING
.................................................................................................................................................................................... 198
6.6

M
ULTI
-
DOF
V
IBRATIONAL
S
YSTEMS
M
ODELS
.................................................................................................................................................................. 206




3

1. Introduction

1.3 Vectors. Cartesian Re-Im Representation (Phasors)

Here is an alternate vector representation.

i
P Pe



The phasor
i
Pe

is a polar representation for vectors, where P is the length of vector
P
, e is the
natural logarithm base,
1i  
is the imaginary operator, and  is the angle of vector
P
.
i
e

gives the
direction of the length P, according to Euler’s identity.

cos sin
i
e i


 


i
e

is a unit vector in the direction of vector
P
.

Phasor Re-Im representation of a vector is equivalent to Cartesian XY representation, where the real (Re)
axis is along X (or
ˆ
i
) and the imaginary (Im) axis is along Y (or
ˆ
j
).

cos
(cos sin )
sin
cos
ˆ ˆ
(cos sin )
sin
Re
i
Im
X
Y
P
P
P P i Pe
P
P
P
P
P P i j
P
P


 


 

 
 
    
   
 
 
 
 
   
   
 
 


A strength of Cartesian Re-Im representation using phasors is in taking time derivatives of vectors – the
derivative of the exponential is easy (
( )
s
s
d ds e e

).
2 2
2 2
2
2
2
2 2
2
2
2
2
2
2
2
( )
2
cos 2 sin sin cos
sin 2 cos cos
i
i i
i i i i i
i i i i
d P d Pe
dt dt
d P d
Pe iP e
dt dt
d P
Pe iP e iP e iP e i P e
dt
d P
Pe iP e iP e P e
dt
P P P P
d P
dt
P P P

 
    
   

   
  

     
    

 
    
   
  

  


   
  
  
 
  
 
 
 
2
sinP


 
 
 




4

Where we had to use extensions of Euler’s identity

2
2 2
cos sin
cos sin sin cos
sin cos cos sin
i
i
i
e i
ie i i i
i e i i i



 

  

  
 
    
     



Compare this double-time-derivative with the XY approach.

2 2
2 2
2
2
2
2
2
2
2
2
cos
sin
cos sin
sin cos
cos sin sin sin cos
sin cos cos cos sin
cos 2 sin
P
d P d
P
dt dt
P P
d P d
dt dt
P P
P P P P P
d P
dt
P P P P P
P P P
d P
dt


  
  

       

       
   
 

 
 
 


 

 
 
   

 
   
 
 





   
  
   
  
 
 
2
2
sin cos
sin 2 cos cos sin
P
P P P P
  
      
 

 
  
 

  
 



We obtain the same result, but the Re-Im phasor time differentiation is made in compact vector notation
along the way.


Above we used the product and chain rules of time differentiation.

product rule
( ) ( )
( ) ( ) ( )
( )
( ( ) ) ( ) ( ) ( )
i t i t
i t i t i t
d dP t de de
P t e e P t P t e P t
dt dt dt dt
 
  
   



chain rule
( ) ( )
( )
( )
( )
( )
i t i t
i t
de de d t
ie t
dt d t dt
 




 



The result for this example is

( ) ( ) ( )
( ( ) ) ( ) ( ) ( )
i t i t i t
d
P t e P t e P t ie t
dt
  

 







5

1.6 Matrices

Matrix
an m x n array of numbers, where m is the number of rows and n is the number of columns.
 
11 12 1
21 22 2
1 2
n
n
m m mn
a a a
a a a
A
a a a















   



Matrices may be used to simplify and standardize the solution of n linear equations in n unknowns
(where m = n). Matrices are used in velocity, acceleration, and dynamics linear equations (matrices are
not used in position analysis which requires a non-linear solution).

Special Matrices
square matrix (m = n = 3)
 
11 12 13
21 22 23
31 32 33
a a a
A
aaa
aaa













diagonal matrix
 
11
22
33
0 0
0 0
0 0
a
A a
a













identity matrix
 
3
1 0 0
0 1 0
0 0 1
I













transpose matrix
 
11 21 31
12 22 32
13 23 33
T
a a a
A
a a a
a a a











(switch rows & columns)

symmetric matrix
   
11 12 13
12 22 23
13 23 33
T
a a a
A
A a a a
a a a




 








column vector (3x1 matrix)
 
1
2
3
x
X
x
x









 


row vector (1x3 matrix)
   
1 2 3
T
X
x x x




6

Matrix Addition
add like terms and keep the results in place

a b e f a e b f
c d g h c g d h
 
     
 
     


     



Matrix Multiplication with Scalar
multiply each term and keep the results in place

a b ka kb
k
c d kc kd

  


  

 



Matrix Multiplication







C A B


In general,








A
B B A


The row and column indices must line up as follows.








( x ) ( x )( x )
C A B
m n m p p n




That is, in a matrix multiplication product, the number of columns
p
in the left-hand matrix must equal
the number of rows
p
in the right-hand matrix. If this condition is not met, the matrix multiplication is
undefined and cannot be done.

The size of the resulting matrix [
C
] is from the number of rows
m
of the left-hand matrix and the
number of columns
n
of the right-hand matrix,
m
x
n
.

Multiplication proceeds by multiplying like terms and adding them, along the rows of the left-
hand matrix and down the columns of the right-hand matrix (use your index fingers from the left and
right hands).

Example
 
(2x1) (2x3)(3x1)
g
a b c ag bh ci
C h
d e f dg eh fi
i
 
 

  
 
 

  
 
 

  
 
 



Note the inner indices (
p
= 3) must match, as stated above, and the dimension of the result is dictated by
the outer indices, i.e.
m
x
n
= 2x1.




7

Matrix Multiplication Examples
 
1 2 3
4 5 6
A
 

 
 

 
7 8
9 8
7 6
B




















7 8
1 2 3
9 8
4 5 6
7 6
7 18 21 8 16 18 46 42
28 45 42 32 40 36 115 108
C A B
 
 
 

 
 
 
 
 
   
   
 
   
   
   

(2x2) (2x3)(3x2)



† 






7 8
1 2 3
9 8
4 5 6
7 6
7 32 14 40 21 48 39 54 69
9 32 18 40 27 48 41 58 75
7 24 14 30 21 36 31 44 57
D B A
 
 
 

 
 
 
 
 
  
   
   
    
   
   
  
   

(3x3) (3x2)(2x3)





8

Matrix Inversion


Since we cannot divide by a matrix, we multiply by the matrix inverse instead. Given






C A B
, solve for [
B
].







C A B 

        
  
 
1 1
A
C A A B
I B
B
 










1
B
A C

 


Matrix [
A
] must be square (
m
=
n
) to invert.











1 1
A
A A A I
 
 


where [
I
] is the identity matrix, the matrix 1 (ones on the diagonal and zeros everywhere else). To
calculate the matrix inverse use the following expression.

 


1
adjoint( )A
A
A




where
A
is the determinant of [
A
].






adjoint( ) cofactor( )
T
A
A

cofactor(A)
( 1)
i j
ij ij
a M

 


minor minor M
ij
is the determinant of the submatrix with row i and
column j removed.

For another example, given






C A B
, solve for [A]







C A B 

      
  
 
1 1
C B A B B
A I
A






 




1
A
C B

 


In general the order of matrix multiplication and inversion is crucial and cannot be changed.


9

Matrix Determinant

The determinant of a square n x n matrix is a scalar. The matrix determinant is undefined for a
non-square matrix. The determinant of a square matrix A is denoted det(A) or
A
. The determinant
notation should not be confused with the absolute-value symbol. The MATLAB function for matrix
determinant is
det(A)
.

If a nonhomogeneous system of n linear equations in n unknowns is dependent, the coefficient
matrix A is singular, and the determinant of matrix A is zero. In this case no unique solution exists to
these equations. On the other hand, if the matrix determinant is non-zero, then the matrix is non-
singular, the system of equations is independent, and a unique solution exists.

The formula to calculate a 2 x 2 matrix determinant is straight-forward.

 
a b
A
c d
 

 
 

A
ad bc




To calculate the determinant of 3 x 3 and larger square matrices, we can expand about any one
row or column, utilizing sub-matrix determinants. Each sub-determinant is formed by crossing out the
current row and its column and retaining the remaining terms as an n–1 x n–1 square matrix, each of
whose determinant must also be evaluated in the process. The pivot term (the entry in the cross-out row
and column) multiplies the sub-matrix determinants, and there is an alternating + / – / + / – etc. sign
pattern. Here is an explicit example for a 3 x 3 matrix, expanding about the first row (all other options
will yield identical results).
 
a b c
A
d e f
g
h k
 
 

 
 
 

( ) ( ) ( )
e f d f d e
A a b c
h k g k g h
a ek hf b dk gf c dh ge
   
      


For a 3 x 3 matrix only, the determinant can alternatively be calculated as shown, by copying columns 1
and 2 outside the matrix, multiplying the downward diagonals with + signs and multiplying the upward
diagonals with – signs (clearly the result is the same as in the above formula).

( ) ( ) ( )
a b c a b
A d e f d e
g h k g h
aek bfg cdh gec hfa kdb a ek hf b kd fg c dh ge

           


A common usage of the 3 x 3 matrix determinant is to calculate the cross product
1 2
P P

.


1 2 1 2
1 1 1 1
1 1
1 2 1 1 1 1 2 1 2
2 2 2 2
2 2
2 2 2 1 2 1 2
ˆ
ˆ ˆ
ˆ
ˆ ˆ
y
z z y
y z x y
x z
x y z x z z x
y z x y
x z
x y z x y y x
i
j
k
p p p p
p p p p
p p
P P
p p p
i
j
k
p p p p
p p p p
p p
p p p p p p p
 

 
       
 
 

 




10

System of Linear Equations


We can solve n linear equations in n unknowns with the help of a matrix. Below is an example
for n = 3.

11 1 12 2 13 3 1
21 1 22 2 23 3 2
31 1 32 2 33 3 3
a x a x a x b
a x a x a x b
a x a x a x b

 

 

 



Where a
ij
are the nine known numerical equation coefficients, x
i
are the three unknowns, and b
i
are the
three known right-hand-side terms. Using matrix multiplication backwards, this is written as
 




A
x b
.

11 12 13 1 1
21 22 23 2 2
31 32 33 3 3
a a a x b
a a a x b
a a a x b
     

  
 


  
 

  
 
     



where


 
11 12 13
21 22 23
31 32 33
a a a
A
aaa
aaa
 
 

 
 
 
is the matrix of known numerical coefficients


 
1
2
3
x
x
x
x
 
 

 
 
 
is the vector of unknowns to be solved and


 
1
2
3
b
b b
b
 
 

 
 
 
is the vector of known numerical right-hand-side terms.


There is a unique solution
 


 
1
x
A b

 only if [A] has full rank. If not,
0A 
(the determinant of
coefficient matrix [A] is zero) and the inverse of matrix [A] is undefined (since it would require dividing
by zero; in this case the rank is not full, it is less than 3, which means not all rows/columns of [A] are
linearly independent).
Gaussian Elimination
is more robust and more computationally efficient than
matrix inversion to solve the problem
 




A
x b
for {x}.


11

Matrix Example – solve linear equations

Solution of 2x2 coupled linear equations.

1 2
1 2
2 5
6 4 14
x x
x x
 
 



1
2
1 2 5
6 4 14
x
x
 

  


  
 

  
 



 
1 2
6 4
A
 

 
 

 
1
2
x
x
x
 

 
 

 
5
14
b





 


 


 
1
x
A b



   
1 4 2 6 8A    

The determinant of [A] is non-zero so there is a unique solution.


 
1
4 2 1/2 1/4
1
6 1 3/4 1/8
A
A

 
   
 
   
 
   



check
        
1 1
2
1 0
0 1
A A A A I
 


  







1
2
1/2 1/4 5 1
3/4 1/8 14 2
x
x

 

    
 
     
 


    
 
answer.


Check this solution by substituting the answer {x} into the original equations
 




A
x b
and ensuring
the required original {b} results.

1 2 1 1(1) 2(2) 5
6 4 2 6(1) 4(2) 14

       
 

    
 

       



12

Same Matrix Examples in MATLAB

%-------------------------------
% Matrices.m - matrix examples
% Dr. Bob, ME 3011
%-------------------------------

clear; clc;

A1 = diag([1 2 3]) % 3x3 diagonal matrix
A2 = eye(3) % 3x3 identity matrix

A3 = [1 2;3 4]; % matrix addition
A4 = [5 6;7 8];
Add = A3 + A4

k = 10; % matrix-scalar multiplication
MultSca = k*A3

Trans = A4' % matrix transpose (swap rows and columns)

A5 = [1 2 3;4 5 6]; % define two matrices
A6 = [7 8;9 8;7 6];
A7 = A5*A6 % matrix-matrix multiplication
A8 = A6*A5

A9 = [1 2;6 4]; % matrix for linear equations solution
b = [5;14]; % define RHS vector
dA9 = det(A9) % calculate determinant of A
invA9 = inv(A9) % calculate the inverse of A
x = invA9*b % solve linear equations
x1 = x(1); % extract answers
x2 = x(2);
Check = A9*x % check answer – should be b
xG = A9\b % Gaussian elimination is more efficient

who % display the user-created variables
whos % user-created variables with dimensions


The first solution of the linear equations above uses the matrix inverse. To solve linear
equations,
Gaussian Elimination
is more efficient (more on this in the dynamics notes later) and more
robust numerically; Gaussian elimination implementation is given in the third to the last line of the
above m-file (with the back-slash).

Since the equations are linear, there is a unique solution (assuming the equations are linearly
independent, i.e. the matrix is not near a singularity) and so both solution methods will yield the same
answer.



13

Output of Matrices.m

A1 =
1 0 0
0 2 0
0 0 3

A2 =
1 0 0
0 1 0
0 0 1

Add =
6 8
10 12

MultSca =
10 20
30 40

Trans =
5 7
6 8

A7 =
46 42
115 108

A8 =
39 54 69
41 58 75
31 44 57

dA9 = -8

invA9 =
-0.5000 0.2500
0.7500 -0.1250

x = 1
2

Check = 5
14

xG = 1
2




14

2. Kinematics Analysis

2.1 Position Kinematics Analysis

2.1.1 Four-Bar Mechanism Position Analysis

2.1.1.1 Tangent Half-Angle Substitution Derivation and Alternate Solution Method

Tangent half-angle substitution derivation

In this subsection we first derive the tangent half-angle substitution using an
analytical/trigonometric method. Defining parameter t to be

tan
2
t

 

 
 


i.e. the tangent of half of the unknown angle

, we need to derive cos

and sin

as functions of
parameter t. This derivation requires the trigonometric sum of angles formulae.

cos( ) cos cos sin sin
sin( ) sin cos cos sin
a b a b a b
a b a b a b


  



To derive the cos

term as a function of t, we start with

cos cos
2 2



 
 
 
 


The cosine sum of angles formula yields

2 2
cos cos sin
2 2



   
 
   
   


Multiplying by a ‘1’, i.e.
2
cos
2

 
 
 
over itself yields

2 2
2 2 2
2
cos sin
2 2
cos cos 1 tan cos
2 2 2
cos
2
 

 


   

   
 
     
   
  
     
 
 
     
 
 
 


The cosine squared term can be divided by another ‘1’, i.e.
2 2
cos sin 1
2 2
 
   


   
   
.



15

2
2
2 2
cos
2
cos 1 tan
2
cos sin
2 2







 
 


 
 
 


 
 
 
   
 


 

   


   




Dividing top and bottom by
2
cos
2

 
 
 
yields

2
2
1
cos 1 tan
2
1 tan
2







 
 


 
 
 
 
 


 

 


 




Remembering the earlier definition for t, this result is the first derivation we need, i.e.

2
2
1
cos
1
t
t








To derive the sin

term as a function of t, we start with

sin sin
2 2



 
 
 
 


The sine sum of angles formula yields

sin sin cos cos sin 2sin cos
2 2 2 2 2 2

    

           
  
           
           


Multiplying top and bottom by cosine yields

2 2
sin
2
sin 2 cos 2tan cos
2 2 2
cos
2


 


 
 
     
 
 
     
 
     
 
 


From the first derivation we learned

2
2
1
cos
2
1 tan
2


 

 
 
 

 
 





16

Substituting this term yields

2
1
sin 2tan
2
1 tan
2



 
 
 
 

 
 
 
 

 
 
 
 


Remembering the earlier definition for t, this result is the second derivation we need, i.e.

2
2
sin
1
t
t
 




The tangent half-angle substitution can also be derived using a graphical method as in the figure
below.






17

Alternate solution method

The equation form

cos sin 0E F G



 


arises often in the position solutions for mechanisms and robots. It appeared in the

4
solution for the
four-bar mechanism in the ME 3011 NotesBook and was solved using the tangent half-angle
substitution.

Next we present an alternative and simpler solution to this equation. We make two simple
trigonometric substitutions based on the figure below.



Clearly from this figure we have

2 2
cos
E
E F



2 2
sin
F
E F





In the original equation we divide by
2 2
E F
and rearrange.

2 2 2 2 2 2
cos sin
E F G
E F E F E F
 

 
  


The two simple trigonometric substitutions yield

2 2
cos cos sin sin
G
E F
   

 



Applying the sum-of-angles formula
cos( ) cos cos sin sina b a b a b

 
yields

2 2
cos( )
G
E F
 

 




18


And so the solution for

is

1
1,2
2 2
cos
G
E F
 




 







where

1
tan
F
E











and the quadrant-specific inverse tangent function
atan2
must be used in the above expression for

.

There are two solutions for

, indicated by the subscripts 1,2, since the inverse cosine function is
double-valued. Both solutions are correct. We expected these two solutions from the tangent-half-angle
substitution approach. They correspond to the open- and crossed-branch solutions (the engineer must
determine which is which) to the four-bar mechanism position analysis problem.

For real solutions for

to exist, we must have

2 2
1 1
G
E F

  

or
2 2
1 1
G
E F
  



If this condition is violated for the four-bar mechanism, this means that the given input angle

2
is
beyond its reachable limits (see Grashof’s Law).





19

2.1.1.3 Four-Bar Mechanism Solution Irregularities

Four-bar mechanism position singularity

0G E



4 1 1 2 2
2 2 2 2
1 2 3 4 1 2 1 2
2 ( )
2 cos( )
E r r c r c
G r r r r r r


 
     


For simplicity, let

1
= 0 (just rotate the entire four-bar mechanism model for zero ground link angle).

2 2 2 2
1 2 3 4 1 4 2 4 1 2
2 2 ( ) 0G E r r r r r r r r r c        


I have encountered two example four-bar mechanisms with this
0G E


singularity.

Case 1
When
1 4
r r and
2 3
r r,
2 2 2 2 2
1 2 2 1 1 2 1 1 2
2 2 ( ) 0G E r r r r r r r r c        
ALWAYS, regardless
of

2
.

Example
Given
1 2 3 4
10,6,6,10r r r r   ; this mechanism is ALWAYS singular. To fix this let
1 2 3 4
10,5.9999,6.0001,10r r r r    and MATLAB will be able to calculate the position
analysis reliably at every input angle.


Case 2
When
1 3
2r r and
4 2
2r r, and furthermore
3 2
3 5r r

,

2 2 2 2
3 2 3 2 2 3 2 2 3 2
2 2 2 2 2 2
2 2 2 2 2 2 2
2
2 2
4 4 8 4 ( ) c
100 25 40 8
4 c
9 9 3 3
8
c
3
G E r r r r r r r r r
r r r r r r
r
       
     
 


This
0G E 
occurs only when
2
90  

. Case 2 is much less general than case 1.

Example
Given
1 2 3 4
10,3,5,6r r r r   ; this mechanism is singular when
2
90  

. To fix this ignore
2
90  

or set your

2
array to avoid these values.



20

2.1.1.4 Grashof’s Law and Four-Bar Mechanism Joint Limits

Grashof’s Law

Grashof’s Law was presented in the ME 3011 NotesBook to determine the input and output link
rotatability in a four-bar mechanism. Applying Grashof’s Law we determine if the input and output
links are a crank (
C
) or a rocker (
R
). A crank enjoys full 360 degree rotation while a rocker has a
rotation that is a subset of this full rotation. This section presents more information on Grashof’s Law
and then the next subsection presents four-bar mechanism joint limits.

Grashof's condition states "For a four-bar mechanism, the sum of the shortest and longest link
lengths should not be greater than the sum of two remaining link lengths". With a given four-bar
mechanism, the Grashof Condition is satisfied if
L S P Q

 
where S and L are the lengths of the
shortest and longest links, and P and Q are the lengths of the other two intermediate-sized links. If the
Grashof condition is satisfied, at least one link will be fully rotatable, i.e. can rotate 360 degrees.

For a four-bar mechanism, the following inequalities must be satisfied to avoid locking of the
mechanism for all motion.

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

 

 



With reference to the figure below, these inequalities are derived from the fact that the sum of
two sides of a triangle must be greater than the third side, for triangles
4 1 1
O AB and
2 2 2
O A B, respectively.
Note from our standard notation,
1 2 4
r O O,
2 2
r O A

,
3
r AB

, and
4 4
r O B

.




A
B
A
O
2
2
O
4
A
1
B
1
B
2


21

Four-Bar Mechanism Joint Limits

If
Grashof's Law
predicts that the input link is a rocker, there will be rotation limits on the input
link. These joint limits occur when links 3 and 4 are aligned. As shown in the figure below, there will
be two joint limits, symmetric about the ground link.



To calculate the joint limits, we use the
law of cosines
.

2 2 2
3 4 1 2 1 2 2
2 2 2
1
1 2 3 4
2
1 2
( ) 2 cos
( )
cos
2
L
L
r r r r r r
r r r r
r r



   


  
 









with symmetry about r
1
.


22

Joint Limit Example 1
Given
1 2 3 4
10,6,8,7r r r r

  

L S P Q  
(
10 6 8 7

 
)

so we predict only double rockers from this
Non-Grashof Mechanism
.

 
2 2 2
1 1
2
10 6 (8 7)
cos cos 0.742 137.9
2(10)(6)
L

 
 
  
      
 
 



This method can also be used to find angular limits on link 4 when it is a rocker. In this case links 2 and
3 align.

 
2 2 2
1 1
4
10 7 (6 8)
cos cos 0.336 109.6
2(10)(7)
180 70.4
L

 
 
 
  
      
 
 
   

 


In this example, the allowable input and output angle ranges are:

2
137.9 137.9  
 

4
70.4 289.6 
 


This example is shown graphically in the ME 3011 NotesBook, in the Grashof’s Law section (2. Non-
Grashof double rocker, first inversion).


Caution

The figure on the previous page does not apply in all joint limit cases. For
Grashof
Mechanisms
with a rocker input link, one link 2 limit occurs when links 3 and 4 fold upon each other
and the other link 2 limit occurs when links 3 and 4 stretch out in a straight line. See Example 4 (and
Example 3 for a similar situation with the output link 4 limits).



23

Joint Limit Example 2
Given
1 2 3 4
10,4,8,7r r r r

  

L S P Q  
(
10 4 8 7

 
)

Since the S link is adjacent to the fixed link, we predict this
Grashof Mechanism
is a crank-rocker.
Therefore, there are no 
2
joint limits.

 
2 2 2
1 1
2
10 4 (8 7)
cos cos 1.3625
2(10)(4)
L

 
 
  
    
 
 


which is undefined, thus confirming there are no 
2
joint limits.


There are limits on link 4 since it is a rocker. For 
4min
, links 2 and 3 are stretched in a straight line
(their absolute angles are identical).

 
2 2 2
1 1
4min
10 7 (4 8)
cos cos 0.036 88.0
2(10)(7)
180 92.0

 
 
 
  
   
 
 
  

 



For 
4max
, links 2 and 3 are instead folded upon each other (their absolute angles are different by ).

 
2 2 2
1 1
4min
10 7 ( 4 8)
cos cos 0.95 18.2
2(10)(7)
180 161.8

 
 
 
   
   
 
 
  

 



In this example, the output angle range is

4
92.0 161.8 
 


and 
2
is not limited. This example is shown graphically in the ME 3011 NotesBook, in the Grashof’s
Law section (1a. Grashof crank-rocker).



24

Joint Limit Example 3
Given
1 2 3 4
11.18,3,8,7r r r r

   (in) and
1
10.3 



L S P Q  
(
11.18 3 8 7

 
)

This is the four-bar mechanism from Term Example 1 and it is a four-bar crank-rocker
Grashof
Mechanism
. There are no limits on 
2
since link 2 is a crank.

The 
4
limits are

4
120.1
L
 

(links 2 and 3 stretched in a line)

4
172.5
L
 

(links 2 and 3 folded upon each other in a line)


The output angle range is

4
120.1 172.5 
 


and 
2
is not limited. This example is NOT shown graphically in the ME 3011 NotesBook Grashof’s
Law section. However, these 
4
limits are clearly seen in the F.R.O.M. plot for angle 
4
in Term
Example 1 in the ME 3011 NotesBook.



25

Joint Limit Example 4
Given
1 2 3 4
10,8,4,7r r r r

  


L S P Q  
(
10 4 8 7

 
)

so we predict this
Grashof Mechanism
is a double-rocker (S opposite fixed link). The 
2
joint limits
are no longer symmetric about the ground link, as was the case in the
Non-Grashof Mechanism
double
rocker (Example 1). For 
2min
, links 3 and 4 are folded upon each other (their absolute angles are
identical).

 
2 2 2
1 1
2min
10 8 (7 4)
cos cos 0.969 14.4
2(10)(8)

 
 
  
   
 
 



For 
2max
, links 3 and 4 are instead stretched in a straight line (their absolute angles are different by  as
in Example 1).

 
2 2 2
1 1
2max
10 8 (7 4)
cos cos 0.269 74.4
2(10)(8)

 
 
  
   
 
 





2min
Diagram

2max
Diagram

0
1
2
3
4
5
6
7
8
9
10
0
1
2
3
4
5
6
7
8
X (m)
Y (m)
0
1
2
3
4
5
6
7
8
9
10
0
1
2
3
4
5
6
7
8
X (m)
Y (m)


26

This behavior reverses for the 
4
joint limits. For 
4min
, links 2 and 3 are stretched in a straight line
(their absolute angles are identical).

 
2 2 2
1 1
4min
10 7 (8 4)
cos cos 0.036 88.0
2(10)(7)
180 92.0

 
 
 
  
   
 
 
  

 


For 
4max
, links 2 and 3 are instead folded upon each other (their absolute angles are different by ).

 
2 2 2
1 1
4min
10 7 (8 4)
cos cos 0.95 18.2
2(10)(7)
180 161.8

 
 
 
  
   
 
 
  

 




4min
Diagram

4max
Diagram

0
1
2
3
4
5
6
7
8
9
10
0
1
2
3
4
5
6
7
8
X (m)
Y (m)
0
1
2
3
4
5
6
7
8
9
10
0
1
2
3
4
5
6
7
8
X (m)
Y (m)


27


In this plot we can see the minimum and maximum values we just calculated for links 2 and 4.

Note at
2min
14.4 

,
3
138.6 

and
3
221.4  

are the same angle.

Again, this example is NOT shown graphically in the ME 3011 NotesBook Grashof’s Law section.
However, a similar case with the same dimensions, in different order, is shown in the ME 3011
NotesBook (
1 2 3 4
7,10,4,8r r r r    , 1d. Grashof double rocker).


Grashof’s Law only predicts the rotatability of the input and output links; it says nothing about
the rotatability of the coupler link 3 – in this case, what is the rotatability of the coupler link? (In this
case the coupler link S rotates fully, proving that the relative motion is the same amongst all four-bar
mechanism inversions, though the absolute motion with respect to the possible 4 ground links is very
different.)


For more information, see:

R.L. Williams II and C.F. Reinholtz, 1987, “Mechanism Link Rotatability and Limit Position
Analysis Using Polynomial Discriminants”,
Journal of Mechanisms, Transmissions, and Automation
in Design
, Transactions of the ASME, 109(2): 178-182.

10
20
30
40
50
60
70
80
-250
-200
-150
-100
-50
0
50
100
150
200

2
(deg)

(deg)



3
1
st

3
2
nd

4
1
st

4
2
nd


28

2.1.2 Slider-Crank Mechanism Position Analysis

Step 6.

Solve for the unknowns – alternate solution

Here are the same slider-crank mechanism position analysis XY component equations, rearranged
to isolate the 
3
terms.

3 3 2 2
3 3 2 2
r c x r c
r s h r s


 


We can square and add to eliminate 
3
, similar to the four-bar mechanism solution approach.

2 2 2 2 2
3 3 2 2 2 2
2 2 2 2 2
3 3 2 2 2 2
2
2
r c x xr c r c
r s h hr s r s
  
  


2 2 2 2
3 2 2 2 2 2
2 2r x h r xr c hr s    


This quadratic equation in x has the following form:

2
0ax bx c  

2 2
2 2 2
2 3 2 2
1
2
2
a
b r c
c r r h hr s

 
   


There are two solutions for x, corresponding to the right and left branches.

2 2 2 2
1,2 2 2 3 2 2 2 2
2
x
r c r h r s hr s    


Then 
3
is found from a ratio of the Y to X equations.

1,2
3 2 2 1,2 2 2
atan2(,)h r s x r c


 



This alternate solution yields identical results as the earlier solution approach in the ME 3011
NotesBook for the right (
1
3 1
,
x

) and left (
2
3 2
,
x

) branches.



29

Slider-Crank Mechanism Snapshot and F.R.O.M. MATLAB m-files

No sample m-files are given in the ME 3011 NotesBook for the slider-crank mechanism since
you can readily adapt the snapshot and F.R.O.M. m-files given for the four-bar mechanism previously.

However, below we include a partial m-file to show how to draw the slider and fixed piston
walls for the slider-crank mechanism graphics, since this was not required for the four-bar mechanism.


Outside the loop:

Lp = put a number here; % length of piston (slider link)
Hp = put a number here; % height of piston
Xp = [-1 -1 1 1]*Lp/2;
Yp = [-1 1 1 -1]*Hp/2;

This establishes the rectangular corner coordinates for the slider link, centered at the origin of your
coordinate frame. It can be done once, outside the loop. Instead of typing numbers for
Lp
and
Hp
, I
scale them to a fraction of r
2
, for generality in different-sized slider-crank mechanisms. Note I only
included the four corner points – MATLAB
patch
(below) closes the rectangular figure, i.e. back to
the starting point.


Inside the loop
(right after the
plot
command where links 2 and 3 are drawn to the screen)

patch(Xp+x(i),Yp+h,'g'); % draw piston to screen


where
x(i)
is the variable horizontal slider displacement and
h
is the constant vertical offset. These
position parameters shift the piston coordinates from the origin to the correct location in each loop. You
can use any piston color you like (I show
green
here,
'g'
).

Further, to draw the horizontal lines representing the piston walls:

Outside the loop

Xpt = [-1000 1000]; % fixed piston walls
Ypt = [h+wall/2 h+wall/2];
Xpb = [-1000 1000];
Ypb = [h-wall/2 h-wall/2];

Inside the loop
(right after the
plot
command where links 2 and 3 are drawn to the screen)


line(Xpt,Ypt,'LineWidth',2); line(Xpb,Ypb,'LineWidth',2);

Set the piston wall width
wall
to allow a small clearance between the piston and the walls. Again, it
can be scaled to a small fraction of r
2
for generality. The
-1000
and
1000
coordinates used above are
to extend the piston wall lines off the screen to the left and to the right.



30

MATLAB subplot feature

In a slider-crank mechanism full-range-of-motion (F.R.O.M.) simulation you will need to plot
both 
3
and x vs. the independent variable 
2
. Since the units of 
3
(deg) and x (m) are dissimilar, they
may not fit clearly on the same plot. In this situation you should use a sub-plot arrangement.

Outside the F.R.O.M. loop you can do the subplot in this way:

subplot(211); % 2x1 arrangement of plots, first plot
plot(th2/DR,th3/DR);
subplot(212); % 2x1 arrangement of plots, second plot
plot(th2/DR,x);

Now, you can use the standard axis labels, linetypes, titles, axis limits, grid, etc., for each plot within a
subplot (repeat these formatting commands after each
plot
statement above to use similar formatting
for each). These options are not shown, for clarity.


The generalized usage of
subplot
is shown below.

subplot(mni); % m x n arrangement of plots, i
th
plot
plot( . . . );


As seen in the example syntax above, the integers need not be separated by spaces or commas.
However, I believe they may be so separated if you desire.




31

2.1.3 Inverted Slider-Crank Mechanism Position Analysis

This slider-crank mechanism inversion 2 is an inversion of the standard zero-offset slider-crank
mechanism where the sliding direction is no longer the ground link, but along the rotating link 4.
Ground link length r
1
and input link length r
2
are fixed; r
4
is a variable. The slider link 3 is attached to
the end of link 2 via an R joint and slides relative to link 4 via a P joint. This mechanism converts rotary
input to linear motion and rotary motion output. Practical applications include certain doors/windows
opening/damping mechanisms. The inverted slider-crank is also part of quick-return mechanisms.


Step 1.
Draw the
Kinematic Diagram





r
1
constant ground link length 
2
variable input angle
r
2
constant input link length 
4
variable output angle
r
4
variable output link length L
4
constant total output link length


Link 1 is the fixed ground link. Without loss of generality we may force the ground link to be
horizontal. If it is not so in the real world, merely rotate the entire inverted slider-crank mechanism so it
is horizontal. Both angles 
2
and 
4
are measured in a right-hand sense from the horizontal to the link.


Step 2.

State the Problem



Given
r
1
, 
1
= 0, r
2
; plus 1-dof position input 
2



Find
r
4
and 
4


2
1
4
3


32

Step 3.
Draw the
Vector Diagram
. Define all angles in a positive sense, measured with the right hand
from the right horizontal to the link vector (tail-to-head; your right-hand thumb is located at the vector
tail).



Step 4.
Derive the
Vector-Loop-Closure Equation
. Starting at one point, add vectors tail-to-head until
you reach a second point. Write the VLCE by starting and ending at the same points, but choosing a
different path.

2 1 4
r r r





Step 5.
Write the
XY Components
for the Vector-Loop-Closure Equation. Separate the one vector
equation into its two X and Y scalar components.

2 2 1 4 4
2 2 4 4
r c r r c
r s r s






Step 6.

Solve for the Unknowns
from the XY equations. There are two coupled nonlinear equations in
the two unknowns r
4
, 
4
. Unlike the standard slider-crank mechanism, there is no decoupling of X and
Y. However, unlike the four-bar mechanism, there is only one unknown angle so the solution is easier
than the four-bar mechanism. First rewrite the above XY equations to isolate the unknowns on one side.

4 4 2 2 1
4 4 2 2
r c r c r
r s r s





A ratio of the Y to X equations will cancel r
4
and solve for 
4
.

4 4 2 2
4 4 2 2 1
r s r s
r c r c r




4 2 2 2 2 1
atan2(,)r s r c r





Then square and add the XY equations to eliminate 
4
and solve for r
4
.

2 2
4 1 2 1 2 2
2r r r rr c  


2
1
4


33

Note the same r
4
formula results from the
cosine law
. Alternatively, the same r
4
can be solved from
either the X or Y equations after is 
4
known.

X)
2 2 1
4
4
r c r
r
c


Y)
2 2
4
4
r s
r
s



Both of these r
4
alternatives are valid; however, each is subject to a different artificial mathematical
singularity (
4
90  

and
4
0,180 

, respectively), so only the former square-root formula should be
used for r
4
, which has no artificial singularity. The X algorithmic singularity
4
90  

never occurs
unless
2 1
r r, which is to be avoided (see below), but the Y algorithmic singularity occurs twice per full
range of motion.

Technically there are two solution sets – the one above and
2 2
4 1 2 1 2 2
2r r r rr c  
,
4



.
However, the negative r
4
is not practical and so only the one solution set (branch) exists, unlike most
planar mechanisms with two or more branches.


Full-rotation condition

For the inverted slider-crank mechanism to rotate fully, the fixed length of link 4, L
4
, must be
greater than the maximum value of the variable r
4
.


Slider Limits

The slider reaches its minimum and maximum displacements when 
2
= 0 and , respectively.
Therefore, the slider limits are
1 2 4 1 2
r r r r r   . Thus, the fixed length L
4
must be greater than
1 2
r r

.
In addition we require
1 2
r r for full rotation.



34

Graphical Solution

The Inverted Slider-Crank mechanism position analysis may be solved graphically, by drawing
the mechanism, determining the mechanism closure, and measuring the unknowns. This is an excellent
method to validate your computer results at a given snapshot.



Draw the known ground link (points O
2
and O
4
separated by r
1
at the fixed angle 
1
= 0).


Draw the given input link length r
2
at the given angle 
2
(this defines point A).


Draw a line from O
4
to point A.


Measure the unknown values of r
4
and 
4
.



35

Inverted Slider-Crank Mechanism Position Analysis: Term Example 3
Given:
1
2
4
1
0.20
0.10
0.32
0
r
r
L






m

Snapshot Analysis (one input angle)
Given this mechanism and
2
70 

, calculate 
4
and r
4
.


4

deg)
r
4
(m)
150.5 0.191

This Term Example 3 position solution is demonstrated in the figure below.

Term Example 3 Position Snapshot
-0.1
-0.05
0
0.05
0.1
0.15
0.2
-0.1
-0.05
0
0.05
0.1
0.15
0.2
X
(
m
)
Y (m)


36

Full-Range-Of-Motion (F.R.O.M.) Analysis: Term Example 3
A more meaningful result from position analysis is to report the position analysis unknowns for
the entire range of mechanism motion. The subplots below gives r
4
(m) and 
4
(deg), for all
2
0 360 
 
, for Term Example 3.


Term Example 3

4
and r
4




4
varies symmetrically about
180

, being
180

at
2
0,180,360 

. r
4
varies like a negative cosine
function with minimum displacement
1 2
0.1r r

 at
2
0,360 

and maximum displacement
1 2
0.3r r


. Since r
1
is twice r
2
in this example, whenever
2
60,300 

, a perfect
30 60 90 
  
triangle is
formed; the relative angle between links 2 and 4 is
90

which corresponds to the max and min of
4
150,210 

, respectively. At these special points,
4
( 3 2)0.2 0.173r  
m.

There is another right triangle that shows up for
2
90



; in these cases
2 2
4
0.2 0.1 0.224
r   
m and
4
153.4,206.6 

, respectively. Check all of these special values in the
F.R.O.M. plot results.


0
50
100
150
200
250
300
350
150
160
170
180
190
200
210

4 (deg)
0
50
100
150
200
250
300
350
0.1
0.15
0.2
0.25
0.3

2
(
deg)
r4
(
m
)


37

2.1.4 Multi-Loop Mechanism Position Analysis

Thus far we have presented position analysis for the single-loop four-bar, slider-crank, and
inverted slider-crank mechanisms. The position analysis for mechanisms of more than one loop is
handled using the same general procedures developed for the single loop mechanisms. A good rule of
thumb is to look for four-bar (or slider-crank) parts of the multi-loop mechanism as we already know
how to solve the complete position analyses for these.

This section presents position analysis for the two-loop Stephenson I six-bar mechanism shown
below as an example multi-loop mechanism. This is one of the five possible six-bar mechanisms shown
in the on-line Mechanisms Atlas.



Stephenson I 6-Bar Mechanism

We immediately see that the bottom loop of the Stephenson I six-bar mechanism is identical to
our standard four-bar mechanism model. Since we number the links the same as in the four-bar, and if
we define the angles identically, the position analysis solution is identical to the four-bar presented
earlier. With the complete position analysis of the bottom loop thus solved, we see that points C and D
can be easily calculated. Then the solution for the top loop is essentially another four-bar solution:
graphically, the circle of radius r
5
about point C must intersect the circle of radius r
6
about point D to
form point E (yielding two possible intersections in general). The analytical solution is very similar to
the standard four-bar position solution, as we will show.

For multi-loop mechanisms, the number of solution branches for position analysis increases
compared to the single-loop mechanisms. Most single-loop mechanisms mathematically have two
solution branches. For multi-loop mechanisms composed of multiple single-loop mechanisms, the
number of solution branches is 2
n
, where n is the number of mechanism loops. For the two-loop
Stephenson I six-bar mechanism, the number of solution branches for the position analysis problem is 4,
two from the standard four-bar part, and two for each of these branches from the upper loop.


38

Now let us solve the position analysis problem for the two-loop Stephenson I six-bar mechanism
using the formal position analysis steps presented earlier. Assume link 2 is the input link.

Step 1.
Draw the