Traffic control method for unsignalized intersections of intelligent connected vehicles based on Petri net modeling
Through the intelligent networked vehicle unsignalized intersection traffic control method based on Petri net, the vehicle number sequence and deadlock detection algorithm are constructed, which solves the problem of vehicle cycle waiting and traffic congestion in the intelligent networked environment, and realizes the safety of vehicle traffic. and efficiency improvement.
Patent Information
- Application Number
- CN202410553777.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-07
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-05-07
AI Technical Summary
In an intelligent networked environment, traditional vehicle dispatching methods at unsignalized intersections cannot effectively avoid vehicle cycle waiting and traffic congestion, resulting in low traffic efficiency. Existing methods based on Petri nets and heuristic algorithms have limitations and cannot be used in real-time environments. Effectively solve the deadlock problem.
Adopt an intelligent networked vehicle unsignalized intersection traffic control method based on Petri net modeling. By constructing a Petri net model, a vehicle number sequence is generated, and through iterative analysis of changes and resources, deadlocks are detected and repaired to ensure system safety and deadlock-free. , to achieve orderly passage of vehicles.
It achieves an improvement in vehicle traffic efficiency in an intelligent network environment, avoids cyclic waiting at intersections, maximizes the use of road rights resources, ensures the safety and orderliness of vehicle traffic, and solves the problems of deadlocks and traffic congestion in traditional methods. question.
Smart Images

Figure CN118314747B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent transportation systems, and in particular relates to a method for controlling traffic at an unsignalized intersection of an intelligent networked vehicle based on Petri net modeling. Background Art
[0002] In the urban road traffic network, intersections are important nodes in the road system, but they are also prone to traffic congestion and accidents. If a deadlock occurs at an intersection, it will cause traffic congestion. Therefore, it is of great practical significance to analyze the deadlock scenario at the intersection and discuss the solution strategy. Traditional intersection signal control mainly includes timing control, induction control and adaptive control. Timing control is fixed according to the traffic flow of the entrance and exit lanes of the intersection; induction control senses real-time traffic information through traffic detection equipment and dynamically adjusts the signal timing; adaptive control takes the overall traffic efficiency as the goal and adjusts the timing of each intersection according to the regional traffic flow. Compared with traditional intersection signal control, intersection signal control in an intelligent network environment is more intelligent, flexible and efficient, and can improve traffic operation efficiency. In order to meet the needs of my country's road traffic to solve the problem of intersection deadlock, the intersection control theory in an intelligent network environment needs to be deeply studied and improved.
[0003] The existing Petri net and heuristic algorithm-based vehicle dispatching method for signal-free intersections uses a Petri-based intersection supervisory controller to analyze the deadlock situation at a two-way four-lane intersection, and sets a supervisory control library for the deadlock situation, so that vehicles can pass through the intersection safely and orderly. However, setting a supervisory control library is an offline deadlock avoidance method with certain limitations. It is now necessary to solve the problem of vehicle congestion at signal-free intersections in an intelligent network environment. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and propose a method for controlling the passage of intelligent connected vehicles at unsignalized intersections based on Petri net modeling, so as to avoid the situation where vehicles wait in a circle at intersections, so as to alleviate traffic congestion and improve traffic efficiency in an intelligent connected environment, thereby maximizing the utilization of intersection road rights and resources, and providing a certain control strategy for the passage of vehicles at intersections in intelligent transportation systems.
[0005] In order to achieve the above-mentioned purpose, the present invention adopts the following technical solutions:
[0006] The method for controlling the passage of an intelligent connected vehicle at an unsignalized intersection based on Petri net modeling includes the following steps:
[0007] S1. Modeling: Based on the spatial resources in the internal area of the intersection and the occupation of various resources in the continuous process of vehicles passing through the intersection, a Petri net model (N, M0) of the unsignalized intersection system is constructed, and the following symbols are defined:
[0008] N: A Petri net N = (P, T, F) consisting of circular nodes, square nodes and directed arcs, representing an intersection traffic system consisting of k road rights and allowing vehicles on n paths to pass through; P: The library set, which is the set of all circular nodes in N. Where P i0 =P is ∪P if , P is is the buffer zone before the intersection entrance, P if A buffer zone for vehicles leaving the intersection; d represents the total number of right-of-way points on path i, j represents the jth right-of-way point passed by the vehicle, and P ij represents the jth process of a vehicle on path i passing through an intersection; P R = {P r}, P r represents the place set consisting of all right-of-way points; T: transition set, which is the set of all square nodes in N. in d represents the total number of right-of-way points on path i, t ij The triggering indicates that the vehicle of the i-th path travels from the j-1-th right-of-way point to the j-th right-of-way point; F: a directed arc set, representing the driving conditions of each vehicle in the system and the demand and release of resources when passing each right-of-way point during the driving process; M: P→N is an identifier, N is a non-negative integer set, representing the operating state of the system, and each number of the identifier represents the number of vehicles or resources contained in each place; where M0 is the initial identifier, indicating that the current vehicles have not entered the internal area of the intersection, the vehicles are in the buffer zone, and the resources are not occupied; A: an association matrix, representing the change law of the number of tokens in each place under each transition in N, which is a matrix with |T| rows and |P| columns;
[0009] S2. Generate vehicle number sequence: number the vehicles that are about to arrive at the intersection area and generate the intersection vehicle passage sequence according to the passage process of each vehicle passing through each road right point on its path. The specific steps are as follows:
[0010] S2-1, numbering the vehicles according to their travel paths and the order in which they arrive at the intersections, with the numbering being a two-digit integer ID, where I represents the travel path of the vehicle and D represents the order in which the same vehicle arrives at the intersection;
[0011] S2-2, the total number of vehicles that are about to pass through the intersection is recorded as x, and the x vehicles are arranged in ascending order of number into array a0, and then the sequence is expanded according to the number of transitions that each vehicle needs to pass in the path of the Petri net to obtain an array a1 with a total length of m after expansion, and then the vehicle numbers in the array are judged in turn and the position L in the array Pass is selected i In the judgment process, if L i If the total length of the array exceeds m, the length of the array Pass is expanded to 2m, and then the above judgment and placement operations are continued;
[0012] S2-3, after determining and placing all vehicle numbers, delete the empty positions in the array Pass to obtain a possible vehicle pass sequence;
[0013] S2-4, decoding the vehicle passage sequence in Pass into a transition sequence;
[0014] S3, deadlock detection and repair: By iteratively analyzing the changes and resources in the Petri net, the deadlock of the model is avoided to ensure the system is safe and deadlock-free. The specific steps are as follows:
[0015] S3-1, the transition sequence to be detected is the array Pass obtained in S2; let u=1, record the transition sequence number currently detected by Pass;
[0016] S3-2. Determine whether u is greater than the length of the transition sequence. If so, it means that the detection and repair of the sequence is completed. Otherwise, let the uth transition in the transition sequence be t α , execute S3-3;
[0017] S3-3. Check the change t α Is it enabled under the current flag? If it is enabled, execute S3-4. Otherwise, start from t α Then select an enable and the arrival order is t α The previous changes were placed in t α Before, and update t α ;
[0018] S3-4, check the change t α Can it cause deadlock? If it will cause deadlock, select t α The subsequent enabling transition is placed before this transition and updates t α , re-execute S3-4; otherwise, t α , and update the current flag, set u=u+1, and execute S3-2.
[0019] As a preferred technical solution of the present invention, the specific steps of generating a number sequence for vehicles entering an intersection are as follows:
[0020] S2-2-1. Denote the total number of vehicles about to pass through the intersection as x. Arrange the x vehicles in ascending order of their numbers to form an array a0. Then, expand the sequence according to the number of transitions required for each vehicle to pass through the path in the Petri net, obtaining the expanded array a1. a1 represents the road right points of each intersection that each vehicle needs to pass through. Denote the total number of numbers in the array a1 as m.
[0021] S2-2-2. Put the vehicle numbers IDi in the array a1 into the vehicle passing sequence array Pass with a length of m in order. Determine whether the vehicle order Di is equal to 1. If the vehicle order Di = 1, randomly select a position L in Pass and place IDi on L. If Di > 1, execute S2-2-3.
[0022] S2-2-3. When Di > 1, obtain the positions Lmin and Lmax of the vehicle numbers where I = Ii and D = Di - 1. If Lmax < m, randomly select an empty position L1 behind Lmin and place IDi on L1. If Lmax = M, execute S2-2-4.
[0023] S2-2-4. Expand the length of the Pass array to 2m, and then randomly select a new position L1 behind L and place the vehicle number IDi on L1.
[0024] As a preferred technical solution of the present invention, detect whether a deadlock will be caused under the current marking, and the specific steps are as follows:
[0025] S3-4-1. Collect the current reachable marking M0 ∈ R(N u , M u0 ); S3-4-2. Initialize the transition sets T1, T2, and T3 to S3-4-3. Find the road right point resource r α occupied after triggering the transition t α . Since each road right point can only be occupied by one vehicle at the same time, after triggering the transition t α , the number of resources in r α becomes 0. Find all the transitions that can increase r α after triggering and put them into the transition set T1; S3-4-4. If T1 = T2 at this time, output True, indicating that triggering the transition t α under the marking M0 will cause a deadlock; if T1 ≠ T2, select any transition t β from T1\T2, find the road right point resource r β occupied after triggering t β , and check whether r β is not occupied by a vehicle at this time. If it is not occupied, output False, indicating that the transition tα In the case of M0, no deadlock will occur; if the right-of-way point r β If it is already occupied, execute S3-4-5; S3-4-5, find all the nodes that can increase r β The resource changes are put into the transition set T3, and T1 = T1∪T3, T2 = T2∪{t β}, and execute S3-4-4.
[0026] As the preferred technical solution of the present invention, the specific steps for repairing the vehicle traffic sequence are as follows: S3-3-1, collect the current reachable identifier M1∈R(Nu,Mu0); S3-3-2, search for all enabled transitions under the reachable identifier M1 from the u-th transition in the transition sequence at, and put them into the array temp; S3-3-3, randomly select a transition tran from temp; put tran in front of tα, and update u=u+1.
[0027] The Petri net modeling-based intelligent connected vehicle unsignalized intersection traffic control method of the present invention adopts the above technical solution and has the following technical effects compared with the prior art:
[0028] The present invention is based on Petri net modeling, providing an intuitive graphical representation of the intersection structure and vehicle driving process, which is convenient for formal analysis and verification, and by adjusting the structure and parameters of the model, different types of intersections can be easily modeled and analyzed; secondly, through the deadlock detection algorithm, random vehicle traffic sequences are monitored online to determine whether the initiation of each change will cause the system deadlock, and the sequence that will cause the deadlock will be repaired, thereby solving the vehicle congestion problem at unsignaled intersections in an intelligent network environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a flow chart of the control method of the present invention;
[0030] Figure 2 Schematic diagram of a discretization model of a two-way four-lane intersection in an embodiment of the present invention;
[0031] Figure 3 A schematic diagram of a route for straight-going and left-turning vehicles on a two-way four-lane road in an embodiment of the present invention;
[0032] Figure 4 Schematic diagram of a Petri net model of a two-way four-lane intersection in an embodiment of the present invention;
[0033] Figure 5 8 single paths Road of a two-way four-lane intersection in the embodiment of the present invention i Schematic diagram of Petri net model;
[0034] Figure 6 Schematic diagram of generating a vehicle number in an embodiment of the present invention Figure 1 ;
[0035] Figure 7 Schematic diagram of generating a vehicle number in an embodiment of the present invention Figure 2 . DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, some symbols in the embodiments of the present application are first explained to facilitate understanding by those skilled in the art.
[0037] like Figure 1 As shown, the traffic control method for an intelligent connected vehicle at an unsignalized intersection based on Petri net modeling includes the following steps:
[0038] S1. Modeling: Based on the spatial resources in the internal area of the intersection and the occupation of various resources in the continuous process of vehicles passing through the intersection, a Petri net model (N, M0) of the unsignalized intersection system is constructed, and the following symbols are defined:
[0039] N: A Petri net N = (P, T, F) consisting of circular nodes, square nodes and directed arcs, representing an intersection traffic system consisting of k road rights and allowing vehicles on n paths to pass through; P: The library set, which is the set of all circular nodes in N. Where P i0 =P is ∪P if , P is is the buffer zone before the intersection entrance, P if A buffer zone for vehicles leaving the intersection; d represents the total number of right-of-way points on path i, j represents the jth right-of-way point passed by the vehicle, and P ij represents the jth process of a vehicle on path i passing through an intersection; P R = {P r}, P r represents the place set consisting of all right-of-way points; T: transition set, which is the set of all square nodes in N. in d represents the total number of right-of-way points on path i, t ijThe triggering indicates that the vehicle of the i-th path travels from the j-1-th right-of-way point to the j-th right-of-way point; F: a directed arc set, representing the driving conditions of each vehicle in the system and the demand and release of resources when passing each right-of-way point during the driving process; M: P→N is an identifier, N is a non-negative integer set, representing the operating state of the system, and each number of the identifier represents the number of vehicles or resources contained in each place; where M0 is the initial identifier, indicating that the current vehicles have not entered the internal area of the intersection, the vehicles are in the buffer zone, and the resources are not occupied; A: an association matrix, representing the change law of the number of tokens in each place under each transition in N, which is a matrix with |T| rows and |P| columns;
[0040] S2. Generate vehicle number sequence: number the vehicles that are about to arrive at the intersection area and generate the intersection vehicle passage sequence according to the passage process of each vehicle passing through each road right point on its path. The specific steps are as follows:
[0041] S2-1, numbering the vehicles according to their travel paths and the order in which they arrive at the intersections, with the numbering being a two-digit integer ID, where I represents the travel path of the vehicle and D represents the order in which the same vehicle arrives at the intersection;
[0042] S2-2, the total number of vehicles that are about to pass through the intersection is recorded as x, and the x vehicles are arranged in ascending order of number into array a0, and then the sequence is expanded according to the number of transitions that each vehicle needs to pass in the path of the Petri net to obtain an array a1 with a total length of m after expansion, and then the vehicle numbers in the array are judged in turn and the position L in the array Pass is selected i In the judgment process, if L i If the total length of the array exceeds m, the length of the array Pass is expanded to 2m, and then the above judgment and placement operations are continued;
[0043] S2-3, after determining and placing all vehicle numbers, delete the empty positions in the array Pass to obtain a possible vehicle pass sequence;
[0044] S2-4, decoding the vehicle passage sequence in Pass into a transition sequence;
[0045] S3, deadlock detection and repair: By iteratively analyzing the changes and resources in the Petri net, the deadlock of the model is avoided to ensure the system is safe and deadlock-free. The specific steps are as follows:
[0046] S3-1, the transition sequence to be detected is the array Pass obtained in S2; let u=1, record the transition sequence number currently detected by Pass;
[0047] S3-2. Determine whether u is greater than the length of the transition sequence. If it is greater, it means that the detection and repair of the sequence are completed; otherwise, let the u-th transition in the transition sequence be t α , and execute S3-3;
[0048] S3-3. Check whether the transition t α is enabled under the current marking. If it is enabled, execute S3-4; otherwise, select an enabled transition that arrives before t α and whose arrival order is before t α , place it before t α , and update t α ;
[0049] S3-4. Check whether the transition t α can cause deadlock. If it can cause deadlock, select the enabled transitions after t α and place them in front of this transition, and update t α , and re-execute S3-4; otherwise, trigger t α , and update the current marking, let u = u + 1, and execute S3-2.
[0050] Generate a number sequence for the vehicles entering the intersection. The specific steps are as follows:
[0051] S2-2-1. Record the total number of vehicles about to pass through the intersection as x, arrange the x vehicles in ascending order of numbers as array a0, and then expand the sequence according to the number of transitions required by each vehicle in the path of the Petri net to obtain the expanded array a1. a1 represents the road right points of each intersection that each vehicle needs to pass through; record the total number of numbers in array a1 as m;
[0052] S2-2-2. Put the vehicle numbers IDi in array a1 into the vehicle passing sequence array Pass with a length of m in order; judge whether the order of vehicles Di is equal to 1; if the order of vehicles Di = 1, randomly select a position L in Pass and place IDi on L; if Di>1, execute S2-2-3;
[0053] S2-2-3. When Di>1, obtain the positions Lmin and Lmax of the vehicle numbers with I = Ii and D = Di - 1. If Lmax < m, randomly select an empty position L1 after Lmin and place IDi on L1; if Lmax = M, execute S2-2-4;
[0054] S2-2-4. Expand the length of the Pass array to 2m, and then randomly select a new position L1 after L and place the vehicle number IDi on L1.
[0055] Detect whether the transition will cause deadlock under the current identifier. The specific steps are as follows: S3-4-1. Collect the current reachable identifier M0∈R(N u ,M u0 ); S3-4-2, initialize the transition sets T1, T2, and T3 to S3-4-3. Find the trigger for the change α The right-of-way point resources that will be occupied later α Since each right-of-way point can only be occupied by one vehicle at a time, α After that, α The number of resources in becomes 0; find all the resources that can make r α The added transition is put into the transition set T1; S3-4-4, if T1 = T2 at this time, then output True, indicating that the transition t α Triggering under the flag M0 will cause deadlock; if T1≠T2, choose a transition t from T1\T2 β , find the trigger t β The right-of-way point resources that will be occupied later β , and check that r β Is it not occupied by a vehicle? If not, output False, indicating transition t α In the case of M0, no deadlock will occur; if the right-of-way point r β If it is already occupied, execute S3-4-5; S3-4-5, find all the nodes that can increase r β The resource changes are put into the transition set T3, and T1 = T1∪T3, T2 = T2∪{t β}, and execute S3-4-4.
[0056] The specific steps for repairing the vehicle traffic sequence are as follows: S3-3-1. Collect the current reachable identifier M1∈R(Nu,Mu0); S3-3-2. Search for all enabled transitions under the reachable identifier M1 from the u-th transition in the transition sequence at, and put them into the array temp; S3-3-3. Randomly select a transition tran from temp; put tran in front of tα, and update u=u+1.
[0057] In the specific implementation, the intelligent connected vehicle unsignalized intersection control method based on Petri net modeling is specifically applied to the two-way four-lane intersection. The two-way four-lane intersection is discretized into 24 right-of-way points, and the Petri net is used to model the vehicles that are about to pass through the intersection. The vehicles are numbered and a traffic sequence is generated. Different traffic sequences correspond to the order in which the vehicles pass through each right-of-way point. The goal of the control strategy is to detect the deadlock of the traffic sequence and repair it to a deadlock-free traffic sequence on the premise of ensuring that the passage process of each vehicle is not missed, so as to ensure that the vehicles in the intersection area complete their journey safely and orderly. The specific steps are as follows:
[0058] Step 1) (Modeling): Establish a Petri net model of a two-way four-lane intersection: Discretize the internal area of the intersection as Figure 2 The discretized intersection consists of 24 small cells. Each cell is set to accommodate only one vehicle, and the space of the cell can ensure the safe distance between this vehicle and other vehicles. The discretized cells are called right-of-way points. The straight and left-turn vehicle routes of a two-way four-lane road are as follows: Figure 3 As shown in Figure 1, the vehicle has 8 paths, which are straight paths in four directions and left-turn paths. 1, 2, 3, and 4 are straight paths in four directions, and 5, 6, 7, and 8 are left-turn paths in four directions. i The Petri net modeling includes the place set P, transition set T, directed arc set F, and system operation state M. The vehicle starts from the starting place P. is Enter the inner area of the intersection and pass through the library P ij , and finally by the end library P if Exit the intersection. Figure 4 is the Petri net model of Road1. The entire Petri net model consists of 8 single paths Road i The Petri net model consists of Figure 5 shown.
[0059] P is (i=1, 2, 3, 4, 5, 6, 7, 8) is the starting place of path i, from which the vehicle enters the inner area of the intersection, and enters the ending place P after passing all right-of-way points. if , P is The number in represents the total number of vehicles to pass through the path;
[0060] P = {p ij , i=1, 2, 3, 4; j=1, 2, 3, 4}∪{p ij , i = 5, 6, 7, 8; j = 1, 2, 3, 4, 5, 6} is the
[0061] represents the library set of the vehicle driving process, where pij Indicates that the vehicle travels to the jth right-of-way point on path i, p ij The number in represents the current number of vehicles (can only be 0 or 1);
[0062] P c = {r k , k = 1, 2, 3, ..., 22, 23, 24} is the resource library, where r k The number in indicates whether the current right-of-way point is occupied, 0 means it is occupied, and 1 means it is not occupied;
[0063] T=P={t ij , i=1, 2, 3, 4; j=1, 2, 3, 4, 5}∪{t ij , i=5, 6, 7, 8; j=1, 2, 3, 4, 5, 6,
[0064] 7} is a transition set, where t ij It means that the vehicle on path i ends the j-1th right-of-way point and starts the jth right-of-way point.
[0065] Specifically, 11 The vehicle on path 1 starts from the starting place p 1s Entering the inner area of the intersection, p 11 Indicates that the vehicle enters the first right-of-way point r 10 , the process takes r 10 The right-of-way resources in the resource library are 10 The number of right-of-way resources in is 0; 12 Indicates p 11 The vehicle in the end of the occupation of the previous right-of-way point, began to enter the next right-of-way point p 12 , at this time r 10 The number in is 1, the number in r9 is 0, and so on, until the vehicle enters the end library p 1f , indicating that the vehicle has exited the intersection area. Figure 4 p 1s 、p 2s ,…,p 8s The numbers in the figure represent the number of vehicles to be driven on the eight paths: 3, 0, 1, 3, 0, 1, 5, 0; r1, r2, …, r 22 , r 23 , r 24 The numbers in the table indicate that their capacities are all 1. There are no numbers in other operation libraries, indicating that no vehicles occupy other right-of-way points in the initial state. These numbers constitute the initial identifier M0=3p 1s +0p 2s +p 3s +3p 4s +0p 5s +1p6s +5p 7s +0p 8s +r1+r2+r3+r4+r5+r6+r7+r8+r9+r 10 +r 11 +r 12 +r 13 +r 14 +r 15 +r 16 +r 17 +r 18 +r 19 +r 20 +r 21 +r 22 +r 23 +r 24 . Figure 4 The specific meaning of each symbol is shown in Table 1.
[0066] Table 1 Physical meaning of places and transitions in the Petri net model
[0067] element meaning <![CDATA[P is ]]> The vehicle on the i-th path enters the vehicle waiting area at the intersection entrance <![CDATA[t ij ]]> The vehicle on the i-th path ends at the j-1th right-of-way point and starts at the j-th right-of-way point <![CDATA[P ij ]]> The vehicle enters the jth right-of-way point on the i-th path <![CDATA[P if ]]> The vehicle on the i-th path leaves the intersection area <![CDATA[r i ]]> The i-th right-of-way point
[0068] Step 2) (Generate vehicle number sequence): Number the vehicles that are about to arrive at the intersection area and generate the intersection vehicle passage sequence according to the order in which each vehicle passes each right-of-way point on its path. The specific steps are as follows:
[0069] Step 2-1): The vehicles are numbered according to their travel paths and the order in which they arrive at the intersections. The numbering is a two-digit integer ID, where I represents the path that the vehicle is to travel and D represents the order in which the same vehicle arrives at the intersection.
[0070] Step 2-2): After obtaining the number of each vehicle, generate a vehicle passage sequence according to the parking lot that each vehicle passes through. The specific steps are as follows:
[0071] Step 2-2-1): Let the total number of vehicles that are about to pass through the intersection be n, and arrange the n vehicles in ascending order of number into array a0, and then expand the sequence according to the number of transitions that each vehicle needs to pass through in the Petri net path to obtain the expanded array a1, where a1 represents the intersection right-of-way points that each vehicle needs to pass through. Let the total number in array a1 be m;
[0072] Step 2-2-2): For the vehicle ID in array a1 i Put them into the vehicle passage sequence array Pass of length m in order. Determine the order of vehicles D i Is it equal to 1? i =1, then randomly select position L in Pass and set IDi Place it on L. If D i > 1, execute step 2-2-3);
[0073] Step 2-2-3): When Di > 1, obtain the position L where the vehicle number with I = I i , D = Di - 1 is located min and L max . If Lmax < m, randomly select an empty position L1 after L min and place ID i on L1. If L max = m, then execute step 2-2-4);
[0074] Step 2-2-4): Extend the length of the Pass array to 2m, then randomly select an empty position L1 after L min and place the vehicle number IDi on L1;
[0075] Step 2-3): After judging and placing all vehicle numbers, delete the empty positions in the Pass array to obtain the possible vehicle passing sequence;
[0076] Step 2-4): Decode the vehicle passing sequence in Pass into a transition sequence.
[0077] Specifically, there are 13 vehicles in the eight lanes of the two-way four-lane intersection area. There are 3 vehicles about to enter the intersection on lane 1, with all I being 1. The D value of the first vehicle arriving at the buffer is 1, and its number (ID) is 11; the D value of the second vehicle arriving at the buffer is 2, and its number (ID) is 12; the D value of the third vehicle arriving at the buffer is 3, and its number (ID) is 13. After obtaining the numbers of all vehicles, arrange them in ascending order to form an array a0 with a length of 14: (11, 12, 13, 31, 41, 42, 43, 61, 71, 72, 73, 74, 75); Vehicle 11 will successively pass through p 11 , p 12 , p 13 , p 14 , p 1fThe five places are therefore expanded to (11, 11, 11, 11, 11), representing the driving process of vehicle 11. After expanding all the vehicle numbers, we get a1: (11,11,11,11,11,12,12,12,12,12,13,13,13,13,13,31,31,31,31,31,41,41,41,41,41,42,42,42,42,43,43,43,43,43,43,61,61,61,61,61,61,61,71,71,71,71,71,71,71,71,71,72,72,72,72,72,73,73,73,73,73,73,74,74,74,74,74,75,75,75,75,75,75).
[0078] After obtaining a1, the vehicle numbers are sequentially placed into the vehicle pass array Pass of length 77. The I corresponding to vehicle 11 is 1, and D is 1, so the position L = 1, 5, 21, 48, 77 is randomly selected in the Pass array, and 11 is placed in L, such as Figure 6 After placing vehicle 11 in the Pass array, place vehicle 12. I for vehicle 12 is 1, and D is 2. Get the position L of the vehicle number with I=1, D=2-1 in the Pass array. min =1, L max is 77. max = m, the length of the extended array Pass is 154, and then in L min Then randomly select empty positions L = 7, 22, 80, 88, 91 to place vehicle number 12, such as Figure 7 After all the vehicle numbers are placed, the blank positions in the array are deleted, and the vehicle pass sequence Pass = (11, 41, 11, 71, 12, 31, 71, 71, 72, 72, 71, 41, 11, 12, 41, 42, 31, 71, 72, 72, 11, 31, 73, 73, 13, 42, 43, 73, 74, 74, 75, 11 , 12, 71, 12, 13, 75, 41, 13, 41, 42, 71, 12, 72, 61, 72, 73, 74, 75, 13, 42, 42, 72, 61, 73, 73, 74, 13, 73, 75, 74, 75, 43, 74, 74, 61, 31, 43, 31, 43, 43, 61, 75, 61, 75, 61, 61).
[0079] Decode the numbers in the Pass array into a transition sequence, and the ID in the pass sequence i The yth occurrence of corresponds to the yth transition on path I. The transition sequence a obtained after decodingt =(t 11 ,t 41 ,t 12 ,t 71 ,t 11 ,t 31 ,t 72 ,t 73 ,t 71 ,t 72 ,t 74 ,t 42 ,t 13 ,t 12 ,t 43 ,t 41 ,t 32 ,t 75 ,t 73 ,t 74 ,t 14 ,t 33 ,t 71 ,t 72 ,t 11 ,t 42 ,t 41 ,t 73 ,t 71 ,t 72 ,t 71 ,t 15 ,t 13 ,t 76 ,t 14 ,t 12 ,t 72 ,t 44 ,t 13 ,t 45 ,t 43 ,t 77 ,t 15 ,t 75 ,t 61 ,t 76 ,t 74 ,t 73 ,t 73 ,t 14 ,t 44 ,t 45 ,t 77 ,t 62 ,t 75 ,t 76 ,t 74 ,t 15 ,t 77 ,t 74 ,t 75 ,t 75 ,t 42 ,t 76 ,t 77 ,t 63,t 34 ,t 43 ,t 35 ,t 44 ,t 45 ,t 64 ,t 76 ,t 65 ,t 77 ,t 67 ,t 67 ).
[0080] Step 3) (Detect and fix deadlock): Avoid deadlock in the model by iteratively analyzing the transitions and resources in the Petri net to ensure that the system is safe and deadlock-free. The specific steps are as follows:
[0081] Step 3-1): The transition sequence to be detected is the array Pass obtained in step 2. Let u = 1, and record the transition sequence number currently detected by Pass;
[0082] Step 3-2): Determine whether u is greater than the length of the transition sequence. If so, it means that the detection and repair of the sequence is completed. Otherwise, let the uth transition in the transition sequence be t α , execute step 3-3);
[0083] Step 3-3): Check transition t α Is it enabled under the current flag? If it is enabled, execute steps 3-4), otherwise, start from t α Then select an enable and the arrival order is t α The previous changes were placed in t α Before, and update t α ;
[0084] Step 3-4): Check transition t α Can it cause deadlock? If it will cause deadlock, select t α The subsequent enabling transition is placed before this transition and updates t α , re-execute steps 3-4); otherwise, t α , and update the current flag, let u = u + 1, and execute step 3-2);
[0085] The specific process is as follows: Transition sequence a t =(t 11 ,t 41 ,t 12 ,t 71 ,t 11 ,t 31 ,t 72 ,t 73 ,t 71 ,t 72 ,t 74 ,t 42 ,t13 ,t 12 ,t 43 ,t 41 ,t 32 ,t 75 ,t 73 ,t 74 ,t 14 ,t 33 ,t 71 ,t 72 ,t 11 ,t 42 ,t 41 ,t 73 ,t 71 ,t 72 ,t 71 ,t 15 ,t 13 ,t 76 ,t 14 ,t 12 ,t 72 ,t 44 ,t 13 ,t 45 ,t 43 ,t 77 ,t 15 ,t 75 ,t 61 ,t 76 ,t 74 ,t 73 ,t 73 ,t 14 ,t 44 ,t 45 ,t 77 ,t 62 ,t 75 ,t 76 ,t 74 ,t 15 ,t 77 ,t 74 ,t 75 ,t 75 ,t 42 ,t 76 ,t 77 ,t 63 ,t 34 ,t 43 ,t 35 ,t 44 ,t 45 ,t 64 ,t 76 ,t 65 ,t 77 ,t 67 ,t 67), initial identification M0=(3,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1), under the initial identification M0, check the enabling status of each transition one by one and determine whether it will cause deadlock after being triggered. Starting from u=1, determine the transition t α =a t [1] = t 11 , find the transition t 11 The library r that will be reduced when triggered 10 , at this time M0[r 10 ]=1, then the transition t 11 Enable, and trigger t 11 Will not cause deadlock, so it triggers t 11 , and update the current identifier to M1=(2,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1), u=u+1. After judging the transition t 11 -t 41 -t 12 -t 71 -t 11 -t 31 -t 72 -t 73 -t 71 -t 72 -t 74 -t 42 -t 13 -t 12 -t 43 -t 41 -t 32 -t 75 -t 73 -t 74 -t 14 -t 33 -t 71 -t 72 -t 11 -t 42 -t 41 -t 73 -t71 -t 72 After that, M0[t 11 -t 41 -t 12 -t 71 -t 11 -t 31 -t 72 -t 73 -t 71 -t 72 -t 74 -t 42 -t 13 -t 12 -t 43 -t 41 -t 32 -t 75 -t 73 -t 74 -t 14 -t 33 -t 71 -t 72 -t 11 -t 42 -t 44 -t 73 -t 71 -t 72 >M1, M1=(0,1,1,0,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,1,1,1,0,0,0,0,1,1,1,1,0,1,1). Now u=30, determine t α =a t [u]=t 71 Is it allowed to be triggered? Find the transition t 71 When the right-of-way resource is reduced, the place r8 is triggered. At this time, M1[r8]=1, then t 71 Enable. Next, determine t 71 Whether it will cause deadlock under the flag M1, the specific steps are as follows:
[0086] (1) Collect the current reachable identifier M1 = (0,1,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,0,1,1);
[0087] (2) Initialization, enabling the transition set
[0088] (3) Find the transition t 71 The place r8 where the right of way resources will be reduced when triggered;
[0089] (4) Find the transition that can increase the right-of-way resources in r8 after triggering and put it into the set T1, T1 = {t 72 ,t 14};
[0090] (5) At this time, T1≠T2, and T1\T2={t 72 ,t 14}, select t from T1\T2 β =t 14 ; Find t 14 The right-of-way point resources r that will be occupied after triggering β = r7, at this time M1[r7] = 0, the right-of-way point r7 is occupied;
[0091] (6) Find all transitions that can increase the right-of-way resources in r7 and put them into set T3, where T3 = {t 22 ,t 15}, update T1 = T1∪T3, T2 = T2∪{t β}, proceed to step (5);
[0092] After the iterative loop, the deadlock detection algorithm outputs True, that is, t 71 The occurrence of the error under the flag M1 will lead to a deadlock. Therefore, a sequence repair operation is required. The specific steps are as follows:
[0093] (1) Collect the current reachable identifier M1 = (0,1,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,0,1,1);
[0094] (2) In transition sequence a t From t 71 Search all the transitions enabled under the reachable flag M1 and put them into the array temp; at this time temp=(t 13 ,t 15 );
[0095] (3) Randomly select a transition t from temp ran =t 15 , t 15 Put it to 71 Before, and update u=u+1;
[0096] Repeat the above steps, and after judging each transition, you can get a set of deadlock-free transition sequences a t =(t 11 ,t 41 ,t 12 ,t 71 ,t 11 ,t 31 ,t 72 ,t 73 ,t 71 ,t 72 ,t 74 ,t 42 ,t 13 ,t 12 ,t 43 ,t 41 ,t 32 ,t 75 ,t 73 ,t 74 ,t 14 ,t 33 ,t 71 ,t 72 ,t 11 ,t 42 ,t 41 ,t 73 ,t 71 ,t 72 ,t 15 ,t 13 ,t 14 ,t12 ,t 71 ,t 44 ,t 45 ,t 43 ,t 76 ,t 77 ,t 15 ,t 75 ,t 76 ,t 74 ,t 73 ,t 72 ,t 13 ,t 14 ,t 44 ,t 45,t77 ,t 61 ,t 75 ,t 76 ,t 74 ,t 15 ,t 77 ,t 73 ,t 75 ,t 76 ,t 77 ,t 74 ,t 42 ,t 62 ,t 34 ,t 35 ,t 43 ,t 44 ,t 75 ,t 76 ,t 45 ,t 63 ,t 64 ,t 65 ,t 77 ,t 66 ,t 67 ), thus obtaining the deadlock-free vehicle passage sequence Pass=(11,41,11,71,12,31,71,71,72,72,71,41,11,12,41,42,31,71,72,72,11,31,73,73,13,42,43,73,74,74,11,12,12,13,75,41,41,42,71,71,12,72,73,74,75,13,13,42,42,72,61,73,73,74,13,73,75,74,74,74,75,43,61,31,31,43,43,75,75,43,61,61,61,75,61,61).
[0097] After verification by examples, this method can model the intersection through Petri nets, decode the vehicle passage sequence into a transition sequence, and then use the deadlock detection algorithm to realize online supervision of the random vehicle passage sequence, judge whether the initiation of each transition will cause the deadlock of the system, and repair the sequence that can cause deadlock, so as to obtain a deadlock-free passage sequence of vehicles at the intersection, thereby ensuring that the vehicles in the intersection area complete their journey safely and orderly.
[0098] The specific implementation scheme described above further describes in detail the purpose, technical scheme and beneficial effects of the present invention. It should be understood that the above is only a specific implementation scheme of the present invention and is not intended to limit the scope of the present invention. Any equivalent changes and modifications made by any technician in the field without departing from the concept and principle of the present invention should fall within the scope of protection of the present invention.
Claims
1. A method for controlling the passage of intelligent connected vehicles at unsignalized intersections based on Petri net modeling, characterized in that: The following steps are involved: S1. Modeling: Based on the spatial resources in the internal area of the intersection and the occupation of various resources in the continuous process of vehicles passing through the intersection, a Petri net model (N, M0) of the unsignalized intersection system is constructed, and the following symbols are defined: N: A Petri net N = (P, T, F) consisting of circular nodes, square nodes and directed arcs, representing an intersection traffic system consisting of k right-of-way points and allowing vehicles on n paths to pass through; P: Place set, which is the set of all circular nodes in N. Where P i0 =P is ∪P if , P is is the buffer zone before the intersection entrance, P if A buffer zone for vehicles leaving the intersection; d represents the total number of right-of-way points on path i, j represents the jth right-of-way point passed by the vehicle, and P ij represents the jth process of a vehicle on path i passing through an intersection; P R = {P r }, P r represents the place set consisting of all right-of-way points; T: transition set, which is the set of all square nodes in N. in d represents the total number of right-of-way points on path i, t ij The triggering of indicates that the vehicle of the i-th path travels from the j-1-th right-of-way point to the j-th right-of-way point; F: directed arc set, representing the driving conditions of each vehicle in the system and the demand and release of resources when passing each right-of-way point during driving; M: P→N is the identifier, N is a non-negative integer set, indicating the operating status of the system, and each number of the identifier represents the number of vehicles or resources contained in each library; M0 is the initial identifier, indicating that the current vehicles have not entered the inner area of the intersection, the vehicles are in the buffer zone, and the resources are not occupied; A: The incidence matrix, which represents the changing pattern of the number of tokens in each repository under each transition in N. It is a matrix with |T| rows and |P| columns. S2. Generate vehicle number sequence: number the vehicles that are about to arrive at the intersection area and generate the intersection vehicle passage sequence according to the passage process of each vehicle passing through each road right point on its path. The specific steps are as follows: S2-1, numbering the vehicles according to their travel paths and the order in which they arrive at the intersections, with the numbering being a two-digit integer ID, where I represents the travel path of the vehicle and D represents the order in which the same vehicle arrives at the intersection; S2-2, the total number of vehicles that are about to pass through the intersection is recorded as x, and the x vehicles are arranged in ascending order of number into array a0, and then the sequence is expanded according to the number of transitions that each vehicle needs to pass in the path of the Petri net to obtain an array a1 with a total length of m after expansion, and then the vehicle numbers in the array are judged in turn and the position L in the array Pass is selected i In the judgment process, if L i If the total length of the array exceeds m, the length of the array Pass is expanded to 2m, and then the above judgment and placement operations are continued; S2-3, after determining and placing all vehicle numbers, delete the empty positions in the array Pass to obtain a possible vehicle pass sequence; S2-4, decoding the vehicle passage sequence in Pass into a transition sequence; S3, deadlock detection and repair: By iteratively analyzing the changes and resources in the Petri net, the deadlock of the model is avoided to ensure the system is safe and deadlock-free. The specific steps are as follows: S3-1, the transition sequence to be detected is the array Pass obtained in S2; let u=1, record the transition sequence number currently detected by Pass; S3-2. Determine whether u is greater than the length of the transition sequence. If so, it means that the detection and repair of the sequence is completed. Otherwise, let the uth transition in the transition sequence be t α , execute S3-3; S3-3. Check the change t α Is it enabled under the current flag? If it is enabled, execute S3-4. Otherwise, start from t α Then select an enable and the arrival order is t α The previous changes were placed in t α Before, and update t α ; S3-4, check the change t α Can it cause deadlock? If it will cause deadlock, select t α The subsequent enabling transition is placed before this transition and updates t α , re-execute S3-4; otherwise, t α , and update the current flag, set u=u+1, and execute S3-2.
2. The method for controlling traffic at an unsignalized intersection of an intelligent networked vehicle based on Petri net modeling according to claim 1 is characterized in that: To generate a number sequence for vehicles entering an intersection, the specific steps are as follows: S2-2-1, record the total number of vehicles that are about to pass through the intersection as x, and arrange the x vehicles in ascending order of number into an array a0, and then expand the sequence according to the number of transitions that each vehicle needs to pass through in the path of the Petri net to obtain the expanded array a1, where a1 represents the intersection right-of-way points that each vehicle needs to pass through; record the total number of numbers in array a1 as m; S2-2-2, put the vehicle numbers IDi in the array a1 into the vehicle pass sequence array Pass of length m in order; determine whether the vehicle sequence Di is equal to 1; if the vehicle sequence Di=1, randomly select the position L in Pass and put IDi on L; if Di>1, execute S2-2-3; S2-2-3. When Di > 1, obtain the positions Lmin and Lmax where the vehicle numbers with I = Ii and D = Di - 1 are located. If Lmax < m, randomly select an empty position L1 behind Lmin and place IDi at L1; if Lmax = M, then execute S2-2-4; S2-2-4. Expand the length of the Pass array to 2m, then randomly select a new position L1 behind L and place the vehicle number IDi at L1.
3. The method for controlling traffic at an unsignalized intersection of an intelligent networked vehicle based on Petri net modeling according to claim 2 is characterized in that: Detect whether the transition will cause deadlock under the current marking, and the specific steps are as follows: S3-4-1. Collect the current reachable identifier M0∈R(N u ,M u0 ); S3-4-2. Initialize the transition sets T1, T2, and T3 to S3-4-3. Find the trigger for the change α The right-of-way point resources that will be occupied later α Since each right-of-way point can only be occupied by one vehicle at a time, α After that, α The number of resources in becomes 0; find all the resources that can make r α Add the added transitions and put them into the transition set T1; S3-4-4, if T1 = T2 at this time, then output True, indicating that the transition t α Triggering under the flag M0 will cause deadlock; if T1≠T2, choose a transition t from T1\T2 β , find the trigger t β The right-of-way point resources that will be occupied later β , and check that r β Is it not occupied by a vehicle? If not, output False, indicating transition t α No deadlock will occur under representation M0; If the right-of-way point r β If it is already occupied, execute S3-4-5; S3-4-5. Find all the ways to increase r β The resource changes are put into the transition set T3, and T1 = T1∪T3, T2 = T2∪{t β }, and execute S3-4-4.
4. The method for controlling traffic at an unsignalized intersection of an intelligent connected vehicle based on Petri net modeling according to claim 3 is characterized in that: For the repair of the vehicle passing sequence, the specific steps are as follows: S3-3-1. Collect the current reachable marking M1 ∈ R(Nu, Mu0); S3-3-2. Search backward from the u-th transition in the transition sequence at for all transitions enabled under the reachable marking M1 and place them in the array temp; S3-3-3. Randomly select a transition tran from temp; place tran in front of tα and update u = u + 1.
Citation Information
Patent Citations
Robustness control method of automatic manufacture system based on Petri network
CN106200575A
Equipment manufacturing system no-deadlock scheduling method based on Petri network and simulation annealing
CN106227163A
Vehicle shortest time traffic path processing method based on time delay Petri network
CN111428910A
Flexible manufacturing system deadlock-free scheduling method based on improved genetic algorithm
CN111563336A
Multi-AGV path planning obstacle avoidance method based on Petri network model
CN114740834A
