Vehicle parameter estimation method based on BP neural network and improved unscented Kalman filter
By combining the BP neural network and the improved unscented Kalman filter, and using Monte Carlo importance sampling and adaptive noise reduction methods, the prediction error problem of the Kalman filter in a non-Gaussian noise environment is solved, and vehicle parameter estimation is improved. The robustness and adaptability achieve higher prediction accuracy and stability.
Patent Information
- Application Number
- CN202410951157.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-07-16
AI Technical Summary
The existing Kalman filter assumes Gaussian distribution in vehicle parameter estimation, resulting in large prediction errors in non-Gaussian noise environments, and cannot effectively handle the nonlinear motion characteristics of the vehicle under conditions such as tire sideslip and braking.
A hybrid model based on BP neural network and improved unscented Kalman filter is used to achieve bidirectional optimization through Monte Carlo importance sampling and adaptive noise reduction methods, combined with the residuals of the real values and estimated values of the BP neural network fitting parameters. to improve estimation accuracy and stability.
It improves the robustness and adaptability of vehicle parameter estimation, can effectively handle nonlinear and non-Gaussian distributed noise, and improves the prediction accuracy and stability under complex vehicle motion conditions.
Smart Images

Figure CN118798050A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of automobile dynamics control, and specifically refers to a parameter estimation method based on BP neural network and improved unscented Kalman filter. Background Art
[0002] The sideslip angle and yaw rate of the center of mass play a role in evaluating and adjusting the posture and stability of the vehicle in vehicle stability control. By monitoring these parameters, corresponding measures can be taken to improve the stability and maneuverability of the vehicle, thereby improving driving safety and driving comfort. In actual production, the relevant commercial sensors have high accuracy, but are expensive and cannot be installed on vehicles. Therefore, parameter estimation methods are needed to predict and estimate the relevant variables.
[0003] Kalman filter (KF) is suitable for state estimation and filtering of linear systems. It predicts and updates based on Gaussian distribution, and assumes that process noise and observation noise are Gaussian noise to optimally estimate the state of the system. Extended Kalman filter (EKF) is an improvement on Kalman filter. It approximates nonlinear systems by performing Taylor series expansion on nonlinear functions to achieve system linearization estimation. In the process, the first-order Taylor series expansion ignores high-order terms, which leads to low estimation accuracy and poor applicability for highly nonlinear problems. Unscented Kalman filter (UKF) is based on unscented transformation. This method studies how to capture the posterior distribution of high random variables that have undergone nonlinear transformation through certain sampling points. The computational complexity of standard UKF is comparable to that of EKF, but the filtering accuracy is better than that of EKF.
[0004] Back propagation neural network (BP neural network for short) is a multi-layer feedforward network trained by error back propagation (error back propagation for short). Its algorithm is called BP algorithm. Its basic idea is gradient descent method, which uses gradient search technology to minimize the mean square error between the actual output value and the expected output value of the network.
[0005] At present, the research on vehicle parameter estimation such as the center of mass sideslip angle is mainly focused on how to improve the robustness and accuracy of the algorithm. For example, the Chinese invention patent application number CN201810227343.X, the patent name is "Center of mass sideslip angle estimation method and system based on robust unscented Kalman filter", which combines the M estimation algorithm with the UKF algorithm to reduce the influence of outliers, thereby improving the robustness of the filter algorithm to outliers in the observation signal; the application number CN202211200764.6, the patent name is "A vehicle state estimation method and system combining neural network and unscented Kalman filter", which uses multiple vehicle sensors to collect data, establishes a neural network and combines unscented Kalman filter to accurately estimate three-dimensional acceleration and three-dimensional angular velocity, so as to achieve accurate estimation of the vehicle's 3D posture, speed and positioning.
[0006] Although there are many studies on parameter estimation in Kalman filtering, it is not difficult to find that in many practical problems, the variables are usually studied with Gaussian assumptions. However, it has been proven that there are often working conditions such as tire side slip and braking. At this time, the vehicle's motion characteristics may show non-Gaussian distribution characteristics. At this time, if the Gaussian model is used for prediction, estimation errors will be introduced, thereby reducing the prediction accuracy. It can be seen that in the process of designing Kalman filters, it is of great practical significance to consider the model differences in specific vehicle driving conditions. Summary of the invention
[0007] In view of the deficiencies of the above-mentioned prior art, the purpose of the present invention is to provide a vehicle parameter estimation method based on a BP neural network and an improved unscented Kalman filter hybrid model, so as to solve the problem of large prediction errors caused by the Gaussian assumption of parameters in the unscented Kalman filter in the prior art and changes in working conditions; the present invention combines the situation that the vehicle parameter characteristics such as tire sideslip and braking are non-Gaussian distribution and the vehicle is in a non-Gaussian white noise working environment, adopts a Monte Carlo importance sampling strategy and an adaptive noise reduction method to improve the prediction effect of the existing unscented Kalman filter on vehicle parameters, outputs the unscented Kalman filter prediction value, and simultaneously uses the BP neural network to fit the residual of the true value and the estimated value of the parameter, combines the predicted value with the optimized residual to achieve a two-way optimization effect, thereby improving the accuracy and stability of parameter estimation.
[0008] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0009] The vehicle parameter estimation method based on BP neural network and improved unscented Kalman filter of the present invention comprises the following steps:
[0010] 1) Establish a three-degree-of-freedom vehicle dynamics model, and determine the state equation and observation equation of the unscented Kalman filter based on the three-degree-of-freedom vehicle dynamics model;
[0011] 2) determining the input quantity, state quantity and observation quantity of the unscented Kalman filter according to the dynamic model in step 1);
[0012] 3) Combining the Monte Carlo sampling method and the adaptive weight allocation formula, the unscented Kalman filter is improved to obtain the state estimation result of the improved unscented Kalman filter
[0013] 4) Collect the true value of the center of mass sideslip angle β during vehicle driving under different working conditions a and the true value of the yaw rate γ a The front wheel angle and longitudinal acceleration of the vehicle are used as training inputs, and the residual value Δx between the state quantity estimation result in step 3) and the true value of the sensor is obtained through BP neural network training and fitting. k ;
[0014] 5) The state estimation result obtained in step 3) and the residual value Δx obtained in step 4) are k As the actual output of the vehicle parameter prediction model
[0015] Furthermore, the motion equation of the three-degree-of-freedom vehicle dynamics model in step 1) is:
[0016]
[0017] in, is the first-order derivative of the vehicle's center of mass sideslip angle, is the first-order derivative of the vehicle’s yaw rate, is the first-order derivative of the vehicle's longitudinal speed, β is the vehicle's center of mass sideslip angle, γ is the vehicle's yaw rate, and v x is the longitudinal speed of the vehicle, k1 and k2 are the cornering stiffness of the front wheel and the rear wheel respectively, m is the mass of the vehicle, a and b are the distances from the center of mass to the front and rear axles of the vehicle respectively, δ f is the front wheel turning angle, I z is the moment of inertia of the vehicle around the z axis, a x is the vehicle longitudinal acceleration.
[0018] Furthermore, the state equation and observation equation of the unscented Kalman filter in step 1) are:
[0019]
[0020] The subscript k indicates the kth moment, k-1 indicates the k-1th moment, and x k|k-1 represents the state quantity at time k, z k|k-1 is the observed value at time k, w k-1~(0,Q) is a Gaussian white noise with zero mean and covariance Q, v k-1 ~(0,R) is Gaussian white noise with zero mean and covariance R.
[0021] Further, the step 2) specifically includes: selecting the front wheel steering angle and the vehicle longitudinal acceleration [δ f ,a x ] is the input quantity; the sideslip angle of the center of mass, the yaw rate and the longitudinal speed β,ω r ,v x is the state quantity; lateral acceleration and yaw angular velocity a y ,ω r is the observed quantity.
[0022] Furthermore, the improvement of the unscented Kalman filter in step 3) specifically includes:
[0023] 31) Filter initialization:
[0024] When k = 0, based on the initial state variables, a particle set is generated in the initial distribution prior probability density p(x0) = N(x0, P0) P0 is the initial covariance matrix, and each particle is assigned an equal weight of 1 / N, where N is the number of particles;
[0025] When k>0, the particle set at the previous moment is updated through the state equation and observation equation of the unscented Kalman filter in step 1) to obtain a new particle set at the current moment, and then the updated particle set is used to approximate the posterior probability distribution at the current moment, and the probability distribution of k at the current moment is described in the form of a weighted sum of particles, which specifically includes: selecting an importance density function, generating predicted particles by importance sampling, calculating the weights of particles and normalizing them, judging whether resampling is needed, and outputting the state estimation result;
[0026] 32) Introduce the importance density function and calculate the importance weight of each particle. Let the importance density function be:
[0027]
[0028] in, is the importance density function of the ith particle;
[0029] Generate prediction particles by importance sampling, and sample the prediction particles required for particle filtering from the importance density function:
[0030]
[0031] in, is the state value of the current particle, is the particle state sequence of the i-th particle from time 0 to k-1, z 1:k is the observation sequence from time 1 to k, and the importance density function is set to be a normal distribution are the mean and variance of the normal distribution respectively; Assume that the initial weights of all particles are N is the total number of particles; the particle state at the previous time k-1 is used to predict the particle state at the current time k; during the prediction process, the prediction importance density function is used Sample the particle state to obtain the observation data at time k, and update the weight of each particle according to the conditional probability density of the observation data and state data. The weight update formula is as follows:
[0032]
[0033] in, For the observed quantity In the particles The likelihood function under the condition indicates the matching degree between the observed data and the particle state. is the likelihood function of the state quantity at time k under the condition of the state quantity at time k-1, indicating the matching degree of the particle state at the previous and next moments;
[0034] The importance weight obtained by formula (5) is normalized as follows:
[0035]
[0036] in, is the state quantity of the ith particle at time k, are the mean and covariance of the reference distribution of the importance density function, is the importance weight of the ith particle at time k, is the normalized importance weight of the ith particle at time k;
[0037] 33) Set the threshold N t =N / 3, determine the number of effective particles N e :
[0038]
[0039] in, is the normalized importance weight of the ith particle at time k;
[0040] According to the set threshold, determine whether the statistics of the sample points are within the threshold range; for sample points that are not within the threshold range, resample and regenerate sample points until the threshold condition is met;
[0041] Resampling generally requires constructing a cumulative distribution function to generate a random index for each particle. The construction formula is as follows:
[0042]
[0043] Where F(i) is the i-th term of the cumulative distribution function, is the normalized weight of all particles in the ith item;
[0044] For each new particle, generate a uniform random number u in the range [0,1] i , find the cumulative distribution function that satisfies F(i-1)<u i < index i of F(i), and then take the particle with index i in the original particle set as the new particle;
[0045] After resampling, the weights of all particles are reset to 1 / N to ensure that each particle has the same importance in the next prediction and update step;
[0046] 34) Predict the weighted sum of the particle set and output the state estimate. The formula is as follows:
[0047]
[0048] in, are weighted estimators of the state variables respectively.
[0049] Furthermore, in the step 31), when k>0, the specific steps include:
[0050] 311) Use unscented Kalman filtering to generate the importance density function for each particle and construct the 2n+1 Sigma point sampling distribution χ for each particle i And the weight distribution formula is:
[0051]
[0052] Where n is the dimension of the state quantity; λ is the scaling factor, λ = α 2 (n+κ)-n, α is a small positive value, which determines the distribution state of the Sigma point; δ is a non-negative weight coefficient, which can combine the dynamic errors of high-order terms in the equation. is the state quantity of the i-th Sigma point at time k-1, is the covariance of the i-th Sigma at time k-1, is the weight distribution coefficient when it is approximately the mean, is the weight distribution coefficient of the approximate covariance;
[0053] κ∈R, characterizes the dispersion of Sigma points relative to the mean, R is a real number, the larger κ is, the farther the Sigma points at non-mean locations are from the mean, and the smaller their weights are; for Gaussian problems, κ=3-n; for non-Gaussian problems, introduce adaptive parameters c,ε, and κ=c(n+ε). If the state distribution is highly non-Gaussian, increase the value of c to increase the number of Sigma points; if the state distribution is highly Gaussian, decrease the value of c to reduce the number of Sigma points.
[0054] 312) Weighted calculation of state quantity at time k The prior distribution of is as follows:
[0055]
[0056] in, is the prior estimate of the state quantity at time k, is the state quantity at time k, is the prior estimate of the covariance of the state quantity at time k, are the weights of the mean and covariance of the state quantity of each Sigma point, is the variance of the system noise at time k;
[0057] 313) For the state quantity at time k The prior distribution of Sigma points is sampled and the observed quantity is The probability distribution of is as follows:
[0058]
[0059] in, is the prior estimate of the state quantity at time k, is the prior estimate of the covariance of the state quantity at time k, is the Gaussian white noise with zero mean and covariance R of the observed quantity, is the weight distribution coefficient of the approximate mean, 2n is the number of Sigma points, is the observed quantity at time k, is the weighted mean of the observations at time k;
[0060] 314) Calculate the mutual covariance between the state quantity and the observation quantity and the autocovariance of the observation quantity as follows:
[0061]
[0062] in, is the prior estimate of the state quantity at time k, is the state quantity at time k, is the cross-covariance of observations, is the observed autocovariance, is the weight distribution coefficient of the approximate mean square error, is the observed quantity at time k, is the weighted mean of the observations at time k, is the variance of the observation noise;
[0063] 315) Calculate the state quantity posterior estimate, Kalman gain and corresponding update steps at time k as follows:
[0064]
[0065] Among them, K i is the Kalman gain of the i-th Sigma point, is the cross-covariance of observations, is the observed autocovariance, is the mean value of the state quantity at time k,
[0066] is the prior estimate of the state quantity at time k, z k is the value of the observation at time k, is the weighted mean of the observations at time k, is the estimated value of the covariance of the state quantity at time k.
[0067] Furthermore, the step 4) specifically includes:
[0068] 41) Determine the network topology and select a single hidden layer topology. There are two types of signal transmission between different layers: one is the working signal, which is the actual required signal output by the output layer after multiple external input signals pass through the hidden layer; the other is the error signal, which is the difference between the actual output signal and the predicted output signal in the BP neural network. It starts from the output layer and propagates backward layer by layer. There is no connection between the same layers.
[0069] 42) Determine the Sigmond function to limit the range of neuron output and integrate the infinite range of possible output into the allowed output range. The Sigmond function expression is as follows:
[0070]
[0071] Among them, x is the input feature variable of the hidden layer or output layer, and e is the logarithmic function;
[0072] 43) The working signal is forward propagated. The specific process is as follows: the BP neural network receives the input signal, the signal is converted by the Sigmond function after weighted summation, and then processed by the hidden layer to reach the output layer; the number of neurons in the output layer matches the number of targets in the problem; the output layer targets are the vehicle's center of mass sideslip angle and yaw rate;
[0073] The output of the i-th node in the input layer is x i ;
[0074] The input of the jth node in the hidden layer is NET j :
[0075]
[0076] The output of the jth node in the hidden layer is y j :
[0077]
[0078] The input of the kth node in the output layer is NET k :
[0079]
[0080] The output of the kth node in the output layer is y k :
[0081]
[0082] Among them, w ij is the connection weight between the i-th node in the input layer and the j-th node in the hidden layer, b j is the threshold of the jth node in the hidden layer, p is the number of nodes in the hidden layer, and w jk is the connection weight between the jth node in the hidden layer and the kth node in the output layer, ξ k is the threshold at the kth node of the output layer, and s is the number of nodes in the output layer;
[0083] 44) Back propagation of error signal: Calculate the error between the actual output of BP neural network data and the expected output of sample data, and adjust the weights and thresholds of different layers according to the gradient descent method to make the modified neural network close to the expected output value;
[0084] For back propagation, the total error E between the BP neural network prediction value and the true value is set to:
[0085]
[0086] in, is the actual output of the network, for The corresponding expected output;
[0087] 45) looping and iterating step 43) to step 44), gradually reducing the calculation error until the error reaches the set target error or the number of loop iterations reaches the set maximum number;
[0088] 46) Obtaining optimal weights and thresholds;
[0089] 47) Fitting the vehicle parameter error: Use sensors to collect and calculate the vehicle center of mass side slip angle β a and the expected value of the yaw rate γ a , the front wheel steering angle and longitudinal acceleration are used as the BP neural network input layer parameters, and the center of mass side slip angle β is obtained through the forward propagation process of the working signal in the above step 43). k and the predicted value of the yaw rate γ k After calculating the error between the predicted value and the expected value, the error is back-propagated according to the gradient descent method according to step 44, and the weights and thresholds between the layers are continuously corrected to obtain the optimal residual value output Δx k =[Δβ k Δγ k ].
[0090] Furthermore, the step 44) specifically includes two processes: the error is fed back from the output layer to the hidden layer and from the hidden layer to the input layer;
[0091] 441) The error between the predicted value and the expected value of the BP neural network is fed back from the output layer to the hidden layer, and the weights and thresholds between the output layer and the hidden layer are adjusted accordingly;
[0092] Weight w jk Correction value Δw of (n) jk The expression of (n) is:
[0093]
[0094] Threshold ξ k The correction value Δξ of (n) k (n) is expressed as:
[0095]
[0096] because:
[0097]
[0098] Arranging the above formulas (23)-(27) yields:
[0099]
[0100] The adjusted weight w jk (n+1) is expressed as:
[0101] w jk (n+1)=w jk (n)+Δw jk (n) (29)
[0102] Adjusted threshold ξ k(n+1) is expressed as:
[0103] ξ k (n+1)=ξ k (n)+Δξ k (n) (30)
[0104] Among them, η is the learning efficiency, n is the number of back propagation times, P is the number of hidden layer nodes, S is the number of output layer nodes, and w jk (n+1) is the connection weight between the jth node in the n+1th hidden layer and the kth node in the output layer, ξ k (n+1) is the threshold value of the kth node in the n+1th output layer, f2'(NET k ) is the conversion function between the input value of the hidden layer and the kth node of the output layer, NET k is the input of the kth node in the output layer, y j is the output of the jth node in the hidden layer, is the actual output of the BP neural network, for The corresponding expected output;
[0105] 442) Correct the correction weight and correction threshold from the hidden layer to the input layer;
[0106] The weight correction value Δw between the input layer and the hidden layer ij The expression of (n) is:
[0107]
[0108] Threshold b j Correction value Δb of (n) j (n) is:
[0109]
[0110] because:
[0111]
[0112] The corresponding weight and threshold update process is:
[0113]
[0114] Among them, η is the learning efficiency, n is the number of back propagation times, P is the number of hidden layer nodes, S is the number of output layer nodes, and w ij (n+1) is the connection weight between the jth node in the n+1th hidden layer and the ith node in the input layer, b j (n+1) is the threshold value at the jth node of the n+1th hidden layer, f1'(NET j) is the conversion function between the input layer and the input value of the jth node in the hidden layer, NET j is the input of the jth node in the hidden layer, y j (n) is the output of the jth node in the nth hidden layer, is the actual output of the network, for The corresponding expected output.
[0115] Beneficial effects of the present invention:
[0116] The present invention adopts an improved unscented particle filter to predict and estimate vehicle dynamics parameters, and uses vehicle state parameters to build a BP neural network fitting residual, which to some extent makes up for the defect that the current high-precision vehicle parameter sensor cannot be installed on the vehicle; its advantages are as follows:
[0117] 1. Robustness: The improved unscented Kalman filter can handle nonlinear and non-Gaussian noise, which is critical for the complexity and uncertainty in vehicle motion and perception. Using the BP neural network to fit the residual can further improve the robustness of the filter and enhance its adaptability to noise and nonlinearity.
[0118] 2. Adaptability: The improved unscented Kalman filter in the present invention introduces an adaptive parameter c to adjust the weight distribution of sigma points under nonlinear distribution conditions. The BP neural network can also automatically adjust the weights and biases to fit the residuals in the best way; it enables adaptation under different vehicle and environmental conditions and improves the accuracy and stability of the estimation.
[0119] 3. The estimation method of the present invention can be applied to various vehicle parameter estimations, such as stiffness parameter estimation and tire parameter estimation, and has high market value and practical significance. BRIEF DESCRIPTION OF THE DRAWINGS
[0120] Figure 1 It is a flow chart of the estimation method of the present invention;
[0121] Figure 2 Improved unscented Kalman filter flow chart for the present invention;
[0122] Figure 3 This is the principle block diagram of BP neural network. DETAILED DESCRIPTION
[0123] In order to facilitate the understanding of those skilled in the art, the present invention is further described below in conjunction with embodiments and drawings. The contents mentioned in the implementation modes are not intended to limit the present invention.
[0124] Reference Figure 1-Figure 3As shown, a vehicle parameter estimation method based on BP neural network and improved unscented Kalman filter of the present invention comprises the following steps:
[0125] 1) Establish a three-degree-of-freedom vehicle dynamics model, and determine the state equation and observation equation of the unscented Kalman filter based on the three-degree-of-freedom vehicle dynamics model;
[0126] The motion equation of the three-degree-of-freedom vehicle dynamics model in step 1) is:
[0127]
[0128] in, is the first-order derivative of the vehicle's center of mass sideslip angle, is the first-order derivative of the vehicle’s yaw rate, is the first-order derivative of the vehicle's longitudinal speed, β is the vehicle's center of mass sideslip angle, γ is the vehicle's yaw rate, and v x is the longitudinal speed of the vehicle, k1 and k2 are the cornering stiffness of the front wheel and the rear wheel respectively, m is the mass of the vehicle, a and b are the distances from the center of mass to the front and rear axles of the vehicle respectively, δ f is the front wheel turning angle, I z is the moment of inertia of the vehicle around the z axis, a x is the vehicle longitudinal acceleration.
[0129] Wherein, the state equation and observation equation of the unscented Kalman filter described in step 1) are:
[0130]
[0131] The subscript k indicates the kth moment, k-1 indicates the k-1th moment, and x k|k-1 represents the state quantity at time k, z k|k-1 is the observed value at time k, w k-1 ~(0,Q) is a Gaussian white noise with zero mean and covariance Q, v k-1 ~(0,R) is Gaussian white noise with zero mean and covariance R.
[0132] 2) determining the input quantity, state quantity and observation quantity of the unscented Kalman filter according to the dynamic model in step 1);
[0133] Wherein, the step 2) specifically includes: selecting the front wheel steering angle and the vehicle longitudinal acceleration [δ f ,a x ] is the input quantity; the sideslip angle of the center of mass, the yaw rate and the longitudinal speed β,ω r ,v x is the state quantity; lateral acceleration and yaw angular velocity a y ,ωr is the observed quantity.
[0134] 3) Combining the Monte Carlo sampling method and the adaptive weight allocation formula, the unscented Kalman filter is improved to obtain the state estimation result of the improved unscented Kalman filter
[0135] The improvement of the unscented Kalman filter in step 3) specifically includes:
[0136] 31) Filter initialization:
[0137] When k = 0, based on the initial state variables, a particle set is generated in the initial distribution prior probability density p(x0) = N(x0, P0) P0 is the initial covariance matrix, and each particle is assigned an equal weight of 1 / N, where N is the number of particles;
[0138] When k>0, the particle set at the previous moment is updated through the state equation and observation equation of the unscented Kalman filter in step 1) to obtain a new particle set at the current moment, and then the updated particle set is used to approximate the posterior probability distribution at the current moment, and the probability distribution of k at the current moment is described in the form of a weighted sum of particles, which specifically includes: selecting an importance density function, generating predicted particles by importance sampling, calculating the weights of particles and normalizing them, judging whether resampling is needed, and outputting the state estimation result;
[0139] Specifically, in step 31), when k>0, the specific steps include:
[0140] 311) Use unscented Kalman filtering to generate the importance density function for each particle and construct the 2n+1 Sigma point sampling distribution χ for each particle i And the weight distribution formula is:
[0141]
[0142] Where n is the dimension of the state quantity; λ is the scaling factor, λ = α 2 (n+κ)-n, α is a small positive value, which determines the distribution state of the Sigma point; δ is a non-negative weight coefficient, which can combine the dynamic errors of high-order terms in the equation. is the state quantity of the i-th Sigma point at time k-1, is the covariance of the i-th Sigma at time k-1, is the weight distribution coefficient when it is approximately the mean, is the weight distribution coefficient of the approximate covariance;
[0143] κ∈R, characterizes the dispersion of Sigma points relative to the mean, R is a real number, the larger κ is, the farther the Sigma points at non-mean locations are from the mean, and the smaller their weights are; for Gaussian problems, κ=3-n; for non-Gaussian problems, introduce adaptive parameters c,ε, and κ=c(n+ε). If the state distribution is highly non-Gaussian, increase the value of c to increase the number of Sigma points; if the state distribution is highly Gaussian, decrease the value of c to reduce the number of Sigma points.
[0144] 312) Weighted calculation of state quantity at time k The prior distribution of is as follows:
[0145]
[0146] in, is the prior estimate of the state quantity at time k, is the state quantity at time k,
[0147] is the prior estimate of the covariance of the state quantity at time k, are the weights of the mean and covariance of the state quantity of each Sigma point, is the variance of the system noise at time k;
[0148] 313) For the state quantity at time k The prior distribution of Sigma points is sampled and the observed quantity is The probability distribution of is as follows:
[0149]
[0150] in, is the prior estimate of the state quantity at time k, is the prior estimate of the covariance of the state quantity at time k, is the Gaussian white noise with zero mean and covariance R of the observed quantity, is the weight distribution coefficient of the approximate mean, 2n is the number of Sigma points, is the observed quantity at time k, is the weighted mean of the observations at time k;
[0151] 314) Calculate the mutual covariance between the state quantity and the observation quantity and the autocovariance of the observation quantity as follows:
[0152]
[0153] in, is the prior estimate of the state quantity at time k, is the state quantity at time k, is the cross-covariance of observations, is the observed autocovariance, is the weight distribution coefficient of the approximate mean square error, is the observed quantity at time k, is the weighted mean of the observations at time k, is the variance of the observation noise;
[0154] 315) Calculate the state quantity posterior estimate, Kalman gain and corresponding update steps at time k as follows:
[0155]
[0156] Among them, K i is the Kalman gain of the i-th Sigma point, is the cross-covariance of observations, is the observed autocovariance, is the mean value of the state quantity at time k,
[0157] is the prior estimate of the state quantity at time k, z k is the value of the observation at time k, is the weighted mean of the observations at time k, is the estimated value of the covariance of the state quantity at time k.
[0158] 32) Introduce the importance density function and calculate the importance weight of each particle. Let the importance density function (reference distribution) be:
[0159]
[0160] in, is the importance density function of the ith particle;
[0161] Generate prediction particles by importance sampling, and sample the prediction particles required for particle filtering from the importance density function:
[0162]
[0163] in, is the state value of the current particle, is the particle state sequence of the i-th particle from time 0 to k-1, z 1:k is the observation sequence from time 1 to k, and the importance density function is set to be a normal distribution are the mean and variance of the normal distribution respectively; Assume that the initial weights of all particles are N is the total number of particles; the particle state at the previous time k-1 is used to predict the particle state at the current time k; during the prediction process, the prediction importance density function is used Sample the particle state to obtain the observation data at time k, and update the weight of each particle according to the conditional probability density of the observation data and state data. The weight update formula is as follows:
[0164]
[0165] in, For the observed quantity In the particles The likelihood function under the condition indicates the matching degree between the observed data and the particle state. is the likelihood function of the state quantity at time k under the condition of the state quantity at time k-1, indicating the matching degree of the particle state at the previous and next moments;
[0166] The importance weight obtained by formula (12) is normalized as follows:
[0167]
[0168] in, is the state quantity of the ith particle at time k, are the mean and covariance of the reference distribution of the importance density function, is the importance weight of the ith particle at time k, is the normalized importance weight of the ith particle at time k;
[0169] 33) Set the threshold N t =N / 3, determine the number of effective particles N e :
[0170]
[0171] in, is the normalized importance weight of the ith particle at time k;
[0172] According to the set threshold, determine whether the statistics of the sample points are within the threshold range; for sample points that are not within the threshold range, resample and regenerate sample points until the threshold condition is met;
[0173] Resampling generally requires constructing a cumulative distribution function to generate a random index for each particle. The construction formula is as follows:
[0174]
[0175] Where F(i) is the i-th term of the cumulative distribution function, is the normalized weight of all particles in the ith item;
[0176] For each new particle, generate a uniform random number u in the range [0,1] i, find the cumulative distribution function that satisfies F(i-1)<u i < index i of F(i), and then take the particle with index i in the original particle set as the new particle;
[0177] After resampling, the weights of all particles are reset to 1 / N to ensure that each particle has the same importance in the next prediction and update step;
[0178] 34) Predict the weighted sum of the particle set and output the state estimate. The formula is as follows:
[0179]
[0180] in, are weighted estimators of the state variables respectively.
[0181] 4) Collect the true value of the center of mass sideslip angle β during vehicle driving under different working conditions a and the true value of the yaw rate γ a The front wheel angle and longitudinal acceleration of the vehicle are used as training inputs, and the residual value Δx between the state quantity estimation result in step 3) and the true value of the sensor is obtained through BP neural network training and fitting. k ;
[0182] Wherein, the step 4) specifically includes:
[0183] 41) Determine the network topology (input layer-hidden layer-output layer), select a single hidden layer topology, and there are two types of signal transmission between different layers: one is the working signal, which is the actual required signal output by the output layer after multiple external input signals pass through the hidden layer; the other is the error signal, which is the difference between the actual output signal and the predicted output signal in the BP neural network, and the process of reverse propagation from the output layer to each layer, and there is no mutual connection between the same layers;
[0184] 42) Determine the Sigmond function to limit the range of neuron output and integrate the infinite range of possible output into the allowed output range. The Sigmond function expression is as follows:
[0185]
[0186] Among them, x is the input feature variable of the hidden layer or output layer, and e is the logarithmic function;
[0187] 43) The working signal is forward propagated. The specific process is as follows: the BP neural network receives the input signal, the signal is converted by the Sigmond function after weighted summation, and then processed by the hidden layer to reach the output layer; the number of neurons in the output layer matches the number of targets in the problem; the output layer targets are the vehicle's center of mass sideslip angle and yaw rate;
[0188] The output of the i-th node in the input layer is x i ;
[0189] The input of the jth node in the hidden layer is NET j :
[0190]
[0191] The output of the jth node in the hidden layer is y j :
[0192]
[0193] The input of the kth node in the output layer is NET k :
[0194]
[0195] The output of the kth node in the output layer is y k :
[0196]
[0197] Among them, w ij is the connection weight between the i-th node in the input layer and the j-th node in the hidden layer, b j is the threshold of the jth node in the hidden layer, p is the number of nodes in the hidden layer, and w jk is the connection weight between the jth node in the hidden layer and the kth node in the output layer, ξ k is the threshold at the kth node of the output layer, and s is the number of nodes in the output layer;
[0198] 44) Back propagation of error signal: Calculate the error between the actual output of BP neural network data and the expected output of sample data, and adjust the weights and thresholds of different layers according to the gradient descent method to make the modified neural network close to the expected output value;
[0199] For back propagation, the total error E between the BP neural network prediction value and the true value is set to:
[0200]
[0201] in, is the actual output of the network, for The corresponding expected output;
[0202] 45) looping and iterating step 43) to step 44), gradually reducing the calculation error until the error reaches the set target error or the number of loop iterations reaches the set maximum number;
[0203] 46) Obtaining optimal weights and thresholds;
[0204] 47) Fitting the vehicle parameter error: Use sensors to collect and calculate the vehicle center of mass side slip angle β a and the expected value of the yaw rate γ a , the front wheel steering angle and longitudinal acceleration are used as the BP neural network input layer parameters, and the center of mass side slip angle β is obtained through the forward propagation process of the working signal in the above step 43). k and the predicted value of the yaw rate γ k After calculating the error between the predicted value and the expected value, the error is back-propagated according to the gradient descent method according to step 44, and the weights and thresholds between the layers are continuously corrected to obtain the optimal residual value output Δx k =[Δβ k Δγ k ].
[0205] Specifically, the step 44) specifically includes two processes: the error is fed back from the output layer to the hidden layer and from the hidden layer to the input layer;
[0206] 441) The error between the predicted value and the expected value of the BP neural network is fed back from the output layer to the hidden layer, and the weights and thresholds between the output layer and the hidden layer are adjusted accordingly;
[0207] Weight w jk Correction value Δw of (n) jk The expression of (n) is:
[0208]
[0209] Threshold ξ k The correction value Δξ of (n) k (n) is expressed as:
[0210]
[0211] because:
[0212]
[0213] Arranging the above formulas (23)-(27) yields:
[0214]
[0215] The adjusted weight w jk (n+1) is expressed as:
[0216] w jk (n+1)=w jk (n)+Δw jk (n) (29)
[0217] Adjusted threshold ξk (n+1) is expressed as:
[0218] ξ k (n+1)=ξ k (n)+Δξ k (n) (30)
[0219] Among them, η is the learning efficiency, n is the number of back propagation times, P is the number of hidden layer nodes, S is the number of output layer nodes, and w jk (n+1) is the connection weight between the jth node in the n+1th hidden layer and the kth node in the output layer, ξ k (n+1) is the threshold value of the kth node in the n+1th output layer, f2'(NET k ) is the conversion function between the input value of the hidden layer and the kth node of the output layer, NET k is the input of the kth node in the output layer, y j is the output of the jth node in the hidden layer, is the actual output of the BP neural network, for The corresponding expected output;
[0220] 442) Correct the correction weight and correction threshold from the hidden layer to the input layer;
[0221] The weight correction value Δw between the input layer and the hidden layer ij The expression of (n) is:
[0222]
[0223] Threshold b j Correction value Δb of (n) j (n) is:
[0224]
[0225] because:
[0226]
[0227] The corresponding weight and threshold update process is:
[0228]
[0229] Among them, η is the learning efficiency, n is the number of back propagation times, P is the number of hidden layer nodes, S is the number of output layer nodes, and w ij (n+1) is the connection weight between the jth node in the n+1th hidden layer and the ith node in the input layer, b j (n+1) is the threshold value at the jth node of the n+1th hidden layer, f1'(NET j) is the conversion function between the input layer and the input value of the jth node in the hidden layer, NET j is the input of the jth node in the hidden layer, y j (n) is the output of the jth node in the nth hidden layer, is the actual output of the network, for The corresponding expected output.
[0230] 5) The state estimation result obtained in step 3) and the residual value Δx obtained in step 4) are k As the actual output of the vehicle parameter prediction model
[0231] The present invention has many specific application paths. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements can be made without departing from the principle of the present invention. These improvements should also be regarded as the protection scope of the present invention.
Claims
1. A vehicle parameter estimation method based on BP neural network and improved unscented Kalman filter, It is characterized in that Here are the steps: 1) Establish a three-degree-of-freedom vehicle dynamics model, and determine the state equation and observation equation of the unscented Kalman filter based on the three-degree-of-freedom vehicle dynamics model; 2) determining the input quantity, state quantity and observation quantity of the unscented Kalman filter according to the dynamic model in step 1); 3) Combining the Monte Carlo sampling method and the adaptive weight allocation formula, the unscented Kalman filter is improved to obtain the state estimation result of the improved unscented Kalman filter 4) Collect the true value of the center of mass sideslip angle β during vehicle driving under different working conditions a and the true value of the yaw rate γ a The front wheel angle and longitudinal acceleration of the vehicle are used as training inputs, and the residual value Δx between the state quantity estimation result in step 3) and the true value of the sensor is obtained through BP neural network training and fitting. k ; 5) The state estimation result obtained in step 3) and the residual value Δx obtained in step 4) are k As the actual output of the vehicle parameter prediction model 2. The vehicle parameter estimation method based on BP neural network and improved unscented Kalman filter according to claim 1, It is characterized in that The motion equation of the three-degree-of-freedom vehicle dynamics model in step 1) is: in, is the first-order derivative of the vehicle's center of mass sideslip angle, is the first-order derivative of the vehicle’s yaw rate, is the first-order derivative of the vehicle's longitudinal speed, β is the vehicle's center of mass sideslip angle, γ is the vehicle's yaw rate, and v x is the longitudinal speed of the vehicle, k 1 , k 2 are the front wheel cornering stiffness and the rear wheel cornering stiffness respectively, m is the vehicle mass, a and b are the distances from the center of mass to the front and rear axles of the vehicle respectively, δ f is the front wheel turning angle, I z is the moment of inertia of the vehicle around the z axis, a x is the vehicle longitudinal acceleration.
3. The vehicle parameter estimation method based on BP neural network and improved unscented Kalman filter according to claim 1, It is characterized in that The state equation and observation equation of the unscented Kalman filter in step 1) are: The subscript k indicates the kth moment, k-1 indicates the k-1th moment, and x k|k-1 represents the state quantity at time k, z k|k-1 is the observed value at time k, w k-1 ~(0,Q) is a Gaussian white noise with zero mean and covariance Q, v k-1 ~(0,R) is Gaussian white noise with zero mean and covariance R.
4. The vehicle parameter estimation method based on BP neural network and improved unscented Kalman filter according to claim 1, It is characterized in that The step 2) specifically includes: selecting the front wheel steering angle and the vehicle longitudinal acceleration [δ f ,a x ] is the input quantity; the sideslip angle β and the yaw angular velocity ω r and longitudinal speed v x is the state quantity; lateral acceleration a y and yaw rate ω r is the observed quantity.
5. The vehicle parameter estimation method based on BP neural network and improved unscented Kalman filter according to claim 1, It is characterized in that The improvement of the unscented Kalman filter in step 3) specifically includes: 31) Filter initialization: When k = 0, based on the initial state variables, the initial distribution prior probability density p(x 0 )=N(x 0 ,P 0 ) generates a particle set P 0 is the initial covariance matrix, each particle is assigned the same weight 1 / N, where N is the number of particles; When k>0, the particle set at the previous moment is updated through the state equation and observation equation of the unscented Kalman filter in step 1) to obtain a new particle set at the current moment, and then the updated particle set is used to approximate the posterior probability distribution at the current moment, and the probability distribution of k at the current moment is described in the form of a weighted sum of particles, which specifically includes: selecting an importance density function, generating predicted particles by importance sampling, calculating the weights of particles and normalizing them, judging whether resampling is needed, and outputting the state estimation result; 32) Introduce the importance density function and calculate the importance weight of each particle. Let the importance density function be: in, is the importance density function of the ith particle; Generate prediction particles by importance sampling, and sample the prediction particles required for particle filtering from the importance density function: in, is the state value of the current particle, is the particle state sequence of the i-th particle from time 0 to k-1, z 1:k is the observation sequence from time 1 to k, and the importance density function is set to be a normal distribution are the mean and variance of the normal distribution respectively; Assume that the initial weights of all particles are N is the total number of particles; the particle state at the previous time k-1 is used to predict the particle state at the current time k; during the prediction process, the prediction importance density function is used Sample the particle state to obtain the observation data at time k, and update the weight of each particle according to the conditional probability density of the observation data and state data. The weight update formula is as follows: in, For the observed quantity In the particles The likelihood function under the condition indicates the matching degree between the observed data and the particle state. is the likelihood function of the state quantity at time k under the condition of the state quantity at time k-1, indicating the matching degree of the particle state at the previous and next moments; The importance weight obtained by formula (5) is normalized as follows: in, is the state of the ith particle at time k, are the mean and covariance of the reference distribution of the importance density function, is the importance weight of the ith particle at time k, is the normalized importance weight of the ith particle at time k; 33) Set the threshold N t =N / 3, determine the number of effective particles N e : in, is the normalized importance weight of the ith particle at time k; According to the set threshold, determine whether the statistics of the sample points are within the threshold range; for sample points that are not within the threshold range, resample and regenerate sample points until the threshold condition is met; Resampling generally requires constructing a cumulative distribution function to generate a random index for each particle. The construction formula is as follows: Where F(i) is the i-th term of the cumulative distribution function, is the normalized weight of all particles in the ith item; For each new particle, generate a uniform random number u in the range [0,1] i , find the cumulative distribution function that satisfies F(i-1)<u i < index i of F(i), and then take the particle with index i in the original particle set as the new particle; After resampling, the weights of all particles are reset to 1 / N to ensure that each particle has the same importance in the next prediction and update step; 34) Predict the weighted sum of the particle set and output the state estimate. The formula is as follows: in, are weighted estimators of the state variables respectively.
6. The vehicle parameter estimation method based on BP neural network and improved unscented Kalman filter according to claim 5, It is characterized in that In the step 31), when k>0, the specific steps include: 311) Use unscented Kalman filtering to generate the importance density function for each particle and construct the 2n+1 Sigma point sampling distribution χ for each particle i And the weight distribution formula is: Where n is the dimension of the state quantity; λ is the scaling factor, λ = α 2 (n+κ)-n, α is a small positive value, which determines the distribution state of the Sigma point; δ is a non-negative weight coefficient, which can combine the dynamic errors of high-order terms in the equation. is the state quantity of the i-th Sigma point at time k-1, is the covariance of the i-th Sigma at time k-1, is the weight distribution coefficient when it is approximately the mean, is the weight distribution coefficient of the approximate covariance; κ∈R, characterizes the dispersion of Sigma points relative to the mean, R is a real number, the larger κ is, the farther the Sigma points at non-mean locations are from the mean, and the smaller their weights are; for Gaussian problems, κ=3-n; for non-Gaussian problems, introduce adaptive parameters c,ε, and κ=c(n+ε). If the state distribution is highly non-Gaussian, increase the value of c to increase the number of Sigma points; if the state distribution is highly Gaussian, decrease the value of c to reduce the number of Sigma points. 312) Weighted calculation of state quantity at time k The prior distribution of is as follows: in, is the prior estimate of the state quantity at time k, is the state quantity at time k, is the prior estimate of the covariance of the state quantity at time k, are the weights of the mean and covariance of the state quantity of each Sigma point, is the variance of the system noise at time k; 313) For the state quantity at time k The prior distribution of Sigma points is sampled and the observed quantity is The probability distribution of is as follows: in, is the prior estimate of the state quantity at time k, is the prior estimate of the covariance of the state quantity at time k, is the Gaussian white noise with zero mean and covariance R of the observed quantity, is the weight distribution coefficient of the approximate mean, 2n is the number of Sigma points, is the observed quantity at time k, is the weighted mean of the observations at time k; 314) Calculate the mutual covariance between the state quantity and the observation quantity and the autocovariance of the observation quantity as follows: in, is the prior estimate of the state quantity at time k, is the state quantity at time k, is the cross-covariance of observations, is the observed autocovariance, is the weight distribution coefficient of the approximate mean square error, is the observed quantity at time k, is the weighted mean of the observations at time k, is the variance of the observation noise; 315) Calculate the state quantity posterior estimate, Kalman gain and corresponding update steps at time k as follows: Among them, K i is the Kalman gain of the i-th Sigma point, is the cross-covariance of observations, is the observed autocovariance, is the mean value of the state quantity at time k, is the prior estimate of the state quantity at time k, z k is the value of the observation at time k, is the weighted mean of the observations at time k, is the estimated value of the covariance of the state quantity at time k.
7. The vehicle parameter estimation method based on BP neural network and improved unscented Kalman filter according to claim 1, It is characterized in that The step 4) specifically includes: 41) Determine the network topology and select a single hidden layer topology. There are two types of signal transmission between different layers: one is the working signal, which is the actual required signal output by the output layer after multiple external input signals pass through the hidden layer; the other is the error signal, which is the difference between the actual output signal and the predicted output signal in the BP neural network. It starts from the output layer and propagates backward layer by layer. There is no connection between the same layers. 42) Determine the Sigmond function to limit the range of neuron output and integrate the infinite range of possible output into the allowed output range. The Sigmond function expression is as follows: Among them, x is the input feature variable of the hidden layer or output layer, and e is the logarithmic function; 43) The working signal is forward propagated. The specific process is as follows: the BP neural network receives the input signal, the signal is converted by the Sigmond function after weighted summation, and then processed by the hidden layer to reach the output layer; the number of neurons in the output layer matches the number of targets in the problem; the output layer targets are the vehicle's center of mass sideslip angle and yaw rate; The output of the i-th node in the input layer is x i ; The input of the jth node in the hidden layer is NET j : The output of the jth node in the hidden layer is y j : The input of the kth node in the output layer is NET k : The output of the kth node in the output layer is y k : Among them, w ij is the connection weight between the i-th node in the input layer and the j-th node in the hidden layer, b j is the threshold of the jth node in the hidden layer, p is the number of nodes in the hidden layer, and w jk is the connection weight between the jth node in the hidden layer and the kth node in the output layer, ξ k is the threshold at the kth node of the output layer, and s is the number of nodes in the output layer; 44) Calculate the error between the actual output of the BP neural network data and the expected output of the sample data, and adjust the weights and thresholds of different layers according to the gradient descent method to make the modified neural network close to the expected output value; For back propagation, the total error E between the BP neural network prediction value and the true value is set to: in, is the actual output of the network, for The corresponding expected output; 45) looping and iterating step 43) to step 44), gradually reducing the calculation error until the error reaches the set target error or the number of loop iterations reaches the set maximum number; 46) Obtaining optimal weights and thresholds; 47) Fitting the vehicle parameter error: Use sensors to collect and calculate the vehicle center of mass side slip angle β a and the expected value of the yaw rate γ a , the front wheel steering angle and longitudinal acceleration are used as the BP neural network input layer parameters, and the center of mass side slip angle β is obtained through the forward propagation process of the working signal in the above step 43). k and the predicted value of the yaw rate γ k After calculating the error between the predicted value and the expected value, the error is back-propagated according to the gradient descent method according to step 44, and the weights and thresholds between the layers are continuously corrected to obtain the optimal residual value output Δx k =[Δβ k Δγ k ].
8. The vehicle parameter estimation method based on BP neural network and improved unscented Kalman filter according to claim 7, It is characterized in that The step 44) specifically includes two processes: the error is fed back from the output layer to the hidden layer and from the hidden layer to the input layer; 441) The error between the predicted value and the expected value of the BP neural network is fed back from the output layer to the hidden layer, and the weights and thresholds between the output layer and the hidden layer are adjusted accordingly; Weight w jk Correction value Δw of (n) jk The expression of (n) is: Threshold ξ k The correction value Δξ of (n) k (n) is expressed as: because: Arranging the above formulas (23)-(27) yields: The adjusted weight w jk (n+1) is expressed as: In jk (n+1)=in jk (n)+Δw jk (n) (29) Adjusted threshold ξ k (n+1) is expressed as: x k (n+1)=ξ k (n)+Dx k (n) (30) Among them, η is the learning efficiency, n is the number of back propagation times, P is the number of hidden layer nodes, S is the number of output layer nodes, and w jk (n+1) is the connection weight between the jth node in the n+1th hidden layer and the kth node in the output layer, ξ k (n+1) is the threshold value at the kth node of the n+1th output layer, f 2 '(NET k ) is the conversion function between the input value of the hidden layer and the kth node of the output layer, NET k is the input of the kth node in the output layer, y j is the output of the jth node in the hidden layer, is the actual output of the BP neural network, for The corresponding expected output; 442) Correct the correction weight and correction threshold from the hidden layer to the input layer; The weight correction value Δw between the input layer and the hidden layer ij The expression of (n) is: Threshold b j Correction value Δb of (n) j (n) is: because: The corresponding weight and threshold update process is: Among them, η is the learning efficiency, n is the number of back propagation times, P is the number of hidden layer nodes, S is the number of output layer nodes, and w ij (n+1) is the connection weight between the jth node in the n+1th hidden layer and the ith node in the input layer, b j (n+1) is the threshold value at the jth node of the n+1th hidden layer, f 1 '(NET j ) is the conversion function between the input layer and the input value of the jth node in the hidden layer, NET j is the input of the jth node in the hidden layer, y j (n) is the output of the jth node in the nth hidden layer, is the actual output of the network, for The corresponding expected output.
Citation Information
Patent Citations
Side slip angle estimation method and system based on robust unscented kalman filtering
CN108545081A
Vehicle state estimation method and system combining neural network and unscented Kalman filter
CN115556755A
Multi-axle special vehicle state estimation method based on neural network and unscented Kalman filtering
CN115406446A
Method for estimating main kinetic parameters of vehicle
CN115809590A
Rear wheel steering vehicle stability control method based on BP neural network optimization
CN116373846A
Cited By
Gesture recognition and classification method based on Kalman filtering in multi-hand environment
CN119992642A
Probability tracking control method, medium and equipment for levitation system of maglev train
CN120233728A
Probabilistic Tracking Control Method, Medium and Device for Maglev Train Levitation System
CN120233728B
Accurate evaluation method for riding comfort based on subjective and objective data fusion
CN120524110A
Integrated pole voltage and current sensor
CN120594921A
