Automatic Generation of N-Bar Planar Linkages Containing Sliders

: In this work, a generalized algorithm is introduced to generate all alternatives of planar N-bar kinematic chains (KCs) with simple joints containing sliders. A simple graphical technique is introduced to enumerate all available N-bar chains with prismatic (P) joints. Then, a new topological Loop Code (TLC) is presented to detect isomorphic chains during the enumeration process in addition to detecting rejected KCs. A visual C++ code is developed for automatic enumeration and detection of rejected KCs and isomorphic KCs. Examples of 6, 8, and 10-bar KCs are presented to illustrate algorithm procedures. As a result, 21, 16, and 1350 KCs have P-joints for Stephenson, Watt, and 8-bar chains, respectively. Also, 308 KCs are obtained for a 10-bar KC with up to 3 sliders.


Introduction
Over the past five decades, the structural synthesis of KCs has been an important topic in mechanism design. Enumeration of KCs helps to analyze their characteristics and to select a proper chain for a purpose. Many researchers have proposed graph theory as an effective method to generate and evaluate KCs. Isomorphism detection is an essential stage in the structural synthesis of planar mechanisms to ensure that all configurations of a KC are distinct. However, the generation of KCs containing prismatic pairs has a little work in mechanism research. Generally, the structural synthesis of KCs, with P-pairs, has been studied by few researchers. A split hamming string was used as a test for isomorphism in KCs with Pjoints by Dharanipragada [1]. A computer program was developed to test the isomorphism of single-Degree of Freedom (DOF) simple-jointed planar 6-bar KCs up to seven P-joints and 8-bar KCs up to ten P-joints.
A novel technique of double-springs was introduced by Kang et al. [2] to attach a finite number of ground rectangular rigid blocks. Revolute joints and P-pairs were used by Mitsi et al. [3][4][5] in position analysis of the Assur group. Therefore, all configurations of the Assur group were presented. Configurations of 5-task positions were proposed by Myszka and Murray [6] for a 1-dimensional set of (R-P) dyads used in design by a P-pair. A method to generate available planar mechanisms with R and P-pairs was presented by Martin [7]. Then a new technique for P-joint assignment was introduced. Eleashy [8] introduced a joint sorting code to enumerate all KCs containing P-joints of 8-bar chains.
Structural synthesis of KCs, with R-pairs, has been studied by many researchers including the generation of KCs as well as the isomorphism identification process. A direct technique for the detection of n-link KCs from (n − 2)-link linkage using the hamming Appl. Sci. 2021, 11

Identification of Independent Loops
A simple joint is formed when two links are connected, whereas multiple joints are formed when more than two links are connected. Considering simple-joint KCs, given N-bar, KC initially has R-joints. Assignment of P-joints depends mainly on the structural characteristics of a KC. Therefore, mechanism topology should be identified including the number and type of both links and joints. As indicated in [36], the total number of independent loops in a KC is given by: where: x: number of loops (independent and peripheral loop) N: number of links f: Degree of Freedom (DOF) For the 10-bar KC shown in Figure 1, it has 3-DOF and four independent loops: namely L1, L2, L3, and Lp as a peripheral loop.

Generation of KCs with Sliders
All KCs are initially represented using revolute joints. Then some of these R-joints will be replaced by sliding joints. A graphical representation is applied to represent the initial KC and to enumerate all solutions of adding 1, 2, or 3 P-joints instead of R-joints. A

Identification of Independent Loops
A simple joint is formed when two links are connected, whereas multiple joints are formed when more than two links are connected. Considering simple-joint KCs, given N-bar, KC initially has R-joints. Assignment of P-joints depends mainly on the structural characteristics of a KC. Therefore, mechanism topology should be identified including the number and type of both links and joints. As indicated in [36], the total number of independent loops in a KC is given by: where: x: number of loops (independent and peripheral loop) N: number of links f : Degree of Freedom (DOF) For the 10-bar KC shown in Figure 1, it has 3-DOF and four independent loops: namely L1, L2, L3, and Lp as a peripheral loop.

Generation of KCs with Sliders
All KCs are initially represented using revolute joints. Then some of these R-joints will be replaced by sliding joints. A graphical representation is applied to represent the initial KC and to enumerate all solutions of adding 1, 2, or 3 P-joints instead of R-joints. A visual C++ code is constructed to explore all available configurations for a certain KC. R-joints are represented as circles and P-joints are represented as rectangles. For Watt chain, all solutions of adding 2-sliders are presented in Figure 2 as each graph should contain only 2 P-joints by iteration method.  Figure 2 as each graph should contain only 2 P-joints by iteration method.

Deriving Initial Topological Loop Code (ITLC)
Initial topological loop code (ITLC) is introduced to represent each loop in a considered KC. Each loop in a KC is analyzed to identify types of links and joints. Now, each loop may contain R-joints and P-joints. ITLC can be derived for such a loop as follows: According to Figure 3a, links A and B are connected by R-joint, so that joint '1' can be represented by an element M1 = 230. Figure 3b illustrates joint '2' that connects links C and D by a P-joint, so that joint '2' can be represented by an element M2 = 341.
Considering a 10-bar KC, shown in Figure 4a, loop-1 has four joints (7,12,13,6). Links J and A are connected by R-joint '7' which has a corresponding element of M7 = 240. Links F and H are connected by R-joint '5' which has a corresponding element of M5 = 331. Links C and A are connected by P-joint '8' which has a corresponding element of M8 = 241.…etc.  According to Figure 3a, links A and B are connected by R-joint, so that joint '1' can be represented by an element M 1 = 230. Figure 3b illustrates joint '2' that connects links C and D by a P-joint, so that joint '2' can be represented by an element M 2 = 341.
Considering a 10-bar KC, shown in Figure 4a, loop-1 has four joints (7,12,13,6). Links J and A are connected by R-joint '7' which has a corresponding element of M 7 = 240. Links F and H are connected by R-joint '5' which has a corresponding element of M 5 = 331.

Improving Topological Loop Code (TLC):
An improved topological loop code (TLC) can be generated for each loop by rearranging elements of ITLC in a specific order according to joints priorities. Generally, TLC can be generated as follows: 1-Vi, Elements of TLC, can be derived by resorting elements of ITLC starting from the lowest element. 2-Each loop will be represented by a matrix TLC 1×n = [V1, V2, V3, …, Vn] 3-The second element is the minimum element adjacent to the first element. 4-The second element indicates the sorting direction of other elements even clockwise or anticlockwise. 5-If there is more than one element that has the lowest value, the first element will be selected such that the maximum number of consequent lowest elements is achieved. 6-If close adjacent elements to the first element are equal, the sorting direction is identified according to the next adjacent elements on both sides.

Improving Topological Loop Code (TLC)
An improved topological loop code (TLC) can be generated for each loop by rearranging elements of ITLC in a specific order according to joints priorities. Generally, TLC can be generated as follows: 1-V i , Elements of TLC, can be derived by resorting elements of ITLC starting from the lowest element. 2-Each loop will be represented by a matrix TLC 1×n = [V 1 , V 2 , V 3 , . . . , V n ] 3-The second element is the minimum element adjacent to the first element. 4-The second element indicates the sorting direction of other elements even clockwise or anticlockwise. 5-If there is more than one element that has the lowest value, the first element will be selected such that the maximum number of consequent lowest elements is achieved. 6-If close adjacent elements to the first element are equal, the sorting direction is identified according to the next adjacent elements on both sides.
Loop-1, in Stephenson KC shown in Figure 4b, has three joints 1, 5, 7 of the same value M = 230. Hence, the sorting direction will be clockwise starting with joint-7. Therefore, loop joints sorting will be (7-1-5-6). Sorting also can start with joint 5 in an anticlockwise direction. In loop-2, joint-3 connects two binary links i.e., it has the higher priority with M 3 = 220. The nearest joints (4, 2) have the same priority with M 2 = M 4 = 230. If the consequent joints (6, 7) are compared, joint-7 has a higher priority with M 7 = 230. Therefore, the direction of sorting is clockwise starting with joint-3 and joint sorting will be (3-2-7-6-4).

Improving Topological Loop Code (TLC):
An improved topological loop code (TLC) can be generated for each loop by rearranging elements of ITLC in a specific order according to joints priorities. Generally, TLC can be generated as follows: 1-Vi, Elements of TLC, can be derived by resorting elements of ITLC starting from the lowest element. 2-Each loop will be represented by a matrix TLC 1×n = [V1, V2, V3, …, Vn] 3-The second element is the minimum element adjacent to the first element. 4-The second element indicates the sorting direction of other elements even clockwise or anticlockwise. 5-If there is more than one element that has the lowest value, the first element will be selected such that the maximum number of consequent lowest elements is achieved. 6-If close adjacent elements to the first element are equal, the sorting direction is identified according to the next adjacent elements on both sides.

Generation of KC Topological Matrix (KCTM)
A KC will be introduced by a new topological matrix KCTM. Each row in this matrix refers to TLC for a corresponding loop. Please note that missing elements will be denoted as zero value. ..

Example: Generation of 10-Bar Chains with 3-Sliders
Starting from a single-DOF 10-bar chain, it is necessary to enumerate all the available chains with 3-sliders. Then ITLC, TLC, and KCTM will be generated.

P-Joints Assignment
A single-DOF 10-bar chain has 13 revolute joints as indicated in Figure 4a. For the assignment of 3P-joints to a 10-bar chain, there will be 286 available configurations. Using the developed VC++ code, all configurations are enumerated automatically as shown in Figure 5. Each configuration has a notation of P-joint labels that have been transformed from revolute into P-joints.

Generation of KC Topological Matrix (KCTM)
A KC will be introduced by a new topological matrix KCTM. Each row in this matrix refers to TLC for a corresponding loop. Please note that missing elements will be denoted as zero value.

Example: Generation of 10-Bar Chains with 3-Sliders
Starting from a single-DOF 10-bar chain, it is necessary to enumerate all the available chains with 3-sliders. Then ITLC, TLC, and KCTM will be generated.

P-Joints Assignment
A single-DOF 10-bar chain has 13 revolute joints as indicated in Figure 4a. For the assignment of 3P-joints to a 10-bar chain, there will be 286 available configurations. Using the developed VC++ code, all configurations are enumerated automatically as shown in Figure 5. Each configuration has a notation of P-joint labels that have been transformed from revolute into P-joints

Generation of ITLC and TLC and KCTM for 10-Bar KC
Considering the 10-bar KC shown in Figure 4a, ITLC and TLC and KCTM can be derived. First, the KC has 5 loops according to Equation (1).
The following steps illustrate how to generate the proposed codes

Isomorphism Detection Using KCTM
Two structures are said to be isomorphic if there is a one-to-one correspondence of links and joints of two structures. These KCs must be eliminated from enumeration results. Using the proposed technique, isomorphic KCs have the same KCTM regardless of their row order.
Two Stephenson KCs as shown in Figure 8 initially have different configurations. However, it can be investigated that each row in KCTM of left side KC has a matching row in the KCTM on the right-side KC. Hence, both KCs are isomorphic. Detection of all isomorphic KCs is automatically achieved using the established VC++ code. It has been applied successfully for isomorphism identification of Watt, Stephenson, all 8-bar chains, and a 10-bar chain containing up to 3 sliders. Figure 9 illustrates results for detecting isomorphic KCs of Stephenson chain containing 3P-joints. The constructed VC ++ code can detect that the 11th and 24th KCs are isomorphic. A  I  H  J  I  G  F  H  A  H  D  E  F  G  I  A  B  D  C   Link types   Q  T  T  B  T  B  T  T  Q  B  T  B  T  B  T  Q  B  T  B   Joints   7  12 13  6  13 11 10  5  12  8  9  3  4  10 11  1  2  9  8 Joint type

Isomorphism Detection Using KCTM
Two structures are said to be isomorphic if there is a one-to-one correspondence of links and joints of two structures. These KCs must be eliminated from enumeration results. Using the proposed technique, isomorphic KCs have the same KCTM regardless of their row order.
Two Stephenson KCs as shown in Figure 8 initially have different configurations. However, it can be investigated that each row in KCTM of left side KC has a matching row in the KCTM on the right-side KC. Hence, both KCs are isomorphic. Detection of all isomorphic KCs is automatically achieved using the established VC++ code. It has been applied successfully for isomorphism identification of Watt, Stephenson, all 8-bar chains, and a 10-bar chain containing up to 3 sliders. Figure 9 illustrates results for detecting isomorphic KCs of Stephenson chain containing 3P-joints. The constructed VC ++ code can detect that the 11th and 24th KCs are isomorphic. A  I  H  J  I  G  F  H  A  H  D  E  F  G  I  A  B  D  C   Link types   Q  T  T  B  T  B  T  T  Q  B  T  B  T  B  T  Q  B  T

Isomorphism Detection Using KCTM
Two structures are said to be isomorphic if there is a one-to-one correspondence of links and joints of two structures. These KCs must be eliminated from enumeration results. Using the proposed technique, isomorphic KCs have the same KCTM regardless of their row order.
Two Stephenson KCs as shown in Figure 8 initially have different configurations. However, it can be investigated that each row in KCTM of left side KC has a matching row in the KCTM on the right-side KC. Hence, both KCs are isomorphic. Detection of all isomorphic KCs is automatically achieved using the established VC++ code. It has been applied successfully for isomorphism identification of Watt, Stephenson, all 8-bar chains, and a 10-bar chain containing up to 3 sliders. Figure 9 illustrates results for detecting isomorphic KCs of Stephenson chain containing 3P-joints. The constructed VC ++ code can detect that the 11th and 24th KCs are isomorphic.

Check for Rejected Chains Using TLC
During the enumeration process, the assignment of P-joints should take into consideration three rules introduced by [7]: R1-No link of a chain can contain only P-pairs which directions are parallel. R2-Binary links of a chain with only P-pairs cannot be connected directly. R3-No closed circuit of a chain can have less than two R-pairs.
All generated graphs must be evaluated according to these rules. The proposed TLC is an efficient tool to detect and eliminate graphs that do not agree with the previous rules as follows:

Case 1. A KC is said to be rejected due to R2 if two consecutive elements for any loop have:
Lx or Ly = 2 (i.e., a binary link is connected) and Jt = 1 (i.e., a P-pair is attached) For example, Figure 10a illustrates Watt chain with two prismatic joints. A binary link B is attached to links A and C by prismatic joints. This arrangement disagrees with rule R2. Using the generated TLC for loop-2, two consecutive elements have Lx = 2 and Jt = 1.

Check for Rejected Chains Using TLC
During the enumeration process, the assignment of P-joints should take into consideration three rules introduced by [7]: R1-No link of a chain can contain only P-pairs which directions are parallel. R2-Binary links of a chain with only P-pairs cannot be connected directly. R3-No closed circuit of a chain can have less than two R-pairs.
All generated graphs must be evaluated according to these rules. The proposed TLC is an efficient tool to detect and eliminate graphs that do not agree with the previous rules as follows:

Case 1. A KC is said to be rejected due to R2 if two consecutive elements for any loop have:
Lx or Ly = 2 (i.e., a binary link is connected) and Jt = 1 (i.e., a P-pair is attached) For example, Figure 10a illustrates Watt chain with two prismatic joints. A binary link B is attached to links A and C by prismatic joints. This arrangement disagrees with rule R2. Using the generated TLC for loop-2, two consecutive elements have Lx = 2 and Jt = 1.

Check for Rejected Chains Using TLC
During the enumeration process, the assignment of P-joints should take into consideration three rules introduced by [7]: R1-No link of a chain can contain only P-pairs which directions are parallel. R2-Binary links of a chain with only P-pairs cannot be connected directly. R3-No closed circuit of a chain can have less than two R-pairs.
All generated graphs must be evaluated according to these rules. The proposed TLC is an efficient tool to detect and eliminate graphs that do not agree with the previous rules as follows: Case 1. A KC is said to be rejected due to R 2 if two consecutive elements for any loop have: L x or L y = 2 (i.e., a binary link is connected) and J t = 1 (i.e., a P-pair is attached) For example, Figure 10a illustrates Watt chain with two prismatic joints. A binary link B is attached to links A and C by prismatic joints. This arrangement disagrees with rule R 2 . Using the generated TLC for loop-2, two consecutive elements have L x = 2 and J t = 1. Case 2. A KC is said to be rejected due to R 3 if there are (n − 1) elements, for a given loop, with J t = 1. (i.e., loop has n-elements with (n − 1) P-joints). Loop-1 in the Stephenson chain, shown in Figure 10b, has four elements and three sliders. However, it should contain two R-joints at least.  Figure  10b, has four elements and three sliders. However, it should contain two R-joints at least. The established VC ++ code is applied effectively to detect all rejected graphs. Figure  9 illustrates some rejected KCs for the Stephenson chain containing 3-sliders such as 16th and 17th chains which are rejected due to R2. However, 14th and 19th chains are rejected due to R2 and R3 as well.

Results
A general algorithm is presented to obtain an atlas of N-bar KCs containing sliders. The proposed algorithm has been applied successfully to generate an atlas of 6-bar and 8-bar chains with up to 3 sliders. Rules of adding prismatic joints introduced by [7] are considered. Therefore, some results are not coincident with [1]. The developed technique produces 37 and 1350 non-isomorphic KCs for 6-bar and 8-bar chains, respectively. The presented algorithm is also used to generate KCs with up to 3-sliders of a 10-bar chain for the first time. This produces 13, 73, and 222 KCs with 1, 2, and 3-sliders, respectively. Detailed results for 6-bar and 10-bar chains are presented in Table 1. Brief results of the proposed algorithm and other literature are shown in Table 2. Atlases of Stephenson chain containing 1, 2, and 3 sliders are shown in Figure 11. Atlases of Watt chain with 1, 2, and 3-sliders are shown in Figure 12. Some non-isomorphic 10-bar KCs with 1, 2, and 3-sliders are shown in Figure 13.  The established VC ++ code is applied effectively to detect all rejected graphs. Figure 9 illustrates some rejected KCs for the Stephenson chain containing 3-sliders such as 16th and 17th chains which are rejected due to R 2 . However, 14th and 19th chains are rejected due to R 2 and R 3 as well.

Results
A general algorithm is presented to obtain an atlas of N-bar KCs containing sliders. The proposed algorithm has been applied successfully to generate an atlas of 6-bar and 8-bar chains with up to 3 sliders. Rules of adding prismatic joints introduced by [7] are considered. Therefore, some results are not coincident with [1]. The developed technique produces 37 and 1350 non-isomorphic KCs for 6-bar and 8-bar chains, respectively. The presented algorithm is also used to generate KCs with up to 3-sliders of a 10-bar chain for the first time. This produces 13, 73, and 222 KCs with 1, 2, and 3-sliders, respectively. Detailed results for 6-bar and 10-bar chains are presented in Table 1. Brief results of the proposed algorithm and other literature are shown in Table 2. Atlases of Stephenson chain containing 1, 2, and 3 sliders are shown in Figure 11. Atlases of Watt chain with 1, 2, and 3-sliders are shown in Figure 12. Some non-isomorphic 10-bar KCs with 1, 2, and 3-sliders are shown in Figure 13.