### Constraint Equations

```Dynamic Simulation:
Constraint Kinematics
Objective



The objective of this module is to show how constraint equations are
used to compute the position, velocity, and acceleration of the
generalized coordinates.
These equations are kinematic in nature because they do not consider
the forces required to cause the motion.
The kinematic and motion constraints developed in the previous
module (Module 3) for the piston-crank mechanism are used to
demonstrate the mathematics.
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Notation
Module 4 – Constraint Kinematics
Page 2
 The total set of constraint equations
needed to define a mechanism
includes both kinematic constraints
and drive constraints.
  k q  
 q, t    d
  0
 q, t 
 There are 15 generalized coordinates
and 15 nonlinear constraint
equations for the piston-crank
assembly used in Module 3.
 Since the piston-crank has a mobility
of one, only one of the fifteen
equations will be a motion constraint
that is an explicit function of time.
q
 q 
k

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
d
q, t 
is the set of generalized
coordinates
is the set of kinematic
constraint equations
is the set of motion
constraint equations
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Position
Module 4 – Constraint Kinematics
Page 3
 Solving the constraint equations
will yield the value of each
generalized coordinate at a
specific instance of time.
 The constraint equations are
non-linear and the NewtonRaphson method is used as the
solution method.
 The Newton-Raphson method is
iterative and converges when
the constraint equations are
satisfied.
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
Constraint Equations
  k q  
q, t    d
  0
 q, t 
Newton-Raphson Equations
  q, t  
qi 1  qi  


q


1
q, t 
where
  q, t  
 q 


is the Jacobian
matrix
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Velocity
Module 4 – Constraint Kinematics
Page 4
 The time derivative of the
constraint equations is used
to determine the velocities of
the generalized coordinates.
 Since the generalized
coordinates are a function of
time and the constraint
equations are a function of
the generalized coordinates
and time, the chain rule for
partial differentiation must
be used.
Constraint Equations
  k q  
q, t    d   0
 q, t 
Time Derivative
  q, t       q    

          0
 t   q   t   t 
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
Velocities
1
     
 q 


 
 


 t 
 q   t 
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Acceleration
Module 4 – Constraint Kinematics
Page 5
 The second time derivative of
the constraint equations is
used to determine the
accelerations of the
generalized coordinates.
 Since the generalized
coordinates are a function of
time and the constraint
equations are a function of
the generalized coordinates
and time, the chain rule for
partial differentiation must
be used.
1st Time Derivative of Constraint Equations
 q, t      q    

          0
 t   q   t   t 
2nd Time Derivative of Constraint Equations
  2  q, t          
  2    q 

      qq 2 
 
2

t

q

q

q

t

      

  t 
     2 q    2  
    2    2   0
 q   t   t 
Accelerations
        


   qq
1  
2
  q       q   q   


 2   

2
2
 t   q        q     
 2  qt   t    t 2 
  

 
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Summary of Equations
Module 4 – Constraint Kinematics
Page 6
Constraint Equations
  k q  
q, t    d   0
 q, t 
Velocities of Generalized Coordinates
1
     
 q 
      
 t 
 q   t 
Newton-Raphson Equations
Used to determine the position
(values of the generalized
coordinates) at an instant in time.
  q, t  
qi 1  qi  


q


1
q, t 
Accelerations of Generalized Coordinates
  q    
 2  
 t   q 
2
1
        
  2    q    2  
     qq 2 
     2 
  q   q   
 qt   t   t 
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Jacobian
Module 4 – Constraint Kinematics
Page 7
 The Jacobian and its inverse is
needed to determine the
position, velocity, and
acceleration of the generalized
coordinates.
 Each i,j (row,column) term in
the Jacobian matrix is given by
J i, j
 i

q j
ith
constraint equation
  
J    
 q 
Jacobian matrix
Error messages indicating that
the Jacobian is singular are
sometimes encountered when
running multi-body dynamic
programs.
This occurs when there is not a
physically realizable solution.
jth generalized coordinate
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Piston-Crank Constraint Equations
Module 4 – Constraint Kinematics
Page 8
 The fifteen constraint
equations developed
for the piston-crank
mechanism in Module
3 are given on the
right.
 Note that only the
motion constraint is
an explicit function of
time.
1) X cgA156.8  0
4) X cgE  0
2)Y cgA 0
5)YcgE  0
3)  0
6) cgE  0
A
cg
7) X cgC  41.3 cos  C  X cgD  43 sin  D  0
8)YcgC  41.3 sin  C  YcgD  43 cos  D  0
9) X cgB  28 cos  B  X cgC  102.6 sin  C  0
10)YcgB  28 sin  B  YcgC  102.6 cos  C  0
11) X cgD  X cgE  0
12)YcgD  YcgE  0
0  1 cos  A
13) 1 0 
 
A
1 0   sin 
T
0  1 cos 
14) 1 0 
 
A
1
0

  sin 
T
A
 sin  A 

cos  A 
T
A T
 sin  

cos  A 
B
A
 X CG
  X CG

 B    A   0
YCG  YCG 
cos  B

 sin  B
 sin  B  1
0
B   
cos   0
15) D  314  t  0
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Piston-Crank Jacobian
Module 4 – Constraint Kinematics
Page 9
The Jacobian of the constraint equations is given below. Although there are many
terms, there are a lot of zeros and the derivatives are easily computed.
 1
 0

 0

 0
 0

 0
 0

0
  i  
J       0
 q j   0

 0
 0

sin  A



 0

 0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
 41.3 sin  C
0
1
0
0
0
 43 cos  D
0
0
0
0
0
1
0
0
0
 28 sin  B
0
1
1
0
41.3 cos  C
 102.6 cos  C
0
0
 1  43 sin  D
0
0
0
0
0
1
28 cos  B
0
1
 102.6 sin 
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
cos  A
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
 cos 
0
0
A
0
0
0
0
A
B
A
 X cg  X cg cos  
 sin  A

A
B
A
 Ycg  Ycg sin  




 sin  A cos  B 


 sin 2  A

0
0
0
0
0
sin  A sin  B 


 cos  A cos  B 
0
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
www.autodesk.com/edcommunity
0
0
0 0 0

1 0 0
0 1 0

0 0 1
0 0 0

0 0 0
0 0 0

0 0 0

 1 0 0
0  1 0

0 0 0



0 0 0

0 0 0
0
0
0
0
Education Community
Section 4 – Dynamic Simulation
Velocities
Module 4 – Constraint Kinematics
Page 10
 The velocities of the generalized
coordinates are computed from
the equation
1
     
 q 
      
 t 
 q   t 
 Since the Jacobian is known, this
equation can be solved if the array
containing the time derivatives of
the constraint equations is found.
 Only the motion constraint, (15),
is an explicit function of time.
Motion Constraint
15) D  314 t  0
 0 
 0 


 0 


0

Required Array 
0 


0


 0 

   
  0 
 t  
0 


 0 


0


 0 


0


 0 


 314
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Acceleration
Module 4 – Constraint Kinematics
Page 11
The accelerations can be computed if each term is found.
  q    
 2  
 t   q 
2
Inverse of the
Jacobian
1
        
  2    q    2  
    q q 2 
     2 
  q   q   
 qt   t   t 
This term is
explained on
the next slide.
The time
derivative of
the Jacobian
is zero.
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
 0 
 0 


 0 


0


 0 


0


 0 

   

0
  

 t  
0 


 0 


0


 0 


0


 0 


 314

www.autodesk.com/edcommunity
0
0
 
0
 
0
0
 
0
0
2
     
 2   0
 t  0
 
0
 
0
0
 
0
0
 
0
Education Community
Section 4 – Dynamic Simulation
Acceleration Term
Module 4 – Constraint Kinematics
Page 12
This term is evaluated by breaking it down
into a series of operations that are easily
done on a computer.
       
   q q
 q   q   
Step 1) Multiply the Jacobian by the
velocities. This creates a
column array.
Step 2) Take the derivative of each row
with respect to each
generalized coordinate. This
operation is similar to finding
the Jacobian and results in a
matrix.
Step 3) Multiply the matrix by the
velocities. This results in a
column array.
  
 q q
 
     
  q
q   q  
       
   q q
 q   q   
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Redundant Constraints
Module 4 – Constraint Kinematics
Page 13



The Jacobian matrix is an important
quantity and enables the position,
velocity, and acceleration of the
generalized coordinates to be found.

The rank of a matrix is equal to the
number of independent rows or
columns.

Independent rows or columns can not
be written as a linear combination of
other rows or columns.

If rows or columns of the Jacobian are
not independent the Jacobian is
singular and the problem does not
have a solution.
Application of the methods contained
in this module requires that the
Jacobian have an inverse.
This requires that the determinant of
the Jacobian be non-zero or that the
rank be equal to the number of
generalized coordinates.
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Redundant Constraints: Detection
Module 4 – Constraint Kinematics
Page 14
The Dynamic Simulation environment
within Autodesk Inventor software
assembles the Jacobian and
determines its rank as each constraint
 The rank gives the number of
independent constraints.
 The difference between the number of
generalized coordinates and the
number of independent constraints is
equal to the degree of mobility.
 The difference between the number of
constraints and the number of
independent constraints is equal to
the degree of redundancy.

nq  number of generalized
coordinates
nc  number of constraints
nic  number of independent
constraints
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
Degree of Mobility
dom= nq – nic
Degree of Redundancy
dor = nc-nic
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Redundant Constraints: Reaction Forces
Module 4 – Constraint Kinematics
Page 15





A redundant constraint occurs when the
motion associated with a DOF is enforced
by too many constraint specifications.
One or more of the constraint
specifications can be removed without
affecting the mobility of the system.
The joint reactions can not be
independently determined when
redundant constraints are present.
Although solutions can be obtained they
are based on assumptions by the program
as to which constraints to use.
Different assumptions will yield different
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
Joints having friction are
particularly effected by
redundant constraints.
Friction forces are based on
the joint normal forces.
Therefore, the friction forces
are incorrect if the joint
normal forces are incorrect
due to redundant
constraints.
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Redundant Constraint: Example
Module 4 – Constraint Kinematics
Page 16





A simple four bar mechanism will have
redundant constraints if revolute
joints are used at all joints.
The ground link shown in the figure is
fixed.
The revolute joint at 1 prevents the
axis and moving normal to the joint
plane.
The revolute joint at 2 prevents the
coupler from rotating about its long
axis and moving normal to the joint
plane.
The revolute joint at 4 prevents the
rocker from rotating about its long axis
and moving normal to the joint plane.
3
Coupler
Rocker
2
Drive
1
Ground
4
A revolute joint at 3 is redundant
because neither the rocker or
coupler can rotate about their long
axis or move normal to the joint
plane due to the other revolute
joints. These degrees of freedom
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Redundant Constraints: Example
Module 4 – Constraint Kinematics
Page 17

A point-line joint must be used at joint 3.

A point-line joint restricts a point (the
center point of the hole at joint 3 on the
coupler) to remain on a line (the
centerline of the hole at joint 3 on the
rocker).


Redundant joints can be confusing and a
detailed analysis of what each joint is
doing is required to figure out how to
remove them.
Point - Line
3
Coupler
Revolute
2
Rocker
Drive
1
Ground
Revolute
4
Revolute
An example of how to remove redundant
constraints is provided in the next
module: Module 5.
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
that content has been modified from the original, and must attribute source content to Autodesk.
www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Module Summary
Module 4 – Constraint Kinematics
Page 18





This module showed how the constraint equations can be used to
find the position, velocity, and acceleration of the generalized
coordinates.
Kinematic relationships were used during the derivation and no
mention of the forces required to impose the motion constraints was
The constraint equations for the piston-crank introduced in the
previous module (Module 3) were used to demonstrate the
mathematical steps.
The Newton-Raphson method is generally used to solve the
constraint equations.
The Jacobian is a key component of the overall solution process and
the rank of the Jacobian is used to detect redundant constraints.