Gradient identification method and device, vehicle and computer readable storage medium
By extending the recursive update mechanism of the Kalman filter model, the noise is suppressed and the slope estimation is optimized, the problem of low slope recognition accuracy caused by sensor data error is solved, the accuracy and robustness of slope recognition is improved, and the electric vehicle is improved Performance and security.
Patent Information
- Application Number
- CN202411193662.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-03
AI Technical Summary
The existing slope recognition methods rely on vehicle sensor data, and there are error and noise problems, resulting in low slope recognition accuracy.
The extended Kalman filtering model is adopted to suppress noise, optimize slope estimation values, and improve slope recognition accuracy through recursive updates of the prediction result vector and observation vector.
It effectively improves the accuracy and robustness of slope recognition, provides more accurate slope information, and improves the energy management and driving safety of electric vehicles.
Smart Images

Figure CN119058709A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent driving technology, and in particular to a slope identification method, device, vehicle and computer-readable storage medium. Background Art
[0002] During the driving process of a car, the road slope has a significant impact on the vehicle's energy consumption, driving stability and safety. Specifically, when going uphill, the vehicle needs to consume more energy to overcome the effect of gravity, and when going downhill, it needs to use braking or energy recovery systems to reduce energy consumption. At the same time, the change in slope will directly affect the vehicle's driving stability. Therefore, accurate slope information is crucial to improving the vehicle's energy management efficiency and driving safety.
[0003] At present, the commonly used slope identification method relies on various sensors equipped on the vehicle, which detect the acceleration and body speed of the vehicle in real time, and determine the slope of the road the vehicle is currently on based on the acceleration and speed detected by the sensors. However, since the data collected by the sensors in different driving scenarios have different degrees of errors and noise, the method of obtaining the road slope based on sensor data has the problem of low slope identification accuracy.
[0004] Therefore, how to improve the accuracy of slope identification is a problem that needs to be solved urgently. Summary of the invention
[0005] The main purpose of the present application is to provide a slope identification method, device, vehicle and computer-readable storage medium, aiming to improve the accuracy of slope identification.
[0006] To achieve the above object, the present application provides a slope identification method, which comprises:
[0007] Determine a first prediction result vector of the target vehicle at a first moment based on the extended Kalman filter model, wherein the first prediction result vector represents a predicted driving speed, a predicted acceleration, and a predicted slope of the road on which the target vehicle is located;
[0008] Acquire a detected driving speed and a detected acceleration of the target vehicle at a second moment, and construct an observation vector based on the detected driving speed and the detected acceleration, wherein the first moment and the second moment are adjacent slope identification moments, and the first moment is earlier than the second moment;
[0009] The first prediction result vector and the observation vector are input into the extended Kalman filter model to obtain the target slope of the road where the target vehicle is located at the second moment.
[0010] In one embodiment, the step of determining a first prediction result vector of the target vehicle at the first moment based on the extended Kalman filter model includes:
[0011] Determine a state transfer matrix of the target vehicle from a first moment to a second moment, wherein the state transfer matrix represents a state evolution law of the target vehicle from the first moment to the second moment;
[0012] A priori calculation is performed based on the extended Kalman filter model, the preset initial state vector and the state transfer matrix to obtain a first prediction result vector of the target vehicle at the first moment.
[0013] In one embodiment, the step of determining a state transition matrix of the target vehicle from a first moment to a second moment includes:
[0014] A state equation is constructed based on a preset vehicle kinematics formula and a noise vector, wherein the vehicle kinematics formula represents the relationship between the vehicle's driving speed, acceleration, and the slope of the road on which the vehicle is located, and the state equation represents the updating method of the state estimation value of the target vehicle;
[0015] A state transfer matrix of the target vehicle from the first moment to the second moment is extracted from the state quantity equation.
[0016] In one embodiment, the step of inputting the first prediction result vector and the observation vector into the extended Kalman filter model to obtain the target slope of the road where the target vehicle is located at the second moment includes:
[0017] Inputting the first prediction result vector and the observation vector into the extended Kalman filter model to multiply the first prediction result vector by the state transfer matrix to obtain a second prediction result vector of the target vehicle at the second moment;
[0018] A posterior calculation is performed based on the extended Kalman filter model, the second prediction result vector and the observation vector to obtain a target slope of the road where the target vehicle is located at the second moment.
[0019] In one embodiment, the step of performing a posteriori calculation based on the extended Kalman filter model, the second prediction result vector and the observation vector to obtain the target slope of the road where the target vehicle is located at the second moment includes:
[0020] Determine an observation matrix based on the second prediction result vector and the observation vector, wherein the observation matrix represents a mapping relationship between the second prediction result vector and the observation vector;
[0021] Determining a Kalman gain based on the state transfer matrix, the observation matrix, a preset process noise covariance matrix, and a preset measurement noise covariance matrix;
[0022] A posterior calculation is performed based on the extended Kalman filter model, the second prediction result vector, the observation vector, the observation matrix and the Kalman gain to obtain the target slope of the road where the target vehicle is located at the second moment.
[0023] In one embodiment, the step of obtaining the detected driving speed and detected acceleration of the target vehicle at the second moment includes:
[0024] Obtain the front axle speed signal, motor speed and transmission ratio of the target vehicle;
[0025] Determining a first speed based on the front axle shaft speed signal, and determining a second speed based on the motor speed and the gear ratio;
[0026] A weighted sum is performed on the first speed and the second speed to obtain a detected driving speed of the target vehicle.
[0027] In addition, to achieve the above-mentioned purpose, the present application also provides a slope identification device, the slope identification device comprising:
[0028] A determination module, configured to determine a first prediction result vector of a target vehicle at a first moment based on an extended Kalman filter model, wherein the first prediction result vector represents a predicted driving speed, a predicted acceleration, and a predicted slope of a road of the target vehicle;
[0029] A construction module, used to obtain a detected driving speed and a detected acceleration of the target vehicle at a second moment, and to construct an observation vector based on the detected driving speed and the detected acceleration, wherein the first moment and the second moment are adjacent slope identification moments, and the first moment is earlier than the second moment;
[0030] The slope identification module is used to input the first prediction result vector and the observation vector into the extended Kalman filter model to obtain the target slope of the road where the target vehicle is located at the second moment.
[0031] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and the computer-readable storage medium stores a program for implementing the slope identification method. The program for implementing the slope identification method is executed by a processor to implement the steps of the slope identification method as described above.
[0032] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, including a computer program, which implements the steps of the slope identification method as described above when executed by a processor.
[0033] The present application provides a slope identification method. The present application determines a first prediction result vector of a target vehicle at a first moment based on an extended Kalman filter model, wherein the first prediction result vector represents the predicted driving speed, predicted acceleration and predicted slope of the road where the target vehicle is located, and obtains the detected driving speed and detected acceleration of the target vehicle at a second moment, and constructs an observation vector based on the detected driving speed and detected acceleration, wherein the first moment and the second moment are adjacent slope identification moments, and the first moment is earlier than the second moment, and finally inputs the first prediction result vector and the observation vector into the extended Kalman filter model to obtain the target slope of the road where the target vehicle is located at the second moment.
[0034] In this way, compared with the traditional method of relying on data detected by vehicle sensors to directly calculate the slope of the road where the vehicle is located, which is affected by noise and leads to low slope identification accuracy, the present application inputs the prediction result vector of the target vehicle at the previous moment and the observation vector at the current moment into the extended Kalman filter model. Through the built-in recursive update mechanism and filtering mechanism of the extended Kalman filter model, it is possible to adjust the state estimate value according to the new observation data and effectively suppress noise, that is, optimize the slope of the road where the target vehicle is located, thereby improving the accuracy of the slope identification result. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0037] Figure 1 This is a flow chart of the first embodiment of the slope identification method of the present application;
[0038] Figure 2 A schematic diagram of an extended Kalman filter model architecture involved in an embodiment of the slope identification method of the present application;
[0039] Figure 3 A schematic diagram of an extended Kalman filter process involved in an embodiment of the slope identification method of the present application;
[0040] Figure 4 A schematic diagram of a process of constructing an extended Kalman filter model involved in an embodiment of the slope identification method of the present application;
[0041] Figure 5 This is a schematic diagram of the module structure of the slope identification device of this application;
[0042] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the slope identification method in the embodiment of the present application.
[0043] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0045] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0046] The main solution of the present application is: determining a first prediction result vector of a target vehicle at a first moment based on an extended Kalman filter model, wherein the first prediction result vector represents the predicted driving speed, predicted acceleration and predicted slope of the road on which the target vehicle is located; obtaining the detected driving speed and detected acceleration of the target vehicle at a second moment, and constructing an observation vector based on the detected driving speed and the detected acceleration, wherein the first moment and the second moment are adjacent slope identification moments, and the first moment is earlier than the second moment; inputting the first prediction result vector and the observation vector into the extended Kalman filter model to obtain the target slope of the road on which the target vehicle is located at the second moment.
[0047] At present, the commonly used slope identification method relies on various sensors equipped on the vehicle, which detect the acceleration and body speed of the vehicle in real time, and determine the slope of the road the vehicle is currently on based on the acceleration and speed detected by the sensors. However, since the data collected by the sensors in different driving scenarios have different degrees of errors and noise, the method of obtaining the road slope based on sensor data has the problem of low slope identification accuracy.
[0048] In addition, with the rapid development of sensor technology and data processing technology, the slope identification method based on the extended Ka lman filter algorithm has gradually attracted attention. The extended Ka lman filter algorithm is a state estimation method suitable for nonlinear systems. By introducing the linear approximation of nonlinear systems, the Ka lman filter algorithm can be applied to nonlinear systems, thereby realizing accurate identification of slope information. Based on this background, the present application adopts the existing slope identification method based on the extended Ka lman filter algorithm. A common method is to obtain the real-time dynamic information of the vehicle, including acceleration and angular velocity, etc., through the gyroscope and acceleration sensor installed on the vehicle. Due to the large error, the extended Ka lman filter algorithm can be used to process and analyze this information to identify the slope information of the vehicle. However, this method still has some problems in practical applications, specifically: first, sensor devices such as gyroscopes and acceleration sensors may have errors and noise, which will affect the accuracy of slope identification; second, road slope information is often affected by multiple factors, such as vehicle load, driving speed, road conditions, etc., these factors will be affected by the slope identification results, so accurate slope information is crucial. In view of the above problems, the present application proposes an improved slope identification method based on an extended Ka lman filter algorithm. The present application obtains the real-time dynamic information of the vehicle through a sensor device, and pre-processes and filters the information to eliminate most of the errors and distorted signals. Then, the extended Ka lman filter algorithm is used to further process and analyze the pre-processed signal to identify the slope information of the vehicle.
[0049] This application inputs the prediction result vector of the target vehicle at the previous moment and the observation vector at the current moment into the extended Kalman filter model, and can adjust the state estimation value according to the new observation data and effectively suppress noise through the built-in recursive update mechanism and filtering mechanism of the extended Kalman filter model, that is, optimize the slope of the road where the target vehicle is located, thereby improving the accuracy of the slope identification result, and having strong robustness and adaptability. At the same time, this application can also provide accurate slope information support for the energy management, driving assistance and other systems of electric vehicles, thereby improving the performance and safety of electric vehicles.
[0050] It should be noted that the execution subject of the method in each embodiment of the energy storage system configuration method of the present application may be a vehicle control system, and this embodiment does not specifically limit this. The following takes the vehicle control system as an example to illustrate this embodiment and the following embodiments. For ease of description, the following description is made by omitting the execution subject.
[0051] Based on this, the present application proposes a slope identification method of the first embodiment, please refer to Figure 1 The slope identification method includes steps S10 to S30:
[0052] Step S10, determining a first prediction result vector of the target vehicle at a first moment based on the extended Kalman filter model, wherein the first prediction result vector represents a predicted driving speed, a predicted acceleration, and a predicted slope of the road of the target vehicle;
[0053] It should be noted that the prediction result vector of the vehicle represents the vehicle's driving speed, acceleration and slope of the road, and all the data in the prediction result vector are predicted values, so the driving speed in the prediction result vector is called the predicted driving speed, the acceleration in the prediction result vector is called the predicted acceleration, and the road slope in the prediction result vector is called the predicted slope.
[0054] In this embodiment, a prediction result vector of the target vehicle at the first moment (hereinafter referred to as the first prediction result vector for distinction) is determined based on the extended Kalman filter model.
[0055] It should be noted that the extended Kalman filter model includes five iterative formulas, as follows:
[0056]
[0057] in, Represents the prediction result vector (prior estimate) of the vehicle at time k; Represents the prediction result vector of the vehicle at time k-1; represents the posterior estimate of the vehicle at time k; z k represents the observation vector of the vehicle at time k; A is the state transfer matrix; B is the control matrix, and B is fixed to 0; U is the control vector; Q is the process noise covariance matrix, and Q can be adjusted according to actual needs. In this embodiment, Q is expressed as:
[0058]
[0059] H is the unit conversion matrix (ie, the observation matrix); R is the measurement noise covariance matrix, and R can be adjusted according to actual needs. In this embodiment, R is expressed as:
[0060]
[0061] P is the state covariance matrix, fix P, and P is expressed as:
[0062]
[0063] For example, Figure 2The figure shows a schematic diagram of the extended Kalman filter model architecture. First, the road slope at the current moment is calculated a priori to obtain a priori estimated value; at the same time, the Kalman gain is calculated based on the covariance matrix of the prior error, and a posteriori calculation is performed based on the Kalman gain and the prior estimated value to obtain a posterior estimated value, that is, the final target slope; and the covariance matrix of the prior error and the Kalman gain calculated in one cycle participate in the error covariance update of the next cycle to obtain a new error covariance, so that the new error covariance can participate in the calculation of the "covariance matrix of the prior error" in the next cycle.
[0064] In one feasible implementation, based on the prior calculation formula in the extended Kalman filter model: Determine a first prediction result vector of the target vehicle at a first moment.
[0065] Step S20, obtaining a detected driving speed and a detected acceleration of the target vehicle at a second moment, and constructing an observation vector based on the detected driving speed and the detected acceleration, wherein the first moment and the second moment are adjacent slope identification moments, and the first moment is earlier than the second moment;
[0066] In this embodiment, the front axle speed sensor and longitudinal acceleration sensor provided on the target vehicle are used to detect the driving speed (hereinafter referred to as the detected driving speed for distinction) and acceleration (hereinafter referred to as the detected acceleration for distinction) of the target vehicle at the second moment, and an observation vector is constructed based on the detected driving speed and the detected acceleration, wherein it should be noted that the first moment and the second moment are adjacent slope identification moments, and the first moment is earlier than the second moment.
[0067] In one feasible implementation, the detected driving speed of the target vehicle at the second moment detected by the front axle speed sensor is obtained as v(k), and the detected acceleration of the target vehicle at the second moment detected by the longitudinal acceleration sensor is obtained as a x (k), based on v(k) and a x (k) construct an observation vector, where the observation vector is expressed as Z(k)=[v(k)a x (k)] T It should be understood that k in the above expression represents the second moment.
[0068] Step S30, inputting the first prediction result vector and the observation vector into the extended Kalman filter model to obtain the target slope of the road where the target vehicle is located at the second moment.
[0069] In this embodiment, the first prediction result vector of the target vehicle at the first moment and the observation vector of the target vehicle at the second moment are input into the extended Kalman filter model to obtain the slope of the road where the target vehicle is located at the second moment (hereinafter referred to as the target slope for distinction).
[0070] In this embodiment, the step S10 may include:
[0071] Step S101, determining a state transfer matrix of a target vehicle from a first moment to a second moment, wherein the state transfer matrix represents a state evolution law of the target vehicle from the first moment to the second moment;
[0072] It should be noted that the state transfer matrix of the target vehicle from the first moment to the second moment represents the state evolution law of the target vehicle from the first moment to the second moment, that is, the state evolution law of the state vector of the target vehicle at the first moment to the state vector at the second moment, wherein the state vector includes the driving speed, acceleration and the slope of the road.
[0073] In a specific implementation, the step S101 may include:
[0074] Step A10, constructing a state quantity equation based on a preset vehicle kinematics formula and a noise vector, wherein the vehicle kinematics formula represents the relationship between the vehicle's driving speed, acceleration, and the slope of the road on which the vehicle is located, and the state quantity equation represents the updating method of the state estimation value of the target vehicle;
[0075] It should be noted that the preset vehicle kinematics formula is θ, where a x is the acceleration measured by the longitudinal acceleration sensor; is the vehicle acceleration, which can be calculated by the ratio of the reference vehicle speed difference of adjacent cycles to a single message cycle, specifically expressed as:
[0076]
[0077] g is the acceleration of gravity, and g is 9.8; θ is the slope angle of the road where the vehicle is located. The noise vector is preset as
[0078]
[0079] In this embodiment, the state vector of the vehicle at time k and the state vector of the vehicle at time k-1 are constructed and expressed as:
[0080]
[0081]
[0082] The state equation is constructed based on the state vectors at the above two moments, the vehicle kinematics formula and the noise vector as follows:
[0083] v(k)=v(k-1)+a x (k-1)-gsin[θ(k-1)]]Δt+w1(k-1)
[0084] a x (k) = a x (k-1)+w1(k-1)
[0085] sinθ(k)]=sin[θ(k-1)]+w2(k-1)
[0086] Step A20, extracting the state transfer matrix of the target vehicle from the first moment to the second moment from the state quantity equation.
[0087] In this embodiment, after the state quantity equation is obtained, the state transfer matrix of the target vehicle from the first moment to the second moment is extracted from the state quantity equation.
[0088] In this embodiment, the discrete state equations give the vehicle speed v(k), acceleration a x (k) and the slope sine value sinθ(k)] are iterative updates: w1(k-1), w2(k-1) and w3(k-1) are noise terms used to simulate the uncertainty or measurement error of the system. The state space equation is constructed based on the above state quantity equation:
[0089]
[0090] So the state transfer matrix is obtained as:
[0091]
[0092] Thus, the embodiment of the present application is based on the kinematic principle formula θ, constructs an accurate state vector and state transfer matrix, providing a reliable mathematical model foundation for Kalman filtering.
[0093] Step S102, performing a priori calculation based on the extended Kalman filter model, the preset initial state vector and the state transfer matrix to obtain a first prediction result vector of the target vehicle at the first moment.
[0094] According to the a priori calculation formula in the extended Kalman filter model, a priori calculation is performed based on a preset initial state vector and the state transfer matrix to obtain a first prediction result vector of the target vehicle at the first moment.
[0095] It should be noted that the prior calculation formula in the extended Kalman filter model is: In addition, after the target vehicle is powered on and the sensors on the target vehicle are enabled, the current driving speed and acceleration of the target vehicle are detected by the sensors on the vehicle, and the detected driving speed and acceleration are substituted into the vehicle kinematics formula to obtain the slope of the road where the target vehicle is currently located. Then, an initial state vector is constructed based on the current driving speed, acceleration and slope of the road where the target vehicle is located, so that the prior estimation values corresponding to each subsequent slope identification moment are iterated based on the initial state vector.
[0096] In this embodiment, according to the a priori calculation formula in the extended Kalman filter model, based on the preset initial state vector and state transfer matrix, the first prediction result vector of the target vehicle at the first moment is determined.
[0097] The embodiment of the present application determines a first prediction result vector of a target vehicle at a first moment based on an extended Kalman filter model, wherein the first prediction result vector represents the predicted driving speed, predicted acceleration and predicted slope of the road where the target vehicle is located, and obtains the detected driving speed and detected acceleration of the target vehicle at a second moment, and constructs an observation vector based on the detected driving speed and detected acceleration, wherein the first moment and the second moment are adjacent slope identification moments, and the first moment is earlier than the second moment, and finally inputs the first prediction result vector and the observation vector into the extended Kalman filter model to obtain the target slope of the road where the target vehicle is located at the second moment.
[0098] In this way, compared with the traditional method of relying on data detected by vehicle sensors to directly calculate the slope of the road where the vehicle is located, which is affected by noise and leads to low slope identification accuracy, the embodiment of the present application inputs the prediction result vector of the target vehicle at the previous moment and the observation vector at the current moment into the extended Kalman filter model. Through the recursive update mechanism and filtering mechanism built into the extended Kalman filter model, it is possible to adjust the state estimate value according to the new observation data and effectively suppress noise, that is, optimize the slope of the road where the target vehicle is located, thereby improving the accuracy of the slope identification result.
[0099] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. On this basis, the step S30 may include:
[0100] Step S301, inputting the first prediction result vector and the observation vector into the extended Kalman filter model to multiply the first prediction result vector by the state transfer matrix to obtain a second prediction result vector of the target vehicle at the second moment;
[0101] In this embodiment, the first prediction result vector and the observation vector are input into the extended Kalman filter model, and based on the posterior calculation formula in the extended Kalman filter model, the first prediction result vector of the target vehicle at the first moment is multiplied by the state transfer matrix to obtain the prediction result vector of the target vehicle at the second moment (hereinafter referred to as the second prediction result vector for distinction).
[0102] Step S302, performing a posteriori calculation based on the extended Kalman filter model, the second prediction result vector and the observation vector to obtain a target slope of the road where the target vehicle is located at the second moment.
[0103] It should be noted that the posterior calculation formula of the extended Kalman filter model is:
[0104] In this embodiment, the second prediction result vector and the observation vector are input into the posterior calculation formula of the extended Kalman filter model to perform a posterior calculation to obtain the target slope of the road where the target vehicle is located at the second moment.
[0105] In this embodiment, the step S302 may include:
[0106] Step S3021, determining a measurement matrix based on the second prediction result vector and the observation vector, wherein the measurement matrix represents a mapping relationship between the second prediction result vector and the observation vector;
[0107] In this embodiment, the observation matrix is determined based on the second prediction result vector and the observation vector, wherein the observation matrix represents the mapping relationship between the second prediction result vector and the observation vector.
[0108] In a specific embodiment, the observation vector is represented as Z(k)=[v(k)a x (k)] T , the second prediction result vector is represented as x(k), and the observation equation is constructed based on the observation vector and the second prediction result vector, which is expressed as:
[0109]
[0110] Where v is the noise vector, That is, v includes two-dimensional noise terms. In this way, the observation matrix is determined based on the above observation equation as:
[0111] Thus, the embodiment of the present application is based on the kinematic principle formula , constructing accurate observation vectors and observation matrices, providing a reliable mathematical model foundation for Kalman filtering.
[0112] Step S3022, determining a Kalman gain based on the state transfer matrix, the observation matrix, a preset process noise covariance matrix, and a preset measurement noise covariance matrix;
[0113] It should be noted that the Kalman gain formula in the extended Kalman filter model is:
[0114] Among them, the covariance matrix of the prior error .
[0115] In this embodiment, the covariance matrix of the prior error is determined based on the state transfer matrix A and the process noise covariance matrix Q. Then the covariance matrix of the prior error Substitute the observation matrix H and the measurement noise covariance matrix R into the Kalman gain formula to obtain the Kalman gain K k .
[0116] Step S3023, performing a posteriori calculation based on the extended Kalman filter model, the second prediction result vector, the observation vector, the observation matrix and the Kalman gain to obtain the target slope of the road where the target vehicle is located at the second moment.
[0117] It should be noted that the posterior calculation formula of the extended Kalman filter model is:
[0118] In this embodiment, the second prediction result vector, the observation vector, the observation matrix and the Kalman gain are substituted into the a posteriori calculation formula of the extended Kalman filter model to perform a posteriori calculation, and the result value obtained is the state vector of the target vehicle at the second moment Among them, the state vector The slope in is used as the target slope of the road where the target vehicle is located at the second moment. In this way, the embodiment of the present application realizes the effective fusion of vehicle speed and slope data through the iterative update process of Kalman filtering, and obtains a more accurate and reliable estimation value.
[0119] In a specific implementation, the second prediction result vector is substituted into Substitute the observation vector into Z k Substitute the observation matrix into H and the Kalman gain into K k , to get the result value
[0120] For example, Figure 3The figure shows a schematic diagram of the extended Kalman filter process. First, the state transfer matrix, control matrix, state vector, control vector, observation vector and observation matrix are determined; then the process noise covariance matrix, measurement noise covariance matrix and covariance matrix of prior error are determined, and the initial state vector is determined; then based on the prior calculation formula in the extended Kalman filter model, the prediction result vector (prior estimate) of the vehicle at time k is estimated; the prior covariance matrix is calculated based on the state transfer matrix and the process noise covariance matrix; the Kalman gain is calculated based on the covariance matrix of prior error, the observation matrix and the measurement noise covariance matrix; the posterior estimate is calculated based on the Kalman gain, observation vector, observation matrix and the prediction result vector of the vehicle at time k; the posterior covariance matrix is updated; the final estimated state value is obtained, and the target slope at each slope identification moment is obtained by repeating this cycle.
[0121] In this way, the embodiment of the present application substitutes the first prediction result vector of the target vehicle at the first moment into the a priori calculation formula in the extended Kalman filter model to obtain the second prediction result vector of the target vehicle at the second moment, and then substitutes the second prediction result vector and the observation vector of the target vehicle at the second moment into the a posteriori calculation formula in the extended Kalman filter model to obtain the final estimated value, that is, the target slope of the target vehicle at the second moment, thereby performing slope identification according to real-time observation data through the extended Kalman filter model, thereby improving the accuracy of the slope identification result. At the same time, the extended Kalman filter model improves the accuracy and robustness of the estimation by linearizing the nonlinear model.
[0122] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those of the first embodiment and / or the second embodiment can be referred to the above description, and will not be described in detail later. On this basis, before step S20, the method further includes:
[0123] Step B10, obtaining the front axle speed signal, motor speed and transmission ratio of the target vehicle;
[0124] Step B20, determining a first speed based on the front axle speed signal, and determining a second speed based on the motor speed and the transmission ratio;
[0125] Step B30: performing weighted summation on the first speed and the second speed to obtain the detected driving speed of the target vehicle.
[0126] In this embodiment, when detecting the driving speed of the target vehicle at each slope identification moment, the detection method adopted is to detect the front axle speed signal of the target vehicle by means of the front axle speed sensor provided on the target vehicle, and obtain the vehicle motor speed and transmission ratio, determine the speed corresponding to the signal based on the front axle speed signal (hereinafter referred to as the first speed for distinction), and calculate the speed based on the motor speed and transmission ratio (hereinafter referred to as the second speed for distinction), and finally perform weighted summation on the first speed and the second speed to obtain the detected driving speed of the target vehicle.
[0127] In a specific implementation, when the target vehicle is front-axle driven, the wheel speed in the front-axle shaft speed signal detected by the sensor is multiplied by the rolling radius of the wheel of the target vehicle to obtain the linear speed of the wheel, that is, the driving speed of the target vehicle (the above-mentioned first speed). And, the transmission ratio represents the ratio between the motor speed and the wheel speed, so the motor speed is divided by the transmission ratio, and the result value obtained is the wheel speed (the above-mentioned second speed). Then, the first speed and the second speed are weighted and summed based on the preset weights to obtain the detected driving speed that is finally calculated by the extended Kalman filter model.
[0128] For example, Figure 4 The figure shows a schematic diagram of the extended Kalman filter model construction process. First, the detected driving speed of the target vehicle is calculated, and the detected longitudinal acceleration detected by the sensor is obtained; the state vector of the vehicle is constructed based on the detected driving speed and the detected longitudinal acceleration, wherein the state vector includes three items of data, namely the vehicle's driving speed, longitudinal acceleration and the slope of the road. It should be understood that the above-mentioned first prediction result vector and the second prediction result vector are state vectors obtained by a priori calculation of the extended Kalman filter model; the process noise covariance matrix, the measurement noise covariance matrix and the error covariance matrix are determined; the state vector and the a priori error covariance matrix are initialized, and the state vector of the target vehicle is updated in real time in combination with the observation matrix and the Kalman gain; the optimal a posteriori estimate of the target vehicle at each slope identification moment is output.
[0129] In this way, the embodiment of the present application combines the speed information detected by the sensor and the speed information calculated based on the motor speed and transmission ratio, and performs a weighted summation of the two to avoid the problem of inaccurate vehicle speed detection caused by a single data source. In addition, the multi-source fusion vehicle speed signal acquisition method ensures that even if the front axle shaft speed signal fails, the system can still provide continuous and accurate vehicle speed information, providing a stable basis for subsequent slope estimation.
[0130] The present application also provides a slope identification device, please refer to Figure 5 , the slope identification device comprises:
[0131] A determination module 10 is used to determine a first prediction result vector of the target vehicle at a first moment based on an extended Kalman filter model, wherein the first prediction result vector represents a predicted driving speed, a predicted acceleration, and a predicted slope of the road on which the target vehicle is located;
[0132] A construction module 20 is used to obtain a detected driving speed and a detected acceleration of the target vehicle at a second moment, and to construct an observation vector based on the detected driving speed and the detected acceleration, wherein the first moment and the second moment are adjacent slope identification moments, and the first moment is earlier than the second moment;
[0133] The slope identification module 30 is used to input the first prediction result vector and the observation vector into the extended Kalman filter model to obtain the target slope of the road where the target vehicle is located at the second moment.
[0134] Optionally, the determining module 10 is further configured to:
[0135] Determine a state transfer matrix of the target vehicle from a first moment to a second moment, wherein the state transfer matrix represents a state evolution law of the target vehicle from the first moment to the second moment;
[0136] A priori calculation is performed based on the extended Kalman filter model, the preset initial state vector and the state transfer matrix to obtain a first prediction result vector of the target vehicle at the first moment.
[0137] Optionally, the determining module 10 is further configured to:
[0138] A state equation is constructed based on a preset vehicle kinematics formula and a noise vector, wherein the vehicle kinematics formula represents the relationship between the vehicle's driving speed, acceleration, and the slope of the road on which the vehicle is located, and the state equation represents the updating method of the state estimation value of the target vehicle;
[0139] A state transfer matrix of the target vehicle from the first moment to the second moment is extracted from the state quantity equation.
[0140] Optionally, the slope identification module 30 is further used for:
[0141] Inputting the first prediction result vector and the observation vector into the extended Kalman filter model to multiply the first prediction result vector by the state transfer matrix to obtain a second prediction result vector of the target vehicle at the second moment;
[0142] A posterior calculation is performed based on the extended Kalman filter model, the second prediction result vector and the observation vector to obtain a target slope of the road where the target vehicle is located at the second moment.
[0143] Optionally, the slope identification module 30 is further used for:
[0144] Determine an observation matrix based on the second prediction result vector and the observation vector, wherein the observation matrix represents a mapping relationship between the second prediction result vector and the observation vector;
[0145] Determining a Kalman gain based on the state transfer matrix, the observation matrix, a preset process noise covariance matrix, and a preset measurement noise covariance matrix;
[0146] A posterior calculation is performed based on the extended Kalman filter model, the second prediction result vector, the observation vector, the observation matrix and the Kalman gain to obtain the target slope of the road where the target vehicle is located at the second moment.
[0147] Optionally, the building module 20 is further used for:
[0148] Obtain the front axle speed signal, motor speed and transmission ratio of the target vehicle;
[0149] Determining a first speed based on the front axle shaft speed signal, and determining a second speed based on the motor speed and the gear ratio;
[0150] A weighted sum is performed on the first speed and the second speed to obtain a detected driving speed of the target vehicle.
[0151] The slope identification device provided in the embodiment of the present application adopts the slope identification method in the above embodiment, which can solve the technical problem of how to improve the accuracy of slope identification. Compared with the prior art, the beneficial effects of the slope identification device provided in the embodiment of the present application are the same as the beneficial effects of the slope identification method provided in the above embodiment, and other technical features in the slope identification device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0152] The present application provides a vehicle, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the slope identification method in the above-mentioned embodiment one.
[0153] Reference below Figure 6 , which shows a schematic structural diagram of a vehicle suitable for implementing an embodiment of the present application. Figure 6 The vehicle shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0154] like Figure 6As shown, the vehicle may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read On ly Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for vehicle operation are also stored in RAM1004. The processing device 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the vehicle to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a vehicle with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0155] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0156] The vehicle provided by the present application adopts the slope identification method in the above embodiment, which can solve the technical problem of how to improve the accuracy of slope identification. Compared with the prior art, the beneficial effects of the vehicle provided by the present application are the same as the beneficial effects of the slope identification method provided by the above embodiment, and the other technical features in the vehicle are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0157] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0158] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0159] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the slope identification method in the above-mentioned embodiment.
[0160] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM: Erasable Programmab le Read On ly Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read On ly Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0161] The computer-readable storage medium may be included in the vehicle, or may exist independently without being installed in the vehicle.
[0162] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the vehicle, the vehicle: determines a first prediction result vector of the target vehicle at a first moment based on the extended Kalman filter model, wherein the first prediction result vector represents the predicted driving speed, predicted acceleration and predicted slope of the road on which the target vehicle is located; obtains the detected driving speed and detected acceleration of the target vehicle at a second moment, and constructs an observation vector based on the detected driving speed and the detected acceleration, wherein the first moment and the second moment are adjacent slope identification moments, and the first moment is earlier than the second moment; inputs the first prediction result vector and the observation vector into the extended Kalman filter model to obtain the target slope of the road on which the target vehicle is located at the second moment.
[0163] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0164] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0165] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0166] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned slope identification method, and can solve the technical problem of how to improve the accuracy of slope identification. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the slope identification method provided in the above-mentioned embodiment, and will not be repeated here.
[0167] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the slope identification method as described above when the computer program is executed by a processor.
[0168] The computer program product provided in this application can improve the accuracy of slope identification. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of this application are the same as the beneficial effects of the slope identification method provided in the above embodiment, which will not be repeated here.
[0169] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A slope identification method, characterized in that: The slope identification method comprises: Determine a first prediction result vector of the target vehicle at a first moment based on the extended Kalman filter model, wherein the first prediction result vector represents a predicted driving speed, a predicted acceleration, and a predicted slope of the road on which the target vehicle is located; Acquire a detected driving speed and a detected acceleration of the target vehicle at a second moment, and construct an observation vector based on the detected driving speed and the detected acceleration, wherein the first moment and the second moment are adjacent slope identification moments, and the first moment is earlier than the second moment; The first prediction result vector and the observation vector are input into the extended Kalman filter model to obtain the target slope of the road where the target vehicle is located at the second moment.
2. The method according to claim 1, characterized in that The step of determining a first prediction result vector of the target vehicle at a first moment based on the extended Kalman filter model comprises: Determine a state transfer matrix of the target vehicle from a first moment to a second moment, wherein the state transfer matrix represents a state evolution law of the target vehicle from the first moment to the second moment; A priori calculation is performed based on the extended Kalman filter model, the preset initial state vector and the state transfer matrix to obtain a first prediction result vector of the target vehicle at the first moment.
3. The method according to claim 2, characterized in that The step of determining the state transfer matrix of the target vehicle from the first moment to the second moment includes: A state equation is constructed based on a preset vehicle kinematics formula and a noise vector, wherein the vehicle kinematics formula represents the relationship between the vehicle's driving speed, acceleration, and the slope of the road on which the vehicle is located, and the state equation represents the updating method of the state estimation value of the target vehicle; A state transfer matrix of the target vehicle from the first moment to the second moment is extracted from the state quantity equation.
4. The method according to claim 2, characterized in that The step of inputting the first prediction result vector and the observation vector into the extended Kalman filter model to obtain the target slope of the road where the target vehicle is located at the second moment includes: Inputting the first prediction result vector and the observation vector into the extended Kalman filter model to multiply the first prediction result vector by the state transfer matrix to obtain a second prediction result vector of the target vehicle at the second moment; A posterior calculation is performed based on the extended Kalman filter model, the second prediction result vector and the observation vector to obtain a target slope of the road where the target vehicle is located at the second moment.
5. The method according to claim 4, characterized in that The step of performing a posteriori calculation based on the extended Kalman filter model, the second prediction result vector and the observation vector to obtain the target slope of the road where the target vehicle is located at the second moment includes: Determine an observation matrix based on the second prediction result vector and the observation vector, wherein the observation matrix represents a mapping relationship between the second prediction result vector and the observation vector; Determining a Kalman gain based on the state transfer matrix, the observation matrix, a preset process noise covariance matrix, and a preset measurement noise covariance matrix; A posterior calculation is performed based on the extended Kalman filter model, the second prediction result vector, the observation vector, the observation matrix and the Kalman gain to obtain the target slope of the road where the target vehicle is located at the second moment.
6. The method according to any one of claims 1 to 5, characterized in that The step of obtaining the detected driving speed and detected acceleration of the target vehicle at the second moment includes: Obtain the front axle speed signal, motor speed and transmission ratio of the target vehicle; Determining a first speed based on the front axle shaft speed signal, and determining a second speed based on the motor speed and the gear ratio; A weighted sum is performed on the first speed and the second speed to obtain a detected driving speed of the target vehicle.
7. A slope identification device, characterized in that: The slope identification device comprises: A determination module, configured to determine a first prediction result vector of a target vehicle at a first moment based on an extended Kalman filter model, wherein the first prediction result vector represents a predicted driving speed, a predicted acceleration, and a predicted slope of a road of the target vehicle; A construction module, used to obtain a detected driving speed and a detected acceleration of the target vehicle at a second moment, and to construct an observation vector based on the detected driving speed and the detected acceleration, wherein the first moment and the second moment are adjacent slope identification moments, and the first moment is earlier than the second moment; The slope identification module is used to input the first prediction result vector and the observation vector into the extended Kalman filter model to obtain the target slope of the road where the target vehicle is located at the second moment.
8. A vehicle, characterized in that: The vehicle comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the slope identification method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps of the slope identification method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the slope identification method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Gradient determination method and vehicle
CN119568167A
Slope determination method and vehicle
CN119568167B
Vehicle brake lamp control method and electronic equipment
CN120382847A
Vehicle brake light control method and electronic device
CN120382847B
Slope determination method, and vehicle
WO2026157656A1
