Vehicle state estimation methods, devices, vehicles, and products based on Kalman filtering
By using a Kalman filter-based method to estimate road slope and longitudinal jerk using vehicle speed and acceleration data, the problems of low accuracy and high noise in existing technologies are solved, achieving efficient and accurate slope and jerk estimation while reducing costs.
Patent Information
- Application Number
- CN202410880309.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-07-02
AI Technical Summary
In existing technologies, the estimation of road slope and longitudinal acceleration suffers from low accuracy, noise, and high latency, especially in intelligent vehicles where direct measurement sensors are lacking, leading to inaccurate estimation results.
The method based on Kalman filtering is adopted. The current vehicle speed and acceleration are obtained, the validity of the data is determined, and the data are input into a preset Kalman filter. The output values are vehicle speed calibration value, acceleration value based on the rate of change of speed, acceleration value based on road slope, and longitudinal acceleration value. Statistical methods are used to identify the zero bias value of the acceleration sensor and the slope acceleration, and then the road slope is calculated.
It improves the accuracy of road gradient and longitudinal acceleration estimation, reduces noise interference, lowers estimation costs, and does not rely on expensive additional sensor equipment.
Smart Images

Figure CN118836891B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle technology, and in particular to a vehicle state estimation method, device, vehicle, and product based on Kalman filtering. Background Technology
[0002] Road gradient information is crucial for the longitudinal control of intelligent vehicles, significantly impacting key scenarios such as cruise control stability, hill start-up, and hill-start assist. Real-time, accurate gradient information helps improve the control performance of adaptive cruise control systems. On the other hand, longitudinal acceleration is an important indicator of the comfort of adaptive cruise control systems; a smaller absolute value of longitudinal acceleration represents better longitudinal comfort in intelligent vehicles. Therefore, both road gradient and longitudinal acceleration are essential information for intelligent vehicles, but mass-produced vehicles lack sensors for directly measuring road gradient and longitudinal acceleration.
[0003] In related technologies, road slope can be obtained using high-precision maps combined with real-time high-precision positioning. However, high-precision map positioning is expensive and not all smart cars are equipped with it; furthermore, high-precision maps are updated infrequently, which cannot guarantee the accuracy of road slope updates. Another related technology estimates road slope by calculating the difference between the vehicle's rate of change of speed and the measurement value from the onboard longitudinal acceleration sensor, and then calculating the slope based on this difference. However, this method results in highly noisy and inaccurate road slope estimates.
[0004] In related technologies, longitudinal jerk information is mainly obtained by calculating the first derivative of acceleration or the second derivative of vehicle speed. However, the longitudinal jerk obtained by this method has significant noise. Although filtering can be added after differentiation to improve the estimation noise, the jerk time delay increases after filtering, thus reducing accuracy. Summary of the Invention
[0005] This application provides a vehicle state estimation method, device, vehicle, and product based on Kalman filtering to solve the problems of low accuracy, large noise, and long delay in the estimation of road slope and longitudinal acceleration in related technologies. It effectively reduces noise interference when estimating road slope and longitudinal acceleration, improves the accuracy of the estimation results, and reduces costs while improving estimation efficiency.
[0006] The first aspect of this application provides a vehicle state estimation method based on Kalman filtering, comprising the following steps:
[0007] Obtain the vehicle's current speed and current acceleration, and determine whether the current speed and current acceleration are both valid;
[0008] If both the current vehicle speed and the current acceleration are valid, then the current vehicle speed and the current acceleration are input into a preset Kalman filter to obtain a vehicle speed calibration value, an acceleration value based on the rate of change of speed, an acceleration value based on the road slope, and a longitudinal acceleration value.
[0009] The zero bias value of the acceleration sensor and the slope acceleration are obtained based on the acceleration value based on the road slope. The road slope is obtained based on the slope acceleration. The vehicle state estimation result is generated based on the vehicle speed calibration value, the acceleration value based on the rate of change of speed, the acceleration value based on the road slope, the longitudinal acceleration value, and the road slope.
[0010] Optionally, in some embodiments, the preset Kalman filter is:
[0011]
[0012] in, For the optimal estimate, For the prediction equation, K t For Kalman gain, γ t Let H be the observation equation and H be the observation matrix.
[0013] Optionally, in some embodiments, obtaining the zero bias value of the acceleration sensor and the slope acceleration based on the acceleration value based on the road slope includes:
[0014] Based on a preset sampling period, a sample set of acceleration values based on road slope is collected, and within a preset statistical period, the mean, standard deviation, and variance of the sample set are calculated.
[0015] Determine whether the mean, standard deviation, and variance all satisfy the preset convergence conditions;
[0016] If the mean, standard deviation, and variance all satisfy the preset convergence condition, then the mean is taken as the zero bias value of the accelerometer.
[0017] The difference between the acceleration value based on the road slope and the zero bias value of the acceleration sensor is taken as the slope acceleration.
[0018] Optionally, in some embodiments, obtaining the vehicle's current speed and current acceleration, and determining whether both the current speed and current acceleration are valid, includes:
[0019] Obtain the vehicle speed validity flag and acceleration validity flag;
[0020] The validity of the current vehicle speed is determined based on the vehicle speed validity flag, and the validity of the current acceleration is determined based on the acceleration validity flag.
[0021] Optionally, in some embodiments, before inputting the current vehicle speed and the current acceleration into a preset Kalman filter, the method further includes:
[0022] If the current vehicle speed is invalid, the current vehicle speed is updated based on the preset default vehicle speed value, and an invalidation flag is output.
[0023] If the current acceleration is invalid, the current acceleration is updated based on the preset default acceleration value, and the failure flag is output.
[0024] If both the current vehicle speed and the current acceleration are invalid, then the current vehicle speed is updated based on the preset default vehicle speed value and the current acceleration is updated based on the preset default acceleration value, and the failure flag is output.
[0025] Optionally, in some embodiments, after obtaining the road slope based on the slope acceleration, the method further includes:
[0026] The vehicle state estimation results are fed back to a preset terminal.
[0027] Optionally, in some embodiments, before collecting a sample set of acceleration values based on road slope based on a preset sampling period, the method further includes:
[0028] Determine whether the current vehicle speed and the current acceleration meet the preset sampling conditions;
[0029] If the current vehicle speed and the current acceleration do not meet the preset sampling conditions, a preset termination sampling message is sent to a preset terminal.
[0030] A second aspect of this application provides a vehicle state estimation device based on Kalman filtering, comprising:
[0031] The acquisition module is used to acquire the vehicle's current speed and current acceleration, and to determine whether the current speed and current acceleration are both valid;
[0032] The first estimation module is used to input the current vehicle speed and the current acceleration into a preset Kalman filter when both the current vehicle speed and the current acceleration are valid, so as to obtain a vehicle speed calibration value, an acceleration value based on the rate of change of speed, an acceleration value based on the road slope, and a longitudinal acceleration value.
[0033] The second estimation module is used to obtain the zero bias value of the acceleration sensor and the slope acceleration based on the acceleration value based on the road slope, obtain the road slope based on the slope acceleration, and generate a vehicle state estimation result based on the vehicle speed calibration value, the acceleration value based on the rate of change of speed, the acceleration value based on the road slope, the longitudinal acceleration value, and the road slope.
[0034] Optionally, in some embodiments, the preset Kalman filter is:
[0035]
[0036] in, For the optimal estimate, For the prediction equation, K t For Kalman gain, γ t Let H be the observation equation and H be the observation matrix.
[0037] Optionally, in some embodiments, the second estimation module is specifically used for:
[0038] Based on a preset sampling period, a sample set of acceleration values based on road slope is collected, and within a preset statistical period, the mean, standard deviation, and variance of the sample set are calculated.
[0039] Determine whether the mean, standard deviation, and variance all satisfy the preset convergence conditions;
[0040] If the mean, standard deviation, and variance all satisfy the preset convergence condition, the mean is used as the zero bias value of the accelerometer.
[0041] The difference between the acceleration value based on the road slope and the zero bias value of the acceleration sensor is taken as the slope acceleration.
[0042] Optionally, in some embodiments, the acquisition module is specifically used for:
[0043] Obtain the vehicle speed validity flag and acceleration validity flag;
[0044] The validity of the current vehicle speed is determined based on the vehicle speed validity flag, and the validity of the current acceleration is determined based on the acceleration validity flag.
[0045] Optionally, in some embodiments, before inputting the current vehicle speed and the current acceleration into a preset Kalman filter, the acquisition module is further configured to:
[0046] If the current vehicle speed is invalid, update the current vehicle speed based on the preset default vehicle speed value and output the invalidation flag.
[0047] If the current acceleration is invalid, update the current acceleration based on the preset default acceleration value and output the failure flag.
[0048] If both the current vehicle speed and the current acceleration are invalid, update the current vehicle speed based on the preset default vehicle speed value and update the current acceleration based on the preset default acceleration value, and output the failure flag.
[0049] Optionally, in some embodiments, after obtaining the road slope based on the slope acceleration, the second estimation module is further configured to:
[0050] The vehicle state estimation results are fed back to a preset terminal.
[0051] Optionally, in some embodiments, before collecting a sample set of acceleration values based on road slope according to a preset sampling period, the second estimation module is further configured to:
[0052] Determine whether the current vehicle speed and the current acceleration meet the preset sampling conditions;
[0053] If the current vehicle speed and the current acceleration do not meet the preset sampling conditions, a preset termination sampling message is sent to a preset terminal.
[0054] A third aspect of this application provides a vehicle, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the vehicle state estimation method based on Kalman filtering as described in the above embodiments.
[0055] A fourth aspect of this application provides a computer program product having a computer program stored thereon, which is executed to implement the vehicle state estimation method based on Kalman filtering as described in the above embodiments.
[0056] Therefore, by inputting vehicle speed and acceleration measurements into a preset Kalman filter, the filter outputs a vehicle speed calibration value, acceleration value based on the rate of change of speed, acceleration value based on road slope, and longitudinal jerk value. Then, through statistical methods, the acceleration value based on road slope is identified as slope acceleration and the zero-bias value of the acceleration sensor. The zero-bias of the acceleration sensor is calibrated, and the acquired vehicle speed calibration value, acceleration value based on the rate of change of speed, road slope, longitudinal jerk value, and acceleration sensor zero-bias value are output. This solves the problems of low accuracy, large noise, and time delay in the estimation of road slope and longitudinal jerk in related technologies, effectively reducing noise interference when estimating road slope and longitudinal jerk, improving the accuracy of the estimation results, and reducing costs while improving estimation efficiency.
[0057] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0058] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0059] Figure 1 This is a flowchart of a vehicle state estimation method based on Kalman filtering provided according to an embodiment of this application;
[0060] Figure 2 A flowchart of a vehicle state estimation method based on Kalman filtering according to a specific embodiment of this application;
[0061] Figure 3 This is a block diagram of a vehicle state estimation device based on Kalman filtering according to an embodiment of this application;
[0062] Figure 4 This is a block diagram of a vehicle provided according to an embodiment of this application. Detailed Implementation
[0063] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0064] The following describes a vehicle state estimation method, apparatus, vehicle, and product based on Kalman filtering, according to embodiments of this application, with reference to the accompanying drawings. Addressing the issues of low accuracy, high noise, and significant time delay in estimating road slope and longitudinal jerk as mentioned in the background art, this application provides a vehicle state estimation method based on Kalman filtering. In this method, the current vehicle speed and current acceleration are acquired, and it is determined whether both are valid. If both are valid, the current vehicle speed and current acceleration are input into a preset Kalman filter to obtain a vehicle speed calibration value, an acceleration value based on the rate of change of speed, an acceleration value based on the road slope, and a longitudinal jerk value. The zero bias value of the acceleration sensor and the slope acceleration are obtained based on the acceleration value based on the road slope. The road slope is obtained based on the slope acceleration. Finally, a vehicle state estimation result is generated based on the vehicle speed calibration value, the acceleration value based on the rate of change of speed, the acceleration value based on the road slope, the longitudinal jerk value, and the road slope. This solves the problems of low accuracy, large noise and time delay in estimating road slope and longitudinal acceleration. It effectively reduces noise interference when estimating road slope and longitudinal acceleration, improves the accuracy of the estimation results, and reduces costs while improving estimation efficiency.
[0065] Specifically, Figure 1 This is a flowchart illustrating the vehicle state estimation method based on Kalman filtering provided in an embodiment of this application.
[0066] like Figure 1 As shown, the vehicle state estimation method based on Kalman filtering includes the following steps:
[0067] In step S101, the current vehicle speed and current acceleration are obtained, and it is determined whether the current vehicle speed and current acceleration are both valid.
[0068] The vehicle's current speed and current acceleration are measured in real time by onboard sensors and used as input values for a preset Kalman filter.
[0069] Specifically, in order to improve the accuracy of vehicle state estimation, this application embodiment needs to first determine the validity of the current vehicle speed and current acceleration, that is, to determine the reliability of the input data. Thus, when using vehicle-mounted sensors, invalid data is identified and processed, thereby improving the robustness and reliability of vehicle state estimation.
[0070] Optionally, in some embodiments, obtaining the vehicle's current speed and current acceleration, and determining whether the current speed and current acceleration are both valid, includes: obtaining a speed validity flag and an acceleration validity flag; determining whether the current speed is valid based on the speed validity flag, and determining whether the current acceleration is valid based on the acceleration validity flag.
[0071] It is understood that the vehicle-mounted sensor can output a validity flag corresponding to the measured value, which is used to indicate whether the measured value is valid. Therefore, in this embodiment, the validity of the current vehicle speed is determined based on the vehicle speed validity flag, and the validity of the current acceleration is determined based on the acceleration validity flag.
[0072] Specifically, in this embodiment, the vehicle speed and acceleration measurements, as well as their respective validity flags, are read from the vehicle-mounted sensors. Based on the read validity flags, it is determined whether the vehicle speed and acceleration measurements are valid.
[0073] Therefore, the embodiments of this application will determine the validity of the obtained current vehicle speed and current acceleration, effectively improving the accuracy of road slope and longitudinal acceleration estimation.
[0074] In step S102, if the current vehicle speed and current acceleration are both valid, the current vehicle speed and current acceleration are input into a preset Kalman filter to obtain the vehicle speed calibration value, the acceleration value based on the rate of change of speed, the acceleration value based on the road slope, and the longitudinal acceleration value.
[0075] Understandably, when both the current vehicle speed and the current acceleration are valid, this embodiment of the application uses both as input values and applies them to a preset Kalman filter to obtain the calibrated vehicle speed, the acceleration value based on the rate of change of speed, the acceleration value based on the road slope, and the longitudinal acceleration value.
[0076] Optionally, in some embodiments, before inputting the current vehicle speed and current acceleration into a preset Kalman filter, the method further includes: if the current vehicle speed is invalid, updating the current vehicle speed based on a preset default vehicle speed value and outputting a failure flag; if the current acceleration is invalid, updating the current acceleration based on a preset default acceleration value and outputting a failure flag; if both the current vehicle speed and current acceleration are invalid, updating the current vehicle speed based on a preset default vehicle speed value and updating the current acceleration based on a preset default acceleration value, and outputting a failure flag.
[0077] It is understandable that, before inputting the current vehicle speed and current acceleration into the preset Kalman filter, the embodiments of this application need to verify the validity of the data and perform error processing on invalid data.
[0078] Specifically, in this embodiment of the application, the measured values of vehicle speed and acceleration, i.e., the current vehicle speed and current acceleration, are determined based on the read validity flag bits. If the validity flag bits of vehicle speed and acceleration both indicate that the data is valid (e.g., the flag bit is 1), then the next step is continued. If any one or two flag bits indicate that the data is invalid (e.g., the flag bit is 0), then error processing is performed.
[0079] Furthermore, if the vehicle speed or acceleration data is invalid, appropriate error handling measures are taken. For invalid vehicle speed or acceleration data, a default value can be output (e.g., vehicle speed is 0 km / h, acceleration is 0g), and an invalidation flag can be output to indicate that the data is invalid and has been updated.
[0080] In other words, if the current vehicle speed and current acceleration are valid, the current vehicle speed and current acceleration are directly output to the preset Kalman filter; if the current vehicle speed or current acceleration is invalid, or both the current vehicle speed and current acceleration are invalid, the corresponding invalid data is updated to the default value, and the default value is output to the preset Kalman filter, along with a failure flag.
[0081] Optionally, in some embodiments, the preset Kalman filter is:
[0082]
[0083] in, For the optimal estimate, For the prediction equation, K t For Kalman gain, γ t Let H be the observation equation and H be the observation matrix.
[0084] It is understood that a preset Kalman filter of this application embodiment needs to be configured before performing vehicle state estimation. The preset Kalman filter of this application embodiment will be described in detail below.
[0085] Specifically, the preset Kalman filter in this embodiment uses vehicle speed v, acceleration a, jerk j, and gradient acceleration a0 as state variables, resulting in the following state matrix:
[0086]
[0087] Where X is the state matrix, v is the vehicle speed, a is the acceleration, j is the jerk, and a0 is the gradient acceleration.
[0088] The prediction equation is:
[0089]
[0090] Among them, X tFor the state estimate of the previous time step, T is the sampling period, and A is the state transition matrix. This state transition matrix depends on the current vehicle model and dynamic equations, and is not specifically limited here.
[0091] The observation equation is:
[0092]
[0093] Where H is the observation matrix.
[0094] The Kalman gain is:
[0095]
[0096] Among them, P t Let R be the observation covariance matrix, and R be the observation noise.
[0097] The optimal estimate is:
[0098]
[0099] in, For the prediction equation, K t For Kalman gain, γ t Let H be the observation equation and H be the observation matrix.
[0100] The observation covariance matrix is:
[0101]
[0102] The predicted covariance matrix is:
[0103]
[0104] Where Q represents the prediction noise.
[0105] Specifically, in this embodiment of the application, by configuring the observation noise matrix R and the prediction noise matrix Q, the vehicle speed calibration value, the acceleration value based on the rate of change of speed, the acceleration value based on the road slope, and the longitudinal acceleration value can be obtained by a preset Kalman filter.
[0106] It should be noted that, in this embodiment, by configuring appropriate observation noise matrix R and prediction noise matrix Q, the sensitivity of the filter to measurement noise and model error can be adjusted. Then, by iteratively using these equations, the Kalman filter can gradually converge to the true state and provide estimates of vehicle speed calibration values, acceleration values based on the rate of change of speed, acceleration values based on road slope, and longitudinal jerk values.
[0107] Therefore, this application uses the measured values of vehicle speed and acceleration as input values to apply to a preset Kalman filter to calibrate vehicle speed, estimate acceleration values based on the rate of change of speed, acceleration values based on road slope, and longitudinal jerk values, greatly improving the estimation efficiency. Furthermore, the input values in this application embodiment are only the measured values of vehicle speed and acceleration, eliminating the need for other expensive equipment or sensors, thus effectively reducing costs.
[0108] In step S103, the zero bias value of the acceleration sensor and the slope acceleration are obtained based on the acceleration value based on the road slope. The road slope is obtained based on the slope acceleration. The vehicle state estimation result is generated based on the vehicle speed calibration value, the acceleration value based on the rate of change of speed, the acceleration value based on the road slope, the longitudinal acceleration value, and the road slope.
[0109] Specifically, in this application embodiment, statistical methods are used to identify the acceleration value based on road slope as the zero bias value of the acceleration sensor and the slope acceleration, in order to calibrate the zero bias of the acceleration sensor.
[0110] Optionally, in some embodiments, obtaining the zero bias value of the accelerometer and the slope acceleration based on the acceleration value based on the road slope includes: collecting a sample set of acceleration values based on the road slope based on a preset sampling period, and calculating the mean, standard deviation, and variance of the sample set within a preset statistical period; determining whether the mean, standard deviation, and variance all meet preset convergence conditions; if the mean, standard deviation, and variance all meet preset convergence conditions, then using the mean as the zero bias value of the accelerometer; and using the difference between the acceleration value based on the road slope and the zero bias value of the accelerometer as the slope acceleration.
[0111] It is understood that the embodiments of this application are based on applied statistical methods, which periodically sample acceleration values based on road slope at a preset sampling period to obtain a sample set, and then perform statistical calculations on the sample set within a preset statistical period to obtain the mean, standard deviation and variance of the sample set of acceleration values based on road slope.
[0112] Therefore, in this embodiment, the zero bias value needs to be determined based on the calculated mean, standard deviation and variance. If the mean, standard deviation and variance of the sample set of acceleration values based on road slope all converge within their respective preset thresholds, then the mean value is taken as the zero bias value of the acceleration sensor.
[0113] It should be noted that the preset thresholds mentioned above need to be determined based on the actual sensor characteristics and application environment.
[0114] Furthermore, after obtaining the zero bias value of the accelerometer, the system records the zero bias value of the accelerometer and reloads the value on the next power-on.
[0115] In this embodiment, the acceleration value based on the road slope collected in real time is subtracted from the zero bias value of the acceleration sensor recorded above to obtain the slope acceleration. Then, the road slope is calculated based on the slope acceleration and the gravitational acceleration.
[0116] Optionally, in this embodiment of the application, after obtaining the slope acceleration, the acceleration value based on the road slope can be continuously monitored and the zero bias value of the acceleration sensor can be recalculated, thereby addressing the changes in the zero bias value that may be caused by sensor aging, temperature changes, etc.
[0117] Optionally, in some embodiments, before collecting a sample set of acceleration values based on road slope based on a preset sampling period, the method further includes: determining whether the current vehicle speed and current acceleration meet preset sampling conditions; if the current vehicle speed and current acceleration do not meet the preset sampling conditions, then sending preset termination sampling information to a preset terminal.
[0118] Specifically, before collecting a sample set of acceleration values based on road slope according to a preset sampling period, this embodiment needs to determine whether the current vehicle speed and current acceleration meet preset sampling conditions. These preset sampling conditions can be that the vehicle speed is stable within a certain range and the rate of change of acceleration is stable within a certain range. Only when the current vehicle speed and current acceleration meet the preset conditions can the sample set be collected, thereby ensuring the stability of the sampled data and improving the accuracy of vehicle state estimation. In some cases, if the current vehicle speed and current acceleration do not meet the preset sampling conditions, this embodiment will send a preset termination sampling message to a preset terminal.
[0119] It should be noted that the preset termination sampling information in this application embodiment may be "the current vehicle speed and current acceleration are unstable, and the vehicle state cannot be estimated" or similar; the preset terminal may be a vehicle audio system, a central control screen, or other devices, and is not specifically limited here.
[0120] Optionally, in some embodiments, after obtaining the road slope based on the slope acceleration, the method further includes: feeding back the vehicle state estimation result to a preset terminal.
[0121] Optionally, in this embodiment of the application, a state estimation result is generated based on the obtained vehicle speed calibration value, acceleration value based on the rate of change of speed, road slope, longitudinal acceleration value, and zero bias value of the acceleration sensor. The estimation result can be in the form of a report and fed back to the user, so that the user can clearly understand the state of the vehicle and improve the user's driving experience.
[0122] Based on the above embodiments, this application verifies the validity of vehicle speed and acceleration measurements by inputting them into a designed Kalman filter. This Kalman filter outputs a vehicle speed calibration value, acceleration values based on the rate of change of speed, acceleration values based on road slope, and longitudinal jerk values. Statistical methods are used to identify the slope-based acceleration value as slope acceleration and the acceleration sensor zero bias. The acceleration sensor zero bias is calibrated, and the acquired speed calibration value, acceleration values based on the rate of change of speed, road slope, jerk, and acceleration sensor zero bias value are output. Thus, simultaneous estimation of road slope and jerk is achieved. The estimated road slope and jerk exhibit good real-time performance, low noise, and high accuracy. Furthermore, the input to this method is only vehicle speed and acceleration measurements, eliminating the need for other expensive equipment or sensors, thereby reducing costs.
[0123] To enable those skilled in the art to further understand the vehicle state estimation method based on Kalman filtering in the embodiments of this application, the following examples illustrate the implementation process of the method.
[0124] Specifically, Figure 2 A flowchart of a vehicle state estimation method based on Kalman filtering according to a specific embodiment of this application is shown below. Figure 2 As shown, the vehicle state estimation method based on Kalman filtering includes the following steps:
[0125] Step S201: Verify the validity of the vehicle speed measurement value and the acceleration measurement value. That is, determine the validity of the two values based on the vehicle speed validity and acceleration validity flags output by the vehicle sensor. If they are valid, proceed to step S202 and output the measurement value. If they are invalid, proceed to step S205.
[0126] Step S202, the vehicle speed measurement value v m and acceleration measurement value a m Input the preset Kalman filter in the above embodiment to obtain the vehicle speed calibration value, the acceleration value based on the rate of change of speed, the acceleration value based on the road slope, and the longitudinal acceleration value.
[0127] Step S203: Statistical methods are used to distinguish between the slope acceleration and the zero bias value of the acceleration sensor in the slope-based acceleration a0. Specifically, when the vehicle speed and acceleration meet preset conditions, a preset sampling period T is used. L Perform timed sampling a0 within a preset statistical period T. sa Within the range, the mean, standard deviation, and variance of a0 are calculated and statistically analyzed. If the mean, standard deviation, and variance of a0 all converge within a preset threshold, then the value of a0 is considered to be the zero bias value of the sensor. offset The system will record this zero bias value a. offsetThe value will be reloaded after the next power-on; a0 and a offset The difference is used as the slope acceleration a. slope This distinguishes between zero-bias acceleration and gradient acceleration, and the road gradient is calculated from the gradient acceleration.
[0128] Step S204: Output the obtained vehicle motion information, including vehicle speed, acceleration validity, speed calibration value, acceleration value based on the rate of change of speed, road gradient, jerk, and zero bias value of the acceleration sensor.
[0129] Step S205: Output the default value and the failure flag.
[0130] Therefore, based on the Kalman filter preset in the embodiments of this application, by inputting vehicle speed measurement value and acceleration measurement value, vehicle speed calibration value, acceleration value based on speed change rate, acceleration value based on road slope, and longitudinal acceleration value can be obtained. The acceleration value based on slope is identified as slope acceleration and acceleration sensor zero bias, and the final vehicle state estimation result is obtained.
[0131] The vehicle state estimation method based on Kalman filtering proposed in this application determines whether the acquired current vehicle speed and current acceleration are valid. If both are valid, the current vehicle speed and current acceleration are input into a preset Kalman filter to obtain a vehicle speed calibration value, an acceleration value based on the rate of change of speed, an acceleration value based on road slope, and a longitudinal jerk value. The zero bias value of the acceleration sensor and the slope acceleration are obtained from the acceleration value based on the road slope. The road slope is obtained from the slope acceleration. Finally, a vehicle state estimation result is generated based on the vehicle speed calibration value, the acceleration value based on the rate of change of speed, the acceleration value based on road slope, the longitudinal jerk value, and the road slope. This solves the problems of low accuracy, high noise, and high latency in the estimation of road slope and longitudinal jerk in related technologies. It effectively reduces noise interference when estimating road slope and longitudinal jerk, improves the accuracy of the estimation results, and reduces costs while improving estimation efficiency.
[0132] Next, referring to the accompanying drawings, a vehicle state estimation device based on Kalman filtering according to an embodiment of this application is described.
[0133] Figure 3 This is a block diagram of a vehicle state estimation device based on Kalman filtering according to an embodiment of this application.
[0134] like Figure 3 As shown, the vehicle state estimation device 10 based on Kalman filtering includes: an acquisition module 100, a first estimation module 200, and a second estimation module 300.
[0135] Specifically, the acquisition module 100 is used to acquire the current vehicle speed and current acceleration, and determine whether the current vehicle speed and current acceleration are both valid; the first estimation module 200 is used to input the current vehicle speed and current acceleration into a preset Kalman filter when the current vehicle speed and current acceleration are both valid, to obtain the vehicle speed calibration value, the acceleration value based on the rate of change of speed, the acceleration value based on the road slope, and the longitudinal acceleration value; the second estimation module 300 is used to obtain the zero bias value of the acceleration sensor and the slope acceleration based on the acceleration value based on the road slope, obtain the road slope based on the slope acceleration, and generate the vehicle state estimation result based on the vehicle speed calibration value, the acceleration value based on the rate of change of speed, the acceleration value based on the road slope, the longitudinal acceleration value, and the road slope.
[0136] Optionally, in some embodiments, the preset Kalman filter is:
[0137]
[0138] in, For the optimal estimate, For the prediction equation, K t For Kalman gain, γ t Let H be the observation equation and H be the observation matrix.
[0139] Optionally, in some embodiments, the second estimation module 300 is specifically used for: collecting a sample set of acceleration values based on road slope based on a preset sampling period, and calculating the mean, standard deviation, and variance of the sample set within a preset statistical period; determining whether the mean, standard deviation, and variance all meet preset convergence conditions; if the mean, standard deviation, and variance all meet preset convergence conditions, using the mean as the zero bias value of the acceleration sensor; and using the difference between the acceleration value based on road slope and the zero bias value of the acceleration sensor as the slope acceleration.
[0140] Optionally, in some embodiments, the acquisition module 100 is specifically used to: acquire a vehicle speed validity flag and an acceleration validity flag; determine whether the current vehicle speed is valid based on the vehicle speed validity flag, and determine whether the current acceleration is valid based on the acceleration validity flag.
[0141] Optionally, in some embodiments, before inputting the current vehicle speed and current acceleration into a preset Kalman filter, the acquisition module 100 is further configured to: update the current vehicle speed based on a preset default vehicle speed and output a failure flag if the current vehicle speed is invalid; update the current acceleration based on a preset default acceleration and output a failure flag if the current acceleration is invalid; and update the current vehicle speed based on a preset default vehicle speed and update the current acceleration based on a preset default acceleration and output a failure flag if both the current vehicle speed and current acceleration are invalid.
[0142] Optionally, in some embodiments, after obtaining the road slope based on the slope acceleration, the second estimation module 300 is further configured to: feed back the vehicle state estimation result to a preset terminal.
[0143] Optionally, in some embodiments, before collecting a sample set of acceleration values based on road slope based on a preset sampling period, the second estimation module 300 is further configured to: determine whether the current vehicle speed and current acceleration meet the preset sampling conditions; and if the current vehicle speed and current acceleration do not meet the preset sampling conditions, send preset termination sampling information to a preset terminal.
[0144] It should be noted that the foregoing explanation of the vehicle state estimation method based on Kalman filtering also applies to the vehicle state estimation device based on Kalman filtering in this embodiment, and will not be repeated here.
[0145] The vehicle state estimation device based on Kalman filtering proposed in this application determines whether the acquired current vehicle speed and current acceleration are both valid. If both are valid, the current vehicle speed and current acceleration are input into a preset Kalman filter to obtain a vehicle speed calibration value, an acceleration value based on the rate of change of speed, an acceleration value based on road slope, and a longitudinal jerk value. The zero bias value of the acceleration sensor and the slope acceleration are obtained from the acceleration value based on the road slope. The road slope is obtained from the slope acceleration. Finally, a vehicle state estimation result is generated based on the vehicle speed calibration value, the acceleration value based on the rate of change of speed, the acceleration value based on the road slope, the longitudinal jerk value, and the road slope. This solves the problems of low accuracy, large noise, and high latency in the estimation of road slope and longitudinal jerk in related technologies. It effectively reduces noise interference when estimating road slope and longitudinal jerk, improves the accuracy of the estimation results, and reduces costs while improving estimation efficiency.
[0146] Figure 4 A schematic diagram of the structure of a vehicle provided in an embodiment of this application. The vehicle may include:
[0147] The memory 401, the processor 402, and the computer program stored on the memory 401 and capable of running on the processor 402.
[0148] When the processor 402 executes the program, it implements the vehicle state estimation method based on Kalman filtering provided in the above embodiments.
[0149] Furthermore, the vehicle also includes:
[0150] Communication interface 403 is used for communication between memory 401 and processor 402.
[0151] The memory 401 is used to store computer programs that can run on the processor 402.
[0152] The memory 401 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.
[0153] If the memory 401, processor 402, and communication interface 403 are implemented independently, then the communication interface 403, memory 401, and processor 402 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0154] Optionally, in a specific implementation, if the memory 401, processor 402, and communication interface 403 are integrated on a single chip, then the memory 401, processor 402, and communication interface 403 can communicate with each other through an internal interface.
[0155] Processor 402 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of this application.
[0156] This application also provides a computer program product on which a computer program is stored, which, when executed, implements the vehicle state estimation method based on Kalman filtering as described above.
[0157] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0158] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0159] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0160] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or more of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.
[0161] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0162] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A Kalman filter-based vehicle state estimation method, characterized by, The method comprises the following steps: obtaining a current vehicle speed and a current acceleration of a vehicle, and determining whether the current vehicle speed and the current acceleration are both valid; if the current vehicle speed and the current acceleration are both valid, inputting the current vehicle speed and the current acceleration into a preset Kalman filter to obtain a vehicle speed calibration value, an acceleration value based on a speed change rate, an acceleration value based on a road slope, and a longitudinal jerk value; obtaining an acceleration sensor zero offset value and a slope acceleration based on the acceleration value based on the road slope, obtaining a road slope based on the slope acceleration, and generating a vehicle state estimation result based on the vehicle speed calibration value, the acceleration value based on the speed change rate, the acceleration value based on the road slope, the longitudinal jerk value, and the road slope; wherein, the obtaining of the acceleration sensor zero offset value and the slope acceleration based on the acceleration value based on the road slope comprises: based on a preset sampling period, collecting a sample set of the acceleration value based on the road slope, and within a preset statistical period, calculating a mean value, a standard deviation, and a variance of the sample set; determining whether the mean value, the standard deviation, and the variance all satisfy a preset convergence condition; if the mean value, the standard deviation, and the variance all satisfy the preset convergence condition, taking the mean value as the acceleration sensor zero offset value; and taking a difference value between the acceleration value based on the road slope and the acceleration sensor zero offset value as the slope acceleration; the obtaining of the current vehicle speed and the current acceleration, and the determining of whether the current vehicle speed and the current acceleration are both valid comprises: obtaining a vehicle speed validity flag and an acceleration validity flag; determining whether the current vehicle speed is valid based on the vehicle speed validity flag, and determining whether the current acceleration is valid based on the acceleration validity flag.
2. The method of claim 1, wherein, the preset Kalman filter is: ; wherein, is the optimal estimate, is the prediction equation, is the Kalman gain, is the observation equation, H is the observation matrix.
3. The method of claim 1, wherein, before the inputting of the current vehicle speed and the current acceleration into the preset Kalman filter, the method further comprises: if the current vehicle speed is invalid, updating the current vehicle speed based on a preset vehicle speed default value, and outputting an invalid flag; if the current acceleration is invalid, updating the current acceleration based on a preset acceleration default value, and outputting the invalid flag; if the current vehicle speed and the current acceleration are both invalid, updating the current vehicle speed based on the preset vehicle speed default value and updating the current acceleration based on the preset acceleration default value, and outputting the invalid flag.
4. The method of claim 1, wherein, after the generation of the vehicle state estimation result based on the vehicle speed calibration value, the acceleration value based on the speed change rate, the acceleration value based on the road slope, the longitudinal jerk value, and the road slope, the method further comprises: feeding back the vehicle state estimation result to a preset terminal.
5. The method of claim 1, wherein, before the collecting of the sample set of the acceleration value based on the road slope based on the preset sampling period, the method further comprises: determining whether the current vehicle speed and the current acceleration satisfy a preset sampling condition; if the current vehicle speed and the current acceleration do not satisfy the preset sampling condition, outputting preset termination sampling information to a preset terminal.
6. A Kalman filter-based vehicle state estimation device characterized by comprising: comprises: The acquisition module is configured to acquire a current vehicle speed and a current acceleration of the vehicle, and determine whether the current vehicle speed and the current acceleration are both valid. The first estimation module is configured to, in a case where the current vehicle speed and the current acceleration are both valid, input the current vehicle speed and the current acceleration into a preset Kalman filter to obtain a vehicle speed calibration value, an acceleration value based on a speed change rate, an acceleration value based on a road slope, and a longitudinal jerk value. The second estimation module is configured to obtain an acceleration sensor zero offset value and a slope acceleration based on the acceleration value based on the road slope, obtain a road slope based on the slope acceleration, and generate a vehicle state estimation result based on the vehicle speed calibration value, the acceleration value based on the speed change rate, the acceleration value based on the road slope, the longitudinal jerk value, and the road slope. The second estimation module is specifically configured to: based on a preset sampling period, collect a sample set of the acceleration value based on the road slope, and calculate a mean value, a standard deviation, and a variance of the sample set within a preset statistical period; determine whether the mean value, the standard deviation, and the variance all satisfy a preset convergence condition; if the mean value, the standard deviation, and the variance all satisfy the preset convergence condition, take the mean value as the acceleration sensor zero offset value; and take a difference value between the acceleration value based on the road slope and the acceleration sensor zero offset value as the slope acceleration. The acquisition module is specifically configured to: acquire a vehicle speed validity flag and an acceleration validity flag; determine whether the current vehicle speed is valid based on the vehicle speed validity flag, and determine whether the current acceleration is valid based on the acceleration validity flag.
7. A vehicle characterized by comprising: The computer program is executed to implement the Kalman filter-based vehicle state estimation method according to any one of claims 1-5. The computer program is executed to implement the Kalman filter-based vehicle state estimation method according to any one of claims 1-5.
8. A computer program product comprising a computer program, characterized in that,
Citation Information
Patent Citations
A gradient estimation method based on a Kalman filtering algorithm
CN109684677A
Joint estimation method for motion state of vehicle and gradient of road
CN110588657A