This paper studies the problem of planar four-bar motion generation from the viewpoint of extraction of geometric constraints from a given set of planar displacements. Using the image space of planar displacements, we obtain a class of quadrics, called generalized- or G-manifolds, with eight linear and homogeneous coefficients as a unified representation for constraint manifolds of all four types of planar dyads, RR, PR, and PR, and PP. Given a set of image points that represent planar displacements, the problem of synthesizing a planar four-bar linkage is reduced to finding a pencil of G-manifolds that best fit the image points in the least squares sense. This least squares problem is solved using singular value decomposition (SVD). The linear coefficients associated with the smallest singular values are used to define a pencil of quadrics. Additional constraints on the linear coefficients are then imposed to obtain a planar four-bar linkage that best guides the coupler through the given displacements. The result is an efficient and linear algorithm that naturally extracts the geometric constraints of a motion and leads directly to the type and dimensions of a mechanism for motion generation.
In this paper, we present a task-driven approach to unified type and dimensional synthesis of planar four-bar linkage mechanisms. Planar linkages are the most common form of mechanisms found in mechanical systems and have been a subject of interest and research in machine design area for many decades. Some key texts that describe state of the art as well as established methods and theory in kinematic synthesis of machines are by McCarthy and Soh , Sandor and Erdman , Hunt , Hartenberg and Denavit , and Suh and Radcliffe . Despite having been a research topic alive for a long time, various proposed solutions to planar mechanism design for the approximate motion synthesis have been nonlinear in nature. In general, the algorithms proposed are computationally expensive and require dealing with the type and dimension synthesis separately. In this paper, we follow Wu et al.  and study the problem of planar motion approximation from the viewpoint of kinematic extraction of geometric constraints from a given set of planar displacements. Using a kinematic mapping of planar kinematics, we propose a general algebraic method for unified type and dimensional synthesis of planar four-bar linkages, which reveals the geometric constraints implicit in the given motion via a linear, two-step process. The method is fast, efficient, and provides type and dimensions of the mechanisms, which can execute that motion. This paper is an extension of our earlier work on dimensional synthesis of planar 4R linkages , wherein our focus was only on the motions that could be executed by RR dyads. The main contributions of this work are in (1) presenting a unified representation for the motion of all possible planar dyads, and (2) devising a simple linear method for naturally extracting the constraints hidden in a given motion and matching it with a four-bar motion without presumption of the type of a linkage. In addition, we also show via an example as to how the approach for four-bar linkage synthesis can be applied to six-bar linkages as well.
The earliest approach to the motion synthesis problem was dealt with by Burmester , who posited that a given four-bar linkage can go through at most five positions exactly (precision position synthesis). For a continuous motion or more than five positions, typically only an approximate motion synthesis can be performed. For this problem, Ravani and Roth [9,10] proposed a kinematic mapping approach. Blaschke  and Grunwald  had given rise to the concept of kinematic mapping almost a century ago, but it did not find many practical applications until the work of Ravani and Roth. A modern treatment of kinematic mapping can be found in the formative texts of Bottema and Roth  and McCarthy . In the kinematic mapping approach to synthesis, planar displacements in Cartesian space are mapped into points in a three-dimensional projective space (called image space of planar kinematics), while workspace constraints of a mechanism map into algebraic manifolds (called constraint manifold) in the same space. In this way, a single degree-of-freedom (DOF) motion of a planar mechanism is represented by the intersection curve of two algebraic surfaces in the image space. The problem of motion approximation is transformed into an algebraic curve fitting problem in the image space, where various methods in approximation theory may be applied. This includes the definition of the approximation error (called structural error) in the image space, formulation of a least squares problem and application of appropriate numerical methods to find values of the design variables for minimization of the error. Pursuant to Ravani and Roth's kinematic mapping approach for mechanism synthesis, further research has been done by Bodduluri and McCarthy , Bodduluri , Larochelle [17,18], Ge and Larochelle , Husty et al. , and more recently by Wu et al. , Purwar and Gupta , and Hayes et al. [23,24]. Schrcker et al.  applied the kinematic mapping approach to detect branch defect in the planar four-bar linkage synthesis—a result that can be used in this work as well.
In this paper, we are dealing with the use of the image space of planar kinematics for approximate task-driven simultaneous type and dimensional synthesis of planar four-bar linkages. While the constraint manifolds associated with planar four-bar linkages are algebraic, geometric (or, normal) distances have been used as default metric for least-squares fitting of these algebraic manifolds. Ravani and Roth  used normal distance to develop a least-squares algorithm for fitting the image curve of a four-bar motion. Their algorithm has two features: (1) fit the set of image points to two constraint manifolds simultaneously; and (2) use a tangent hyperplane approximation of constraint manifolds to obtain the normal distance. The resulting algorithm is highly nonlinear and requires many initial choices to converge to a reasonable solution. Larochelle [26,27] presented a different approach to the constraint manifold fitting problem that has the following two features: (1) fit the set of image points to a single constraint manifold; and (2) use a direct search method to obtain the normal distance directly. The restriction to a single manifold greatly reduces the difficulty in the fitting problem and only one random initialization is required to converge to a good solution for a RR dyad. Without using kinematic mapping, Yao and Angeles  used least-square algebraic fitting approach for dyad synthesis of planar linkages for approximate rigid body guidance. Their method is limited to RR type dyads only and involves solving bivariate cubic equations. More recently, Wu et al.  and Purwar and Gupta  have demonstrated a visual, computer graphics approach for multidegrees-of-freedom mechanism design that exploits the constraint manifold geometry and its apparent effect on the parameters of a mechanism to interactively perform kinematic synthesis. Hayes et al. [23,24] have presented preliminary results for combining type and dimensional synthesis of planar mechanisms for multipose rigid body guidance.
In contrast to the existing approach of trying to use the intersection curve of two algebraic manifolds for curve fitting, this paper shows that the problem of kinematic synthesis of planar four bar linkage can be solved by directly fitting a pencil of quadrics to a set of image points defining the image curve of a desired motion. In doing so, we use algebraic distances for least-squares fitting of quadric equations defining the constraint manifolds. This leads to a very simple and fast algorithm for linkage synthesis. The problem of fitting algebraic manifolds (or surfaces) has received considerable attention in computer aided design (CAD) and pattern recognition. A brief review of the work in this area has been presented in Ref. . All the existing work for quadric surface fitting in CAD, however, deals with surface data that lead to a unique best fit surface. In kinematics, however, a given motion is mapped to a curve in the image space. Thus, the problem of quadric surface fitting in the context of kinematic mapping is fundamentally different from CAD. Since only curve data are given, the result is not a unique quadric but a pencil of quadrics that share the same curve of intersection. In this paper, we study algebraic fitting of quadric surface from this perspective and develop a new and unified method for kinematic synthesis of four-bar linkages (including both revolute and sliding joints) based on linear least-squares fitting of a pencil of quadrics.
The organization of the paper is as follows: Section 2 reviews the concept of kinematic mapping and image space in so far as necessary for the development of this paper. Section 3 presents line and circle geometric constraints associated with planar dyad motions. Section 4 deals with constraint manifolds associated with planar dyads defined by a combination of revolute and prismatic joints and presents a unified representation of a generalized manifold in the form of a general quadric. Section 5 deals with the problem of algebraic fitting of a pencil of quadric surfaces to a set of image points for an image curve defining a desired motion. In Sec. 6, we present two examples of four-bar- and one six-bar-linkages.
Parameterizing a Planar Displacement
The transformations and are said to be dual to each other.
Equation (3) defines a mapping from the Cartesian space parameters ( to a three-dimensional (3D) projective quasi-elliptic space parameterized by the homogeneous coordinates of the point Z. This is called the kinematic mapping of planar displacements and the corresponding 3D projective space is called the Image Space of planar displacement, denoted as Σ. There is no real planar displacement that maps to the points on the real line given by . Thus, a planar displacement is represented by a point in Σ; a single degree-of-freedom (DOF) motion is represented by a curve; and a two DOF motion is represented by a surface in Σ. For details on kinematic mapping and the properties of the image space, see Refs.  and .
Constraining a Planar Displacement
In this paper, we consider only one- and two-DOF motions that are constrained by simple geometric constraints such as lines and circles. This includes 2DOF planar motions of a rigid body subject to one of the following four types of geometric constraints:
one of its points stays on a line: this can be realized by a planar PR dyad, where P denotes a prismatic joint; see Fig. 1(b)
one of its lines stays tangent to a given circle: this can be realized by a planar RP dyad; see Fig. 1(c)
one of its lines translates along another line: this can be realized by a planar PP dyad; see Fig. 1(d)
A planar motion subject to any two constraints listed above (including two of the same types) results in a 1DOF motion called planar four-bar motion. Planar four-bar linkages include planar 4R, slider–crank, inversions of slider–crank, as well as double-slider mechanisms; see Fig. 2 for some such linkages. In this section, we develop representations of circular and linear constraints that lead to a unified representation of planar dyad motions listed above.
Thus, Eq. (6) is a unified presentation for both a circle and a line in the homogeneous form.
As a planar RR dyad and a PR dyad define, respectively, a 2DOF motion of a rigid body for which one of its points stays on a circle and on a line, Eq. (6) also provides a unified representation of geometric constraints associated with such two dyads.
This yields two lines that are r-distance away from the center of the circle, . In addition, when r = 0, the two lines overlap into one that passes through . This is usually the case with a swinging-block type dyad.
where k is a constant that corresponds to the angle between the two lines. Equation (15) can be seen as a special case of Eq. (14). Thus, all the four planar dyads, RR, PR, RP, and PP, can be represented in terms of geometric constraints given by Eqs. (6) and (14). Furthermore, the left-hand side of Eqs. (6) and (14) is a linear combination of point and line coordinates, respectively.
A Unifying Representation for Planar Dyad Motions
In this section, we first derive algebraic form of a generalized quadric manifold that is common to 2DOF motions subject to the constraints containing linear and quadratic terms in Eqs. (6) and (14). We then show how this manifold can be used to develop a unified representation for constraint manifolds of planar RR, PR, RP, and PP dyads.
G-Manifolds for Planar Dyad Motions.
Let and denote the homogeneous coordinates of a point in the moving frame M and the fixed frame F, respectively; and let and denote the homogeneous coordinates of a line in M and F, respectively, where and the absolute value of l3 is the distance to the line from the origin of M. An algebraic form of the constraints of the dyads parameterized by image space coordinates can be obtained by substituting the fixed frame coordinates obtained from or in Eq. (6) or (14).
This defines a quadric surface in the image space with eight homogeneous coefficients qi (). In this paper, we call this quadric a generalized constraint manifold, or G-manifold in short. For this generalized-manifold to become the constraint manifold (or C-manifold), of a planar RR, PR, RP, or PP dyad, one must impose additional constraints on the coefficients qi.
C-Manifolds of RR and PR Dyads.
Also e is called the constraint fitting error, which can be used to show if a vector is qualified to represent a dyad.
Note that the coefficient q8 is not constrained by Eq. (21) and thus can be used as the homogenizing factor. Thus, there are a total of five independent coefficients, which is consistent with the number of parameters required to define an RR dyad. Only a subset of the G-manifold (17) whose coefficients satisfy Eq. (21) corresponds to the C-manifolds associated with a circular constraint of Eq. (6). In particular, when , we obtain the constraint manifold of a RR dyad whose projection onto the hyperplane is a hyperboloid of one sheet [7,9,14,21]. Figure 3 shows an example of such a hyperboloid. When , we obtain the constraint manifold of a PR dyad whose projection onto is a hyperbolic paraboloid (Fig. 4). Furthermore, it follows from Eq. (20) that when , one has and that both relations in Eq. (21) are automatically satisfied. This means that the constraint manifold of a PR dyad may be considered as a special case of that of a RR dyad.
C-Manifold of an RP Dyad.
As both l3 and r are lumped into q8, without any loss of generality, we may set r = 0, i.e., requiring that the line passes through the fixed point instead of being tangent to the circle C. The set of five nonzero coefficients are homogeneous but otherwise independent of each other. Furthermore, since , it follows that Eq. (21) is automatically satisfied. Projecting this manifold onto , one obtains a hyperbolic paraboloid, the same type of quadric as obtained in case of a PR dyad.
C-Manifold of PP Dyad.
Since q1 through q5 are all equal to zero, it follows that Eq. (21) is automatically satisfied. Projecting this manifold onto , one obtains two parallel planes in the form of . With only two equations and four unknowns to solve for, the inverse computation will result in infinite solutions. This is because the position of the line can be arbitrary for pure translation.
Inverse Computations of Dyad Parameters.
Sufficiency of the Unified Representation.
Thus, it is concluded that the unified representation is both necessary and sufficient for representing all four types of planar dyads, RR, PR, RP, and PP.
Unifying Representations for Planar Four-Bar Motions.
It is well known that a planar four-bar linkage can be defined by combining two planar dyads from the group of four dyads: RR, PR, RP, and PP. This results in planar 4R, slider–crank, inversions of slider–crank, as well as double slider mechanisms. In the past, the image curve of a planar four-bar linkage has been represented as intersection of two constraint manifolds directly associated with the two dyads. In this paper, however, we represent the image curve by a pencil of quadrics (17) that satisfy the conditions on the coefficients given by Eq. (21). Instead of fitting a pair of constraint manifolds directly, we first fit a pencil of G-manifolds (17) to the set of image points and then impose constraints (21) to identify two C-manifolds from the pencil of G-manifolds. This decoupling of constraints (21) from the curve fitting process not only removes the bottleneck in the fitting of the image curve of a four-bar linkage but also unifies the synthesis of all types of planar four-bar linkages. The choice of an R or P joint in a four-bar linkage is determined by the input positions only and is obtained after the fitting process for a pencil of G-manifolds.
Algebraic Fitting of a Pencil of G-Manifolds
Singular Value Decomposition.
where is an N × N orthonormal matrix, whose N columns, called the left singular vectors of , are the eigenvectors of ; is an rectangular diagonal matrix with eight non-negative real numbers on the diagonal, whose values are square roots of the eigenvalues of (or equivalently ); and is an 8 × 8 orthonormal matrix, whose eight columns, called the right singular vectors, are the eigenvectors of .
The over-constrained system of linear equations, , can be solved as a total least squares minimization problem with the constraint . The solution turns out to be the right singular vectors of corresponding to the least singular values. These vectors form an orthonormal set of basis vectors spanning the null space of , or in other words, solutions to . Therefore, the rank of matrix , and consequently its nullity ( rank), will determine the number of zero singular values.
When the translation components are rationalized as in above, we can use two-norm for least-square calculations. The choice of a characteristic length is discussed in detail in Ref. . Another approach is to approximate a planar displacement with a spherical displacement in order to obtain a distance metric that is approximately bi-invariant and unit-consistent. This approach has been discussed in Refs. [32–36], and more recently in Ref. . Purwar and Ge  have shown how a planar or spatial displacement can be approximated by a 3D- or four-dimensional-rotation using dual- and double-quaternion approach. Since this paper's focus is not on distance metric computation, for computational simplicity, we choose L = 1. Any other choice of L would leave our method and algorithm unchanged. This is the choice that Ravani and Roth  and in recent years Hayes et al. [23,24] have also made although without explicitly mentioning it.
where Kij are defined by components of the three eigenvectors, which can be obtained from using singular value decomposition of . As α, β, and γ are homogenous, we can set γ to be 1 in order to solve for α and β.
Solving Eq. (33) and substituting in Eq. (32) would lead to the homogeneous coordinates of dyads. For a set of n task positions, the aforementioned task analysis algorithm may yield up to four dyads from the solution of two quadratic equations in Eq. (21), two of which can be combined to form up to six four-bar linkages. Design parameters such as and can be obtained from inverse relationships given in Eq. (25).
In short, this approach leads to a unified algorithm for both exact synthesis (when ) and approximate synthesis (when n > 5) of planar dyads that can handle joint type and dimensional synthesis simultaneously.
Now, we present three examples that illustrate our approach. These examples do not presume the linkage type and determine the best types and dimensions from the given motion.
Example: Motion of an Aircraft Landing Gear.
The first step of the two-step algorithm is to extract geometric constraints of motion and fit a pencil of G-manifolds to it. This is done by creating matrix [A] using Eq. (28) and applying SVD to it. Since the nullity of [A] is 3, we pick three singular vectors associated with near-zero singular values. Singular values and singular vectors are presented in Tables 2 and 3. These singular vectors form a pencil of G-manifolds defined by Eq. (32). Table 3 also contains constraint fitting error for each of the singular vectors, clearly indicating that none of them correspond to any type of mechanical dyad.
Each real solution forms a C-manifold; see Table 4. It can be seen in this table that fitting error is of the order of ; hence, these manifolds are constraint manifolds of planar dyads. By examining the coefficients of vectors and , it can be easily shown that first vector corresponds to the constraint manifold of an RR dyad (), whereas the second vector corresponds to the constraint manifold of a PR dyad (). Hence, a slider crank mechanism is formed by joining these two dyads via coupler as shown in Fig. 5. The C-manifolds projected on hyperplane are shown in Fig. 6. The linkage parameters can be obtained from inverse kinematic equations (25). Parameters for dyad 1 are: , while for dyad 2, they are: , .
Example: ASME Mechanism Design Challenge.
McCarthy at the 2002 ASME IDETC  proposed a mechanism design challenge where the objective was to synthesize a four-bar linkage to follow a motion defined by 11 poses as shown in Fig. 7. In general, such a motion can be only approximated by a four-bar linkage.
Applying our algorithm, we obtain the singular values and singular vectors as listed in Tables 5 and 6, respectively. The singular vectors form the basis for a pencil of G-manifolds. Then, we impose constraints (33) to identify C-manifolds from the pencil of G-manifolds. Solving equations (33) leads to two real solutions of α and β given by
Each real solution forms a C-manifold. Table 7 contains vector coefficients corresponding to C-manifolds obtained. The projection of these C-manifolds on hyperplane is depicted in Fig. 8. It can be seen in Table 7 that fitting error is of the order of ; hence, these manifolds are constraint manifolds of planar dyads. After further evaluation as presented in Sec. 4.2, it can be easily concluded that each of the dyad corresponds to an RR dyad, which forms the four-bar mechanism depicted in Fig. 7. It is seen that the four-bar obtained in this case goes through each of the 11 poses exactly and that is because the 11 poses given were obtained from a known four-bar linkage. Using inverse kinematic equations (25), we obtain linkage parameters. The parameters for dyad 1 are: , and for dyad 2 they are: .
Example: Sit-to-Stand (STS) Motion.
Now, we present an example where a linkage that can execute a sit-to-stand (STS) motion for people suffering from neuromuscular disabilities is to be synthesized. It is desirable that the orientation of the upper body to which the coupler will be attached remains constant during the STS motion. We specify five task positions with the same orientation, i.e., but the coupler goes through five different locations as shown in Table 8.
Since all five task positions share the same orientation and the positions are not on a circle, it is known that no four-bar linkage could realize this motion. So, we try to find a six bar which can realize this motion. There are many ways in which different types of six bar mechanisms can be synthesized. Here we employ Soh and McCarthy's strategy of synthesizing six-bar linkages , which is to start with finding a 3R triad to realize the task positions (Fig. 9), and then form a 1DOF closed-chain six-bar linkage by adding additional links. The process of adding a new link requires the synthesis of dyads, which are obtained by repeated application of our algorithm. For a triad shown in Fig. 9, we pick the location of fixed pivot (F1) and third joint (L1) as well as the length of the two links (links 2 and 3) between them. The given task positions are located at L1. Although there are an infinite number of triads that can reach these task positions, we pick length for links 2 and 3 to be 10.5 and 14.92, respectively, such that the triad's workspace contains the given positions; see Ref.  for an image-based graphical approach to selecting planar triads. Next, we use inverse kinematics to obtain the locations of joint M1 and orientations of links 2 and 3 at various task positions. Table 9 contains orientations of link 2 corresponding to each task position.
Next, we form links 4 (L1L2) and 5 (L2M3) to create a two-DOF five-bar linkage; see Fig. 10. These link lengths can be obtained by applying our algorithm to the task positions relative to link 2. We calculate location and orientation of the task positions with respect to the rotating frame located at point F1 and attached to link 2 in its corresponding orientation from Table 9. Now, we synthesize dyads that will reach these relative task positions by using our algorithm. Tables 10 and 11 present singular values and singular vectors obtained from the algorithm. Next step of the process is to impose constraints (33) to identify C-manifolds from the pencil of G-manifolds. Solving these equations leads to four real solutions of α, β given by
At last, as shown in Fig. 11, link 6 (F2M2) is added between links 5 and 1 and links 2 and 5 are joined to close the linkage chain and reduce the system DOF from 2 to 1. Five positions of link 5 relative to ground (link 1) are computed, and again by applying our algorithm to these positions, we obtain four feasible dyads. Tables 13–15 present singular values, singular vectors, and dyads obtained in the synthesis process, respectively. Four solutions to Eq. (33) in the second step of synthesis are given by
It is obvious that one of the resulting dyad should be the existing coupler link 2. The other three feasible ground joints are: (20.7068, −2.92409), (−9.19081, 11.3414), and (16.9025, 8.74652). The corresponding lengths of link 6 are 30.2593, 10.4335, and 27.358. We select link 6 (F2M2) to have the ground joint with coordinates (−9.19081, 11.3414) and link length of 10.4335. Figure 11 shows the synthesized Watt I six-bar linkage at the first position. At this position, the coordinates of seven pivots of the six bar are presented in Table 16. Figure 12 shows the synthesized Watt I six-bar linkage passing through the remaining four specified task positions. This example has demonstrated that by repeated application of the same algorithm, planar six-bar linkages with both revolute and prismatic joints can also be synthesized.
In this paper, we presented a novel method for synthesizing planar motion using kinematic mapping. Instead of finding two special quadric constraint manifolds associated with a four-bar linkage with nonlinear (quadratic) coefficients, which makes the problem difficult to solve, we used a more general form of quadric such that its coefficients are linear. Furthermore, we seek to fit a given set of image points to a pencil of quadrics. This leads to a linear least squares problem that can be readily solved using SVD algorithm. After obtaining the pencil of quadrics that contains the constraint manifolds, we then impose the quadratic constraints associated with the constraint manifold to find the two special quadrics. The resulting algorithm for planar four-bar linkage synthesis is not only vastly more efficient but also unifies the treatment of dyads composed from revolute joints and sliding joints. We also showed that by applying the same algorithm twice, planar six-bar linkages can also be synthesized.
This work has been financially supported by National Science Foundation under a research grant to Stony Brook University (A. Purwar and Q. J. Ge, Grant No. CMMI-1563413). All findings and results presented in this paper are those of the authors and do not represent those of the funding agencies.