A short-term traffic flow prediction method based on variable coefficient grey model

Through the combination of variable coefficient gray model and particle swarm algorithm, a higher-order variable coefficient gray prediction model EEGM (n,1) was established, which solved the problem of short-term traffic flow prediction in the case of small data samples and high randomness, and achieved higher accuracy and flexibility of traffic flow prediction.

CN118097950BActive Publication Date: 2025-03-11CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410214381.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-27
Publication Date
2025-03-11
Estimated Expiration
2044-02-27

AI Technical Summary

Technical Problem

The prior art is difficult to effectively predict short-term traffic flow, especially when the data samples are small and random and uncertain, which makes it difficult to effectively alleviate traffic congestion problems.

Method used

The variable coefficient gray model is adopted, and the model accuracy and adaptability of the model is improved by establishing a higher-order variable coefficient gray prediction model based on Euler's equations, combining the particle swarm algorithm to find optimization and calculate parameters by least squares method.

Benefits of technology

It improves the accuracy and flexibility of short-term traffic flow prediction, can better adapt to complex traffic data, provide more accurate traffic flow prediction results, and help alleviate traffic congestion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118097950B_ABST
    Figure CN118097950B_ABST
Patent Text Reader

Abstract

The invention relates to a variable coefficient grey model short-term traffic flow prediction method, belonging to the technical field of traffic prediction, and comprising the following steps: S1: establishing an initial traffic flow sequence based on traffic flow data to obtain a target traffic flow sequence; S2: preprocessing the original traffic flow sequence, namely calculating a first-order cumulative generation sequence, an n-order cumulative reduction generation sequence and a mean value sequence; S3: establishing a high-order variable coefficient grey Euler short-term traffic flow prediction model EEGM (n, 1); and constructing matrices B and Y to obtain estimated values ​​of model parameters; S4: optimizing by using a particle swarm algorithm, namely using a particle swarm algorithm to find the optimal order of the model, and constructing a model according to the found optimal order and parameter values ​​calculated by the least squares method; S5: calculating a simulation value of the EEGM (n, 1) model by a time response function, and calculating its restoration value by a cumulative reduction reduction formula.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of traffic prediction and relates to a short-term traffic flow prediction method using a variable coefficient grey model. Background Art

[0002] With the increasing number of private car trips, road congestion is becoming more and more serious, resulting in a decrease in traffic efficiency and increasing traffic congestion. In addition, factors such as bad driving habits have exacerbated the phenomenon of road congestion. At present, intelligent transportation systems can effectively alleviate traffic congestion and prevent traffic accidents to a certain extent, and short-term traffic flow prediction is one of the main functions of realizing Intelligent Transportation Systems (ITS).

[0003] Short-term traffic flow prediction is to explore the changing rules of road traffic flow, perceive the changes in the state of the traffic system in advance, and accurately and timely predict the changes in road traffic flow, so as to better realize the intelligence and systematization of the traffic information system. Real-time and accurate traffic flow prediction can not only provide decision-making basis for traffic management departments to formulate plans, but also transform passive processing into active prevention, provide support for active traffic management and control, so as to formulate scientific and reasonable emergency plans and effective control measures to reduce time and economic losses. Therefore, how to choose a suitable short-term traffic flow prediction method and accurately and quickly predict the state of road traffic flow from the obtained data has become a practical problem that needs to be solved urgently.

[0004] The time scale of short-term traffic flow forecast data generally falls within 15 minutes. Remote data will lose freshness. If it is calculated every 5 minutes, there will be only 12 data points in an hour. Therefore, short-term traffic flow belongs to small sample data, which is consistent with the characteristics of limited information and great uncertainty of traffic flow. Grey prediction technology effectively solves the problems of missing and untrue data in economic and social systems that affect decision-making judgment, and makes up for the shortcomings of large sample modeling in terms of data volume requirements. Therefore, for traffic flow systems with characteristics such as short time series, few statistical data, and incomplete information, the grey prediction model can meet the requirements of real-time and high-precision traffic flow prediction, and can still achieve accurate predictions when faced with limited data, and can better handle data mutations in real traffic flows.

[0005] In reality, the factors affecting traffic are becoming increasingly complex. The disturbances inside and outside the traffic flow system cause its characteristic sequence to deviate from the stable state and show a random development trend. In practical applications, in order to better capture the time series of fluctuations and meet the characteristics of the trend changes of traffic flow data, it is necessary to establish a more flexible gray prediction model. Therefore, in view of the randomness and uncertainty of short-term traffic flow, how to better grasp the fluctuation law of short-term traffic flow data is a problem that needs to be studied; at the same time, how to objectively and accurately predict short-term traffic flow, provide theoretical support for short-term traffic flow prediction, and provide a scientific basis for alleviating traffic congestion is also a problem that needs to be solved urgently. Summary of the invention

[0006] In view of this, the object of the present invention is to provide a variable coefficient grey model short-term traffic flow prediction method.

[0007] In order to achieve the above object, the present invention provides the following technical solutions:

[0008] A variable coefficient grey model short-term traffic flow prediction method comprises the following steps:

[0009] S1: Establish an initial traffic flow sequence based on traffic flow data to obtain a target traffic flow sequence;

[0010] S2: preprocessing the original traffic flow sequence, i.e. calculating the first-order cumulative generation sequence, the n-order cumulative generation sequence and the mean sequence;

[0011] S3: Establish a high-order variable coefficient grey Euler short-term traffic flow prediction model EEGM(n,1); construct matrices B and Y to obtain the estimated values ​​of model parameters;

[0012] S4: Use particle swarm optimization to find the optimal order of the model, and build the model based on the optimal order and parameter values ​​calculated by the least squares method;

[0013] S5: Calculate the simulation value of the EEGM(n,1) model through the time response function, and calculate its restored value through the cumulative reduction formula.

[0014] Furthermore, the preprocessing of the original traffic flow sequence in step S2 specifically includes:

[0015] The initial traffic flow sequence is established based on the traffic flow, which is recorded as:

[0016] X (0) =(x (0) (1),x (0) (2),…,x (0) (m)) (1)

[0017] Among them, X (0)is the initial traffic flow sequence, and x (0) (k)≥0, k=1,2,3,…m represents the kth initial traffic flow;

[0018] Perform first-order accumulation on the initial traffic flow sequence to obtain a first-order accumulation sequence, which is recorded as:

[0019] X (1) =(x (1) (1),x (1) (2),…,x (1) (m)) (2)

[0020] in, k=1,2,…,m;α (1) X (1) Yes X (1) The first-order decreasing sequence of is recorded as:

[0021] α (1) X (1) =(α (1) x (1) (1),α (1) x (1) (2),…,α (1) x (1) (m)) (3)

[0022] Among them, α (1) x (1) (k) = x (1) (k)-x (1) (k-1), X (1) The i-th order cumulative decrease is recorded as α (i) X (1) ,i=1,2,…,n, where each specific α (i) x (1) The value of (k) is expressed as follows:

[0023] α (i) x (1) (k) = α (i-1) x (1) (k)-α (i-1) x (1) (k-1) = α (i-2) x (0) (k)-α (i-2) x (0) (k-1) (4)

[0024] Z (1) Yes X (1) The mean generation sequence of is recorded as:

[0025] Z (1) =(z (1) (2),z(1) (3),…,z (1) (m)) (5)

[0026] in, k=1,2,…,m.

[0027] Further, the EEGM (n, 1) model is established in step S3, and a matrix is ​​constructed to estimate the model parameters, specifically including:

[0028] Assume that the n-order linear non-homogeneous Euler equation is expressed as follows:

[0029]

[0030] Let f(x) = ax + b, y = x (1) (t) and x=t, where t represents a time point or a time period, we get:

[0031]

[0032] According to the grey difference information principle, the expression of the EEGM (n, 1) model is:

[0033] k n α (n) x (1) (k)+a 1 k n-1 α (n-1) x (1) (k)+a 2 k n-2 α (n-2) x (1) (k)+…+a n-1 kα (1) x (1) (k)+a n z (1) (k) = ak + b (8)

[0034] Formula (7) is the whitening equation of formula (8);

[0035] According to the expression of EEGM(n,1) model, its parameter list is The least squares estimate of satisfies:

[0036]

[0037] Among them, B is an m-1×n+2 matrix, and Y is an m-1×1 matrix, which are expressed as:

[0038]

[0039] Further, the particle swarm algorithm is used in step S4 to find the optimal order of the model, which specifically includes:

[0040] The sequence X (0) The grey prediction model is established based on the sequence composed of the first p elements of , and the last q data are the prediction sequence to test the accuracy of the model. Let the error sequence be:

[0041] δ=(δ(1),δ(2),…,δ(m)) (10)

[0042] in, i=1,2,…,p+q;

[0043] The comprehensive mean relative percentage error CMRPE is set as the optimization objective function, which is expressed as follows:

[0044]

[0045] Further, in step S5, the time response function of the EEGM(n,1) model is:

[0046]

[0047]

[0048] Cumulative reduction formula:

[0049]

[0050] in, and Respectively represent the original sequence x (1) (k) and x (0) (k) The corresponding predicted sequence and its cumulative reduction sequence value, and f(k) = λ n k n +λ n-1 k n-1 +…+λ 1 k-1.

[0051] The beneficial effects of the present invention are as follows: starting from the basic equation of the Euler equation of fluid mechanics, the present invention uses the gray difference information principle to establish a high-order variable coefficient gray prediction model based on the Euler equation, uses the least squares method to study the parameter estimation of the new model, and uses mathematical methods such as recursive sequence and mathematical transformation to solve the model. In order to improve the accuracy of the new model, the particle swarm optimization algorithm is used to optimize the optimal order of the new model, so that it has better flexibility and explanatory power. On the one hand, the introduction of the variable coefficient differential Euler equation makes the model more adaptable to traffic flow data and enhances the ability of the gray prediction model to adapt to complex data; on the other hand, the new model can greatly improve the accuracy of the short-term traffic flow prediction results, thereby providing an accurate and effective reference basis for the calculation of short-term traffic flow.

[0052] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0054] Figure 1 It is a flow chart of the variable coefficient grey model short-term traffic flow prediction method of the present invention;

[0055] Figure 2 It is a simulation and prediction fitting curve diagram of the model of the present invention and other prediction models. DETAILED DESCRIPTION

[0056] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0057] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.

[0058] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0059] The present invention provides a short-term traffic flow prediction method. Figure 1 As shown, the method specifically comprises the following steps:

[0060] S1: Input initial sequence: The historical traffic flow data is recorded by the traffic data collection system. The historical traffic flow data obtained is the number of vehicles passing through a specific observation point or road section within a certain time interval. The specified time interval can be specified according to the prediction requirements (for example, 5 minutes), so as to obtain the initial traffic flow sequence X (0) ;

[0061] S2: Preprocessing the original traffic flow data: Preprocessing the initial traffic flow sequence X (0) , calculate the corresponding first-order cumulative sequence X (1) , n-order decreasing sequence α (n) X (1) and the mean generating sequence Z (1) , specifically including: establishing the initial traffic flow sequence based on traffic flow, recorded as:

[0062] X (0) =(x (0) (1),x (0) (2),…,x (0) (m)) (1)

[0063] Among them, X (0) is the initial traffic flow sequence, and x (0) (k)≥0, k=1,2,3,…m represents the kth initial traffic flow;

[0064] Perform first-order accumulation on the initial traffic flow sequence to obtain a first-order accumulation sequence, which is recorded as:

[0065] X (1) =(x (1) (1),x (1) (2),…,x (1) (m)) (2)

[0066] in, k=1,2,…,m,α (1) X (1) Yes X (1) The first-order decreasing sequence of is recorded as:

[0067] α (1) X (1) =(α (1) x (1) (1),α (1) x (1) (2),…,α (1) x (1) (m)) (3)

[0068] Among them, α (1) x (1) (k) = x (1) (k)-x (1) (k-1), X (1) The i-th order cumulative decrease is recorded as α (i) X (1) ,i=1,2,…,n, where each specific α (i) x (1) The value of (k) is expressed as follows:

[0069] α (i) x (1) (k) = α (i-1) x (1) (k)-α (i-1) x (1) (k-1) = α (i-2) x (0) (k)-α (i-2) x (0) (k-1) (4)

[0070] Z (1) Yes X (1) The mean generation sequence of is recorded as:

[0071] Z (1) =(z (1) (2),z (1) (3),…,z (1) (m)) (5)

[0072] in, k=1,2,…,m.

[0073] S3: Construct matrices, estimate parameters, and establish EEGM (n, 1) model: Substitute the data into formula (9) to construct matrices B and Y, and construct the EEGM (n, 1) model, and then calculate the parameter list by the least squares method. The values ​​include:

[0074] Assume that the n-order linear non-homogeneous Euler equation is expressed as follows:

[0075]

[0076] Let f(x) = ax + b, y = x (1) (t) and x=t, where t represents a time point or a time period, we get:

[0077]

[0078] According to the grey difference information principle, the expression of the EEGM (n, 1) model is:

[0079] k n α (n) x (1) (k)+a 1 k n-1 α (n-1) x (1) (k)+a 2 k n-2 α (n-2) x (1) (k)+…+a n-1 kα (1) x (1) (k)+a n z (1) (k) = ak + b (8)

[0081] Among them, equation (7) is the whitening equation of the EEGM (n, 1) model in equation (8).

[0082] According to the expression of EEGM(n,1) model, its parameter list is The least squares estimate of satisfies:

[0083]

[0084] Among them, B is an m-1×n+2 matrix, and Y is an m-1×1 matrix, which are expressed as follows:

[0085]

[0086] S4: Optimization of model order: Use particle swarm algorithm to optimize the order n, and build the model based on the optimal order and parameter values ​​calculated by the least squares method, including:

[0087] The sequence X (0) The grey prediction model is established with the sequence composed of the first p elements, and the last q data are the prediction sequence to test the accuracy of the model. Let the error sequence be:

[0088] δ=(δ(1),δ(2),…,δ(m)) (10)

[0089] in, i=1,2,…,p+q.

[0090] According to the above definition, the comprehensive mean relative percentage error CMRPE is set as the optimization objective function, which is expressed as follows:

[0091]

[0092] S5: Generate a time response function, obtain a simulated value and a predicted value, and calculate the simulated value and the predicted value using formula (12) and formula (13), as follows:

[0093] The time response function of the EEGM(n,1) model is:

[0094]

[0095] Cumulative reduction formula:

[0096]

[0097] in, and Respectively represent the original sequence x (1) (k) and x (0) (k) The corresponding predicted sequence and its cumulative reduction sequence value, and f(k) = λ n k n +λ n-1 k n-1 +…+λ 1 k-1.

[0098] For the above EEGM (n, 1) model, according to its performance index evaluation standard, the simulation and prediction errors are calculated, and the simulation and prediction performance of the model is analyzed. Specifically, MAPE is used to calculate the performance of the model, and its formula is:

[0099]

[0100] Verify the effectiveness of the grey EEGM (n, 1) model: Apply the model to actual cases to verify its excellent performance in the cases and the predictive performance of the model. Figure 2 The simulation and prediction fitting curves of the model of the present invention and other prediction models are selected. The Whitemud Drive urban highway data in Canada provided by the Intelligent Transportation Research Center of the University of Alberta is selected, and the traffic flow data of the time period of 16:40-17:50 on August 14 is selected as a validity analysis case of the present invention. The model of the present invention is compared with other prediction models, and the measured prediction performance index used is MAPE. The calculated results are shown in Tables 1 and 2. Since the error of the GM (2,1) model is too large, the drawing will affect the observation comparison, so here only the curves of the fitting degree of the remaining four models and the original data are drawn, as shown in Table 1. Figure 2 shown.

[0101] Table 1

[0102]

[0103]

[0104] Table 2

[0105]

[0106] The experimental results show that the NGM (1,1) model has almost no fluctuations, and the data shows a gradual downward trend, gradually deviating from the original data. The prediction curves of the Verhulst model are all below the original data curve, which underestimates the original data sequence value and is inconsistent with the actual data trend fluctuation. Although the prediction curve of the WGM (1,1) model shows fluctuations, it deviates far from the actual curve and does not conform to the fluctuation law of the original data. From the perspective of the simulation of the original data by the model, the EEGM (n,1) model can well fit the actual data trend of traffic flow and reflect the overall change trend of traffic flow. It can be seen that the EEGM (n,1) model has the best fitting performance among all models.

[0107] In summary, the EEGM (n, 1) model of the present invention can well simulate the fluctuation trend of traffic flow, which also shows that the model has good adaptability to time series with fluctuations, conforms to the characteristics of traffic flow data trend changes, and has a good prediction effect on the direction and development trend of traffic flow in the future. The prediction model proposed by the present invention can help decision makers better understand the short-term traffic changes on highways, provide theoretical support for short-term prediction of highways, and provide a scientific basis for alleviating highway traffic congestion.

[0108] A person skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. When the program is executed, the steps of the method can be implemented. The storage medium, such as ROM / RAM, a disk, an optical disk, etc.

[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. A variable coefficient grey model short-term traffic flow prediction method, characterized by: The following steps are involved: S1: Establish an initial traffic flow sequence based on traffic flow data to obtain a target traffic flow sequence; S2: preprocessing the original traffic flow sequence, i.e. calculating the first-order cumulative generation sequence, the n-order cumulative generation sequence and the mean sequence; Step S2 preprocesses the original traffic flow sequence, specifically including: The initial traffic flow sequence is established based on the traffic flow, which is recorded as: X (0) =(x (0) (1),x (0) (2),…,x (0) (m)) (1) Among them, X (0) is the initial traffic flow sequence, and x (0) (k)≥0, k=1,2,3,…m represents the kth initial traffic flow; Perform first-order accumulation on the initial traffic flow sequence to obtain a first-order accumulation sequence, which is recorded as: X (1) =(x (1) (1),x (1) (2),…,x (1) (m)) (2) in, α (1) X (1) Yes X (1) The first-order decreasing sequence of is recorded as: a (1) X (1) =(a (1) x (1) (1),a (1) x (1) (2),…,a (1) x (1) (m)) (3) Among them, α (1) x (1) (k) = x (1) (k)-x (1) (k-1), X (1) The i-th order cumulative decrease is recorded as α (i) X (1) ,i=1,2,…,n, where each specific α (i) x (1) The value of (k) is expressed as follows: a (i) x (1) (k)=a (i-1) x (1) (k)-a (i-1) x (1) (k-1)=a (i-2) x (0) (k)-a (i-2) x (0) (k-1) (4) Z (1) Yes X (1) The mean generation sequence of is recorded as: WITH (1) =(from (1) (2),with (1) (3),…,with (1) (m)) (5) in, S3: Establishing a high-order variable coefficient grey Euler short-term traffic flow prediction model EEGM(n,1); and constructing matrices B and Y to obtain estimated values ​​of model parameters; Step S3 establishes the EEGM(n,1) model and constructs a matrix to estimate model parameters, specifically including: Assume that the n-order linear non-homogeneous Euler equation is expressed as follows: Let f(x) = ax + b, y = x (1) (t) and x=t, where t represents a time point or a time period, we get: According to the grey difference information principle, the expression of the EEGM (n, 1) model is: k n α (n) x (1) (k)+a1k n-1 α (n-1) x (1) (k)+a2k n-2 α (n-2) x (1) (k)+…+a n-1 kα (1) x (1) (k)+a n z (1) (k)=ak+b (8) Formula (7) is the whitening equation of formula (8); According to the expression of EEGM(n,1) model, its parameter list is The least squares estimate of satisfies: Among them, B is an m-1×n+2 matrix, and Y is an m-1×1 matrix, which are expressed as: S4: Use particle swarm optimization to find the optimal order of the model, and build the model based on the optimal order and parameter values ​​calculated by the least squares method; S5: Calculate the simulated value of the EEGM(n,1) model by the time response function, and calculate its restored value by the cumulative reduction formula; In step S5, the time response function of the EEGM(n,1) model is: Cumulative reduction formula: in, and Respectively represent the original sequence x (1) (k) and x (0) (k) The corresponding predicted sequence and its cumulative reduction sequence value, and f(k) = λ n k n +λ n-1 k n-1 +…+λ1k-1.

2. The variable coefficient grey model short-term traffic flow prediction method according to claim 1 is characterized by: Step S4 uses a particle swarm algorithm to find the optimal order of the model, which specifically includes: The sequence X (0) The grey prediction model is established based on the sequence composed of the first p elements of , and the last q data are the prediction sequence to test the accuracy of the model. Let the error sequence be: δ=(δ(1),δ(2),…,δ(m)) (10) in, The comprehensive mean relative percentage error CMRPE is set as the optimization objective function, which is expressed as follows:

Citation Information

Patent Citations

  • Short-term traffic flow prediction method based on nerve network combination model

    CN105701571A

  • Short-term traffic flow forecasting method based on gray ELM neural network

    CN107045785A