The symmetry detection method is desired to be reliable. Only in this way can isomorphism be precisely eliminated when synthesizing and designing mechanisms. We propose an algorithm to generate the unique numerical code of each link based on the rearranged moment matrix. The derived unique numerical code can be used to precisely detect symmetric links of kinematic chains.
4.1. Link Group
If the elements in row
i of the rearranged moment matrix are equal to those elements in row
j, links
i and
j are put in the same group. For example, both the elements in rows 2 and 8 in
Figure 8b are (6, 6, 4, 4, 4, 4, 4, 2, 2, 0), hence, links 2 and 8 are put in the same group; similarly, the elements in rows 3, 7, and 9 are (6, 6, 6, 4, 4, 4, 4, 2, 2, 0), hence, links 3, 7, and 9 are put in the same group. Finally, the link groups (LGs) of
Figure 6a are acquired as LGs = {1}, {2, 8}, {3, 7, 9}, {4}, {5}, {6}, {10}. The links in different groups are obviously nonsymmetric because they have the different topological characteristics. It is necessary to further confirm whether the links in the same group are symmetric. In the present example, it is necessary to confirm whether links 2 and 8 in
Figure 6a are symmetric, as well as links 3, 7, and 9.
4.2. Unique Numerical Code
In order to generate the unique numerical code of link i, link i is extracted as the first group to obtain new link groups, denoted as LGsi. For the new link groups LGsi, links in the same group are permuted in all possible ways to derive new relabeling of the kinematic chain. The numerical code of each relabeling is formed by concatenating the upper triangular elements of the associated adjacency matrix row-by-row. The maximum numerical code is defined as the unique numerical code of link i, denoted as the UN-codei. Symmetric links of a kinematic chain can be precisely detected by comparing their unique numerical codes. If UN-codei = UN-codej, links i and j are symmetric; otherwise, they are nonsymmetric.
The vertex group LGs of
Figure 6a are listed in the first row of
Table 1. Taking link 2 for instance, let us discuss how to obtain the unique numerical code of link 2, namely UN-code
2. Link 2 is extracted as the first group and the derived new link groups LGs
2 are {2}, {1}, {8}, {3, 7, 9}, {4}, {5}, {6}, {10}, as listed in the second row of
Table 1. There are six permutations in group {3, 7, 9}, hence, there are six ways to relabel
Figure 6a, as listed in
Table 2. The six ways of relabeling
Figure 6a are shown in
Figure 9. For example, for the first permutation, links 2, 1, 8, 3, 7, 9, 4, 5, 6, 10 of
Figure 6a are relabeled as 1–10, respectively, and the corresponding relabeled graph is shown in the first graph in
Figure 9; for the second permutation, links 2, 1, 8, 3, 9, 7, 4, 5, 6, 10 are relabeled as 1–10, respectively, and the corresponding relabeled graph is shown in the second graph in
Figure 9. The adjacency matrices of the graphs in
Figure 9 are shown in
Figure 10. For example, by concatenating the upper triangular elements of the first graph in
Figure 10, the numerical code of the first graph in
Figure 9 is acquired as C
1 = 101000000-10100101-0010000-001000-00010-1000-101-10-0. The numerical codes of the graphs in
Figure 9 are acquired and listed in
Table 1. Among the six numerical codes C
1–C
6, the largest one is C
1; hence, C
1 is determined as the unique numerical code of link 2, namely UN-code
2 = 101000000-10100101-0010000-001000-00010-1000-101-10-0. In the same way, the unique numerical code of link 8 is UN-code
8 = 101000000-10100101-0010000-001000-00010-1000-101-10-0. Due to UN-code
2 = UN-code
8, we can conclude that links 2 and 8 in
Figure 6a are symmetric.
As another example, let us discuss how to obtain the unique numerical code of link 7, namely UN-code
7. Link 7 is extracted as the first group and the derived new link groups LGs
7 are {7}, {1}, {2, 8}, {3, 9}, {4}, {5}, {6}, {10}, as listed in the second row of
Table 3. There are two permutations in group {2, 8} and two permutations in group {3, 9}, hence there are four ways to relabel
Figure 6a, as listed in
Table 4. The four ways to relabel
Figure 6a are shown in
Figure 11. For example, for the first permutation, links 7, 1, 2, 8, 3, 9, 4, 5, 6, 10 of
Figure 6a are relabeled as 1–10, respectively, and the corresponding relabeled graph is shown in the first graph in
Figure 11. The adjacency matrices of the graphs in
Figure 11 are shown in
Figure 12. For example, by concatenating the upper triangular elements of the first graph in
Figure 12, the numerical code of the first graph in
Figure 11 is acquired as C
1 = 100000010-11000101-010 0000-010000-01000-1000-101-10-0. The numerical codes of the graphs in
Figure 11 are acquired and listed in
Table 3. Among the four numerical codes C
1–C
4, both C
1 and C
4 have the largest value; hence, C
1 (or C
4) is determined as the unique numerical code of link 7, namely UN-code
7 = 100000010-11000101-0100000-010000-01000-1000-101-10-0. In the same way, we can get that both UN-code
3 and UN-code
9 are equal to 010001000-11100101-0000000-010000-00010-1000-101-10-0. Due to UN-code
3 = UN-code
9 and UN-code
7 ≠ UN-code
3, we can conclude that links 3 and 9 in
Figure 6a are symmetric, whereas link 7 is not symmetric with links 3 and 9.
We have developed the symmetry detection software based on the C++ computer programming language, and the software interface is developed based on MFC (Microsoft Foundation Classes). Our present symmetry detection method is fully automatic, and the adjacency matrix is the only input data needed to develop the computer software. Upper triangular elements of the adjacency matrix are stored in a txt file. By reading the adjacency matrix, the topological graph can be automatically sketched, and the detection result can be automatically generated and displayed on the software interface. For example, the automatic detection of symmetric links of the kinematic chain in
Figure 6a is shown in
Figure 13. In the window “symmetric links”, groups {2, 8} and {3, 9} mean that links 2 and 8 are symmetric, and links 3 and 9 are also symmetric.