An implementation method for detecting uneven road sections of a vehicle
By processing and analyzing the data of the IMU module, the real-time and accuracy issues of vehicle uneven road detection are solved, and fast and accurate road condition recognition and alarm are achieved. It is suitable for a variety of vehicle models and improves traffic safety.
Patent Information
- Application Number
- CN202411753591.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-12-02
AI Technical Summary
Existing technologies have problems with detecting vehicles on uneven roads, such as insufficient real-time performance, poor anti-interference performance, and unstable detection accuracy. In particular, in autonomous driving systems, they are unable to effectively identify the dynamic state of the vehicle, leading to misjudgments or missed judgments.
By performing low-pass filtering, Kalman filtering, and six-axis fusion algorithm processing on the three-axis acceleration and three-axis angular velocity data of the IMU module, combined with bidirectional linked list storage and ring buffer management, vertical acceleration data is analyzed in real time, and thresholds are set to determine uneven road sections.
It significantly improves the accuracy and real-time performance of detection, can quickly respond to vehicle dynamic changes, adapt to complex driving environments, reduce accident risks, lower costs, and is suitable for a variety of vehicle models.
Smart Images

Figure CN119749564B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of intelligent transportation, and in particular to an implementation method for detecting uneven road sections of a vehicle. BACKGROUND
[0002] Currently, the driving experience and safety of vehicles based on road flatness are widely concerned. Especially in the automatic driving system, it is crucial to detect and respond to road conditions in real time. Traditional methods mainly rely on external sensors or static inspection, which have slow response speed and limited accuracy. IMU, as a dynamic measurement sensor, has the advantages of real-time and high accuracy, but IMU data is easily affected by noise and vibration.
[0003] Traditional uneven road section detection methods often rely on static sensors, manual inspection or external equipment, which cannot capture the dynamic state of the vehicle in real time, resulting in timeliness problems in judging uneven road sections. Alternatively, GPS-based detection methods are limited by signal interference, especially in urban environments, which can easily produce errors.
[0004] Existing IMU data processing methods cannot effectively filter high-frequency noise and sudden vibrations, which may lead to false positives or missed detections of uneven road sections, affecting the reliability of the system. There is often a delay in data processing, which cannot achieve fast response. When implementing sudden acceleration detection, a certain threshold value may be set based on the ACCy data of the vehicle.
[0005] Many existing uneven road section 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 cannot adaptively adjust to these variables, resulting in unstable detection accuracy in different situations.
[0006] Therefore, an efficient algorithm for detecting uneven road sections is needed to ensure the accuracy of monitoring. SUMMARY
[0007] To solve the problems existing in the prior art, the purpose of the present application is to provide an implementation method for detecting uneven road sections of a vehicle, which 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, has the characteristics of real-time and strong anti-interference, and is suitable for various vehicles and road conditions.
[0008] The present application achieves the above-mentioned purposes through the following technical solutions:
[0009] An implementation method for detecting uneven road sections of a vehicle, the method comprising the following steps:
[0010] Real-time acquisition of acceleration and angular velocity data of the vehicle using the IMU module and sensor data calibration;
[0011] Low-pass filtering of the collected three-axis acceleration and three-axis angular velocity data, followed by Kalman filtering after removing high-frequency noise to obtain processed acceleration and velocity values, and six-axis fusion algorithm processing of the processed acceleration and velocity values to obtain the real dynamic state of the vehicle; wherein during attitude estimation, the fused three-axis Euler angle is used to reflect the attitude change of the vehicle;
[0012] The processed data is stored using a doubly linked list, wherein the linked list structure includes a doubly linked list with a size of N for storing ACCz data, and a ring buffer is used to manage memory so that when the buffer reaches the maximum size N, new data will overwrite old data.
[0013] 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 Count that ACCz exceeds the range is counted, and when Count is greater than the set threshold x within the time window, it is determined that the vehicle is in an uneven road section.
[0014] According to the implementation method for detecting uneven road sections of a vehicle provided by the application, the IMU module includes a three-axis acceleration sensor and a three-axis gyroscope, and the three-axis acceleration sensor ACCx, ACCy, ACCz and the three-axis gyroscope Gyrox, Gyroy, Gyroz are used to acquire the motion state of the vehicle in real time, and the data sampling frequency is set to 50Hz.
[0015] According to the implementation method for detecting uneven road sections of a vehicle provided by the application, before data acquisition, the sensor is calibrated for offset and temperature compensation, including:
[0016] In the absence of external measurement signals, 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 not limited to zero correction and multi-point correction, wherein the zero correction is used to adjust the output of the sensor in the absence of signals to zero, and the multi-point correction is used to further improve the accuracy of the sensor through multiple standard points;
[0017] Temperature compensation technology is used to eliminate the influence of temperature changes on the output signal of the sensor.
[0018] According to the implementation method for detecting uneven road sections of a vehicle provided by the application, the low-pass filtering process uses a first-order low-pass filter for processing, represented by the following formula:
[0019] y[n] = a * x[n] + (1-a) * y[n-1]
[0020] Wherein, a is filter coefficient, and the value is 0.1-0.3.
[0021] According to the implementation method for detecting uneven road section of vehicle provided by the application, before starting Kalman filtering processing, firstly, initial state estimation and covariance matrix are initialized, the state estimation includes initial acceleration and speed value, and the covariance matrix is used for describing the uncertainty of initial state estimation.
[0022] State transition model for describing the change of system state with time is set;And observation model for obtaining observation data from sensor or measurement is set;Wherein, for IMU data, the state transition model is used for reflecting the dynamic characteristics of acceleration and speed, and control input, and for IMU data, the observation model is mapped to the space of observation data.
[0023] The state at the current time is predicted by using the state transition model and the state estimation at the last time, and the prediction step includes calculating predicted state estimation and predicted error covariance matrix.
[0024] The state estimation is corrected by combining the observation data at the current time through the updating step;Wherein, the updating step includes calculating Kalman gain, updating state estimation and updating error covariance matrix.
[0025] The acceleration and speed values processed by Kalman filtering are obtained.
[0026] According to the implementation method for detecting uneven road section of vehicle provided by the application, when the processed data is stored by using double linked list and the memory is managed by using ring buffer, the method specifically comprises the following steps.
[0027] A double linked list is defined, the list is composed of a series of nodes, the size of each node is fixed to be able to store an ACCz data of floating point number and two pointers respectively pointing to the previous node and the next node, so as to support bidirectional traversal;
[0028] The double linked list is configured as a ring buffer, wherein the head node and the tail node of the list are connected through a pointer, forming 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 list, and the head node data of the list will be overwritten at the same time, realizing the cyclic storage and updating of data;
[0029] When the buffer is not full, i.e., 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, and the new node is inserted into the tail end of the list;
[0030] When the buffer is full, i.e. the number of nodes equals N, instead of creating a new node, the new ACCz data is directly overwritten into the head node data field of the linked list, and the head node pointer is adjusted so that the original head node becomes the successor of the new tail node, thus maintaining the total size of the ring buffer unchanged;
[0031] A bidirectional traversal function is provided, allowing traversal of the entire ring buffer from any node of the linked list, through the forward or backward pointers, to access the ACCz data of each node.
[0032] According to the implementation method for detecting uneven road sections of a vehicle provided by the application, each node specifically comprises:
[0033] a floating-point data field for storing the ACCz value;
[0034] a forward pointer field pointing to the previous node in the linked list;
[0035] a backward pointer field pointing to the next node in the linked list.
[0036] The forward pointer of the head node points to the tail node, and the backward pointer of the tail node points to the head node, so as to maintain the ring structure.
[0037] According to the implementation method for detecting uneven road sections of a vehicle provided by the application, the data analysis comprises:
[0038] A fixed-size time window N is set to determine the number of data considered in each data analysis;
[0039] A sliding window mechanism is used to manage the data in the time window. When new acceleration data is collected, the data is added to the data set in the time window, and the earliest collected data in the time window is automatically removed, i.e. the time window always contains the latest N pieces of acceleration data;
[0040] The data content in the time window is automatically adjusted when new data arrives, ensuring that the data in the window is always up-to-date;
[0041] Based on the latest N pieces of acceleration data in the sliding time window, data analysis and processing are performed to extract acceleration features, which are then used for uneven road section judgment.
[0042] According to the implementation method for detecting uneven road sections of a vehicle provided by the application, 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 x, the uneven road section flag is set to 1, and relevant data recording is started;
[0043] After the uneven road section flag bit is set, the data change of ACCz is continuously monitored, and 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 has not driven 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 bit is immediately reset to 0, and the counters related to the uneven road section detection are cleared or reset, so as to prepare for the next uneven road section detection.
[0045] According to the implementation method for detecting the uneven road section of the vehicle provided by the application, the alarm and recording are also performed:
[0046] When it is detected that the vehicle drives on the uneven road section, a preset alarm program is started immediately, and the uneven road section event related data is stored in the non-volatile memory when the uneven road section state is activated.
[0047] The data change of ACCz is continuously monitored, and 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 has not driven on the uneven road section; subsequently, the uneven road section flag bit is reset, and the alarm program is stopped.
[0048] Therefore, compared with the prior art, the application has the following beneficial effects:
[0049] 1、The application fully utilizes the multi-dimensional data provided by the IMU by combining low-pass filtering, Kalman filtering and six-axis fusion algorithm, significantly improves the accuracy and reliability of the data.
[0050] 2、The method based on the IMU can collect and process IMU data at a high frequency (every 20ms), significantly improve the real-time performance, so that the collision detection can more quickly and accurately reflect the dynamic state of the vehicle, ensure that the system can quickly respond to the dynamic change of the vehicle, and adapt to complex driving environment.
[0051] 3、The application can quickly identify the rapid acceleration behavior and timely issue a warning through real-time monitoring of the dynamic state of the vehicle, thereby improving the alertness of the driver and reducing the possibility of accidents.
[0052] 4、The design of the double-linked list 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 has a lower cost and is suitable for large-scale application, so that the technology can be applied to a wider range of vehicle models, and the overall traffic safety level is improved.
[0054] The application will be described in further detail below with reference to the drawings and specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0055] Figure 1 is a flow chart of an embodiment of the implementation method for detecting uneven road sections of a vehicle.
[0056] Figure 2 is a flow chart of an embodiment of the implementation method for detecting uneven road sections of a vehicle. DETAILED DESCRIPTION
[0057] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the drawings in the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0058] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of other embodiments. It is explicitly contemplated that embodiments described herein can be combined with other embodiments.
[0059] Referring to Figure 1 With Figure 2 , the present application provides an implementation method for detecting uneven road sections of a vehicle, which comprises the following steps:
[0060] Step S1, using an IMU module to obtain acceleration and angular velocity data of the vehicle in real time and performing sensor data calibration;
[0061] Step S2, performing low-pass filtering processing on the collected three-axis acceleration and three-axis angular velocity data, performing Kalman filtering processing after removing high-frequency noise to obtain processed acceleration and velocity values, and performing six-axis fusion algorithm processing on the processed acceleration and velocity values 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 double-linked list to store the processed data, wherein the linked list structure comprises a double-linked list with a size of N, used to store the data of ACCz, and using a ring buffer to manage the memory, so that when the buffer reaches the maximum size N, the new data will cover the old data;
[0063] Step S4, data analysis is performed according to 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 Count that ACCz exceeds the range is counted, and when Count is greater than a set threshold x within a time window, it is judged that the vehicle is in 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 of the data.
[0065] In this embodiment, before data acquisition, offset calibration and temperature compensation are performed on the sensor to reduce the influence of external factors (such as temperature change and sensor drift) on the data, which specifically includes:
[0066] In the absence of external measurement signals, 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 not limited to zero point correction and multi-point correction, wherein the zero point correction is used to adjust the output of the sensor in the absence of signal to zero, and the multi-point correction is used to further improve the accuracy of the sensor.
[0067] Temperature compensation techniques are used to eliminate the influence of temperature changes on the output signal of the sensor, including but not limited to hardware compensation, software compensation and self-compensation method.
[0068] The hardware compensation method can include adding a temperature compensation circuit in the measurement circuit of the sensor, such as using a thermistor, a leveling resistor, etc. to compensate for temperature changes.
[0069] The software compensation method processes the output signal of the sensor through an algorithm to eliminate errors caused by temperature changes, which includes but is not limited to least squares fitting straight line compensation method, curve fitting compensation method, and compensation method based on neural network, etc.
[0070] The self-compensation method is to select appropriate materials and design for the sensor so that it can self-compensate when the temperature changes, thereby reducing the temperature error. For example, single-wire self-compensation method and combined self-compensation method.
[0071] When implementing temperature compensation, the specific application scenario and temperature change range of the sensor should be considered, and appropriate temperature compensation method 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 for implementation. The filtered data will be smoother, retaining the main motion signal and reducing the interference of environmental noise, ensuring the availability of the data, smoothing the data. Among them, the low-pass filtering process adopts a first-order low-pass filter for processing, which is expressed in the following formula:
[0073] y[n]=α×x[n]+(1-α)×y[n-1]
[0074] Wherein, a is the filter coefficient, the value is 0.1-0.3.
[0075] In the above step S2, before the Kalman filtering process starts, the state estimation and covariance matrix are first initialized, the state estimation includes the initial acceleration and speed value, and the covariance matrix is used to describe the uncertainty of the initial state estimation.
[0076] The state transition model describing the change of system state over time is set, the observation model describing the observation data obtained from sensors or measurements is set, and the state prediction is performed using IMU data; wherein, for the IMU data, the state transition model is used to reflect the dynamic characteristics of acceleration and speed, and the control input, and for the IMU data, the observation model maps the acceleration and speed to the space of observation data.
[0077] The state transition model and the state estimation of the last time are used to predict the state of the current time, wherein the prediction step includes calculating the predicted state estimation and the predicted error covariance matrix.
[0078] By combining the observation data of the current time, the state estimation is corrected through the update step to obtain more accurate acceleration and speed values; wherein, the update step includes calculating the Kalman gain, updating the state estimation and updating the error covariance matrix. The Kalman gain is used to weigh the reliability of the prior estimation and the observation value, so as to obtain a more accurate state estimation.
[0079] In the above step S2, the six-axis fusion algorithm of the embodiment uses quaternions to represent the attitude, and performs complementary filtering through the measurement values of the accelerometer and the gyroscope to update the quaternions to obtain the direction and position changes of the vehicle; the acceleration and angular velocity data are fused to calculate the real dynamic state of the vehicle. Among them, the fused Euler angle can accurately reflect the attitude change of the vehicle.
[0080] Specifically, the six-axis fusion algorithm is a combination of accelerometer and gyroscope data attitude estimation algorithm, that is, the data of three axes of gyroscope and three axes of accelerometer are used to calculate the 3D attitude (3Dof attitude). It uses quaternions to represent the attitude, and uses complementary filtering to fuse the measurement values of the two sensors, so as to update the quaternion to obtain the direction and position change of the vehicle.
[0081] Among them, the gyroscope can provide the angular acceleration of 3 axes, and by integrating the time, the direction angle of the object rotation can be obtained. However, due to the accumulation of hardware precision and integral error, the calculated angle will drift.
[0082] The accelerometer in the general 3Dof motion, the acceleration generated by the movement is less, and the greatest impact on the object is gravity, and the gravity is always perpendicular to the bottom. Therefore, the accelerometer can use gravity as a reference to correct the data calculated by the gyroscope.
[0083] In the attitude solution, quaternions have the advantages of faster speed, providing smooth interpolation, effectively avoiding gimbal lock problem, smaller storage space, etc. compared with other representation methods (such as matrix, Euler angle, axis angle).
[0084] Complementary filtering is a kind of algorithm based on weighted average, which is used to fuse multiple sensor data to improve the accuracy and stability of data. In the six-axis fusion algorithm, complementary filtering is used to fuse the data of accelerometer and gyroscope. The specific process is as follows:
[0085] Data acquisition: collect data from accelerometer and gyroscope.
[0086] Data preprocessing: preprocess the collected data, such as denoising, filtering, etc. to improve the data quality.
[0087] Complementary filtering algorithm implementation: according to the principle of complementary filter, the weighted average algorithm is realized. Among them, 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) will be fused according to a certain weighting coefficient. The selection of weighting coefficient depends on the actual application scene and the degree of trust in sensor data.
[0088] Result output: output the attitude data processed by the complementary filter (usually represented in the form of quaternion) to the upper layer application or store it in the storage device.
[0089] In this embodiment, although the six-axis fusion algorithm uses quaternions to represent and update the attitude, Euler angles still play an important role in attitude representation and display. Therefore, after obtaining the quaternion, it is usually converted into Euler angles to reflect the attitude change of the vehicle more intuitively. The calculation of Euler angles can be realized through the conversion formula between quaternion and Euler angle.
[0090] By fusing the data of the accelerometer and the gyroscope, the six-axis fusion algorithm can calculate the real dynamic state of the vehicle. This includes the attitude of the vehicle (pitch angle, roll angle, yaw angle, etc.), speed, acceleration, and other key information. These information is crucial for the motion control, navigation and positioning of the vehicle.
[0091] Therefore, the six-axis fusion algorithm of the present embodiment can accurately reflect the attitude change of the vehicle and calculate its real dynamic state by combining the data of the accelerometer and the gyroscope, and using quaternions to represent the attitude and complementary filtering for data fusion. This algorithm has wide application prospects in the fields of vehicle motion control, autonomous driving, etc.
[0092] In the above step S3, when the processed data is stored in a double-linked list and the memory is managed in a ring buffer, it specifically includes:
[0093] A double-linked list is defined, which consists of a series of nodes, each node has a fixed size to store a floating-point number (ACCz data) and two pointers to the previous node and the next node respectively, to support bidirectional traversal.
[0094] The double-linked list is configured as a ring buffer, where the head node and the tail node of the 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 list, and at the same time, the head node data of the list will be overwritten, realizing the circular storage and updating of data, which can effectively manage memory and improve performance.
[0095] When the buffer is not full, i.e. 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, and the new node is inserted into the tail of the list.
[0096] When the buffer is full, i.e. the number of nodes is equal to N, a new node is not created, but the new ACCz data is directly overwritten into the data field of the head node of the 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] Provide bidirectional traversal function, allow to start from any node in the list, traverse the entire ring buffer through the front pointer or the back pointer, access the ACCz data of each node.
[0098] In the embodiment, each node specifically comprises:
[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 next pointer field pointing to the next node in the linked list.
[0102] The previous pointer of the head node points to the tail node, and the next pointer of the tail node points to the head node, so as to maintain a ring structure.
[0103] In the step S4, the data analysis according to the processed ACCz data comprises:
[0104] A fixed-size time window N is set to determine the number of data considered in each data analysis; in the embodiment, the data sampling frequency of the IMU (Inertial Measurement Unit) is set to 50 Hz, that is, the acceleration data is collected every 20 ms, which means that the length of each time window is 20 ms.
[0105] When analyzing the acceleration data, a fixed-size time window N is set to determine how many data are considered in each judgment. The selection of N is usually based on actual needs, for example, 5, 10, or 20 data can be selected to balance the analysis accuracy and calculation efficiency.
[0106] The sliding window mechanism is used to manage the data in the time window. When new acceleration data (especially ACCz value) is collected, the data is added to the data set in the time window, and the earliest collected data in the time window is automatically removed, that is, the time window always maintains the latest N acceleration data for judgment, which improves the real-time response ability of the system to acceleration changes.
[0107] When 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 time, and also ensures that the judgment of the current state is based on the latest data. This dynamic updating mechanism guarantees 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 for the judgment of uneven road sections.
[0109] Specifically, the application of the time window in data analysis:
[0110] Uneven road section judgment: For ACCz, set the maximum value ACCzmax and the minimum value ACCzmin of the uneven road section, 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 obtained value of ACCz is greater than the value of ACCz_Max_Value, ACCz_Max_Count+1, when the actual obtained value of ACCz is greater than the value of ACCz_Min_Value, ACCz_Min_Count+1, when the values of the two counts are greater than the set x value in the time window, it is judged that the vehicle is in the uneven road section.
[0111] In the data acquisition process, the Count value of ACCz is continuously monitored, and 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, and the acceleration data, time stamp, vehicle position and other information related to the uneven road section are recorded for subsequent analysis and processing.
[0112] After the uneven road section flag is set, the data change of ACCz is continuously monitored, and 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 has not driven 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 x is set in advance as a basis for judging whether ACCz data indicates that the vehicle is on an uneven road section. When it is detected that the vehicle is driving on an uneven road section, the pre-set alarm program is immediately started, and the uneven road section event related data is stored in the non-volatile memory when the uneven road section state is activated, including but not limited to the time stamp of the uneven road section occurrence, vehicle position information, ACCz data and its Count value, and possibly other related sensor data (such as vehicle speed, steering wheel angle, etc.). The non-volatile memory ensures that the data can be retained in the event of power failure or system failure, facilitating subsequent driving behavior analysis and safety evaluation. The alarm program of the present embodiment can include but is not limited to sounding an audible alarm, displaying warning information on the vehicle display screen, or sending an alarm signal to the driver or related safety system through wireless communication, to remind the driver to pay attention to the road surface condition and take appropriate measures.
[0116] Continuously monitor the data change of ACCz, when detecting 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 driving on the uneven road section; then, the uneven road section flag is reset, and the alarm program is stopped.
[0117] The embodiment ensures the security and accessibility of the storage of uneven road section event data by designing a reasonable data management mechanism; and provides a data access interface or tool for subsequent driving behavior analysis, safety evaluation or fault troubleshooting.
[0118] Specifically, the MCU 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, obtains the second layer data by performing Kalman filtering on the first layer filtered data, and finally obtains the three-axis Euler angle by performing six-axis fusion algorithm; then, two bidirectional linked lists are created, and the size is N, N data of 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 whether the x data is greater than the maximum value of the set Accz and less than the minimum value of the set ACCz is judged, and whether the vehicle is on the uneven road section.
[0119] The embodiment also provides a system for detecting an uneven road section of a vehicle, and the system architecture includes the following core parts (vertically installed to judge Y axis, horizontally installed to judge Z axis):
[0120] The IMU module is used for collecting acceleration and angular velocity data of the vehicle in real time.
[0121] The data processing unit is used for performing low-pass filtering, Kalman filtering and six-axis fusion algorithm processing on the collected data.
[0122] The data storage unit is used for storing the processed data by using bidirectional linked lists.
[0123] The state judgment unit is used for performing sudden acceleration state judgment and uneven road section detection according to the processed data.
[0124] The alarm and recording unit is used for alarming when detecting sudden acceleration or potential sudden acceleration risk, and recording related data.
[0125] In summary, the application fully utilizes the multi-dimensional data provided by the IMU by combining low-pass filtering, Kalman filtering and six-axis fusion algorithm, and significantly improves the accuracy and reliability of the data.
[0126] Further, the IMU-based method of the present application can collect and process IMU data at a higher frequency (every 20 ms), 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 changes in vehicle dynamics and adapt to complex driving environments.
[0127] Further, by monitoring the real-time dynamic state of the vehicle, the present application can quickly identify rapid acceleration behavior and issue timely warnings, thereby improving the alertness of the driver and reducing the likelihood of accidents.
[0128] Further, the design of the double-linked list makes data storage and management more flexible and efficient, supporting real-time analysis of dynamic data.
[0129] Further, compared with traditional high-cost collision detection technology, the IMU sensor of the present application is relatively low-cost and suitable for large-scale application, making the technology applicable to a wider range of vehicle models and improving overall traffic safety.
[0130] It should be noted that the embodiments of the present application can be deployed on a networked server. Those skilled in the art can understand that the above-mentioned method and system can be implemented using computer executable instructions and / or included in processor control code. The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any modification, equivalent replacement and improvement made by those skilled in the art within the technical scope disclosed by the present application, which is within the spirit and principles of the present application, should be covered within the protection scope of the present application.
[0131] The above-mentioned embodiments are only preferred embodiments of the present application, and cannot be used to limit the protection scope of the present application. Any non-essential changes and replacements made by those skilled in the art on the basis of the present application should be covered within the protection scope of the present application.
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 perform sensor data calibration; The collected three-axis acceleration and three-axis angular velocity data are low-pass filtered, and after removing high-frequency noise, Kalman filtering is performed to obtain processed acceleration and velocity values. These processed acceleration and velocity values are then processed using a six-axis fusion algorithm to obtain the vehicle's true dynamic state. When performing attitude estimation, the fused three-axis Euler angles are used to reflect the vehicle's attitude changes. A doubly linked list is used to store the processed data. The linked list structure includes a doubly linked list of size N for storing the data of ACCz. 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. A maximum value, ACCz_max, and a minimum value, ACCz_min, are set for uneven road sections. The number of times ACCz exceeds the range (Count) is counted. When Count is greater than a set threshold, x, within a time window, the vehicle is determined to be on an uneven road section.
2. The method according to claim 1, wherein: 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 status in real time, and the data sampling frequency is set to 50Hz.
3. The method according to claim 1, wherein: 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 sensor's output signal to a predetermined zero-point value to calibrate the sensor's offset error. Offset calibration should include but is not limited to zero-point calibration and multi-point calibration. Zero-point calibration is used to adjust the sensor's output to zero in the absence of a signal, while multi-point calibration uses multiple standard points to further improve the sensor's accuracy. Temperature compensation technology is used to eliminate the influence of temperature changes on the sensor output signal.
4. The method according to claim 1, wherein: 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, wherein: 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 how the system state changes 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 inputs, 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; Combined with the observation data at the current moment, the state estimate is corrected through an update step; wherein the update 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, wherein: When using a doubly linked list to store processed data and a ring buffer 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 doubly linked list is configured as a ring buffer, where the head and tail nodes of the linked list are connected by pointers, forming a closed loop. When the buffer reaches the preset maximum size N, new ACCz data will be inserted into the tail node of the linked list, overwriting the data at the head node of the linked list at the same time, realizing 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, and the new node is inserted at the 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. Instead, the new ACCz data is directly overwritten into the data field of the head node 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 functionality, allowing you to start from any node in 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; The forward pointer of the head node points to the tail node, and the backward pointer of the tail node points to the head node to maintain the ring structure.
8. The method according to claim 1, wherein: The data analysis includes: Set a fixed-size time window N to determine the number of data items considered in each data analysis; A sliding window mechanism is used to manage data within a time window. Each time new acceleration data is collected, it is added to the data set of the time window, and the earliest data collected in the time window is automatically removed. That is, the time window always contains the latest N acceleration data. Automatically adjust the data content within the time window each time new data arrives to ensure that the data in the window is always up to date; Based on the latest N acceleration data within the sliding time window, data analysis and processing are performed to extract acceleration features, which are then used to determine uneven road sections.
9. The method according to claim 1, wherein: During the data collection process, the ACCz Count value is continuously monitored. When the ACCz Count value is detected to be greater than the set threshold x, the uneven road section flag is set to 1 and related data recording is started; After the rough road section flag is set, the ACCz data changes are continuously monitored. When the ACCz value is detected to be stable and the Count value is no longer accumulated or other stable state judgment conditions are met, it is confirmed that the vehicle is no longer traveling on the rough 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 alarming and logging: 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 the non-volatile memory; Continue to monitor the changes in ACCz data. When it is detected that the ACCz value tends to be stable and the Count value is no longer accumulating or other stable state judgment conditions are met, 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