Train speed curve prediction method based on BP network based on improved particle swarm

By improving the particle swarm algorithm to optimize the BP neural network, establishing an ATO speed curve prediction model for urban rail trains, the problem of urban rail transit train autonomous driving technology relying on foreign technology, and achieving comprehensive energy saving and consumption reduction and intelligent operation optimization management.

CN114202128BActive Publication Date: 2025-04-18NANJING UNIV OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111557513.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-19
Publication Date
2025-04-18
Estimated Expiration
2041-12-19

AI Technical Summary

Technical Problem

The existing autonomous driving technology of urban rail transit trains mainly relies on foreign technology, lacks independent research and development capabilities, making it difficult to achieve comprehensive energy conservation, consumption reduction and intelligent operation optimization management.

Method used

The improved particle swarm algorithm is used to optimize the BP neural network, establish a prediction model for ATO speed curve of urban rail trains, determine the key influencing factors through the main hierarchical analysis method, and use empirical formulas to determine the hidden layer of the network model.

Benefits of technology

It improves the accurate forecasting capability of neural networks, shortens the calculation time of ATO speed curve, achieves more energy-saving and stable operations, and meets the running time constraints.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114202128B_ABST
    Figure CN114202128B_ABST
Patent Text Reader

Abstract

The invention discloses a train speed curve prediction method of a BP network of an improved particle swarm algorithm, adopts a data dimension reduction algorithm, establishes a principal component analysis model, and determines the influencing factors of the train ATO speed curve; uses the corresponding influencing factors as a sample data set of the BP neural network of the improved particle swarm algorithm, determines the input parameter setting of the neural network of the improved particle swarm algorithm according to the number of influencing factors, and designs the structure of the hidden layer of the optimal neural network through simulation, and establishes a complete BP neural network model of the improved particle swarm algorithm; subsequently, the data set is divided into a sample data set and a test verification data set, and the sample data set is subjected to data normalization processing; uses the sample data set as the input of the BP neural network model of the improved particle swarm algorithm, performs sample data learning and training, determines the weight and threshold of the hidden layer of the BP neural network model of the improved particle swarm algorithm, and uses the test data set to verify the accuracy. The trained BP neural network model of the improved particle swarm algorithm is used to predict the ATO speed curve of the urban rail train. The method of the invention realizes the prediction of the ATO speed curve, provides data and theoretical support for the subsequent energy consumption analysis of rail transit trains, and has high use value and application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of urban subway train ATO automatic driving, in particular to an improved particle swarm BP (PSO-BP) network train speed curve prediction method. Background Art

[0002] In rail transit advanced automation, the ATC system generally includes an automatic train monitoring system (ATS: Automatic Train Supervision), a train overspeed protection system (ATP) and an automatic train operation system (ATO). As an important subsystem of the train automatic control system, ATO uses on-board fixed information and ground information to control train traction and braking, improve passenger comfort, and improve train punctuality. In addition, ATO also provides functions such as fixed-point parking, door control, and feedback of train positioning information to stations. As a subsystem of ATC, ATO is an important technical measure to improve the operation level of urban rail transit trains (punctuality, comfort, and energy saving). It can simulate the task of driving a train, and use ground information to control the operation of train traction, braking, automatic reversal, etc., so that the train is always in the best operating state, reducing the train operation cost and increasing the flexibility of train line operation.

[0003] In terms of automatic driving system (ATO), foreign countries have studied train driving systems suitable for high-density urban rail transit and widely used them in urban rail transit systems. At present, my country's urban rail transit train automatic control system is mainly imported. In order to reduce subway investment, there is an urgent need for domestic train automatic driving systems with independent intellectual property rights suitable for urban rail transit. Summary of the invention

[0004] The purpose of the present invention is to break the foreign technical monopoly on automatic train driving, and to provide a method for predicting the ATO speed curve of urban rail trains based on a BP neural network with an improved particle swarm algorithm, which can achieve comprehensive energy saving and consumption reduction and intelligent operation optimization management and is easy to promote and implement.

[0005] The technical solution to achieve the purpose of the present invention is: a method for predicting the ATO speed curve of urban rail trains based on a BP neural network with an improved particle swarm algorithm, comprising the following steps:

[0006] Step 1: Using the principal hierarchy analysis method, determine the key influencing factors among the existing factors affecting the train speed curve, including interval running time, interval length, interval curve value, interval slope value, interval ATP speed limit value, train weight and interval passenger flow;

[0007] Step 2: According to the key influencing factors in step 1, determine the network input and network output of the BP neural network prediction model of the improved particle swarm algorithm, and use the empirical formula (α is a number between 0 and 10) Determine the hidden layer of the network model.

[0008] Step 3: Select key influencing factors to make sample data sets and test data sets, and establish a BP neural network model of improved particle swarm algorithm for comprehensive prediction of urban rail train ATO speed curve;

[0009] Step 4: Initialize the position of each particle, use the neural network weight and threshold as the particle position latitude value, and normalize the sample data set and test data set in step 3;

[0010] Step 5: Input the normalized sample data set in step 4 into the neural network model, calculate the current fitness function value of the current particle by calculating to the output layer;

[0011] Step 6: Determine whether the fitness value of the initial particle meets the requirements for stopping the iteration. If it does, stop the iteration. If it does not, update the position and speed of the particle. Calculate the position of the local optimal particle and the position of the global optimal particle, save the position of the global optimal particle, and assign the position dimension value to the corresponding BP neural network parameter w, b;

[0012] Step 7: Using the BP neural network model of the improved particle swarm algorithm in steps 5 and 6, the ATO speed curve of urban rail trains can be effectively predicted.

[0013] Step 8: Denormalize the predicted value output in step 7 to obtain the speed value of the ATO system of the urban rail train.

[0014] Furthermore, the factors affecting the train speed curve described in step 1 include interval running time, interval length, interval curve value, interval slope value, interval ATP speed limit value, train weight and interval passenger flow;

[0015] Furthermore, the key influencing factors of the urban rail train are determined by using the principal hierarchy analysis method described in step 1, as follows:

[0016] Step 1.1: The existing factors affecting the train speed curve, including interval running time, interval length, interval curve value, interval slope value, interval ATP speed limit value, train weight and interval passenger flow, are combined into a 7-column matrix X = {X i (k)|k=1,2,...,n},i=1,2,...7; where X is the influencing factor value X of type number i i(k), k is the number of the influencing factor, n is the capacity of the sample of the influencing factor value, and i is the number of the influencing factor type;

[0017] Step 1.2: Zero the mean of each row of X, that is, subtract the mean of this row:

[0018]

[0019] x i (k) = X i (k)-μ i

[0020] Among them, x i (k) is the result of zero-meaning the influencing factor value numbered i.

[0021] Step 1.3: Calculate the covariance matrix C of matrix X:

[0022]

[0023] C is a symmetric matrix whose diagonals correspond to the variances of the variables, and the elements in the i-th row and j-th column are the same as those in the j-th row and i-th column, indicating the covariance of the two variables i and j. i represents the i-th row of matrix X, b j represents the jth column of the matrix X′; Step 1.4: Find the eigenvalues ​​and eigenvectors of the covariance matrix C:

[0024] From step 1.3, we can see that the covariance matrix C is a symmetric matrix. In linear algebra, real symmetric matrices have a series of very good properties:

[0025] 1. The different eigenvalues ​​of a real symmetric matrix correspond to different eigenvectors that are necessarily orthogonal;

[0026] 2. Assume that the multiplicity of the eigenvector λ is r, then there must be r linearly independent eigenvectors corresponding to λ, so these r eigenvectors can be unit orthogonalized.

[0027] From the above two points, we can see that a real symmetric matrix with n rows and n columns can definitely find n unit orthogonal eigenvectors. Let these n eigenvectors be e 1 ,e 2 ,...e n , and organize them into a matrix E = {e 1 ,e 2 ,...e n}.

[0028] Then the covariance matrix C is:

[0029]

[0030] Where Λ is a diagonal matrix, and its diagonal elements are the eigenvalues ​​corresponding to each eigenvector.

[0031] At this point, we have found the required matrix P: P = E T

[0032] Step 1.5: From step 1.4, we know that P is a matrix in which the eigenvectors of the covariance matrix are normalized and arranged in rows, where each row is an eigenvector of C. If P is arranged from top to bottom according to the eigenvalues ​​in Λ from large to small, then the matrix composed of the first K rows of P is multiplied by the original data matrix X to obtain the reduced-dimensional data matrix Y.

[0033] Furthermore, the input vector of the BP neural network model of the improved particle swarm algorithm in step 2 includes the interval running time, the interval length, the ramp value, the curve value, and the interval passenger flow; the output vector of the BP neural network model of the improved particle swarm algorithm is the ATO speed value at the current moment;

[0034] Furthermore, the BP neural network prediction model structure of the improved particle swarm algorithm described in step 2 includes a three-layer structure, namely, an input layer, a hidden layer, and an output layer, and the number of layers of each layer is 1, 2, and 1 respectively;

[0035] Furthermore, the hidden layer structure of the BP neural network prediction model of the improved particle swarm algorithm described in step 2 is determined by using the empirical formula (α is a number between 0 and 10) Determine the hidden layer of the network model;

[0036] Furthermore, the sample data described in step 3 includes the length of each section, the line slope value, the line curve value, the actual running time of each section, and the passenger flow of the section.

[0037] Furthermore, the network parameters of the BP neural network model of the improved particle swarm algorithm described in step 4 are initialized as follows:

[0038] Xavier initialization: The variance of the activation values ​​and state gradients of each layer remains consistent during the propagation process, that is:

[0039]

[0040]

[0041] In the formula, Var(h i ) represents the variance of the activation value of the i-th layer, Var(h j ) represents the variance of the activation value of the jth layer, represents the variance of the state gradient of the i-th layer, represents the variance of the state gradient of the jth layer. Further, in step 4, the sample data set in step 1 is normalized as follows:

[0042]

[0043] Wherein, N represents the input vector obtained after normalization; minp represents the minimum value of each column vector of the input vector P; maxp represents the maximum value of each column vector of the input vector P.

[0044] Furthermore, the calculation of the current fitness function of the current particle in step 5 is as follows:

[0045]

[0046] Where Y ij represents the actual output of the model, D ij represents the expected output of the model, and N represents the number of particles.

[0047] Furthermore, the update calculation of the position and velocity of the particle in step 6 is as follows:

[0048] V id =ωV id +C 1 random(0,1)(P id -X id )+C 2 random(0,1)(P gd -X id )

[0049] X id =X id +V id

[0050] In the formula, ω is called the inertia factor and its value is non-negative. When it is larger, the global optimization ability is strong and the local optimization ability is weak. When it is smaller, the global optimization ability is weak and the local optimization ability is weak. By adjusting the size, the global optimization performance can be adjusted. C 1 and C 2 The former is the individual learning factor of each particle, and the latter is the social learning factor of each particle. random(0,1) represents a random number in the interval [0,1], P id represents the dth dimension of the individual extreme value of the ith variable, P gd represents the dth dimension of the global optimal solution.

[0051] Furthermore, the BP neural network model of the improved particle swarm algorithm in step 6 is used in step 7 to predict the ATO speed curve of the urban rail train, as follows:

[0052] A prediction sample data set is prepared, and the prepared data set is used as the input of the BP neural network of the improved particle swarm algorithm. The network output vector after the network input vector is changed is predicted, and the ATO speed value of the urban rail train is obtained by calculating through the anti-normalization method.

[0053] Furthermore, the data predicted in step 7 needs to be denormalized by the formula to obtain the speed value of the relevant step 8. The specific method is as follows:

[0054]

[0055] Wherein, R represents the input vector obtained after normalization; minp represents the minimum value of each column vector of the input vector P; maxp represents the maximum value of each column vector of the input vector P.

[0056] Compared with the prior art, the present invention has the following significant advantages: (1) The present invention uses an improved particle swarm algorithm to optimize and train the BP neural network, which expands the exploration range and enhances the global optimization capability of the particle swarm algorithm; (2) The present invention effectively improves the accurate prediction capability of the neural network, and under the conditions of the same modeling samples and prediction factors, the prediction effect is significantly better than the prior art, and the prediction result is stable; (3) Under the same line, the present invention can calculate the ATO speed curve in a shorter time than the prior art; (4) Under the condition of meeting the running time constraints, the present invention is more energy-saving and stable than the ATO speed curve provided by the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 The figure is a flow chart of the BP neural network model training algorithm of the improved particle swarm algorithm in the present invention.

[0058] Figure 2 This is a comparison chart of the prediction results and actual test results of the model in the embodiment of the present invention.

[0059] Figure 3 The figure is a flow chart of the train speed curve prediction method of the BP network of the improved particle swarm according to the present invention. DETAILED DESCRIPTION

[0060] The method for predicting the ATO speed curve of an urban rail train based on a BP neural network with an improved particle swarm algorithm comprises the following steps:

[0061] Step 1: Using the principal hierarchy analysis method, determine the key influencing factors among the existing factors affecting the train speed curve, including interval running time, interval length, interval curve value, interval slope value, interval ATP speed limit value, train weight and interval passenger flow;

[0062] Step 2: According to the key influencing factors in step 1, determine the network input and network output of the BP neural network prediction model of the improved particle swarm algorithm, and use the empirical formula (α is a number between 0 and 10) Determine the hidden layer of the network model.

[0063] Step 3: Select key influencing factors to make sample data sets and test data sets: and establish a BP neural network model of improved particle swarm algorithm for comprehensive prediction of urban rail train ATO speed curve;

[0064] Step 4: Initialize the position of each particle, use the neural network weight and threshold as the particle position latitude value, and normalize the sample data set and test data set in step 3;

[0065] Step 5: Input the normalized sample data set in step 4 into the neural network model, calculate the current fitness function value of the current particle by calculating to the output layer;

[0066] Step 6: Determine whether the fitness value of the initial particle meets the requirements for stopping the iteration. If it does, stop the iteration. If it does not, update the position and speed of the particle. Calculate the position of the local optimal particle and the position of the global optimal particle, save the position of the global optimal particle, and assign the position dimension value to the corresponding BP neural network parameter w, b;

[0067] Step 7: Using the BP neural network model of the improved particle swarm algorithm in steps 5 and 6, the ATO speed curve of urban rail trains can be effectively predicted.

[0068] Step 8: Denormalize the predicted value output in step 7 to obtain the speed value of the ATO system of the urban rail train.

[0069] Furthermore, the factors affecting the train speed curve described in step 1 include interval running time, interval length, interval curve value, interval slope value, interval ATP speed limit value, train weight and interval passenger flow;

[0070] Furthermore, the key influencing factors of the urban rail train are determined by using the principal hierarchy analysis method described in step 1, as follows:

[0071] Step 1.1: The existing factors affecting the train speed curve, including interval running time, interval length, interval curve value, interval slope value, interval ATP speed limit value, train weight and interval passenger flow, are combined into a 7-column matrix X = {X i (k)|k=1,2,...,n},i=1,2,...7; where X is the influencing factor value X of type number i i(k), k is the number of the influencing factor, n is the capacity of the sample of the influencing factor value, and i is the number of the influencing factor type;

[0072] Step 1.2: Zero the mean of each row of X, that is, subtract the mean of this row:

[0073]

[0074] x i (k) = X i (k)-μ i

[0075] Among them, x i (k) is the result of zero-meaning the influencing factor value numbered i.

[0076] Step 1.3: Calculate the covariance matrix C of matrix X:

[0077]

[0078] C is a symmetric matrix whose diagonals correspond to the variances of the variables, and the elements in the i-th row and j-th column are the same as those in the j-th row and i-th column, indicating the covariance of the two variables i and j. i represents the i-th row of matrix X, b j represents the j-th column of the matrix X′;

[0079] Step 1.4: Find the eigenvalues ​​and eigenvectors of the covariance matrix C:

[0080] From step 1.3, we can see that the covariance matrix C is a symmetric matrix. In linear algebra, real symmetric matrices have a series of very good properties:

[0081] 1. The different eigenvalues ​​of a real symmetric matrix correspond to different eigenvectors that are necessarily orthogonal;

[0082] 2. Assume that the multiplicity of the eigenvector λ is r, then there must be r linearly independent eigenvectors corresponding to λ, so these r eigenvectors can be unit orthogonalized.

[0083] From the above two points, we can see that a real symmetric matrix with n rows and n columns can definitely find n unit orthogonal eigenvectors. Let these n eigenvectors be e 1 ,e 2 ,...e n , and organize them into a matrix E = {e 1 ,e 2 ,...e n}.

[0084] Then the covariance matrix C is:

[0085]

[0086] Where Λ is a diagonal matrix, and its diagonal elements are the eigenvalues ​​corresponding to each eigenvector.

[0087] At this point, we have found the required matrix P: P = E T

[0088] Step 1.5: From step 1.4, we know that P is a matrix in which the eigenvectors of the covariance matrix are normalized and arranged in rows, where each row is an eigenvector of C. If P is arranged from top to bottom according to the eigenvalues ​​in Λ from large to small, then the matrix composed of the first K rows of P is multiplied by the original data matrix X to obtain the reduced-dimensional data matrix Y.

[0089] Furthermore, the input vector of the BP neural network model of the improved particle swarm algorithm in step 2 includes the interval running time, the interval length, the ramp value, the curve value, and the interval passenger flow; the output vector of the BP neural network model of the improved particle swarm algorithm is the ATO speed value at the current moment;

[0090] Furthermore, the BP neural network prediction model structure of the improved particle swarm algorithm described in step 2 includes a three-layer structure, namely, an input layer, a hidden layer, and an output layer, and the number of layers of each layer is 1, 2, and 1 respectively;

[0091] Furthermore, the hidden layer structure of the BP neural network prediction model of the improved particle swarm algorithm described in step 2 is determined by using the empirical formula (α is a number between 0 and 10) Determine the hidden layer of the network model;

[0092] Furthermore, the sample data described in step 3 includes the length of each section, the line slope value, the line curve value, the actual running time of each section, and the passenger flow of the section.

[0093] Furthermore, the network parameters of the BP neural network model of the improved particle swarm algorithm described in step 4 are initialized as follows:

[0094] Xavier initialization: The variance of the activation values ​​and state gradients of each layer remains consistent during the propagation process, that is:

[0095]

[0096]

[0097] In the formula, Var(h i ) represents the variance of the activation value of the i-th layer, Var(h j ) represents the variance of the activation value of the jth layer, represents the variance of the state gradient of the i-th layer, Represents the variance of the state gradient of the jth layer.

[0098] Furthermore, in step 4, the sample data set in step 1 is normalized, as follows:

[0099]

[0100] Wherein, N represents the input vector obtained after normalization; minp represents the minimum value of each column vector of the input vector P; maxp represents the maximum value of each column vector of the input vector P.

[0101] Furthermore, the calculation of the current fitness function of the current particle in step 5 is as follows:

[0102]

[0103] Where Y ij represents the actual output of the model, D ij represents the expected output of the model, and N represents the number of particles.

[0104] Furthermore, the update calculation of the position and velocity of the particle in step 6 is as follows:

[0105] V id =ωV id +C 1 random(0,1)(P id -X id )+C 2 random(0,1)(P gd -X id )

[0106] X id =X id +V id

[0107] In the formula, ω is called the inertia factor and its value is non-negative. When it is larger, the global optimization ability is strong and the local optimization ability is weak. When it is smaller, the global optimization ability is weak and the local optimization ability is weak. By adjusting the size, the global optimization performance can be adjusted. C 1 and C 2 The former is the individual learning factor of each particle, and the latter is the social learning factor of each particle. random(0,1) represents a random number in the interval [0,1], P id represents the dth dimension of the individual extreme value of the ith variable, P gd represents the dth dimension of the global optimal solution.

[0108] Furthermore, the BP neural network model of the improved particle swarm algorithm in step 6 is used in step 7 to predict the ATO speed curve of the urban rail train, as follows:

[0109] A prediction sample data set is prepared, and the prepared data set is used as the input of the BP neural network of the improved particle swarm algorithm. The network output vector after the network input vector is changed is predicted, and the ATO speed value of the urban rail train is obtained by calculating through the anti-normalization method.

[0110] Furthermore, the data predicted in step 7 needs to be denormalized by the formula to obtain the speed value of the relevant step 8. The specific method is as follows:

[0111]

[0112] Wherein, R represents the input vector obtained after normalization; minp represents the minimum value of each column vector of the input vector P; maxp represents the maximum value of each column vector of the input vector P.

[0113] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0114] Example

[0115] Combination Figure 1 The present invention provides a method for predicting the ATO speed curve of a city rail train based on a BP neural network with an improved particle swarm algorithm, comprising the following steps:

[0116] Step 1: Using the principal hierarchy analysis method, determine the key influencing factors among the existing factors affecting the train speed curve, including interval running time, interval length, interval curve value, interval slope value, interval ATP speed limit value, train weight and interval passenger flow;

[0117] Step 1.1: The existing factors affecting the train speed curve, including interval running time, interval length, interval curve value, interval slope value, interval ATP speed limit value, train weight and interval passenger flow, are combined into a 7-column matrix X = {X i (k)|k=1,2,...,n},i=1,2,...7; where X is the influencing factor value X of type number i i (k), k is the number of the influencing factor, n is the capacity of the sample of the influencing factor value, and i is the number of the influencing factor type.

[0118] Step 1.2: Zero the mean of each row of X, that is, subtract the mean of this row:

[0119]

[0120] x i (k) = Xi (k)-μ i

[0121] Among them, x i (k) is the result of zero-meaning the influencing factor value numbered i.

[0122] Step 1.3: Calculate the covariance matrix C of matrix X:

[0123]

[0124] C is a symmetric matrix whose diagonals correspond to the variances of the variables, and the elements in the i-th row and j-th column are the same as those in the j-th row and i-th column, indicating the covariance of the two variables i and j. i represents the i-th row of matrix X, b j represents the j-th column of the matrix X′;

[0125] Step 1.4: Find the eigenvalues ​​and eigenvectors of the covariance matrix C:

[0126] From step 1.3, we can see that the covariance matrix C is a symmetric matrix. In linear algebra, real symmetric matrices have a series of very good properties:

[0127] 1. The different eigenvalues ​​of a real symmetric matrix correspond to different eigenvectors that are necessarily orthogonal;

[0128] 2. Assume that the multiplicity of the eigenvector λ is r, then there must be r linearly independent eigenvectors corresponding to λ, so these r eigenvectors can be unit orthogonalized.

[0129] From the above two points, we can see that a real symmetric matrix with n rows and n columns can definitely find n unit orthogonal eigenvectors. Let these n eigenvectors be e 1 ,e 2 ,...e n , and organize them into a matrix E = {e 1 ,e 2 ,...e n}.

[0130] Then the covariance matrix C is:

[0131]

[0132] Where Λ is a diagonal matrix, and its diagonal elements are the eigenvalues ​​corresponding to each eigenvector (there may be duplication).

[0133] At this point, we have found the required matrix P: P = E T

[0134] Step 1.5: From step 1.4, we know that P is a matrix in which the eigenvectors of the covariance matrix are normalized and arranged in rows, where each row is an eigenvector of C. If P is arranged from top to bottom according to the eigenvalues ​​in Λ from large to small, then the matrix composed of the first K rows of P is multiplied by the original data matrix X to obtain the reduced-dimensional data matrix Y.

[0135] Step 2: According to the key influencing factors in step 1, including interval running time, interval length, ramp value, curve value, and interval passenger flow, five key factors are used as the network input layer of the BP neural network prediction model of the improved particle swarm algorithm, and the ATO speed value is used as the output layer of the BP neural network of the improved particle swarm algorithm. Using the empirical formula (α is a number between 0 and 10) Determine the hidden layer of the network model, α is 9, that is, the number of neurons in the hidden layer is 12.

[0136] Step 3: Select key influencing factors to make sample data sets and test data sets: and establish a BP neural network model of improved particle swarm algorithm for comprehensive prediction of urban rail train ATO speed curve;

[0137] Step 4: Initialize the position of each particle, use the neural network weight and threshold as the particle position latitude value, and normalize the sample data set and test data set in step 3;

[0138] Step 4.1: Initialize the position of each particle using Xavier. The specific method is as follows:

[0139] Xavier initialization: The variance of the activation values ​​and state gradients of each layer remains consistent during the propagation process, that is:

[0140]

[0141]

[0142] In the formula, Var(h i ) represents the variance of the activation value of the i-th layer, Var(h j ) represents the variance of the activation value of the jth layer, represents the variance of the state gradient of the i-th layer, Represents the variance of the state gradient of the jth layer.

[0143] Step 4.2: Normalize the sample data set and the test data set. The specific method is as follows:

[0144]

[0145] Wherein, N represents the input vector obtained after normalization; minp represents the minimum value of each column vector of the input vector P; maxp represents the maximum value of each column vector of the input vector P.

[0146] Step 5: Input the normalized sample data set in step 4 into the neural network model, calculate the current fitness function value of the current particle by calculating to the output layer, as follows:

[0147]

[0148] Where Y ij represents the actual output of the model, D ij represents the expected output of the model, and N represents the number of particles.

[0149] Step 6: Determine whether the fitness value of the initial particle meets the requirements for stopping the iteration. If it does, stop the iteration. If it does not, update the position and speed of the particle. Calculate the position of the local optimal particle and the position of the global optimal particle, save the position of the global optimal particle, and assign the position dimension value to the corresponding BP neural network parameter w, b, as follows:

[0150] V id =ωV id +C 1 random(0,1)(P id -X id )+C 2 random(0,1)(P gd -X id )

[0151] X id =X id +V id

[0152] In the formula, ω is called the inertia factor and its value is non-negative, C 1 and C 2 The former is the individual learning factor of each particle, and the latter is the social learning factor of each particle. random(0,1) represents a random number in the interval [0,1], P id represents the dth dimension of the individual extreme value of the ith variable, P gd represents the dth dimension of the global optimal solution.

[0153] Step 7: Using the BP neural network model of the improved particle swarm algorithm in steps 5 and 6, the ATO speed curve of urban rail trains can be effectively predicted.

[0154] Step 8: Denormalize the predicted value output in step 7 to obtain the speed value of the ATO system of the urban rail train. The specific method is as follows:

[0155]

[0156] Wherein, R represents the input vector obtained after normalization; minp represents the minimum value of each column vector of the input vector P; maxp represents the maximum value of each column vector of the input vector P.

[0157] This embodiment uses the urban rail train ATO speed curve prediction method based on the BP neural network of the improved particle swarm algorithm of the present invention to predict the ATO speed curve of a subway train. The number of input layers, hidden layers and output layers are 1, 2, and 1 respectively; the number of nodes in the input layer, hidden layer, and output layer are 5, 128, 128, and 1 respectively, and η=0.005 is set, the error function is MSE, the training algorithm adopts the gradient descent method, the network target error is 0.0001, and the maximum number of iterations is 500,000 times.

[0158] The prediction results are as follows Figure 2 As shown, it is very consistent with the changing trend of the historical speed curve. At the same time, the speed curve meets the requirements of stop accuracy, energy saving, punctuality and passenger comfort, and achieves the expected effect.

Claims

1. A train speed curve prediction method based on BP network with improved particle swarm, comprising the following steps: Step 1: Using the principal hierarchy analysis method, determine the key influencing factors among the existing factors affecting the train speed curve, including interval running time, interval length, interval curve value, interval slope value, interval ATP speed limit value, train weight and interval passenger flow; Step 2: According to the key influencing factors in step 1, determine the network input and network output of the BP neural network prediction model of the improved particle swarm algorithm, and use the empirical formula Determine the hidden layer of the network model, α is a number between 0 and 10; Step 3: Select key influencing factors to make sample data sets and test data sets, and establish a BP neural network model of improved particle swarm algorithm for comprehensive prediction of urban rail train ATO speed curve; Step 4: Initialize the position of each particle, use the neural network weight and threshold as the particle position latitude value, and normalize the sample data set and test data set in step 3; Step 5: Input the normalized sample data set in step 4 into the neural network model, calculate the current fitness function value of the current particle by calculating to the output layer; Step 6: Determine whether the fitness value of the initial particle meets the requirements for stopping the iteration. If it does, stop the iteration. If not, update the position and speed of the particle. Calculate the position of the local optimal particle and the position of the global optimal particle, save the position of the global optimal particle, and assign the position dimension value to the corresponding BP neural network parameter w, b. Step 7: Use the BP neural network model of the improved particle swarm algorithm in steps 5 and 6 to predict the ATO speed curve of urban rail trains; Step 8: Denormalize the predicted value outputted in step 7 to obtain the speed value of the ATO system of the urban rail train; The key factors affecting the determination of the train ATO speed curve described in step 1 are as follows: Step 1.1: The existing factors affecting the train speed curve, including interval running time, interval length, interval curve value, interval slope value, interval ATP speed limit value, train weight and interval passenger flow, are combined into a 7-column matrix X = {X i (k)|k=1,2,...,n},i=1,2,...7; where X is the influencing factor value X of type number i i (k), k is the number of the influencing factor, n is the capacity of the sample of the influencing factor value, and i is the number of the influencing factor type; Step 1.2: Zero the mean of each row of X, that is, subtract the mean of this row: x i (k)=X i (k)-μ i Among them, x i (k) is the result of zero-meaning the value of the influencing factor numbered i; Step 1.3: Calculate the covariance matrix C of matrix X: C is a symmetric matrix whose diagonals correspond to the variances of the variables, and the elements in the i-th row and j-th column are the same as those in the j-th row and i-th column, indicating the covariance of the two variables i and j. i represents the i-th row of matrix X, b j Represents the matrix X T The jth column of Step 1.4: Find the eigenvalues ​​and eigenvectors of the covariance matrix C: Using the formula Cx = λx, where x is the eigenvector and λ is the eigenvalue, we can get the characteristic polynomial of the matrix C. Solving the characteristic polynomial can get the eigenvalue λ of the matrix C. i With the eigenvector x i ; Then the covariance matrix C is: Where Λ is a diagonal matrix, and its diagonal elements are the eigenvalues ​​corresponding to each eigenvector; E represents the matrix composed of all eigenvectors; Step 1.5: From step 1.4, we know that P is the matrix of the eigenvectors of the covariance matrix arranged in rows after normalization, that is, P = E T , where each row is an eigenvector of C; if P is arranged from top to bottom according to the eigenvalues ​​in Λ from large to small, then the matrix composed of the first K rows of P is multiplied by the original data matrix X to obtain the reduced-dimensional data matrix Y, and the key factors affecting the train ATO speed curve are screened out; The improved particle BP network prediction model structure described in step 2 includes a three-layer structure, namely an input layer, a hidden layer and an output layer, and the number of layers of each layer is 1, 2, and 1 respectively; the input of the BP neural network model of the improved particle swarm algorithm includes the running time of the interval, the length of the interval, the ramp value, the curve value, and the passenger flow of each interval; the output of the BP neural network model of the improved particle swarm algorithm includes the speed value of the train ATO system.

2. The train speed curve prediction method based on the improved particle swarm BP network according to claim 1 is characterized in that: In step 3, the hidden layer structure of the BP neural network prediction model of the improved particle swarm algorithm is determined, and the number of hidden layer nodes is pre-set to m. The number of nodes can be gradually increased to compare the error.

3. The train speed curve prediction method based on the improved particle swarm BP network according to claim 1 is characterized in that: In step 4, the network parameters of the BP network model of the improved particle swarm are initialized using Xavier, as follows: Xavier initialization: The variance of the activation values ​​and state gradients of each layer remains consistent during the propagation process, that is: In the formula, Var(h i ) represents the variance of the activation value of the i-th layer, Var(h j ) represents the variance of the activation value of the jth layer, represents the variance of the state gradient of the i-th layer, Represents the variance of the state gradient of the jth layer; Step 4 normalizes the sample data set in step 3, as follows: Wherein, N represents the input vector obtained after normalization; min p represents the minimum value of each column vector of the input vector P; maxp represents the maximum value of each column vector of the input vector P.

4. The train speed curve prediction method based on the improved particle swarm BP network according to claim 1 is characterized in that: The current fitness function value of the current particle is calculated as described in step 5, as follows: Where Y ij represents the actual output of the model, D ij represents the expected output of the model, and N represents the number of particles.

5. The train speed curve prediction method based on the improved particle swarm BP network according to claim 1 is characterized in that: The position X of the particle in step 6 id and speed V id The update calculation is as follows: V id =ωV id +C1random(0,1)(P id -X id )+C2random(0,1)(P gd -X id ) X id =X id +V id In the formula, ω is called the inertia factor and its value is non-negative, C1 and C2 are called acceleration constants. The former is the individual learning factor of each particle, and the latter is the social learning factor of each particle; random(0,1) represents a random number in the interval [0,1], P id represents the dth dimension of the individual extreme value of the ith variable, P gd represents the dth dimension of the global optimal solution.

6. The train speed curve prediction method based on the improved particle swarm BP network according to claim 1 is characterized in that: Step 7 uses the BP neural network model of the improved particle swarm algorithm in steps 5 and 6 to predict the ATO speed curve of the urban rail train, as follows: Re-produce the prediction sample data set, use the prepared data set as the input of the BP neural network of the improved particle swarm algorithm, predict the network output vector after the network input vector is changed, and calculate it through the anti-normalization method to obtain the ATO speed value of the urban rail train; The data predicted in step 7 needs to be denormalized by the formula to obtain the speed value of the relevant step 8. The specific method is as follows: Wherein, R represents the input vector obtained after normalization; min p represents the minimum value of each column vector of the input vector P; maxp represents the maximum value of each column vector of the input vector P.

Citation Information

Patent Citations

  • Subway train ATO speed curve prediction method based on BP neural network

    CN113326962A