Implementation method for detecting uneven road section of vehicle
By performing multi-level processing and analysis of vehicle vertical acceleration data, combined with sensor calibration and data storage management, the problem of insufficient real-time and accuracy of uneven road segments in the prior art is solved, and efficient and reliable detection of uneven road segments of vehicles is achieved.
Patent Information
- Application Number
- CN202411753591.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-02
AI Technical Summary
When detecting uneven road sections of vehicles, the prior art lacks real-time and accuracy, is susceptible to noise and vibration, and the detection accuracy is unstable.
By performing multi-level processing and analysis of vertical acceleration (ACCz) data, including sensor data calibration, low-pass filtering, Kalman filtering and six-axis fusion algorithm processing, combined with data storage and management of bidirectional linked lists and ring buffers, real-time detection of uneven sections of vehicles is achieved.
It significantly improves the accuracy and reliability of data, realizes high-frequency real-time detection, can quickly respond to vehicle dynamic changes, adapt to complex driving environments, and improves the overall traffic safety level.
Smart Images

Figure CN119749564A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation, and in particular to a method for detecting uneven road sections for vehicles. Background Art
[0002] Currently, vehicle driving experience and safety based on road smoothness have received widespread attention. Especially in autonomous driving systems, real-time detection and response to road condition changes are crucial. Traditional methods mainly rely on external sensors or static inspections, which have slow response speeds and limited accuracy. As a dynamic measurement sensor, IMU has the advantages of real-time performance and high accuracy, but IMU data is easily affected by noise and vibration.
[0003] Traditional uneven road detection methods often rely on static sensors, manual inspections or external equipment. These methods cannot capture the dynamic state of the vehicle in real time, resulting in timeliness issues in the determination of uneven roads. Alternatively, the use of GPS-based detection methods is limited by signal interference, which is prone to errors, especially in urban environments.
[0004] Existing IMU data processing methods fail to effectively filter high-frequency noise and sudden vibrations, which may lead to incorrect or missed judgments on uneven roads, affecting the reliability of the system. There is often a delay in data processing, and it is impossible to achieve a quick response. When implementing sudden acceleration detection, a certain threshold may be set based on the vehicle's ACCy data.
[0005] Many existing rough road detection systems rely on a single type of sensor, resulting in limited information and insufficient accuracy. Different types of vehicles have different response characteristics under different loads and speeds, and existing methods fail to adaptively adjust to these variables, resulting in unstable detection accuracy under different conditions.
[0006] Therefore, an efficient algorithm for detecting uneven road sections is needed to ensure the accuracy of monitoring. Summary of the invention
[0007] In order to solve the problems existing in the prior art, the purpose of the present invention is to provide a method for detecting uneven road sections for vehicles. The method can effectively judge and identify the flatness of the road section where the vehicle is located through multi-level processing and analysis of vertical acceleration (ACCz) data. The method has the characteristics of real-time and strong anti-interference ability, and is suitable for various vehicles and road conditions.
[0008] The present invention achieves the above-mentioned purpose through the following technical solutions:
[0009] A method for detecting uneven road sections for vehicles, the method comprising the following steps:
[0010] Use the IMU module to obtain the vehicle's acceleration and angular velocity data in real time and perform sensor data calibration;
[0011] The collected three-axis acceleration and three-axis angular velocity data are processed by low-pass filtering, and after removing high-frequency noise, Kalman filtering is performed to obtain the processed acceleration and velocity values. The processed acceleration and velocity values are processed by the six-axis fusion algorithm to obtain the real dynamic state of the vehicle; among them, when performing attitude estimation, the fused three-axis Euler angle is used to reflect the attitude change of the vehicle;
[0012] A bidirectional linked list is used to store the processed data, wherein the linked list structure includes a bidirectional linked list of size N for storing the data of ACCz, and a ring buffer is used to manage the memory, so that when the buffer reaches the maximum size N, the new data will overwrite the old data;
[0013] Perform data analysis based on the processed ACCz data to detect uneven road sections; set the maximum value ACCz_max and the minimum value ACCz_min of the uneven road section, count the number of times ACCz exceeds the range Count, and when Count is greater than the set threshold x within the time window, it is determined that the vehicle is on an uneven road section.
[0014] According to a method for detecting uneven road sections of a vehicle provided by the present invention, the IMU module includes a three-axis acceleration sensor and a three-axis gyroscope. The three-axis acceleration sensors ACCx, ACCy, ACCz and the three-axis gyroscopes Gyrox, Gyroy, Gyroz are used to obtain the vehicle's motion state in real time, and the data sampling frequency is set to 50 Hz.
[0015] According to a method for detecting uneven road sections of a vehicle provided by the present invention, before data acquisition, offset calibration and temperature compensation are performed on the sensor, including:
[0016] In the absence of an external measurement signal, place the sensor in a stable environment and adjust the output signal of the sensor to a predetermined zero point value to calibrate the offset error of the sensor; wherein the offset calibration should include but is not limited to zero point calibration and multi-point calibration, wherein the zero point calibration is used to adjust the output of the sensor to zero in the absence of a signal, and the multi-point calibration further improves the accuracy of the sensor through multiple standard points;
[0017] Temperature compensation technology is used to eliminate the influence of temperature changes on the sensor output signal.
[0018] According to a method for detecting uneven road sections for vehicles provided by the present invention, the low-pass filtering process is performed using a first-order low-pass filter, which is expressed as the following formula:
[0019] y[n]=α×x[n]+(1-α)×y[n-1]
[0020] Among them, α is the filter coefficient, and its value ranges from 0.1 to 0.3.
[0021] According to a method for detecting uneven road sections of a vehicle provided by the present invention, before the Kalman filter processing begins, the state estimation and the covariance matrix are first initialized, the state estimation includes initial acceleration and velocity values, and the covariance matrix is used to describe the uncertainty of the initial state estimation;
[0022] Set a state transition model that describes the change of system state over time; set an observation model that describes the observation data obtained from sensors or measurements; for IMU data, the state transition model is used to reflect the dynamic characteristics of acceleration and velocity, as well as control input, and for IMU data, the observation model maps acceleration and velocity to the space of observation data;
[0023] The state at the current moment is predicted using the state transition model and the state estimate at the previous moment, wherein the prediction step includes calculating the predicted state estimate and the prediction error covariance matrix.
[0024] In combination with the observed data at the current moment, the state estimate is corrected through an updating step; wherein the updating step includes calculating the Kalman gain, updating the state estimate, and updating the error covariance matrix;
[0025] Get the acceleration and velocity values processed by Kalman filtering.
[0026] According to the present invention, a method for detecting uneven road sections for vehicles, when using a bidirectional linked list to store processed data and using a ring buffer to manage memory, specifically includes:
[0027] Define a doubly linked list consisting of a series of nodes. The size of each node is fixed to be able to store a floating point number ACCz data and two pointers pointing to the previous node and the next node respectively to support bidirectional traversal;
[0028] The bidirectional linked list is configured as a ring buffer, where the head node and tail node of the linked list are connected by pointers to form a closed loop; when the buffer reaches the preset maximum size N, the new ACCz data will be inserted into the tail node of the linked list and overwrite the head node data of the linked list at the same time, realizing the circular storage and update of data;
[0029] When the buffer is not full, that is, the number of nodes is less than N, a new node is created, the ACCz data is stored in the data field of the new node, and the pointers of the previous and next nodes are adjusted to insert the new node into the tail end of the linked list;
[0030] When the buffer is full, that is, the number of nodes is equal to N, no new node is created, but the new ACCz data is directly overwritten into the head node data field of the linked list, and the pointer of the head node is adjusted so that the original head node becomes the successor node of the new tail node, thereby maintaining the total size of the ring buffer unchanged;
[0031] Provides bidirectional traversal function, allowing you to start from any node of the linked list, traverse the entire ring buffer through the front pointer or back pointer, and access the ACCz data of each node.
[0032] According to a method for detecting uneven road sections for vehicles provided by the present invention, each node specifically includes:
[0033] A floating point data field, used to store the ACCz value;
[0034] A previous pointer field, pointing to the previous node in the linked list;
[0035] A back pointer field that points to the next node in the linked list.
[0036] Among them, the front pointer of the head node points to the tail node, and the back pointer of the tail node points to the head node to maintain the ring structure.
[0037] According to a method for detecting uneven road sections for vehicles provided by the present invention, the data analysis includes:
[0038] Set a fixed-size time window N to determine the number of data items to be considered in each data analysis;
[0039] A sliding window mechanism is used to manage the data in the time window. Each time new acceleration data is collected, the data is added to the data set of the time window, and the earliest collected data in the time window is automatically removed, that is, the time window always contains the latest N acceleration data.
[0040] Every time new data arrives, the data content in the time window is automatically adjusted to ensure that the data in the window is always the latest;
[0041] Based on the latest N acceleration data in the sliding time window, data analysis and processing are performed to extract acceleration features, which are then used to judge the uneven road sections.
[0042] According to a method for detecting uneven road sections for vehicles provided by the present invention, during the data collection process, the Count value of ACCz is continuously monitored. When it is detected that the Count value of ACCz is greater than a set threshold value x, the uneven road section flag is set to 1, and related data recording is started;
[0043] After the uneven road section flag is set, continue to monitor the data changes of ACCz. When it is detected that the value of ACCz tends to be stable, and the value of Count is no longer accumulated or meets other stable state judgment conditions, it is confirmed that the vehicle is no longer traveling on the uneven road section;
[0044] When it is confirmed that the vehicle is not on the uneven road section, the uneven road section flag is immediately reset to 0, and the counters related to the uneven road section detection are cleared or reset to prepare for the next uneven road section detection.
[0045] According to a method for detecting uneven road sections for vehicles provided by the present invention, alarm and recording are also performed:
[0046] When it is detected that the vehicle is traveling on an uneven road section, a preset alarm program is immediately started, and when the uneven road section state is activated, data related to the uneven road section event is stored in a non-volatile memory;
[0047] Continue to monitor the data changes of ACCz. When it is detected that the value of ACCz tends to be stable and the value of Count is no longer accumulated or meets other stable state judgment conditions, it is confirmed that the vehicle is no longer traveling on the uneven road section; then, reset the uneven road section flag and stop the alarm program.
[0048] It can be seen that compared with the prior art, the present invention has the following beneficial effects:
[0049] 1. The present invention combines low-pass filtering, Kalman filtering and six-axis fusion algorithm to make full use of the multi-dimensional data provided by IMU, thereby significantly improving the accuracy and reliability of the data.
[0050] 2. The IMU-based method of the present invention can collect and process IMU data at a higher frequency (every 20ms), significantly improving real-time performance, so that collision detection can more quickly and accurately reflect the dynamic state of the vehicle, ensuring that the system can quickly respond to dynamic changes in the vehicle and adapt to complex driving environments.
[0051] 3. The present invention can quickly identify sudden acceleration behavior and issue an alarm in time through real-time monitoring of the dynamic state of the vehicle, thereby improving the driver's vigilance and reducing the possibility of accidents.
[0052] 4. The design of the bidirectional linked list of the present invention makes data storage and management more flexible and efficient, and supports real-time analysis of dynamic data.
[0053] 5. Compared with the traditional high-cost collision detection technology, the IMU sensor of the present invention is low-cost and suitable for large-scale application, so that the technology can be applied to a wider range of vehicle models and improve the overall traffic safety level.
[0054] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a flowchart of an implementation method embodiment of the present invention for detecting uneven road sections for vehicles.
[0056] Figure 2 It is a flow chart of a method for detecting uneven road sections for vehicles according to an embodiment of the present invention. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0059] See also Figure 1 and Figure 2 The present invention provides a method for detecting an uneven road section for a vehicle, the method comprising the following steps:
[0060] Step S1, using the IMU module to obtain the acceleration and angular velocity data of the vehicle in real time and perform sensor data calibration;
[0061] Step S2, low-pass filtering the collected three-axis acceleration and three-axis angular velocity data, performing Kalman filtering after removing high-frequency noise to obtain processed acceleration and velocity values, and processing the processed acceleration and velocity values with a six-axis fusion algorithm to obtain the real dynamic state of the vehicle; wherein, when performing attitude estimation, the fused three-axis Euler angle is used to reflect the attitude change of the vehicle;
[0062] Step S3, using a bidirectional linked list to store the processed data, wherein the linked list structure includes a bidirectional linked list of size N, which is used to store the data of ACCz, and a ring buffer is used to manage the memory, so that when the buffer reaches the maximum size N, the new data will overwrite the old data;
[0063] Step S4, performing data analysis based on the processed ACCz data to detect uneven road sections; setting a maximum value ACCz_max and a minimum value ACCz_min for the uneven road section, counting the number of times ACCz exceeds the range Count, and when Count is greater than a set threshold value x within a time window, determining that the vehicle is on an uneven road section.
[0064] In the above step S1, the IMU module includes a three-axis acceleration sensor and a three-axis gyroscope. The three-axis acceleration sensor (ACCx, ACCy, ACCz) and the three-axis gyroscope (Gyrox, Gyroy, Gyroz) are used to obtain the vehicle motion state in real time, and the data sampling frequency is set to 50Hz, that is, data is collected every 20ms to ensure the continuity and real-time nature of the data.
[0065] In this embodiment, before data acquisition, the sensor is subjected to offset calibration and temperature compensation to reduce the influence of external factors (such as temperature change and sensor drift) on the data, specifically including:
[0066] In the absence of an external measurement signal, the sensor is placed in a stable environment and the output signal of the sensor is adjusted to a predetermined zero point value to calibrate the offset error of the sensor; wherein the offset calibration should include but is not limited to zero-point calibration and multi-point calibration, wherein the zero-point calibration is used to adjust the output of the sensor to zero in a no-signal state, and the multi-point calibration further improves the accuracy of the sensor through multiple standard points.
[0067] Temperature compensation technology is used to eliminate the impact of temperature changes on the sensor output signal, including but not limited to hardware compensation, software compensation and self-compensation methods.
[0068] Among them, the hardware compensation method may include adding a temperature compensation circuit to the measurement circuit of the sensor, such as using a thermistor, a leveling resistor, etc. to achieve compensation for temperature changes.
[0069] Among them, the software compensation method processes the output signal of the sensor through an algorithm to eliminate the error caused by temperature changes, which includes but is not limited to the least squares fitting straight line compensation method, curve fitting compensation method and neural network-based compensation method.
[0070] Among them, the self-compensation method is to select the material and design of the sensor appropriately so that it can self-compensate when the temperature changes, thereby reducing the temperature error. For example, the single-filament self-compensation method and the combined self-compensation method.
[0071] When implementing temperature compensation, the specific application scenario and temperature variation range of the sensor should be considered, and appropriate temperature compensation methods and parameters should be selected to ensure the output stability and accuracy of the sensor at different temperatures.
[0072] In the above step S2, a discrete Fourier transform (DFT) or a Butterworth filter can be used to implement it. The filtered data will be smoother, retain the main motion signal and reduce the interference of environmental noise, ensure the availability of data, and smooth the data. Among them, the low-pass filtering process uses a first-order low-pass filter for processing, which is expressed as the following formula:
[0073] y[n]=α×x[n]+(1-α)×y[n-1]
[0074] Among them, α is the filter coefficient, and its value ranges from 0.1 to 0.3.
[0075] In the above step S2, before the Kalman filter process starts, the state estimation and covariance matrix are first initialized. The state estimation includes initial acceleration and velocity values, and the covariance matrix is used to describe the uncertainty of the initial state estimation.
[0076] A state transition model is set to describe the change of system state over time, and an observation model is set to describe the observation data obtained from sensors or measurements, and the IMU data is used for state prediction; among them, for IMU data, the state transition model is used to reflect the dynamic characteristics of acceleration and velocity, as well as control input, and for IMU data, the observation model maps acceleration and velocity to the space of observation data.
[0077] The state at the current moment is predicted using the state transition model and the state estimate at the previous moment, wherein the prediction step includes calculating the predicted state estimate and the prediction error covariance matrix.
[0078] Combined with the observed data at the current moment, the state estimate is corrected through the update step to obtain more accurate acceleration and velocity values; the update step includes calculating the Kalman gain, updating the state estimate, and updating the error covariance matrix. The Kalman gain is used to weigh the reliability of the prior estimate and the observed value to obtain a more accurate state estimate.
[0079] In the above step S2, the six-axis fusion algorithm of this embodiment uses quaternions to represent the posture, performs complementary filtering through the measurement values of the accelerometer and gyroscope, updates the quaternion to obtain the direction and position changes of the vehicle, and fuses the acceleration and angular velocity data to calculate the real dynamic state of the vehicle. Among them, the fused Euler angle can accurately reflect the posture changes of the vehicle.
[0080] Specifically, the six-axis fusion algorithm is a posture estimation algorithm that combines the data of the accelerometer and gyroscope, that is, the data of the three axes of the gyroscope and the three axes of the accelerometer, to calculate the 3D posture (3Dof posture). It uses quaternions to represent the posture and fuses the measurements of the two sensors through complementary filtering to update the quaternion to obtain the direction and position changes of the vehicle.
[0081] The gyroscope can provide angular acceleration of three axes, and by integrating time, the direction and angle of the object's rotation can be obtained. However, due to the accumulation of hardware accuracy and integration errors, the calculated angle will drift.
[0082] In general 3Dof motion, the acceleration generated by the motion is small, and the biggest influence on the object is gravity, which is always vertically downward. Therefore, the accelerometer can use gravity as a reference to correct the data calculated by the gyroscope.
[0083] In attitude solution, compared with other representation methods (such as matrix, Euler angle, axis angle), quaternion has the advantages of faster speed, smooth interpolation, effective avoidance of universal lock problem, and smaller storage space.
[0084] Complementary filtering is an algorithm based on weighted average, which is used to fuse multiple sensor data to improve the accuracy and stability of the data. In the six-axis fusion algorithm, complementary filtering is used to fuse the data of the accelerometer and gyroscope. The specific process is as follows:
[0085] Data Collection: Collect data from accelerometers and gyroscopes.
[0086] Data preprocessing: Preprocess the collected data, such as denoising and filtering, to improve data quality.
[0087] Complementary filter algorithm implementation: Based on the principle of complementary filter, a weighted average algorithm is implemented. The static angle provided by the accelerometer (calculated by the gravity component) and the dynamic angle provided by the gyroscope (obtained by integrating the angular velocity) are fused according to a certain weighting coefficient. The choice of weighting coefficient depends on the actual application scenario and the degree of trust in the sensor data.
[0088] Result output: The attitude data processed by the complementary filter (usually expressed in the form of quaternion) is output to the upper-layer application or stored in a storage device.
[0089] In this embodiment, although the six-axis fusion algorithm uses quaternions to represent and update the posture, Euler angles still play an important role in posture representation and display. Therefore, after obtaining the quaternion, it is usually converted into Euler angles to more intuitively reflect the posture changes of the vehicle. The calculation of Euler angles can be achieved through the conversion formula between quaternions and Euler angles.
[0090] By fusing the data from the accelerometer and gyroscope, the six-axis fusion algorithm can calculate the real dynamic state of the vehicle. This includes key information such as the vehicle's attitude (pitch angle, roll angle, yaw angle, etc.), speed, acceleration, etc. This information is crucial for tasks such as vehicle motion control, navigation, and positioning.
[0091] Therefore, the six-axis fusion algorithm of this embodiment combines the data of the accelerometer and gyroscope and uses quaternions to represent the posture and complementary filtering for data fusion, which can accurately reflect the vehicle's posture changes and calculate its true dynamic state. This algorithm has broad application prospects in the fields of vehicle motion control and autonomous driving.
[0092] In the above step S3, when a bidirectional linked list is used to store the processed data and a ring buffer is used to manage the memory, the following steps are specifically included:
[0093] A doubly linked list is defined, which consists of a series of nodes. The size of each node is fixed to be able to store a floating point number (ACCz data) and two pointers pointing to the previous node and the next node respectively, so as to support bidirectional traversal.
[0094] The bidirectional linked list is configured as a ring buffer, in which the head node and tail node of the linked list are connected by pointers to form a closed loop; when the buffer reaches the preset maximum size N, the new ACCz data will be inserted into the tail node of the linked list and at the same time overwrite the head node data of the linked list, realizing the circular storage and update of data, which can effectively manage memory and improve performance.
[0095] When the buffer is not full, that is, the number of nodes is less than N, a new node is created, the ACCz data is stored in the data field of the new node, and the pointers of the previous and next nodes are adjusted to insert the new node into the tail end of the linked list.
[0096] When the buffer is full, that is, the number of nodes is equal to N, no new node is created. Instead, the new ACCz data is directly overwritten into the head node data field of the linked list, and the pointer of the head node is adjusted so that the original head node becomes the successor node of the new tail node, thereby maintaining the total size of the ring buffer unchanged.
[0097] Provides bidirectional traversal function, allowing you to start from any node of the linked list, traverse the entire ring buffer through the front pointer or back pointer, and access the ACCz data of each node.
[0098] In this embodiment, each node specifically includes:
[0099] A floating point data field (ACCz) for storing the ACCz value;
[0100] A previous pointer field, pointing to the previous node in the linked list;
[0101] A back pointer field that points to the next node in the linked list.
[0102] Among them, the front pointer of the head node points to the tail node, and the back pointer of the tail node points to the head node to maintain the ring structure.
[0103] In the above step S4, performing data analysis based on the processed ACCz data includes:
[0104] A fixed-size time window N is set to determine the number of data items considered in each data analysis. In this embodiment, the data sampling frequency of the IMU (inertial measurement unit) is set to 50 Hz, that is, acceleration data is collected every 20 ms, which means that the length of each time window is 20 ms.
[0105] When analyzing acceleration data, a fixed-size time window N is set to determine how many data items are considered in each judgment. The selection of N is usually based on actual needs. For example, 5, 10, or 20 data items can be selected to balance analysis accuracy and computational efficiency.
[0106] A sliding window mechanism is used to manage the data in the time window. Each time new acceleration data (especially ACCz value) is collected, the data is added to the data set of the time window, and the earliest collected data in the time window is automatically removed, that is, the time window always contains the latest N acceleration data for judgment, which improves the system's real-time response capability to acceleration changes.
[0107] Every time new data arrives, the data content in the time window is automatically adjusted to ensure that the data in the window is always the latest and closely connected to the current moment. It also ensures that the judgment of the current status is based on the latest data. This dynamic update mechanism ensures the timeliness and accuracy of data analysis.
[0108] Based on the latest N acceleration data in the sliding time window, data analysis and processing are performed, such as calculating the average value, standard deviation, peak detection, etc., to extract acceleration features, which are then used to judge the uneven road sections.
[0109] Specifically, the application of time windows in data analysis:
[0110] Judgment of uneven road sections: For ACCz, set the maximum value ACCzmaxACCz and the minimum value ACCzmin of the uneven road sections, and count the number of times ACCz exceeds the range Count: According to the actual situation, set the value of ACCz_Max_Value and the value of ACCz_Min_Value. When the actual value of ACCz is greater than the value of ACCz_Max_Value, add ACCz_Max_Count+1. When the actual value of ACCz is greater than the value of ACCz_Min_Value, add ACCz_Min_Count+1. When the values of these two Counts are greater than the set x value in the time window, it is judged that the vehicle is on an uneven road section.
[0111] During the data collection process, the Count value of ACCz is continuously monitored. When it is detected that the Count value of ACCz is greater than the set threshold x, the uneven road section flag is set to 1, and the relevant data recording is started to record the acceleration data, timestamp, vehicle position and other information related to the uneven road section for subsequent analysis and processing.
[0112] After the uneven road section flag is set, continue to monitor the data changes of ACCz. When it is detected that the value of ACCz tends to be stable and the value of Count is no longer accumulated or meets other stable state judgment conditions, it is confirmed that the vehicle is no longer traveling on the uneven road section.
[0113] When it is confirmed that the vehicle is not on the uneven road section, the uneven road section flag is immediately reset to 0, and the counters related to the uneven road section detection, such as the Count value, the uneven road section duration counter, etc., are cleared or reset to prepare for the next uneven road section detection.
[0114] In this embodiment, alarm and recording are also performed, specifically including:
[0115] A threshold value x is preset as a basis for judging whether the ACCz data indicates that the vehicle is on an uneven road section. When it is detected that the vehicle is traveling on an uneven road section, the preset alarm program is immediately started, and when the uneven road section state is activated, the data related to the uneven road section event is stored in a non-volatile memory, and the related data includes but is not limited to the timestamp of the occurrence of the uneven road section, the vehicle location information, the ACCz data and its Count value, and possible other related sensor data (such as vehicle speed, steering wheel angle, etc.). The non-volatile memory ensures that the data can still be retained in the event of power failure or system failure, which is convenient for subsequent driving behavior analysis and safety assessment. Among them, the alarm program of this embodiment may include but is not limited to issuing a sound alarm, displaying a warning message on the vehicle display screen, or sending an alarm signal to the driver or a related safety system through wireless communication to remind the driver to pay attention to the road conditions and take corresponding measures.
[0116] Continue to monitor the data changes of ACCz. When it is detected that the value of ACCz tends to be stable and the value of Count is no longer accumulated or meets other stable state judgment conditions, it is confirmed that the vehicle is no longer traveling on the uneven road section; then, reset the uneven road section flag and stop the alarm program.
[0117] This embodiment ensures the security and accessibility of event data stored in uneven road sections by designing a reasonable data management mechanism; and provides a data access interface or tool to facilitate subsequent driving behavior analysis, safety assessment or troubleshooting.
[0118] Specifically, the MCU of this embodiment obtains the raw data of the six-axis gyroscope through the SPI interface, processes the raw data through low-pass filtering in the first stage, performs Kalman filtering on the first-layer filtered data to obtain the second-layer data, and finally performs a six-axis fusion algorithm to obtain the three-axis Euler angle; then, two bidirectional linked lists of size N are created, and the N data of the processed ACCz obtained every 20MS are stored in the cache array linked list, and the data are stored in the first x data of the bidirectional linked list, and it is determined whether there is a value greater than the maximum value set by Accz and less than the minimum value set by ACCz in the x data, and whether the vehicle is on an uneven road section.
[0119] This embodiment also provides a system for detecting uneven road sections for vehicles. The system architecture includes the following core parts (vertical installation is based on the Y axis, and horizontal installation is based on the Z axis):
[0120] IMU module: used to collect vehicle acceleration and angular velocity data in real time.
[0121] Data processing unit: performs low-pass filtering, Kalman filtering and six-axis fusion algorithm processing on the collected data.
[0122] Data storage unit: uses a bidirectional linked list to store processed data.
[0123] State judgment unit: performs sudden acceleration state judgment and uneven road section detection based on the processed data.
[0124] Alarm and recording unit: issues an alarm when sudden acceleration or potential sudden acceleration risk is detected, and records relevant data.
[0125] In summary, the present invention combines low-pass filtering, Kalman filtering and six-axis fusion algorithm to fully utilize the multi-dimensional data provided by IMU, thereby significantly improving the accuracy and reliability of the data.
[0126] Furthermore, the IMU-based method of the present invention can collect and process IMU data at a higher frequency (every 20ms), significantly improving real-time performance, so that collision detection can more quickly and accurately reflect the dynamic state of the vehicle, ensuring that the system can quickly respond to dynamic changes in the vehicle and adapt to complex driving environments.
[0127] Furthermore, the present invention can quickly identify sudden acceleration behavior and issue an alarm in a timely manner through real-time monitoring of the dynamic state of the vehicle, thereby improving the driver's alertness and reducing the possibility of accidents.
[0128] Furthermore, the design of the bidirectional linked list of the present invention makes data storage and management more flexible and efficient, and supports real-time analysis of dynamic data.
[0129] Furthermore, compared with the traditional high-cost collision detection technology, the IMU sensor of the present invention is low-cost and suitable for large-scale application, so that the technology can be applied to a wider range of vehicle models, thereby improving the overall traffic safety level.
[0130] It should be noted that the embodiments of the present invention can be deployed on a server with a network. A person skilled in the art can understand that the above methods and systems can be implemented using computer executable instructions and / or included in a processor control code. The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any modification, equivalent replacement and improvement made by any person skilled in the art within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered within the protection scope of the present invention.
[0131] The above-mentioned embodiments are only preferred embodiments of the present invention and cannot be used to limit the scope of protection of the present invention. Any non-substantial changes and substitutions made by technicians in this field on the basis of the present invention shall fall within the scope of protection required by the present invention.
Claims
1. A method for detecting uneven road sections for vehicles, characterized in that: The method comprises the following steps: Use the IMU module to obtain the vehicle's acceleration and angular velocity data in real time and calibrate the sensor data; The collected three-axis acceleration and three-axis angular velocity data are processed by low-pass filtering, and after removing high-frequency noise, Kalman filtering is performed to obtain the processed acceleration and velocity values. The processed acceleration and velocity values are processed by the six-axis fusion algorithm to obtain the real dynamic state of the vehicle; among them, when performing attitude estimation, the fused three-axis Euler angle is used to reflect the attitude change of the vehicle; A bidirectional linked list is used to store the processed data, wherein the linked list structure includes a bidirectional linked list of size N for storing the data of ACCz, and a ring buffer is used to manage the memory, so that when the buffer reaches the maximum size N, the new data will overwrite the old data; Data analysis is performed based on the processed ACCz data to detect uneven road sections. The maximum value ACCz_max and the minimum value ACCz_min of the uneven road section are set, and the number of times ACCz exceeds the range is counted. When Count is greater than the set threshold value x within the time window, it is determined that the vehicle is on an uneven road section.
2. The method according to claim 1, characterized in that: The IMU module includes a three-axis acceleration sensor and a three-axis gyroscope. The three-axis acceleration sensors ACCx, ACCy, ACCz and the three-axis gyroscopes Gyrox, Gyroy, Gyroz are used to obtain the vehicle motion state in real time, and the data sampling frequency is set to 50Hz.
3. The method according to claim 1, characterized in that: Before data acquisition, the sensor is offset calibrated and temperature compensated, including: In the absence of an external measurement signal, place the sensor in a stable environment and adjust the output signal of the sensor to a predetermined zero point value to calibrate the offset error of the sensor; wherein the offset calibration should include but is not limited to zero point calibration and multi-point calibration, wherein the zero point calibration is used to adjust the output of the sensor to zero in the absence of a signal, and the multi-point calibration further improves the accuracy of the sensor through multiple standard points; Temperature compensation technology is used to eliminate the influence of temperature changes on the sensor output signal.
4. The method according to claim 1, characterized in that: The low-pass filtering process is performed using a first-order low-pass filter, which is expressed as the following formula: y[n]=α×x[n]+(1-α)×y[n-1] Among them, α is the filter coefficient, and its value ranges from 0.1 to 0.
3.
5. The method according to claim 1, characterized in that: Before the Kalman filter process begins, the state estimate and covariance matrix are initialized. The state estimate includes the initial acceleration and velocity values, and the covariance matrix is used to describe the uncertainty of the initial state estimate. Set a state transition model that describes the change of system state over time; set an observation model that describes the observation data obtained from sensors or measurements; for IMU data, the state transition model is used to reflect the dynamic characteristics of acceleration and velocity, as well as control input, and for IMU data, the observation model maps acceleration and velocity to the space of observation data; Using the state transition model and the state estimate at the previous moment, predicting the state at the current moment, wherein the prediction step includes calculating the predicted state estimate and the prediction error covariance matrix; In combination with the observed data at the current moment, the state estimate is corrected through an updating step; wherein the updating step includes calculating the Kalman gain, updating the state estimate, and updating the error covariance matrix; Get the acceleration and velocity values processed by Kalman filter.
6. The method according to claim 1, characterized in that: When a bidirectional linked list is used to store processed data and a ring buffer is used to manage memory, the following steps are specifically included: Define a doubly linked list consisting of a series of nodes. The size of each node is fixed to be able to store a floating point number ACCz data and two pointers pointing to the previous node and the next node respectively to support bidirectional traversal; The bidirectional linked list is configured as a ring buffer, where the head node and tail node of the linked list are connected by pointers to form a closed loop; when the buffer reaches the preset maximum size N, the new ACCz data will be inserted into the tail node of the linked list and overwrite the head node data of the linked list at the same time, realizing the circular storage and update of data; When the buffer is not full, that is, the number of nodes is less than N, a new node is created, the ACCz data is stored in the data field of the new node, and the pointers of the previous and next nodes are adjusted to insert the new node into the tail end of the linked list; When the buffer is full, that is, the number of nodes is equal to N, no new node is created, but the new ACCz data is directly overwritten into the head node data field of the linked list, and the pointer of the head node is adjusted so that the original head node becomes the successor node of the new tail node, thereby maintaining the total size of the ring buffer unchanged; Provides bidirectional traversal function, allowing you to start from any node of the linked list, traverse the entire ring buffer through the front pointer or back pointer, and access the ACCz data of each node.
7. The method according to claim 6, characterized in that: Each node specifically includes: A floating point data field, used to store the ACCz value; A previous pointer field, pointing to the previous node in the linked list; A back pointer field, pointing to the next node in the linked list; Among them, the front pointer of the head node points to the tail node, and the back pointer of the tail node points to the head node to maintain the ring structure.
8. The method according to claim 1, characterized in that: The data analysis includes: Set a fixed-size time window N to determine the number of data items to be considered in each data analysis; A sliding window mechanism is used to manage the data in the time window. Each time new acceleration data is collected, the data is added to the data set of the time window, and the earliest collected data in the time window is automatically removed, that is, the time window always contains the latest N acceleration data. Every time new data arrives, the data content in the time window is automatically adjusted to ensure that the data in the window is always the latest; Based on the latest N acceleration data in the sliding time window, data analysis and processing are performed to extract acceleration features, which are then used to judge the uneven road sections.
9. The method according to claim 1, characterized in that: During the data collection process, the Count value of ACCz is continuously monitored. When it is detected that the Count value of ACCz is greater than the set threshold value x, the uneven road section flag is set to 1 and related data recording is started; After the uneven road section flag is set, continue to monitor the data changes of ACCz. When it is detected that the value of ACCz tends to be stable, and the value of Count is no longer accumulated or meets other stable state judgment conditions, it is confirmed that the vehicle is no longer traveling on the uneven road section; When it is confirmed that the vehicle is not on the uneven road section, the uneven road section flag is immediately reset to 0, and the counters related to the uneven road section detection are cleared or reset to prepare for the next uneven road section detection.
10. The method according to claim 1, characterized in that Also performs alarm and logging: When it is detected that the vehicle is traveling on an uneven road section, a preset alarm program is immediately started, and when the uneven road section state is activated, data related to the uneven road section event is stored in a non-volatile memory; Continue to monitor the data changes of ACCz. When it is detected that the value of ACCz tends to be stable, and the value of Count is no longer accumulated or meets other stable state judgment conditions, it is confirmed that the vehicle is no longer traveling on the uneven road section. Then, the uneven road section flag is reset and the alarm program is stopped.
Citation Information
Patent Citations
Pavement condition information acquisition and release method
CN105427606A
A slope estimation method based on complementary filtering for acceleration correction
CN114932909A
Mobile terminal-based pavement longitudinal section flatness real-time detection method and system
CN115422710A
Vehicle speed fusion estimation method and device based on GPS, IMU and wheel speed sensor signals
CN115848383A
Road condition monitoring and coping method for unmanned commercial vehicle
CN115892063A
Cited By
Parking detection method, device and equipment based on visual identification and storage medium
CN120894735A
A near real-time delay heave measurement method and system based on zero-phase filtering
CN122688912A