Method, device, storage medium and electronic device for estimating vehicle weight and road slope

By constructing the extended Kalman filter and GRU-BP slope prediction model based on longitudinal dynamics in the vehicle, combined with vehicle information, the error problem of vehicle weight and road slope estimation under special working conditions is solved, and higher estimation accuracy is achieved. performance and less sensor usage.

CN118439040BActive Publication Date: 2024-10-22WEICHAI POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410906234.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-10-22
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

Existing vehicle weight and road gradient estimation solutions are difficult to apply to all working conditions, especially under special working conditions such as shifting and braking, resulting in huge errors in parameter estimation results.

Method used

Based on longitudinal dynamics, the extended Kalman filter and GRU-BP gradient prediction model are constructed, combined with the vehicle's engine torque, vehicle speed and gear information, the vehicle weight and road gradient are estimated through the extended Kalman filter, and under the target operating conditions Use GRU-BP model for slope prediction to improve estimation accuracy.

Benefits of technology

It improves the accuracy of vehicle weight and slope estimation under all working conditions, reduces the use of sensors, avoids high-frequency interference introduced by sensors, and solves the problem that existing solutions are difficult to apply to all working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118439040B_ABST
    Figure CN118439040B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, storage medium and electronic device for estimating vehicle weight and road slope. It includes: constructing an extended Kalman filter and a GRU‑BP slope prediction model; determining whether the current working condition of the vehicle at the current moment is the target working condition; when the current working condition is not the target working condition, determining the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter as the final estimated vehicle weight and the final estimated road slope respectively; when the current working condition is the target working condition, determining the second estimated road slope output by the GRU‑BP slope prediction model as the final estimated road slope, and determining the estimated vehicle weight estimated by the extended Kalman filter at the moment before the current moment as the final estimated vehicle weight. By adopting the extended Kalman filter and the GRU‑BP slope prediction model, the problem that the existing vehicle weight and road slope estimation schemes are difficult to apply to all working conditions is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of vehicle weight and road slope estimation, and in particular, to a method, device, storage medium and electronic device for vehicle weight and road slope estimation. Background Art

[0002] Vehicle weight and road slope are important parameters for calculating various torques during vehicle driving and are crucial to the execution of various control strategies.

[0003] There are currently several solutions for estimating vehicle weight and road slope:

[0004] Solution 1: Sensor-based method: Real-time estimation of vehicle mass based on on-board weighing sensors, and real-time estimation of road slope based on information from IMU (inertial navigation sensor) or high-precision maps.

[0005] Solution 2: Dynamics-based method: Based on longitudinal dynamics, the joint estimation of mass and road slope is achieved by using the least squares method or Kalman filtering method through real-time acquisition of engine torque, gear position, vehicle acceleration and vehicle speed information.

[0006] The existing solutions have the following shortcomings:

[0007] Regarding solution 1, the sensor-based method will increase the cost of the entire vehicle and cannot avoid the limitations of the sensor itself. For example, IMU will introduce high-frequency noise.

[0008] For Option 2, under special driving conditions of the vehicle, such as gear shifting and braking, longitudinal dynamics are no longer applicable. At this time, the dynamics-based method will cause huge errors in the parameter estimation results. Summary of the invention

[0009] The main purpose of the present application is to provide a method, device, storage medium and electronic device for estimating vehicle weight and road slope, so as to at least solve the problem that existing solutions for estimating vehicle weight and road slope are difficult to apply to all working conditions.

[0010] To achieve the above-mentioned purpose, according to one aspect of the present application, a method for estimating vehicle weight and road slope is provided, comprising: constructing an extended Kalman filter based on longitudinal dynamics, wherein the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, wherein the parameter set includes engine torque, vehicle speed, and gear position; constructing a GRU-BP slope prediction model, wherein the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is a plurality of the first estimated road slopes estimated by the extended Kalman filter. degrees; determining whether the current operating condition of the vehicle at the current moment is the target operating condition, the target operating condition including the shifting operating condition and the braking operating condition; when the current operating condition is not the target operating condition, determining the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter as the final estimated vehicle weight and the final estimated road slope respectively; when the current operating condition is the target operating condition, determining the second estimated road slope output by the GRU-BP slope prediction model as the final estimated road slope, and determining the estimated vehicle weight estimated by the extended Kalman filter at the moment before the current moment as the final estimated vehicle weight.

[0011] Optionally, constructing a GRU-BP slope prediction model includes: constructing a GRU model and a BP model, wherein the input of the GRU model is the estimated road slope sequence, the output of the GRU model is a feature matrix, the feature matrix is ​​a matrix composed of features extracted from the estimated road slope sequence, and the output of the GRU model serves as the input of the BP model, and the output of the BP model is the second estimated road slope; combining the GRU model and the BP model to obtain the GRU-BP slope prediction model.

[0012] Optionally, after combining the GRU model and the BP model to obtain the GRU-BP slope prediction model, the method further includes: using a test set to test the GRU-BP slope prediction model to obtain a test result, wherein the test result indicates whether the GRU-BP slope prediction model needs to be further optimized, wherein the test set includes a variety of test data, and any group of the test data includes a first estimated road slope sequence and a second estimated road slope sequence that follows, wherein the first estimated road slope sequence and the second estimated road slope sequence are both estimated by the extended Kalman filter.

[0013] Optionally, the process of constructing the BP model includes: setting a maximum number of iterations; stopping iteration when the maximum number of iterations is reached, wherein any iteration sequentially executes a forward propagation step, a loss calculation step, a back propagation step and a parameter update step.

[0014] Optionally, an extended Kalman filter is constructed based on longitudinal dynamics, including: constructing a system state equation based on the longitudinal dynamics; discretizing the system state equation using a forward Euler method to obtain a discrete system state equation; calculating the Jacobian matrix of each state variable based on the discrete system state equation; calculating the Kalman gain and updating the error covariance.

[0015] Optionally, determining whether the current operating condition of the vehicle at the current moment is the target operating condition includes: determining whether a shift signal is detected, and determining that the current operating condition is the shift condition when the shift signal is detected; determining whether a brake signal is detected, and determining that the current operating condition is the brake condition when the brake signal is detected.

[0016] Optionally, the method is applicable to at least the following scenarios: mountain road scenario and plain road scenario.

[0017] According to another aspect of the present application, a device for estimating vehicle weight and road slope is provided, comprising: a first construction unit, for constructing an extended Kalman filter based on longitudinal dynamics, the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, the parameter set including engine torque, vehicle speed, and gear; a second construction unit, for constructing a GRU-BP slope prediction model, the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is a sequence composed of multiple first estimated road slopes estimated by the extended Kalman filter; a first A determination unit is used to determine whether the current operating condition of the vehicle at a current moment is a target operating condition, wherein the target operating condition includes a gear shifting condition and a braking condition; a second determination unit is used to determine the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter as the final estimated vehicle weight and the final estimated road slope, respectively, when the current operating condition is not the target operating condition; a third determination unit is used to determine the second estimated road slope output by the GRU-BP slope prediction model as the final estimated road slope, and determine the estimated vehicle weight estimated by using the extended Kalman filter at a moment before the current moment as the final estimated vehicle weight, when the current operating condition is the target operating condition.

[0018] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods for estimating vehicle weight and road slope.

[0019] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for performing any one of the vehicle weight and road slope estimation methods.

[0020] Applying the technical solution of the present application, an extended Kalman filter is constructed based on longitudinal dynamics, the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, the parameter set including engine torque, vehicle speed, and gear position; a GRU-BP slope prediction model is constructed, the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is a sequence composed of multiple first estimated road slopes estimated by using the extended Kalman filter; determine whether the current operating condition of the vehicle at the current moment is a target operating condition, and the target operating condition includes a shifting operating condition and a braking operating condition; when the current operating condition is not a target operating condition, the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter are respectively determined as the final estimated vehicle weight and the final estimated road slope; when the current operating condition is a target operating condition, the second estimated road slope output by the GRU-BP slope prediction model is determined as the final estimated road slope, and the estimated vehicle weight estimated by using the extended Kalman filter at the moment before the current moment is determined as the final estimated vehicle weight. When the current working condition is not the target condition, the extended Kalman filter is used to output the estimated vehicle weight and the estimated slope. When the current working condition is the target condition, the GRU-BP model is used to output the estimated slope, and the extended Kalman filter is used to output the estimated vehicle weight. This improves the accuracy of vehicle weight estimation and slope estimation under all working conditions, reduces the use of vehicle sensors, avoids high-frequency interference introduced by sensors, and solves the problem that existing vehicle weight and road slope estimation solutions are difficult to apply to all working conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0022] Figure 1A hardware structure block diagram of a mobile terminal for performing a method for estimating vehicle weight and road slope provided in an embodiment of the present application is shown;

[0023] Figure 2 A schematic flow chart of a method for estimating vehicle weight and road slope provided according to an embodiment of the present application is shown;

[0024] Figure 3 A flowchart of constructing a GRU-BP slope prediction model provided according to an embodiment of the present application is shown;

[0025] Figure 4 A schematic flow chart of a method for estimating a specific vehicle weight and a road slope provided in accordance with an embodiment of the present application is shown;

[0026] Figure 5 A schematic diagram of a construction process of a specific GRU-BP slope estimation model provided according to an embodiment of the present application is shown;

[0027] Figure 6 A structural block diagram of a device for estimating vehicle weight and road slope provided according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0028] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0029] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] As introduced in the background technology, existing solutions for estimating vehicle weight and road slope are difficult to apply to all working conditions. In order to solve the problem that existing solutions for estimating vehicle weight and road slope are difficult to apply to all working conditions, the embodiments of the present application provide a method, device, storage medium and electronic device for estimating vehicle weight and road slope.

[0032] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0033] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal for a method for estimating vehicle weight and road slope according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0034] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for estimating vehicle weight and road slope in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0035] In this embodiment, a method for estimating vehicle weight and road slope running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0036] Figure 2 FIG. 1 is a flow chart of a method for estimating vehicle weight and road slope according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0037] Step S201, constructing an extended Kalman filter based on longitudinal dynamics, the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, the parameter set includes engine torque, vehicle speed, and gear position;

[0038] Among them, the engine torque, vehicle speed, gear position and brake signal are obtained according to the vehicle CAN bus.

[0039] The extended Kalman filter is a filter used for state estimation of nonlinear systems. In longitudinal dynamics, the dynamic behavior of the system can be described by constructing a state space model. In this model, the state variables, control inputs, measurements, and dynamic equations of the system can be included.

[0040] Step S202, constructing a GRU-BP slope prediction model, wherein the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output of the GRU-BP slope prediction model is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is a sequence composed of multiple first estimated road slopes estimated by using an extended Kalman filter;

[0041] Among them, the GRU-BP slope prediction model is composed of the GRU neural network model and the BP neural network model. The GRU neural network model has certain advantages in time series data prediction, and the BP neural network model has good nonlinear mapping ability and generalization ability. Combining GRU-BP can further improve the prediction accuracy.

[0042] GRU neural network model is a deep learning model used to process sequence data, especially text data. The GRU (Gated Recurrent Unit) model is a variant of the recurrent neural network (RNN) that solves the problems of gradient vanishing and gradient exploding in the traditional RNN model by introducing a gating mechanism. The GRU model has a simpler structure and fewer parameters, while being able to effectively capture long-term dependencies in sequence data. In the GRU model, each time step has a hidden state that is used to store the information of the model at the current time step. The GRU model controls the flow of information by updating gates and resetting gates, thereby effectively processing long sequence data.

[0043] The BP neural network model is an artificial neural network model, which is often used in tasks such as pattern recognition, classification and prediction. It consists of an input layer, a hidden layer and an output layer, and achieves learning and processing of complex data through connections and weight adjustments between multiple layers of neurons. The BP neural network model continuously adjusts the connection weights through the back propagation algorithm to minimize the prediction error, thereby improving the accuracy and generalization ability of the model.

[0044] Step S203, determining whether the current operating condition of the vehicle at the current moment is a target operating condition, where the target operating condition includes a shifting operating condition and a braking operating condition;

[0045] Specifically, the current working condition of the vehicle at the current moment is first determined, and the vehicle weight and slope are estimated according to whether the current working condition is the target working condition, so that the vehicle weight estimation and slope estimation can be made more accurate.

[0046] Step S204, when the current working condition is a non-target working condition, determining the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter as the final estimated vehicle weight and the final estimated road slope respectively;

[0047] Specifically, when the current working condition is not a gear shifting condition or a braking condition, an extended Kalman filter is used to estimate the vehicle weight and slope.

[0048] Step S205, when the current working condition is the target working condition, the second estimated road slope output by the GRU-BP slope prediction model is determined as the final estimated road slope, and the estimated vehicle weight estimated by the extended Kalman filter at the moment before the current moment is determined as the final estimated vehicle weight.

[0049] Specifically, when the current working condition is a gear shifting condition or a braking condition, the GRU-BP slope prediction model is used to estimate the slope, and the Kalman filter is used to estimate the vehicle weight. The mass estimation result output by the extended Kalman filter is adaptively adjusted in combination with different working conditions, which effectively suppresses the mass estimation fluctuation caused by the longitudinal dynamic failure during the gear shifting and braking process.

[0050] Through this embodiment, an extended Kalman filter is constructed based on longitudinal dynamics, the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, and the parameter set includes engine torque, vehicle speed, and gear position; a GRU-BP slope prediction model is constructed, the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is a sequence composed of multiple first estimated road slopes estimated by using the extended Kalman filter; it is determined whether the current operating condition of the vehicle at the current moment is a target operating condition, and the target operating condition includes a shifting operating condition and a braking operating condition; when the current operating condition is not a target operating condition, the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter are respectively determined as the final estimated vehicle weight and the final estimated road slope; when the current operating condition is a target operating condition, the second estimated road slope output by the GRU-BP slope prediction model is determined as the final estimated road slope, and the estimated vehicle weight estimated by using the extended Kalman filter at a moment before the current moment is determined as the final estimated vehicle weight. When the current working condition is a non-target condition, the extended Kalman filter is used to output the estimated vehicle weight and the estimated slope. When the current working condition is a target condition, the GRU-BP model is used to output the estimated slope, and the extended Kalman filter is used to output the estimated vehicle weight. This improves the accuracy of vehicle weight estimation and slope estimation under all working conditions, reduces the use of vehicle sensors, avoids high-frequency interference introduced by sensors, and solves the problem that existing vehicle weight and road slope estimation solutions are difficult to apply to all working conditions.

[0051] In the specific implementation process, a GRU-BP slope prediction model is constructed, such as Figure 3 As shown, the specific steps include:

[0052] Step S301: constructing a GRU model and a BP model, wherein the input of the GRU model is the estimated road slope sequence, the output of the GRU model is a feature matrix, the feature matrix is ​​a matrix composed of features extracted from the estimated road slope sequence, and the output of the GRU model is used as the input of the BP model, and the output of the BP model is the second estimated road slope;

[0053] Step S302: Combine the GRU model and the BP model to obtain a GRU-BP slope prediction model.

[0054] The GRU neural network model of this method has certain advantages in time series data prediction. The BP neural network model has good nonlinear mapping and generalization capabilities. Combining GRU-BP can further improve the prediction accuracy.

[0055] Specifically, after combining the GRU model and the BP model to obtain the GRU-BP slope prediction model, the method also includes: using a test set to test the GRU-BP slope prediction model to obtain a test result, and the test result indicates whether the GRU-BP slope prediction model needs to be further optimized, wherein the test set includes a variety of test data, and any set of test data includes a first estimated road slope sequence and a second estimated road slope sequence that follows, wherein the first estimated road slope sequence and the second estimated road slope sequence are both estimated by an extended Kalman filter.

[0056] The method inputs the test set into the trained GRU-BP slope prediction model, and the GRU-BP slope prediction model outputs the test results. According to the test results, it is determined whether the GRU-BP slope prediction model needs to be optimized.

[0057] More specifically, the process of constructing the BP model includes: setting the maximum number of iterations; stopping the iteration when the maximum number of iterations is reached, wherein any iteration sequentially executes the forward propagation step, the loss calculation step, the back propagation step and the parameter update step.

[0058] This method can help control the training process of the BP model by setting the maximum number of iterations, avoid overfitting and underfitting problems, and improve the generalization ability and performance of the model to obtain the best GRU-BP slope prediction model.

[0059] Furthermore, an extended Kalman filter is constructed based on the longitudinal dynamics, including: constructing a system state equation based on the longitudinal dynamics; discretizing the system state equation using a forward Euler method to obtain a discrete system state equation; calculating the Jacobian matrix of each state variable based on the discrete system state equation; calculating the Kalman gain and updating the error covariance.

[0060] Among them, the state equation of the system can be established according to the longitudinal dynamics as follows:

[0061] ;

[0062] ;

[0063] ;

[0064] in: is the vehicle speed at time t, is the output torque of the engine at time t, is the transmission ratio of the current gear, is the main reducer transmission ratio, r is the rolling radius, is the vehicle weight at time t, is the slope at time t, g is the acceleration of gravity, and A, B, and C are the empirical coefficients of the overall resistance formula.

[0065] According to the forward Euler method, the state space equation of the system after discretization can be obtained as follows:

[0066] ;

[0067] ;

[0068] ;

[0069] ;

[0070] in: represents the weight of the vehicle at time k, represents the quality at time k, represents the slope at time k, and the same applies to time k-1. is the sampling frequency of the data.

[0071] Compute the Jacobian matrix for each state variable: ;

[0072] in, , is the state space function.

[0073] Calculate the Kalman gain and update the error covariance:

[0074] ;

[0075] ;

[0076] in, is the prior of the error covariance matrix at time k, is the error covariance matrix of the previous moment, is the posterior value of the error covariance matrix at time k, is the process noise at each moment; is the measurement noise at each moment, and H is the observation matrix.

[0077] The estimation of state variables and their covariance is realized according to the current vehicle speed:

[0078] ;

[0079] ;

[0080] in, is the speed of the vehicle speed sensor and the vehicle weight matrix estimated by recursive least squares, Implement the state variable for the current vehicle speed, is the posterior value of the error covariance matrix at time k, is the Kalman gain at this moment.

[0081] Furthermore, determining whether the current operating condition of the vehicle at the current moment is the target operating condition includes: determining whether a shift signal is detected, and determining that the current operating condition is the shift condition if the shift signal is detected; determining whether a brake signal is detected, and determining that the current operating condition is the brake condition if the brake signal is detected.

[0082] Among them, the transmission position sensor can be used to detect whether the gear is shifted, and the engine speed sensor (RPM), throttle position sensor (TPS), and wheel speed sensor can also be used to detect whether the gear is shifted. The data collected by sensors such as pressure sensors and speed sensors can be used to determine whether the vehicle is braking.

[0083] Specifically, the method is applicable to at least the following scenarios: mountain road scenario and plain road scenario.

[0084] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the method for estimating vehicle weight and road slope of the present application will be described in detail below in combination with specific embodiments.

[0085] Some solutions in the prior art use the least squares method to estimate the vehicle load and slope. The processing method adopted is to use the least squares method to estimate the slope change rate when the gear shift is identified, and correct the slope estimation. The estimated slope change rate can only solve the phenomenon that the slope estimation result is delayed due to the failure to consider the slope change rate in the Kalman filter modeling. Simply estimating the slope change rate cannot actually solve the impact caused by the failure of the dynamic equation during the gear shift and braking process. Some solutions estimate the road slope based on the BP neural network. The network input is the engine speed, torque, vehicle speed, acceleration, and the output is the estimated slope. This BP network fits the mapping relationship between the input and output parameters to achieve the effect of slope estimation. This solution introduces the GRU neural network with good time series prediction effect. Combined with the BP neural network prediction, the slope prediction accuracy will be higher. In addition, the prior art does not consider the prediction of the slope when the vehicle is in braking and gear shifting conditions.

[0086] This embodiment relates to a specific method for estimating vehicle weight and road slope, such as Figure 4 As shown, it specifically includes the following contents:

[0087] 1) Obtain engine torque, vehicle speed, gear position and brake signals based on the vehicle CAN bus.

[0088] 2) Establish an extended Kalman filter based on longitudinal dynamics to achieve joint estimation of road slope and vehicle mass. The construction process of the extended Kalman filter algorithm is as follows:

[0089] According to the longitudinal dynamics, the state equation of the system can be established as follows:

[0090] ;

[0091] ;

[0092] ;

[0093] in: is the vehicle speed at time t, is the output torque of the engine at time t, is the transmission ratio of the current gear, is the main reducer transmission ratio, r is the rolling radius, is the vehicle weight at time t, is the slope at time t, g is the acceleration of gravity, and A, B, and C are the empirical coefficients of the overall resistance formula.

[0094] According to the forward Euler method, the state space equation of the system after discretization can be obtained as follows:

[0095] ;

[0096] ;

[0097] ;

[0098] ;

[0099] in: represents the weight of the vehicle at time k, represents the quality at time k, represents the slope at time k, and the same applies to time k-1. is the sampling frequency of the data.

[0100] Compute the Jacobian matrix for each state variable: ;

[0101] in, , is the state space function.

[0102] Calculate the Kalman gain and update the error covariance:

[0103] ;

[0104] ;

[0105] in, is the prior of the error covariance matrix at time k, is the error covariance matrix of the previous moment, is the posterior value of the error covariance matrix at time k, is the process noise at each moment; is the measurement noise at each moment, and H is the observation matrix.

[0106] The estimation of state variables and their covariance is realized according to the current vehicle speed:

[0107] ;

[0108] ;

[0109] in, is the speed of the vehicle speed sensor and the vehicle weight matrix estimated by recursive least squares, Implement the state variable for the current vehicle speed, is the posterior value of the error covariance matrix at time k, is the Kalman gain at this moment.

[0110] 3) Construct a GRU-BP slope prediction model, which can estimate the current road slope and future road slope based on historical estimated slope data. The construction process of the GRU-BP slope estimation model is as follows: Figure 5 The specific contents are as follows:

[0111] Based on mountain and plain road tests, the road slope information (historical estimated slope data) of the vehicle driving process is obtained and filtered. The GRU model is trained, the hyperparameter model is initialized and tuned, and repeated iterations are performed to obtain the best prediction model; the BP model is trained, and the data passed by GRU is used as the input data of BP for training until the set number of iterations is reached to end the model training and obtain the BP prediction model. Then the test set is input into the trained GRU-BP combined prediction model to obtain the prediction results and output them; the evaluation index of the model is calculated based on the output results of the GRU-BP combined prediction model, and the prediction data and evaluation index are analyzed.

[0112] 4) Determine whether the current moment is a special working condition of shifting or braking. If so, the algorithm outputs the quality value of the special working condition at the previous moment and the estimated road slope output by the GRU-BP network. If not, the algorithm outputs the quality and estimated road slope of the extended Kalman filter algorithm.

[0113] In the process of estimating the vehicle weight and slope based on the longitudinal dynamic equation, this embodiment solves the problem of estimation errors caused by the failure of the dynamic equation due to gear shifting and braking. Specifically, when the vehicle is driving, the transient power is interrupted during gear shifting, and the driving force suddenly drops or even becomes zero, so that the dynamic equation cannot accurately describe the actual situation; when braking, due to the influence of the braking force, the force on the whole vehicle is difficult to describe with a simple dynamic equation. In these two cases, because the dynamic equation does not match the actual force equation, errors will occur in the estimated vehicle weight and slope, especially the slope, which has huge errors. The GRU-BP neural network proposed in this embodiment can realize the prediction of the slope during gear shifting and braking, so as to eliminate the influence of the failure of the dynamic equation on the error of the estimation result.

[0114] This embodiment uses the GRU-BP neural network method to estimate the road slope under special working conditions (shifting and braking, etc.), ensuring the accuracy of the slope estimation. The mass estimation result of the extended Kalman filter output is adaptively adjusted in combination with different working conditions, which effectively suppresses the mass estimation fluctuation caused by longitudinal dynamic failure during shifting and braking. In addition, this embodiment reduces the use of sensors, avoids high-frequency interference introduced by sensors, and achieves accurate estimation of road slope and vehicle mass under special working conditions such as braking and shifting, where dynamic failure occurs. In addition, the GRU neural network has certain advantages in predicting time series data, and the BP neural network has good nonlinear mapping and generalization capabilities. Combining GRU-BP can further improve the prediction accuracy.

[0115] The embodiment of the present application also provides a device for estimating vehicle weight and road slope. It should be noted that the device for estimating vehicle weight and road slope in the embodiment of the present application can be used to execute the method for estimating vehicle weight and road slope provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0116] The following is an introduction to the device for estimating vehicle weight and road slope provided in an embodiment of the present application.

[0117] Figure 6 FIG. 1 is a schematic diagram of a device for estimating vehicle weight and road slope according to an embodiment of the present application. Figure 6 As shown, the device includes: a first constructing unit 61 , a second constructing unit 62 , a first determining unit 63 , a second determining unit 64 , and a third determining unit 65 .

[0118] A first construction unit 61 is used to construct an extended Kalman filter based on longitudinal dynamics, the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, the parameter set includes engine torque, vehicle speed, and gear position;

[0119] Among them, the engine torque, vehicle speed, gear position and brake signal are obtained according to the vehicle CAN bus.

[0120] A second construction unit 62 is used to construct a GRU-BP slope prediction model, wherein the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is a sequence composed of multiple first estimated road slopes estimated by using an extended Kalman filter;

[0121] Among them, the GRU-BP slope prediction model is composed of the GRU neural network model and the BP neural network model. The GRU neural network model has certain advantages in time series data prediction, and the BP neural network model has good nonlinear mapping ability and generalization ability. Combining GRU-BP can further improve the prediction accuracy.

[0122] A first determination unit 63, used to determine whether the current operating condition of the vehicle at the current moment is a target operating condition, where the target operating condition includes a shifting operating condition and a braking operating condition;

[0123] Specifically, the current working condition of the vehicle at the current moment is first determined, and the vehicle weight and slope are estimated according to whether the current working condition is the target working condition, so that the vehicle weight estimation and slope estimation can be made more accurate.

[0124] A second determination unit 64 is used to determine the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter as the final estimated vehicle weight and the final estimated road slope respectively when the current working condition is not the target working condition;

[0125] Specifically, when the current working condition is not a gear shifting condition or a braking condition, an extended Kalman filter is used to estimate the vehicle weight and slope.

[0126] The third determination unit 65 is used to determine the second estimated road slope output by the GRU-BP slope prediction model as the final estimated road slope when the current operating condition is the target operating condition, and to determine the estimated vehicle weight estimated by using the extended Kalman filter at the moment before the current moment as the final estimated vehicle weight.

[0127] Specifically, when the current working condition is a gear shifting condition or a braking condition, the GRU-BP slope prediction model is used to estimate the slope, and the Kalman filter is used to estimate the vehicle weight. The mass estimation result output by the extended Kalman filter is adaptively adjusted in combination with different working conditions, which effectively suppresses the mass estimation fluctuation caused by the longitudinal dynamic failure during the gear shifting and braking process.

[0128] In this embodiment, the first construction unit is used to construct an extended Kalman filter based on longitudinal dynamics, the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, and the parameter set includes engine torque, vehicle speed, and gear position; the second construction unit is used to construct a GRU-BP slope prediction model, the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is a sequence composed of multiple first estimated road slopes estimated by using the extended Kalman filter; the first determination unit, It is used to determine whether the current working condition of the vehicle at the current moment is the target working condition, and the target working condition includes the gear shifting working condition and the braking working condition; the second determination unit is used to determine the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter as the final estimated vehicle weight and the final estimated road slope respectively when the current working condition is not the target working condition; the third determination unit is used to determine the second estimated road slope output by the GRU-BP slope prediction model as the final estimated road slope when the current working condition is the target working condition, and determine the estimated vehicle weight obtained by using the extended Kalman filter to estimate the vehicle weight and the estimated slope at the moment before the current moment as the final estimated vehicle weight. When the current working condition is a non-target working condition, the extended Kalman filter is used to output the estimated vehicle weight and the estimated slope, and when the current working condition is a target working condition, the GRU-BP model is used to output the estimated slope, and the extended Kalman filter is used to output the estimated vehicle weight, thereby improving the accuracy of the vehicle weight estimation and slope estimation under all working conditions, reducing the use of vehicle sensors, avoiding high-frequency interference introduced by sensors, and solving the problem that the existing vehicle weight and road slope estimation solutions are difficult to apply to all working conditions.

[0129] As an optional scheme, the second construction unit includes a first construction module and a combination module; the first construction module is used to construct a GRU model and a BP model, wherein the input of the GRU model is an estimated road slope sequence, the output of the GRU model is a feature matrix, the feature matrix is ​​a matrix composed of features extracted from the estimated road slope sequence, and the output of the GRU model is used as the input of the BP model, and the output of the BP model is a second estimated road slope; the combination module is used to combine the GRU model and the BP model to obtain a GRU-BP slope prediction model.

[0130] Specifically, the GRU neural network model has certain advantages in predicting time series data, and the BP neural network model has good nonlinear mapping and generalization capabilities. Combining GRU-BP can further improve the prediction accuracy.

[0131] An optional solution, the second construction unit also includes a testing module, which is used to test the GRU-BP slope prediction model using a test set after combining the GRU model and the BP model to obtain the GRU-BP slope prediction model, and obtain a test result, wherein the test result indicates whether the GRU-BP slope prediction model needs to be further optimized, wherein the test set includes a variety of test data, and any set of test data includes a first estimated road slope sequence and a second estimated road slope sequence that follows, wherein the first estimated road slope sequence and the second estimated road slope sequence are both estimated by an extended Kalman filter.

[0132] Specifically, the test set is input into the trained GRU-BP slope prediction model, and the GRU-BP slope prediction model outputs the test results. According to the test results, it is determined whether the GRU-BP slope prediction model needs to be optimized.

[0133] An optional solution, the first construction module includes a setting submodule and a stop iteration submodule; the setting submodule is used to set the maximum number of iterations in the process of building the BP model; the stop iteration submodule is used to stop iteration when the maximum number of iterations is reached, wherein any iteration sequentially executes the forward propagation step, the loss calculation step, the back propagation step and the parameter update step.

[0134] Specifically, setting the maximum number of iterations can help control the training process of the BP model, avoid overfitting and underfitting problems, and improve the generalization ability and performance of the model to obtain the best GRU-BP slope prediction model.

[0135] An optional solution, the first construction unit includes a second construction module, a discretization processing module, a calculation module, and an update module; the second construction module is used to construct a system state equation based on longitudinal dynamics; the discretization processing module is used to discretize the system state equation using a forward Euler method to obtain a discrete system state equation; the calculation module is used to calculate the Jacobian matrix of each state variable based on the discrete system state equation; the update module is used to calculate the Kalman gain and update the error covariance.

[0136] An optional scheme, the first determination unit includes a first determination module and a second determination module; the first determination module is used to determine whether a gear shift signal is detected, and when a gear shift signal is detected, the current operating condition is determined to be a gear shift condition; the second determination module is used to determine whether a braking signal is detected, and when a braking signal is detected, the current operating condition is determined to be a braking condition.

[0137] Among them, the transmission position sensor can be used to detect whether the gear is shifted, and the engine speed sensor (RPM), throttle position sensor (TPS), and wheel speed sensor can also be used to detect whether the gear is shifted. The data collected by sensors such as pressure sensors and speed sensors can be used to determine whether the vehicle is braking.

[0138] An optional solution, the method is applicable to at least the following scenarios: mountain road scenario and plain road scenario.

[0139] The vehicle weight and road slope estimation device includes a processor and a memory, wherein the first construction unit, the second construction unit, the first determination unit, the second determination unit, the third determination unit, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The above modules are all located in the same processor; or, the above modules are located in different processors in any combination.

[0140] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem that the existing vehicle weight and road slope estimation solutions are difficult to apply to all working conditions can be solved by adjusting kernel parameters.

[0141] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0142] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for estimating vehicle weight and road slope.

[0143] Specifically, the method of estimating vehicle weight and road slope includes:

[0144] Step S201, constructing an extended Kalman filter based on longitudinal dynamics, the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, the parameter set includes engine torque, vehicle speed, and gear position;

[0145] Step S202, constructing a GRU-BP slope prediction model, wherein the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output of the GRU-BP slope prediction model is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is a sequence composed of multiple first estimated road slopes estimated by using an extended Kalman filter;

[0146] Step S203, determining whether the current operating condition of the vehicle at the current moment is a target operating condition, where the target operating condition includes a shifting operating condition and a braking operating condition;

[0147] Step S204, when the current working condition is not the target working condition, determining the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter as the final estimated vehicle weight and the final estimated road slope respectively;

[0148] Step S205, when the current working condition is the target working condition, the second estimated road slope output by the GRU-BP slope prediction model is determined as the final estimated road slope, and the estimated vehicle weight estimated by the extended Kalman filter at the moment before the current moment is determined as the final estimated vehicle weight.

[0149] An embodiment of the present invention provides a processor, which is used to run a program, wherein the method for estimating vehicle weight and road slope is executed when the program is running.

[0150] Specifically, the method of estimating vehicle weight and road slope includes:

[0151] Step S201, constructing an extended Kalman filter based on longitudinal dynamics, the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, the parameter set includes engine torque, vehicle speed, and gear position;

[0152] Step S202, constructing a GRU-BP slope prediction model, wherein the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output of the GRU-BP slope prediction model is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is a sequence composed of multiple first estimated road slopes estimated by using an extended Kalman filter;

[0153] Step S203, determining whether the current operating condition of the vehicle at the current moment is a target operating condition, where the target operating condition includes a shifting operating condition and a braking operating condition;

[0154] Step S204, when the current working condition is not the target working condition, determining the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter as the final estimated vehicle weight and the final estimated road slope respectively;

[0155] Step S205, when the current working condition is the target working condition, the second estimated road slope output by the GRU-BP slope prediction model is determined as the final estimated road slope, and the estimated vehicle weight estimated by the extended Kalman filter at the moment before the current moment is determined as the final estimated vehicle weight.

[0156] An embodiment of the present invention provides a device, the device including a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, at least the following steps are implemented:

[0157] Step S201, constructing an extended Kalman filter based on longitudinal dynamics, the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, the parameter set includes engine torque, vehicle speed, and gear position;

[0158] Step S202, constructing a GRU-BP slope prediction model, wherein the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output of the GRU-BP slope prediction model is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is a sequence composed of multiple first estimated road slopes estimated by using an extended Kalman filter;

[0159] Step S203, determining whether the current operating condition of the vehicle at the current moment is a target operating condition, where the target operating condition includes a shifting operating condition and a braking operating condition;

[0160] Step S204, when the current working condition is not the target working condition, determining the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter as the final estimated vehicle weight and the final estimated road slope respectively;

[0161] Step S205, when the current working condition is the target working condition, the second estimated road slope output by the GRU-BP slope prediction model is determined as the final estimated road slope, and the estimated vehicle weight estimated by the extended Kalman filter at the moment before the current moment is determined as the final estimated vehicle weight.

[0162] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0163] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:

[0164] Step S201, constructing an extended Kalman filter based on longitudinal dynamics, the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, the parameter set includes engine torque, vehicle speed, and gear position;

[0165] Step S202, constructing a GRU-BP slope prediction model, wherein the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output of the GRU-BP slope prediction model is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is a sequence composed of multiple first estimated road slopes estimated by using an extended Kalman filter;

[0166] Step S203, determining whether the current operating condition of the vehicle at the current moment is a target operating condition, where the target operating condition includes a shifting operating condition and a braking operating condition;

[0167] Step S204, when the current working condition is not the target working condition, determining the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter as the final estimated vehicle weight and the final estimated road slope respectively;

[0168] Step S205, when the current working condition is the target working condition, the second estimated road slope output by the GRU-BP slope prediction model is determined as the final estimated road slope, and the estimated vehicle weight estimated by the extended Kalman filter at the moment before the current moment is determined as the final estimated vehicle weight.

[0169] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0170] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0171] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0172] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0173] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0174] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0175] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0176] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0177] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0178] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0179] 1) A method for estimating vehicle weight and road slope of the present application comprises: constructing an extended Kalman filter based on longitudinal dynamics, the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, the parameter set includes engine torque, vehicle speed, and gear position; constructing a GRU-BP slope prediction model, the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is a plurality of first estimated road slopes estimated by using the extended Kalman filter. The method comprises a sequence of the estimated vehicle weight and the estimated slope of the vehicle at the current moment; determining whether the current working condition of the vehicle at the current moment is the target working condition, and the target working condition includes the gear shifting working condition and the braking working condition; when the current working condition is not the target working condition, the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter are respectively determined as the final estimated vehicle weight and the final estimated road slope; when the current working condition is the target working condition, the second estimated road slope output by the GRU-BP slope prediction model is determined as the final estimated road slope, and the estimated vehicle weight obtained by using the extended Kalman filter at the moment before the current moment is determined as the final estimated vehicle weight. When the current working condition is not the target working condition, the extended Kalman filter is used to output the estimated vehicle weight and the estimated slope. When the current working condition is the target working condition, the GRU-BP model is used to output the estimated slope, and the extended Kalman filter is used to output the estimated vehicle weight, which improves the accuracy of the vehicle weight estimation and slope estimation under all working conditions, reduces the use of vehicle sensors, avoids the high-frequency interference introduced by the sensors, and solves the problem that the existing vehicle weight and road slope estimation solutions are difficult to apply to all working conditions.

[0180] 2) A vehicle weight and road slope estimation device of the present application comprises: a first construction unit, which is used to construct an extended Kalman filter based on longitudinal dynamics, the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, and the parameter set includes engine torque, vehicle speed, and gear position; a second construction unit, which is used to construct a GRU-BP slope prediction model, the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is composed of multiple first estimated road slopes estimated by the extended Kalman filter. sequence; a first determination unit, used to determine whether the current operating condition of the vehicle at the current moment is the target operating condition, the target operating condition including the shifting operating condition and the braking operating condition; a second determination unit, used to, when the current operating condition is not the target operating condition, determine the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter as the final estimated vehicle weight and the final estimated road slope respectively; a third determination unit, used to, when the current operating condition is the target operating condition, determine the second estimated road slope output by the GRU-BP slope prediction model as the final estimated road slope, and determine the estimated vehicle weight estimated by using the extended Kalman filter at the moment before the current moment as the final estimated vehicle weight. When the current working condition is a non-target condition, the extended Kalman filter is used to output the estimated vehicle weight and the estimated slope. When the current working condition is a target condition, the GRU-BP model is used to output the estimated slope, and the extended Kalman filter is used to output the estimated vehicle weight. This improves the accuracy of vehicle weight estimation and slope estimation under all working conditions, reduces the use of vehicle sensors, avoids high-frequency interference introduced by sensors, and solves the problem that existing vehicle weight and road slope estimation solutions are difficult to apply to all working conditions.

[0181] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for estimating vehicle weight and road slope, characterized in that: include: An extended Kalman filter is constructed based on the longitudinal dynamics, wherein the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, wherein the parameter set includes an engine torque, a vehicle speed, and a gear position; Constructing a GRU-BP slope prediction model, wherein the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is a sequence composed of a plurality of the first estimated road slopes estimated by using the extended Kalman filter; Determine whether the current operating condition of the vehicle at the current moment is a target operating condition, wherein the target operating condition includes a shifting operating condition and a braking operating condition; When the current operating condition is not the target operating condition, determining the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter as the final estimated vehicle weight and the final estimated road slope respectively; When the current operating condition is the target operating condition, the second estimated road slope output by the GRU-BP slope prediction model is determined as the final estimated road slope, and the estimated vehicle weight estimated by the extended Kalman filter at the moment before the current moment is determined as the final estimated vehicle weight.

2. The method according to claim 1, characterized in that: Construct a GRU-BP slope prediction model, including: Constructing a GRU model and a BP model, wherein the input of the GRU model is the estimated road slope sequence, the output of the GRU model is a feature matrix, the feature matrix is ​​a matrix composed of features extracted from the estimated road slope sequence, and the output of the GRU model is used as the input of the BP model, and the output of the BP model is the second estimated road slope; The GRU model and the BP model are combined to obtain the GRU-BP slope prediction model.

3. The method according to claim 2, characterized in that After combining the GRU model and the BP model to obtain the GRU-BP slope prediction model, the method further includes: The GRU-BP slope prediction model is tested using a test set to obtain a test result, wherein the test result indicates whether the GRU-BP slope prediction model needs to be further optimized, wherein the test set includes a variety of test data, and any group of the test data includes a first estimated road slope sequence and a second estimated road slope sequence immediately following the first estimated road slope sequence and the second estimated road slope sequence are both estimated by the extended Kalman filter.

4. The method according to claim 2, characterized in that: The process of constructing the BP model includes: Set the maximum number of iterations; When the maximum number of iterations is reached, the iteration is stopped, wherein any iteration sequentially executes the forward propagation step, the loss calculation step, the back propagation step and the parameter updating step.

5. The method according to claim 1, characterized in that An extended Kalman filter is constructed based on longitudinal dynamics, including: constructing a system state equation based on the longitudinal dynamics; The system state equation is discretized by using the forward Euler method to obtain a discrete system state equation; Calculate the Jacobian matrix of each state variable based on the discrete system state equation; Calculate the Kalman gain and update the error covariance.

6. The method according to claim 1, characterized in that Determine whether the current operating condition of the vehicle at the current moment is the target operating condition, including: determining whether a gear shift signal is detected, and determining that the current operating condition is a gear shift operating condition when the gear shift signal is detected; Determine whether a braking signal is detected, and determine that the current operating condition is a braking operating condition when the braking signal is detected.

7. The method according to any one of claims 1 to 6, characterized in that The method is at least applicable to the following scenarios: mountain road scenario and plain road scenario.

8. A device for estimating vehicle weight and road slope, characterized in that: include: A first construction unit is used to construct an extended Kalman filter based on longitudinal dynamics, wherein the input of the extended Kalman filter is a parameter set, and the output is an estimated vehicle weight and a first estimated road slope, wherein the parameter set includes an engine torque, a vehicle speed, and a gear position; A second construction unit is used to construct a GRU-BP slope prediction model, wherein the input of the GRU-BP slope prediction model is an estimated road slope sequence, and the output is a second estimated road slope estimated based on the estimated road slope sequence, wherein the estimated road slope sequence is a sequence composed of a plurality of the first estimated road slopes estimated by using the extended Kalman filter; A first determination unit, used to determine whether the current operating condition of the vehicle at a current moment is a target operating condition, wherein the target operating condition includes a shifting operating condition and a braking operating condition; a second determining unit, configured to determine, when the current operating condition is not the target operating condition, the estimated vehicle weight and the first estimated road slope output by the extended Kalman filter as the final estimated vehicle weight and the final estimated road slope, respectively; The third determination unit is used to determine the second estimated road slope output by the GRU-BP slope prediction model as the final estimated road slope when the current operating condition is the target operating condition, and to determine the estimated vehicle weight estimated by using the extended Kalman filter at a moment before the current moment as the final estimated vehicle weight.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for estimating vehicle weight and road slope according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for performing vehicle weight and road slope estimation as described in any one of claims 1 to 7.