Traffic flow parameter estimation method and system
By constructing a basic linear diagram of traffic flow and a time-space trajectory diagram of vehicles, combined with the maximum likelihood estimation method and the expectation maximization algorithm, the problems of high complexity and insufficient accuracy in traffic parameter estimation in existing technologies are solved, and high-precision estimation is achieved in large-scale traffic networks, supporting traffic management and optimization.
Patent Information
- Application Number
- CN202411902247.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The traffic parameter estimation method based on dynamic Bayesian network in the existing technology has high computational complexity in large-scale traffic networks, and simplified assumptions affect the estimation accuracy.
A basic linear diagram of traffic flow and a vehicle time-space trajectory operation diagram are constructed. Combining the maximum likelihood estimation method and the expectation maximization algorithm, the vehicle free travel time and delay time model are used to obtain the travel time and queue delay probability of vehicles between virtual travel boundaries, and a joint probability density model of traffic parameters is constructed.
It improves the accuracy of traffic parameter estimation in line with real traffic conditions, can capture dynamic changes in real time, reduce estimation errors, and support traffic management and optimization.
Smart Images

Figure CN119785600B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of traffic parameter prediction, and in particular to a method and system for estimating traffic flow parameters. Background Art
[0002] In traffic problems such as road traffic incident detection, road safety analysis and traffic flow prediction, the basic part is the determination of traffic macro-static parameters, that is, traffic parameter estimation.
[0003] Existing methods for estimating traffic parameters primarily rely on dynamic Bayesian networks. These methods suffer from high computational complexity, particularly in large-scale traffic networks. Building and reasoning with complex dynamic Bayesian networks requires significant computational resources and time, making them unsuitable for real-time applications. To make these models feasible, simplified assumptions about traffic flow and state transitions are often made. These assumptions do not fully reflect actual traffic conditions, thus affecting the accuracy of the estimates. Summary of the Invention
[0004] The embodiments of the present invention provide a method and system for estimating traffic flow parameters, which can solve the problem of insufficient accuracy of traffic parameters estimated by simplifying assumptions in the prior art.
[0005] An embodiment of the present invention provides a method for estimating traffic flow parameters, comprising the following steps: constructing a basic linear traffic flow diagram that describes the relationship between traffic flow rate and traffic density; wherein the traffic flow rate represents the number of vehicles passing through per unit time; constructing a vehicle time-space trajectory operation diagram that describes the relationship between time and vehicle trajectory position; wherein, as time increases, a first shock wave at the position where the front end of a free-traveling vehicle meets the end of a queue of vehicles in a congested state propagates from an upstream virtual stroke boundary to a downstream virtual stroke boundary, indicating that the vehicles on the road are in a free-traveling stage; as time increases, a second shock wave at the position where the end of the queue meets the front end of the free-traveling vehicle queue when the queued vehicles disperse propagates from a downstream virtual stroke boundary to an upstream virtual stroke boundary, indicating that the vehicles on the road are in a congested stage; and the upstream virtual stroke boundary is the position where the vehicle starts to enter the main road, and the downstream virtual stroke boundary is the stopping position of the oncoming vehicle at the traffic light on the main road; based on the change of the vehicle trajectory position over time in the vehicle time-space trajectory operation diagram, combined with the traffic flow rate of the position at that position in the basic linear traffic flow diagram, it is determined whether the vehicle Queuing delay occurs: When no queuing delay occurs after a vehicle enters from the upstream virtual trip boundary, the vehicle free travel time is obtained using the vehicle free travel time model based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram. When a queuing delay occurs after a vehicle enters from the upstream virtual trip boundary, the vehicle delay time is obtained using the vehicle delay time model based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram. Based on the vehicle delay time and free travel time, the travel time of the vehicle between the upstream virtual trip boundary and the downstream virtual trip boundary when queuing delay occurs and when no queuing delay occurs is obtained. Based on the travel time, a normal distribution is used to obtain the probability distribution model of whether a vehicle experiences queuing delay or not, which is used as the joint probability density model of traffic parameters. Based on the joint probability density model of traffic parameters, a maximum likelihood model is constructed using the maximum likelihood estimation method, and the expectation-maximization algorithm EM is used to solve the maximum likelihood estimation of the maximum likelihood model to complete the estimation of traffic parameters.
[0006] Furthermore, the construction of a basic linear traffic flow diagram describing the relationship between traffic flow rate and traffic density comprises the following specific steps:
[0007] As traffic density increases, the traffic flow rate increases linearly, indicating that vehicles on the road are in a free-travel stage; as traffic density increases, the traffic flow rate decreases linearly, indicating that vehicles on the road are in a congested stage.
[0008] Furthermore, the step of obtaining the travel time of the vehicle between the upstream virtual trip boundary and the downstream virtual trip boundary when the vehicle experiences queuing delay and when the vehicle does not experience queuing delay specifically includes:
[0009] The vehicle free travel time model is formulated as follows: L×P f ;
[0010] Where L represents the distance from the upstream virtual trip boundary to the downstream virtual trip boundary, p f is the reciprocal of the free travel speed; the free travel time is obtained according to the vehicle free travel time model;
[0011] When a vehicle starts from the upstream virtual trip boundary during the green light period of the i-1th signal cycle and has not reached the downstream virtual trip boundary during the red light period of the i-th signal cycle, it will encounter a queue delay;
[0012] When a vehicle departs from the upstream virtual trip boundary during the green light period of the i-th signal cycle and has not yet reached the downstream virtual trip boundary during the red light period of the i+1-th signal cycle, it will encounter a queue delay;
[0013] The vehicle delay time model is formulated as follows:
[0014]
[0015] in, Due to the delay in queuing, is the entry time of the jth vehicle in the i-th signal cycle, t r,i is the red light start time of signal light r in the i-th cycle in the signal cycle, t s,i is the time when the vehicle enters the upstream virtual travel boundary in the i-th and i-1-th signal cycles, q max is the maximum vehicle flow rate during the period, C i is the signal cycle length, n i is the number of vehicles entering the i-th cycle;
[0016] Said journey time It consists of free travel time and queue delay time:
[0017]
[0018] Furthermore, the traffic parameter joint probability density model is formulated as follows:
[0019]
[0020] in, is the vehicle travel time; N is the number of signal cycles; n i is the number of vehicles entering the i-th cycle; (μ pf ,σ pf ) are the mean and variance of the free travel speed; t r,iis the time when the red light of signal light r in the i-th cycle starts; is the time when the jth vehicle enters the i-th cycle; t s,i is the time when the vehicle enters the upstream virtual travel boundary in the i-th and i-1-th signal cycles, q max is the maximum vehicle flow rate during the period, C i is the signal cycle length; L is the upstream virtual trip boundary VTL up To the downstream virtual trip boundary VTL down distance.
[0021] Furthermore, the expectation maximization algorithm EM also needs to add L2 regularization to prevent the model from overfitting.
[0022] An embodiment of the present invention provides a traffic flow parameter estimation system, including:
[0023] A model graph construction module is used to construct a basic linear traffic flow graph that describes the relationship between traffic flow rate and traffic density; wherein the traffic flow rate represents the number of vehicles passing through per unit time; and to construct a vehicle time-space trajectory operation graph that describes the relationship between time and vehicle trajectory position; wherein, as time increases, a first shock wave at the position where the front end of a free-traveling vehicle meets the end of a queue of vehicles in a congestion propagates from an upstream virtual stroke boundary to a downstream virtual stroke boundary, indicating that the vehicles on the road are in a free-traveling stage; as time increases, a second shock wave at the position where the end of the queue meets the front end of the free-traveling vehicle queue when the queued vehicles disperse propagates from a downstream virtual stroke boundary to an upstream virtual stroke boundary, indicating that the vehicles on the road are in a congestion stage; and the upstream virtual stroke boundary is the position where vehicles on the main road begin to enter, and the downstream virtual stroke boundary is the position where oncoming vehicles stop at the traffic light on the main road;
[0024] The model building module is used to determine whether a vehicle is experiencing queuing delays based on the temporal changes in the vehicle trajectory position in the vehicle time-space trajectory operation diagram and the traffic flow rate at that position in the traffic flow linear basic diagram: when no queuing delay occurs after the vehicle enters from the upstream virtual trip boundary, the vehicle free travel time is obtained using a vehicle free travel time model based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; when a vehicle is experiencing queuing delays after entering from the upstream virtual trip boundary, the vehicle delay time is obtained using a vehicle delay time model based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; based on the vehicle delay time and free travel time, the travel time of the vehicle between the upstream virtual trip boundary and the downstream virtual trip boundary when the vehicle experiences queuing delays and when the vehicle does not experience queuing delays is obtained; based on the travel time, a normal distribution is used to obtain a probability distribution model for whether the vehicle experiences queuing delays and when the vehicle does not experience queuing delays, which is used as a joint probability density model for traffic parameters;
[0025] The traffic parameter estimation module is used to construct a maximum likelihood model using the maximum likelihood estimation method based on the joint probability density model of traffic parameters, and use the expectation maximization algorithm EM to solve the maximum likelihood estimation of the maximum likelihood model to complete the estimation of traffic parameters.
[0026] The embodiments of the present invention provide a method and system for estimating traffic flow parameters. Compared with the prior art, the methods and systems have the following advantages:
[0027] Construct a basic traffic flow linear diagram that describes the relationship between traffic flow rate and traffic density, and a vehicle time-space trajectory operation diagram that describes the relationship between time and vehicle trajectory position; based on the changes in vehicle trajectory position over time in the vehicle time-space trajectory operation diagram, combined with the traffic flow rate at that location in the basic traffic flow linear diagram, determine whether vehicles are experiencing queuing delays.
[0028] When a vehicle enters from the upstream virtual trip boundary and no queuing delay occurs, the vehicle free travel time is obtained using the vehicle free travel time model based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; when a vehicle enters from the upstream virtual trip boundary and a queuing delay occurs, the vehicle delay time is obtained using the vehicle delay time model based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; the travel time of a vehicle between the upstream virtual trip boundary and the downstream virtual trip boundary when a vehicle experiences queuing delay and when a vehicle does not experience queuing delay is composed of the vehicle free travel time and the vehicle delay time. Then, based on the travel time, a normal distribution is used to obtain the probability distribution model of whether a vehicle experiences queuing delay and when a vehicle does not experience queuing delay, which is used as the joint probability density model of traffic parameters.
[0029] Finally, the actual situation of queuing delays and free travel of traffic vehicles is analyzed through the basic linear traffic flow diagram and the vehicle time-space trajectory operation diagram, and a traffic probability distribution model is constructed to accurately estimate the traffic situation based on the actual traffic conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A block diagram of the overall method for estimating a traffic flow parameter provided by an embodiment of the present invention;
[0031] Figure 2 A technical flow chart of a method for estimating traffic flow parameters provided by an embodiment of the present invention;
[0032] Figure 3 A basic straight line diagram of traffic flow for a method of estimating traffic flow parameters provided by an embodiment of the present invention;
[0033] Figure 4 A vehicle time-space trajectory operation diagram of a traffic flow parameter estimation method provided by an embodiment of the present invention;
[0034] Figure 5 A flow chart of an EM algorithm for estimating a traffic flow parameter according to an embodiment of the present invention;
[0035] Figure 6 A diagram of observed vehicle arrivals and predicted vehicle arrival rates for a method for estimating traffic flow parameters provided by an embodiment of the present invention;
[0036] Figure 7 A sample vehicle observed arrival and predicted vehicle arrival graph of a traffic flow parameter estimation method provided by an embodiment of the present invention;
[0037] Figure 8 A mean and variance diagram of the free flow speed of sample observation values of a traffic flow parameter estimation method provided by an embodiment of the present invention;
[0038] Figure 9 A log-likelihood function convergence diagram of a traffic flow parameter estimation method provided by an embodiment of the present invention;
[0039] Figure 10 An MLE estimation graph of the number of vehicles in a method for estimating traffic flow parameters provided by an embodiment of the present invention;
[0040] Figure 11 An MLE estimation diagram of travel time for a traffic flow parameter estimation method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] To make the above-mentioned objects, features, and advantages of the present invention more readily apparent, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. The following description sets forth numerous specific details to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art may make similar modifications without departing from the scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0042] See also Figure 1 , an embodiment of the present invention provides a method for estimating traffic flow parameters, comprising the following steps:
[0043] Step 1: Construct a basic linear traffic flow diagram that describes the relationship between traffic flow rate and traffic density. This diagram includes the following: as traffic density increases, traffic flow rate increases linearly, indicating that vehicles on the road are in a free-travel phase; as traffic density increases, traffic flow rate decreases linearly, indicating that vehicles on the road are in a congested phase. Construct a vehicle time-space trajectory operation diagram that describes the relationship between time and vehicle trajectory position. This diagram includes the following: as time increases, the first shock wave at the point where the front of a free-travel vehicle meets the end of a congested queue propagates from the upstream virtual trip boundary to the downstream virtual trip boundary, indicating that vehicles on the road are in a free-travel phase; as time increases, the second shock wave at the point where the end of the queue meets the front of the free-travel vehicle queue as the queue disperses propagates from the downstream virtual trip boundary to the upstream virtual trip boundary, indicating that vehicles on the road are in a congested phase.
[0044] Step 2: Based on the change in the vehicle trajectory position over time in the vehicle time-space trajectory operation diagram, combined with the traffic flow rate at that position in the traffic flow linear basic diagram, determine whether the vehicle is experiencing queuing delays: When the vehicle enters from the upstream virtual trip boundary and no queuing delays occur, the vehicle free travel time is obtained using the vehicle free travel time model based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; when the vehicle enters from the upstream virtual trip boundary and a queuing delay occurs, the vehicle delay time is obtained using the vehicle delay time model based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram.
[0045] Step 3: Based on vehicle delay time and free travel time, determine the travel time between the upstream and downstream virtual trip boundaries when a vehicle experiences queuing delays and when it does not. Based on the travel time, use a normal distribution to determine the probability distribution of when a vehicle experiences queuing delays and when it does not, using this as the joint probability density model for traffic parameters. Based on this joint probability density model, use the maximum likelihood estimation method to construct a maximum likelihood model. Expectation-maximization (EM) is then used to solve the maximum likelihood estimate of the maximum likelihood model, completing the estimation of traffic parameters.
[0046] 1. Traffic flow model construction module:
[0047] This module is mainly about building a traffic flow model. To build a traffic flow model, relevant variables and concepts need to be given.
[0048] Definition 1: The basic diagram of traffic flow in the traffic flow model is a linear basic diagram, such as Figure 3 As shown, the linear basic diagram appears as a non-isosceles triangle on the flow rate-density diagram. In the free flow part, the traffic flow has a constant speed v f , the flow rate increases linearly with density until it reaches the capacity; then, in the congested traffic flow, as the traffic density continues to increase, the flow rate decreases linearly. In addition, the traffic flow has a constant small perturbation shock wave propagation speed in the free flow state and the congested state. In the free flow state, the wave speed is v f ,like Figure 4 As shown, the shock wave is generated by VTL up (Virtual trip line upstream boundary) to VTL down (downstream boundary of virtual travel line) propagates; in the crowded state, the shock wave speed is w, and the shock wave is generated by VTL down (Virtual trip line downstream boundary) to VTL up (Virtual Trip Line Upstream Boundary) propagation, where VTL is specified down (Downstream boundary of the virtual travel line) is the cross-sectional position of the stop line for oncoming vehicles.
[0049] Definition 2: Time-distance graph of vehicle trajectories at signalized intersections, such as Figure 4 As shown in the figure, the situation considered is the intersection time diagram under unsaturated cycle conditions, the horizontal axis is time t, the vertical axis is the vehicle trajectory location, and the upstream virtual trip line boundary in the research method is VTL up , the downstream virtual trip line boundary in the research method is VTL down , the upstream critical entry time of the vehicle in the i-th and i-1-th signal cycles is t s,i , the red light start time of the i-th cycle in the signal cycle is t r,i, the critical entry time of the vehicle in the i-th unsaturated cycle is t c,i , the upstream critical entry time of the vehicle in the i+1th and ith signal cycles is t s,i+1 , where t s,i ≤t r,i ≤t c,i ≤t s,i+1 Conditions. a,i is the slope of the shock wave separation line when the free-flow speed vehicle meets the queued vehicle, ω is the slope of the shock wave separation line when the free-flow speed vehicle meets the queued vehicle when the queued vehicle dissipates, ω,ω a,i exist Figure 4 Shown in Figure 3 The expressions shown in the figure have the same meaning. L is the upstream boundary VTL up To the downstream boundary VTL down The distance, L1 is the slope of ω a,i The free-flow speed vehicle forms a shock wave when it encounters the queue vehicle, and when the queue vehicle with a slope of ω dissipates, the intersection of the shock wave is at a distance from the upstream boundary VTL. up The distance. g,i-1 is the green light duration of the i-1th cycle, T r,i is the duration of the red light in the i-th cycle, T g,i is the green light duration of the i-th cycle, T r,i+1 is the duration of the red light in the i+1th cycle.
[0050] In order to construct the probability expression of traffic flow parameters, it is necessary to Figure 3 and Figure 4 Derivation and expression of relevant parameters:
[0051] like Figure 4 As shown, if the arrival time of a vehicle is between the upstream critical entry time of the vehicle in the i-th and i-1-th signal cycles, it is t s,i and the critical entry time of the vehicle in the i-th unsaturated cycle is t c,i You will experience queue delays due to Figure 3 The analysis shown, solution Figure 4 ω a,i (the slope of the shock wave separation line when a free-flow vehicle meets a vehicle forming a queue) and ω (the slope of the shock wave separation line when a free-flow vehicle meets a vehicle forming a queue when the queue dissipates), as follows:
[0052]
[0053] where q a,i for Figure 3 The flow rate at point A shown in the figure, k j is the blocking density, p fis the free flow velocity v f The reciprocal of q c is the vehicle flow rate value at the maximum flow rate point C, k m is the vehicle density value corresponding to the maximum flow rate point C.
[0054] The upstream critical entry time of a vehicle in the i-th and i-1-th signal cycles is t s,i , the solution formula is as follows:
[0055] t s,i =t r,i -L·p f (3)
[0056] Since the situation considered is under the condition of unsaturated cycle, the critical entry time t in the i-th unsaturated cycle is c,i The vehicles after the vehicle will not experience queue delay, so the critical entry time t c,i The time it takes for the free-flow speed vehicle to meet the queuing vehicle and form a shock wave, and for the queuing vehicle to dissipate the shock wave when the free-flow speed vehicle meets the queuing vehicle. The critical entry time of the vehicle in the i-th unsaturated cycle is t c,i The formula is as follows:
[0057]
[0058] where q a,i is the flow rate of vehicles entering the i-th cycle, and its expression is q max is the maximum vehicle flow rate during the period, C i is the signal cycle length, n i is the number of vehicles entering the i-th cycle.
[0059] like Figure 4 As shown, the jth car (expressed as ) delay It can be expressed as Figure 4 A horizontal line parallel to the horizontal axis t is drawn between the shock wave separation line when the medium free-flow speed vehicle meets the queued vehicle and the shock wave separation line when the free-flow speed vehicle meets the queued vehicle. ) entry point, in Figure 3 It can be seen as point A (point A is a moving point that moves freely between points O and C), a horizontal straight line parallel to the horizontal axis t, the length of the straight line is Its constraints are: but The expression is as follows:
[0060]
[0061] Therefore, the vehicle enters during the i-th signal cycle, and the entry time constraint is in is the vehicle's travel time. It can be expressed as the sum of delay and free flow time, as follows;
[0062]
[0063] Furthermore, by substituting formula (5) into formula (6), the vehicle travel time containing the original parameters can be obtained: The expression:
[0064]
[0065] If, the vehicle enters during the i-th signal cycle, the entry time constraint is Then the vehicle will not encounter any delays and the vehicle's travel time is L·p f According to many studies in the field of traffic engineering, the free flow speed usually conforms to the normal distribution assumption. This assumption has been verified by a large amount of field observation data. The inverse of the free flow speed p f It also obeys the normal distribution, that is, the formula is as follows:
[0066] p f ~N(μ pf ,σ pf ) (8)
[0067] Further, It also obeys the normal distribution, so the probability distribution formula of the travel time of delayed vehicles and non-delayed vehicles at the signal intersection can be derived as follows:
[0068] according to Figure 3 The basic straight line diagram of traffic flow and Figure 4 The vehicle time-space trajectory diagram shown in the figure is used to derive and analyze the formula, and the formula is derived and expressed by n i ,μ pf ,σ pf ,q max The travel time expression of the parameter completes the construction goal of the traffic parameter probability formula. For the sample vehicle, it is very simple to directly extract the VTL from the data up and VTL down Driving time between and time of entry into the study area As a known condition, the traffic parameter that needs to be estimated from the traffic distribution probability expression is the number of vehicles entering the i-th cycle ni , free flow speed v f The mean and variance (μ pf ,σ pf ).
[0069] like Figure 4 As shown, it is the time trajectory diagram under unsaturated conditions, the vehicle travel time Under two different conditions, it obeys the normal distribution. That is, the time for the jth vehicle to enter the i-th cycle is less than the critical entry time of the vehicle in the i-th non-saturated cycle. The normal distribution expression of the vehicle travel time is formula (11); when That is, the time for the jth vehicle to enter the i-th cycle is greater than the critical entry time of the vehicle in the i-th non-saturated cycle, and the normal distribution expression of the vehicle travel time is formula (12).
[0070]
[0071] 2. Establishing a Maximum Likelihood Model
[0072] This module mainly builds the maximum likelihood model. To build the traffic flow model, relevant variables and concepts need to be given.
[0073] Definition 1: Maximum Likelihood Estimation (MLE) is a method for estimating parameters by maximizing the likelihood function to find the parameter value that is most likely to produce the observed data.
[0074] This module uses the parameter expression completed by the module, namely the vehicle travel time likelihood, and further adds n i , that is, the number of vehicles entering the i-th cycle, and establish the relationship with n i The discrete likelihood model associated with , and the continuous joint log-likelihood associated with module one.
[0075] Since the research is on the traffic flow parameter model under the condition of unsaturated traffic flow, and point A is Figure 3 The maximum traffic flow rate q shown max On the left, the traffic density is not large, and there are basically no external interference factors. At this time, the Poisson distribution is used to describe the number of vehicles arriving in the i-th cycle n i is appropriate, the expression is as follows:
[0076]
[0077] Where λ is the arrival rate of the vehicle, and P is the joint probability distribution of n trajectory data samples.
[0078] For the constructed likelihood function, combined with the traffic parameter probability expression derived in the previous module, for the distribution family:
[0079]
[0080] by Denoted as the joint probability distribution of its n trajectory data samples, the expression for the parameters of the likelihood function is as follows:
[0081]
[0082]
[0083] Will It is called the sample observation value (λ,μ pf ,σ pf ), referred to as likelihood function, and is expressed as follows:
[0084]
[0085] The log-likelihood function is used in the calculation, is the log-likelihood function, denoted as
[0086] Likelihood function has the same form as the probability of sample joint distribution, but their intrinsic meanings are different. Likelihood function is to fix the sample observation value (λ, μ pf ,σ pf ) about parameters function, which is in the parameter space When we have samples, the likelihood function tells us how to take the most likely parameters. The estimate of is the maximum likelihood estimate.
[0087] In summary, the formula for building the maximum likelihood module is as follows, and the next step is solved based on the constructed maximum likelihood model:
[0088]
[0089] The probability distribution of the observed values of the samples in the maximum likelihood model is as follows Figure 6 、 Figure 7 and Figure 8 shown.
[0090] 3. EM algorithm solution module
[0091] Definition 1: An effective algorithm for finding the MLE in complex situations is the EM algorithm, an iterative algorithm for estimating parameters of probability models with latent variables. It is particularly well-suited for finding maximum likelihood estimates of model parameters when unobserved variables are present in the data. In this method, the EM algorithm is used to find maximum likelihood estimates of the parameters of probability distribution models. The EM algorithm consists of two main steps: the expectation step (E-step) and the maximization step (M-step).
[0092] Definition 2: L2 regularization is a method used to prevent model overfitting. It penalizes the size of model parameters by adding a regularization term to the loss function, thereby limiting the complexity of the model.
[0093] Definition 3: The EM algorithm combined with L2 regularization implements the maximum likelihood estimation (MLE) of parameters, which can prevent model overfitting and improve the generalization ability of the model.
[0094] Since the variable is a set, given the average distribution The mean of the complete log-likelihood:
[0095]
[0096] Since it contains unknown parameters that have not been observed, the log-likelihood is a random quantity and cannot be directly used to estimate the parameters using the maximum likelihood. Instead, the EM algorithm is needed to perform state estimation and maximum likelihood solution. The EM algorithm flow chart is as follows: Figure 5 shown.
[0097] like Figure 5 As shown in Step 1, first initialize the parameters:
[0098] Then, if Figure 5 Step 2 shown in the figure, with known parameters Under the premise of calculating the observed value (λ,μ pf ,σ pf )'s parameter maximum likelihood function conditional expectation The specific calculation formula is as follows:
[0099]
[0100]
[0101] Then as Figure 5 Step 3 shown in the figure maximizes the expectation of the log-likelihood function in the previous step 2, using To update The formula is as follows:
[0102]
[0103] For Step 3, the M step, i.e., the maximization step, to prevent model overfitting and improve the generalization ability of the model, the EM algorithm is combined with L2 regularization and applied to the M step. Adding the regularization term to the maximization process of the M step, formula (19) becomes the following formula:
[0104]
[0105] in is the expected log-likelihood function calculated in step E, is the parameter vector, ξ is the regularization coefficient, is the jth parameter in the parameter vector.
[0106] Then as Figure 5 In Step 4 shown, return to step E and iterate steps E and M until the algorithm converges, that is, the parameter changes are very small or the log-likelihood function changes are very small.
[0107] like Figure 9 As shown, when the log-likelihood function converges, the number of vehicles arriving in the i-th period n is obtained i The maximum likelihood estimation probability distribution of the parameters is used to obtain the vehicle travel time T i j The maximum likelihood estimate probability distribution of Figure 10 As shown and Figure 11 shown.
[0108] The present invention focuses on:
[0109] 1. Constructing a traffic flow model module: The present invention constructs a traffic parameter probability formula based on a linear basic diagram of traffic flow and a time-space trajectory diagram of vehicles. The traditional parabolic basic diagram is replaced by a linear basic diagram, which can complement and promote the time-space trajectory diagram to complete the construction of the traffic flow parameter model in the parameter space.
[0110] 2. Construct the maximum likelihood model module: Based on the maximum likelihood estimation method in statistics, the parameter expression derived from the traffic flow parameter model construction module is used to build a fixed sample observation value (λ, μ pf ,σ pf ) about parameters function, which is in the parameter space The upper value estimation is performed to complete the construction of the maximum likelihood model based on the first module, combine the maximum likelihood method with traffic parameters, and establish the likelihood function and log-likelihood function.
[0111] The effects finally achieved by the present invention are summarized as follows:
[0112] 1. Based on the traffic flow model and vehicle time trajectory diagram, the spatiotemporal relationship scenario of the intersection can be expressed in the form of mathematical expressions, and the probability expression of traffic flow parameters is established.
[0113] 2. According to the content of maximum likelihood estimation method in statistics, the joint likelihood function and logarithmic joint likelihood function are established by combining the probability expression of traffic flow parameters as the observed values of the sample and the parameters in the likelihood function.
[0114] 3. Significantly improves the estimation accuracy of traffic flow parameters. Traditional traffic flow parameter estimation methods usually rely on static or simplified traffic flow models, which are prone to estimation errors in complex road networks and dynamic traffic environments.
[0115] 4. By introducing a dynamic parameter estimation method based on vehicle trajectories, this invention fully leverages real-time traffic data to accurately capture the dynamic changes in traffic flow, effectively reducing estimation errors, particularly in unsaturated traffic scenarios. This precise estimation provides a solid data foundation for subsequent traffic management and optimization.
[0116] 5. This invention demonstrates remarkable effectiveness in traffic signal optimization and control. By utilizing precisely estimated traffic flow parameters, it can optimize traffic signal timing in real time, ensuring that traffic signals respond quickly to real-time traffic flow changes. This dynamic optimization not only reduces waiting times at intersections but also effectively alleviates traffic congestion and improves overall road efficiency.
[0117] 6. The present invention can use the estimated traffic parameters to assist traffic control personnel in completing tasks such as intersection signal timing, main road traffic flow prediction and control, traffic engineering design, and road traffic safety prevention.
[0118] An embodiment of the present invention provides a traffic flow parameter estimation system, including:
[0119] A model diagram construction module is used to construct a basic linear traffic flow diagram that describes the relationship between traffic flow rate and traffic density; wherein the traffic flow rate represents the number of vehicles passing through per unit time; and a vehicle time-space trajectory operation diagram that describes the relationship between time and vehicle trajectory position is constructed; wherein, as time increases, the first shock wave at the position where the front end of a free-traveling vehicle meets the end of a queue of vehicles in congestion propagates from the upstream virtual stroke boundary to the downstream virtual stroke boundary, indicating that the vehicles on the road are in a free-traveling stage; as time increases, the second shock wave at the position where the end of the queue meets the front end of the free-traveling vehicle queue when the queued vehicles disperse propagates from the downstream virtual stroke boundary to the upstream virtual stroke boundary, indicating that the vehicles on the road are in a congested stage; and the upstream virtual stroke boundary is the position where vehicles start to enter the main road, and the downstream virtual stroke boundary is the position where oncoming vehicles stop at the traffic light on the main road.
[0120] The model construction module is used to determine whether a vehicle experiences queuing delay based on the change in the vehicle trajectory position over time in the vehicle time-space trajectory operation diagram, combined with the traffic flow rate at that position in the traffic flow linear basic diagram: when no queuing delay occurs after the vehicle enters from the upstream virtual trip boundary, the vehicle free travel time is obtained using the vehicle free travel time model based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; when a queuing delay occurs after the vehicle enters from the upstream virtual trip boundary, the vehicle delay time is obtained using the vehicle delay time model based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; based on the vehicle delay time and the free travel time, the travel time of the vehicle between the upstream virtual trip boundary and the downstream virtual trip boundary when the vehicle experiences queuing delay and when the vehicle does not experience queuing delay is obtained; based on the travel time, a normal distribution is used to obtain a probability distribution model for whether the vehicle experiences queuing delay and does not experience queuing delay, which is used as a joint probability density model of traffic parameters.
[0121] The traffic parameter estimation module is used to construct a maximum likelihood model using the maximum likelihood estimation method based on the joint probability density model of traffic parameters, and use the expectation maximization algorithm EM to solve the maximum likelihood estimation of the maximum likelihood model to complete the estimation of traffic parameters.
[0122] A specific embodiment is as follows:
[0123] The following steps can be used to simulate real traffic conditions and analyze traffic-related data based on real traffic conditions:
[0124] 1. Data collection and preprocessing.
[0125] A vehicle detector is set up on a main road to obtain information such as speed, flow, time and location of vehicles passing through a specified section of the road, and to establish a time-space trajectory diagram of the vehicle.
[0126] 2. Construction of traffic flow model.
[0127] The collected time-space trajectory data is analyzed to construct a linear traffic flow diagram. Traffic flow parameter formulas are then applied to provide preliminary estimates of traffic volume, density, and other parameters. Compared to traditional parabolic graphs, linear diagrams more clearly demonstrate the linear relationships between traffic parameters, facilitating subsequent derivation.
[0128] 3. Establishment of maximum likelihood model.
[0129] Based on the parameter expressions in the traffic flow model, a likelihood function is constructed using the maximum likelihood estimation method. Observed traffic flow data is used to calculate the likelihood value in a fixed sample space, and then the parameters are estimated in the parameter space to determine the optimal solution for the traffic parameters.
[0130] 4. Log-likelihood function optimization.
[0131] Based on maximum likelihood estimation, we construct and optimize the log-likelihood function to improve computational stability. We compare and evaluate the model performance under different parameter settings to ensure estimation accuracy.
[0132] 5. Verification and application.
[0133] The estimated traffic parameters are then compared with subsequently collected real traffic data to verify the model’s accuracy. If the accuracy meets the requirements, the model can be applied to traffic signal control systems to optimize traffic management and signal scheduling.
[0134] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.
Claims
1. A method for estimating traffic flow parameters, characterized in that: The following steps are involved: Construct a basic linear traffic flow diagram that describes the relationship between traffic flow rate and traffic density; where traffic flow rate represents the number of vehicles passing through per unit time; A vehicle time-space trajectory operation diagram is constructed to describe the relationship between time and vehicle trajectory position. As time increases, a first shock wave at the point where the front end of a free-traveling vehicle meets the end of a queue of vehicles in a congestion propagates from the upstream virtual trip boundary to the downstream virtual trip boundary, indicating that the vehicles on the road are in a free-traveling phase. As time increases, a second shock wave at the point where the end of the queue meets the front end of the free-traveling vehicle queue as the queue disperses propagates from the downstream virtual trip boundary to the upstream virtual trip boundary, indicating that the vehicles on the road are in a congestion phase. The upstream virtual trip boundary is the point where vehicles on the main road begin to enter, and the downstream virtual trip boundary is the point where oncoming vehicles stop at the traffic light on the main road. Based on the change in the vehicle trajectory position over time in the vehicle time-space trajectory operation diagram, combined with the traffic flow rate at that location in the traffic flow linear basic diagram, it is determined whether the vehicle is experiencing queuing delays: when the vehicle enters from the upstream virtual trip boundary and no queuing delays occur, the vehicle free travel time is obtained using the vehicle free travel time model based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; when the vehicle enters from the upstream virtual trip boundary and a queuing delay occurs, the vehicle delay time is obtained using the vehicle delay time model based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; Based on the vehicle delay time and free travel time, the travel time of the vehicle between the upstream virtual trip boundary and the downstream virtual trip boundary is obtained, and the vehicle queue delay phenomenon and the non-queuing delay phenomenon are obtained. Based on the travel time, the probability distribution model of the vehicle queue delay phenomenon and the non-queuing delay phenomenon is obtained using the normal distribution as the joint probability density model of the traffic parameters. According to the joint probability density model of traffic parameters, the maximum likelihood model is constructed using the maximum likelihood estimation method, and the expectation maximization algorithm EM is used to solve the maximum likelihood estimation of the maximum likelihood model to complete the estimation of traffic parameters.
2. A method for estimating traffic flow parameters according to claim 1, characterized in that: The steps of constructing a basic linear traffic flow diagram describing the relationship between traffic flow rate and traffic density include: As the traffic density increases, the traffic flow rate increases linearly, indicating that the vehicles on the road are in the free movement stage; As the traffic density increases, the traffic flow rate decreases linearly, indicating that the vehicles on the road are in a congested stage.
3. The method for estimating traffic flow parameters according to claim 1, wherein: The specific steps of obtaining the travel time of a vehicle between an upstream virtual travel boundary and a downstream virtual travel boundary when a queuing delay occurs and when a queuing delay does not occur include: The vehicle free travel time model is formulated as follows: L×P f Where L represents the distance from the upstream virtual trip boundary to the downstream virtual trip boundary, p f is the reciprocal of the free travel speed; the free travel time is obtained according to the vehicle free travel time model; When a vehicle starts from the upstream virtual trip boundary during the green light period of the i-1th signal cycle and has not reached the downstream virtual trip boundary during the red light period of the i-th signal cycle, it will encounter a queue delay; When a vehicle departs from the upstream virtual trip boundary during the green light period of the i-th signal cycle and has not yet reached the downstream virtual trip boundary during the red light period of the i+1-th signal cycle, it will encounter a queue delay; The vehicle delay time model is formulated as follows: in, Due to the delay in queuing, is the entry time of the jth vehicle in the i-th signal cycle, t r,i is the red light start time of signal light r in the i-th cycle in the signal cycle, t s,i is the time when the vehicle enters the upstream virtual travel boundary in the i-th and i-1-th signal cycles, q max is the maximum vehicle flow rate during the period, C i is the signal cycle length, n i is the number of vehicles entering the i-th cycle; The travel time Tij consists of free travel time and queue delay time:
4. The method for estimating traffic flow parameters according to claim 1, wherein: The traffic parameter joint probability density model is formulated as follows: Tij~N(L·μpf,L·σpf) Among them, T i j is the vehicle travel time; N is the number of signal cycles; n i is the number of vehicles entering the i-th cycle; (μ pf ,σ pf ) are the mean and variance of the free travel speed; t r,i is the time when the red light of signal light r in the i-th cycle starts; is the time when the jth vehicle enters the i-th cycle; t s,i is the time when the vehicle enters the upstream virtual travel boundary in the i-th and i-1-th signal cycles, q max is the maximum vehicle flow rate during the period, C i is the signal cycle length; L is the upstream virtual trip boundary VTL up To the downstream virtual trip boundary VTL down distance.
5. The method for estimating traffic flow parameters according to claim 1, wherein: The expectation maximization algorithm EM also needs to add L2 regularization to prevent the model from overfitting.
6. A traffic flow parameter estimation system, characterized in that: include: A model graph construction module is used to construct a basic linear traffic flow graph that describes the relationship between traffic flow rate and traffic density; wherein the traffic flow rate represents the number of vehicles passing through per unit time; and to construct a vehicle time-space trajectory operation graph that describes the relationship between time and vehicle trajectory position; wherein, as time increases, a first shock wave at the position where the front end of a free-traveling vehicle meets the end of a queue of vehicles in a congestion propagates from an upstream virtual stroke boundary to a downstream virtual stroke boundary, indicating that the vehicles on the road are in a free-traveling stage; as time increases, a second shock wave at the position where the end of the queue meets the front end of the free-traveling vehicle queue when the queued vehicles disperse propagates from a downstream virtual stroke boundary to an upstream virtual stroke boundary, indicating that the vehicles on the road are in a congestion stage; and the upstream virtual stroke boundary is the position where vehicles on the main road begin to enter, and the downstream virtual stroke boundary is the position where oncoming vehicles stop at the traffic light on the main road; The model building module is used to determine whether a vehicle is experiencing queuing delays based on the temporal changes in the vehicle trajectory position in the vehicle time-space trajectory operation diagram and the traffic flow rate at that position in the traffic flow linear basic diagram: when no queuing delay occurs after the vehicle enters from the upstream virtual trip boundary, the vehicle free travel time is obtained using a vehicle free travel time model based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; when a vehicle is experiencing queuing delays after entering from the upstream virtual trip boundary, the vehicle delay time is obtained using a vehicle delay time model based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; based on the vehicle delay time and free travel time, the travel time of the vehicle between the upstream virtual trip boundary and the downstream virtual trip boundary when the vehicle experiences queuing delays and when the vehicle does not experience queuing delays is obtained; based on the travel time, a normal distribution is used to obtain a probability distribution model for whether the vehicle experiences queuing delays and when the vehicle does not experience queuing delays, which is used as a joint probability density model for traffic parameters; The traffic parameter estimation module is used to construct a maximum likelihood model using the maximum likelihood estimation method based on the joint probability density model of traffic parameters, and use the expectation maximization algorithm EM to solve the maximum likelihood estimation of the maximum likelihood model to complete the estimation of traffic parameters.
Citation Information
Patent Citations
Online urban road route travel time estimation method based on virtual vehicle locus reconstruction
CN106652458A
Method for estimating transit time of car on mixed-traffic site road section based on reliability model
CN109544919A