Search
Close this search box.

ON THIS PAGE

Research on Automatic PCB Routing Strategy based on Ant Colony Algorithm

Yongxing Wang1
1School of Electronics and Information Engineering, Shenzhen Polytechnic University, Shenzhen 518055, China.

Abstract

In the design of printed circuit boards (PCBs), routing is a critical step that affects their performance and quality. Traditional manual wiring methods are not only time-consuming and error-prone, but also difficult to meet the design requirements of modern high-density and high-performance circuit boards. In this paper, an automatic PCB routing strategy based on ant colony algorithm is investigated, aiming to improve the routing efficiency and quality. Ant colony algorithm, as a swarm intelligent optimisation algorithm, has better robustness and constraints and is suitable for solving complex wiring problems. In this paper, we focus on two common wiring requirements, equal-length wiring and differential pair wiring. For equal length cabling, each line is optimised to meet the length matching requirement by setting the maximum length value and minimum length value using the ant colony algorithm. For differential pair wiring, firstly, the equidistance of signal lines is ensured by the method of two ants walking at the same time, and then the length of the line is fine-tuned to ensure that the length of the two signal lines is the same. The experimental results show that the improved ant colony algorithm has strong convergence and optimisation ability under the constraints of equal-length wiring and differential pair wiring, which provides an effective solution for PCB automatic wiring.

Introduction

The rinted Circuit Board (PCB), as an important part of the information technology industry, plays a vital role in modern society. With the continuous progress of electronic technology, PCB has been widely used in aerospace, medical, transport, agriculture and many other fields. Especially driven by the demand for high-frequency and high-rate data transmission, the performance requirements of PCBs are increasing. With the development of packaging technology and the increase of integration, the design of PCBs has become more complex and important [1,2]. In PCB design, wiring, as the last step of design, directly affects the performance and reliability of the board [3]. For example, the delay of high-speed signal transmission, signal interference, and power consumption need to be effectively addressed in the wiring stage [4].

In practice, design engineers are usually able to design circuit diagrams with complex functions, but when performing the actual wiring, manual wiring is not only inefficient but also prone to errors due to the complex and time-consuming wiring process. Especially in large-scale designs, manual wiring takes a lot of time and manpower, which increases the design cost. In addition, with the increase in board integration, the wiring requirements have become more diverse, such as differential pair wiring, length-matched wiring, and symmetric wiring [5,6]. Traditional wiring tools have been difficult to meet the needs of modern PCB design and lack effective solutions [7].

Since PCB wiring problems are NP-hard problems, they are difficult to be solved by traditional mathematical modelling and optimization methods [8]. In this context, swarm intelligence algorithms, as an emerging optimisation method, show the potential to solve complex wiring problems. Ant colony algorithm, as one of swarm intelligence algorithms, has better robustness and constraints, and is able to consider multiple constraints simultaneously in the wiring process and optimise the feasible solution through iteration [9,10].

Although ACO algorithms perform well in solving complex optimisation problems, they still face many challenges in PCB wiring applications. Firstly, the wiring process needs to consider a variety of constraints, such as wire length matching, interference minimisation and path shortening [11]. These constraints constrain each other and increase the complexity of the problem. Secondly, the ant colony algorithm is prone to fall into local optimal solutions and converge slowly when dealing with large-scale wiring problems [12]. In addition, modern PCB wiring needs to deal with a large number of signal lines, and the performance of the traditional ACO algorithm on large-scale problems has not been fully verified [13].

In practice, equal-length cabling and differential pair cabling are two common and challenging cabling requirements. Equal-length cabling requires that the length of the same set of signal lines be essentially the same to ensure the synchronisation and integrity of high-frequency signal transmission [14]. Differential pair wiring, on the other hand, requires two signal lines to be consistent in length and distance to improve the anti-interference ability and signal integrity [15]. How to improve the convergence speed of the algorithm and the quality of the solution while ensuring the equal-length wiring and differential-pair wiring is the difficulty of the current research.

Currently, research solutions for PCB wiring problems are divided into two main categories: methods based on traditional optimisation algorithms and methods based on intelligent optimisation algorithms. Although traditional optimisation algorithms such as the exhaustive method can find the globally optimal solution, their time complexity is often exponential and difficult to be applied in large-scale problems.The methods based on intelligent optimisation algorithms, such as genetic algorithms and particle swarm algorithms, are able to find an approximate optimal solution in a shorter period of time, but still suffer from the problems of local optimality and slow convergence when dealing with multi-constraint and large-scale problems [16].

In terms of isometric wiring, traditional methods mainly use greedy algorithms to extend shorter lines by snaking lines and so on. However, this method easily leads to the blocking of other lines and reduces the success rate of wiring [17].In terms of differential pair wiring, existing studies mainly focus on equidistant and length matching of lines, but less consideration is given to metrics such as path offset, resulting in poor wiring quality [18].

In this paper, an automatic PCB routing strategy based on ant colony algorithm is proposed, and an improved ant colony algorithm is designed to improve the efficiency and quality of routing for the needs of equal-length routing and differential pair routing. In equal-length wiring, this paper uses the ACO algorithm to optimise each line by setting the maximum length value and minimum length value to ensure the consistency of the line length.In differential pair wiring, equal spacing of the signal lines is first ensured by two ants walking at the same time, and then the line lengths are fine-tuned to ensure that both signal lines are the same length.

The improved ACO algorithm has the following advantages when dealing with multi-constraint and large-scale problems:

  1. In the wiring process, multiple constraints such as line length matching, interference minimisation and path shortest are considered simultaneously to improve the quality of the solution through iterative optimisation.

  2. Speed up the convergence of the algorithm by optimising the pheromone evaporation and updating mechanism to prevent falling into local optimal solutions.

  3. In large-scale wiring problems, the improved ACO algorithm can effectively handle a large number of signal lines and improve the success rate and quality of wiring.

  4. This paper experimentally verifies the effectiveness of the improved ant colony algorithm in isometric wiring and differential pair wiring, demonstrating the advantages of the algorithm in dealing with practical problems.

2. Equal Length Cabling

A. Equal length wiring

Due to the increased performance of current boards, it is often necessary to accomplish high frequency communications, making the control of clock frequencies more and more stringent. Especially when clock frequencies above gigahertz are used on boards, time constraints become very strict.The signal delay is often due to mismatch of wire lengths, which is one of the most important causes of circuit performance. Typically, the delay of a circuit is proportional to the length of the wire, and control of the delay can be converted to control of the wire length, hence the need for equal-length wiring on devices with high clock frequencies.As shown in Figure 1, this wiring method needs to ensure that the lengths of the wires within a set of wire networks are basically the same or the maximum length error is small, and this is one of the important needs of the current high-frequency circuit board wiring.

Equal-length wiring, which can also be referred to as length-matched wiring, is mainly accomplished by placing certain constraints on the length of the line; the constraints are mainly classified into two cases, which are maximum-minimum length constraints and finite-length difference constraints.

The ant colony algorithm has a positive feedback mechanism that can work with the pheromone of ants to constrain the objective. In the case of isometric wiring, the difference in length within the line network can be used as an optimisation objective to achieve the result of consistent lengths for each line.During path selection, the difference between the current line length and the target length will be used to judge whether a detour is needed to satisfy the line length constraint, but a detour that is too large may cause the current line to occupy the area of other lines in the same line network, forcing the other lines to detour again.In order to prevent other ants from occupying all the key nodes of certain lines, randomly selected endpoints of equidistant lines are used in this algorithm for layout as a way to increase the success rate of the line network layout.

B. Algorithm design

The isometric lines can be completed in two phases when they are laid out, firstly in the first phase the shortest line lengths are wired for each line, taking the maximum and minimum of all line lengths in the current line network as the primary constraints, and the shortest total line lengths as the secondary constraints.Then in the second stage, to speed up the convergence of the algorithm, the pheromone at the end of the first stage is used as the initial value of the current ant pheromone. Using \({\tau _{\min }}\) and \({\tau _{\max }}\) as boundaries, half of the pheromone on each side is volatilised to prevent the algorithm from converging too quickly making the feasible solution of poor quality.The final value is set as the target length value, which corrects the length of each end line in the current line network, and is updated when the algorithm converges to prevent the length of the current longest line from being exceeded. When updating the pheromone in the second stage, the current line length should be made to converge quickly to the vicinity of the specified line length, so the pheromone increment for each side is calculated as shown in Eq. (1).

\[\label{e1} \Delta \tau_{i j}=\left\{\frac{Q}{a b s\left(\frac{L_{b e s t}-\operatorname{maxLen}}{0}\right)} \frac{i f(i, f) \in \text { current optimal path }}{\text { otherwise }}\right..\tag{1}\]

Since the isometric line network is composed of multiple sets of two-ended line networks, the basic idea of two-ended wiring can be borrowed. In the first stage, the end condition of a single iteration is that all the two-end contour lines in the current line network are wired through, and the smallest feasible solution is selected as the current optimal solution after several iterations. In the second stage, the main focus is to expand the line length less than the isometric line.

C. Presentation of experimental results

In the isometric wiring, can be divided into two stages of wiring, in the current isometric wire mesh group all the two ends of the wire through the case of a group of wire lengths will be obtained. Then take the maximum value of this group as the base value, correct the rest of the line length, and update the line length base value in real time to ensure that the final value of all line lengths are basically the same.In this experiment the base value of the line length is used as the target condition, in order to verify that the improved ant colony algorithm has strong constraints for this type of problem, the value of the line length after each iteration is recorded, and the convergence graph of the line length correction is plotted as well as the final wiring effect.

Figure2 shows the correction convergence diagram and wiring effect diagram of the first group of equal length lines. A total of three equal length lines need to be arranged in this network group. After the first stage of wiring, the values of each wire length are 129, 137, and 115, with a maximum value of 137. Therefore, 137 is used as the initial reference value for layout. Figure 3 shows the correction convergence diagram and wiring effect diagram of the second group of equal length lines. There are a total of five equal length lines that need to be arranged in this network group. After the completion of the first stage layout, the lengths of each line are 120, 126, 132, 138, 144, and the maximum value of 144 is selected as the initial benchmark value for equal length lines.

As can be seen from the figure, when the line length benchmark value is determined, the rest of the line length that does not meet the value will be quickly adjusted and converge to the benchmark line length, in order to achieve the basic consistency of the line length in the line network group. It is shown that updating the pheromone with different objective values as constraints can directly affect the final convergence result of the algorithm to satisfy the effect of improving the ant colony algorithm with stronger constraints.

3. Differential Pair Wiring

A. Differential signal lines

Differential signal lines are very common in high-speed circuit board design, such as USB, HDMI and Ethernet for data transmission are wired as differential pairs. Differential pairs have good immunity to electromagnetic interference, and each pair of differential lines carries signals of the same size and in opposite directions, which are transmitted along a channel .Since the signal lines are in close proximity, noise on the channel is absorbed by both signals at the same time. When wiring differential pairs, it is necessary to consider matching the lengths of the two lines as a way to improve the performance and signal integrity of the circuit. Usually, when arranging differential signal lines, length matching is used for close wiring. Figure 4 illustrates the wiring intent of a pair of differential signal transmission lines, from which it can be seen that the differential signal lines remain equally spaced and close together in length.

Single-ended signal lines are used to transmit signals with one signal line and one ground line, and the voltage amplitude may change during transmission due to external influences.When the signal reaches the opposite end, the difference between the size of the signal and the ground will change, which is not the same as when it was sent, resulting in the opposite end not being able to receive the correct signal, so the transmission method has poor anti-interference capability.

The signal transmission waveform on the differential signal line is shown in Figure 5, where \({v_a} = – {v_b}\). From the graph, it can be seen that at any time, the voltage on both signal lines is the same, and the direction is opposite. The voltage difference between the two transmission lines is \(v = {v_a} – {v_b} = 2{v_a}\). If external interference causes the voltage on the differential signal line to shift at a certain moment, with an amplitude of t , then the voltage difference between the two transmission lines is \(v = ({v_a} + \Delta v) – ({v_b} + \Delta v) = 2{v_a}\). This voltage difference is the same as the difference without interference, indicating that the differential signal line has a suppressive effect on noise with appropriate offset.From a signal integrity point of view, differential signals can suppress crosstalk, synchronous switching noise, power supply noise, and ground plane bounce noise.

After arranging the differential signal lines, it is necessary to judge whether the two line lengths are the same. If the line lengths are not equal then equal length processing is performed, otherwise there will be a time delay during signal transmission and the phase on the longer signal line will be shifted back, as shown in Figure 6. If the transmission of two signal lines cannot be unified in terms of timing, it will cause a change in the voltage difference on the line, which will prevent the receiving end from obtaining the correct signal.

B. Algorithm description and result presentation

The wiring of differential pairs using ACO algorithm can be done in two steps, the first step is to consider only the requirement of equidistance so that two ants walk at the same time and the second step is to satisfy the requirement of line length.In the first step, the adjacency finding method needs to be adjusted so that each time the next step of the line is performed, the two ants move together, and its purpose is to constrain the two signal lines to be strictly equidistant. In the second step it is necessary to fine-tune the line length on the basis of the first step wiring to ensure that the line length is consistent.

When carrying out the first step of isometric wiring, all the steps are the same as the two-end wiring, except for the search method of neighbouring points. According to the current walking direction of the ants to judge the next reachable point, and then use the selection probability formula for state selection, if the current ants search for the end point or the next reachable point is empty then stop searching.The algorithm still requires several iterations, and during each iteration, each pair of ants is given a set of feasible solutions, but only the solution with the optimal path among them needs to be chosen as the result of this iteration.Since the spacing constraints of the two ants have been ensured during the neighbourhood pathfinding process, the minimum path length difference between the two ants is first taken as the primary goal in the subsequent selection. When the path length difference is consistent then the requirements such as line length and number of inflection points are constrained separately, and the pheromone is updated after each iteration to prepare for the next iteration.

The ants can be divided into two cases when searching for neighbouring points, straight or cornering, for straight points it is straightforward to judge whether the next point in the current direction is feasible or not, if it is unreachable then the neighbouring point is dropped, otherwise it is added to the neighbouring point vector.For the adjacent points that need to turn, the judgment is based on the specific situation. In Figure 7, the eight situations where ants turn are illustrated using images. The turning methods are divided into bottom right, top right, bottom left, top left, top right, top left, bottom left, and bottom right based on the current direction and the direction to be reached. When turning, take the current position of one ant as the origin, and the other ant explores the path.Firstly, determine whether the position where the circle is located in the figure is feasible or not, if it is feasible, then it means that the ants are allowed to make a turn in the current direction and add the point after the turn to the neighbouring point vector, otherwise, they should give up travelling away from that direction.

After completing the equidistant wiring, there exists a line between each of the two starting points and the target point, but the lengths of these two lines are not necessarily the same. Line expansion is required to achieve equal length in differential pair wiring, so the shorter line is mainly corrected in the second step of differential pair wiring.In the process of correcting a line, it is inevitable that fluctuations in the line will need to occur, thus destroying the equidistance constraints, so it is often desirable that the line being expanded is less distant from the original line, a problem that can be measured using the path offset degree.

Path offset is used to measure the deviation between the expanded path and the current path, and can control the trajectory of the expanded route to be as consistent as possible with the original route. As shown in Figure 8, Line1 is the original line, Line2 is the expanded line, and \({t_1}\) and \({t_2}\) respectively represent the size of the area blocks that the expanded line deviates from the original line.The path offset is the sum of the squares of the sizes of these area blocks, for example, the path offset of Line 2 relative to Line 1 is \(t = t_1^2 + t_2^2\). The purpose of adding square operations to each offset block is to prevent the existence of large offset blocks and to make the expanded line as close as possible to the original line.When using the improved ACO algorithm for the second wiring step, the line length difference should be used as the first constraint and the path deviation as the second constraint. When the path deviation is small, it means that the corrected line is basically the same spacing as the other signal line, because the original line is perfectly equidistant from the other signal line.Thus correcting for line length in the case of equidistant can be converted to controlling the line length of the current path as well as the degree of offset from the original path to satisfy the requirements of differential pair wiring.

The following experiment shows two sets of differential pair routing, one group does not require line length correction, while the other group requires line length correction, to demonstrate the rationality of the algorithm design. Figure 9 shows the wiring effect of two sets of differential signal lines, where Figure 9 does not require length matching processing, and the line length and distance are completely consistent at the end of the first step of wiring.it is not possible to find a set of lines that have exactly the same length, so the second step of length matching processing is needed. From the graph, it can be seen that ants make small fluctuations around the original line, thereby achieving the effect of extending the line.

4. Conclusion

In this paper, a PCB auto-routing strategy based on improved ant colony algorithm is proposed, and an optimisation scheme is designed and experimentally verified for the requirements of equal-length routing and differential pair routing.Through an in-depth analysis of the specific needs of isochronous and differential pairs of cabling, this paper investigates how to improve the efficiency and quality of cabling while meeting these needs. The following are the main conclusions of this paper’s research:

The improved ant colony algorithm proposed in this paper performs well in dealing with PCB wiring problems with multiple constraints. By optimising the pheromone volatility and updating mechanism, the convergence speed and global search ability of the algorithm are improved, and the problem of falling into local optimal solutions is effectively avoided. The experimental results show that the improved ACO algorithm achieves significant performance improvement in both equal-length wiring and differential pair wiring tasks.

The wiring strategy studied in this paper is able to handle multiple constraints simultaneously, including line length matching, interference minimisation and path shortest. By setting the maximum length value and minimum length value, and optimising each line using the ant colony algorithm, this paper effectively achieves the requirement of equal length wiring. In terms of differential pair wiring, the equidistant and length-matched signal lines are ensured by the method of synchronous walking of double ants, thus improving the integrity and anti-interference capability of signal transmission.

Through experimental verification of multiple PCB design examples, the improved ant colony algorithm proposed in this paper performs better than traditional methods in both equal length routing and differential pair routing tasks. The experimental results show that the improved ant colony algorithm significantly improves the success rate and quality of routing when dealing with large-scale routing problems, fully demonstrating its feasibility and effectiveness in practical applications.

Although the research in this paper has achieved remarkable results, there are still some issues that deserve further exploration. Future research directions include further optimising the parameter settings and pheromone updating mechanism of the ant colony algorithm, and improving the convergence speed and quality of the algorithm. Research more adaptable routing algorithms for larger and more complex PCB designs to meet the challenges in real engineering. Develop more comprehensive optimisation algorithms by introducing more constraints and optimisation objectives in the routing process, such as power consumption, signal integrity and thermal management.Combining the Ant Colony algorithm with other intelligent optimisation algorithms (e.g. Genetic Algorithm, Particle Swarm Algorithm, etc.) and exploring the application of Hybrid Optimisation Methods to improve the efficiency and quality of wiring.

References

  1. De Sirisuriya, S. C. M. S., Fernando, T. G. I., & Ariyaratne, M. K. A. (2023). Algorithms for path optimizations: a short survey. Computing, 105(2), 293-319.

  2. Vairaprakash, S., Karuppaiah, J., Buvaneswari, B., & Alghamdi, A. (2023). Removal of Salt and Pepper Noise Using Hybrid Adaptive Switching Median Filter with Ant Colony Optimization Technique in Nano Electronic Applications. Journal of Nanoelectronics and Optoelectronics, 18(1), 85-94.

  3. Dhouib, S., & Zouari, A. (2023). Optimising the non-productive time of robotic arm for drilling circular holes network patterns via the Dhouib-Matrix-3 metaheuristic. International Journal of Mechatronics and Manufacturing Systems, 16(2-3), 320-338.

  4. Dhouib, S., & Pezer, D. (2023). Increasing the performance of computer numerical control machine via the dhouib-matrix-4 metaheuristic: Metaheuristic for computer numerical control machine. Inteligencia Artificial, 26(71), 142-152.

  5. Leng, J., Zhu, X., Huang, Z., Xu, K., Liu, Z., Liu, Q., & Chen, X. (2023). ManuChain II: Blockchained smart contract system as the digital twin of decentralized autonomous manufacturing toward resilience in industry 5.0. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 53(8), 4715-4728.

  6. Sang, H., Li, Z., & Tasgetiren, M. F. (2024). An Effective Optimization Method for Integrated Scheduling of Multiple Automated Guided Vehicle Problems. Tsinghua Science and Technology, 29(5), 1355-1367.

  7. Sahin, M. (2023). Solving TSP by using combinatorial Bees algorithm with nearest neighbor method. Neural Computing and Applications, 35(2), 1863-1879.

  8. Wang, Z., Shen, Y., Li, S., & Wang, S. (2023). A fine-grained fast parallel genetic algorithm based on a ternary optical computer for solving traveling salesman problem. The Journal of Supercomputing, 79(5), 4760-4790.

  9. Desnanjaya, I. G. M. N., Pradhana, A. A. S., Putra, I. N. T. A., Widiastutik, S., & Nugraha, I. M. A. (2023). Integrated room monitoring and air conditioning efficiency optimization using ESP-12E based sensors and PID control automation: a comprehensive approach. Journal of Robotics and Control (JRC), 4(6), 832-839.

  10. Pham, D., Song, Y., Laili, Y., Ismail, A., Hartono, N., Packianather, M., & Castellani, M. (2024). The Bees Algorithm and Its Applications in Production and Manufacturing. International Journal of Advances in Production Research, 1(1), 1-10.

  11. eokar, S., Kumar, N., Singh, R. P., & Sahu, S. (2023). Toolpath optimisation for drilling process using shortest distance permutation algorithms. Advances in Materials and Processing Technologies, 9(1), 284-296.

  12. Singh, L. K., Khanna, M., Thawkar, S., & Singh, R. (2023). Nature-inspired computing and machine learning based classification approach for glaucoma in retinal fundus images. Multimedia Tools and Applications, 82(27), 42851-42899.

  13. Li, X., Zhao, Q., Tang, H., Yang, S., Lei, D., & Wang, X. (2024). Joint scheduling optimisation method for the machining and heat-treatment of hydraulic cylinders based on improved multi-objective migrating birds optimisation. Journal of Manufacturing Systems, 73, 170-191.

  14. Jafari, B., & Bayat, P. (2024). Performance improvement of distributed cache using middleware session. The Journal of Supercomputing, 80(8), 10818-10862.

  15. Agrawal, R., Majumdar, A., Kumar, A., & Luthra, S. (2023). Integration of artificial intelligence in sustainable manufacturing: current status and future opportunities. Operations Management Research, 16(4), 1720-1741.

  16. Jian, C., Pan, Z., Bao, L., & Zhang, M. (2024). Online-learning task scheduling with GNN-RL scheduler in collaborative edge computing. Cluster Computing, 27(1), 589-605.

  17. Daneshmand, M., Noroozi, F., Corneanu, C., Mafakheri, F., & Fiorini, P. (2023). Industry 4.0 and prospects of circular economy: a survey of robotic assembly and disassembly. The International Journal of Advanced Manufacturing Technology, 124(9), 2973-3000.

  18. Tian, M. W., Alattas, K. A., Guo, W., Taghavifar, H., Mohammadzadeh, A., Zhang, W., & Zhang, C. (2024). A strong secure path planning/following system based on type-3 fuzzy control, multi-switching chaotic systems, and random switching topology. Complex & Intelligent Systems, 10(2), 1997-2012.

Related Articles
Cansu Aykut Kolay1, İsmail Hakkı Mirici2
1Hacettepe University Graduate School of Educational Sciences, Ankara, Turkey.
2Hacettepe University, Faculty of Education, Ankara, Turkey.
Shatha M. AlHosian1
1College of Business Adminisrtation, King Saud University, Saudi Arabia.
Mustafa N. Mnati1, Ahmed Salih Al-Khaleefa2, Mohammed Ahmed Jubair3, Rasha Abed Hussein4
1Department of electrical engineering, Faculty of Engineering, University of Misan, Misan, Iraq.
2Department of Physics, Faculty of Education, University of Misan, Misan, Iraq.
3Department of Computer Technical Engineering, College of Information Technology, Imam Ja’afar Al-Sadiq University, Iraq.
4Department Of Dentistry, Almanara University for Medical Science, Iraq.
Samirah Dunakhir, Mukhammad Idrus1
1Faculty of Economics and Business, Universitas Negeri Makassar, Indonesia.

Citation

Yongxing Wang. Research on Automatic PCB Routing Strategy based on Ant Colony Algorithm[J], Archives Des Sciences, Volume 74 , Issue S1, 2024. -. DOI: https://doi.org/10.62227/as/74s119.