A method, system and medium for planning a path for a crane

Through the design of the state space and reward function of the deep reinforcement learning network, the crane path is planned in real time, which solves the problem of difficulty in preventing blockage in the crane path planning in AMHS and improves the handling efficiency of the crane.

CN118428576BActive Publication Date: 2024-10-01SHANGHAI GONA SEMICONDUCTOR TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410892928.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-10-01
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

In the existing automatic material handling system (AMHS), the crane path planning is difficult to effectively prevent blockage, resulting in low efficiency. Especially in semiconductor processing plants with high precision requirements, how to use deep reinforcement learning to provide optimized path planning for the crane has become challenge.

Method used

Design the state space, action space and reward function of deep reinforcement learning, combine the track map, crane information and road condition information, through deep reinforcement learning network training, collect the crane status in real time and generate optimal path instructions to avoid congestion and improve the crane transmission efficiency.

Benefits of technology

Through the real-time path planning of the deep reinforcement learning network, the crane can dynamically find the optimal path, effectively avoid congestion, improve the handling efficiency of the crane, and ensure that the crane can reach the destination efficiently.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118428576B_ABST
    Figure CN118428576B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system and medium for planning the path of an overhead crane. The method includes designing a state space S of deep reinforcement learning; setting an action space A, the action space A includes different action modes a, and setting the position coordinates of the overhead crane after moving according to the action mode a in combination with the state space S; constructing a reward function R for the operation of the overhead crane, the reward function R includes a reward for reaching the destination, a penalty for congestion, and a reward and punishment factor for the distance between the destination location coordinates and the nearest overhead crane; building an algorithm framework for deep reinforcement learning, and training the algorithm framework according to the state space S, the action space A and the reward function R to obtain a trained deep reinforcement learning network. The current state space S of the overhead crane is collected in real time, and the current state space S is input into the trained deep reinforcement learning network to obtain the real-time action mode a instruction of the overhead crane. Deep reinforcement learning is applied to the path planning of the overhead crane to plan the path for the overhead crane.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automatic material handling systems, and in particular to an overhead crane path planning method, system and medium. Background Art

[0002] Automatic material handling system (AMHS) is widely used in semiconductor processing plants to achieve fully automated, high-precision and high-efficiency wafer handling. It is a vital component in the wafer processing process. AMHS is a large number of overhead cranes (OHT) running synchronously on a closed track to realize the overhead crane's handling of wafer boxes from one destination to another. As shown in the attached figure, the closed track consists of a ring (one-way double ring) main road and several branch roads. Both ends of the branch road are connected to the main road. The overhead crane can run on the main road and the branch road. How to prevent the blockage of the overhead crane and achieve efficient handling of the overhead crane is one of the indicators to improve the performance of AMHS.

[0003] There are usually multiple overhead cranes running on the track at the same time. The driving path of each overhead crane will greatly affect the efficiency of AMHS. During the driving process of the overhead crane, it is necessary to prevent congestion and ultimately achieve the handling task of the overhead crane. Therefore, the path planning of the overhead crane is particularly important. The method of deep reinforcement learning has gradually emerged in recent years. Deep reinforcement learning provides an end-to-end learning strategy for intelligent agents. It has the advantages of being able to handle complex nonlinear problems. Therefore, it is widely used to solve path navigation, path planning and other problems. However, for overhead cranes with high precision requirements, how to use deep reinforcement learning to provide a path planning method for the driving of overhead cranes has become a technical problem to be solved. Summary of the invention

[0004] In order to overcome the above-mentioned shortcomings, the purpose of the present invention is to provide a method, system and medium for overhead crane path planning, apply the network model of deep reinforcement learning to the path planning of the overhead crane, consider the congestion problem of the overhead crane, and plan an optimal path for the overhead crane while ensuring that the overhead crane reaches the destination, thereby improving the efficiency of the overhead crane transmission.

[0005] In order to achieve the above objectives, the technical solution adopted by the present invention is: a method for overhead crane path planning, comprising:

[0006] Design a state space S for deep reinforcement learning, wherein the state space includes track map information, overhead crane information, task information, and road condition information;

[0007] Setting an action space A, wherein the action space A includes different action modes a, and combining the state space S to set the position coordinates of the overhead travelling vehicle after it moves according to the action mode a;

[0008] Constructing a reward function R for the operation of the overhead crane, wherein the reward function R includes a reward for reaching a destination, a penalty for a jam, and a reward and penalty factor for the distance between the destination coordinates and the nearest overhead crane;

[0009] Build a deep reinforcement learning algorithm framework, train the algorithm framework according to the designed state space S, action space A and reward function R, and obtain a trained deep reinforcement learning network;

[0010] The current state space S of the overhead crane is collected in real time, and the current state space S is input into the trained deep reinforcement learning network to obtain the real-time action mode a instruction of the overhead crane.

[0011] The beneficial effects of the present invention are as follows: a state space S, an action space A and a reward function R are constructed according to the driving requirements of the overhead crane, the state space S takes into account map information, overhead crane information, task information and road condition information, the state space S determines the action mode a of the overhead crane action space A, and the reward function R includes a reward for reaching the destination, a penalty for congestion calculated according to road condition information, and a reward and penalty factor for the distance between the destination coordinates and the nearest overhead crane. In the training process of the deep reinforcement learning network, the congestion problem is taken into consideration, and the congestion problem is taken as the focus of the deep reinforcement learning network. The deep reinforcement learning network is used for overhead crane path planning. While ensuring that the overhead crane reaches the destination, an optimal path is dynamically planned for the overhead crane, thereby increasing the handling efficiency of the overhead crane.

[0012] Further, the track map information is S(c0,x,y), which indicates the drivable state at the position coordinate (x,y) on the track;

[0013] The overhead crane information is S(c1,x,y), which indicates the state of the overhead crane at the position coordinate (x,y) on the track;

[0014] The task information is S(c2,x,y), which represents the task of the overhead crane and the coordinates of the destination position when a task is completed;

[0015] The road condition information is S(c3,x,y), which indicates the length of time the overhead travelling vehicle stays at the position coordinate (x,y) on the track;

[0016] Among them, c0, c1, c2, and c3 are different natural numbers.

[0017] The setting of the state space S takes into account all the parameters that need to be considered for the overhead crane.

[0018] Furthermore, the reward for reaching the target location is r1. If the crane reaches the target location, r1 is set to m. 2 , otherwise r1 is set to -1, where m is the size of the track map;

[0019] The penalty for congestion is r2, r2=-S(c3,x t+1 ,y t+1 ) 2 , where (x t+1 ,y t+1 ) is the position coordinates reached by the crane at time t+1;

[0020] The reward and penalty factor of the distance between the destination coordinates and the nearest overhead crane is r3. When the distance between the overhead crane and the next destination coordinates is less than the set threshold, r3 is a positive value, and the closer the distance, the greater the reward value of the reward and penalty factor. When the distance between the overhead crane and the next destination coordinates is greater than the set threshold, r3 is a negative value, and the farther the distance, the greater the penalty value of the reward and penalty factor.

[0021] The reward function R=r1+r2+r3 is constructed by reward and penalty, and the congestion problem encountered by the overhead crane during driving is considered to plan the optimal path for the overhead crane.

[0022] Furthermore, when S(c1,x,y)=S(c2,x,y) and both are not equal to 0, the crane reaches the destination.

[0023] ;

[0024] ;

[0025] Where n represents the task number to be performed by the overhead crane at the position coordinate (x, y), and n is a positive integer.

[0026] Further, ;

[0027] Where S t (c3,x,y) is the road condition information of the overhead travelling vehicle at the position coordinate (x,y) at time t, S t+1 (c3,x,y) is the road condition information of the overhead travelling vehicle at the position coordinate (x,y) at time t+1, S t+1 (c1, x, y) is the task of the overhead crane at the position coordinate (x, y) at time t+1, and t' is the preset waiting time.

[0028] Because when S t+1 When (c1,x,y)=0, it means that there is still no car at the position coordinate (x, y) at the next moment (t+1), so there will be no congestion at this time. t+1 When (c1,x,y)≠0, it means that at the position coordinate (x,y), there will be a car at the next time (t+1), so the overhead travelling vehicle will stop at time t+1, causing traffic congestion. The traffic information S at the position coordinate (x,y) at time t is t(c3,x,y) plus the preset waiting time t', we can get the road condition information of the overhead crane at the position coordinate (x,y) at time t+1.

[0029] Furthermore, the action mode a includes the overhead crane moving forward in a straight line and the overhead crane turning.

[0030] Specifically, the algorithm framework is a DDQN algorithm, which includes an evaluation network Q online and the target network Q target . Use experience replay and TD algorithm to train the DDQN network.

[0031] Furthermore, the algorithm framework is trained according to the designed state space S, action space A and reward function R, and the trained deep reinforcement learning network specifically includes:

[0032] S41, calling a random function, selecting the current action mode a according to the random value randomly generated by the random function, or selecting the current action mode a according to the evaluation network Q online Calculate the optimal value for the current action mode a;

[0033] S42, execute action mode a to obtain the state space S' and the reward function R at the next moment;

[0034] S43, storing (S, a, R, S', d) into the experience buffer to obtain training samples, where d is a flag indicating whether this round of training is completed;

[0035] S44, selecting at least part of the training samples to train the algorithm framework, and calculating the estimated value, the target value and the loss function;

[0036] S45, updating the evaluation network parameters and the target network parameters according to the calculated estimated values ​​and target values;

[0037] S46. Repeat steps S41-S45. When the reward value of the reward function of the algorithm framework tends to converge, a trained deep reinforcement learning network is obtained.

[0038] Specifically, the random function is called to select the current action mode a according to the random value randomly generated by the random function, or according to the evaluation network Q online The action mode a for calculating the optimal value for the current situation specifically includes:

[0039] Set an exploration factor. If the random value is less than the preset exploration factor, randomly select an action mode a from the action space A; if the random number is greater than the exploration factor, according to the evaluation network Q online Calculate the optimal value as the current action mode a.

[0040] Due to the lack of information in the experience buffer at the beginning of training, the concept of exploration factor is introduced. At this time, the exploration factor is 1. The exploration factor gradually decreases with the progress of training and a minimum value is set. When the exploration factor reaches the minimum value, it means that the algorithm has the opportunity to try to find a better solution.

[0041] Furthermore, when the number of training samples in the experience buffer reaches the upper limit, when new training samples are added, the earliest training sample data is deleted. The experience buffer is updated using the first-in-first-out principle to ensure that the training samples in the experience buffer are always the latest data.

[0042] The present invention also discloses a crane path planning system, which uses the above method to plan the path of the crane. The system considers the congestion problem of the crane and uses a trained deep reinforcement learning network to plan the optimal action for the crane in real time until the crane reaches the destination, so as to achieve the handling efficiency of the crane.

[0043] The present invention also discloses a computer-readable storage medium, on which instructions are stored, and when the instructions are executed by a processor, the instructions are used to implement the above-mentioned overhead crane path planning method. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 The process of the first embodiment of the present invention Figure 1 ;

[0045] Figure 2 The process of the first embodiment of the present invention Figure 2 ;

[0046] Figure 3 The process of the first embodiment of the present invention Figure 3 ;

[0047] Figure 4 is a schematic diagram of the overhead travelling vehicle track in the first embodiment of the present invention;

[0048] Figure 5 The curve of the loss function during the training process of the first embodiment of the present invention;

[0049] Figure 6 This is a curve diagram of the reward function during the training process of Example 1 of the present invention. DETAILED DESCRIPTION

[0050] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0051] Embodiment 1

[0052] A method for overhead crane path planning of the present invention is used for overhead crane path planning, and includes a model training phase and a path planning phase.

[0053] The model training phase is simulated in an offline state, and the deep reinforcement learning network is trained using the constructed state space, action space and reward function to obtain the trained deep reinforcement learning network. The path planning phase is to collect the current state space of the overhead crane in real time, input the real-time collected current state space into the trained deep reinforcement learning network, and obtain the real-time action instructions of the overhead crane until the overhead crane reaches the target location and completes the task. In this embodiment, using the deep reinforcement learning network, the overhead crane can dynamically find the optimal path to the target location during the path planning phase.

[0054] Attached Figure 1 This is a flowchart of the overhead crane path planning method. Figure 1 As shown, a method for overhead crane path planning includes the following steps:

[0055] S100. Design the state space S for deep reinforcement learning.

[0056] The state space S includes track map information, overhead crane information, task information and road condition information. The track map information represents the composition of the entire track, that is, the drivable state at each position coordinate on the track. The track map information does not change for the same track; the overhead crane information represents the task of the overhead crane at a position coordinate; the task information represents the target position coordinate (that is, the destination position) when a task is completed; and the road condition information represents the length of time the overhead crane stays at a position coordinate.

[0057] In one embodiment, the state space S is a data set S (c, x, y), c = {c0, c1, c2...}, c0, c1, c2... are different natural numbers, corresponding to the track map information, overhead travelling vehicle information, mission information and road condition information. (x, y) is the coordinate point on the track map, and the coordinates are established on the track map. Figure 4 It is a schematic diagram of the track. In one embodiment, the coordinate origin is at a corner, such as point O in the figure, and x and y are not greater than the length of the track map in the x direction (left-right direction) and the length of the track map in the y direction (up-down direction).

[0058] In this embodiment, c={0,1,2,3}, corresponding to track map information, overhead crane information, mission information, and road condition information, respectively. To facilitate subsequent convolution calculations, the track map is a square, and the size of the track map is m*m, so x is not greater than m, and y is not greater than m. The range of the state space S is related to the map size m.

[0059] In one embodiment, the track map information is S(0,x,y), and the track map information is represented by 13 numbers, namely:

[0060] S(0,x,y)={0,1,2,3,4,5,6,7,8,9,10,11,12}

[0061] In this embodiment, because there may be a total of 13 drivable states at different position coordinates, the track map information S (0, x, y) sets 13 different numbers, which respectively represent the 13 drivable states, that is, the 13 drivable states of the track map information correspond to the 13 numbers of the track map information. The 13 drivable states are unreachable, driving right, driving right or up, driving right or down, driving left, driving left or up, driving left or down, driving up, driving up or right, driving up or left, driving down, driving down or right, and driving down or left.

[0062] In one embodiment, when S(0,x,y)=0, it means that the vehicle is not reachable at (x,y);

[0063] When S(0,x,y)=1, it means that the vehicle can only go right at (x,y) on that day;

[0064] When S(0,x,y)=2, it means that the vehicle can move right or upward at (x,y).

[0065] When S(0,x,y)=3, it means that the vehicle can move right or down at (x,y).

[0066] When S(0,x,y)=4, it means that the vehicle can only go left at (x,y) on that day;

[0067] When S(0,x,y)=5, it means that the vehicle can move left or down at (x,y).

[0068] When S(0,x,y)=6, it means that the vehicle can move left or down at (x,y);

[0069] When S(0,x,y)=7, it means that the vehicle can only move upward at (x,y).

[0070] When S(0,x,y)=8, it means that the vehicle can move upward or right at (x,y).

[0071] When S(0,x,y)=9, it means that the vehicle can move upward or left at (x,y).

[0072] When S(0,x,y)=10, it means that the vehicle can only move downward at (x,y).

[0073] When S(0,x,y)=11, it means that the vehicle can go down or right at (x,y).

[0074] When S(0,x,y)=12, it means that the vehicle can move downward or left at (x,y).

[0075] Of course, the 13 drivable states and the 13 numbers of the track map information may not have the above correspondence, as long as they can correspond one to one.

[0076] In one embodiment, the crane information is S(1,x,y), where:

[0077]

[0078] S(1,x,y) represents the state of the overhead crane at the position coordinate (x,y) on the track, that is, the coordinate (x,y) may include three states: an idle car, a task-carrying car, or no car.

[0079] n represents the task number to be performed by the crane at the position coordinate (x, y), and n is a positive integer. The crane information S (1, x, y) is designed according to the number of tasks.

[0080] In one embodiment, the task information is S(2,x,y), where:

[0081]

[0082] It indicates that the task of the overhead crane at the coordinate (x, y) is one of the following: taking a wafer transfer box, placing a wafer transfer box, and having no task, that is, the coordinate of the destination position when the overhead crane completes a task.

[0083] n is the task number, and the (x, y) position coordinates are the destination position of the overhead travelling vehicle with task number n, that is, the task information S(2, x, y) indicates the destination position when completing a task n.

[0084] When S(1,x,y)=S(2,x,y) and both are not equal to 0, it means that the overhead travelling crane has reached the destination.

[0085] In one embodiment, the road condition information is S(3,x,y), which indicates the length of time the overhead crane stays at (x,y). Because there are multiple overhead cranes running on the track at the same time, when an overhead crane is performing a task or fails, it will stop, which will also cause the overhead crane behind to be blocked, and then cause the overhead crane behind to stop. Therefore, when planning the path of the overhead crane, it is necessary to consider the road condition of the overhead crane based on the overhead crane information, that is, the congestion in front of the overhead crane.

[0086]

[0087] Where S t (3,x,y) is the road condition information of the overhead crane at the position coordinate (x,y) at time t, S t+1 (3,x,y) is the road condition information of the overhead travelling vehicle at the position coordinate (x,y) at time t+1.

[0088] Because when S t+1 When (1,x,y)=0, it means that there is still no car at the position coordinate (x, y) at the next moment (t+1), so there will be no congestion at this time. t+1 When (1,x,y)≠0, it means that at the position coordinate (x,y), there will be a car at the next time (t+1), so the overhead travelling vehicle will stop at time t+1, causing traffic congestion. The traffic information S at the position coordinate (x,y) at time t is t (3,x,y) plus the preset waiting time t', we can get the road condition information of the overhead crane at the position coordinate (x,y) at time t+1.

[0089] t' can be set according to actual needs. In this embodiment, t'=1.

[0090] Step 200: Set the action space A, which includes different action modes a, and combine the state space S to set the position coordinates of the overhead traveling vehicle after moving according to the action mode a.

[0091] All action modes a form an action space A, and the action mode a is moving in a straight line or turning. The action space A is [0,1]. In this embodiment, a=0 means that the overhead crane moves in a straight line, and a=1 means that the overhead crane turns. Of course, 1 represents moving in a straight line, and 0 represents turning. Because the overhead crane can be in different driving states at different positions on the track, when performing different action modes here, it is necessary to consider the track map information, overhead crane information, task information and road condition information, that is, the state space S determines the action mode a of the action space A. In this embodiment, a=0 means that the overhead crane moves in a straight line, and a=1 means that the overhead crane turns. The position coordinates of the overhead crane after moving according to the action mode a are set in combination with the state space S as follows:

[0092] (1) When S(0,x,y)=1, the overhead crane can only move to the right at (x,y).

[0093] If a=0, the position coordinate changes to x t+1 =x t +1,y t+1 =y t +1;

[0094] If a=1, the position coordinate changes to x t+1 =x t ,y t+1 =y t .

[0095] (2) When S(0,x,y)=2, the overhead crane can move right or upward at (x,y).

[0096] If a=0, the position coordinate changes to x t+1 =x t +1,y t+1 =y t ;

[0097] If a=1, the position coordinate changes to x t+1 =x t ,y t+1 =y t -1.

[0098] (3) When S(0,x,y)=3, the overhead travelling crane can move right or downward at (x,y).

[0099] If a=0, the position coordinate changes to x t+1 =x t +1,y t+1 =y t ;

[0100] If a=1, the position coordinate changes to x t+1 =x t ,y t+1 =y t +1.

[0101] (4) When S(0,x,y)=4, it means that the vehicle can only go left at (x,y).

[0102] If a=0, the position coordinate changes to x t+1 =x t -1,y t+1 =y t ;

[0103] If a=1, the position coordinate changes to x t+1 =x t ,y t+1 =y t .

[0104] (5) When S(0,x,y)=5, it means that the vehicle can move left or down at (x,y).

[0105] If a=0, the position coordinate changes to x t+1 =x t-1,y t+1 =y t ;

[0106] If a=1, the position coordinate changes to x t+1 =x t ,y t+1 =y t -1.

[0107] (6) When S(0,x,y)=6, it means that the vehicle can move left or down at (x,y).

[0108] If a=0, the position coordinate changes to x t+1 =x t -1,y t+1 =y t ;

[0109] If a=1, the position coordinate changes to x t+1 =x t ,y t+1 =y t +1.

[0110] (7) When S(0,x,y)=7, it means that the vehicle can only move upward at (x,y).

[0111] If a=0, the position coordinate changes to x t+1 =x t ,y t+1 =y t -1;

[0112] If a=1, the position coordinate changes to x t+1 =x t ,y t+1 =y t .

[0113] (8) When S(0,x,y)=8, it means that the vehicle can move upward or right at (x,y).

[0114] If a=0, the position coordinate changes to x t+1 =x t ,y t+1 =y t -1;

[0115] If a=1, the position coordinate changes to x t+1 =x t +1,y t+1 =y t .

[0116] (9) When S(0,x,y)=9, it means that the vehicle can move up or left at (x,y).

[0117] If a=0, the position coordinate changes to x t+1 =x t ,y t+1 =y t -1;

[0118] If a=1, the position coordinate changes to x t+1 =x t -1,y t+1 =y t .

[0119] (10) When S(0,x,y)=10, it means that the vehicle can only move downward at (x,y).

[0120] If a=0, the position coordinate changes to x t+1 =x t ,y t+1 =y t +1;

[0121] If a=1, the position coordinate changes to x t+1 =x t ,y t+1 =y t .

[0122] (11) When S(0,x,y)=11, it means that the vehicle can move downward or right at (x,y).

[0123] If a=0, the position coordinate changes to x t+1 =x t ,y t+1 =y t +1;

[0124] If a=1, the position coordinate changes to x t+1 =x t +1,y t+1 =y t .

[0125] (12) When S(0,x,y)=12, it means that the vehicle can move downward or left at (x,y).

[0126] If a=0, the position coordinate changes to x t+1 =x t ,y t+1 =y t +1;

[0127] If a=1, the position coordinate changes to x t+1 =x t +1,y t+1 =y t.

[0128] (x t ,y t ) is the position coordinate of the crane at the current time t. After receiving the action mode a, it is necessary to calculate the position coordinate (x) that can be reached at the next moment according to the track map information at the current moment. t+1 ,y t+1 ).

[0129] However, because the overhead travelling vehicle is still congested ahead, the coordinates of the position that can be reached at the next moment (x t+1 ,y t+1 ), the crane position coordinates need to be updated in combination with the crane information, specifically:

[0130]

[0131] When there is no congestion in front of the overhead travelling vehicle, that is, S(1,x t+1 ,y t+1 )=0, the crane calculates the position coordinates (x t+1 ,y t+1 ) walking; but when there is congestion in the front overhead travelling vehicle, that is, S(1,x t+1 ,y t+1 )≠0, the crane stays at the current position coordinate (x t ,y t ) place.

[0132] S300: Construct a reward function R for the operation of the overhead crane, wherein the reward function R includes a reward for reaching the destination, a penalty for congestion, and a reward and penalty factor for the distance between the destination coordinates and the nearest overhead crane.

[0133] Reward function R=r1+r2+r3, where ,r2=-S(3,x t+1 ,y t+1 ) 2 .

[0134] r1 is the reward for reaching the destination. If the destination is reached, r1 is set to m. 2 , otherwise it is set to -1. This reward is used to promote reinforcement learning in the decision-making process to control the overhead travelling vehicle to the destination position with the least actions.

[0135] r2 is the penalty for congestion. If the front is congested, then S(3,x t+1 ,y t+1 ) is not 0, then (x t+1 ,y t+1 ) is the location where the traffic jam occurs, r2 is set to the square of the traffic information, if there is no traffic jam, then S(3,xt+1 ,y t+1 ) is 0, and the penalty r2 for congestion is also 0. By setting this penalty, reinforcement learning can avoid controlling the overhead travelling vehicle to take a path that is short but congested for a long time.

[0136] r3 is the reward and penalty factor of the distance between the next destination position coordinate and the crane closest to the position coordinate. That is, when the crane is close to the next destination position coordinate, that is, less than the set threshold, r3 is a positive value, and the closer the distance, the larger the value, that is, the greater the reward of the reward and penalty factor. When the crane is far away from the next destination position coordinate, that is, greater than the set threshold, r3 is a negative value, and the farther the distance, the smaller the value, that is, the greater the penalty of the reward and penalty factor. By setting this reward and penalty factor r3, the decision of the reinforcement learning model is to control the idle crane to move near the next destination position coordinate, which increases the prediction performance of the reinforcement learning model for the next destination position coordinate.

[0137] The overall purpose of the reward function R is to help reinforcement learning select the optimal strategy to obtain the maximum reward, thereby prompting the reinforcement learning network model to develop towards the optimal strategy.

[0138] S400, build an algorithm framework for deep reinforcement learning, train the algorithm framework according to the designed state space S, action space A and reward function R, and obtain a trained deep reinforcement learning network.

[0139] The algorithm framework is the DDQN algorithm, which includes two independent neural networks with the same structure, namely the evaluation network Q online and the target network Q target . Use experience replay and TD algorithm to train the DDQN network.

[0140] Neural networks are the main method for reinforcement learning to improve generalization ability. The optimized design of neural network structure can reduce overtraining, improve prediction accuracy, and have high training speed and low computing cost.

[0141] It is necessary to consider that the input of this algorithm is related to the state space, and the amount of data in the state space is related to the size of the map. Assuming that the map size is 83*83, m=83, then the input of the neural network is 27556. If the fully connected layer is directly used, the number of training parameters will increase exponentially with the increase in the number of layers, resulting in large amount of calculation and overfitting. In recent years, convolutional neural networks have made breakthrough progress in the field of image recognition. Neural networks have a unique network processing method, which is characterized by local connection, pooling, weight sharing, etc. The unique mode effectively reduces the computational cost, computational complexity, and the number of training parameters. Using the neural network method, the image model has a certain invariance in transformations such as translation, scaling, and distortion, thereby improving the robustness of the system to faults. Based on these superior characteristics, neural networks are superior to fully connected neural networks in data-related information processing tasks.

[0142] The neural network consists of an input layer, a convolutional layer, a fully connected layer, and an output layer. The input data first passes through the convolutional layer for information extraction, which includes map information, crane information of all cranes, mission information, and road condition information. The convolutional network can effectively extract these information features and greatly reduce the number of weights of network parameters. Therefore, neural networks are very suitable for training path planning in dynamic environments. In addition, the rectified linear unit (ReLU) is an activation function recently used in neural networks, which can improve the performance of neural networks. One or more fully connected layers are added after one or more convolutional layers, and the output value of the last fully connected layer is directly transmitted to the output layer. For deep reinforcement learning, the output layer is the action space.

[0143] The DDQN algorithm structure of this application consists of three convolutional layers and two fully connected layers. The input layer is a three-dimensional matrix. When m=83, its size is 83×83×4. The first layer of convolution kernel size designed according to the input layer data is 8×8, the step size is 4×4, and the number of feature maps is 64, so the output layer data size of this layer is 20×20×64. The second layer of convolution kernel size is 4×4, the step size is 2×2, and the number of feature maps is 128, so the output layer data size of this layer is 9×9×128. The third layer of convolution kernel size is 3×3, the step size is 1×1, and the number of feature maps is 128, so the output layer data size of this layer is 7×7×128. The data is expanded into a vector of 6272 features as the input of the fully connected layer, and the output is 512 feature data as the input of the next layer of fully connected layer. The last layer outputs the number of actions in the action space as 2. The activation function in this article is ReLU and the optimizer is Adam.

[0144] Attached Figure 2 and attached Figure 3 For the flow chart and principle diagram of the training, see the attached Figure 2 and attached Figure 3As shown, the algorithm framework is trained according to the designed state space S, action space A and reward function R, and the trained deep reinforcement learning network specifically includes:

[0145] S41, call the random function, select the current action mode a according to the random value randomly generated by the random function, or select the current action mode a according to the evaluation network Q online Calculate the optimal value for the current action mode a.

[0146] S42. Execute action mode a to obtain the state space S' and reward function R at the next moment.

[0147] S43. Store (S, a, R, S', d) into the experience buffer to obtain training samples.

[0148] S44. Select at least part of the training samples to train the algorithm framework, and calculate the estimated value, target value and loss function.

[0149] S45. Update the evaluation network parameters and the target network parameters according to the calculated estimated values ​​and target values.

[0150] S55. Repeat steps S41-S45. When the reward value of the reward function of the algorithm framework tends to converge, a trained deep reinforcement learning network is obtained.

[0151] Where d is the flag to indicate whether this round of training is completed. When d=1, it means that this round of training is completed, and when d=0, it means that this round of training is not completed.

[0152] In one embodiment, a random function is called to select the current action mode a according to the random value randomly generated by the random function, or according to the evaluation network Q online Calculating the optimal value as the current action mode a specifically includes:

[0153] Set an exploration factor. If the random value is less than the preset exploration factor, the random

[0154] Select an action a in the action space A; if the random number is greater than the exploration factor, according to the evaluation network Q online Calculate the optimal value as the current action mode a.

[0155] In one embodiment, exploration factor ∈ [0.1, 1], random value ∈ [0, 1), due to the lack of information in the experience buffer at the beginning of training, the concept of exploration factor is introduced. At this time, the exploration factor is 1. The exploration factor gradually decreases with the progress of training and a minimum value is set. In this embodiment, the lowest exploration factor is 0.1, which means that the algorithm has the opportunity to try to find a better solution.

[0156] The optimal value is , where S' is the state of the crane after executing action a in the state space S, θ online To evaluate the network parameters.

[0157] In one embodiment, the size of the experience buffer is set to 100,000 training sample spaces. When the number of training samples in the experience buffer reaches a certain number, training samples are randomly selected to train the network. In the 10,000 steps of the initial detection, the network parameters are not updated. When the number of samples in the experience buffer exceeds 10,000, 256 (batch-size) training samples are randomly selected from the experience buffer for each training to evaluate the network Q. online Update the target network Q every 3 steps target Update, will evaluate network Q online The evaluation network parameters are copied to the target network Q target .

[0158] In one embodiment, when the number of training samples in the experience buffer reaches an upper limit, the earliest training sample data is deleted according to the first-in-first-out principle when new training samples are added, thereby ensuring that the training samples in the experience buffer are continuously updated.

[0159] Estimated value is TD e , , where Q * online To evaluate the network Q online The best output value.

[0160] The target value is TD t , evaluate the network Q online Calculate the optimal value a * And bring it into the target network Q target , calculate the target value TD t .

[0161] , where γ is the discount factor set, Q * target The target network Q target The optimal output value, θ target are the target network parameters.

[0162] The loss function is calculated as , where E is the mathematical expectation.

[0163] Updating the evaluation network parameters and the target network parameters according to the calculated estimated values ​​and target values ​​includes:

[0164] First, according to the estimated value TD e and target value TD tTo update the evaluation network parameters θ online .

[0165]

[0166] Among them, α is the learning rate, α∈[0,1].

[0167] Then, after a fixed number of iterations, update the target network parameter θ target , the update process can directly evaluate the network parameters θ online Copy to the target network.

[0168]

[0169] The training process is carried out in a simulation state. In the overhead crane scheduling problem under the AHMS system, the path planning of the overhead crane involves the possibility of multiple starting positions and multiple target positions. In order to avoid the situation where the deep reinforcement learning network cannot converge during the training process, the training should be carried out step by step. That is, start training from one target position. After the network model converges, add target positions and train the new target positions based on the trained network model. At the same time, the number of overhead cranes can also be increased according to the situation. The starting position of the training overhead crane can be randomly generated to ensure the diversity and complexity of the environment.

[0170] Attached Figure 5 is the curve of the loss function during the training process, where the horizontal axis is the number of training times and the vertical axis is the output value of the loss function during the training process. As the number of training times increases, the output value of the loss function continues to decrease. After 1000 training times, the output value of the loss function no longer decreases. Figure 6 It is a curve graph of the reward function during the training process, where the horizontal axis is the number of training times and the vertical axis is the output value of the reward function. As the number of training times increases, the output value of the reward function gradually increases. When the training reaches about 10,000 times, the output value of the reward function tends to be stable, and the reward value is greater than 250, which means that as the training progresses, the overhead crane tends to choose the most efficient path to reach the target point in the current environment map.

[0171] S500, collecting the current state space S of the overhead crane in real time, inputting the current state space S into the trained deep reinforcement learning network, and obtaining the real-time action mode a instruction of the overhead crane.

[0172] Step S500 is to plan the path of a real overhead crane, not a simulation. The overhead crane is provided with sensors to collect its current state space in real time. The overhead crane travels according to the action mode a instruction until the overhead crane reaches the destination.

[0173] In this embodiment, the algorithm framework is trained using the designed state space S, action space A and reward function R, and the congestion problem of the overhead crane during driving is considered while ensuring that the overhead crane reaches the target position. The trained reinforcement learning network can output the action instructions of the overhead crane in real time to plan the optimal path for the overhead crane, ensuring that the overhead crane can avoid congestion during driving, thereby improving the transmission efficiency of the overhead crane.

[0174] Embodiment 2

[0175] The present invention provides an overhead crane path planning system based on deep reinforcement learning, which adopts the method in embodiment 1. The system includes a space construction module, a network training module and a task execution module.

[0176] The space construction module stores the designed state space S, action space A, reward function R, and the position coordinates of the overhead crane after moving according to action mode a.

[0177] The network training module stores the algorithm framework for building deep reinforcement learning. The algorithm framework is trained according to the designed state space S, action space A and reward function R to obtain the trained deep reinforcement learning network.

[0178] The task execution module is used to collect the current state space S of the overhead crane in real time, and call the trained deep reinforcement learning network to obtain the real-time action instructions of the overhead crane, and transmit the obtained action instructions to the overhead crane.

[0179] Embodiment 3

[0180] The present application also provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, they are used to implement the overhead crane path planning method in Example 1.

[0181] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0182] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0183] The above implementation modes are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with this technology to understand the content of the present invention and implement it, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for overhead crane path planning, characterized in that: include: Design a state space S for deep reinforcement learning, wherein the state space S includes track map information, overhead crane information, task information, and road condition information; Setting an action space A, wherein the action space A includes different action modes a, and combining the state space S to set the position coordinates of the overhead travelling vehicle after it moves according to the action mode a; Constructing a reward function R for the operation of the overhead crane, wherein the reward function R includes a reward for reaching a destination, a penalty for a jam, and a reward and penalty factor for the distance between the destination coordinates and the nearest overhead crane; Build a deep reinforcement learning algorithm framework, train the algorithm framework according to the designed state space S, action space A and reward function R, and obtain a trained deep reinforcement learning network; The current state space S of the overhead crane is collected in real time, and the current state space S is input into the trained deep reinforcement learning network to obtain the real-time action mode a instruction of the overhead crane; The track map information, the overhead crane information and the road condition information are S(c0,x,y), S(c1,x,y) and S(c3,x,y), respectively, which respectively represent the drivable state at the position coordinate (x,y) on the track, the state of the overhead crane and the length of stay; the task information is S(c2,x,y), which represents the task of the overhead crane and the destination position coordinates when a task is completed; Where c0, c1, c2, c3 are different natural numbers; The reward for reaching the target position is r1. If the crane reaches the target position, r1 is set to m. 2 , otherwise r1 is set to -1, where m is the size of the track map; The penalty for congestion is r2, r2=-S(c3,x t+1 ,y t+1 ) 2 , where (x t+1 ,y t+1 ) is the position coordinates reached by the crane at time t+1; The reward and penalty factor of the distance between the destination coordinate and the nearest overhead crane is r3. When the distance between the overhead crane and the next destination coordinate is less than the set threshold, r3 is a positive value, and the closer the distance, the greater the reward value of the reward and penalty factor. When the distance between the overhead crane and the next destination coordinate is greater than the set threshold, r3 is a negative value, and the farther the distance, the greater the penalty value of the reward and penalty factor. The reward function R=r1+r2+r3.

2. The method for overhead crane path planning according to claim 1, characterized in that: When S(c1,x,y)=S(c2,x,y) and both are not equal to 0, the crane reaches the destination. ; ; Where n represents the task number to be performed by the overhead crane at the position coordinate (x, y), and n is a positive integer.

3. The method for overhead crane path planning according to claim 1, characterized in that: ; Where S t (c3,x,y) is the road condition information of the overhead travelling vehicle at the position coordinate (x,y) at time t, S t+1 (c3,x,y) is the road condition information of the overhead travelling vehicle at the position coordinate (x,y) at time t+1, S t+1 (c1, x, y) is the task of the overhead crane at the position coordinate (x, y) at time t+1, and t' is the preset waiting time.

4. The overhead crane path planning method according to claim 1, characterized in that: The action mode a includes the overhead crane moving forward in a straight line and the overhead crane turning.

5. The method for overhead crane path planning according to any one of claims 1 to 4, characterized in that: The algorithm framework is the DDQN algorithm, which includes an evaluation network Q online and the target network Q target .

6. The method for overhead crane path planning according to claim 5, characterized in that: The algorithm framework is trained according to the designed state space S, action space A and reward function R, and the trained deep reinforcement learning network specifically includes: S41, calling a random function, selecting the current action mode a according to the random value randomly generated by the random function, or selecting the current action mode a according to the evaluation network Q online Calculate the optimal value for the current action mode a; S42, execute action mode a to obtain the state space S' and the reward function R at the next moment; S43, storing (S, a, R, S', d) into the experience buffer to obtain training samples, where d is a flag indicating whether this round of training is completed; S44, selecting at least part of the training samples to train the algorithm framework, and calculating the estimated value, the target value and the loss function; S45, updating the evaluation network parameters and the target network parameters according to the calculated estimated values ​​and target values; S46. Repeat steps S41-S45. When the reward value of the reward function of the algorithm framework tends to converge, a trained deep reinforcement learning network is obtained.

7. The overhead crane path planning method according to claim 6, characterized in that: Call the random function, select the current action mode a according to the random value randomly generated by the random function, or select the current action mode a according to the evaluation network Q online The action mode a for calculating the optimal value at the moment specifically includes: Set an exploration factor. If the random value is less than the preset exploration factor, randomly select an action mode a from the action space A; if the random number is greater than the exploration factor, according to the evaluation network Q online Calculate the optimal value as the current action mode a.

8. The overhead crane path planning method according to claim 6, characterized in that: When the number of training samples in the experience buffer reaches an upper limit and new training samples are added, the earliest training sample data is deleted.

9. A crane path planning system, characterized in that: The path planning of the overhead crane is performed using the method described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed by the processor, they are used to implement the overhead crane path planning method described in any one of claims 1-8.