Road slope estimation method and device, computer equipment, readable storage medium and program product
By collecting data in vehicles, using kinematics and dynamic models combined with Kalman filtering algorithms, the problem of insufficient robustness of road slope estimation in the prior art is solved, and more accurate and real-time slope estimation is achieved.
Patent Information
- Application Number
- CN202411336419.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-27
AI Technical Summary
In the prior art, the robustness of road slope estimation results in inaccurate slope estimation, especially due to the limitations of neural network model training sample sets.
By obtaining the test data collected by the vehicle on the road to be tested, using kinematic model and dynamic model for slope prediction, combining Kalman filtering algorithm and recursive least squares method with forgetting factor, comprehensively from kinematic and dynamic dimensions Start and determine the target slope value.
It improves the accuracy of road slope prediction, avoids inaccurate forecasting caused by neural network model training, enhances the real-time and robustness of the algorithm, and can better adapt to road slope changes.
Smart Images

Figure CN119203765A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a road slope estimation method, device, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the rapid development of vehicle technology, accurate road slope estimation plays a vital role in vehicle energy-saving control and driving environment construction. The road slope is directly related to the vehicle's driving safety, driving comfort and fuel economy. Therefore, for modern automotive technology, how to effectively estimate the road slope has become an urgent problem to be solved.
[0003] In related technologies, BP (Back Propagation) neural network technology is usually used to estimate the slope through the wheel vertical load data and calling the corresponding neural network module according to different road types. However, this method is limited by the training sample set and its robustness needs to be further improved, that is, the accuracy of road slope estimation cannot be guaranteed. Summary of the invention
[0004] Based on this, it is necessary to provide a road slope estimation method, device, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of road slope estimation in order to address the above technical problems.
[0005] In a first aspect, the present application provides a road slope estimation method, comprising:
[0006] Acquire test data of the road to be tested, wherein the test data is collected when the vehicle is driving on the road to be tested, and the test data at least includes vehicle state data and road data;
[0007] Based on the road data, the slope of the road to be tested is estimated by a kinematic model to obtain a first reference slope value;
[0008] Based on the vehicle state data, a Kalman filter calculation is performed through a dynamic model to estimate the slope of the road to be tested to obtain a second reference slope value;
[0009] Based on at least one of the first reference slope value and the second reference slope value, a target slope value of the road to be tested is determined.
[0010] In a second aspect, the present application also provides a road slope estimation device, comprising:
[0011] An acquisition module, used for acquiring test data of the road to be tested, wherein the test data is collected when the vehicle is driving on the road to be tested, and the test data at least includes vehicle status data and road data;
[0012] A first estimation module, configured to estimate the slope of the road to be measured based on the road data and through a kinematic model to obtain a first reference slope value;
[0013] A second estimation module, configured to perform Kalman filter calculation based on the vehicle state data through a dynamic model to estimate the slope of the road to be tested and obtain a second reference slope value;
[0014] A determination module is used to determine a target slope value of the road to be tested based on at least one of the first reference slope value and the second reference slope value.
[0015] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0016] Acquire test data of the road to be tested, wherein the test data is collected when the vehicle is driving on the road to be tested, and the test data at least includes vehicle state data and road data;
[0017] Based on the road data, the slope of the road to be tested is estimated by a kinematic model to obtain a first reference slope value;
[0018] Based on the vehicle state data, a Kalman filter calculation is performed through a dynamic model to estimate the slope of the road to be tested to obtain a second reference slope value;
[0019] Based on at least one of the first reference slope value and the second reference slope value, a target slope value of the road to be tested is determined.
[0020] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0021] Acquire test data of the road to be tested, wherein the test data is collected when the vehicle is driving on the road to be tested, and the test data at least includes vehicle state data and road data;
[0022] Based on the road data, the slope of the road to be tested is estimated by a kinematic model to obtain a first reference slope value;
[0023] Based on the vehicle state data, a Kalman filter calculation is performed through a dynamic model to estimate the slope of the road to be tested to obtain a second reference slope value;
[0024] Based on at least one of the first reference slope value and the second reference slope value, a target slope value of the road to be tested is determined.
[0025] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0026] Acquire test data of the road to be tested, wherein the test data is collected when the vehicle is driving on the road to be tested, and the test data at least includes vehicle state data and road data;
[0027] Based on the road data, the slope of the road to be tested is estimated by a kinematic model to obtain a first reference slope value;
[0028] Based on the vehicle state data, a Kalman filter calculation is performed through a dynamic model to estimate the slope of the road to be tested to obtain a second reference slope value;
[0029] Based on at least one of the first reference slope value and the second reference slope value, a target slope value of the road to be tested is determined.
[0030] The above-mentioned road slope estimation method, device, computer equipment, computer-readable storage medium and computer program product obtain test data of the road to be tested, the test data is collected when the vehicle is driving on the road to be tested, and the test data at least includes vehicle state data and road data; based on the road data, the slope of the road to be tested is estimated from the motion dimension through a kinematic model to obtain a first reference slope value; based on the vehicle state data, from the dynamic dimension, a Kalman filter calculation is performed through a dynamic model to estimate the slope of the road to be tested to obtain a second reference slope value; based on at least one of the first reference slope value and the second reference slope value, the target slope value of the road to be tested is determined. In this way, there is no need to consider training sample sets of different road types, which avoids inaccurate estimation due to neural network model training, and the slope is comprehensively estimated through two dimensions to further improve the accuracy of slope estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0032] FIG1 is a schematic diagram of a flow chart of a road slope estimation method according to an embodiment;
[0033] Figure 2 is a schematic diagram of a Kalman filter process in one embodiment;
[0034] Figure 3 is a schematic diagram of a slope estimation process in one embodiment;
[0035] Figure 4 is a structural block diagram of a road slope estimation device in one embodiment;
[0036] FIG. 5 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0038] In an exemplary embodiment, as shown in FIG1 , a road slope estimation method is provided. This embodiment is illustrated by applying the method to a server. It is understandable that the method can also be applied to a terminal, or to a system including a terminal and a server, and implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0039] Step S102, acquiring test data of the road to be tested, wherein the test data is collected when the vehicle is driving on the road to be tested, and the test data at least includes vehicle status data and road data.
[0040] The vehicle state data refers to the data of the vehicle state when the vehicle is traveling on the road to be tested, and the road data refers to the data of the road to be tested. The vehicle state data includes but is not limited to the engine torque, the transmission ratio, the main reducer ratio, the mechanical efficiency of the transmission system, etc. The road data includes the acceleration of gravity along the driving direction.
[0041] Exemplarily, the server obtains test data collected by sensors deployed on the vehicle. For example, the test data includes test data of each test point on the road to be tested, and exemplarily, the test data includes vehicle status data and road data of each test point.
[0042] Step S104: Based on the road data, the slope of the road to be tested is estimated by a kinematic model to obtain a first reference slope value.
[0043] Among them, the kinematic model (longitudinal kinematic model) is used to describe the motion state of the vehicle when driving on the road, providing a theoretical basis for slope estimation. The longitudinal kinematic model is specifically:
[0044] (1)
[0045] in, is the acceleration due to gravity, is the test longitudinal acceleration obtained by the longitudinal acceleration sensor test, is the actual longitudinal acceleration determined based on the actual torque of the vehicle. For the slope.
[0046] Exemplarily, the road data includes a test longitudinal acceleration obtained by testing a longitudinal acceleration sensor at each test point and an actual longitudinal acceleration of the vehicle relative to a reference system.
[0047] Exemplarily, the server calculates the slope based on the road data and the dynamic model using a recursive least squares method with a forgetting factor to obtain a first reference slope value.
[0048] Specifically, the kinetic model is changed to obtain (2) As y, As φ.
[0049] Among them, the recursive least squares method with forgetting factor is an online parameter estimation method that can estimate model parameters only through observation data without prior knowledge. The forgetting factor can help the algorithm adapt to parameter changes, especially when the road slope may change suddenly. The recursive least squares method with forgetting factor uses the recursive formula for solution:
[0050] (3)
[0051] (4)
[0052] (5)
[0053] in, is the slope value corresponding to the kth time, is the slope value corresponding to the k-1th time, is the gain matrix corresponding to k times; is the k-th y, that is, the difference between the tested longitudinal acceleration and the actual longitudinal acceleration at the k-th test point, is the transpose of φ obtained at the kth time (kth test point). is the k-th covariance matrix ( is a constant and a forgetting factor The constant is usually between 0.8 and 1. Select 0.99), is the k-th unit matrix. When k=1, set is the initial slope value.
[0054] Therefore, based on the test data obtained at each test point, it is substituted into (2)-(5) for recursive calculation until the last test point is calculated to obtain the first reference slope value.
[0055] Step S106, based on the vehicle state data, a Kalman filter calculation is performed through a dynamic model to estimate the slope of the road to be tested and obtain a second reference slope value.
[0056] The process of building the kinetic model is as follows:
[0057] Longitudinal force analysis of the vehicle driving on a slope:
[0058] The sum of the driving resistance is:
[0059] in, is the air resistance, is the rolling resistance, is the slope resistance, For acceleration resistance.
[0060]
[0061] in, is the air resistance coefficient, A is the frontal area of the car, is the air density, is the vehicle longitudinal speed, is the rolling resistance coefficient, m is the vehicle mass, is the slope angle, g is the acceleration due to gravity, is the vehicle rotation mass conversion factor, is the vehicle acceleration.
[0062] According to the smooth relationship, ,in is the driving force of the car, namely:
[0063] (10)
[0064] in, is the engine torque, is the transmission ratio, is the main reducer transmission ratio, is the mechanical efficiency of the transmission system, which belongs to the vehicle status data. Combining the above formulas, we can know that:
[0065] (11)
[0066] Among them, Kalman filter is an efficient recursive filter, which can estimate the system state through observation data and model prediction in the presence of uncertainty and noise. For road slope estimation, the slope can be used as the state variable, and the vehicle acceleration, speed and other information can be used as observation data. Figure 2 FIG. 1 is a schematic diagram of a Kalman filtering process in an embodiment.
[0067] The Kalman filter process is explained below. First, the state vector is defined as , and They respectively represent the speed and slope angle of the kth time (the current moment, which can also be regarded as the current number of iterations).
[0068] From the dynamic equation, we can see that the rate of change of vehicle speed (acceleration) is related to the driving force and the road slope. Directly combine it with the speed update equation, discretize it (i.e., change it from continuous time to discrete time), and introduce the state update of the slope, that is, transform formula (11) to obtain Then, based on the relationship between acceleration and velocity, we get get Taking the noise factor into account, the speed change within can be calculated. The speed at time k+1 is equal to the sum of the speed at time k, the speed change and the noise factor, that is, the following formula (12) is obtained:
[0069] (12)
[0070] in is the process noise.
[0071] For slope , using a simple random walk model:
[0072] (13)
[0073] in is the process noise.
[0074] Combine the two state equations together: (14)
[0075] The measurement equation can be written as:
[0076] (15)
[0077] in: is the measurement vector, is the measurement matrix, for speed measurement it is =[1,0], To measure noise.
[0078] Predicted state vector :
[0079] (16)
[0080] State transition matrix:
[0081] (17)
[0082] The driving matrix B is multiplied by the control input Describes the impact of the system's external input on the state, where the driving matrix B is: The speed is mainly affected by the power input:
[0083] Control Input is the driving force term:
[0084] (18)
[0085] The predicted state vector is updated as:
[0086] (19)
[0087] Prediction covariance matrix:
[0088] (20)
[0089] in, is the covariance matrix of the current state estimate, and Q is the process noise covariance matrix.
[0090] Then proceed to the update steps:
[0091] Kalman gain calculation:
[0092] (twenty one)
[0093] H=[1,0], R is the measurement noise covariance matrix.
[0094] Update the state vector:
[0095] (twenty two)
[0096] Finally update the covariance matrix:
[0097] (twenty three)
[0098] In the above process, the vehicle state data of the corresponding test point is obtained in each iteration, and prediction and update are performed based on the vehicle state data. That is, first in the prediction step, the state at the next moment is predicted based on the current state (kth iteration) and the model, that is, based on the vehicle state data of the test point of the current iteration, the state of the next iteration (next moment, or k+1th time) is determined in combination with formulas (16)-(20). Then in the update step, the prediction result is corrected using the actual measured value. Repeated iterations can gradually reduce the uncertainty of speed and slope estimation and provide more accurate estimates, that is, based on the results of (16)-(20) and the actual measured values, the process of formulas (21) to (23) is performed. Until the preset number of iterations is performed, the state vector updated by the last iteration is obtained, the corresponding slope angle is obtained based on the state vector, and the slope angle is used as the second reference slope value.
[0099] Step S108: determining a target slope value of the road to be tested based on at least one of the first reference slope value and the second reference slope value.
[0100] Optionally, after determining the terrain features of the road to be tested, the server selects at least one reference slope value from the first reference slope value and the second reference slope value according to the terrain features, and determines the target slope value based on the selected reference slope value.
[0101] The terrain feature indicates how fast the slope changes, for example, a steep road changes quickly and a flat road changes slowly. The terrain feature can be observed by human eyes, or the road to be tested can be photographed as a whole before the vehicle starts driving on the road to be tested, and the photographed image can be recognized to determine the speed of the slope change. For example, a side view of the road to be tested can be photographed, and a steep road can be analyzed based on the side view.
[0102] If the terrain feature is characterized as a steep road, it means that the slope changes rapidly, and the first reference slope value can be used as the target slope value. If it is a flat road, the second reference slope value can be used as the target slope value.
[0103] Exemplarily, the target gradient value is determined based on the first reference gradient value and the second reference gradient value.
[0104] In some embodiments, determining a target slope value of the road to be tested based on at least one of the first reference slope value and the second reference slope value includes: fusing the first reference slope value and the second reference slope value to determine the target slope value of the road to be tested.
[0105] Exemplarily, the server determines respective weights of the first reference slope value and the second reference slope value, and weights the first reference slope value and the second reference slope value according to the weights to obtain a target slope value.
[0106] Exemplarily, the server takes an average of the first reference slope value and the second reference slope value as the target slope value.
[0107] In this embodiment, by fusing the first reference slope value and the second reference slope value, the slope can be estimated more comprehensively to obtain a target slope value with higher accuracy. In addition, the introduced forgetting factor can eliminate the data saturation phenomenon. The forgetting factor gradually weakens the influence of old data by strengthening the amount of information provided by new data, so that the algorithm has the ability to respond quickly to changes in input process characteristics. The recursive least squares method based on the forgetting factor has good real-time performance and the high precision and robustness of the Kalman filter algorithm, and can estimate the slope with high real-time performance, high precision, low cost and good adaptability to working conditions.
[0108] In some embodiments, the vehicle status data includes the speed value of the vehicle at each test point on the road to be tested, and the first reference slope value and the second reference slope value are integrated to determine the target slope value of the road to be tested, including: calculating the average value of the speed values at each test point to obtain the average speed value, and determining the weight of the first reference slope value based on the average speed value; calculating the difference between a preset first constant value and the weight of the first reference slope value to obtain the weight of the second slope value; weighting the first reference slope value and the second reference slope value according to their respective weights to obtain the target slope value of the road to be tested.
[0109] Exemplarily, the server may also count the speed value with the highest frequency based on the speed values at each test point, and use the speed value with the highest frequency as the weight of the first reference slope value.
[0110] In this embodiment, the weight of the first reference slope value is adaptively adjusted based on the average of the speed values at each test point to determine the weight of the second reference slope value. As a result, a more accurate target slope value can be obtained by combining the reference slope values of the two dimensions based on weighted summation.
[0111] In some embodiments, determining the weight of the first reference slope value according to the average speed value includes: comparing the average speed value with a threshold speed value, and determining the weight of the first reference slope value based on the comparison result.
[0112] The threshold speed value refers to the speed threshold.
[0113] In some embodiments, based on the comparison result, the weight of the first reference slope value is determined, including: if the average speed value is greater than the threshold speed value, an objective function in which the weight changes with the speed value is obtained, and based on the objective function, the weight corresponding to the average speed value is calculated, and the calculated weight is used as the weight of the first reference slope value; if the average speed value is less than or equal to the threshold speed value, a preset second constant value is set as the weight of the first reference slope value.
[0114] Exemplarily, the weight of the first reference slope value is determined by referring to the following formula: :
[0115]
[0116] Among them, e and f are polynomial coefficients, both of which are constants. is the threshold speed value.
[0117] Then, the weight of the second reference slope value .
[0118] In this way, the matching weight can be adaptively determined based on the overall change trend of the vehicle speed, thereby effectively improving the effectiveness of subsequent target slope value determination.
[0119] In this embodiment, the threshold speed value is used as a reference standard for comparison, and the comparison result effectively reflects the overall change trend of the vehicle speed, so that the weight of the first reference slope value matching it can be adaptively determined, thereby improving the reliability and effectiveness of the target slope value.
[0120] In some embodiments, the method also includes: acquiring multiple road images, where the multiple road images are obtained by continuously capturing the road ahead when the vehicle is traveling on the road to be tested; based on the multiple road images, obtaining a third reference slope value through a slope estimation model; and fusing the first reference slope value, the second reference slope value, and the third reference slope value to obtain a target slope value for the road to be tested.
[0121] Among them, the slope prediction model is a neural network model that extracts slope information based on road images to estimate the slope.
[0122] Exemplarily, from the time the vehicle starts to travel on the road to be tested to the time the vehicle completes the road to be tested, the camera equipment deployed on the vehicle collects images of the road ahead of the vehicle at preset time intervals to obtain multiple road images.
[0123] The server obtains multiple road images sent by the camera device, and inputs the trained slope estimation model to obtain a third reference slope value.
[0124] The server may take the average of the first reference slope value, the second reference slope value and the third reference slope value as the target slope value of the road to be tested.
[0125] Alternatively, the first reference slope value and the second reference slope value are related to the vehicle's motion state or power state, that is, the vehicle speed, while the third reference slope value has little to do with the vehicle speed and is determined based on the change in the field of vision of the road ahead of the vehicle. Therefore, after determining the weights of the first reference slope value and the second reference slope value based on the above content, the server performs weighted summation of the first reference slope value and the second reference slope value according to the weights to obtain the sum value. The server takes the average of the sum value and the third reference slope value as the target slope value.
[0126] In this embodiment, multiple road images are obtained, and the multiple road images are obtained by continuously collecting the road ahead when the vehicle is driving on the road to be tested; based on the multiple road images, a third reference slope value is obtained through a slope estimation model; the first reference slope value, the second reference slope value and the third reference slope value are integrated to obtain a target slope value of the road to be tested. Thus, more slope detail information is obtained by combining the power dimension, the motion dimension and the image dimension, so as to comprehensively and accurately determine the target slope value.
[0127] In a specific embodiment, Figure 3 FIG. 1 is a schematic diagram of a slope estimation process in an embodiment. The specific steps are as follows:
[0128] The server obtains the collected data collected and sent by the collection device deployed on the vehicle, and processes the collected data to obtain test data. For example, if the collected data contains incorrect information such as sharp points and burrs, it needs to be corrected or deleted to remove some distorted information and error information to obtain test data. Among them, the test data includes at least vehicle status data and road data.
[0129] The server estimates the slope based on the road data and the longitudinal kinematic model using the recursive least square method with a forgetting factor to obtain a first reference slope value. The server estimates the slope based on the vehicle state data and the dynamic model using the Kalman filter algorithm to obtain a second reference slope value.
[0130] The server determines the terrain features. The terrain feature determination step includes: before the vehicle starts driving on the road to be tested, the road to be tested is photographed as a whole in advance, the photographed image is recognized, and the result of how fast the slope changes is determined. For example, a side view of the road to be tested is photographed, and the steep road is analyzed based on the side view. If the terrain feature is characterized as a steep road, it means that the slope changes quickly, and the first reference slope value can be used as the target slope value. If it is a flat road, the second reference slope value is used as the target slope value. If the terrain feature is neither a steep road nor a flat road, the first reference slope value and the second slope value are fused to obtain a fused slope value, and the target slope value is obtained based on the fused slope value.
[0131] Alternatively, the server does not obtain the terrain features, but directly fuses the first reference slope value and the second slope value to obtain a fused slope value, and obtains the target slope value based on the fused slope value.
[0132] The fusion slope value determination step includes: the server obtains the speed value of each test point of the vehicle on the road to be tested from the vehicle state data. The server calculates the average value of the speed values of each test point to obtain the average speed value. If the average speed value is greater than the threshold speed value, an objective function whose weight changes with the speed value is obtained, and based on the objective function, the weight corresponding to the average speed value is calculated, and the calculated weight is used as the weight of the first reference slope value; if the average speed value is less than or equal to the threshold speed value, a preset second constant value is set as the weight of the first reference slope value.
[0133] The server calculates the difference between the preset first constant value and the weight of the first reference slope value to obtain the weight of the second slope value; weights the first reference slope value and the second reference slope value according to their respective weights to obtain a fused slope value.
[0134] The target slope value determination step includes: the server uses the fused slope value as the target slope value. Alternatively, the server obtains multiple road images, which are obtained by continuously capturing the road ahead when the vehicle is driving on the road to be tested; based on the multiple road images, a third reference slope value is obtained through a slope estimation model. The server takes the average of the fused slope value and the third reference slope value to obtain the target slope value.
[0135] In this embodiment, by acquiring the test data of the road to be tested, the test data is collected when the vehicle is driving on the road to be tested, and the test data includes at least vehicle state data and road data; based on the road data, the slope of the road to be tested is estimated from the motion dimension through the kinematic model to obtain a first reference slope value; based on the vehicle state data, from the dynamic dimension, the Kalman filter calculation is performed through the dynamic model to estimate the slope of the road to be tested to obtain a second reference slope value; based on at least one of the first reference slope value and the second reference slope value, the target slope value of the road to be tested is determined. In this way, there is no need to consider the training sample sets of different road types, avoiding inaccurate estimation due to neural network model training, and comprehensively estimating the slope through two dimensions to further improve the accuracy of slope estimation.
[0136] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0137] Based on the same inventive concept, the embodiment of the present application also provides a road slope estimation device for implementing the road slope estimation method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations of one or more road slope estimation device embodiments provided below can refer to the above limitations on the road slope estimation method, and will not be repeated here.
[0138] In an exemplary embodiment, Figure 4 As shown, a road slope estimation device 400 is provided, comprising: an acquisition module 402, a first estimation module 404, a second estimation module 406 and a determination module 408, wherein:
[0139] An acquisition module 402 is used to acquire test data of the road to be tested, where the test data is collected when the vehicle is driving on the road to be tested, and the test data at least includes vehicle state data and road data;
[0140] A first estimation module 404 is used to estimate the slope of the road to be measured based on the road data and through a kinematic model to obtain a first reference slope value;
[0141] A second estimation module 406 is used to perform Kalman filter calculation through a dynamic model based on the vehicle state data to estimate the slope of the road to be measured and obtain a second reference slope value;
[0142] The determination module 408 is used to determine a target slope value of the road to be tested based on at least one of the first reference slope value and the second reference slope value.
[0143] In some embodiments, the determination module 408 is used to fuse the first reference slope value and the second reference slope value to determine the target slope value of the road to be tested.
[0144] In some embodiments, the vehicle status data includes the speed value of the vehicle at each test point on the road to be tested, and the determination module 408 is used to calculate the average value of the speed values at each test point to obtain the average speed value, and determine the weight of the first reference slope value based on the average speed value; calculate the difference between the preset first constant value and the weight of the first reference slope value to obtain the weight of the second slope value; weight the first reference slope value and the second reference slope value according to their respective weights to obtain the target slope value of the road to be tested.
[0145] In some embodiments, the determination module 408 is configured to compare the average speed value with the threshold speed value, and determine the weight of the first reference slope value based on the comparison result.
[0146] In some embodiments, the determination module 408 is used to obtain an objective function whose weight changes with the speed value if the average speed value is greater than the threshold speed value, and calculate the weight corresponding to the average speed value based on the objective function, and use the calculated weight as the weight of the first reference slope value; if the average speed value is less than or equal to the threshold speed value, the preset second constant value is set as the weight of the first reference slope value.
[0147] In some embodiments, the determination module 408 is also used to obtain multiple road images, which are obtained by continuously capturing the road ahead when the vehicle is traveling on the road to be tested; based on the multiple road images, a third reference slope value is obtained through a slope estimation model; the first reference slope value, the second reference slope value and the third reference slope value are integrated to obtain a target slope value of the road to be tested.
[0148] Each module in the above-mentioned road slope estimation device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0149] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG5. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a road slope estimation method is implemented.
[0150] Those skilled in the art will understand that the structure shown in FIG. 5 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0151] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: acquiring test data of a road to be tested, wherein the test data is collected when a vehicle is driving on the road to be tested, and the test data includes at least vehicle state data and road data; based on the road data, estimating the slope of the road to be tested through a kinematic model to obtain a first reference slope value; based on the vehicle state data, performing Kalman filter calculation through a dynamic model to estimate the slope of the road to be tested to obtain a second reference slope value; and determining a target slope value of the road to be tested based on at least one of the first reference slope value and the second reference slope value.
[0152] In one embodiment, when the processor executes the computer program, the following steps are further implemented: the first reference slope value and the second reference slope value are integrated to determine the target slope value of the road to be tested.
[0153] In one embodiment, the vehicle status data includes the speed value of the vehicle at each test point on the road to be tested, and the processor further implements the following steps when executing the computer program: calculating the average value of the speed values at each test point to obtain the average speed value, and determining the weight of the first reference slope value based on the average speed value; calculating the difference between a preset first constant value and the weight of the first reference slope value to obtain the weight of the second slope value; and weighting the first reference slope value and the second reference slope value according to their respective weights to obtain the target slope value of the road to be tested.
[0154] In one embodiment, when the processor executes the computer program, the following steps are further implemented: comparing the average speed value with the threshold speed value, and determining the weight of the first reference slope value based on the comparison result.
[0155] In one embodiment, the processor also implements the following steps when executing the computer program: if the average speed value is greater than the threshold speed value, obtain an objective function whose weight changes with the speed value, and based on the objective function, calculate the weight corresponding to the average speed value, and use the calculated weight as the weight of the first reference slope value; if the average speed value is less than or equal to the threshold speed value, set a preset second constant value as the weight of the first reference slope value.
[0156] In one embodiment, when the processor executes the computer program, the following steps are also implemented: acquiring multiple road images, where the multiple road images are obtained by continuously capturing the road ahead when the vehicle is traveling on the road to be tested; obtaining a third reference slope value based on the multiple road images through a slope estimation model; and obtaining a target slope value of the road to be tested by fusing the first reference slope value, the second reference slope value, and the third reference slope value.
[0157] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining test data of a road to be tested, the test data being collected when a vehicle is driving on the road to be tested, and the test data at least including vehicle state data and road data; based on the road data, estimating the slope of the road to be tested through a kinematic model to obtain a first reference slope value; based on the vehicle state data, performing Kalman filter calculation through a dynamic model to estimate the slope of the road to be tested to obtain a second reference slope value; based on at least one of the first reference slope value and the second reference slope value, determining a target slope value of the road to be tested.
[0158] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: the first reference slope value and the second reference slope value are integrated to determine the target slope value of the road to be tested.
[0159] In one embodiment, the vehicle status data includes the speed value of the vehicle at each test point on the road to be tested. When the computer program is executed by the processor, the following steps are also implemented: calculating the average value of the speed values at each test point to obtain the average speed value, and determining the weight of the first reference slope value based on the average speed value; calculating the difference between a preset first constant value and the weight of the first reference slope value to obtain the weight of the second slope value; weighting the first reference slope value and the second reference slope value according to their respective weights to obtain the target slope value of the road to be tested.
[0160] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: comparing the average speed value with the threshold speed value, and determining the weight of the first reference slope value based on the comparison result.
[0161] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the average speed value is greater than the threshold speed value, an objective function whose weight changes with the speed value is obtained, and based on the objective function, the weight corresponding to the average speed value is calculated, and the calculated weight is used as the weight of the first reference slope value; if the average speed value is less than or equal to the threshold speed value, a preset second constant value is set as the weight of the first reference slope value.
[0162] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: acquiring multiple road images, where the multiple road images are obtained by continuously capturing the road ahead when the vehicle is traveling on the road to be tested; obtaining a third reference slope value based on the multiple road images through a slope estimation model; and obtaining a target slope value of the road to be tested by fusing the first reference slope value, the second reference slope value, and the third reference slope value.
[0163] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: acquiring test data of a road to be tested, the test data being collected when a vehicle is driving on the road to be tested, and the test data at least including vehicle state data and road data; estimating the slope of the road to be tested through a kinematic model based on the road data to obtain a first reference slope value; performing Kalman filter calculation through a dynamic model based on the vehicle state data to estimate the slope of the road to be tested to obtain a second reference slope value; and determining a target slope value of the road to be tested based on at least one of the first reference slope value and the second reference slope value.
[0164] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: the first reference slope value and the second reference slope value are integrated to determine the target slope value of the road to be tested.
[0165] In one embodiment, the vehicle status data includes the speed value of the vehicle at each test point on the road to be tested. When the computer program is executed by the processor, the following steps are also implemented: calculating the average value of the speed values at each test point to obtain the average speed value, and determining the weight of the first reference slope value based on the average speed value; calculating the difference between a preset first constant value and the weight of the first reference slope value to obtain the weight of the second slope value; weighting the first reference slope value and the second reference slope value according to their respective weights to obtain the target slope value of the road to be tested.
[0166] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: comparing the average speed value with the threshold speed value, and determining the weight of the first reference slope value based on the comparison result.
[0167] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the average speed value is greater than the threshold speed value, an objective function whose weight changes with the speed value is obtained, and based on the objective function, the weight corresponding to the average speed value is calculated, and the calculated weight is used as the weight of the first reference slope value; if the average speed value is less than or equal to the threshold speed value, a preset second constant value is set as the weight of the first reference slope value.
[0168] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: acquiring multiple road images, where the multiple road images are obtained by continuously capturing the road ahead when the vehicle is traveling on the road to be tested; obtaining a third reference slope value based on the multiple road images through a slope estimation model; and obtaining a target slope value of the road to be tested by fusing the first reference slope value, the second reference slope value, and the third reference slope value.
[0169] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0170] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0171] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0172] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A road slope estimation method, characterized in that: The method comprises: Acquire test data of the road to be tested, wherein the test data is collected when the vehicle is driving on the road to be tested, and the test data at least includes vehicle state data and road data; Based on the road data, the slope of the road to be tested is estimated by a kinematic model to obtain a first reference slope value; Based on the vehicle state data, a Kalman filter calculation is performed through a dynamic model to estimate the slope of the road to be tested to obtain a second reference slope value; Based on at least one of the first reference slope value and the second reference slope value, a target slope value of the road to be tested is determined.
2. The method according to claim 1, characterized in that The step of determining a target slope value of the road to be tested based on at least one of the first reference slope value and the second reference slope value comprises: The first reference slope value and the second reference slope value are integrated to determine a target slope value of the road to be tested.
3. The method according to claim 2, characterized in that The vehicle state data includes the speed value of the vehicle at each test point on the road to be tested, and the fusing of the first reference slope value and the second reference slope value to determine the target slope value of the road to be tested includes: Calculate the average of the speed values of each test point to obtain an average speed value, and determine the weight of the first reference slope value according to the average speed value; Calculate the difference between a preset first constant value and the weight of the first reference slope value to obtain the weight of the second slope value; The first reference slope value and the second reference slope value are weighted according to their respective weights to obtain a target slope value of the road to be tested.
4. The method according to claim 3, characterized in that Determining the weight of the first reference slope value according to the average speed value includes: The average speed value is compared with a threshold speed value, and a weight of the first reference gradient value is determined based on the comparison result.
5. The method according to claim 4, characterized in that The step of determining the weight of the first reference slope value based on the comparison result includes: If the average speed value is greater than the threshold speed value, an objective function whose weight changes with the speed value is obtained, and based on the objective function, a weight corresponding to the average speed value is calculated, and the calculated weight is used as the weight of the first reference slope value; If the average speed value is less than or equal to the threshold speed value, a preset second constant value is set as the weight of the first reference slope value.
6. The method according to claim 1, characterized in that The method further comprises: Acquire a plurality of road images, wherein the plurality of road images are obtained by continuously capturing the road ahead when the vehicle is traveling on the road to be tested; Based on the multiple road images, a third reference slope value is obtained through a slope estimation model; The first reference slope value, the second reference slope value and the third reference slope value are integrated to obtain a target slope value of the road to be tested.
7. A road slope estimation device, characterized in that: The device comprises: An acquisition module, used for acquiring test data of the road to be tested, wherein the test data is collected when the vehicle is driving on the road to be tested, and the test data at least includes vehicle status data and road data; A first estimation module, configured to estimate the slope of the road to be measured based on the road data and through a kinematic model to obtain a first reference slope value; A second estimation module, configured to perform Kalman filter calculation based on the vehicle state data through a dynamic model to estimate the slope of the road to be tested and obtain a second reference slope value; A determination module is used to determine a target slope value of the road to be tested based on at least one of the first reference slope value and the second reference slope value.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
