Method and system for estimating traffic flow parameters
By constructing a linear basic diagram of traffic flow and a vehicle time and space trace operation diagram, combining normal distribution and maximum likelihood estimation methods, the problem of insufficient accuracy of traffic parameter estimation in the prior art is solved, and more efficient and accurate traffic flow parameter estimation is achieved, which is suitable for real-time applications.
Patent Information
- Application Number
- CN202411902247.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-23
Smart Images

Figure CN119785600A_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] In the prior art, the traffic parameter estimation method is mainly based on dynamic Bayesian networks. The traffic parameter estimation method based on dynamic Bayesian networks has high computational complexity. Especially in large-scale traffic networks, building and reasoning complex dynamic Bayesian networks requires a lot of computing resources and time, which is not suitable for real-time applications. In order to make the model feasible, simplified assumptions are usually made on traffic flow and state transitions. These assumptions do not fully conform to the actual traffic situation, thus affecting the accuracy of the estimation. 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] The embodiment of the present invention provides a method for estimating traffic flow parameters, comprising the following steps: constructing a basic straight-line traffic flow diagram that describes the relationship between a traffic flow rate and a 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 congested vehicle queue 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 a queue meets the front end of a 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 vehicles start to enter the main road, and the downstream virtual stroke boundary is the stop position of oncoming vehicles at a signal light on the main road; according to 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 in the basic straight-line traffic flow diagram, it is determined whether the vehicle is Queuing delay occurs: when the vehicle does not experience queuing delay after entering from the upstream virtual travel boundary, the vehicle free travel time is obtained by using the vehicle free travel time model according to 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 experiences queuing delay after entering from the upstream virtual travel boundary, the vehicle delay time model is used according to 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 travel boundary and the downstream virtual travel boundary when queuing delay occurs and when queuing delay does not occur is obtained; based on the travel time, the normal distribution is used to obtain the probability distribution model of the vehicle when queuing delay occurs and when queuing delay does not occur, which is used as the joint probability density model of traffic parameters; based on 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.
[0006] Furthermore, the construction of a basic straight-line traffic flow diagram describing the relationship between traffic flow rate and traffic density comprises the following specific steps:
[0007] As the traffic density increases, the traffic flow rate increases linearly, indicating that the vehicles on the road are in the free driving stage; as the traffic density increases, the traffic flow rate decreases linearly, indicating that the vehicles on the road are in the congestion stage.
[0008] Furthermore, the step of obtaining the travel time of the vehicle between the upstream virtual travel boundary and the downstream virtual travel boundary when the vehicle is delayed in queuing and when the vehicle is not delayed in queuing comprises:
[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 queue delay;
[0012] When a vehicle starts from the upstream virtual trip boundary during the green light period of the i-th signal cycle and has not reached the downstream virtual trip boundary during the red light period of the i+1-th signal cycle, it will encounter 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 trip boundary in the i-th and i-1-th signal cycles, q max is the maximum vehicle flow rate during the cycle, C i is the signal cycle length, n i is the number of vehicles entering the i-th cycle;
[0016] Said travel 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-running 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 trip boundary in the i-th and i-1-th signal cycles, q max is the maximum vehicle flow rate during the cycle, C i is the signal cycle length; L is the upstream virtual trip boundary VTL up To 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 system for estimating traffic flow parameters, including:
[0023] A model diagram construction module is used to construct a basic straight-line 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 to construct a vehicle time-space trajectory operation diagram that describes the relationship between time and vehicle trajectory position; 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 congested vehicle queue 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, 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 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 vehicles on the main road start to enter, and the downstream virtual stroke boundary is the stop position of oncoming vehicles at the signal light on the main road;
[0024] The model building module is used to determine whether the vehicle has a queuing delay phenomenon according to 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 in the traffic flow linear basic diagram: when the vehicle does not have a queuing delay phenomenon after entering from the upstream virtual travel boundary, the vehicle free travel time model is used to obtain the vehicle free travel time according to 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 has a queuing delay phenomenon after entering from the upstream virtual travel boundary, the vehicle delay time model is used to obtain the vehicle delay time according to the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; according to the vehicle delay time and the free travel time, the travel time of the vehicle between the upstream virtual travel boundary and the downstream virtual travel boundary when the vehicle has a queuing delay phenomenon or when the vehicle does not have a queuing delay phenomenon; according to the travel time, the normal distribution is used to obtain the probability distribution model of the vehicle having a queuing delay phenomenon or not having a queuing delay phenomenon as the joint probability density model of the 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 embodiment of the present invention provides a method and system for estimating traffic flow parameters. Compared with the prior art, the method and system have the following beneficial effects:
[0027] Construct a basic linear traffic flow diagram that describes the relationship between vehicle flow rate and traffic density, and construct a vehicle time-space trajectory operation diagram that describes the relationship between time and vehicle trajectory position; based on the change of vehicle trajectory position over time in the vehicle time-space trajectory operation diagram, combined with the vehicle flow rate at that position in the basic linear traffic flow diagram, determine whether vehicles are experiencing queuing delays.
[0028] When no queuing delay occurs after the vehicle enters from the upstream virtual trip boundary, the vehicle free travel time is obtained by using the vehicle free travel time model according to the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; when queuing delay occurs after the vehicle enters from the upstream virtual trip boundary, the vehicle delay time is obtained by using the vehicle delay time model according to 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 the vehicle with queuing delay and without queuing delay between the upstream virtual trip boundary and the downstream virtual trip boundary is composed of the vehicle free travel time and the vehicle delay time, and then according to the travel time, the normal distribution is used to obtain the probability distribution model of the vehicle with queuing delay and without queuing delay, which is used as the joint probability density model of traffic parameters.
[0029] Finally, the actual situation of queuing delays and free driving of traffic vehicles is analyzed through the basic linear diagram of traffic flow 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 An overall method module diagram of a method for estimating traffic flow parameters 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 for estimating traffic flow parameters provided by an embodiment of the present invention;
[0033] Figure 4 A vehicle time-space trajectory operation diagram of a method for estimating traffic flow parameters provided by an embodiment of the present invention;
[0034] Figure 5 A flow chart of an EM algorithm for estimating a traffic flow parameter provided by 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 method for estimating traffic flow parameters provided by an embodiment of the present invention;
[0038] Fig. 9 A log-likelihood function convergence diagram of a traffic flow parameter estimation method provided by an embodiment of the present invention;
[0039] Fig.10 An MLE estimation diagram of the number of vehicles in a method for estimating traffic flow parameters provided by an embodiment of the present invention;
[0040] Fig.11 An MLE estimation diagram of travel time for a method for estimating traffic flow parameters provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.
[0042] See also Figure 1 The 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. The basic linear traffic flow diagram includes: as traffic density increases, traffic flow rate increases linearly, indicating that vehicles on the road are in a free-running stage; as traffic density increases, traffic flow rate decreases linearly, indicating that vehicles on the road are in a congested stage. Construct a vehicle time-space trajectory operation diagram that describes the relationship between time and vehicle trajectory position. The vehicle time-space trajectory operation diagram includes: as time increases, the first shock wave at the position where the front end of the free-running vehicle meets the end of the congested vehicle queue propagates from the upstream virtual travel boundary to the downstream virtual travel boundary, indicating that vehicles on the road are in a free-running stage; as time increases, the second shock wave at the position where the end of the queue meets the front end of the free-running vehicle queue when the queued vehicles disperse propagates from the downstream virtual travel boundary to the upstream virtual travel boundary, indicating that vehicles on the road are in a congested stage.
[0044] Step 2: According to the change of 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 has 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 queuing delays occur, the vehicle delay time model is used based on the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram to obtain the vehicle delay time.
[0045] Step 3: Based on the vehicle delay time and free travel time, obtain the travel time of vehicles between the upstream virtual travel boundary and the downstream virtual travel boundary when there is a queue delay or when there is no queue delay; based on the travel time, use the normal distribution to obtain the probability distribution model of vehicles experiencing queue delay or not, as the joint probability density model of traffic parameters. Based on the joint probability density model of traffic parameters, use the maximum likelihood estimation method to construct a maximum likelihood model, 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.
[0046] 1. Traffic flow model construction module:
[0047] This module is mainly about building a traffic flow model. For building 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 straight-line 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 disturbance 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 transmitted by VTL down (Virtual Stroke 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: The time-distance graph of vehicle trajectories at a signalized intersection, 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 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 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 with a slope of ω. When the queue vehicle 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 ith 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 in the figure, 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 In the shown a,i (the slope of the shock wave separation line when the free-flow speed vehicle meets the queue-forming vehicle) and ω (the slope of the shock wave separation line when the free-flow speed vehicle meets the queue-forming vehicle when the queue-forming vehicle dissipates), the method is as follows:
[0052]
[0053] where q a,i for Figure 3 The flow rate at point A is shown in Figure 1, 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 the 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 unsaturated cycle conditions, the critical entry time t in the i-th unsaturated cycle is c,i The vehicles behind will not experience queue delay, so the critical entry time t c,i The shock wave formed when the free-flow speed vehicle meets the queuing vehicle dissipates, and the shock wave formed when the free-flow speed vehicle meets the queuing vehicle dissipates. The time for the two shock waves to dissipate. 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 cycle, 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 vehicle (expressed as ) It can be expressed as Figure 4 A horizontal straight line parallel to the horizontal axis t is drawn between the shock wave separation line when the medium free-flow speed vehicle meets the queue-forming vehicle and the shock wave separation line when the queue-forming vehicle dissipates. At the same time, the jth vehicle (expressed as ) 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 which is The constraints are: but The expression is as follows:
[0060]
[0061] Therefore, when a vehicle enters the i-th signal cycle, the entry time constraint is in is the travel time of the vehicle. Further, the travel time of the vehicle It can be expressed as the sum of delay and free flow time, the formula is as follows;
[0062]
[0063] Furthermore, by substituting formula (5) into formula (6), we can obtain the vehicle travel time containing the original parameters: The expression is:
[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, which 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] Furthermore, 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 operation diagram shown in the figure is used to derive and analyze the formula, and the derivation and expression of the n i ,μ pf ,σ pf ,q max The travel time expression of the parameter is used to complete the construction 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 The 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 n i , free flow speed vf The mean and variance (μ pf ,σ pf ).
[0069] like Figure 4 As shown, it is the time trajectory diagram under unsaturated conditions, and the vehicle travel time Under two different conditions, it follows a 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 unsaturated cycle. The normal distribution expression of 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 unsaturated cycle, and the normal distribution expression of the vehicle travel time is formula (12).
[0070]
[0071] 2. Establishing the Maximum Likelihood Model
[0072] This module is mainly about constructing a maximum likelihood model. For building a 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, that is, the vehicle travel time likelihood, and further adds n i , that is, the number of vehicles entering the i-th cycle, and establishes i The discrete likelihood model associated with , and the continuous joint log-likelihood associated with module one.
[0075] Since the research is about the traffic flow parameter model under the condition of unsaturated traffic flow, and point A is Figure 3 The maximum traffic rate q shown max On the left, the traffic density is not large, and other external interference factors are basically non-existent. At this time, Poisson distribution is used to describe the number of vehicles arriving in the i-th period 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 is called the sample observation value (λ,μ pf ,σ pf ), referred to as likelihood function, and recorded as the following expression:
[0084]
[0085] The log-likelihood function is used in the calculation, is the log-likelihood function, denoted by
[0086] The likelihood function has the same form as the probability of the sample joint distribution, but their intrinsic meanings are different. The likelihood function is based on the fixed sample observation value (λ, μ pf ,σ pf ) The function of When we have samples, the likelihood function tells us how to most likely take the 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 obtaining MLE in complex situations is the EM algorithm, which is an iterative algorithm for estimating parameters of probability models with hidden variables. It is particularly suitable for finding the maximum likelihood estimate of model parameters when there are unobserved variables in the data. In this method, the EM algorithm is used to find the maximum likelihood estimate of the parameters of the probability distribution model. 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 is combined with L2 regularization to implement the maximum likelihood estimation (MLE) of parameters, which can prevent the model from overfitting and improve the generalization ability of the model.
[0094] Since the variable is a set, given the average distribution The mean of the total 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 for parameter estimation using maximum likelihood. Instead, the EM algorithm is needed for state estimation and maximum likelihood solution. The EM algorithm flowchart 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 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. In order to prevent the model from overfitting and improve the generalization ability of the model, the EM algorithm is combined with L2 regularization and applied to the M step. Regularization terms are added to the maximization process of the M step, and formula (19) is transformed into 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 Step 4 shown in the figure returns to step E, and iterates steps E and M repeatedly until the algorithm converges, that is, the parameter changes are very small or the log-likelihood function changes are very small.
[0107] like Fig. 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 Fig.10 As shown and Fig.11 shown.
[0108] The present invention focuses on:
[0109] 1. Constructing traffic flow model module: The present invention constructs traffic parameter probability formula based on the linear basic diagram of traffic flow and the time-space operation trajectory diagram of vehicles, and replaces the traditional parabolic basic diagram with a linear basic diagram, which can complement and promote the time-space operation trajectory diagram to complete the construction of traffic flow parameter model in 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 establish a fixed sample observation value (λ, μ pf ,σ pf ) The function of 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 time-space 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 samples and the parameters in the likelihood function.
[0114] 3. Greatly improve 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, the present invention can make full use of real-time traffic data and accurately capture the dynamic changes of traffic flow, especially in unsaturated traffic scenarios, and can effectively reduce estimation errors. Such accurate estimation provides a solid data foundation for subsequent traffic management and optimization.
[0116] 5. The present invention demonstrates excellent results in traffic signal optimization and control. By using accurately estimated traffic flow parameters, the present invention can optimize traffic signal timing in real time, ensuring that traffic signals can respond quickly to real-time traffic flow changes. This dynamic optimization can not only reduce the waiting time of vehicles at intersections, but also effectively alleviate traffic congestion and improve the overall traffic efficiency of the road.
[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 system for estimating traffic flow parameters, 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-moving vehicle meets the end of a queue of vehicles that is in 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-moving stage; as time increases, the second shock wave at the position where the end of the queue meets the front end of the free-moving 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 start to enter the main road, and the downstream virtual stroke boundary is the stop position of oncoming vehicles at the signal light on the main road.
[0120] The model building module is used to determine whether the vehicle has a queuing delay phenomenon according to 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 in the traffic flow linear basic diagram: when the vehicle does not have a queuing delay phenomenon after entering from the upstream virtual travel boundary, the vehicle free travel time model is used to obtain the vehicle free travel time according to 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 has a queuing delay phenomenon after entering from the upstream virtual travel boundary, the vehicle delay time model is used to obtain the vehicle delay time according to the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; according to the vehicle delay time and the free travel time, the travel time of the vehicle between the upstream virtual travel boundary and the downstream virtual travel boundary when the vehicle has a queuing delay phenomenon or when the vehicle does not have a queuing delay phenomenon; according to the travel time, a normal distribution is used to obtain a probability distribution model of whether the vehicle has a queuing delay phenomenon or does not have a queuing delay phenomenon, 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 position 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 basic diagram, and the traffic flow parameter formula is used to make preliminary estimates of traffic flow, density and other parameters. Compared with the traditional parabolic graph, the linear basic diagram can more clearly show the linear relationship of traffic parameters, which is convenient for subsequent derivation.
[0128] 3. Maximum likelihood model establishment.
[0129] Based on the parameter expressions in the traffic flow model, the likelihood function is constructed according to the maximum likelihood estimation method. The observed traffic flow data is used to calculate the likelihood value in the fixed sample space, and then the parameters are estimated in the parameter space to determine the optimal solution of the traffic parameters.
[0130] 4. Log-likelihood function optimization.
[0131] Based on the maximum likelihood estimation, the log-likelihood function is constructed and optimized to improve the calculation stability. The model effects under different parameter settings are compared and evaluated to ensure the estimation accuracy.
[0132] 5. Verification and application.
[0133] The estimated traffic parameters are compared with the actual traffic data collected later to verify the accuracy of the model. If the accuracy meets the requirements, the model can be applied to the traffic signal control system to optimize traffic management and signal scheduling.
[0134] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for estimating traffic flow parameters, characterized in that: The following steps are involved: Construct a basic linear diagram of traffic flow that describes the relationship between traffic flow rate and traffic density; the traffic flow rate represents the number of vehicles passing through per unit time; A vehicle time-space trajectory operation diagram describing 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 the free-traveling vehicle meets the end of the congested vehicle team propagates from the upstream virtual travel boundary to the downstream virtual travel 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 team meets the front end of the free-traveling vehicle team when the queued vehicles disperse propagates from the downstream virtual travel boundary to the upstream virtual travel boundary, indicating that the vehicles on the road are in a congested stage; and the upstream virtual travel boundary is the position where the vehicle starts to enter the main road, and the downstream virtual travel boundary is the stop position of the oncoming vehicle at the signal light on the main road; According to 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 in the traffic flow linear basic diagram, it is judged whether the vehicle has a queuing delay phenomenon: when the vehicle enters from the upstream virtual trip boundary and there is no queuing delay phenomenon, the vehicle free travel time is obtained by using the vehicle free travel time model according to 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 there is a queuing delay phenomenon, the vehicle delay time model is used according to the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram to obtain the vehicle delay time; According to the vehicle delay time and free travel time, the travel time of the vehicle between the upstream virtual travel boundary and the downstream virtual travel boundary with or without queuing delay is obtained; according to the travel time, the probability distribution model of the vehicle with or without queuing delay is obtained using normal distribution as the joint probability density model of 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 as claimed in claim 1, characterized in that: The construction of a basic straight-line traffic flow diagram describing the relationship between traffic flow rate and traffic density comprises the following specific steps: As the traffic density increases, the traffic flow rate increases linearly, indicating that the vehicles on the road are in the free-moving stage; As the traffic density increases, the traffic flow rate decreases linearly, indicating that the vehicles on the road are in a congestion stage.
3. A method for estimating traffic flow parameters as claimed in claim 1, characterized in that: The specific steps of obtaining the travel time of the vehicle between the upstream virtual travel boundary and the downstream virtual travel boundary when the vehicle has a queuing delay phenomenon and when the vehicle does not have a queuing delay phenomenon 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 queue delay; When a vehicle starts from the upstream virtual trip boundary during the green light period of the i-th signal cycle and has not reached the downstream virtual trip boundary during the red light period of the i+1-th signal cycle, it will encounter queue delay; The vehicle delay time model is formulated as follows: in, Because of 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 trip boundary in the i-th and i-1-th signal cycles, q max is the maximum vehicle flow rate during the cycle, 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. A method for estimating traffic flow parameters as claimed in claim 1, characterized in that: 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-running 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 trip boundary in the i-th and i-1-th signal cycles, q max is the maximum vehicle flow rate during the cycle, C i is the signal cycle length; L is the upstream virtual trip boundary VTL up To downstream virtual trip boundary VTL down distance.
5. A method for estimating traffic flow parameters as claimed in claim 1, characterized in that: 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 diagram construction module is used to construct a basic straight-line 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 to construct a vehicle time-space trajectory operation diagram that describes the relationship between time and vehicle trajectory position; 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 congested vehicle queue 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, 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 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 vehicles on the main road start to enter, and the downstream virtual stroke boundary is the stop position of oncoming vehicles at the signal light on the main road; The model building module is used to determine whether the vehicle has a queuing delay phenomenon according to 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 in the traffic flow linear basic diagram: when the vehicle does not have a queuing delay phenomenon after entering from the upstream virtual travel boundary, the vehicle free travel time model is used to obtain the vehicle free travel time according to 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 has a queuing delay phenomenon after entering from the upstream virtual travel boundary, the vehicle delay time model is used to obtain the vehicle delay time according to the traffic flow rate in the traffic flow linear basic diagram and the time in the vehicle time-space trajectory operation diagram; according to the vehicle delay time and the free travel time, the travel time of the vehicle between the upstream virtual travel boundary and the downstream virtual travel boundary when the vehicle has a queuing delay phenomenon or when the vehicle does not have a queuing delay phenomenon; according to the travel time, the normal distribution is used to obtain the probability distribution model of the vehicle having a queuing delay phenomenon or not having a queuing delay phenomenon as the joint probability density model of the 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
Intersection traffic state parameter estimation method and system based on multi-source data
CN113380027A
Machine-immiscible three-dimensional macroscopic fundamental diagram construction method based on cellular automaton model
CN117113693A
Method for traffic light and vehicle track control at signalized intersection
WO2021227502A1