Journal cover Journal topic
Mechanical Sciences An open-access journal for theoretical and applied mechanics
Journal topic
Mech. Sci., 10, 309-320, 2019
https://doi.org/10.5194/ms-10-309-2019
Mech. Sci., 10, 309-320, 2019
https://doi.org/10.5194/ms-10-309-2019

Research article 25 Jun 2019

Research article | 25 Jun 2019

# Computer-aided synthesis of spherical and planar 4R linkages for four specified orientations

Computer-aided synthesis of spherical and planar 4R linkages
Guangming Wang1, Hao Zhang1, Xiaoyu Li1, Jiabo Wang2, Xiaohui Zhang1, and Guoqiang Fan1 Guangming Wang et al.
• 1College of Mechanical and Electronic Engineering, Shandong Agricultural University, Tai'an, China
• 2College of Engineering, Nanjing Agricultural University, Nanjing, China
Abstract

According to the burmester theory, an infinite number of spherical or planar 4R linkages for a specific four-orientation task can be synthesized, but most of the linkage solutions calculated by this method are invalid because of motion defect, poor performance and others. In order to improve the synthesis efficiency, a program package based on Matlab is developed to find a satisfied linkage solution automatically and quickly. Firstly, the calculation on circle points and the center points based on the burmester theory in spherical problems is introduced. Secondly, the calculation methods of linkage defect discrimination, linkage type classification, linkage performance evaluation and solutions visualization based on the theory of spherical trigonometry are presented respectively. Thirdly, the synthesis calculation of program package is extended to the planar 4R linkage based on the theory of planar analytic geometry. Finally, the examples of the spherical synthesis problem and the planar synthesis problem based on solutions map are introduced to test the program package, the result proves this program package is effective and flexible.

1 Introduction

2 Principle of the computer-aided linkage synthesis

The working principle of the program package based on Matlab is shown in Fig. 1. The first step of linkage synthesis is to input design tasks, i.e. four guiding orientations on sphere or plane. The second step of linkage synthesis is to generate the center points and circle points. Based on the four given orientations, a spherical or planar 4R linkage consisting of poles and image poles is obtained. According to Burmester theory, the center points and the circle points can be obtained by kinematics analysis of the 4R linkage. The third step of linkage synthesis is to calculate the attributes of all candidate solutions. Number the center points from 1 to N in the order in which it is generated. For any center point i(iN), a candidate linkage solution can be formed by combining any point of the other (N−1) center points. On the basis of it, $N×\left(N-\mathrm{1}\right)$ groups of linkage solutions can be formed. For each linkage solution formed by the center point i and the circle point $j\left(j\le N,i\ne j\right)$, the linkage type, the motion defect type and the transmission performance are calculated in turn, and the calculation results are written into the data structure of the linkage solution. After above calculation, the set of candidate solutions is built. The last step of linkage synthesis is to select and analyze linkage solutions. All the candidate linkage solutions are mapped to the solutions map. Any point on the solutions map represents a linkage solution. Its color represents the linkage type and its height represents the level of transmission performance. In the solutions map, all defect solutions are hidden, which improves the efficiency of linkage synthesis. When the user uses the mouse to select a point on the solutions map, the program automatically calculates and displays the corresponding 4R linkage and its coupler curve. Users can watch the animation demonstration of the 4R linkage, or make further analysis of it.

Figure 1The flow chart of the linkage synthesis calculation.

Specially, the synthesis on spherical 4R linkage and planar 4R linkage are both supported by this program package. Considered the calculation on spherical 4R linkage is more complex than that on planar 4R linkage, the principle of the synthesis calculation on spherical problem is mainly presented below, and the planar problem is introduced as an extension of the program package.

3 Generation of the center and circle points

Based on burmester theory for spherical problems, the circle points are calculated by kinematic analysis of 4R linkage constructed by image poles. The theory is explained by Shirazi (2005), as shown in Fig. 2. When the driving link of 4R linkage constructed by poles (which is denoted by Pij) and image poles (which is denoted by P${}_{ij}^{\mathrm{1}}$) rotates the angle ω, the 4R linkage moves from the orientation P12 P13 P${}_{\mathrm{34}}^{\mathrm{1}}$ P${}_{\mathrm{24}}^{\mathrm{1}}$ to P12 P13 P${}_{\mathrm{34}}^{{\mathrm{1}}^{\prime }}$ P${}_{\mathrm{24}}^{{\mathrm{1}}^{\prime }}$. The circle point C1 is determined by the intersection of sphere and two planes PM and PN, the plane PM is defined by the center point of sphere (which is denoted by point O) and normal vector P${}_{\mathrm{24}}^{\mathrm{1}}$ P${}_{\mathrm{24}}^{{\mathrm{1}}^{\prime }}$, the point PN is defined by the center point of sphere and normal vector P${}_{\mathrm{34}}^{\mathrm{1}}$ P${}_{\mathrm{34}}^{{\mathrm{1}}^{\prime }}$.

For each circle point C1, the center point C0 is obtained as following steps. Firstly, define a point P123 as the reflection point of C1 relative to the plane P${}_{{\mathrm{OP}}_{\mathrm{12}}{\mathrm{P}}_{\mathrm{13}}}$. The plane P${}_{{\mathrm{OP}}_{\mathrm{12}}{\mathrm{P}}_{\mathrm{13}}}$ is defined by the center point of sphere, the pole P12 and P13. And define the point P124 as the reflection point of C1 relative to the plane P${}_{{\mathrm{OP}}_{\mathrm{12}}{\mathrm{P}}_{\mathrm{14}}}$, the plane P${}_{{\mathrm{OP}}_{\mathrm{12}}{\mathrm{P}}_{\mathrm{14}}}$ is defined by the center point of sphere, the pole P12 and P14. Relative to the plane P${}_{{\mathrm{OP}}_{\mathrm{12}}{\mathrm{P}}_{\mathrm{23}}}$, the circle point at the second specified orientation C2 is the reflection point of P123. P${}_{{\mathrm{OP}}_{\mathrm{12}}{\mathrm{P}}_{\mathrm{23}}}$ is defined by the center point of sphere, the pole P12 and P23. Relative to the plane P${}_{{\mathrm{OP}}_{\mathrm{13}}{\mathrm{P}}_{\mathrm{23}}}$, the circle point at the third specified orientation C3 is the reflection point of P123. P${}_{{\mathrm{OP}}_{\mathrm{13}}{\mathrm{P}}_{\mathrm{23}}}$ is defined by the center point of sphere, the pole P13 and P23. Relative to the plane P${}_{{\mathrm{OP}}_{\mathrm{14}}{\mathrm{P}}_{\mathrm{24}}}$, the circle point at the fourth specified orientation C4 is the reflection point of P124. P${}_{{\mathrm{OP}}_{\mathrm{14}}{\mathrm{P}}_{\mathrm{24}}}$ is defined by the center point of sphere, the pole P14 and P24. Then, the center point C0 is determined by the intersection of the sphere and any two perpendicular bisector planes of C1C2, C1C3 and C1C4. With the rotation of the driving link of 4R linkage P12 P13 P${}_{\mathrm{34}}^{\mathrm{1}}$ P${}_{\mathrm{24}}^{\mathrm{1}}$, a series of circle points or center points are generated. Note that two groups of center points and circle points are obtained for each new orientation of linkage P12 P13 P${}_{\mathrm{34}}^{\mathrm{1}}$ P${}_{\mathrm{24}}^{\mathrm{1}}$, and they are both valid and symmetrical for the center point of sphere.

In order to realize the calculation and visualization of linkage synthesis mentioned above, a series of functions on geometric calculation are defined in this program package, such as the calculation functions on rotation, mirror, intersection.

Figure 2Principle of the spherical 4R linkage synthesis (reproduced from Shirazi, 2007).

4 Calculation and analysis of the linkage solution

## 4.1 Circuit defect discrimination

If the driving link of spherical 4R linkage rotates partially, there will be a circuit defect when driving link of given four coupler orientations located at different moving intervals. In order to discriminate this motion defect, the limited angles of driving link should be calculated firstly. Figure 3 shows a configuration of spherical triangle which is changed from spherical 4R linkage ABCD(P), where P is the guiding point on the coupler link BC; P1–P4 are the given four guiding orientations; αγ and θ1θ4 represent the length and roll angle of each link of spherical linkage respectively; δ represents the angle between the link BC and BP. The point coordinates of sphere are defined by longitude θ and latitude φ, for example, the coordinates of the point A can be expressed as (θA, φA).

Figure 3Spherical 4R linkage located at the limited orientations.

For the configuration of spherical triangle A(BC)D, define $a=\mathit{\eta }+\mathit{\beta }$, b=γ, c=α and $p=\left(a+b+c\right)/\mathrm{2}$, the limited angles of driving link with θ4=0 is calculated by the half-angle formula

$\begin{array}{}\text{(1)}& \left\{\begin{array}{l}\mathrm{sin}\frac{\mathrm{\angle }A}{\mathrm{2}}=\sqrt{\frac{\mathrm{sin}\left(p-b\right)\mathrm{sin}\left(p-c\right)}{\mathrm{sin}b\mathrm{sin}c}}\\ \mathrm{cos}\frac{\mathrm{\angle }A}{\mathrm{2}}=\sqrt{\frac{\mathrm{sin}p\mathrm{sin}\left(p-a\right)}{\mathrm{sin}b\mathrm{sin}c}}\end{array}\right\\end{array}$

$\begin{array}{}\text{(2)}& \left\{\begin{array}{l}\mathrm{sin}{\mathit{\theta }}_{\mathrm{4}}=\frac{\mathrm{cos}{\mathit{\varphi }}_{\mathrm{D}}\mathrm{sin}\left({\mathit{\theta }}_{\mathrm{A}}-{\mathit{\theta }}_{\mathrm{D}}\right)}{\mathrm{sin}\mathit{\gamma }}\\ \mathrm{cos}{\mathit{\theta }}_{\mathrm{4}}=\frac{\mathrm{sin}{\mathit{\varphi }}_{\mathrm{D}}-\mathrm{sin}{\mathit{\varphi }}_{\mathrm{A}}\mathrm{cos}\mathit{\gamma }}{\mathrm{cos}{\mathit{\varphi }}_{\mathrm{A}}\mathrm{sin}\mathit{\gamma }}\end{array}\right\\end{array}$

Then, the limited angles of driving link which is denoted by ${\mathit{\theta }}_{\mathrm{1}}^{+}$ and ${\mathit{\theta }}_{\mathrm{1}}^{-}$ can be calculated as

$\begin{array}{}\text{(3)}& \left\{\begin{array}{ll}{\mathit{\theta }}_{\mathrm{1}}^{+}& =\mathrm{2}\mathrm{arctan}\mathrm{2}\left(\mathrm{sin}\frac{\mathrm{\angle }A}{\mathrm{2}},\mathrm{cos}\frac{\mathrm{\angle }A}{\mathrm{2}}\right)\\ & +\mathrm{arctan}\mathrm{2}\left(\mathrm{sin}{\mathit{\theta }}_{\mathrm{4}},\mathrm{cos}{\mathit{\theta }}_{\mathrm{4}}\right)\\ {\mathit{\theta }}_{\mathrm{1}}^{-}& =-\mathrm{2}\mathrm{arctan}\mathrm{2}\left(\mathrm{sin}\frac{\mathrm{\angle }A}{\mathrm{2}},\mathrm{cos}\frac{\mathrm{\angle }A}{\mathrm{2}}\right)\\ & +\mathrm{arctan}\mathrm{2}\left(\mathrm{sin}{\mathit{\theta }}_{\mathrm{4}},\mathrm{cos}{\mathit{\theta }}_{\mathrm{4}}\right)\end{array}\right\\end{array}$

If there is no real root in Eq. (1), the calculation will be invalid, and the set of the limited angles of the driving link (which is denoted by ${\mathit{\theta }}_{\mathrm{11}}^{\ast }$) will be empty, that is ${\mathit{\theta }}_{\mathrm{11}}^{\ast }=\left[\phantom{\rule{0.125em}{0ex}}\right]$. If not, ${\mathit{\theta }}_{\mathrm{11}}^{\ast }=\left[{\mathit{\theta }}_{\mathrm{1}}^{+},{\mathit{\theta }}_{\mathrm{1}}^{-}\right]$.

Similarly, for the configuration of spherical triangle A(BC)D, define $a=|\mathit{\eta }-\mathit{\beta }|$, b=γ, c=α and $p=\left(a+b+c\right)/\mathrm{2}$. If there is no real root in Eq. (1), the calculation will be invalid, and the set of the limited angles of the driving link (which is denoted by ${\mathit{\theta }}_{\mathrm{12}}^{\ast }$) will be empty, that is ${\mathit{\theta }}_{\mathrm{12}}^{\ast }=\left[\phantom{\rule{0.125em}{0ex}}\right]$. If not, ${\mathit{\theta }}_{\mathrm{12}}^{\ast }=\left[{\mathit{\theta }}_{\mathrm{1}}^{+},{\mathit{\theta }}_{\mathrm{1}}^{-}\right]$.

The final set of the limited angles of driving link denoted by ${\mathit{\theta }}_{\mathrm{1}}^{\ast }$, consider ${\mathit{\theta }}_{\mathrm{1}}^{\ast }={\mathit{\theta }}_{\mathrm{11}}^{\ast }\cup {\mathit{\theta }}_{\mathrm{12}}^{\ast }$. Obviously, the size of ${\mathit{\theta }}_{\mathrm{1}}^{\ast }$ which is denoted by ${N}_{\mathrm{1}}^{\ast }$ is only 0, 2 or 4. Due to the driving link can't move between two adjacent moving intervals, the circuit defect can only be checked when ${N}_{\mathrm{1}}^{\ast }=\mathrm{4}$. In this case, if all input angles of the driving link are corresponding to the specified coupler orientations located at the same moving interval, the linkage solution will be valid. If not, there will be a circuit defect in the motion of spherical 4R linkage. Specially, the input angle of driving link is expressed as

$\begin{array}{}\text{(4)}& \left\{\begin{array}{l}\mathrm{sin}{\mathit{\theta }}_{\mathrm{1}}=\frac{\mathrm{cos}{\mathit{\varphi }}_{\mathrm{B}}\mathrm{sin}\left({\mathit{\theta }}_{\mathrm{A}}-{\mathit{\theta }}_{\mathrm{B}}\right)}{\mathrm{sin}\mathit{\alpha }}\\ \mathrm{cos}{\mathit{\theta }}_{\mathrm{1}}=\frac{\mathrm{sin}{\mathit{\varphi }}_{\mathrm{B}}-\mathrm{sin}{\mathit{\varphi }}_{\mathrm{A}}\mathrm{cos}\mathit{\alpha }}{\mathrm{cos}{\mathit{\varphi }}_{\mathrm{A}}\mathrm{sin}\mathit{\alpha }}\end{array}\right\\end{array}$

## 4.2 Branch defect discrimination

Figure 4 shows two assembly driven link configurations of spherical 4R linkage ABCD and ABCD. Due to the linkage is difficult to move from one branch to other without jamming, a branch defect will appear once the driven link in given four coupler orientations locates at different assembly configurations. Actually, the branch of linkage is determined by the solution of motion equation of driven link.

According to the coordinate of point A(θA,φA), the length of AB (that is α) and the roll angle of AB (that is θ1), the coordinate of point B(θB,φB) is expressed as

$\begin{array}{}\text{(5)}& \left\{\begin{array}{l}\mathrm{sin}{\mathit{\varphi }}_{\mathrm{B}}=\mathrm{cos}\mathit{\alpha }\mathrm{sin}{\mathit{\varphi }}_{\mathrm{A}}+\mathrm{sin}\mathit{\alpha }\mathrm{cos}{\mathit{\theta }}_{\mathrm{1}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{A}}\\ \mathrm{sin}{\mathit{\theta }}_{\mathrm{B}}=\frac{\begin{array}{c}-\mathrm{sin}\mathit{\alpha }\mathrm{sin}{\mathit{\theta }}_{\mathrm{1}}\mathrm{cos}{\mathit{\theta }}_{\mathrm{A}}+\mathrm{cos}\mathit{\alpha }\mathrm{sin}{\mathit{\theta }}_{\mathrm{A}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{A}}\\ -\mathrm{sin}\mathit{\alpha }\mathrm{cos}{\mathit{\theta }}_{\mathrm{1}}\mathrm{sin}{\mathit{\theta }}_{\mathrm{A}}\mathrm{sin}{\mathit{\varphi }}_{\mathrm{A}}\end{array}}{\mathrm{cos}{\mathit{\varphi }}_{\mathrm{B}}}\\ \mathrm{cos}{\mathit{\theta }}_{\mathrm{B}}=\frac{\begin{array}{c}\mathrm{sin}\mathit{\alpha }\mathrm{sin}{\mathit{\theta }}_{\mathrm{1}}\mathrm{sin}{\mathit{\theta }}_{\mathrm{A}}+\mathrm{cos}\mathit{\alpha }\mathrm{cos}{\mathit{\theta }}_{\mathrm{A}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{A}}\\ -\mathrm{sin}\mathit{\alpha }\mathrm{cos}{\mathit{\theta }}_{\mathrm{1}}\mathrm{cos}{\mathit{\theta }}_{\mathrm{A}}\mathrm{sin}{\mathit{\varphi }}_{\mathrm{A}}\end{array}}{\mathrm{cos}{\mathit{\varphi }}_{\mathrm{B}}}\end{array}\right\\end{array}$

Similarly, the coordinate of point C(θC,φC) can be expressed as

$\begin{array}{}\text{(6)}& \left\{\begin{array}{l}\mathrm{sin}{\mathit{\varphi }}_{\mathrm{C}}=\mathrm{cos}\mathit{\beta }\mathrm{sin}{\mathit{\varphi }}_{\mathrm{D}}+\mathrm{sin}\mathit{\beta }\mathrm{cos}{\mathit{\theta }}_{\mathrm{3}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{D}}\\ \mathrm{sin}{\mathit{\theta }}_{\mathrm{C}}=\frac{\begin{array}{c}-\mathrm{sin}\mathit{\beta }\mathrm{sin}{\mathit{\theta }}_{\mathrm{3}}\mathrm{cos}{\mathit{\theta }}_{\mathrm{D}}+\mathrm{cos}\mathit{\beta }\mathrm{sin}{\mathit{\theta }}_{\mathrm{D}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{D}}\\ -\mathrm{sin}\mathit{\beta }\mathrm{cos}{\mathit{\theta }}_{\mathrm{3}}\mathrm{sin}{\mathit{\theta }}_{\mathrm{D}}\mathrm{sin}{\mathit{\varphi }}_{\mathrm{D}}\end{array}}{\mathrm{cos}{\mathit{\varphi }}_{\mathrm{C}}}\\ \mathrm{cos}{\mathit{\theta }}_{\mathrm{C}}=\frac{\begin{array}{c}\mathrm{sin}\mathit{\beta }\mathrm{sin}{\mathit{\theta }}_{\mathrm{3}}\mathrm{sin}{\mathit{\theta }}_{\mathrm{D}}+\mathrm{cos}\mathit{\beta }\mathrm{cos}{\mathit{\theta }}_{\mathrm{D}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{D}}\\ -\mathrm{sin}\mathit{\beta }\mathrm{cos}{\mathit{\theta }}_{\mathrm{3}}\mathrm{cos}{\mathit{\theta }}_{\mathrm{D}}\mathrm{sin}{\mathit{\varphi }}_{\mathrm{D}}\end{array}}{\mathrm{cos}{\mathit{\varphi }}_{\mathrm{C}}}\end{array}\right\\end{array}$

The relationship between point B and C is determined by the length of link BC (that is η), that is

$\begin{array}{}\text{(7)}& \mathrm{cos}\mathit{\eta }=\mathrm{sin}{\mathit{\varphi }}_{\mathrm{B}}\mathrm{sin}{\mathit{\varphi }}_{\mathrm{C}}+\mathrm{cos}{\mathit{\varphi }}_{\mathrm{B}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{C}}\mathrm{cos}\left({\mathit{\theta }}_{\mathrm{B}}-{\mathit{\theta }}_{\mathrm{C}}\right)\end{array}$

Substitute the Eqs. (5) and (6) into Eq. (7) and obtain following equation, that is

$\begin{array}{}\text{(8)}& {\mathit{\tau }}_{\mathrm{1}}\mathrm{sin}{\mathit{\theta }}_{\mathrm{3}}\left({\mathit{\theta }}_{\mathrm{1}}\right)+{\mathit{\tau }}_{\mathrm{2}}\mathrm{cos}{\mathit{\theta }}_{\mathrm{3}}\left({\mathit{\theta }}_{\mathrm{1}}\right)+{\mathit{\tau }}_{\mathrm{3}}=\mathrm{0}\end{array}$

Where

$\begin{array}{}\text{(9)}& \left\{\begin{array}{ll}{\mathit{\tau }}_{\mathrm{1}}& ={\mathit{\lambda }}_{\mathrm{1}}\mathrm{sin}\mathit{\beta }\mathrm{sin}{\mathit{\theta }}_{\mathrm{D}}-{\mathit{\lambda }}_{\mathrm{2}}\mathrm{sin}\mathit{\beta }\mathrm{cos}{\mathit{\theta }}_{\mathrm{D}}\\ {\mathit{\tau }}_{\mathrm{2}}& =-{\mathit{\lambda }}_{\mathrm{1}}\mathrm{sin}\mathit{\beta }\mathrm{cos}{\mathit{\theta }}_{\mathrm{D}}\mathrm{sin}{\mathit{\varphi }}_{\mathrm{D}}-{\mathit{\lambda }}_{\mathrm{2}}\mathrm{sin}\mathit{\beta }\mathrm{sin}{\mathit{\theta }}_{\mathrm{D}}\mathrm{sin}{\mathit{\varphi }}_{\mathrm{D}}\\ & +{\mathit{\lambda }}_{\mathrm{3}}\mathrm{sin}\mathit{\beta }\mathrm{cos}{\mathit{\varphi }}_{\mathrm{D}}\\ {\mathit{\tau }}_{\mathrm{3}}& ={\mathit{\lambda }}_{\mathrm{1}}\mathrm{cos}\mathit{\beta }\mathrm{cos}{\mathit{\theta }}_{\mathrm{D}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{D}}+{\mathit{\lambda }}_{\mathrm{2}}\mathrm{cos}\mathit{\beta }\mathrm{sin}{\mathit{\theta }}_{\mathrm{D}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{D}}\\ & +{\mathit{\lambda }}_{\mathrm{3}}\mathrm{cos}\mathit{\beta }\mathrm{sin}{\mathit{\varphi }}_{\mathrm{D}}-\mathrm{cos}\mathit{\eta }\\ {\mathit{\lambda }}_{\mathrm{1}}& =\mathrm{sin}\mathit{\alpha }\mathrm{sin}{\mathit{\theta }}_{\mathrm{1}}\mathrm{sin}{\mathit{\theta }}_{\mathrm{A}}+\mathrm{cos}\mathit{\alpha }\mathrm{cos}{\mathit{\theta }}_{\mathrm{A}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{A}}\\ & -\mathrm{sin}\mathit{\alpha }\mathrm{cos}{\mathit{\theta }}_{\mathrm{1}}\mathrm{cos}{\mathit{\theta }}_{\mathrm{A}}\mathrm{sin}{\mathit{\varphi }}_{\mathrm{A}}\\ {\mathit{\lambda }}_{\mathrm{2}}& =-\mathrm{sin}\mathit{\alpha }\mathrm{sin}{\mathit{\theta }}_{\mathrm{1}}\mathrm{cos}{\mathit{\theta }}_{\mathrm{A}}+\mathrm{cos}\mathit{\alpha }\mathrm{sin}{\mathit{\theta }}_{\mathrm{A}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{A}}\\ & -\mathrm{sin}\mathit{\alpha }\mathrm{cos}{\mathit{\theta }}_{\mathrm{1}}\mathrm{sin}{\mathit{\theta }}_{\mathrm{A}}\mathrm{sin}{\mathit{\varphi }}_{\mathrm{A}}\\ {\mathit{\lambda }}_{\mathrm{3}}& =\mathrm{cos}\mathit{\alpha }\mathrm{sin}{\mathit{\varphi }}_{\mathrm{A}}+\mathrm{sin}\mathit{\alpha }\mathrm{cos}{\mathit{\theta }}_{\mathrm{1}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{A}}\end{array}\right\\end{array}$

According to above equations, the output angle ${\mathit{\theta }}_{\mathrm{3}}^{+}$ obtains two roots that is ${\mathit{\theta }}_{\mathrm{3}}^{+}$ and ${\mathit{\theta }}_{\mathrm{3}}^{-}$, which can be calculated as

$\begin{array}{}\text{(10)}& \left\{\begin{array}{l}{\mathit{\theta }}_{\mathrm{3}}^{+}\left({\mathit{\theta }}_{\mathrm{1}}\right)=\mathrm{2}\mathrm{arctan}\left(\frac{{\mathit{\tau }}_{\mathrm{1}}+\sqrt{{\mathit{\tau }}_{\mathrm{1}}^{\mathrm{2}}+{\mathit{\tau }}_{\mathrm{2}}^{\mathrm{2}}-{\mathit{\tau }}_{\mathrm{3}}^{\mathrm{2}}}}{{\mathit{\tau }}_{\mathrm{2}}-{\mathit{\tau }}_{\mathrm{3}}}\right)\\ {\mathit{\theta }}_{\mathrm{3}}^{-}\left({\mathit{\theta }}_{\mathrm{1}}\right)=\mathrm{2}\mathrm{arctan}\left(\frac{{\mathit{\tau }}_{\mathrm{1}}-\sqrt{{\mathit{\tau }}_{\mathrm{1}}^{\mathrm{2}}+{\mathit{\tau }}_{\mathrm{2}}^{\mathrm{2}}-{\mathit{\tau }}_{\mathrm{3}}^{\mathrm{2}}}}{{\mathit{\tau }}_{\mathrm{2}}-{\mathit{\tau }}_{\mathrm{3}}}\right)\end{array}\right\\end{array}$

For each location of driving link corresponded to four specified coupler orientations, if all actual output angles θ3 are generated by the same subformula of Eq. (10), the linkage solution will be valid. If not, a branch defect will appear in the motion of spherical 4R linkage. Specially, according to the coordinates of point C and D, the actual output angles θ3 can be calculated by the method of Eq. (4).

## 4.3 Order defect discrimination

The order defect occurs when the coupler link can't pass the given four-orientations with the order of 1–2–3–4 or 4–3–2–1. Obviously, if the driving link is rotated fully, the geometrical criterion ${\mathit{\theta }}_{\mathrm{21}}<{\mathit{\theta }}_{\mathrm{31}}<{\mathit{\theta }}_{\mathrm{41}}$ or ${\mathit{\theta }}_{\mathrm{21}}>{\mathit{\theta }}_{\mathrm{31}}>{\mathit{\theta }}_{\mathrm{41}}$ will be used to solve this problem according to the definition of order defect, where θji represents the rotation angle of driving link revolves from orientation ABi (which is corresponded to coupler orientation i) to ABj (which is corresponded to coupler orientation j) round the axis OA, as shown in Fig. 5.

Figure 5Driving link revolved round the pole axis of sphere.

In order to obtain rotation angle θji, the normal vector of plane OABi (which is denoted by n1) and OABj (which is denoted by n2) are expressed as ${n}_{\mathrm{1}}=\mathrm{OA}×{\mathrm{OB}}^{i}$, ${n}_{\mathrm{2}}=\mathrm{OA}×{\mathrm{OB}}^{j}$. Based on the conclusions, the normal vector of axis OA in plane OABi (which is denoted by f1) and plane OABj (which is denoted by f2) are expressed as ${f}_{\mathrm{1}}={n}_{\mathrm{1}}×\mathrm{OA}$, ${f}_{\mathrm{2}}={n}_{\mathrm{2}}×\mathrm{OA}$. Define $\mathrm{OA}=\left[{x}_{\mathrm{1}},{y}_{\mathrm{1}},{z}_{\mathrm{1}}\right]$, and ${f}_{\mathrm{1}}×{f}_{\mathrm{2}}=\left[{x}_{\mathrm{2}},{y}_{\mathrm{2}},{z}_{\mathrm{2}}\right]$. The rotation angle of driving link θji is calculated as

$\begin{array}{}\text{(11)}& \left\{\begin{array}{cc}{\mathit{\theta }}_{ji}=\mathrm{arccos}\frac{{f}_{\mathrm{1}}\cdot {f}_{\mathrm{2}}}{\left|{f}_{\mathrm{1}}\right|\left|{f}_{\mathrm{2}}\right|}& {z}_{\mathrm{1}}\cdot {z}_{\mathrm{2}}>\mathrm{0}\\ {\mathit{\theta }}_{ji}=\mathrm{2}\mathit{\pi }-{\mathit{\theta }}_{ji}& \mathrm{others}\end{array}\right\\end{array}$

On the contrary, if the driving link is rotated partially, the geometrical criterion which mentioned above (that is ${\mathit{\theta }}_{\mathrm{21}}<{\mathit{\theta }}_{\mathrm{31}}<{\mathit{\theta }}_{\mathrm{41}}$ or ${\mathit{\theta }}_{\mathrm{21}}>{\mathit{\theta }}_{\mathrm{31}}>{\mathit{\theta }}_{\mathrm{41}}$) will be invalid. For example, the order 4–1–2–3 is incorrect because of the driving link can't move from one moving interval to other, as shown in Fig. 6. In this case, the geometrical criterion is modified as ${\mathit{\theta }}_{\mathrm{1}e}<{\mathit{\theta }}_{\mathrm{2}e}<{\mathit{\theta }}_{\mathrm{3}e}<{\mathit{\theta }}_{\mathrm{4}e}$ or ${\mathit{\theta }}_{\mathrm{1}e}>{\mathit{\theta }}_{\mathrm{2}e}>{\mathit{\theta }}_{\mathrm{3}e}>{\mathit{\theta }}_{\mathrm{4}e}$, where the subscript letter e represents the arbitrary limited orientations of the driving link.

Figure 6Order defect discrimination.

## 4.4 Pyramid structure of the motion defect calculation

The method of defect discrimination cannot be considered in isolation. For example, the calculation on the order defect discrimination is meaningless for a 4R linkage with circle defect because the coupler of the 4R linkage cannot pass through all specified orientations. In order to solve this problem, a pyramid structure is defined in this program package. The circuit defect locates at the bottom of pyramid, the branch defect locates at the middle of pyramid, and the order defect locates at the top of pyramid. Under this definition, both the circuit defect and branch defect should be checked first before the calculation of order defect discrimination. Similarly, the circuit defect should be checked first before the calculation of branch defect discrimination.

For a number of synthesis tasks, the 4R linkage with specified linkage type should be satisfied. According to the method proposed by Murray, there are 8 kinds of linkage type for a spherical 4R linkage, as shown in Table 1, where ${K}_{\mathrm{1}}=\mathit{\gamma }-\mathit{\alpha }+\mathit{\eta }-\mathit{\beta }$, ${K}_{\mathrm{2}}=\mathit{\gamma }-\mathit{\alpha }-\mathit{\eta }+\mathit{\beta }$, ${K}_{\mathrm{3}}=\mathit{\eta }+\mathit{\beta }-\mathit{\gamma }-\mathit{\alpha }$, ${K}_{\mathrm{4}}=\mathrm{2}\mathit{\pi }-\mathit{\eta }-\mathit{\beta }-\mathit{\gamma }-\mathit{\alpha }$. Specially, at least one link of a 4R linkage will be rotated fully if K1K2K3K4>0, which is the Grashof's condition. Both calculations on the linkage type and Grashof's condition are supported by program package.

Table 1Classification of the linkage type (Murray and Larochelle, 1998).

## 4.6 Performance evaluation and solutions domain analysis

A standard function interface on linkage performance calculation is provided for the designer in the program package. The input vector of this function is a data structure to describe the coordinate information of linkage solution at each specified orientation, and the output variable of this function is a real number to indicate the linkage performance. If there are more than one evaluating indicators for the linkage performance, a weight method will be used. Of course, all the functions in the program package can be called in this function.

Actually, a default function template is provided for the designer. The evaluating indicator which defined in this function template is termed as “Braking angle”. For a valid 4R linkage solution which driving link is rotated partially, if the rotation angle of driving link from the specified orientation 1 (or 4) to the nearest limited orientation is too small, the driving link will be difficult to stop before the linkage moves to the limited orientation for the reason of the high rotation speed or the inaccurate displacement control of the motor.

If N center points and circle points are generated after the synthesis calculation, N×N linkage solutions in total will be obtained. Based on the calculation on linkage performance evaluation, each linkage solution will be analyzed and the distribution of the linkage performance evaluation in the solution domain will be obtained. The calculation on the solutions domain analysis is visualized by a solutions map, which is introduced later.

5 Synthesis visualization

Once the four coupler orientations is specified, a figure with four orientations, the center points and the circle points plotted in a sphere are generated. The designer can adjust task parameters according to the figure. The specified coupler orientations are defined by four equilong arcs in the sphere, and the longitude and latitude of the coupler orientation are determined by the starting point of arc, and the roll angle of coupler orientation is determined by the roll angle of arc. Specially, in order to plot the arc in the surface of sphere smoothly, the arc is divided into several line segments through an interpolation method.

## 5.2 Solutions map

For N center points and circle points, all linkage solutions can be mapped into a three-dimensional coordinate system OXYZ, that is the visualization of solutions domain analysis mentioned above. In this coordinate system, N×N cubes are constructed based on the OXY plane, and each linkage solution defined by the center point (or circle point) i and the center point (or circle point) j is described by a cube $L\left(i,j,h\right)$, as shown in Fig. 7, where i is the x offset of cube L, j is the y offset of the cube L, h is the z offset of the cube L, i and j are determined by selected center points (or circle points), and h is determined by linkage performance. In order to describe the linkage type of solution, each cube in the solutions map is color-coded according to linkage type.

Figure 7Constructions of solutions map.

## 5.3 Solutions visualization

The key problem of solutions visualization is the motion analysis and calculation of coupler curve. Figure 3 shows that the output angle θ3 is calculated by the Eq. (10) aimmed at each input angle θ1. Due to the coordinates of point A and D of spherical 4R linkage are given, the coordinates of point B and C can be obtained according to the Eqs. (5) and (6). Then, the rotation angle of link BC (that is θ2) can be calculated as

$\begin{array}{}\text{(12)}& \left\{\begin{array}{l}\mathrm{sin}{\mathit{\theta }}_{\mathrm{2}}=\frac{\mathrm{cos}{\mathit{\varphi }}_{\mathrm{C}}\mathrm{sin}\left({\mathit{\theta }}_{\mathrm{B}}-{\mathit{\theta }}_{\mathrm{C}}\right)}{\mathrm{sin}\mathit{\eta }}\\ \mathrm{cos}{\mathit{\theta }}_{\mathrm{2}}=\frac{\mathrm{sin}{\mathit{\varphi }}_{\mathrm{C}}-\mathrm{sin}{\mathit{\varphi }}_{\mathrm{B}}\mathrm{cos}\mathit{\eta }}{\mathrm{cos}{\mathit{\varphi }}_{\mathrm{B}}\mathrm{sin}\mathit{\eta }}\end{array}\right\\end{array}$

Correspondingly, the rotation angle revolved from the link BC to BP (that is δ) is obtained by the rotation method introduced in Sect. 3.3. Obviously, the angle δ is a constant value and calculated from the coordinate information of spherical 4R linkage at any specified orientations. On this basis, the rotation angle of link BP (denoted by θ5) is “θ2+δ”, and the coordinate of point P is expressed as

$\begin{array}{}\text{(13)}& \left\{\begin{array}{l}\mathrm{sin}{\mathit{\varphi }}_{\mathrm{P}}=\mathrm{cos}\mathit{\kappa }\mathrm{sin}{\mathit{\varphi }}_{\mathrm{B}}+\mathrm{sin}\mathit{\kappa }\mathrm{cos}{\mathit{\theta }}_{\mathrm{5}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{B}}\\ \mathrm{sin}{\mathit{\theta }}_{\mathrm{P}}=\frac{\begin{array}{c}-\mathrm{sin}\mathit{\kappa }\mathrm{sin}{\mathit{\theta }}_{\mathrm{5}}\mathrm{cos}{\mathit{\theta }}_{\mathrm{B}}+\mathrm{cos}\mathit{\kappa }\mathrm{sin}{\mathit{\theta }}_{\mathrm{B}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{B}}\\ -\mathrm{sin}\mathit{\kappa }\mathrm{cos}{\mathit{\theta }}_{\mathrm{5}}\mathrm{sin}{\mathit{\theta }}_{\mathrm{B}}\mathrm{sin}{\mathit{\varphi }}_{\mathrm{B}}\end{array}}{\mathrm{cos}{\mathit{\varphi }}_{\mathrm{P}}}\\ \mathrm{cos}{\mathit{\theta }}_{\mathrm{P}}=\frac{\begin{array}{c}\mathrm{sin}\mathit{\kappa }\mathrm{sin}{\mathit{\theta }}_{\mathrm{5}}\mathrm{sin}{\mathit{\theta }}_{\mathrm{B}}+\mathrm{cos}\mathit{\kappa }\mathrm{cos}{\mathit{\theta }}_{\mathrm{B}}\mathrm{cos}{\mathit{\varphi }}_{\mathrm{B}}\\ -\mathrm{sin}\mathit{\kappa }\mathrm{cos}{\mathit{\theta }}_{\mathrm{5}}\mathrm{cos}{\mathit{\theta }}_{\mathrm{B}}\mathrm{sin}{\mathit{\varphi }}_{\mathrm{B}}\end{array}}{\mathrm{cos}{\mathit{\varphi }}_{\mathrm{P}}}\end{array}\right\\end{array}$

According to the calculation above, the point coordinates of the spherical 4R linkage under each input angle are calculated, and the coordinate data is applied to conduct the animation of linkage motion and plot the coupler curve. Due to there are two solutions in the Eq. (10) corresponding to the two assembly configurations of spherical 4R linkage driven link, the coupler curve is generated at twice. In order to distinguish the branch of coupler curve, different colors are used to represent different branches. Specially, for a spherical 4R linkage which driving link rotated partially, each solution of Eq. (10) should be checked because there is no real root for some input angles of driving link.

6 Expansion of the program package on planar 4R linkage

The synthesis on both spherical and planar 4R linkages is supported by the program package. The calculation on spherical problem mentioned above is mainly based on the theory of spherical trigonometry (Ratcliffe, 2006). Actually, the geometrical principle of planar 4R linkage is similar to a spherical one. As the Fig. 2 shows, the spherical 4R linkage only move along the surface of a sphere and all the axes of hinges passes through the center of sphere. If the diameter of sphere is infinite, the spherical 4R linkage ABCD will be transformed into a planar one.

For the synthesis of planar 4R linkage, the method mentioned in Sect. 2 which is presented by Shirazi (2005) is applicable, it is based on the classic burmester theory and cannot be described here.

For the discrimination of linkage circuit defect, the difference between spherical and planar problems is the calculation of limited orientations of driving link, which can be obtained by the cosine theorem of planar triangle. Define ${a}^{\prime }=|\mathrm{BC}|+|\mathrm{CD}|$, ${b}^{\prime }=|\mathrm{AD}|$, ${c}^{\prime }=|\mathrm{AB}|$, if the configuration of planar triangle is A(BC)D, the limited angles of driving link which is denoted by ${\mathit{\theta }}_{\mathrm{1}}^{\mathrm{1}\ast }$ and ${\mathit{\theta }}_{\mathrm{1}}^{\mathrm{2}\ast }$ could be calculated as

$\begin{array}{}\text{(14)}& \left\{\begin{array}{l}{\mathit{\theta }}_{\mathrm{1}}^{\mathrm{1}\ast }=\mathrm{arccos}\left(\frac{{{c}^{\prime }}^{\mathrm{2}}+{{b}^{\prime }}^{\mathrm{2}}-{{a}^{\prime }}^{\mathrm{2}}}{\mathrm{2}{c}^{\prime }{b}^{\prime }}\right)+\mathrm{arctan}\mathrm{2}\left(\mathrm{sin}{\mathit{\theta }}_{\mathrm{4}},\mathrm{cos}{\mathit{\theta }}_{\mathrm{4}}\right)\\ {\mathit{\theta }}_{\mathrm{1}}^{\mathrm{2}\ast }=-\mathrm{arccos}\left(\frac{{{c}^{\prime }}^{\mathrm{2}}+{{b}^{\prime }}^{\mathrm{2}}-{{a}^{\prime }}^{\mathrm{2}}}{\mathrm{2}{c}^{\prime }{b}^{\prime }}\right)+\mathrm{arctan}\mathrm{2}\left(\mathrm{sin}{\mathit{\theta }}_{\mathrm{4}},\mathrm{cos}{\mathit{\theta }}_{\mathrm{4}}\right)\end{array}\right\\end{array}$

Similarly, if the configuration of planar triangle is A(BC)D, the Eq. (14) will be applicable as $a=|\mathrm{BC}|-|\mathrm{CD}|$. If it is not all input angles of driving link corresponding to the specified coupler orientations locates at the same moving interval, the linkage solution will be invalid. Specially, the validity of Eq. (14) is determined by the validity of expression $v=\left({c}^{\mathrm{2}}+{b}^{\mathrm{2}}-{a}^{\mathrm{2}}\right)/\mathrm{2}cb$. If the solution of Eq. (14) is valid, the condition $v\in \left[-\mathrm{1},\mathrm{1}\right]$ should be satisfied.

For the discrimination of linkage branch defect, the Eqs. (8) and (10) are applicable, the difference between spherical and planar problems is the expression of τ1, τ2, τ3, where

$\begin{array}{}\text{(15)}& \left\{\begin{array}{ll}{\mathit{\tau }}_{\mathrm{1}}& =\mathrm{2}\left|\mathrm{AB}\right|\left|\mathrm{CD}\right|\mathrm{sin}{\mathit{\theta }}_{\mathrm{1}}-\mathrm{2}\left|\mathrm{AD}\right|\left|\mathrm{CD}\right|\mathrm{sin}{\mathit{\theta }}_{\mathrm{4}}\\ {\mathit{\tau }}_{\mathrm{2}}& =\mathrm{2}\left|\mathrm{AB}\right|\left|\mathrm{CD}\right|\mathrm{cos}{\mathit{\theta }}_{\mathrm{1}}-\mathrm{2}\left|\mathrm{AD}\right|\left|\mathrm{CD}\right|\mathrm{cos}{\mathit{\theta }}_{\mathrm{4}}\\ {\mathit{\tau }}_{\mathrm{3}}& ={\left|\mathrm{BC}\right|}^{\mathrm{2}}-{\left|\mathrm{AB}\right|}^{\mathrm{2}}-{\left|\mathrm{CD}\right|}^{\mathrm{2}}-{\left|\mathrm{AD}\right|}^{\mathrm{2}}\\ & +\mathrm{2}\left|\mathrm{AB}\right|\left|\mathrm{AD}\right|\mathrm{cos}\left({\mathit{\theta }}_{\mathrm{1}}-{\mathit{\theta }}_{\mathrm{4}}\right)\end{array}\right\\end{array}$

If it was not all actual output angles θ3 corresponding to four specified coupler orientations that could be generated by the same subformula of Eq. (14), the linkage solution would be invalid.

For the discrimination of linkage order defect, the geometrical criterion ${\mathit{\theta }}_{\mathrm{21}}<{\mathit{\theta }}_{\mathrm{31}}<{\mathit{\theta }}_{\mathrm{41}}$ or ${\mathit{\theta }}_{\mathrm{21}}>{\mathit{\theta }}_{\mathrm{31}}>{\mathit{\theta }}_{\mathrm{41}}$ for linkage with rotating fully driving link and geometrical criterion ${\mathit{\theta }}_{\mathrm{1}e}<{\mathit{\theta }}_{\mathrm{2}e}<{\mathit{\theta }}_{\mathrm{3}e}<{\mathit{\theta }}_{\mathrm{4}e}$ or ${\mathit{\theta }}_{\mathrm{1}e}>{\mathit{\theta }}_{\mathrm{2}e}>{\mathit{\theta }}_{\mathrm{3}e}>{\mathit{\theta }}_{\mathrm{4}e}$ for linkage with rotating partially driving link are applicable. The difference between spherical and planar problems is the vectors f1 and f2 in the Eq. (11), where f1=ABi and f2=ABj.

For the classification of linkage type and the condition of grashof, the method proposed by Martin and Murray (2002) is applicable to planar 4R linkage. For the performance evaluation, the “Braking angle” of planar 4R linkage is obtained from the calculation on planar vectors. Similarly, for the synthesis visualization of planar 4R linkage, the method mentioned in Sect. 4 is applicable, and the calculation is based on the principle of planar trigonometry.

Figure 8Center points and circle points generated by the program package.

Figure 9Solutions map generated by the program package.

Table 2Specified coupler orientations for a spherical 4R linkage.

Table 3Solutions information.

7 Examples

## 7.1 Spherical 4R linkage synthesis

In this example, it is necessary to synthesize a spherical 4R linkage to guide a camera to pass four specified orientations without circuit defect, branch defect and order defect, as shown in Table 2.

Figure 10Solutions visualization.

Firstly, the synthesis program is called to generate center points and circle points, the result is shown in Fig. 8. Then, the solutions map is generated, the result is shown in Fig. 9. As shown in Fig. 9, 91.7 % of solutions are erased from the map because of the linkage motion defect, and there are no valid linkages with type of crank-rocker, rocker crank, grashof double rocker and 0π double rocker satisfied the synthesis task. Additionally, all linkage solutions which driving link rotate partially have a bad “Braking angle” less than 5, therefore, only the solutions with a type of double crank need to be considered.

The program allows designer to select valid solutions on the solutions map directly, and this way is quick and efficient. As the Fig. 9 shows, a candidate solution is selected from region I of solutions map, and the solution information is shown in Table 3. Similarly, another three linkage solutions selected from region II–IV of solutions map are erased because of motion defect, and the solution information is shown in Table 3. In order to verify the results, the plotting program is called to generate coupler curve of four linkages, as shown in Fig. 10. Obviously, only the linkage solution I is feasible.

In this calculation, 7396 groups of linkage solutions are synthesized and analyzed. When the program is running on the computer, it takes 4.48 s to generate and display the solutions map at one time. In the process of linkage solution selection, it only takes 0.37 s to generate and display the coupler curve of the selected linkage solution each time.

## 7.2 Planar 4R linkage synthesis

In this example, it is necessary to synthesize a planar 4R linkage to guide the bucket of the skid steer loader to pass four specified orientations without circuit defect, branch defect and order defect, as shown in Table 4.

Table 4Specified coupler orientations for a planar 4R linkage.

Firstly, the synthesis program is called to generate center points and circle points, the result is shown in Fig. 11. Then, the solutions map is generated, the result is shown in Fig. 12. It is noted that the installation position of the 4R linkage on the skid steer loader is limited, which becomes a strong constraint condition for the rationality of the solution. In order to provide enough candidate solutions, this example no longer calculates the transmission performance of the linkage solution, but loads the picture of the skid steer loader with reduced proportion into the drawing area to evaluate the reasonableness of the installation position of the linkage solution.

Figure 11Center points and circle points generated by the program package.

Figure 12Solutions map generated by the program package.

Table 5Solutions information.

As shown in Fig. 12, 70.95 % of solutions are erased from the map because of the linkage motion defect, and there are no valid linkages with type of crank-rocker, rocker crank, double crank, 00 double rocker and ππ double rocker satisfied the synthesis task. Six candidate solutions are selected from region I–VI of solutions map, and the solution information is shown in Table 5. In order to verify the results, the plotting program is called to generate coupler curve of six linkages. As shown in Fig. 13, the installation position of one rocker in solution II interferes with the tire of the skid steer loader, and the installation position of one rocker in solution III–VI is outside the body of the skid steer loader. Obviously, only the installation position of the rocker with solution I is reasonable and meets the requirements of linkage synthesis.

Figure 13Solutions visualization.

In this calculation, 19 600 groups of linkage solutions are synthesized and analyzed. When the program is run on the computer, it takes 12.73 s to generate and display the solutions map at one time. In the process of linkage solution selection, it only takes 0.24 s to generate and display the coupler curve of the selected linkage solution each time.

8 Concluding remarks

In this paper, a synthesis program package is developed to find a satisfied planar or spherical linkage solution automatically according to burmester theory. The main conclusions of this study are as follows:

1. The program package developed in this paper has fast calculation speed and high synthesis efficiency. The time required for synthesis calculation depends on the segmentation accuracy of buermester center curve, that is, the rotation angle increment of driving link of 4R linkage constructed by image poles when generating each center point. The more precise the burmester center curve is segmented, the more solutions are generated and the longer the calculation time is. In the two examples given in this paper, the number of linkage solutions analyzed is 7396 and 19 600 respectively, and the total time required for solutions map generation and display is 4.48 and 12.73 s respectively. The generation of the solutions map is one-time, after which the selection and analysis of linkage solution only takes less than 0.5 s each time. In addition, the solutions map proposed in this study extends the dimension of traditional type map, so that it can also express the transmission performance of linkage solutions while expressing linkage types. This method further avoids the blindness of linkage synthesis.

2. The proposed defect discrimination algorithm is not only correct but also logical. In the synthetic example of spherical 4R linkage, by comparing the result of program discrimination with that of coupler curve analysis, it can be seen that the algorithm in this paper can correctly discriminate the defect of circuit, branch and order. Moreover, this paper proposes a pyramid structure for defect discrimination. This is obviously more logical. For example, when four given orientations are located in different circuits and branches, the coupler curve of 4R linkage can not pass through all four orientations at all. It is not logical to discuss whether the coupler link can pass through four orientations orderly.

3. The program developed in this paper is more flexible than the previous software. Like the toolbox functions of MATLAB, the program contains a series of functions from the bottom graphics calculation to the generation of human-computer interaction interface. On this basis, users can not only directly use the given human-computer interaction interface for general synthesis calculation, but also reorganize these functions to solve more complex problems.

Considering that the precise orientation synthesis problem and the function synthesis problem can be transformed each other, how to extend the research method in this paper, especially the defect discrimination method, to the function synthesis field of spherical and planar 4R linkage is the next research direction of this paper.

Data availability
Data availability.

All the data used in this paper can be obtained by request from the corresponding author.

Author contributions
Author contributions.

GW suggested the overall concept of this paper and completed the development of the program package based on Matlab. HZ, XL and JW worked together to complete the examples used in this paper. XZ and GF edited and verified all the formulas and pictures used in this paper.

Competing interests
Competing interests.

The authors declare that they have no conflict of interest.

Acknowledgements
Acknowledgements.

This work is financially supported by the National Key Research and Development Program (Project no. 2016YFD0701103), the Shandong Key Research and Development Program (Project no. 2018GNC112008), and the Funds of Shandong “Double Tops” Program (Project no. SYL2017XTTD14).

Financial support
Financial support.

This research has been supported by the National Key Research and Development Program (grant no. 2016YFD0701103), the Shandong Key Research and Development Program (grant no. 2018GNC112008), and the Shandong “Double Tops” Program (grant no. SYL2017XTTD14).

Review statement
Review statement.

This paper was edited by Doina Pisla and reviewed by two anonymous referees.

References

Baskar, A. and Bandyopadhyay, S.: A homotopy-based method for the synthesis of defect-free mechanisms satisfying secondary design considerations, Mech. Mach. Theory, 133, 395–416, https://doi.org/10.1016/j.mechmachtheory.2018.12.002, 2019a.

Baskar, A. and Bandyopadhyay, S.: An algorithm to compute the finite roots of large systems of polynomial equations arising in kinematic synthesis, Mech. Mach. Theory, 133, 493–513, https://doi.org/10.1016/j.mechmachtheory.2018.12.004, 2019b.

Bai, S.: Geometric analysis of coupler-link mobility and circuits for planar four-bar linkages, Mech. Mach. Theory, 118, 53–64, https://doi.org/10.1016/j.mechmachtheory.2017.07.019, 2017.

Chanekar, P. V., Fenelon, M. A. A., and Ghosal, A.: Synthesis of adjustable spherical four-link mechanisms for approximate multi-path generation, Mech. Mach. Theory, 70, 538–552, https://doi.org/10.1016/j.mechmachtheory.2013.08.009, 2013.

Erdman, A. G. and Loftness P. E.: Synthesis of linkages for cataract surgery: storage, folding, and delivery of replacement intraocular lenses(IOLs), Mech. Mach. Theory, 40, 337–351, https://doi.org/10.1016/j.mechmachtheory.2004.07.006, 2005.

Filemon, E.: Useful ranges of centerpoint curves for design of crank-and-rocker linkages, Mech. Mach. Theory, 7, 47–53, https://doi.org/10.1016/0094-114X(72)90015-8, 1972.

Gupta, K. C. and Beloiu, A. S.: Branch and circuit defect elimination in spherical four-bar linkages, Mech. Mach. Theory, 33, 491–504, https://doi.org/10.1016/S0094-114X(97)00078-5, 1998.

Han, J. and Cao, Y.: Analytical synthesis methodology of RCCC linkages for the specified four poses, Mech. Mach. Theory, 133, 531–544, https://doi.org/10.1016/j.mechmachtheory.2018.12.005, 2019.

Han, J., Yang, T., Yin, L., and Qian, W.: Modern synthesis theory and method of linkage mechanism – analytical theory, domain solution method and software system, Higher Education Press, Beijing, China, 2013.

Martin, D. T. and Murray, A. P.: Developing classifications for synthesizing, refining, and animating planar mechanisms, ASME 2002 Design Engineering Technical Conferences and Computers and Information in Engineering Conference, 29 September–2 October 2002, Montreal, 2002.

McCarthy, J. M.: 21st Century Kinematics, Springer, London, 2013.

Murray, A. P. and Larochelle, P. M.: A classification scheme for planar 4R, spherical 4R, and spatial RCCC linkages to facilitate computer animation, 1998 ASME Design Engineering Technical Conferences, 13–16 September 1998, Atlanta, 1998.

Myszka, D. H., Murray, A. P., and Schmiedeler, J. P.: Assessing position order in rigid body guidance: an intuitive approach to fixed pivot selection, J. Mech. Design, 131, 0145021–0145025. https://doi.org/10.1115/1.3013851, 2009.

Ratcliffe, J. G.: Foundations of Hyperbolic Manifolds, Springer, New York, 2006.

Mendoza-Trejo, O., Cruz-Villar, C. A., Peón-Escalante, R., Zambrano-Arjona, M. A., and Peñuñuri, F.: Synthesis method for the spherical 4R mechanism with minimum center of mass acceleration, Mech. Mach. Theory, 93, 53–64, https://doi.org/10.1016/j.mechmachtheory.2015.04.015, 2015.

Ruth, D. A. and McCarthy, J. M.: The design of spherical 4R linkages for four specified orientations, Mech. Mach. Theory, 34, 677–692, https://doi.org/10.1016/S0094-114X(98)00048-2, 1999.

Shirazi, K. H.: Synthesis of linkages with four points of accuracy using Maple-V, Appl. Math. Comput., 164, 731—755, https://doi.org/10.1016/j.amc.2004.04.085, 2005.

Shirazi, K. H.: Computer modelling and geometric construction for four-point synthesis of 4R spherical linkages, Appl. Math. Model., 31, 1874–1888, https://doi.org/10.1016/j.apm.2006.06.013, 2007.

Su, H. J. and McCarthy, J. M.: The synthesis of an RPS serial chain to reach a given set of task positions, Mech. Mach. Theory, 40, 757–775, https://doi.org/10.1016/j.mechmachtheory.2005.01.007, 2005.

Sun, J., Chen, L., and Chu, J.: Motion generation of spherical four-bar mechanism using harmonic characteristic parameters, Mech. Mach. Theory, 95, 76–92, https://doi.org/10.1016/j.mechmachtheory.2015.08.020, 2016.

Tipparthi, H. and Larochelle, P.: Orientation order analysis of spherical four-bar mechanisms, J. Mech. Robot., 3, 0445011–0445014, https://doi.org/10.1115/1.4004898, 2011.

Waldron, K. J. and Strong, R. T.: Improved solutions of the branch and order problems of burmester linkage synthesis, Mecha. Mach. Theory, 13, 199–207, https://doi.org/10.1016/0094-114X(78)90043-5, 1978.

Wang, J., Ting, K. L., and Xue, C.: Discriminant method for the mobility identification of single degree-of-freedom double-loop linkages, Mech. Mach. Theory, 45, 740–755, https://doi.org/10.1016/j.mechmachtheory.2009.12.004, 2010.

Zhao, P., Zhu, X., Li, L., Zi, B., and Ge, Q. J.: A novel motion synthesis approach with expandable solution space for planar linkages based on kinematic-mapping, Mech. Mach. Theory, 105, 164–175, https://doi.org/10.1016/j.mechmachtheory.2016.06.021, 2016.