Inversions Of Four Bar or Quadratic Kinematic Chain
1. Kinematics
Kinematics studies the geometric properties of the motion of points without regard to their masses or to the forces acting on them. A set of points with the property that the distances between any two of them never varies is called a rigid body or rigid link. The position of a rigid body in space is defined by six dimensions, three translations and three rotations. A kinematic chain is a set of links connected by joints that constrain their relative movement. An open chain is a set of links (such as a common industrial robot) with one end attached to a rigid base . A closed chain may be attached to a rigid base in more than one place. A single loop closed chain attached at each end is commonly called a mechanism.
The state of a mechanism is the set of properties needed to completely determine the positions of all of its constituent parts. These properties are called independent state variables, and their count determines a mechanism's degrees of freedom. Constraints are limitations on the motion of a mechanism or of its constituent parts. A number of dependent variables may be required to determine the relative positions of a mechanism's parts, and they are derived from the independent variables and the external constraints. A determinate mechanism has the property that the number of dependent variables is equal to the number of external constraint conditions.
The links of a planar mechanism are constrained to move in a plane parallel to a base plane, usually by hinged joints whose axes lie perpendicular to the base plane. The axes of hinged joints of a spherical mechanism all intersect at a point. Joints of spatial mechanisms have no special relationship to a common point or
Kinematics studies the geometric properties of the motion of points without regard to their masses or to the forces acting on them. A set of points with the property that the distances between any two of them never varies is called a rigid body or rigid link. The position of a rigid body in space is defined by six dimensions, three translations and three rotations. A kinematic chain is a set of links connected by joints that constrain their relative movement. An open chain is a set of links (such as a common industrial robot) with one end attached to a rigid base . A closed chain may be attached to a rigid base in more than one place. A single loop closed chain attached at each end is commonly called a mechanism.
The state of a mechanism is the set of properties needed to completely determine the positions of all of its constituent parts. These properties are called independent state variables, and their count determines a mechanism's degrees of freedom. Constraints are limitations on the motion of a mechanism or of its constituent parts. A number of dependent variables may be required to determine the relative positions of a mechanism's parts, and they are derived from the independent variables and the external constraints. A determinate mechanism has the property that the number of dependent variables is equal to the number of external constraint conditions.
The links of a planar mechanism are constrained to move in a plane parallel to a base plane, usually by hinged joints whose axes lie perpendicular to the base plane. The axes of hinged joints of a spherical mechanism all intersect at a point. Joints of spatial mechanisms have no special relationship to a common point or
2. The Scene Graph
The scene graph is the emergent object-oriented hierarchical data structure for describing geometric relationships, appearance, and behavior in computer generated virtual reality worlds. It is an acyclic tree, meaning that each branch has a single attachment point, and therefore, it cannot form closed loops. The Java 3D API Specification [3] describes the construction of the scene graph tree , which uses BranchGroup nodes and TransformGroup nodes to connect the branches and uses Leaf Nodes to contain information such as geometric shapes, appearance, lighting, and behavior.
Throughout, this paper uses a particular example from classical mechanics to illustrate the general methods. The four bar linkage, a particular class of planar, determinate, single loop closed kinematic chains, has been the focus of study by mathematicians, philosophers, royalty and engineers for centuries, and, respecting tradition, this paper will employ it as the concrete example. The following describes how the scene graph can be used to describe its geometry and connectivity.
Figure 1 shows a common configuration of a four bar linkage. Rigid links AB, BC, CD, DA are connected by hinged joints (A, B, C, D); one of the links (DA) is considered to be fixed to a foundation, one link is considered to be a driver or input link (AB), the adjacent link is a connector or drag link (BC), and the last, the driven link or the output. (CD).
Figure 2 shows how a scene graph could be used to represent the geometric arrangement of the links of a four bar linkage. The Shape Leaf Nodes represent the geometries and visual properties of the individual links themselves, the Branch and Transform Group Nodes describe the structure of the tree that defines the geometric relationship between them, and the Behavior Leaf Node gives motivation to the input link AB.
The central failings of the bare scene graph are apparent from the figure. While the Behavior node can set the transformation for joint A by setting the independent variable angle_A, and the lengths of the rigid links ab, bc, and cd determine the translations, the rotations at joints B and C are unknown, and the requirement that the 'D' end of the link CD engage the joint D fixed on the base remains unexpressed on the tree's acyclic topology.
Figure 2 shows how a scene graph could be used to represent the geometric arrangement of the links of a four bar linkage. The Shape Leaf Nodes represent the geometries and visual properties of the individual links themselves, the Branch and Transform Group Nodes describe the structure of the tree that defines the geometric relationship between them, and the Behavior Leaf Node gives motivation to the input link AB.
The central failings of the bare scene graph are apparent from the figure. While the Behavior node can set the transformation for joint A by setting the independent variable angle_A, and the lengths of the rigid links ab, bc, and cd determine the translations, the rotations at joints B and C are unknown, and the requirement that the 'D' end of the link CD engage the joint D fixed on the base remains unexpressed on the tree's acyclic topology.
3.APPROACH
This section describes a three-pronged approach to using inverse kinematics for solving external constraints on an animated mechanism model in Java 3D™. The first sub-section describes the mathematical background, the solution sequence, and the organization of the scene graph model, the second describes the approach to creating a Constraint class to organize and expedite geometric calculations in support of the solution, and the third sub-section describes the standard way that simple Java 3D™ models are animated, the inherent problems, and an approach to modifications necessary to permit stable and efficient computation.
This section describes a three-pronged approach to using inverse kinematics for solving external constraints on an animated mechanism model in Java 3D™. The first sub-section describes the mathematical background, the solution sequence, and the organization of the scene graph model, the second describes the approach to creating a Constraint class to organize and expedite geometric calculations in support of the solution, and the third sub-section describes the standard way that simple Java 3D™ models are animated, the inherent problems, and an approach to modifications necessary to permit stable and efficient computation.
Solving External Constraints
Typically, constraints can be expressed in a number of equations or inequalities that describe the relationship among machine parts or between machine parts and the foundation. This paper considers a subset of constraints that can be expressed in equations whose terms are time-independent. The example has constraints that set displacements of a mechanism part equal to zero relative to a fixed foundation point. Further, the determinate mechanism discussed in this paper has an equal number of dependent variables that can be set to satisfy those equations. The mathematical problem then reduces to solving N nonlinear equations in N unknowns.
Fi (x1, x2, x3, … xN) = 0 i = 1…N (1)
where F is a function of x, the dependent variables. For very simple mechanisms, the equations can be solved from quadratic or trigonometric closed forms, but numerical marching techniques are preferable for mechanisms of any complexity.
Press et al. [2] describe the Newton-Raphson method, simplest of the numerical techniques for solving sets of simultaneous nonlinear equations. The method begins with an initial guess for the dependent variables (xj), measures the resulting values of the functions F, calculates and applies a change to the dependent variables and repeats to convergence.
In the general case, the equation set (1) can be particularly troublesome when it represents kinematic constraints, because it may have many, one, or no solutions. According to Press, there are no good methods to find global solutions to the set, and accordingly, the methods described here are applicable only to mechanisms for which there are known solutions and only to stable regions for those mechanisms.
The key to stability and rapid convergence is an initial guess not too far from the final result. The changes required to the dependent variables are estimated by estimating the local derivatives of Fi with respect to xj, then using them to compute the new xj required to drive Fi to zero. The derivatives Fi/xj are measured by incrementing each xj in turn and measuring the changes to F. The NN matrix Fi/xj is called the Jacobian, J. In vector form:
F (x + x) = F (x) + J x + (higher order terms) (2)
Setting F (x + x) = 0 to satisfy the constraint equations, and neglecting higher order terms
J x = -F (xold),
which is a set of N linear equations in N unknowns. It may be solved for x by one of several different methods, such as direct inversion of the Jacobian
xnew = xold + x
xnew = xold + J-1 (-F (xold)), (3)
and the steps are repeated until F (xold) are sufficiently close to 0. For a high fidelity simulation, this procedure is executed and the dependent variables are set prior to the rendering of each frame.
Typically, constraints can be expressed in a number of equations or inequalities that describe the relationship among machine parts or between machine parts and the foundation. This paper considers a subset of constraints that can be expressed in equations whose terms are time-independent. The example has constraints that set displacements of a mechanism part equal to zero relative to a fixed foundation point. Further, the determinate mechanism discussed in this paper has an equal number of dependent variables that can be set to satisfy those equations. The mathematical problem then reduces to solving N nonlinear equations in N unknowns.
Fi (x1, x2, x3, … xN) = 0 i = 1…N (1)
where F is a function of x, the dependent variables. For very simple mechanisms, the equations can be solved from quadratic or trigonometric closed forms, but numerical marching techniques are preferable for mechanisms of any complexity.
Press et al. [2] describe the Newton-Raphson method, simplest of the numerical techniques for solving sets of simultaneous nonlinear equations. The method begins with an initial guess for the dependent variables (xj), measures the resulting values of the functions F, calculates and applies a change to the dependent variables and repeats to convergence.
In the general case, the equation set (1) can be particularly troublesome when it represents kinematic constraints, because it may have many, one, or no solutions. According to Press, there are no good methods to find global solutions to the set, and accordingly, the methods described here are applicable only to mechanisms for which there are known solutions and only to stable regions for those mechanisms.
The key to stability and rapid convergence is an initial guess not too far from the final result. The changes required to the dependent variables are estimated by estimating the local derivatives of Fi with respect to xj, then using them to compute the new xj required to drive Fi to zero. The derivatives Fi/xj are measured by incrementing each xj in turn and measuring the changes to F. The NN matrix Fi/xj is called the Jacobian, J. In vector form:
F (x + x) = F (x) + J x + (higher order terms) (2)
Setting F (x + x) = 0 to satisfy the constraint equations, and neglecting higher order terms
J x = -F (xold),
which is a set of N linear equations in N unknowns. It may be solved for x by one of several different methods, such as direct inversion of the Jacobian
xnew = xold + x
xnew = xold + J-1 (-F (xold)), (3)
and the steps are repeated until F (xold) are sufficiently close to 0. For a high fidelity simulation, this procedure is executed and the dependent variables are set prior to the rendering of each frame.