1 Introduction

As the effective tool for mathematical modeling, graph theory has been used to generate various topological structures of planetary gear train [1], hydraulic excavator [2], robotic manipulator [3], and other mechanisms since the 1960s. With the help of graph theory and computer technology, the complex mechanism with multiple links and degrees of freedom is creatively designed by Franke’s notation method, transformation method, addition method, and other methods of structural synthesis. However, different methods of structural synthesis may correspond to different results. One of the important reasons is the low reliability of isomorphism identification methods.

Most mechanisms consist of alternating vertices and edges in the kinematic chain or topological graph. They are generally represented by adjacency matrix in the mathematical form. Two mechanisms will be isomorphic if their vertices and edges are in one-to-one correspondence. To improve the efficiency and accuracy of isomorphism identification in structural synthesis, based on the connection relationship between vertices and edges, many classical methods such as the characteristic polynomial method [4], code method [5], adjacency matrix method [6], loop method [7], and hamming number technique [8] are proposed. With the increasing number of vertices and edges, most existing methods of isomorphism identification may fail due to high computational pressure. During recent decades, numerous scholars focus on isomorphism identification of various topological graphs. At the same time, the rapid development of computer technology has led to the successful application of intelligent algorithms in isomorphism identification. Common intelligent algorithms in the field include evolutionary method [9], competitive Hopfield network algorithm [10], simulated annealing algorithm [11], hybrid immune algorithm [12], multivalued neural network algorithm [13], hierarchical clustering algorithm [14], artificial fish swarm algorithm [15] and ant algorithm [16]. It gives new vitality to traditional methods in identifying complex isomorphic mechanisms.

Although the intelligent algorithm can certainly identify isomorphism of mechanisms, it is easy to fall into local optimal solution or solution failure for the high-dimensional adjacency matrix. It seriously affects the accuracy of isomorphism identification results in structural synthesis. Under this circumstance, numerous scholars use the hybrid intelligent algorithm to improve the solving efficiency and reliability of isomorphism identification. Common hybrid intelligent algorithms include genetic algorithm based on pseudo-crossover operator [17], neural-genetic algorithm [18], hybrid genetic algorithm [19], dynamic expansion tree [20]. But with the increasing number of mechanism components, the hybrid intelligent algorithm takes significantly longer time to identify isomorphism, especially for two non-isomorphic mechanisms.

Mechanism isomorphism identification is an open problem of the non-deterministic polynomial. Although different methods of isomorphism identification have been proposed and successfully applied in the literature, there is still improvement space. Inspired by the above considerations, this paper proposes the global-local search method to identify isomorphism of mechanisms. Specifically, the local search space is determined globally by decision tree algorithm, and then the global optimal solution is strongly searched by HPSO algorithm combining genetic algorithm and particle swarm optimization (PSO) algorithm. There are two main advantages of the proposed method. One advantage is that characteristic paths with same component sequencings are firstly selected to reduce the computational pressure of HPSO in the local search space. The other advantage is that HPSO algorithm can efficiently obtain global optimal solutions in a small search space.

The rest of this paper is arranged as follows. Section 2 introduces some basic concepts. Section 3 introduces the detailed steps of the proposed method in isomorphism identification. Section 4 demonstrates some cases to verify the effectiveness of the proposed method. Sections 5 and 6 are discussion and conclusions, respectively.

2 Basic Concepts

This section introduces some basic concepts related to the proposed method based on decision tree algorithm and HPSO algorithm. The component of the mechanism is generally represented by the link in the kinematic chain or the vertex in the topological graph. To illustrate the basic concepts more clearly, this section takes the link in the kinematic chain as an example.

2.1 Adjacency Matrix

As shown in Eq. (1), adjacency matrix represented by AM describes the connection relationship between the links in the kinematic chain.

$$\:AM={\left[a{m}_{ij}\right]}_{n\times\:n}\:$$
(1)

where n is the number of links in the kinematic chain. amij is the element of AM. As shown in Eq. (2), it represents the connection relationship between links i and j.

$$\:a{m}_{ij}=\left\{\begin{array}{c}1,\text{if\:links\:}i\text{\:and\:}j\text{\:are\:directly\:connected\:with\:the\:rotary\:pair}\\\:2,\text{if\:links\:}i\text{\:and\:}j\text{\:are\:directly\:connected\:with\:the\:prismatic\:pair}\\\:0,\text{otherwise}\end{array}\right.$$
(2)

AM is a symmetric matrix. The value of the element amij is equal to that of the element amji. Elements on the principal diagonal of AM are all zeros. Except for multiple joints, the number of non-zero elements in the row/column i is equal to the degree of link i in the kinematic chain. Notably, the degree of link i is the number of links directly connected to the link i in the kinematic chain.

2.2 Decision Tree Algorithm

The decision tree algorithm is a typical classification method for approximating the value of discrete functions. It consists of three main procedures that are feature selection, decision tree construction, and tree pruning. In this paper, the root link is defined as the link with the smallest number of same link degrees. If there are at least two links meeting the definition of the root link, corresponding links will be selected as the root link in turn. To clearly observe the mapping relationship between links in different kinematic chains, amij corresponding to the selected root link i is generally adjusted into the first row in the updated AM. As shown in Fig. 1, based on Eqs. (1) and (2), the link directly connected to the root link is selected as the leaf link of the first layer. The link directly connected to the leaf link of the first layer is selected as the leaf link of the second layer, and so on. For links in the same branch of the decision tree, the previously selected link does not appear as the leaf link for the new layer. The generation of leaf links in the next layer of the same branch can be terminated until the leaf link in the next layer is directly connected to the root link. Notably, the number of links in the same branch is at least three.

Fig. 1
figure 1

Decision tree algorithm

With the increasing number of links in the kinematic chain, the existing methods of isomorphism identification may fall into the local optimal solution or solution failure. One of the main reasons is that a large number of uncorrelated data increases the difficulty of isomorphism identification between two kinematic chains. The decision tree algorithm can filter out uncorrelated data effectively by tree pruning. Specifically, the branch with the largest number of layers is defined as the characteristic path. Other branches are pruned.

2.3 Hybrid Particle Swarm Optimization Algorithm

After the decision tree algorithm is executed, the number of root links or characteristic paths may be greater than one. Although the relative position order of links in the characteristic path is established, the combination of links inside and outside the characteristic path poses a great challenge to determine whether two kinematic chains are isomorphic. Compared with the exhaustive method, the intelligent algorithm has a great performance in solving the quadratic assignment problem, especially in a smaller search space. Based on the preprocessing result of decision tree algorithm, HPSO algorithm is employed to improve the solving efficiency of isomorphism identification.

HPSO algorithm consists of PSO algorithm and genetic algorithm. As the parallel algorithm for group optimization, PSO algorithm has the advantages of simple operation, fast convergence and high accuracy. It is widely used to solve traveling salesman problem, job-shop scheduling problem, and other global optimization problems.

For the feasible solution space of the PSO algorithm, the initial solution and the optimal solution are both represented by particles. In this paper, the particle consists of the characteristic path and links outside the characteristic path. Each particle position represents a potential optimal solution of the problem. The particle velocity determines the degree of deviation between the particle position and the current corresponding optimal position in the next iteration. The position and velocity of every particle in the next iteration are obtained by Eq. (3). By the fitness function, the fitness value of each particle is calculated to select the optimal position of the particle under the current iteration number. Then, the optimal position is updated.

$$\:\left\{\begin{array}{c}{v}_{i}^{k+1}=w{v}_{i}^{k}+{c}_{1}r\left({P}_{i}^{k}-{x}_{i}^{k}\right)+{c}_{2}r\left({P}_{g}^{k}-{x}_{i}^{k}\right)\\\:{x}_{i}^{k+1}={x}_{i}^{k}+{v}_{i}^{k+1}\end{array}\right.$$
(3)

where k is the current iterative number. w is the weighting factor. xi is the position of the particle whose labeled number is i. vi is the velocity of the particle whose labeled number is i. Pi and Pg are the optimal solution of the particle and that of the swarm, respectively.c1 and c2 are non-negative constant numbers. r is the random function to generate one number between 0 and 1.

The PSO algorithm is simple to operate and quick to converge. However, as the number of iterations increases, optimal solutions become more and more similar under the convergence of swarms. The global optimal solution may be trapped in a local optimal solution. Meanwhile, many variables in Eq. (3) should be determined. It is not suitable for updating particles with the property of discrete integers. Isomorphism identification is essentially the consistency problem of global convergence analysis between two adjacency matrices. Numerous nonconvex and stochastic optimization algorithms, including the scalable proximal Jacobian iteration method [21], Schatten-p norm minimization method [22], and generalized iterated shrinkage thresholdings method [23], have been successfully applied in the global convergence analysis. Although the mentioned algorithm can keep fast convergence speed and high precision in the problem of nonconvex sparse learning, it seems more complex in updating particles of HPSO algorithm. Under this circumstance, genetic algorithm is integrated with the PSO algorithm. Crossover operation and mutation operation in genetic algorithm update particles instead of Eq. (3) in PSO algorithm.

Crossover operation uses integer crossover method. It updates the position of the particle by the crossover based on Pi or Pg. For example, the original particle is [5 4 2 1 3 7 6]. Pg is [5 2 1 6 3 7 4]. Two selected crossover positions are 3 and 5 respectively. By crossover operation, the updated particle is [5 4 1 6 3 7 6]. However, there is the repeated position in the updated particle. Under this circumstance, repeated positions are replaced by uncovered positions in turn. The final particle is [5 4 1 2 3 7 6]. Mutation operation is to interchange two integers within the particle. Based on the same assumption in crossover operation, the updated particle is [5 4 3 1 2 7 6]. If the fitness value of the updated particle is better than that of the original particle, the updated particle will be stored.

2.4 Isomorphism Theorem

Assume there are two graphs G1 = (V1, E1) and G2 = (V2, E2). G1 and G2 will be isomorphic if there is the bijective mapping satisfying Eq. (4).

$$\:u,v\in\:{V}_{1},\left[u,v\right]\in\:{E}_{1}\iff\:\left[f\left(u\right),f\left(v\right)\right]\in\:{E}_{2}$$
(4)

In this paper, AM represents the graph G1 or G2. The AM of G1 is represented by AM1. The AM of G2 is represented by AM2. If the difference between AM1 and AM2 is equal to zero, the two graphs will be isomorphic.

3 Isomorphism Identification

This section takes kinematic chains as an example to introduce the detailed steps of isomorphism identification. Assume there are two kinematic chains named KC1 and KC2. The AM of KC1 is represented by AM1. The AM of KC2 is represented by AM2. The flowchart of the proposed method is listed in Fig. 2.

Fig. 2
figure 2

Detailed steps of isomorphism identification method

3.1 Step 1: List AM

Links in the kinematic chain are firstly numbered. Every link corresponds to one non-repeated number. Based on Eqs. (1) and (2), AM of every kinematic chain is listed.

3.2 Step 2: Calculate Fitness Value

As shown in Eq. (5), the fitness value is represented by f.

$$\:f=F\left(A{M}_{1}-A{M}_{2}\right)$$
(5)

where F is the function that calculates the Euclidean norm of elements in the matrix.

If f is zero, the two kinematic chains will be isomorphic. Otherwise, the following step will be executed.

3.3 Step 3: Algorithm Preprocessing

Based on AM, the decision tree algorithm is used to generate the root link and corresponding characteristic path. The sequence of link numbers in the former rows of the AM corresponds to that of link numbers in the characteristic path. The other links out of the characteristic path are arranged in the latter columns of the AM. If there is no one-to-one correspondence between characteristic paths in the form of link degree in different kinematic chains, the two kinematic chains will not be isomorphic. And the following step will be executed.

3.4 Step 4: Execute HPSO Algorithm

Links in KC2 are taken as the element source of particles and swarms in HPSO algorithm. The number of particles and that of swarms are firstly initialized, which are represented by Np and Nmax, respectively. Based on the fitness function in Eq. (5), the fitness value corresponding to every particle is calculated. After the first iteration, the particle whose corresponding fitness value is minimum is selected as Pi and Pg. In the second iteration, by crossover operation between the particle and Pi, crossover operation between the particle and Pg, mutation operation between particles, every particle is updated in turn. The HPSO algorithm will not be terminated until the iteration number is equal to Nmax or f is zero.

3.5 Step 5: Identify Isomorphism

Based on the isomorphism theorem, if f is zero, the two kinematic chains will be isomorphic. Otherwise, they are not isomorphic.

4 Case Study

To verify the effectiveness of the proposed method in isomorphism identification, this section introduces some different cases such as 14-link kinematic chains, 18-vertex topological graphs, and 8-vertex planetary gear trains. The detailed steps of the proposed method are executed in MATLAB 2016b on a computer with a CPU of 2.80 GHz and a memory of 8.00 GB.

4.1 Kinematic Chains with 14 Links

Two kinematic chains with 14 links are shown in Fig. 3. Their corresponding AMs are listed in Eqs. (6) and (7). On this basis, the fitness value in Eq. (5) is not equal to zero. Combined with the related definitions of decision tree algorithm in Sect. 2.2, link 8 in KC1 and link 4 in KC2 are selected as root links. After the decision tree algorithm is executed, the number of characteristic paths in Fig. 3(a) and Fig. 3(b) are both 5. The path 8-7-6-5-13-11-12-3-2-1-10-9 in Fig. 3(a) is assumed to be the final characteristic path. Notably, links 4 and 14 in Fig. 3(a) is out of the characteristic path. Links in the characteristic path can be regarded as the whole new link. Under this circumstance, the HPSO algorithm is employed. Specifically, Np and Nmax are 20 and 50, respectively. The particle in Fig. 3(b) consists of the characteristic path, link 8, and link 10. The variable value of the characteristic path is a number between 1 and 5. The variable values for links 8 and 10 are relative position numbers ranging from 13 to 14. The swarm includes 20 particles. According to the numbering order of particles in the swarm, positions of elements in AM2 are sequentially adjusted. Based on the isomorphism theorem, the two kinematic chains are isomorphic. The result is consistent with that by artificial fish swarm algorithm [15]. The detailed link correspondence from KC2 to KC1 is listed in Table 1.

Fig. 3
figure 3

Two kinematic chains with 14 links

$$\:A{M}_{1}=\left[\begin{array}{cccccccccccccc}0&\:1&\:0&\:0&\:0&\:0&\:0&\:1&\:0&\:1&\:0&\:0&\:0&\:0\\\:1&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0\\\:0&\:1&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:1&\:0&\:0\\\:0&\:0&\:1&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0\\\:0&\:0&\:0&\:1&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:1&\:1&\:1\\\:0&\:0&\:0&\:0&\:1&\:0&\:1&\:0&\:0&\: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1&\:0\\\:1&\:0&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0\\\:0&\:0&\:0&\:1&\:0&\:0&\:0&\:0&\:1&\:0&\:0&\:1&\:0&\:0\\\:0&\:0&\:0&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:1&\:0&\:1&\:0\\\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:1&\:0&\:0&\:1&\:0&\:1\\\:1&\:0&\:0&\:0&\:0&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:1&\:0\end{array}\right]$$
(7)
Table 1 Labeled number correspondence from KC2 to KC1

4.2 Topological Graphs with 18 Vertices

Fig. 4
figure 4

Two topological graphs with 18 vertices

$$\:A{M}_{1}=\left[\begin{array}{cccccccccccccccccc}0&\:1&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:1&\:1&\:0&\:0&\:0&\:0&\:0&\:0&\:0\\\:1&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:0&\:0\\\:0&\:1&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0\\\:0&\:0&\:1&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:1&\:0&\:0&\:0&\:0&\:0\\\:0&\:0&\:0&\:1&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:1&\:0&\:0&\:0&\:0\\\:0&\:0&\:0&\:0&\:1&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:0&\:1&\:0&\:0&\:0&\:0\\\:0&\:0&\:0&\:0&\:0&\:1&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:0&\:1&\:0&\:0&\:0\\\:0&\:0&\:0&\:0&\:0&\:0&\:1&\:0&\:1&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:0\\\:0&\:0&\:0&\:0&\:0&\:0&\:0&\:1&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\:1&\:0\end{array}\right]$$
(9)

Two topological graphs with 18 vertices are shown in Fig. 4. Their corresponding AMs are listed in Eqs. (8) and (9), respectively. On this basis, the fitness value in Eq. (5) is not equal to zero. Combined with the related definitions of decision tree algorithm in Sect. 2.2, vertices 3 and 8 in Fig. 4(a) are selected as root links. After the decision tree algorithm is executed, there are 6 characteristic paths in Fig. 4(a). Similarly, the number of root links in Fig. 4(b) is 2, and the number of characteristic paths is 6. Notably, all vertices in Fig. 4 are in the characteristic path. Under this circumstance, the HPSO algorithm is employed. Specifically, Np and Nmax are 20 and 50, respectively. The path 3-2-1-10-9-8-7-6-5-14-15-16-17-18-11-12-13-4 in Fig. 4(a) is assumed to be the final characteristic path. The characteristic path in Fig. 4(b) is the particle. The variable value of the characteristic path is a number between 1 and 6. The swarm includes 20 particles. According to the numbering order of particles in the swarm, positions of elements in AM2 are sequentially adjusted. Based on the isomorphism theorem, the two topological graphs are isomorphic. The result is consistent with that by artificial fish swarm algorithm [15]. The detailed vertex correspondence from TG2 to TG1 is listed in Table 2.

Table 2 Labeled number correspondence from TG2 to TG1

4.3 Planetary Gear Trains with 8 Vertices

Fig. 5
figure 5

Displacement graphs of two planetary gear trains with 8 vertices

$$\:A{M}_{1}=\left[\begin{array}{cccccccc}0&\:0&\:0&\:0&\:0&\:1&\:1&\:0\\\:0&\:0&\:1&\:1&\:0&\:0&\:1&\:0\\\:0&\:1&\:0&\:1&\:0&\:0&\:0&\:0\\\:0&\:1&\:1&\:0&\:1&\:0&\:1&\:0\\\:0&\:0&\:0&\:1&\:0&\:1&\:1&\:1\\\:1&\:0&\:0&\:0&\:1&\:0&\:1&\:0\\\:1&\:1&\:0&\:1&\:1&\:1&\:0&\:1\\\:0&\:0&\:0&\:0&\:1&\:0&\:1&\:0\end{array}\right]$$
(10)
$$\:A{M}_{2}=\left[\begin{array}{cccccccc}0&\:0&\:1&\:1&\:0&\:1&\:0&\:0\\\:0&\:0&\:0&\:0&\:1&\:1&\:0&\:0\\\:1&\:0&\:0&\:1&\:0&\:0&\:0&\:0\\\:1&\:0&\:1&\:0&\:1&\:1&\:0&\:0\\\:0&\:1&\:0&\:1&\:0&\:1&\:0&\:1\\\:1&\:1&\:0&\:1&\:1&\:0&\:1&\:1\\\:0&\:0&\:0&\:0&\:0&\:1&\:0&\:1\\\:0&\:0&\:0&\:0&\:1&\:1&\:1&\:0\end{array}\right]$$
(11)

Two displacement graphs of planetary gear trains with 8 vertices are shown in Fig. 5 [24]. They are represented by PGT1 and PGT2, respectively. Their corresponding AMs are listed in Eqs. (10) and (11), respectively. On this basis, the fitness value in Eq. (5) is not equal to zero. Combined with the related definitions of decision tree algorithm in Sect. 2.2, vertex 7 in Fig. 5(a) and vertex 6 in Fig. 5(b) are selected as root links. After the decision tree algorithm is executed, the characteristic path in Fig. 5(a) is 7-2-3-4-5-6-1, and the characteristic path in Fig. 5(b) is 6-1-3-4-5-8-7. Meanwhile, vertex 8 in Fig. 5(a) and vertex 2 in Fig. 5(b) are both out of the characteristic path. Under this circumstance, the HPSO algorithm is employed. Specifically, Np and Nmax are 20 and 50, respectively. The particle in Fig. 5(b) consists of the characteristic path and vertex 2. The variable value of the characteristic path is the number 1. The variable value for vertex 2 is the relative position number 8. The swarm includes 20 particles. According to the numbering order of particles in the swarm, positions of elements in AM2 are sequentially adjusted. Based on the isomorphism theorem, the two PGTs are isomorphic. The result is consistent with that by the perimeter loop-based method [24]. The detailed vertex correspondence from PGT2 to PGT1 is listed in Table 3.

Table 3 Labeled number correspondence from PGT2 to PGT1

5 Discussion

The generation of the local optimal solution has a great influence on the solving efficiency and reliability of the computer-aided intelligent algorithm. As the number of links in the kinematic chain increases, the possibility of trapping in local optimal solution will be easily increased. To improve the solving efficiency and reliability of intelligent algorithms in mechanism isomorphism identification, this paper integrates decision tree algorithm and HPSO algorithm. Decision tree algorithm plays a role of directed mutation operation. It classifies links in the kinematic chains into the fixed group and the random group. Links in the fixed group corresponds to links in the characteristic path generated by decision tree algorithm. Assume that the number of links in the characteristic path is Nc. Without decision tree algorithm, the maximum number of combinations among links is n!. Notably, the symbol ! represents the factorial in mathematics. It puts great pressure on HPSO algorithm. However, links in the fixed group can be considered to be a new link. By decision tree algorithm, the maximum number of combinations among links is (n- Nc +1)!. The computational pressure in HPSO will be smaller as the Nc becomes larger.

Kinematic chains with 14 links in Sect. 4.1 is taken as an example. As seen in Fig. 6(a), without considering decision tree algorithm, HPSO algorithm is trapped in local optimal solution, which provides the wrong result in isomorphism identification. It consumes 47.219758 s. After algorithm preprocessing, HPSO can quickly obtain the right result. It consumes 0.606738 s. Notably, IN in Fig. 6 represents iteration number. In terms of computational efficiency and solving accuracy, Table 4 lists the comparison result under some efficient isomorphism identification methods such as the proposed method, artificial fish swarm algorithm (AFSA) [15] and hopfield neural networks (HNN) [25]. Compared with the average operation time in artificial fish swarm algorithm [15], the average operation time based on HPSO algorithm and decision tree algorithm is reduced by about 66.16%. Even for topological graphs with 18 vertices in Sect. 4.2, compared with the average operation time that is 53.1902 s in artificial fish swarm algorithm [15], the average operation time based on HPSO algorithm and decision tree algorithm is approximately 1.8881 s.

Fig. 6
figure 6

The changing trend of f. (a) Without algorithm preprocessing. (b) With algorithm preprocessing

Table 4 Performance comparisons among the proposed method, AFSA and HNN

The effectiveness of the proposed method is verified by various mechanisms such as 14-link kinematic chain, 18-vertex topological graph, and 8-vertex planetary gear train. Compared with the existing isomorphism identification based on intelligent algorithms, the proposed method can keep fast convergence speed and high precision. By the preprocessing operation based on decision tree algorithm, the characteristic path with relative ranking relation of many links is determined. It creates a small search space for HPSO algorithm to obtain the global optimal solution. The global-local search method transforms the global convergence problem of the high-dimensional AM into that of the low-dimensional particle. It greatly relieves the computational pressure of identifying isomorphism. However, if the number of links outside the characteristic path or the number of characteristic paths is large, the computational efficiency of the proposed method will be reduced for the potential scalability issue beyond the examples provided. Under this circumstance, to obtain the global optimal solution of HPSO algorithm in the small search space, some assembly appropriate preprocessing operations around the characteristic path should be implemented.

6 Conclusions

Starting from AM, this paper proposes a global-local search method based on decision tree algorithm and HPSO algorithm to identify isomorphism of various mechanisms. To accelerate the convergence speed of HPSO algorithm in the global optimization process, the characteristic path generated by decision tree algorithm filters out many uncorrelated data. To ensure the solution accuracy of HPSO algorithm in a small search space, crossover operation and mutation operation are used. As shown by a comparison with the literature, the proposed method is available in isomorphism identification among kinematic chains, topological graphs, and planetary gear trains. In addition, it plays an important role in significantly improving the solving efficiency and reliability of isomorphism identification. Results show that the proposed method is a robust choice to identify isomorphism of various mechanisms, especially in structural synthesis.