Chip mounter mounting path optimization method based on anchor point selection particle swarm algorithm
By optimizing the placement path of the pick-and-place machine using a particle swarm optimization algorithm based on anchor point selection, the problem of inflexible anchor point selection in existing methods is solved, the placement path is minimized, and production efficiency is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NINGBO YIK TONG INTELLIGENT TECH CO LTD
- Filing Date
- 2023-06-14
- Publication Date
- 2026-07-07
AI Technical Summary
Existing mounting path optimization methods based on the nearest insertion method or the nearest neighbor algorithm lack the ability to flexibly select anchor points for continuous optimization, which leads to limitations in the search process, resulting in excessively long mounting paths and low production efficiency.
A placement path optimization method for pick-and-place machines based on particle swarm optimization algorithm for anchor point selection is adopted. The anchor point coordinates are obtained through particle swarm optimization algorithm, and combined with the placement path optimization heuristic algorithm, the optimal position and fitness value of individuals and groups are updated to achieve continuous optimization of anchor points.
It significantly shortens the placement path length and improves the production efficiency of the pick-and-place machine. Experimental results show that the efficiency improvement reaches 23.05%.
Smart Images

Figure CN116736690B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for optimizing the placement path of a chip mounter, belonging to the field of electrical technology and electrical engineering. Background Technology
[0002] The continuous development of high technology in the electronics industry has greatly promoted the automation and convenience of production and daily life. In the process of board-level packaging of electronic products, surface mount technology is currently the most mainstream core technology. Pick-and-place machines are key equipment in surface mount technology; their function is to pick up electronic components and chips at high speed and with high precision and then mount them onto the circuit board. For the sake of simplicity, in the following text, "electronic components and chips" will be collectively referred to as "components," and "pick-up and placement" will be abbreviated as "pick-up and placement."
[0003] Pick and place machines based on gantry-type three-dimensional motion platforms, such as Figure 2 As shown. The feeder, mounted on the feeder base, automatically supplies components to the pick-up points. The circuit board is conveyed by the conveyor belt to the stop and clamped, after which the mounting points on the circuit board surface remain stationary. The placement carrier is driven by a motor and moves along a translational guide rail and a fixed guide rail, thereby achieving accurate positioning in the XY plane. The suction rods evenly equipped inside the placement carrier can move up and down in the Z direction, and pick up and place components by evacuating and de-evacuating the vacuum, respectively.
[0004] The pick-and-place process of the placement machine is as follows Figure 3 As shown. A circuit board typically requires mounting a large number of components, therefore, completing the mounting process involves multiple pick-and-place cycles (pick-and-place cycles). The pick-and-place process within each cycle is as follows: the placement carrier moves to the first pick point and picks up the component; driven by the placement carrier, each pick-and-place lever moves sequentially to its corresponding pick point to pick up subsequent components; after all pick-and-place levers have completed component pickup, the placement carrier moves to the first placement point to complete placement; driven by the placement carrier, each pick-and-place lever moves sequentially to its corresponding placement point to place subsequent components. After all pick-and-place levers have completed component placement, the next pick-and-place cycle begins.
[0005] Optimizing the pick-and-place process of a pick-and-place machine can significantly reduce surface mount time. A key objective of pick-and-place process optimization is minimizing the placement path length. Optimizing the pick-and-place process can achieve the same task in less time, greatly improving surface mount efficiency.
[0006] The placement path optimization process generally involves selecting anchor points for each pick-and-place cycle, and then calculating the optimal path based on the anchor point coordinates and a path planning algorithm. The "anchor point" refers to the location point before determining the first placement point in each pick-and-place cycle, used to guide the path planning algorithm in searching for the starting point of the path. In this invention, the path planning heuristic algorithm adopts the method described in patent number ZL202010387811.7, entitled "A Placement Path Planning Method for a Pick-and-Place Machine Based on the Nearest Insertion Method."
[0007] The main drawback of current research is that previous placement path optimization methods based on the nearest insertion method or the nearest neighbor algorithm are all based on fixed anchor points. They lack methods for flexibly selecting anchor points and continuously optimizing them, which limits the search process and easily leads to excessively long placement paths and low efficiency in placement production. Summary of the Invention
[0008] The purpose of this invention is to address the problem that previous placement path optimization methods based on the nearest insertion method or the nearest neighbor algorithm are all based on fixed anchor points and lack a method for continuous optimization by flexibly selecting anchor points. This results in limitations in the search process, which can easily lead to excessively long placement paths and low placement production efficiency. Therefore, this invention proposes a placement path optimization method for pick-and-place machines based on the particle swarm algorithm for anchor point selection.
[0009] The specific process of the placement path optimization method for pick-and-place machines based on the anchor point selection particle swarm algorithm is as follows:
[0010] Step 1: Obtain the pick-and-place machine parameters, circuit board production data, and component allocation results;
[0011] Step 2: Initialize particle swarm parameters;
[0012] Step 3: Randomly initialize the position and velocity of each particle;
[0013] Step 4: Obtain the anchor point coordinates from the positions of each particle and execute the heuristic algorithm for optimizing the mounting path to obtain the corresponding mounting path length as the fitness value for each particle.
[0014] Step 5: Update the individual historical best position and individual historical best fitness value of each particle;
[0015] Step 6: Update the population's historical best position and the population's historical best fitness value;
[0016] Step 7: If the number of searches reaches the limit without improvement, proceed to Step 8; otherwise, update the position and velocity of each particle and proceed to Step 4.
[0017] Step 8: Output the optimal placement path optimization result.
[0018] The beneficial effects of this invention are as follows:
[0019] This invention discloses a placement path optimization method for pick-and-place machines based on an anchor point selection particle swarm optimization algorithm. This method obtains anchor point coordinates using the particle swarm optimization algorithm, then executes a heuristic algorithm for placement path optimization to obtain the corresponding placement path. The placement path length is used as a fitness value to calculate and update the optimal position and optimal fitness value for individuals and the group, thereby significantly shortening the pick-and-place path and improving placement production efficiency. Experiments show that the method provided by this invention can significantly improve the production efficiency of pick-and-place machines, with a maximum efficiency improvement of up to 23.05% compared to commercial software.
[0020] Specifically, this invention has the following two innovative features.
[0021] (1) An improved mounting path optimization method based on the nearest insertion method was proposed by continuously optimizing the selection of anchor points, which overcomes the search limitations caused by using fixed anchor points and improves the algorithm's optimization ability.
[0022] (2) For the continuous adjustment of anchor points, a continuous optimization method based on particle swarm algorithm is proposed. By using the individual and group position updates in particle swarm algorithm, the particle swarm seeks optimization in the direction of the shortest total path, thereby improving the production efficiency of the pick and place machine. Attached Figure Description
[0023] Figure 1 This is a flowchart of the placement path optimization method for a pick-and-place machine according to the present invention;
[0024] Figure 2 A schematic diagram of a chip mounter equipped with a beam-type chip mount carrier;
[0025] Figure 3 This is a flowchart of the pick-and-place process for a chip mounter.
[0026] Figure 4 This is a schematic diagram of the mounting path using the particle swarm optimization algorithm for anchor point selection of the present invention in an embodiment;
[0027] Figure 5 This is a schematic diagram of the mounting path using the fixed anchor point heuristic algorithm in an embodiment.
[0028] Figure 6 This is a convergence curve of the mounting path length in an embodiment of the present invention. Detailed Implementation
[0029] Specific Implementation Method 1: The specific process of the placement machine placement path optimization method based on anchor point selection particle swarm algorithm in this implementation method is as follows:
[0030] Step 1: Obtain the pick-and-place machine parameters, circuit board production data, and component allocation results;
[0031] Step 2: Initialize particle swarm parameters;
[0032] Step 3: Randomly initialize the position and velocity of each particle;
[0033] Step 4: Obtain the anchor point coordinates from the positions of each particle and execute the heuristic algorithm for optimizing the mounting path to obtain the corresponding mounting path length as the fitness value for each particle.
[0034] Step 5: Update the individual historical best position and individual historical best fitness value of each particle;
[0035] Step 6: Update the population's historical best position and the population's historical best fitness value;
[0036] Step 7: If the number of searches reaches the limit without improvement, proceed to Step 8; otherwise, update the position and velocity of each particle and proceed to Step 4.
[0037] Step 8: Output the optimal placement path optimization result.
[0038] Specific Implementation Method Two: This implementation method differs from Specific Implementation Method One in that: the specific process for obtaining the pick-and-place machine parameters, circuit board production data, and component allocation results in step one is as follows:
[0039] Step 11: Import the pick-and-place machine parameters; The pick-and-place machine parameters include the total number of pick-and-place bars H, and the index number of each pick-and-place bar is h∈[1,…,H] in ascending order along the X-axis, with the pick-and-place bar interval being DI;
[0040] Steps 1 and 2: Import circuit board production data; The circuit board production data includes: the total number of component types C, the index number of each type of component is c∈[1,…,C], the number of mounting points of each type of component is stored in an array n with 1 row and C columns; there are a total of Q mounting points of type C components, the index number of each mounting point is q∈[1,…,Q], and the coordinates of the mounting points are stored in an array xyt with Q rows and 2 columns. For example, the X coordinate and Y coordinate of the qth mounting point are xyt(q,1) and xyt(q,2) respectively;
[0041] Step 13: Import component allocation results; The total number of pickup cycles is K, and the index number of each pickup cycle is k∈[1,…,K]; The component allocation results are stored in a two-dimensional array PA with K rows and H columns, where the element PA(k,h) represents the type of component picked up by the h-th picker in the k-th pickup cycle, i.e., PA(k,h)∈[1,…,C];
[0042] The other steps and parameters are the same as in Specific Implementation Method 1.
[0043] Specific Implementation Method Three: This implementation method differs from Specific Implementation Method One or Two in that: the particle swarm parameters are initialized in step two; the specific process is as follows:
[0044] Step 2: 1. Initialize the particle swarm population size to I, and each particle to i, where i = 1, 2, ..., I; initialize the individual learning factor of each particle to c1, the social learning factor to c2, and the inertia factor to w.
[0045] Step 22: Initialize the particle swarm search for the unimproved optimal position count variable as cntImprove and the maximum number of unimproved optimal positions variable as MaxImprove;
[0046] Step 2. Initialize a two-dimensional array PS with K rows and H columns, all of which are zero, to store the mounting sorting results. The element PS(k, s), s∈[1,...,H] represents the number of the s-th picker in the k-th picking cycle, i.e. PS(k, s)∈[1,...,H].
[0047] Other steps and parameters are the same as in specific implementation method one or two.
[0048] Specific Implementation Method Four: This implementation method differs from Specific Implementation Methods One to Three in that: in step three, the position and velocity of each particle are randomly initialized; the specific process is as follows:
[0049] Step 3.1: Initialize the velocity of each particle in the particle swarm; the process is as follows:
[0050] Let V = {v} i Let i = 1, 2, ..., I represent the velocity of all particles in the particle swarm, v i Let v represent the velocity of the i-th particle in the particle swarm. Each particle i has K members, and the velocity v of the i-th particle is... i It contains velocity information in both the x and y directions, represented as v. i = <v ix v iy >;For each v i ∈[0,1] is initialized with a random value within the interval; v ix This represents the velocity information of the i-th particle in the x-direction, v iy This represents the velocity information of the i-th particle in the y-direction;
[0051] Step 3.2: Initialize the positions of each particle in the particle swarm; the process is as follows:
[0052] Let P = {p i Let i = 1, 2, ..., I represent the positions of all particles in the particle swarm, and p i Let p represent the position of the i-th particle in the particle swarm. Since there is position information for each pickup cycle, each particle i has K members. The position p of the i-th particle... i It contains position information in both the x and y directions, denoted as p.i = <p ix p iy >; For each p i ∈[0,1] is initialized with a random value within the interval; p ix p represents the position of the i-th particle in the x-direction. iy This represents the position of the i-th particle in the y-direction;
[0053] Step 3: Initialize the individual optimal position pbesti for each particle i, and the group optimal position gbest = <gbest x gbest y > where the individual's optimal position is initialized to pbest i =p i ;
[0054] Iterate through all picking cycles K, and calculate the initial anchor point star based on the initial position data of each particle. i The anchor coordinates are stored in an array star with K rows and 2 columns. i For example, the X and Y coordinates of the k-th period anchor point are star, respectively. i (k, 1), star i (k, 2), where the optimal anchor point X coordinate is stored in starox and the optimal Y coordinate is stored in staroy; the anchor point coordinate calculation method is as follows:
[0055] Step 331: The total number of mounting points to be assigned is R, and the index number of each mounting point is r∈[1,...,R]. The corresponding mounting head number is headnum. The position of the mounting point to be assigned corresponding to the 1st suction rod is stored in an array xyt_1 with L≤Q rows and 2 columns. For example, the X coordinate and Y coordinate of the rth mounting point are xyt_1(r,1) and xyt_1(r,2) respectively. The calculation method is as follows:
[0056] xyt_1(r, 1)=xyt(r, 1)-(headnum-1)*DI
[0057] xyt_1(r, 2) = xyt(r, 2)
[0058] Where * indicates multiplication, DI indicates the spacing between the suction rods, xyt_1(r, 1) represents the X coordinate of suction rod 1 corresponding to the r-th mounting point, and xyt_1(r, 2) represents the Y coordinate of suction rod 1 corresponding to the r-th mounting point.
[0059] Step 332: Traverse the decoration points to be assigned and obtain the coordinates of the top left decoration point L0, where the X coordinate is L0(1) = min(xyt_1(r, 1)) and the Y coordinate is L0(2) = min(xyt_1(r, 2)). The coordinates of the bottom right decoration point L1 are obtained, where the X coordinate is L1(1) = max(xyt_1(r, 1)) and the Y coordinate is L1(2) = max(xyt_1(r, 2)).
[0060] Step 3. Calculate the anchor point coordinates (star) based on the particle position. i The formula is as follows:
[0061] star i (k,1)=L1(1)+(L0(1)-L1(1))*p ix (k)
[0062] star i (k, 2)=L1(2)+(L0(2)-L1(2))*P iy (k)
[0063] Where, p ix (k) represents the position of the i-th particle in the x-direction during the k-th period, p iy (k) represents the position of the i-th particle in the y-direction during the k-th period;
[0064] Steps 3 and 4: Use the anchor point coordinates as the starting point coordinates of the heuristic path search algorithm. The algorithm output is the shortest path planning result, and the distance for each picking cycle is represented as d. ik ;
[0065] The heuristic path search algorithm uses the method entitled "A placement path planning method for a pick-and-place machine based on the nearest insertion method" with patent number ZL202010387811.7;
[0066] Step 35: The sum of the distances from all picking cycles is used as the criterion for evaluating the quality of particle positions; this is called the fitness function. The fitness function value is stored in the individual's historical best fitness function pbest_vali;
[0067] Step 36: Initialize the population's historical best fitness value to gbest_val = min(fitness), and take the particle index m that takes the minimum value as the best particle. Initialize the population's historical best position, i.e., gbest = p. m ;
[0068] Step 37: The population optimal fitness value gbest_val for each search and the cumulative count value cnt of the population optimal fitness values found are stored in the stack gbest_val_stack, and the result of this initialization is pushed onto the stack;
[0069] The search is divided into steps four through eight.
[0070] The other steps and parameters are the same as those in one of the specific implementation methods one to three.
[0071] Specific Implementation Method Five: This implementation method differs from Specific Implementation Methods One to Four in that: in step four, the anchor point coordinates are obtained from the positions of each particle, and a heuristic algorithm for optimizing the mounting path is executed to obtain the corresponding mounting path length as the fitness value for each particle; the specific process is as follows:
[0072] Step 4. Calculate the anchor point coordinates star for each particle i. i The calculation process is the same as steps 331 to 333.
[0073] Step 4.2: Use the anchor point coordinates as the starting point coordinates of the heuristic pathfinding algorithm. The heuristic pathfinding algorithm outputs the shortest path distance, and the sum of the distances from all picking cycles at this point is used as the fitness function to evaluate the particle position. The method is the same as steps three and four to three and five.
[0074] The other steps and parameters are the same as those in specific implementation methods one through four.
[0075] Specific Implementation Method Six: This implementation method differs from Specific Implementation Methods One to Five in that step five updates the individual historical best position and individual historical best fitness value of each particle; the specific process is as follows:
[0076] For each particle i, the individual historical best fitness function pbest_val i If pbest_val exists i If the value is greater than fitness(i), then update the individual's historical best fitness value pbest_val. i and individual historical best position pbest i The update method is as follows:
[0077] pbest_val i =fitness(i)
[0078] pbest i =p i
[0079] If pbest_val exists i If fitness(i) is less than or equal to fitness(i), then do not update.
[0080] The other steps and parameters are the same as those in the first to fifth specific embodiments.
[0081] Specific Embodiment Seven: The difference between this embodiment and any one of the first to sixth specific embodiments is that in Step Six, the group historical optimal position and the group historical optimal fitness value are updated; the specific process is as follows:
[0082] Step Six One: Calculate the minimum value min(pbest_val) of the individual historical optimal fitness values of all particles, and save the index m at this time when the minimum value is taken;
[0083] Step Six Two: Update the group historical optimal fitness value gbest_val and the group optimal position gbest, and the update method is as follows:
[0084] gbest_val = min(pbest_val)
[0085] gbest = p m
[0086] The other steps and parameters are the same as those in any one of the first to sixth specific embodiments.
[0087] Specific Embodiment Eight: The difference between this embodiment and any one of the first to seventh specific embodiments is that in Step Seven, if the number of unimproved search times reaches the upper limit, then Step Eight is executed; otherwise, the positions and velocities of each particle are updated and Step Four is executed. The specific process is as follows:
[0088] Step Seven One: If the group historical optimal fitness value gbest_val of the current cnt - th search result is smaller than the group historical optimal fitness value of the previous search result, that is, gbest_val < gbest_val_stack(cnt - 1), then turn to execute Step Seven Two; otherwise, execute Step Seven Three;
[0089] Step Seven Two: Clear the particle swarm search optimal position unimproved count variable cntImprove;
[0090] Step Seven Three: Increment the particle swarm search optimal position unimproved count variable cntImprove by 1;
[0091] Step Seven Four: If the optimal position unimproved count variable cntImprove is greater than the maximum optimal position unimproved times variable MaxImprove, then turn to execute Step Eight; otherwise, execute Step Seven Five;
[0092] Step Seven Five: Push the group optimal fitness value of the current search into the stack gbest_val_stack, and the search count value cnt = cnt + 1;
[0093] Step 76: Update the particle swarm velocity and position. The specific process is as follows:
[0094] Step 761: Update the velocity of each particle i in the particle swarm. The update formula is as follows:
[0095] v i =w*v i +c1*rand*(pbest i -p i )+c2*rand*(gbest-p i )
[0096] Where rand represents a random number between (0, 1); the first part of this formula (w*v i The term "memory term" represents the influence of the particle's velocity magnitude and direction in the previous iteration; the second part (c1*rand*(pbest)) is called the "memory term". i -p i The term "self-cognition term" is a vector pointing from the current point to the particle's own best point, representing the part of the particle's action that originates from its own experience; the third part of the formula (c2*rand*(gbest-p)) is also relevant. i The term "group cognition term" is a vector pointing from the current point to the best point in the population, reflecting the cooperation and knowledge sharing among particles.
[0097] Particles determine their next move based on their own experience and the best experience among their peers;
[0098] In the formula, w represents the inertia factor. A larger value of w will enhance the global optimization ability and weaken the local optimization ability, while a smaller value will weaken the global optimization ability and enhance the local optimization ability.
[0099] rand represents a random number greater than 0 and less than 1;
[0100] Step 762: Update the position of each particle i in the particle swarm. Update the position for each pickup period k in particle i. For each pickup period k, the corresponding particle position is p. i (k)=p i (k-1)+v i (k-1);
[0101] Step 763: Determine the updated p i Do the X and Y coordinates of p fit within the interval (0, 1) (inclusive)? ix <0, then p ix =0; if p ix If p > 1, then p ix =1; similarly, if p iy <0, then p iy=0; if p iy If p > 1, then p iy =1; proceed to step four.
[0102] The other steps and parameters are the same as those in any of the specific implementation methods one to seven.
[0103] Specific Implementation Method Nine: This implementation method differs from Specific Implementation Methods One through Eight in that step eight outputs the optimal mounting path optimization result. The specific process is as follows:
[0104] Step 81: Calculate the anchor coordinates based on the group's historical best position as the final optimal path optimization anchor coordinates. The calculation process is the same as steps 331 to 333.
[0105] Step 82: Use the anchor point coordinates as the starting point coordinates of the heuristic path search algorithm. The heuristic path search algorithm outputs the shortest path distance, using the same method as steps 3 and 4.
[0106] Step 83: Update the placement sequence PS. The pick-and-place machine will carry out placement production according to the placement point sequence of each pick-and-place cycle output by the algorithm.
[0107] The other steps and parameters are the same as those in one of the specific implementation methods one to eight.
[0108] The beneficial effects of the present invention are verified using the following embodiments:
[0109] Example 1:
[0110] The placement path optimization method for pick-and-place machines based on the anchor point selection particle swarm optimization algorithm in this embodiment is prepared according to the following steps:
[0111] The example considers the optimization process of the placement path of a six-suction bar beam type placement carrier placement machine.
[0112] The circuit board production data that needs to be imported is listed in Table 1. One type of component has a total of 50 mounting points.
[0113] Table 1 Circuit Board Production Data
[0114]
[0115] It takes a total of 9 application cycles to complete the application of all application points.
[0116] After optimization using the particle swarm optimization algorithm, the optimal position of the swarm, gbest, is obtained. <gbest x gbest y >For: gbest x =[0.2900.426 0.584 0.698 0.215 0.413 0.605 0.754 0.692], gbesty = [0.251 0.326 0.712 0.792 0.546 0.526 0.427 0.752 0.379]. In the coordinates of the leftmost top-left mounting point L0 of each mounting cycle, the X-coordinate is: L0(1)=[549.9 546 545.5 545.5 545.5 545.5 545.5 532.8 639.1], and the Y-coordinate is: L0(2)=[188.8 188.8 188.8 188.8 187.8 176.6 176.6 147.2]; in the coordinates of the rightmost bottom-right mounting point L1 of each mounting cycle, the X-coordinate is: L1(1)=[620.2 620.2 623.8 623.8 628.7 628.7638 651.2 658.3], and the Y-coordinate is: L1(2)=[144.6 144.6 144.6 144.6 144.6 144.6 144.6144.6144.6.
[0117] Based on the above information, the optimal anchor point X coordinate for each picking cycle is calculated as: starox=L1(1)+gbest x .*(L0(1)-L1(1))=[599.9 588.6 578 569.2 610.8 594.3 582 561.9 645];The optimal anchor point Y coordinate for each picking cycle is: staroy=L1(2)+gbest y .*(L0(2)-L1(2))=[155.7 159 176.1179.6168.7 167.3 158.3 168.7 145.6].
[0118] The placement point allocation result PA and the placement sorting result PS are as follows:
[0119]
[0120] The optimization results of the mounting path obtained by the particle swarm optimization algorithm for anchor point selection are as follows: Figure 4 As shown, the optimal placement path length is gbest_val1 = 768mm. The placement path optimization result obtained by the fixed anchor point heuristic algorithm is as follows: Figure 5 As shown, the optimal mounting path length is gbest_val0 = 998 mm. In this embodiment, the present invention can improve the mounting path by 100% * (998 - 768) / 998 = 23.05%.
[0121] This invention may have other embodiments. Without departing from the spirit and essence of this invention, those skilled in the art can make various corresponding changes and modifications according to this invention, but these corresponding changes and modifications should all fall within the protection scope of the appended claims.
Claims
1. A placement path optimization method for a pick-and-place machine based on particle swarm optimization algorithm with anchor point selection, characterized in that: The specific process of the method is as follows: Step 1: Obtain the pick-and-place machine parameters, circuit board production data, and component allocation results; Step 2: Initialize particle swarm parameters; Step 3: Randomly initialize the position and velocity of each particle; Step 4: Obtain the anchor point coordinates from the positions of each particle and execute the heuristic algorithm for optimizing the mounting path to obtain the corresponding mounting path length as the fitness value for each particle. Step 5: Update the individual historical best position and individual historical best fitness value of each particle; Step 6: Update the population's historical best position and the population's historical best fitness value; Step 7: If the number of searches reaches the limit without improvement, proceed to Step 8; otherwise, update the position and velocity of each particle and proceed to Step 4. Step 8: Output the optimal placement path optimization result; In step three, the position and velocity of each particle are randomly initialized; the specific process is as follows: Step 3.1: Initialize the velocity of each particle in the particle swarm; the process is as follows: Let V = {v} i , i=1,2,…,I} represents the velocity of all particles in the particle swarm, v i Let v represent the velocity of the i-th particle in the particle swarm. Each particle i has K members, and the velocity v of the i-th particle is... i It contains velocity information in both the x and y directions, represented as v i = <v ix ,v iy >;For each v i ∈[0,1] is initialized with a random value within the interval; v ix This represents the velocity information of the i-th particle in the x-direction, v iy This represents the velocity information of the i-th particle in the y-direction; Step 3.2: Initialize the positions of each particle in the particle swarm; the process is as follows: Let P = {p i , i=1,2,…,I} represent the positions of all particles in the particle swarm, p i Let p represent the position of the i-th particle in the particle swarm. Since there is position information for each pickup cycle, each particle i has K members. The position p of the i-th particle... i It contains position information in both the x and y directions, denoted as p. i = <p ix ,p iy >; For each p i ∈[0,1] is initialized with a random value within the interval; p ix p represents the position of the i-th particle in the x-direction. iy This represents the position of the i-th particle in the y-direction; Step 3: Initialize the optimal position pbest for each individual particle i. i The optimal position of the group is gbest= <gbest x gbest y > where the individual's optimal position is initialized to pbest i =p i ; Iterate through all picking cycles K, and calculate the initial anchor point star based on the initial position data of each particle. i The anchor coordinates are stored in an array star with K rows and 2 columns. i In the diagram, the X and Y coordinates of the k-th period anchor point are respectively star i (k,1), star i (k,2), where the optimal anchor point X coordinate is stored in starox and the optimal Y coordinate is stored in staroy; the anchor point coordinate calculation method is as follows: Step 331: The total number of mounting points to be assigned is R, and the index number of each mounting point is r∈[1,…,R]. The corresponding mounting head number is headnum. The position of the mounting point to be assigned corresponding to the 1st suction rod is stored in an array xyt_1 with L≤Q rows and 2 columns. The X coordinate and Y coordinate of the r-th mounting point are xyt_1(r,1) and xyt_1(r,2) respectively. The calculation method is as follows: Where * indicates multiplication, DI indicates the spacing between the suction rods, xyt_1 (r,1) represents the X coordinate of suction rod 1 corresponding to the r-th mounting point, and xyt_1 (r,2) represents the Y coordinate of suction rod 1 corresponding to the r-th mounting point. Step 332: Traverse the decoration points to be assigned and obtain the coordinates of the top left decoration point L0, where the X coordinate is L0(1)=min(xyt_1(r,1)) and the Y coordinate is L0(2)=min(xyt_1(r,2)). The coordinates of the bottom right decoration point L1 are obtained, where the X coordinate is L1(1)=max(xyt_1(r,1)) and the Y coordinate is L1(2)=max(xyt_1(r,2)). Step 3. Calculate the anchor point coordinates (star) based on the particle position. i The formula is as follows: Where, p ix (k) represents the position of the i-th particle in the x-direction during the k-th period, p iy (k) represents the position of the i-th particle in the y-direction during the k-th period; Steps 3 and 4: Use the anchor point coordinates as the starting point coordinates of the heuristic path search algorithm. The algorithm output is the shortest path planning result, and the distance for each picking cycle is represented as d. ik ; Step 35: The sum of the distances from all picking cycles is used as the criterion for evaluating the quality of particle positions, and is called the fitness function fitness(i) = The fitness function value is stored in the individual's historical best fitness function pbest_val. i middle; Step 36: Initialize the population's historical best fitness value to gbest_val = min(fitness), take the particle index m that takes the minimum value as the best particle, and initialize the population's historical best position, i.e., gbest = p. m ; Step 37: The population optimal fitness value gbest_val for each search and the cumulative count value cnt of the population optimal fitness values found are stored in the stack gbest_val_stack, and the result of this initialization is pushed onto the stack; The search is divided into steps four through eight.
2. The placement path optimization method for a pick-and-place machine based on the particle swarm optimization algorithm with anchor point selection as described in claim 1, characterized in that: The specific process for obtaining the pick-and-place machine parameters, circuit board production data, and component allocation results in step one is as follows: Step 11: Import the pick-and-place machine parameters; The pick-and-place machine parameters include the total number of pick-and-place bars H, and the index number of each pick-and-place bar is h∈[1,…,H] in ascending order along the X-axis, with the pick-and-place bar interval being DI; Steps 1 and 2: Import circuit board production data; The circuit board production data includes: the total number of component types C, the index number of each type of component is c∈[1,…,C], the number of mounting points of each type of component is stored in an array n with 1 row and C columns; there are a total of Q mounting points of type C components, the index number of each mounting point is q∈[1,…,Q], the coordinates of the mounting points are stored in an array xyt with Q rows and 2 columns, and the X coordinate and Y coordinate of the qth mounting point are xyt(q,1) and xyt(q,2) respectively; Step 13: Import component allocation results; the total number of pickup cycles is K, and the index number of each pickup cycle is k∈[1,…,K]; the component allocation results are stored in a two-dimensional array PA with K rows and H columns, where the element PA(k,h) represents the type of component picked up by the h-th suction rod in the k-th pickup cycle, i.e., PA(k,h)∈[1,…,C].
3. The placement path optimization method for a pick-and-place machine based on the particle swarm optimization algorithm with anchor point selection as described in claim 2, characterized in that: Step two involves initializing the particle swarm parameters; the specific process is as follows: Step 2:
1. Initialize the particle swarm population size to I, and each particle to i, where i = 1, 2, ..., I; initialize the individual learning factor of each particle to c1, the social learning factor to c2, and the inertia factor to w. Step 22: Initialize the particle swarm search for the unimproved optimal position count variable as cntImprove and the maximum number of unimproved optimal positions variable as MaxImprove; Step 2. Initialize a two-dimensional array PS with K rows and H columns, where all elements are zero, to store the mounting sorting results. The element PS(k,s), s∈[1,…,H] represents the number of the s-th picker in the k-th picking cycle, i.e., PS(k,s)∈[1,…,H].
4. The placement path optimization method for a pick-and-place machine based on the particle swarm optimization algorithm with anchor point selection as described in claim 3, characterized in that: In step four, the anchor point coordinates are obtained from the positions of each particle, and a heuristic algorithm for optimizing the mounting path is executed to obtain the corresponding mounting path length as the fitness value of each particle. The specific process is as follows: Step 4. Calculate the anchor point coordinates star for each particle i. i The calculation process is the same as steps 331 to 333. Step 4.2: Use the anchor point coordinates as the starting point coordinates of the heuristic pathfinding algorithm. The heuristic pathfinding algorithm outputs the shortest path distance. The sum of the distances from all picking cycles at this point is used as the fitness function (fitness(i)) to evaluate the particle position. The method is the same as steps three and four to three and five.
5. The placement path optimization method for a pick-and-place machine based on the particle swarm optimization algorithm for anchor point selection as described in claim 4, characterized in that: Step five updates the individual historical best position and individual historical best fitness value of each particle; the specific process is as follows: For each particle i, the individual historical best fitness function pbest_val i If pbest_val exists i If the value is greater than fitness(i), then update the individual's historical best fitness value pbest_val. i and individual historical best position pbest i The update method is as follows: If pbest_val exists i If fitness(i) is less than or equal to fitness(i), then do not update.
6. The placement path optimization method for a pick-and-place machine based on the particle swarm optimization algorithm for anchor point selection as described in claim 5, characterized in that: In step six, the historical best position and the historical best fitness value of the population are updated; The specific process is as follows: Step 61: Calculate the minimum of the historical best fitness values for all individual particles. And save the index m of the minimum value at this time; Step 62: Update the population's historical best fitness value gbest_val and the population's best position gbest. The update method is as follows: 。 7. The placement path optimization method for a pick-and-place machine based on the particle swarm optimization algorithm for anchor point selection as described in claim 6, characterized in that: If step seven fails to improve the search count and reaches the upper limit, then step eight is executed; otherwise, the position and velocity of each particle are updated and step four is executed. The specific process is as follows: Step 7-1. If the population historical best fitness value of the current cnt-th search result is smaller than the population historical best fitness value of the previous search result, that is, gbest_val < gbest_val_stack(cnt - 1), then go to execute Step 7-2; otherwise, execute Step 7-3. Step 72: Clear the unimproved count variable cntImprove for the optimal position in the particle swarm search to zero; Step 73: Increment the unimproved count variable cntImprove by 1 in the particle swarm search for the optimal position; Step 74: If the count variable cntImprove, representing the number of times the optimal position has not been improved, is greater than the maximum count variable MaxImprove, then proceed to step 8; otherwise, proceed to step 75. Step 75: Push the current population optimal fitness value onto the stack gbest_val_stack, and set the search count value cnt = cnt + 1; Step 76: Update the particle swarm velocity and position. The specific process is as follows: Step 761: Update the velocity of each particle i in the particle swarm. The update formula is as follows: Where rand represents a random number between (0, 1); In the formula, w represents the inertia factor; Step 762: Update the position of each particle i in the particle swarm. Update the position for each pickup period k in particle i. For each pickup period k, the corresponding particle position is p. i (k)= p i (k-1)+v i (k-1); Step 763: Determine the updated p i Do the X and Y coordinates of p fit into the interval (0,1)? ix <0, then p ix =0; if p ix >1, then p ix =1; similarly, if p iy <0, then p iy =0; if p iy >1, then p iy =1; proceed to step four.
8. The placement path optimization method for a pick-and-place machine based on the particle swarm optimization algorithm for anchor point selection as described in claim 7, characterized in that: Step eight outputs the optimal placement path optimization result, and the specific process is as follows: Step 81: Calculate the anchor coordinates based on the group's historical best position as the final optimal path optimization anchor coordinates. The calculation process is the same as steps 331 to 333. Step 82: Use the anchor point coordinates as the starting point coordinates of the heuristic path search algorithm. The heuristic path search algorithm outputs the shortest path distance, using the same method as steps 3 and 4. Step 83: Update the placement sequence PS. The pick-and-place machine will carry out placement production according to the placement point sequence of each pick-and-place cycle output by the algorithm.