An intersection modeling and signal light control optimization method based on fuzzy neural petri net

By adopting a fuzzy neural Petri net-based intersection modeling and traffic light control method, the problem of traffic light control under real-time traffic changes was solved, adaptive traffic flow management was achieved, and traffic efficiency and system stability were improved.

CN119207137BActive Publication Date: 2025-11-21KUNMING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411329870.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-11-21
Estimated Expiration
2044-09-24

AI Technical Summary

Technical Problem

Existing traffic signal control methods are ineffective in responding to real-time changes in traffic conditions, resulting in low traffic efficiency and system instability.

Method used

An intersection modeling method based on fuzzy neural Petri nets is adopted. By extending the properties of continuous Petri nets and fuzzy Petri nets, and combining them with the backpropagation algorithm, the traffic light control is optimized. The SUMO simulation software is used for training and verification to achieve adaptive control of the traffic lights.

Benefits of technology

It improves the stability and traffic efficiency of intersection traffic light control, effectively copes with complex traffic situations, and enhances the system's intelligence and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119207137B_ABST
    Figure CN119207137B_ABST
Patent Text Reader

Abstract

The application relates to a kind of intersection modeling and signal light control optimization method based on fuzzy neural Petri net, belong to traffic signal light control technical field.The application uses the attribute extension of only read arc and suppression arc attribute to the basic attribute of the directed arc of continuous Petri net, constructs intersection traffic flow and section model and intersection signal light model using the extended continuous Petri net;Second, introduce fuzzy Petri net, and extend the basic attribute of fuzzy Petri net transition, and construct intersection signal light fuzzy control model using the extended fuzzy Petri net;Third, by replacement operation, construct adaptive control intersection model based on continuous Petri net and fuzzy Petri net, realize signal light adaptive control.Compared with fixed timing scheme and optimization scheme considering only vehicle queue length, the evaluation index such as average time loss, average waiting time and total number of vehicles in phase time has advantages in improving intersection traffic capacity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for intersection modeling and traffic light control optimization based on fuzzy neural Petri nets, belonging to the field of traffic light control technology. Background Technology

[0002] Petri nets, as a modeling tool that combines graphical and mathematical methods, can model and analyze both discrete and continuous event systems. They have outstanding capabilities in describing asynchronicity, concurrency, and conflict, and possess powerful scalability. Therefore, they are an effective tool for modeling and analyzing cyber-physical systems with a mix of continuous and discrete events.

[0003] Traffic cyber-physical systems (CPS) are classic CPS systems, characterized by complexity, concurrency, and conflict. Intersections are key nodes in CPS. Traffic light control has always been a challenging and important research area. Fuzzy control algorithms can effectively resolve the contradiction between real-time traffic flow changes and fixed traffic light timings. Furthermore, the introduction of neural learning algorithms improves the lack of adaptive capabilities in fuzzy algorithms.

[0004] The advantage of continuous Petri nets lies in their ability to naturally represent the continuity of traffic flow, capturing the dynamic characteristics of vehicles traveling in different directions through changes in flow rate. This model is suitable for intersection modeling because intersection traffic flow exhibits significant time-varying and uncertainties.

[0005] Fuzzy Petri nets can dynamically adjust traffic light control strategies based on real-time traffic data. Traditional methods typically rely on preset timing strategies, which are difficult to effectively cope with real-time changes in traffic conditions. Fuzzy Petri nets, however, can assess traffic flow in real time and adjust control strategies accordingly, thereby improving traffic efficiency. By combining backpropagation neural networks and fuzzy Petri nets, intersection traffic light control systems can be significantly improved in several aspects, including control stability, traffic efficiency, system intelligence, ability to handle complex traffic situations, and system robustness. This combination fully leverages the powerful learning and predictive capabilities of backpropagation neural networks and the flexible and powerful rule management capabilities of fuzzy Petri nets, enabling traffic light control systems to operate more intelligently, efficiently, and robustly.

[0006] In summary, Petri nets, which combine fuzzy control algorithms and neural learning algorithms, are of great significance for describing, controlling, and optimizing intersection traffic light control systems.

[0007] The technology of this invention is supported by the Yunnan Provincial Major Science and Technology Project (202302AD080002); the Industrial Innovation Talent Project of the "Xingdian Elite Talent Support Program" (Yunnan Development and Reform Commission Personnel

[2019] No. 1096); and the Open Fund of Yunnan Provincial Key Laboratory of Computer Technology Application (CB22144S073A). Summary of the Invention

[0008] The technical problem to be solved by this invention is to realize intersection modeling and traffic light control optimization based on Petri nets.

[0009] The technical solution of this invention is as follows: a method for intersection modeling and traffic light control optimization based on fuzzy neural Petri nets. First, the basic properties of directed arcs in a continuous Petri net are extended, and the extended continuous Petri net is used to construct an intersection traffic flow and road segment model and an intersection traffic light model. Second, a fuzzy Petri net is introduced, and the basic properties of the fuzzy Petri net transitions are extended. The extended fuzzy Petri net is then used to construct a fuzzy control model for the intersection traffic lights. Third, an adaptive control intersection model based on both the continuous and fuzzy Petri nets is constructed through substitution operations to achieve adaptive control of the traffic lights. Based on this, a fuzzy neural Petri net intersection traffic light control optimization algorithm is proposed, combining backpropagation algorithm to optimize the confidence, threshold, and weights of the fuzzy Petri net. Finally, an experimental environment is built using SUMO simulation software, and the model is trained using training sample data obtained from the simulated road network operation. The accuracy of the model is verified by comparing the simulated sample data with the green light duration after training.

[0010] The specific steps are as follows:

[0011] Step 1: Extend the read-only attribute on the basic definition of the directed arc of the continuous Petri net. The extended directed arc is called the read-only arc. After the transition pointed to by the read-only arc satisfies the activation condition, the transition only reads the number of tokens in the place without removing the tokens in the place. Use the continuous Petri net with extended read-only attribute to construct the intersection traffic flow and road segment model.

[0012] Step 2: Based on the continuous Petri net with extended read-only arc attributes, the directed arc attributes are further extended. The extended directed arcs are defined as suppression arcs. Suppression arcs are used to check transition activation conditions and prevent transitions that do not meet the conditions from being activated. The intersection traffic light model is constructed using the continuous Petri net with extended read-only and suppression attributes. The replacement operation of the continuous Petri net is introduced to realize the replacement of the control locations in the intersection traffic light model and the intersection traffic flow and road segment model. A complete continuous Petri net intersection model is constructed to realize traffic light control of traffic flow.

[0013] Step 3: Introduce fuzzy Petri nets to optimize traffic light control. Extend the basic properties of transitions in the fuzzy Petri nets. Define the extended transitions as operational transitions. Operational transitions have the function of calculating the number of tokens in the library. Then define their fuzzy rules. Use the fuzzy Petri nets with extended transition operational properties and defined fuzzy rules to construct a fuzzy control model for intersection traffic lights. Use substitution operations to combine the fuzzy control model of intersection traffic lights with the complete continuous Petri net intersection model. Construct an adaptive control intersection model based on continuous Petri nets and fuzzy Petri nets to achieve adaptive control of traffic lights.

[0014] Step 4: Based on the fuzzy control model of intersection traffic lights, a fuzzy neural Petri net traffic light control optimization algorithm is proposed according to the backpropagation algorithm, and a fuzzy neural Petri net control optimization model is constructed.

[0015] Step 5: In the SUMO simulation software, build a simulated road network based on the intersection layout and mixed traffic flow data, set up simulation detectors, and run the simulated road network.

[0016] Step 6: Using traffic flow data and corresponding phase signal light timing data obtained from the simulated road network as training sample data, the fuzzy neural Petri net control optimization model is trained. The confidence level, threshold, and weights between locations and transitions in the adaptive control intersection model are optimized to correct the parameters during training and achieve the expected goals. The accuracy of the optimization algorithm in training transition parameters is verified by comparing the simulated sample data and the green light duration after training. Simultaneously, simulation experiments are conducted to compare the algorithm with fixed timing schemes and linear control schemes. Evaluation results show that the algorithm can effectively improve the control performance of intersection signal lights.

[0017] Furthermore, Step 1 includes:

[0018] Step 1.1: In the basic continuous Petri net CPN = (P,T,A,W,θ,M0), extend the read-only attribute RA to the basic definition of directed arc A. The read-only arc RA provides a way to check the token count for continuous Petri net transitions. The read-only arc reads the detection region library. The number of tokens is changed, but the number of tokens in the above-mentioned storage is not changed. The enable condition of read-only arc RA is the same as that of ordinary arc, but the triggering rule is different.

[0019] The specific definition of the read-only arc excitation rule is as follows:

[0020] For any transition t in set T, if there exists a read-only arc a(p×t)∈RA, and the number of tokens M(p), the read-only arc weight W(p,t), and the transition threshold θ(t) satisfy M(p)×W(p,t)≥θ(t), then M'(p)=M(p), and M'(p) is the number of tokens in the output place; RA is a finite set of read-only arcs, which is a mapping from places to transitions.

[0021] A continuous Petri net with extended read-only properties is defined as a seven-tuple CPN = (P, T, A, RA, W, θ, M0);

[0022] Step 1.2: Using the locations, transitions, and directed arcs in the continuous Petri net seven-tuple CPN=(P,T,A,RA,W,θ,M0) with extended read-only attributes, the state changes and interaction relationships of the system are graphically represented to construct a continuous Petri net intersection vehicle and road segment model.

[0023] In the continuous Petri net intersection vehicle and road segment model, the location and Superscripts indicate the traffic flow status or stage at an intersection, while subscripts indicate whether the traffic flow is on a straight road or turning left; the token number M in the storage p represents the number of vehicles in that stage of the traffic flow; transitions It indicates changes in the traffic flow status or phase at an intersection.

[0024] The continuous Petri net intersection vehicle and road segment model has the function of detecting and reading the token count of the database, specifically: transitions. With change This indicates that traffic flow has transitioned from the detection state to the waiting state; a read-only arc is used at this transition point. and Cause change and After stimulation and Realize waiting warehouse and For testing facilities and Read the token count.

[0025] Furthermore, Step 2 includes:

[0026] Step 2.1: Continue to extend the suppression attribute IA to the basic definition of the directed arc A in the continuous Petri net CPN = (P,T,A,RA,W,θ,M0) with extended read-only attributes. If there is a marker in the place connected to the suppression arc IA, the transition cannot be triggered. The transition can only be triggered when there is no marker in the place connected to the suppression arc.

[0027] The suppression arc activation rule is defined as follows: For any transition t in set T, if there exists a suppression arc a(p×t)∈IA, and the number of tokens M(p) in the input library p, the read-only arc weight W(p,t) and the transition threshold θ(t) satisfy M(p)×W(p,t)<θ(t), then the transition t is said to be activated; IA is a finite set of suppression arcs, which is a mapping from position to transition.

[0028] The extended read-only and suppression properties of the continuous Petri net are defined as an octet CPN = (P, T, A, RA, IA, W, θ, M0).

[0029] Step 2.2: Using the places, transitions and directed arcs in the continuous Petri net octet CPN=(P,T,A,RA,IA,W,θ,M0) with extended read-only and suppression attributes, the state changes and interaction relationships of the system are graphically represented to construct a continuous Petri net intersection traffic light model.

[0030] In the continuous Petri net intersection signal light model, the location p x , and These represent the traffic light phase stage, the current phase green light time, and the traffic light control depot, respectively. Depot p x A token count of 0 indicates the end of the phase phase, and a token count of 1 indicates the start of the phase phase; transition t x→x+1 , and These represent the phase switching phase, the phase reset green light time, and the green light reading time, respectively.

[0031] The continuous Petri network intersection signal light model includes three functions: phase switching, green light time reset, and green light time reading.

[0032] The phase switching function is: directed arc To suppress the arc, when the warehouse The number of tokens is 0, and the library p x When the token count is 1, it indicates that the current phase's green light timer has ended, and the vault... With p x In suppressing the arc Under the combined effect of the transition t x→x+1 This enables phase switching.

[0033] The green light time reset function is: directed arc and To suppress the arc, when the warehouse and When all tokens are 0, it indicates that the green light timer for the previous phase has ended, and the warehouse is ready to open. and In suppressing the arc and Under the combined effect of the transition This resets the current phase's green light time.

[0034] The green light time reading function is: directed arc For read-only arcs, read from the library. The number of tokens is stored in the traffic light control warehouse. Implement the reading of green light time.

[0035] Step 2.3: Introduce the substitution operation of continuous Petri nets. The substitution operation is as follows: For any two subnets N1 = (P1, T1, A1) and N2 = (P2, T2, A2), perform the substitution operation. After the substitution, N' = (P', T', A') satisfies P' = (P-P1) ∪ P2 and T' = (T-T1) ∪ T2.

[0036] The continuous Petri net intersection traffic light model is simplified to a warehouse after replacement operation. Replaced warehouse In the traffic flow and road segment model of the intersection with Step 1, the database is located. Together, we inspire change Construct a complete continuous Petri net intersection model to realize traffic light control of traffic flow.

[0037] Furthermore, Step 3 includes:

[0038] Step 3.1: Introduce fuzzy Petri nets to optimize traffic light control. In the fuzzy Petri net FPN=(P,T,D,A,F,θ,μ,λ,r,Ac,M0), operational attributes are extended on the basic definition of transitions to realize complex computational logic. Operational transitions allow arithmetic operations on the number of markers during transition excitation.

[0039] The activation rule for operation transitions is as follows: For any transition t in set T, there exists an input library p∈P. Addition and subtraction operations and ratio operations are defined. The activation rule for the addition operation transition is: M'(p O )=Op(t)=M(p1)+M(p2)+…+M(p n The excitation rule for the transition of the subtraction operation is: M'(p O )=Op(t)=M(p1)-M(p2)-…-M(p n The excitation rule for the ratio operation transition is: M'(p) O Op(t) = M(P) i ) / M(P jThe calculation of the proportion of heavy vehicles uses a ratio operation transition, the calculation of the phase green light time uses an addition operation transition, and the input layer transition... The input fuzzification is achieved using subtraction and ratio transitions, and the defuzzification transition t is performed. df The centroid method is used to solve fuzzy problems by employing addition and ratio operations. Op:T → “operation operation” is a mapping from transition to operation operation.

[0040] The extended fuzzy Petri net is defined as a 12-tuple FPN = (P,T,D,A,F,θ,μ,λ,r,Ac,Op,M0).

[0041] Step 3.2: Define fuzzy rules for the expanded fuzzy Petri net. r is a fuzzy rule composed of AND and OR logic. Each transition t is mapped to a corresponding fuzzy rule. The transition rules are obtained using the min-max inference method: Let the i-th place and j-th transition in the fuzzy Petri net be the fuzzy rules for the enabled transition t. j Take all the input libraries p i Calculation result Ac ij =m i ×f ij ×λ j The minimum value in the transition t is taken as the transition t. j The excitation output value; for a transition t with multiple inputs. j The library p i+1 Take all input transitions t j The maximum value among the excitation values ​​is used as the output value of this library. i+1 Updated token count.

[0042] Step 3.3: Using the places, transitions, and directed arcs in the fuzzy Petri net twelf-tuple FPN=(P,T,D,A,F,θ,μ,λ,r,Ac,Op,M0) with extended operational attributes and completed fuzzy rule definition, the state changes and interaction relationships of the system are graphically represented, and a fuzzy Petri net intersection traffic light fuzzy control model is constructed.

[0043] In the fuzzy control model of traffic lights at a fuzzy Petri intersection network, the location p VN and p PHV These represent the number of vehicles and the proportion of heavy vehicles in the fuzzy input, respectively; [Inventory / Depository] and These represent the fuzzified subsets of the fuzzy input and output quantities under the triangular membership function, respectively; [Place p] GT This indicates the result of defuzzification of the output quantity, which increases the green light time; transition. The input quantity is fuzzified using the triangular membership function, and the input library is p. VNand p PHV By manipulating transitions Pointing to its corresponding fuzzy subset and

[0044] change The input library comes from a fuzzy subset. and change Once the activation conditions are met, the minimal inference method in Step 3.2 is executed to obtain the transition of the corresponding fuzzy rule. Output; Library The input transitions come from the corresponding rules. Rule changes for satisfying conditions Execute the maximum reasoning method in Step 3.2 to deduce that the green light time will increase.

[0045] Changes t df Using the center of gravity method to determine the location p out The output value is deblurred, and the green light time is increased by adding the base green light time to get the green light time for that phase. This is then stored in the green light time library. GT This enables the corresponding phase signal light to output the green light time.

[0046] Step 3.4: The fuzzy control model for traffic lights in a fuzzy Petri network intersection includes two modules: input and output. The input module reads the data from the database of each phase in the complete continuous Petri network intersection model. Replace with the input library p of the corresponding phase of the fuzzy control model for traffic lights at a fuzzy Petri intersection network. VN and p PHV The output module simplifies the network structure of the fuzzy Petri intersection signal light fuzzy control model into a library after a replacement operation. Replaced warehouse Library of complete continuous Petri net intersection models Together, we inspire change By combining the fuzzy control model of the intersection traffic lights with the complete continuous Petri net intersection model in Step 2, an adaptive control intersection model based on continuous Petri nets and fuzzy Petri nets is constructed to realize adaptive control of traffic lights for traffic flow.

[0047] Furthermore, Step 4 includes:

[0048] Step 4.1: The optimization algorithm includes initializing transition parameters, designing transition activation functions, updating parameters through gradient descent, calculating loss, iterative training, and outputting results.

[0049] Initialize the initial parameters of the transition within the range that ensures it can be triggered; assuming the fuzzy rule is set to a uniform distribution, the specific formula for initializing the transition parameters is as follows:

[0050]

[0051] In the formula, n in and n out These are the number of nodes in the input layer and the output layer, respectively.

[0052] Step 4.2: Design the transition activation function. Based on the characteristics of the intersection traffic light control system, a Sigmoid activation function with relatively stable gradient changes is set. The relationship between the fuzzy input value and the transition confidence, threshold, and fuzzy weights is defined. This function can nonlinearly map the input and output of the fuzzy Petri intersection network traffic light fuzzy control model and determine whether the transition is enabled. Specifically:

[0053]

[0054] In the formula, Ac represents the rule transition in the fuzzy control model of traffic lights at a fuzzy Petri intersection network. The calculation result Ac = M(p) × F(p,t) × λ(t), where M(p) is the number of tokens in the input library, F(p,t) is the fuzzy weight of the transition, and λ(t) is the confidence level of the transition.

[0055] Input simulation sample data, and calculate the fuzzy membership range, triggered rules and their activation values ​​for each set of input data through the fuzzy control system; for each set of simulation sample data, only the transitions corresponding to the triggered rules are trained and the activation values ​​are calculated.

[0056] Step 4.3: Calculate the loss using mean squared error, and update the weights, confidence levels, and thresholds of the transitions using gradient descent. The specific formulas for calculating the gradients of the transitions, confidence levels, and thresholds, based on the designed activation function, are as follows:

[0057]

[0058] Step 4.4: The formula for calculating the loss function is as follows:

[0059]

[0060] In the formula, y i It is the actual value. It is the algorithm's predicted value.

[0061] Step 4.5: Iteratively train the transition using the same data until the transition can no longer be activated. Keep the last set of parameters that can activate the transition as temporary parameters. Compare the error between the activation value and the standard activation value under the new and old temporary parameters, and take the one with the smallest error as the new temporary parameter. Repeat these steps until all transition parameters are stable or the simulation sample data is used up, and output the trained transition parameters.

[0062] Furthermore, Step 5 includes:

[0063] Step 5.1: Use the simulation software SUMO to build a simulated road network for the intersection, using the open-source global map project OpenStreetMap as the map data source; use the netconvert tool included with SUMO to convert the OpenStreetMap map data into a .net.xml file usable by SUMO; create a traffic flow .rou.xml file to define vehicle types, routes and their traffic volumes.

[0064] Step 5.2: In the SUMO simulation software, set up simulated detectors to mimic real-world induction coils or cameras. The detector output file type is XML. Utilize Python to develop the API provided by SUMO and use the `traci.start()` method to connect to SUMO for real-time interaction. Set up lane area detectors and induction coil detectors, and run the simulated road network.

[0065] Furthermore, Step 6 includes:

[0066] Step 6.1: Use the traffic flow data and corresponding phase signal timing data obtained from the simulated road network as training sample data; train the transition parameters according to the fuzzy neural Petri net intersection signal control optimization algorithm in Step 4, optimize the transition confidence, threshold, and weight between the location and the transition, so as to correct the parameters in the training to achieve the expected goal; input the transition parameters trained by the fuzzy neural Petri net intersection signal control optimization algorithm into the adaptive control intersection model based on continuous Petri net and fuzzy Petri net, and verify the accuracy of the algorithm in training the transition parameters by comparing the simulated sample data and the green light duration after training;

[0067] Step 6.2: Conduct a comparative experiment on traffic light control strategies using SUMO simulation software. By comparing with fixed timing schemes and linear control schemes, the evaluation results show that the algorithm can effectively improve the control effect of traffic lights at intersections.

[0068] The beneficial effects of this invention are:

[0069] 1. Compared with traditional intersection signal control methods, the present invention uses fuzzy neural Petri nets, which combine the advantages of Petri nets and fuzzy logic. It can manage complex rules and relationships in a graphical structure and make decisions through fuzzy reasoning mechanisms. It can perform fuzzy neural graphical modeling for factors such as the driving speed of different types of vehicles and the cross interference between mixed traffic flows.

[0070] 2. The fuzzy neural Petri net traffic light control optimization method of the present invention combines backpropagation neural network to train fuzzy Petri net transition parameters. By real-time monitoring and prediction of traffic flow in each direction, it rationally allocates traffic light cycles, reduces vehicle waiting time, ensures control stability, and improves intersection traffic efficiency. Attached Figure Description

[0071] Figure 1 This is a flowchart illustrating the implementation of the present invention;

[0072] Figure 2 This is a traffic flow and road segment model diagram of a continuous Petri net intersection in an embodiment of the present invention;

[0073] Figure 3 This is a schematic diagram of a continuous Petri net intersection traffic light model in an embodiment of the present invention;

[0074] Figure 4 This is a complete continuous Petri net intersection model diagram in an embodiment of the present invention;

[0075] Figure 5 This is a diagram of a fuzzy Petri net intersection traffic light fuzzy control model in an embodiment of the present invention;

[0076] Figure 6 This is a diagram of an adaptive control intersection model based on continuous Petri nets and fuzzy Petri nets in an embodiment of the present invention;

[0077] Figure 7 This is a flowchart of the fuzzy neural Petri net intersection traffic light control optimization algorithm in an embodiment of the present invention;

[0078] Figure 8 This is a simulated road network operation diagram of an actual intersection in an embodiment of the present invention;

[0079] Figure 9 This is a diagram showing the experimental results of the accuracy verification of the fuzzy neural Petri net intersection traffic light control optimization algorithm in this embodiment of the invention. Detailed Implementation

[0080] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0081] Example 1: As Figure 1As shown, a method for intersection modeling and traffic light control optimization based on fuzzy neural Petri nets includes the following steps:

[0082] Step 1: Extend the read-only attribute on the basic definition of the directed arc of the continuous Petri net. The extended directed arc is called the read-only arc. After the transition pointed to by the read-only arc satisfies the activation condition, the transition only reads the number of tokens in the place without removing the tokens in the place. Use the continuous Petri net with extended read-only attribute to construct the intersection traffic flow and road segment model.

[0083] Step 1.1: The basic continuous Petri net can be defined as a six-tuple, specifically:

[0084] CPN=(P,T,A,W,θ,M0)

[0085] In the formula:

[0086] P = {p1, p2, ..., p} m} is a finite, non-empty set of collections;

[0087] T = {t1, t2, ..., t} n} is a finite nonempty set of transitions;

[0088] It is a finite set of directed arcs;

[0089] It is a positive real number that is assigned to the weight of each arc.

[0090] θ→[0,1] is the mapping of the transition threshold;

[0091] It is the initial token set of the system, which is a mapping from place tokens to non-negative real numbers;

[0092] The difference between a continuous Petri net and a regular Petri net is that a continuous Petri net has real-valued labels, real-valued excitations, and continuous flow characteristics to describe a continuous system.

[0093] The read-only attribute is extended to the basic definition of directed arcs in continuous Petri nets. Read-only arcs provide a way to check the number of tokens in a transition without changing the number of tokens in the place. Therefore, the enabling condition for read-only arcs is the same as that for ordinary arcs, but the triggering rules are different. The transition pointed to by a read-only arc enables reading only the number of tokens in the place without removing the place tokens. Through read-only arcs, transitions can make decisions without affecting the state of the input place.

[0094] Here is the definition of the read-only arc triggering rule:

[0095] Step 1.2: For a transition t∈T, p×t∈RA, if the input place p satisfies M(p)≥W(p,t), then M'(p)=M(p), and M'(p) is the output place token.

[0096] Step 1.3: A continuous Petri net with extended read-only arc properties can be defined as a 7-tuple, specifically:

[0097] CPN=(P,T,A,RA,W,θ,M0)

[0098] In the formula:

[0099] P, T, A, θ, M0 are defined and have the same syntax as the basic continuous Petri net, and will not be repeated here.

[0100] RA is a finite set of read-only arcs, which is a mapping from position to transition; the graphical representation of a read-only arc is a dashed arrow pointing from the location to the transition.

[0101] The intersection is divided into four segments, A, B, C, and D, in a clockwise direction to clearly study vehicle movements when crossing the intersection. For segment A, vehicles entering from the west that need to go straight will cross the intersection into the exit lane of segment C and head east; vehicles entering from the west that need to turn left will cross the intersection into the exit lane of segment B and head north. Similarly, the traffic flow from other segments enters the intersection in a similar manner to that within segment A.

[0102] Based on the above intersection traffic flow actions and road segment layout, a continuous Petri network intersection traffic flow and road segment model is constructed as follows: Figure 2 As shown, some labels are introduced to better describe the stage and significance of traffic flow at each intersection in the road segment:

[0103] Traffic flow entering the road segment is marked "x"; the superscript "in" indicates entering the road segment, and the superscript "out" indicates leaving the road segment; the subscript "xL" indicates the left-turn lane of road segment x, and the subscript "xS" indicates the straight-turn lane of road segment x; the superscript "det" indicates that a vehicle has entered the intersection monitoring area and the detector is monitoring the vehicle; the superscript of the change indicates the specific effect achieved after the change is triggered.

[0104] To further explain the definitions of traffic flow and road segment model library and transitions at continuous Petri net intersections, the following table 1 is provided:

[0105] Table 1. Definitions of Models and Changes for Intersecting Traffic Flow and Road Segments in Continuous Petri Networks

[0106]

[0107] In the continuous Petri net intersection vehicle and road segment model, the location Superscripts indicate the traffic flow status or stage at an intersection, while subscripts indicate whether the traffic flow is on a straight road or turning left; the token number M in the storage p represents the number of vehicles in that stage of the traffic flow; transitions It indicates changes in the traffic flow status or phase at an intersection.

[0108] The continuous Petri net intersection vehicle and road segment model has the function of detecting and retrieving token counts from the database. The design is as follows: Transitions With change This indicates that traffic flow has transitioned from the detection state to the waiting state; a read-only arc is used at this transition point. and Cause change and After stimulation and Realize waiting warehouse and For testing facilities and Read the token count.

[0109] Step 2: Continue by extending the suppression attribute IA to the basic definition of the directed arc A in the continuous Petri net CPN = (P,T,A,RA,W,θ,M0) with the extended read-only attribute. If there is a marker in the place connected to the suppression arc IA, the transition cannot be triggered. The transition can only be triggered when there is no marker in the place connected to the suppression arc. Suppression arcs are often used to implement mutual exclusion conditions or specific control logic.

[0110] Here is the definition of the suppression arc excitation rule:

[0111] Step 2.1: For any transition t in set T, if there exists a suppression arc a(p×t)∈IA, and the number of tokens M(p), the read-only arc weight W(p,t), and the transition threshold θ(t) in the input library p satisfy M(p)×W(p,t)<θ(t), then the transition t is said to be activated. IA is a finite set of suppression arcs, which is a mapping from position to transition.

[0112] Step 2.2: The extended read-only and suppression properties of the continuous Petri net are defined as an octet:

[0113] CPN=(P,T,A,RA,IA,W,θ,M0)

[0114] In the formula:

[0115] P, T, A, θ, M0, RA are defined and have the same syntax as continuous Petri nets with extended read-only properties, and will not be repeated here.

[0116] IA is a finite set of suppression arcs, which is a mapping from position to transition; the graphical representation of a suppression arc is a solid arrow with a hollow circle at the end, pointing from the location to the transition.

[0117] The traffic light phase operation process at the intersection is as follows: straight ahead in the east-west direction → left turn in the east-west direction → straight ahead in the north-south direction → straight ahead in the north-south direction, and then back to straight ahead in the east-west direction in a continuous cycle. Since traffic flow can still pass through the intersection during the yellow light period, this invention includes the yellow light period in the green light period. Therefore, the sum of the green light periods for all phases is the duration of the traffic light cycle.

[0118] Based on the aforementioned intersection traffic light phase actions, a continuous Petri net intersection traffic light model is constructed as follows: Figure 3 As shown, some labels are introduced to better describe the stage and significance of the traffic light operation at each intersection in the road segment:

[0119] In the continuous Petri net intersection signal light model, the superscript "GT" of the location represents the green light time of that phase, and the subscripts "1, 2, 3 and 4" represent the phase number of that phase; the transition subscript "x→x+1" indicates the phase x stage switch; the transition superscript "re" indicates the reset of the green light time of that phase.

[0120] The definitions of locations and transitions for the continuous Petri net intersection signal light model are shown in Table 2 for more detailed explanation:

[0121] Table 2. Library of Continuous Petri Net Intersection Traffic Light Models and Definitions of Changes

[0122]

[0123] In the continuous Petri net intersection signal light model, the location p x , and These represent the traffic light phase stage, the current phase green light time, and the traffic light control depot, respectively. Depot p x A token count of 0 indicates the end of the phase phase, and a token count of 1 indicates the start of the phase phase; transition t x→x+1 , and These represent the phase switching phase, the phase reset green light time, and the green light reading time, respectively.

[0124] The continuous Petri network intersection signal light model mainly includes three functions: phase switching, green light time reset, and green light time reading.

[0125] The phase switching function is designed as follows: directed arc To suppress the arc, when the warehouse The number of tokens is 0, and the library px When the token count is 1, it indicates that the current phase's green light timer has ended, and the vault... With p x In suppressing the arc Under the combined effect of the transition t x→x+1 To achieve phase switching;

[0126] The design of the green light time reset function is as follows: Directed arc and To suppress the arc, when the warehouse and When all tokens are 0, it indicates that the green light timer for the previous phase has ended, and the warehouse is ready to open. and In suppressing the arc and Under the combined effect of the transition This resets the current phase's green light time.

[0127] The design of the green light time reading function is as follows: Directed arc For read-only arcs, read from the library. The number of tokens is stored in the traffic light control warehouse. Implement the reading of green light time.

[0128] The following example uses the east-west direction in phase 1: During phase 1, the number of tokens in place p1 is 1. The number of tokens represents the green light time for Phase 1; after the green light time for Phase 1 is completed, the warehouse... The number of tokens in the middle is 0. To suppress the arc, at this time Together with p1, they trigger transition t 1→2 Then, the token count of storage p1 decreases by 1, the token count of storage p2 increases by 1, and the phase switches to phase 2; when storage p1 The number of tokens is 0, and the library... When the number of tokens is also 0, and To suppress the arc, the transition at this time Triggering transitions together with p1 Reset warehouse The number of tokens determines the start of the green light timer for Phase 2. Similarly, actions in other phases can mirror the action flow of Phase 1.

[0129] By introducing the substitution operation of continuous Petri nets, complex systems are decomposed into smaller modular components, making them easier to understand and modify, and improving the readability of the model.

[0130] Here is the definition of the substitution operation:

[0131] Step 2.3: Perform a substitution operation on any two subnets N1 = (P1, T1, A1) and N2 = (P2, T2, A2). After the substitution, N' = (P', T', A') satisfies P' = (P-P1) ∪ P2 and T' = (T-T1) ∪ T2.

[0132] The continuous Petri net intersection traffic light model is simplified to a warehouse after replacement operation. Replaced warehouse In the traffic flow and road segment model of the intersection with Step 1, the database is located. Together, we inspire change Construct a complete continuous Petri net intersection model to implement traffic light control for traffic flow. The complete continuous Petri net intersection model is as follows: Figure 4 As shown.

[0133] Step 3:

[0134] Step 3.1: A basic fuzzy Petri net can be defined as an eleven-tuple, specifically:

[0135] FPN=(P,T,D,A,F,θ,μ,λ,r,Ac,M0)

[0136] In the formula:

[0137] P = {p1, p2, ..., p} m} is a finite, non-empty set of collections;

[0138] T = {t1, t2, ..., t} n} is a finite nonempty set of transitions;

[0139] D = {d1, d2, ..., d} m} is a finite nonempty set of propositions;

[0140] P∩T∩D=Φ,|P|=|D|;

[0141] It is a finite set of directed arcs;

[0142] It is a set of fuzzy arc weights, where F(a) represents the fuzzy weight of the arc and a is the corresponding arc;

[0143] θ→[0,1] is the mapping of the transition threshold;

[0144] μ is a set of membership functions used to calculate fuzzy weights, F(a) = μ(m; y), where m = (m1, m2, ... are input values, which are the system state or the number of tokens on the arc, and y is the set of parameters of the membership functions;

[0145] λ:T→[0,1] is the set of confidence scores, which maps each T to the interval [0,1].

[0146] r = (r1, r2, ... r n ) is a rule set, where each T maps to a corresponding fuzzy rule. A fuzzy rule can be defined as:

[0147] r i :IF(x1 is AND(x2 is) AND…AND(x i yes THEN(τ is μ) τ

[0148] In the formula, m1, m2, ..., m i It is a fuzzy input quantity. Let μ be the fuzzy membership function corresponding to the input quantity, τ be the excitation result of the transition, and μ be the fuzzy membership function corresponding to the input quantity. τ It is the membership function of the result;

[0149] m:P→D is a mapping from the source to the proposition;

[0150] Ac is the set of activation states of fuzzy rule transitions;

[0151] It is the source P to nonnegative real numbers. Mapping;

[0152] According to fuzzy inference logic, the enabling rules for transitions in fuzzy Petri nets differ from those in continuous Petri nets. Here is the definition of enabling transitions in fuzzy Petri nets:

[0153] Step 3.2: For a transition t, If Ac=M(p)×F(p,t)×λ(t)≥θ(t), then the transition t is said to be enabled.

[0154] Extending the fundamental properties of transitions in fuzzy Petri nets enables the implementation of complex computational logic. Manipulating transitions allows arithmetic operations on the number of markers during transition activation, which is very useful in scenarios that require dynamic adjustment of resource allocation, performance calculations, or handling of complex conditions.

[0155] Here is the definition of the triggering rules for operation transitions:

[0156] Step 3.3: Regarding changes and storage locations For p×t∈Op, M(p)>0, and addition, subtraction, and ratio operations are defined respectively:

[0157]

[0158] Among them, the warehouse p O For the output library, {p1,p2,…,p n} represents all input libraries for the operation transition.

[0159]

[0160] In the formula:

[0161] Op(t) = M(P) i ) / M(P j ) is the definition of a transition operation, and the transition t is calculated in the library P. i and P j The ratio, and assign it to the library P. k ;

[0162] M(P j )≠0 is the excitation condition for transition t, and the excitation condition for transition t is M(P) j )≠0;

[0163] M'(p O Op(t) = M(P) i ) / M(P j ) is the result of transition excitation. When transition t is excited, it will cause the place M'(p) to be excited. O The token count of Op(t) is updated to the result of Op(t);

[0164] Step 3.4: The fuzzy Petri net after expanding the operational attributes can be defined as a 12-tuple:

[0165] FPN=(P,T,D,A,F,θ,μ,λ,r,Ac,Op,M0)

[0166] Among them, P, T, A, θ, M0, F, θ, μ, λ, r, Ac are defined and have the same syntax as basic fuzzy Petri nets, and will not be repeated here;

[0167] Op:T → "Operation" is a mapping from transition to operation; the graphical representation of operation transition is a dashed rectangle.

[0168] Some basic calculations are defined using the extended fuzzy Petri net, including calculating the proportion of heavy vehicles, defuzzification, and calculating the phase green light time, specifically:

[0169] The proportion of heavy vehicles in the corresponding phase is calculated as follows:

[0170]

[0171] In the formula, N H N represents the number of heavy vehicles. T P represents the total number of vehicles in that phase. HThe proportion of heavy vehicles.

[0172] The defuzzification process involves using the centroid method to defuzzify the output token count, resulting in the green light increment time for the fuzzy Petri net. This green light increment time is then added to the base green light time and returned to the continuous Petri net to implement signal control. The specific formula for defuzzification using the centroid method is as follows:

[0173]

[0174] In the formula, M i This is the fuzzy value of the output library.

[0175] The specific calculation of the corresponding phase green light time is as follows:

[0176] M green time =M green increace time +basic greentime

[0177] In the formula, M green time M is the number of phase green light time tokens. green increace time Add time to the green light. The basicgreentime is the basic green light time, which is adjusted according to the actual situation of the intersection.

[0178] Fuzzy rules are defined for the extended fuzzy Petri net, where r is a fuzzy rule composed of "AND" and "OR" judgment logic, and each transition t is mapped to a corresponding fuzzy rule. The transition rules are obtained using the min-max inference method: Given the i-th place and j-th transition in the fuzzy Petri net, for an enabling transition t... j Take all the input libraries p i Calculation result Ac ij =m i ×f ij ×λ j The minimum value in the transition t is taken as the transition t. j The excitation output value; for a transition t with multiple inputs. j The library p i+1 Take all input transitions t j The maximum value among the excitation values ​​is used as the output value of this library. i+1 The number of tokens updated is as follows:

[0179]

[0180] In the formula: Ac ij For the warehouse p i To change tj The calculated result is also called the transition excitation value, m i For the token of the treasury i, f ij For the warehouse p i Pointer transition t j The fuzzy weight of arc j, λ j For change t j Confidence level, σ is the activation function, θ j The transition threshold;

[0181] The membership function used is the triangular membership function, specifically:

[0182]

[0183] In the formula, y = a, b, c are the parameters of the triangle membership function;

[0184] Reasonably divide the fuzzy subsets to ensure that the subset division meets the actual traffic light control requirements. The range of the number of vehicles is set to [0, 20], and it is divided into 5 fuzzy subsets, named: {Very Few, Few, Medium, Many, Many}, abbreviated as {VS, S, M, MN, VM}; the range of the proportion of heavy vehicles is set to [0, 1], and it is divided into 5 fuzzy subsets, named: {Very Low, Low, Medium, High, Very High}, abbreviated as {VL, L, M, H, VH}; the range of the output green light extension time is set to [0, 40], and it is divided into 5 fuzzy subsets, named: {Very Short, Short, Medium, Long, Very Long}, abbreviated as {VS, S, M, L, VL}. The fuzzy rules are shown in Table 3.

[0185] Table 3 Fuzzy Inference Rules

[0186]

[0187] Based on the aforementioned extended computational operation attributes of the fuzzy Petri net, the basic computational definition, and the fuzzy rules, the fuzzy Petri net traffic light fuzzy control model is as follows: Figure 5 As shown in Table 4, the locations and transitions of the fuzzy Petri net intersection traffic light fuzzy control model are defined in detail.

[0188] Table 4. Fuzzy Petri Net Intersection Traffic Light Fuzzy Control Model Library and Transition Definitions

[0189]

[0190]

[0191] In the fuzzy Petri net intersection traffic light fuzzy control model, the location p VN and p PHVThese represent the number of vehicles and the proportion of heavy vehicles in the fuzzy input, respectively; [Inventory / Depository] and These represent the fuzzified subsets of the fuzzy input and output quantities under the triangular membership function, respectively; [Place p] GT This indicates the result of defuzzification of the output quantity, which increases the green light time; transition. The input quantity is fuzzified using the triangular membership function, and the input library is p. VN and p PHV By manipulating transitions Pointing to its corresponding fuzzy subset and

[0192] change The input library comes from a fuzzy subset. and change Once the activation conditions are met, the minimal inference method in Step 3.2 is executed to obtain the transition of the corresponding fuzzy rule. Output; Library The input transitions come from the corresponding rules. Rule changes for satisfying conditions Execute the maximum reasoning method in Step 3.2 to deduce that the green light time will increase;

[0193] Changes t df Using the center of gravity method to determine the location p out The output value is deblurred, and the green light time is increased by adding the base green light time to get the green light time for that phase. This is then stored in the green light time library. GT This enables the corresponding phase signal light to output the green light time.

[0194] The fuzzy control model for traffic lights at a fuzzy Petri net intersection includes two modules: input and output. The input module reads the data from the database of each phase in the complete and continuous Petri net intersection model. Replace with the input library p of the corresponding phase of the fuzzy control model for traffic lights at a fuzzy Petri intersection network. VN and p PHV The output module simplifies the network structure of the fuzzy Petri intersection signal light fuzzy control model into a library after a replacement operation. Replaced warehouse Library of complete continuous Petri net intersection models Together, we inspire change This paper combines the fuzzy control model of the intersection traffic lights with the complete continuous Petri net intersection model from Step 2 to construct an adaptive control intersection model based on both continuous and fuzzy Petri nets, enabling adaptive control of traffic lights for traffic flow. The construction of the adaptive control intersection model based on continuous and fuzzy Petri nets is as follows: Figure 6 As shown.

[0195] Step 4: Based on the fuzzy control model of traffic lights at intersections using fuzzy Petri nets, an optimization algorithm for the control of traffic lights at intersections using fuzzy neural Petri nets is proposed based on the backpropagation algorithm.

[0196] Initialize the initial parameters of the transition within the range that ensures it can be triggered; assuming the fuzzy rule is set to a uniform distribution, the specific formula for initializing the transition parameters is as follows:

[0197]

[0198] In the formula n in and n out These are the number of nodes in the input layer and the output layer, respectively.

[0199] Design a transition activation function. Based on the characteristics of the intersection traffic light control system, set a Sigmoid activation function with relatively stable gradient changes. Define the relationship between fuzzy input values ​​and transition confidence, threshold, and fuzzy weights. This function can nonlinearly map the input and output of the fuzzy Petri net intersection traffic light fuzzy control model and determine whether a transition is enabled. Specifically:

[0200]

[0201] In the formula, Ac represents the rule transition in the fuzzy Petri net intersection traffic light fuzzy control model. The calculation result Ac = M(p) × F(p,t) × λ(t), where M(p) is the number of tokens in the input library, F(p,t) is the fuzzy weight of the transition, and λ(t) is the confidence level of the transition.

[0202] Input simulation sample data, and calculate the fuzzy membership range, triggered rules and their activation values ​​for each set of input data through the fuzzy control system; for each set of simulation sample data, only the transitions corresponding to the triggered rules are trained and the activation values ​​are calculated.

[0203] The loss is calculated using mean squared error, and the weights, confidence levels, and thresholds of the transitions are updated using gradient descent. The gradient calculation formulas, based on the designed activation function, are as follows:

[0204]

[0205] The formula for calculating the loss function is as follows:

[0206]

[0207] In the formula, y i It is the actual value. It is the algorithm's predicted value.

[0208] The transition is trained iteratively using the same data until it can no longer be activated. The last set of parameters that can activate the transition is retained as temporary parameters. The errors of the activation values ​​under the old and new temporary parameters are compared with the standard activation values, and the parameter with the smallest error is selected as the new temporary parameter. These steps are repeated until all transition parameters are stable or the simulation sample data is exhausted. The trained transition parameters are then output. The algorithm flow is as follows: Figure 7 As shown.

[0209] Step 5: Simulated Road Network Construction: Use the open-source global map project OpenStreetMap as the map data source; use the netconvert tool included with SUMO to convert the OpenStreetMap map data into a .net.xml file usable by SUMO; create a traffic flow .rou.xml file to define vehicle types, routes and their traffic volumes.

[0210] Simulated detector settings: In SUMO simulation software, the detector simulates real-world induction coils or cameras for analyzing and optimizing traffic signal control strategies. The detector output file type is XML. The detector settings are as follows:

[0211] Lane area detectors can record key data such as the number of vehicles, speed, and acceleration passing through a specific lane. The number of vehicles is obtained from the lane area detector and used as the fuzzy input to the fuzzy neural Petri net signal control optimization algorithm.

[0212] Induction coils can detect vehicle traffic in real time, collecting data such as the number of vehicles, vehicle type, speed, and headway. The induction coils determine the vehicle types passing through a road segment, and a fuzzy input quantity—the proportion of heavy vehicles—is calculated.

[0213] This project utilizes Python to develop the API provided by SUMO, using the `traci.start()` method to connect to SUMO for real-time interaction and run the simulated road network. The simulated road network runs as follows: Figure 8 As shown.

[0214] Step 6: Use the traffic flow data and corresponding phase signal timing data obtained from the simulated road network as training sample data; train the transition parameters according to the fuzzy neural Petri net intersection signal control optimization algorithm in Step 4, optimize the transition confidence, threshold, and weights between the location and the transition, so as to correct the parameters in the training to achieve the expected goal; input the transition parameters trained by the fuzzy neural Petri net intersection signal control optimization algorithm into the adaptive control intersection model based on continuous Petri net and fuzzy Petri net, and verify the accuracy of the algorithm in training the transition parameters by comparing the simulated sample data and the green light duration after training. The accuracy verification experimental results are as follows: Figure 9 As shown.

[0215] A comparative experiment on traffic light control strategies was conducted using SUMO simulation software. By comparing the strategies with fixed timing schemes and linear control schemes, data on the simulated road network operation output were obtained, and evaluation indicators were calculated. The evaluation indicators were average time loss, average waiting time, and total number of vehicles.

[0216] Average time loss refers to the average time lost by a vehicle in a traffic system due to deceleration, stopping, and acceleration.

[0217] It reflects the degree of traffic flow obstruction and is an important indicator for evaluating the efficiency of traffic signal control.

[0218]

[0219] Where N is the number of vehicles, This is the actual travel time of vehicle i. It is the time the vehicle travels without interference.

[0220] Average waiting time refers to the average time a vehicle remains stationary before reaching its destination due to traffic signals or congestion.

[0221] It is a key indicator for measuring the performance of traffic signal systems and road capacity.

[0222]

[0223] Where N is the number of vehicles, w i The waiting time of vehicle i usually refers to the time spent at a red light.

[0224] The results of the comparative experiments are shown in Table 5.

[0225] Table 5. Traffic Light Control Effect

[0226]

[0227] As shown in Table 5, for traffic light control of a specific phase at an intersection, the traffic light control method based on fuzzy Petri nets effectively reduces the average time loss and average waiting time of vehicles compared to the traditional fixed timing scheme and the linear control scheme built into SUMO, while increasing the number of vehicles passing through the intersection. The results indicate that this algorithm can effectively improve the traffic light control performance at intersections.

[0228] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.

Claims

1. A method for intersection modeling and traffic light control optimization based on fuzzy Petri nets, characterized in that, The method includes: Step 1: Extend the read-only attribute on the basic definition of the directed arc of the continuous Petri net. The extended directed arc is called the read-only arc. After the transition pointed to by the read-only arc satisfies the activation condition, the transition only reads the number of tokens in the place without removing the tokens in the place. Use the continuous Petri net with extended read-only attribute to construct the intersection traffic flow and road segment model. Step 2: Based on the continuous Petri net with extended read-only arc attributes, the directed arc attributes are further extended. The extended directed arcs are defined as suppression arcs. Suppression arcs are used to check transition activation conditions and prevent transition activation that does not meet the conditions. The intersection signal light model is constructed using the continuous Petri net with extended read-only and suppression attributes. The replacement operation of the continuous Petri net is introduced to realize the replacement of the control points in the intersection signal light model and the intersection traffic flow and road segment model, and a complete continuous Petri net intersection model is constructed. Step 3: Introduce fuzzy Petri nets to optimize traffic light control. Extend the basic properties of transitions in the fuzzy Petri nets. Define the extended transitions as operational transitions. Operational transitions have the function of calculating the number of tokens in the library. Then define their fuzzy rules. Use the fuzzy Petri nets with extended transition operational properties and defined fuzzy rules to build a fuzzy control model for intersection traffic lights. Use substitution operations to combine the fuzzy control model of intersection traffic lights with the complete continuous Petri net intersection model. Build an adaptive control intersection model based on continuous Petri nets and fuzzy Petri nets. Step 4: Based on the fuzzy control model of intersection traffic lights, a fuzzy neural Petri net traffic light control optimization algorithm is proposed according to the backpropagation algorithm, and a fuzzy neural Petri net control optimization model is constructed. Step 5: In SUMO simulation software, build a simulated road network based on the intersection layout and mixed traffic flow data, set up simulation detectors, and run the simulated road network; Step 6: Use the traffic flow data and corresponding phase signal timing data obtained from the simulated road network as training sample data, input them into the fuzzy neural Petri net control optimization model for training, optimize the confidence level, threshold, and weight between the location and the transition in the adaptive control intersection model, so as to correct the parameters in the training to achieve the expected goal. By comparing the simulated sample data and the green light duration after training, verify the accuracy of the optimization algorithm in training the transition parameters.

2. The method for intersection modeling and traffic light control optimization based on fuzzy Petri nets according to claim 1, characterized in that, Step 1 includes: Step 1.1: In the basic continuous Petri net CPN = (P,T,A,W,θ,M0), extend the read-only attribute RA to the basic definition of directed arc A. The read-only arc RA provides a way to check the token count for continuous Petri net transitions. The read-only arc reads the detection region library. The number of tokens is adjusted, but the number of tokens in the aforementioned storage is not changed. The enable condition for read-only arc RA is the same as that for ordinary arc, but the triggering rules are different. The specific definition of the read-only arc excitation rule is as follows: For any transition t in set T, if there exists a read-only arc a(p×t)∈RA, and the number of tokens M(p) in the input place p, the read-only arc weight W(p,t), and the transition threshold θ(t) satisfy M(p)×W(p,t)≥θ(t), then M'(p)=M(p), where M'(p) is the number of tokens in the output place; RA is a finite set of read-only arcs, which is a mapping from places to transitions; A continuous Petri net with extended read-only properties is defined as a seven-tuple CPN = (P, R, A, RA, W, θ, M0); Step 1.2: Using the locations, transitions, and directed arcs in the continuous Petri net seven-tuple CPN=(P,T,A,RA,W,θ,M0) with extended read-only attributes, construct the continuous Petri net intersection vehicle and road segment model; In the continuous Petri net intersection vehicle and road segment model, the location and Superscripts indicate the traffic flow status or stage at an intersection, while subscripts indicate whether the traffic flow is on a straight road or turning left; the token number M in the storage p represents the number of vehicles in that stage of the traffic flow; transitions Indicates changes in the traffic flow status or phase at an intersection; The continuous Petri net intersection vehicle and road segment model has the function of detecting and reading the token count of the database, specifically: transitions. With change This indicates that traffic flow has transitioned from the detection state to the waiting state; a read-only arc is used at this transition point. and Cause change and After stimulation and Realize waiting warehouse and For testing facilities and Read the token count.

3. The method for intersection modeling and traffic light control optimization based on fuzzy neural Petri nets according to claim 1, characterized in that, Step 2 includes: Step 2.1: Continue to extend the suppression attribute IA to the basic definition of the directed arc A in the continuous Petri net CPN = (P,T,A,RA,W,θ,M0) with extended read-only attributes. If there is a marker in the place connected to the suppression arc IA, the transition cannot be triggered. The transition can only be triggered when there is no marker in the place connected to the suppression arc. The suppression arc activation rule is defined as follows: For any transition t in set T, if there exists a suppression arc a(p×t)∈IA, and the number of tokens M(p) in the input library p, the read-only arc weight W(p,t), and the transition threshold θ(t) satisfy M(p)×W(p,t)<θ(t), then the transition t is said to be activated; IA is a finite set of suppression arcs, which is a mapping from position to transition; The extended read-only and suppression properties of a continuous Petri net are defined as an octet CPN = (P, T, A, RA, IA, W, θ, M0); Step 2.2: Construct a continuous Petri net intersection traffic light model using the locations, transitions, and directed arcs in the continuous Petri net octet CPN=(P,T,A,RA,IA,W,θ,M0) with extended read-only and suppression attributes; In the continuous Petri net intersection signal light model, the location p x , and These represent the traffic light phase stage, the current phase green light time, and the traffic light control depot, respectively. Depot p x A token count of 0 indicates the end of the phase phase, and a token count of 1 indicates the start of the phase phase; transition t x→x+1 , and These represent the phase switching phase, the phase reset green light time, and the green light reading time, respectively. The continuous Petri network intersection signal light model includes three functions: phase switching, green light time reset, and green light time reading. The phase switching function is: directed arc To suppress the arc, when the warehouse The number of tokens is 0, and the library p x When the token count is 1, it indicates that the current phase's green light timer has ended, and the vault... With p x In suppressing the arc Under the combined effect of the transition t x→x+1 To achieve phase switching; The green light time reset function is: directed arc and To suppress the arc, when the warehouse and When all tokens are 0, it indicates that the green light timer for the previous phase has ended, and the warehouse is ready to open. and In suppressing the arc and Under the combined effect of the transition Reset the current phase's green light time; The green light time reading function is: directed arc For read-only arcs, read from the library. The number of tokens is stored in the traffic light control warehouse. Implement the ability to read the green light time; Step 2.3: Introduce the substitution operation of continuous Petri nets. The substitution operation is as follows: For any two subnets N1 = (P1, T1, A1) and N2 = (P2, T2, A2), perform the substitution operation. After the substitution, N' = ([P', T', A') satisfies P' = (P-P1) ∪ P2 and T' = (T-T1) ∪ T2. The continuous Petri net intersection traffic light model is simplified to a warehouse after replacement operation. Replaced warehouse In the traffic flow and road segment model of the intersection with Step 1, the database is located. Together, we inspire change Construct a complete continuous Petri net intersection model to realize traffic light control of traffic flow.

4. The method for intersection modeling and traffic light control optimization based on fuzzy Petri nets according to claim 1, characterized in that, Step 3 includes: Step 3.1: Introduce fuzzy Petri nets to optimize traffic light control. In the fuzzy Petri net FPN=(P,T,D,A,F,θ,μ,λ,r,Ac,M0), operational attributes are extended on the basic definition of transitions. Operational transitions allow arithmetic operations on the number of markers during transition excitation. The activation rule for operation transitions is as follows: For any transition t in set T, there exists an input library p∈P. Addition and subtraction operations and ratio operations are defined. The activation rule for the addition operation transition is: M'(p O )=Op(t)=M(p1)+M(p2)+…+M(p n The excitation rule for the transition of the subtraction operation is: M'(p O )=Op(t)=M(p1)-M(p2)-…-M(p n The excitation rule for the ratio operation transition is: M'(p) O Op(t) = M(P) i ) / M(P j The calculation of the proportion of heavy vehicles uses a ratio operation transition, the calculation of the phase green light time uses an addition operation transition, and the input layer transition... The input fuzzification is achieved using subtraction and ratio transitions, and the defuzzification transition t is performed. df The centroid method is used to resolve fuzziness by employing addition and ratio operations transitions. Op:T → "operation" is a mapping from transition to operation. The extended fuzzy Petri net is defined as a 12-tuple FPN = (P,T,D,A,F,θ,μ,λ,r,Ac,Op,M0); Step 3.2: Define fuzzy rules for the expanded fuzzy Petri net. r is a fuzzy rule composed of "AND" and "OR" judgment logic. Each transition t is mapped to a corresponding fuzzy rule. The transition rules are obtained using the min-max inference method: Let the i-th place and j-th transition in the fuzzy Petri net be the fuzzy rules. For the enabled transition t... j Take all the input libraries p i Calculation result Ac ij =m i ×f ij ×λ j The minimum value in the transition t is taken as the transition t. j The excitation output value; for a transition t with multiple inputs. j The library p i+1 Take all input transitions t j The maximum value among the excitation values ​​is used as the output value of this library. i+1 Updated token count; Step 3.3: Using the places, transitions and directed arcs in the fuzzy Petri net twelf-tuple FPN=(P,T,D,A,F,θ,μ,λ,r,Ac,Op,M0) with extended operational attributes and completed fuzzy rule definition, construct the fuzzy Petri net intersection traffic light fuzzy control model. In the fuzzy control model of traffic lights at a fuzzy Petri intersection network, the location p VN and p PHV These represent the number of vehicles and the proportion of heavy vehicles in the fuzzy input, respectively; [Inventory / Depository] and These represent the fuzzified subsets of the fuzzy input and output quantities under the triangular membership function, respectively; [Place p] GT This indicates the result of defuzzification of the output quantity, which increases the green light time; transition. The input quantity is fuzzified using the triangular membership function, and the input library is p. VN and p PHV By manipulating transitions Pointing to its corresponding fuzzy subset and change The input library comes from a fuzzy subset. and change Once the activation conditions are met, the minimal inference method in Step 3.2 is executed to obtain the transition of the corresponding fuzzy rule. Output; Library The input transitions come from the corresponding rules. Rule changes for satisfying conditions Execute the maximum reasoning method in Step 3.2 to deduce that the green light time will increase; Changes t df Using the center of gravity method to determine the location p out The output value is deblurred, and the green light time is increased by adding the base green light time to get the green light time for that phase. This is then stored in the green light time library. GT This enables the corresponding phase signal light to output the green light time. Step 3.4: The fuzzy control model for traffic lights in a fuzzy Petri network intersection includes two modules: input and output. The input module reads the data from the database of each phase in the complete continuous Petri network intersection model. Replace with the input library p of the corresponding phase of the fuzzy control model for traffic lights at a fuzzy Petri intersection network. VN and p PHV The output module simplifies the network structure of the fuzzy Petri intersection signal light fuzzy control model into a library after a replacement operation. Replaced warehouse Library of complete continuous Petri net intersection models Together, we inspire change By combining the fuzzy control model of the intersection traffic lights with the complete continuous Petri net intersection model in Step 2, an adaptive control intersection model based on continuous Petri nets and fuzzy Petri nets is constructed to realize adaptive control of traffic lights for traffic flow.

5. The method for intersection modeling and traffic light control optimization based on fuzzy Petri nets according to claim 1, characterized in that, Step 4 includes: Step 4.1: The optimization algorithm includes initializing transition parameters, designing transition activation functions, updating parameters through gradient descent, calculating loss, iterative training, and outputting results. Initialize the transition parameters. Assuming the fuzzy rule is set to a uniform distribution, the parameter initialization formula is as follows: In the formula, n in and n out These are the number of nodes in the input layer and the output layer, respectively. Step 4.2: Design the transition activation function. Based on the characteristics of the intersection traffic light control system, a Sigmoid activation function with relatively stable gradient changes is set. The relationship between the fuzzy input value and the transition confidence, threshold, and fuzzy weights is defined. This function can nonlinearly map the input and output of the fuzzy Petri intersection network traffic light fuzzy control model and determine whether the transition is enabled. Specifically: In the formula, Ac represents the rule transition in the fuzzy control model of traffic lights at a fuzzy Petri intersection network. The calculation result Ac = M(p) × F(p,t) × λ(t), where M(p) is the number of tokens in the input place, F(p,t) is the fuzzy weight of the transition, and λ(t) is the transition confidence. Input simulation sample data, and calculate the fuzzy membership range, triggered rules and their activation values ​​for each set of input data through the fuzzy control system; for each set of simulation sample data, only the transitions corresponding to the triggered rules are trained and the activation values ​​are calculated. Step 4.3: Calculate the loss using mean squared error, and update the weights, confidence levels, and thresholds of the transitions using gradient descent. The specific formulas for calculating the gradients of the transitions, confidence levels, and thresholds, based on the designed activation function, are as follows: Step 4.4: The formula for calculating the loss function is as follows: In the formula, y i It is the actual value. It is the algorithm's predicted value; Step 4.5: Iteratively train the transition using the same data until the transition can no longer be activated. Keep the last set of parameters that can activate the transition as temporary parameters. Compare the error between the activation value and the standard activation value under the new and old temporary parameters, and take the one with the smallest error as the new temporary parameter. Repeat these steps until all transition parameters are stable or the simulation sample data is used up, and output the trained transition parameters.

Citation Information

Patent Citations

  • City traffic system modeling method and system based on colored Petri network

    CN105957343A

  • Petri network-based road traffic modeling method and system, medium and terminal

    CN112365704A