A method for detecting continuous lane changes of a vehicle

By combining IMU sensors with low-pass filtering and Kalman filtering algorithms, high-precision, real-time detection of vehicle lane-changing behavior is achieved, solving the problems of accuracy, real-time performance, and cost in existing lane-changing detection technologies, and improving the safety and reliability of intelligent transportation and autonomous driving.

CN119625983BActive Publication Date: 2025-11-25ZHUHAI MAGIC CUBE INTELLIGENT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411801468.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-11-25
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

Existing lane change detection methods are insufficient in terms of accuracy, real-time performance, cost, and environmental adaptability, making it difficult to meet the needs of intelligent transportation and autonomous driving. In particular, they are not accurate enough when identifying continuous and frequent lane change behaviors, and they rely on high-cost sensors that are susceptible to environmental interference.

Method used

By utilizing acceleration and angular velocity data from IMU sensors, combined with low-pass filtering, Kalman filtering, and a six-axis fusion algorithm, lane-changing behavior of vehicles is detected through a doubly linked list. Frequent lane changes are identified by timestamps and thresholds, reducing reliance on external signals.

Benefits of technology

It achieves high-precision, real-time vehicle lane change detection, reduces system costs, enhances environmental adaptability, and can promptly identify continuous and frequent lane change behaviors, thereby improving road safety and system robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119625983B_ABST
    Figure CN119625983B_ABST
Patent Text Reader

Abstract

The application provides an implementation method for detecting continuous lane changing of a vehicle, which comprises: integrating the average values of the yaw angle and Z-axis angular velocity data obtained, and obtaining the integral change of the average values; judging whether the integral change value of the Z-axis average value exceeds a preset lane changing angle threshold value, and if yes, determining that the vehicle is changing lane; when detecting that the vehicle is changing lane, creating a double-linked list node, storing the time node of the vehicle lane changing, and checking whether the current lane changing is the first lane changing; when detecting that the vehicle continuously changes lane three times in a short time, calculating the time difference between the current lane changing and the first lane changing, and if the time difference is less than or equal to a preset threshold value, determining that the vehicle has a frequent lane changing behavior. The application can track the driving track of the vehicle in real time, realize accurate detection of the continuous lane changing behavior of the vehicle, and further judge whether the driver has the abnormal driving behavior of frequent lane changing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of intelligent transportation, automatic driving technology and driving behavior monitoring technology, and particularly relates to an implementation method for detecting continuous lane changing of a vehicle. BACKGROUND

[0002] In the rapid development of intelligent transportation systems and automatic driving technology, vehicle lane changing behavior detection as a key safety monitoring indicator, its accuracy and real-time performance is of vital importance to improve road safety, optimize traffic flow and promote the mature application of automatic driving technology. However, the current lane changing detection methods still face a series of technical challenges, which are difficult to meet the growing demand for traffic safety and intelligent driving.

[0003] Firstly, traditional lane changing detection methods mainly rely on vehicle positioning systems (such as global satellite systems) or visual recognition technology. However, these methods are limited by many external environments in practical application. For example, global satellite systems may face signal blockage or reflection interference in certain specific environments (such as urban canyons, tunnels or high-rise building dense areas), resulting in decreased positioning accuracy. Visual recognition technology is easily affected by factors such as lighting conditions, weather conditions (such as fog, haze, rain and snow), and road conditions (such as water accumulation, oil stains), resulting in image blurring and reduced recognition accuracy, thus failing to accurately determine the vehicle's lane changing behavior.

[0004] Secondly, some existing lane changing detection methods have obvious shortcomings in identifying continuous lane changing and frequent lane changing behavior. These technologies can only identify single lane changing behavior, but cannot effectively distinguish and record the continuous and frequent lane changing behavior of vehicles. However, in the context of intelligent transportation systems and automatic driving, frequent lane changing is often a direct manifestation of driver fatigue, impatience or non-standard driving, and if it cannot be identified and addressed in a timely manner, it will greatly increase the risk of traffic accidents.

[0005] In addition, the lack of real-time performance is also a major challenge faced by current lane changing detection methods. Many existing detection systems require a long data processing time to analyze the vehicle's driving trajectory and lane changing behavior, resulting in a delay in responding to continuous lane changing behavior. This delay not only misses the best intervention opportunity, but also exacerbates traffic congestion and safety hazards.

[0006] At the same time, the large data processing and response delay is also a significant drawback of traditional lane changing detection technology. Due to the need to process a large amount of sensor data and perform complex algorithm calculations, these systems often have high computational delays, making it impossible to make accurate driving decisions in a timely manner. In automatic driving systems, this delay can directly endanger driving safety, as fast and accurate lane changing recognition is critical to ensuring the safe driving of autonomous vehicles.

[0007] Finally, the strong sensor dependence and high cost are also important problems faced by current lane changing detection technology. Some existing technologies rely on high-cost sensors (such as lidar, high-precision cameras, etc.), which have high purchase and maintenance costs and may fail in adverse weather conditions, thereby seriously affecting the reliability and stability of the system.

[0008] In summary, the current lane changing detection methods still have many shortcomings in accuracy, real-time performance, cost, and environmental adaptability, and it is difficult to meet the urgent needs of intelligent transportation systems and autonomous driving technology development. Therefore, it is of great significance to develop a new, efficient and accurate lane changing detection method for improving road safety, optimizing traffic flow and promoting the mature application of autonomous driving technology. SUMMARY

[0009] In order to solve the problems existing in the prior art, the purpose of the present application is to provide an implementation method for detecting continuous lane changing of a vehicle, which aims to use IMU data, combined with advanced algorithm technology, to realize accurate detection of continuous lane changing behavior of the vehicle, and further judge whether there is frequent lane changing behavior. The present application can track the driving trajectory of the vehicle in real time, identify each lane changing behavior, and judge whether the driver has abnormal driving behavior of frequent lane changing by counting the lane changing frequency and analyzing the lane changing interval and other key indicators.

[0010] The present application realizes the above-mentioned purpose through the following technical solutions:

[0011] An implementation method for detecting continuous lane changing of a vehicle, the method comprising the following steps:

[0012] Two double-linked lists are created for storing the obtained yaw angle and Z-axis angular velocity data, and the first X data are extracted from each list to calculate the average value of the data, so as to analyze the steering behavior of the vehicle and obtain the change of the current yaw angle;

[0013] The average values of the yaw angle and Z-axis angular velocity data are integrated, the difference between the current Z-axis angular velocity and the last Z-axis angular velocity is calculated, and the difference value is added to the yaw angle, and the integral difference of the average value of the current Z-axis data and the last Z-axis data is calculated to obtain the integral change of the average value, which is used to judge whether the vehicle is in a lane changing state;

[0014] It is judged whether the integral change value of the Z-axis average value exceeds a preset lane changing angle threshold, if it exceeds, it is determined that the vehicle is changing lanes, when it is detected that the vehicle is changing lanes, a double-linked list node is created to store the time node of the vehicle lane changing, and it is checked whether the lane changing times of the previous node of the current lane changing node are 0, if they are 0, it is considered as the first lane changing, and the node information is updated; the system time stamp when the current vehicle lane changing occurs is recorded;

[0015] By using the characteristics of the double-linked list, the lane changing behavior of the vehicle is detected in a loop, when it is detected that the vehicle changes lanes for three times in a short time, the time difference between the current lane changing and the first lane changing is calculated, if the time difference is less than or equal to a preset threshold S, it is determined that the vehicle has frequent lane changing behavior, and a corresponding flag variable is set;

[0016] After completing the frequent lane changing judgment, the flag variable is reset, and the node information in the double-linked list is updated to continue the loop detection of the frequent lane changing behavior of the vehicle.

[0017] According to the implementation method for detecting the continuous lane changing of the vehicle provided by the application, the microcontroller unit obtains the original data of the inertial measurement unit IMU through the communication interface, the inertial measurement unit IMU includes a three-axis accelerometer and a three-axis gyroscope;

[0018] The obtained original data is subjected to low-pass filtering processing to eliminate high-frequency noise, and the data subjected to low-pass filtering processing is subjected to Kalman filtering processing.

[0019] The three-axis acceleration data and the three-axis angular velocity data subjected to Kalman filtering processing are subjected to six-axis fusion algorithm processing to obtain three-axis Euler angle data, including a pitch angle, a roll angle and a yaw angle.

[0020] The obtained three-axis acceleration, three-axis angular velocity and three-axis Euler angle data are subjected to logical processing, combined with signal filtering processing and threshold judgment algorithm, to realize accurate detection of the lane changing of the vehicle.

[0021] According to the implementation method for detecting the continuous lane changing of the vehicle provided by the application, when the vehicle is determined to change lanes for the first time, the node information is updated at the same time: IMU_Current_LanChange_Node->App_Numbers=1, App_Numbers records the number of lane changing; IMU_Current_LanChange_Node->App_TimeTick_Count=IMU_App_TickCount, records the system time stamp when the current vehicle lane changing occurs.

[0022] The conditions for meeting the frequent lane changing include that if the condition judgment if((IMU_Current_LanChange_Node->App_TimeTick_Count-IMU_Current_LanChange_Node->prev->prev->App_TimeTick_Count)<=60) is true, the flag variable App_Fre_Lane_Change is set to 1 to indicate that the frequent lane changing behavior occurs.

[0023] According to the implementation method for detecting continuous lane change of a vehicle, after judging whether three continuous lane changes of the vehicle constitute frequent lane change, a flag variable App_Fre_Lane_Change is reset to 0 to prepare for the next judgment.

[0024] The node position in the double-direction linked list is updated, the node originally representing the second lane change is moved to the position representing the first lane change, the node originally representing the third lane change is moved to the position representing the second lane change, and the latest lane change node is added to the end of the double-direction linked list, so as to continuously update in this way to continuously monitor and record the continuous lane change behavior of the vehicle, and realize dynamic detection of the frequent lane change of the vehicle.

[0025] According to the implementation method for detecting continuous lane change of a vehicle, IMU_Current_LanChange_Node is a pointer to the current lane change node or event, each node in a linked list or similar data structure represents a lane change event;

[0026] App_TimeTick_Count is a time stamp or a time count since a fixed point, which records the specific time of the lane change event;

[0027] prev is a field in the node, which points to the previous node in the linked list, therefore, IMU_Current_LanChange_Node->prev->prev refers to the previous two nodes of the current node, i.e., the previous two lane change events;

[0028] The condition judgment is if ((IMU_Current_LanChange_Node->App_TimeTick_Count-IMU_Current_LanChange_Node->prev->prev->App_TimeTick_Count)<=60), which compares the time difference between the current lane change event and the previous two lane change events; if the difference is less than or equal to 60, the condition is true;

[0029] App_Fre_Lane_Change: this flag variable is set to 1, indicating that the frequent lane change behavior is detected, i.e., when the time interval between three lane changes is less than or equal to 60, the App_Fre_Lane_Change flag is set to 1 to indicate that the vehicle has the frequent lane change behavior.

[0030] According to the implementation method for detecting continuous lane change of a vehicle provided by the application, the low-pass filtering process is implemented by using a difference equation, and the output is y[n]=α×x[n]+(1-α)×y[n-1], wherein α is a smoothing factor.

[0031] According to the implementation method for detecting continuous lane change of a vehicle provided by the application, the six-axis fusion algorithm comprises:

[0032] Collecting three-axis acceleration data and three-axis angular velocity data of the vehicle;

[0033] Applying a Madgwick algorithm or a Mahony algorithm to fuse low-frequency stable information of the three-axis accelerometer and high-frequency dynamic information of the three-axis gyroscope by using a complementary filtering technology;

[0034] In the fusion process, a proper weight α is set, and a fused three-axis Euler angle is calculated according to the formula Angle_fused=α×Angle_acc+(1-α)×Angle_gyro, wherein the three-axis Euler angle comprises a pitch angle, a roll angle and a yaw angle.

[0035] According to the implementation method for detecting continuous lane change of a vehicle provided by the application, a time window mechanism is further introduced to confirm the lane change behavior, and the specific steps are as follows:

[0036] A time window is set, and the time window comprises a plurality of continuous data sampling periods;

[0037] In each data sampling period, the Z-axis angular velocity change of the vehicle is detected, and whether the Z-axis angular velocity change satisfies a preset lane change angle threshold is calculated;

[0038] Only when the Z-axis angular velocity change of the vehicle satisfies the lane change angle threshold in all data sampling periods within the time window, it is preliminarily confirmed that a lane change behavior occurs;

[0039] In the time window, the Z-axis angular velocity change satisfying the lane change angle threshold is integrated to obtain an integral value;

[0040] The integral value is compared with a preset integral threshold, and only when the integral value exceeds the integral threshold, it is finally confirmed that a lane change behavior occurs;

[0041] After confirming a lane change behavior, the time window is reset, and the monitoring of a new data sampling period is restarted for detecting the next lane change behavior.

[0042] According to the implementation method for detecting continuous lane change of a vehicle provided by the application, when calculating the integral value in the time window, for each new data sampling period, the Z-axis angle change value is added to the time window, and the Z-axis angle change value of the earliest data sampling period in the time window is removed at the same time, so as to keep the length of the time window constant; the cumulative sum of all Z-axis angle change values in the time window is calculated as the integral value in the time window.

[0043] According to the implementation method for detecting continuous lane change of a vehicle provided by the application, when creating two double-linked lists, the first double-linked list is used to store the yaw angle data of the vehicle, and the second double-linked list is used to store the Z-axis angular velocity data of the vehicle; the calculated three-axis Euler angles are stored once every 20 ms.

[0044] Compared with the prior art, the application provides a vehicle lane change detection method based on an IMU sensor, which realizes high-precision and high-reliability detection of vehicle lane change behavior by accurately calculating and analyzing lateral acceleration and steering angle change, and has the following remarkable beneficial effects:

[0045] 1. The application uses acceleration and angular velocity data in the IMU sensor to directly reflect the actual motion state of the vehicle, effectively avoiding errors caused by environmental interference of external signals (such as GPS). Even in tunnels, viaducts or adverse weather conditions, the IMU sensor can still work stably, ensuring that the system can accurately determine whether the vehicle has changed lanes, thereby greatly improving the detection accuracy and robustness of the system.

[0046] 2. The application can accurately identify continuous lane change and frequent lane change behavior of the vehicle by accurately recording and analyzing the time stamp of each lane change event. This ability is crucial for timely discovering non-standard or abnormal driving behavior of the driver, helps to provide timely warnings, reduces the risk of traffic accidents, and significantly improves road safety.

[0047] 3. The application uses IMU data combined with low-latency timestamp calculation to ensure that lane change detection and frequent lane change detection can be completed quickly within milliseconds. This means that the automatic driving system and intelligent transportation system can realize real-time monitoring and rapid response to the driving state of the vehicle, providing strong support for making correct driving decisions in a timely manner.

[0048] 4. Compared with traditional methods that rely on high-cost sensors such as cameras and laser radars, the application is implemented based on IMU sensors, which significantly reduces the system cost. At the same time, the IMU sensor is not affected by environmental factors such as light and weather, and can work stably in various complex environments, enhancing the environmental adaptability and reliability of the system.

[0049] In summary, by introducing the IMU sensor and combining advanced algorithm technology, the application realizes high-precision, high-reliability, and real-time detection of vehicle lane changing behavior, effectively reduces system cost, enhances environmental adaptability, provides strong support for the development of intelligent transportation systems and autonomous driving technology, helps to improve road safety, optimizes traffic flow, and promotes the widespread application of intelligent driving technology.

[0050] The application will be described in further detail below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0051] Figure 1 is a flow block diagram of an embodiment of the implementation method for detecting vehicle continuous lane changing.

[0052] Figure 2 is a flow principle diagram of an embodiment of the implementation method for detecting vehicle continuous lane changing. DETAILED DESCRIPTION

[0053] To make the objectives, technical solutions, and advantages of the application clearer, the technical solutions in the application will be described clearly and completely below in conjunction with the drawings in the application. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the application.

[0054] Reference to "an embodiment" in this document 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 appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily mutually exclusive or alternative to other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0055] Referring to Figure 1 With Figure 2 , the application provides an implementation method for detecting vehicle continuous lane changing, which comprises the following steps:

[0056] Step S1, two double-linked lists are created for storing the obtained yaw angle and Z-axis angular velocity data, and the first X data are extracted from each linked list to calculate the average value of the data, so as to analyze the steering behavior of the vehicle and obtain the change of the current yaw angle. Among them, the calculated three-axis Euler angles are stored every 20 ms, and the size of the linked list is dynamically adjusted according to the driving speed of the vehicle and the required detection sensitivity (for example, the last N data points are stored).

[0057] Step S2, the average value of the yaw angle and the Z-axis angular velocity data is integrated, the difference between the current Z-axis angular velocity and the last Z-axis angular velocity is calculated, and the difference is added to the yaw angle, and the average value of the integral of the difference between the current Z-axis data and the last Z-axis data is calculated to obtain the integral change of the average value, which is used to determine whether the vehicle is in a lane changing state.

[0058] Step S3, determine whether the integral change value of the Z-axis average value exceeds the preset lane changing angle threshold, if it exceeds, it is determined that the vehicle is changing lane, when detecting that the vehicle is changing lane, a doubly linked list node is created to store the time node of the vehicle lane changing, and it is checked whether the lane changing times of the previous node of the current lane changing node is 0, if it is 0, it is considered as the first lane changing, and the node information is updated; record the system time stamp when the current vehicle lane changing occurs.

[0059] Step S4, using the characteristics of the doubly linked list, the lane changing behavior of the vehicle is detected in a loop, when detecting that the vehicle changes lane for three times in a short time, the time difference between the current lane changing and the first lane changing is calculated, if the time difference is less than or equal to the preset threshold S, it is determined that the vehicle has frequent lane changing behavior, and the corresponding flag variable is set;

[0060] Step S5, after completing the frequent lane changing judgment, the flag variable is reset, and the node information in the doubly linked list is updated to continue to detect the frequent lane changing behavior of the vehicle.

[0061] Before the above step S1, it also includes: using a microcontroller unit to obtain raw data of an inertial measurement unit IMU through a communication interface, the inertial measurement unit IMU includes a three-axis accelerometer and a three-axis gyroscope, and raw data of three-axis acceleration and angular velocity is collected at a fixed time interval (for example, 20 milliseconds) to monitor the motion state of the vehicle. Wherein, before data acquisition, the sensor needs to be calibrated for offset and temperature compensation to reduce the influence of external factors (such as temperature change, sensor drift) on the data.

[0062] The obtained raw data is subjected to low-pass filtering processing to eliminate high-frequency noise. It can be seen that the embodiment uses a low-pass filter to remove high-frequency noise in the gyroscope data, retains low-frequency effective signals, and reduces the interference of noise on attitude calculation. These data may include six-axis information such as angular velocity, acceleration, etc. Implementation: for a digital filter, a difference equation is used to realize the filter.

[0063] Wherein, the calculation output: y[n] = a x[n] + (1-a) y[n-1], wherein a is a smoothing factor.

[0064] The low-pass filtered data is then subjected to Kalman filtering. Kalman filtering further processes the low-pass filtered data, eliminating uncertainties and performing state estimation. This algorithm combines the state estimate from the previous time step with the current measurement data to arrive at a more accurate state prediction. Kalman gain is used to dynamically adjust the weights between the measured and estimated values, thus better adapting to noisy environments. This is particularly effective for dynamic systems, such as the turning motion of a vehicle.

[0065] The three-axis acceleration and angular velocity data after Kalman filtering are processed using a six-axis fusion algorithm to obtain three-axis Euler angle data, including pitch, roll, and yaw angles. The Madgwick algorithm or the Mahony algorithm can be selected for data fusion.

[0066] The obtained triaxial acceleration, triaxial angular velocity, and triaxial Euler angle data are logically processed and combined with signal filtering and threshold judgment algorithms to achieve accurate detection of vehicle lane changes.

[0067] In step S2 above, regarding the integration of the Z-axis angular velocity: the average value is obtained by integrating the yaw angle and the average Z-axis angular velocity (currently obtained Z-axis angular velocity x 9.8 - previously obtained angular velocity x 9.8), and accumulating the yaw angle. Each time, the average integral change is calculated by combining the current Z-axis data with the previously obtained Z-axis data. The angular velocity of the Z-axis (yaw angle) is integrated to calculate the angle change when the vehicle is turning. Integration can be achieved using numerical integration methods, such as the trapezoidal rule or Simpson's rule. The calculation formula is: θ Z轴 (t)=θ Z轴 (t-1)+∫ t t--1 ω z dt, where ω z Let θ be the angular velocity along the Z-axis. Z轴 This is the cumulative yaw angle.

[0068] In step S3 above, after each integration, the system compares the real-time calculated Z-axis angle change value with a preset lane change angle threshold. The typical lane change angle threshold can be set to any value, adjusted according to vehicle type, driving habits, and traffic conditions. The judgment logic includes: if the Z-axis angle change value θZ exceeds the lane change threshold, the system determines that the vehicle is changing lanes; if the Z-axis angle change value does not exceed the threshold, the system determines that the vehicle is not changing lanes.

[0069] In step S3, when the vehicle is determined to change lanes, a doubly linked list is created to store the time nodes of the vehicle changing lanes, and it is checked whether the App_Numbers of the previous node (i.e. the last lane change event) of the current lane change node is 0. If it is 0, it means that this is the first lane change, and the node information is updated: when the vehicle is determined to change lanes for the first time, IMU_Current_LanChange_Node->App_Numbers = 1, indicating that the current lane change is the first lane change, and App_Numbers records the number of lane changes; IMU_Current_LanChange_Node->App_TimeTick_Count = IMU_App_TickCount, recording the system time stamp when the current vehicle changes lanes.

[0070] IMU_App_TickCount, recording the system time stamp when the current vehicle changes lanes.

[0071] Using the characteristics of the doubly linked list, a loop detection is realized, and the judgment method is consistent with the above method. When the vehicle changes lanes three times, the time difference between the current lane change and the first lane change is calculated. If the time difference is less than or equal to S (the value of S can be determined according to the actual situation), it is determined that the vehicle changes lanes frequently. The conditions that meet the frequent lane change include: if the condition judgment if ((IMU_Current_LanChange_Node->App_TimeTick_Count-IMU_Current_LanChange_Node->prev->prev->App_TimeTick_Count)<=60) is true, the flag variable App_Fre_Lane_Change is set to 1 to indicate that the frequent lane change behavior occurs.

[0072] After completing the judgment of whether the three consecutive lane changes of the vehicle constitute a frequent lane change, the flag variable App_Fre_Lane_Change is reset to 0 to prepare for the next judgment.

[0073] Among them, the node position in the doubly linked list is updated, the node originally representing the second lane change is moved to the position representing the first lane change, the node originally representing the third lane change is moved to the position representing the second lane change, and the latest lane change node is added to the end of the doubly linked list. In this way, the continuous lane change behavior of the vehicle is continuously monitored and recorded, and the dynamic detection of the frequent lane change of the vehicle is realized.

[0074] In the embodiment, IMU_Current_LanChange_Node is a pointer to the current lane change node or event, each node in a linked list or similar data structure represents a lane change event; App_TimeTick_Count is a specific time recording the lane change event, which is a timestamp or a time count since a fixed point; prev is a field in the node, pointing to the previous node in the linked list, so IMU_Current_LanChange_Node->prev->prev refers to the two previous nodes of the current node, i.e. the last two lane change events.

[0075] Conditional judgment: if((IMU_Current_LanChange_Node->App_TimeTick_Count-IMU_Current_LanChange_Node->prev->prev->App_TimeTick_Count)<=60), the condition is to compare the time difference between the current lane change event and the last two lane change events; if the difference is less than or equal to 60, the condition is true.

[0076] App_Fre_Lane_Change: This flag variable is set to 1, indicating that the frequent lane changing behavior is detected, i.e. when the time interval between three lane changes is less than or equal to 60, the App_Fre_Lane_Change flag is set to 1 to indicate that the vehicle has frequent lane changing behavior.

[0077] In the embodiment, the low-pass filtering process is implemented using a difference equation, and the output is y[n]=α×x[n]+(1-α)×y[n-1], where α is the smoothing factor.

[0078] In the embodiment, the six-axis fusion algorithm includes:

[0079] Collecting three-axis acceleration data and three-axis angular velocity data of the vehicle;

[0080] Applying Madgwick algorithm or Mahony algorithm to fuse the low-frequency stable information of the three-axis accelerometer and the high-frequency dynamic information of the three-axis gyroscope with the complementary filtering technology;

[0081] In the fusion process, set an appropriate weight α, and calculate the fused three-axis Euler angle according to the formula Angle_fused=α×Angle_acc+(1-α)×Angle_gyro, including pitch angle, roll angle and yaw angle. Among them, the fused Euler angle can accurately reflect the attitude change of the vehicle, especially the yaw angle of Z axis, which is used to judge the steering behavior of the vehicle.

[0082] In this embodiment, a time window mechanism is also introduced to confirm the lane change behavior, the specific steps are as follows:

[0083] A time window is set, which contains a plurality of consecutive data sampling periods.

[0084] In each data sampling period, the change of the Z-axis angular velocity of the vehicle is detected, and whether it meets the preset lane change angle threshold is calculated.

[0085] Only when the Z-axis angular velocity change of the vehicle meets the lane change angle threshold in all data sampling periods within the time window, a lane change behavior is preliminarily confirmed.

[0086] In the time window, the Z-axis angular velocity change that meets the lane change angle threshold is integrated to obtain an integral value.

[0087] The integral value is compared with a preset integral threshold, and only when the integral value exceeds the integral threshold, a lane change behavior is finally confirmed.

[0088] After confirming a lane change behavior, the time window is reset, and the monitoring of the new data sampling period is restarted for the detection of the next lane change behavior.

[0089] When calculating the integral value in the time window, for each new data sampling period, the Z-axis angular change value is added to the time window, and at the same time, the Z-axis angular change value of the earliest data sampling period in the time window is removed to keep the length of the time window constant; The cumulative sum of all Z-axis angular change values in the time window is calculated as the integral value in the time window.

[0090] Therefore, in order to avoid misjudgment, the system introduces a time window mechanism based on angle judgment. For example, the Z-axis angular velocity change of the vehicle is required to meet the lane change angle threshold in a plurality of consecutive data sampling periods, so as to confirm the lane change behavior. The integral value in the time window is also used to further reduce the misjudgment rate of the system, especially when the vehicle accelerates or makes a sharp turn, to ensure the accuracy of the detection result.

[0091] When creating two double-linked lists, the first double-linked list is used to store the yaw angle data of the vehicle, and the second double-linked list is used to store the Z-axis angular velocity data of the vehicle; wherein the calculated three-axis Euler angle is stored every 20ms.

[0092] Specifically, the method provided in the embodiment includes the following steps: using an IMU (a three-axis accelerometer and a three-axis gyroscope), an MCU acquires original data of the IMU through an SPI interface, a first stage processes the original data through low-pass filtering, the first stage filtered data is processed through Kalman filtering, and finally a nine-axis fusion algorithm is used to obtain three-axis Euler angles; the obtained three-axis acceleration, three-axis angular velocity and three-axis Euler angle data are processed through an algorithm, signal filtering and threshold judgment algorithms are combined, and accurate detection of lane changing is realized. The first X data are extracted from two created double-linked lists (a yaw angle and a Z-axis angular velocity), and the average value of the data is calculated. This step is used to analyze the steering behavior of the vehicle to obtain the change of the current yaw angle. The average values obtained by the yaw angle and the Z-axis angular velocity are integrated, the difference between the current obtained Z-axis angular velocity and the last obtained angular velocity (current Z-axis angular velocity x 9.8 - last Z-axis angular velocity x 9.8) is calculated, and the change value is accumulated to the yaw angle. At the same time, the integral difference between the average value of the current Z-axis data and the last Z-axis data is calculated to obtain the integral change of the average value, which helps to determine whether the vehicle is in a lane changing state. It is judged whether the value of the integral change of the average value exceeds a set threshold value, if it exceeds, it is judged that the vehicle is changing lanes, a double-linked list is created to store the time node of the lane changing of the vehicle, and it is checked whether the App_Numbers of the node before the current lane changing node (i.e. the last lane changing event) is 0. If it is 0, it means that it is the first lane changing. IMU_Current_LanChange_Node->App_TimeTick_Count=

[0093] IMU_App_TickCount, records the system time stamp when the current lane changing occurs, and the characteristics of the double-linked list are used to realize cyclic detection. When the vehicle is detected to change lanes three times, the time difference between the current lane changing and the first lane changing is calculated. If the time difference is less than or equal to S (the value of S can be determined according to the actual situation), it is determined that the lane changing is frequent.

[0094] The condition is if ((IMU_Current_LanChange_Node->App_TimeTick_Count-IMU_Current_LanChange_Node->prev->prev->App_TimeTick_Count)<=60). The flag variable App_Fre_Lane_Change is set to 1, indicating that the frequent lane changing occurs.

[0095] When it is judged whether the vehicle has performed frequent lane changing for three times, the flag variable App_Fre_Lane_Change is reset, the second lane changing node is moved to the first lane changing node, the third lane changing node is moved to the second lane changing node, and the current lane changing node is updated to the third lane changing node, so as to continuously update and detect the frequent lane changing of the vehicle.

[0096] In actual application, assuming that the method provided in the embodiment is analyzing the lane changing behavior of an automatic driving vehicle, the IMU sensor continuously collects the acceleration and angular velocity data of the vehicle during driving, and the MCU obtains and processes these data through the SPI interface. After low-pass filtering, weighted averaging, Kalman filtering and six-axis fusion algorithm processing, we obtain the three-axis Euler angle data.

[0097] In the data analysis process, assuming that the vehicle has once changed lanes at a certain time, the system records the current timestamp and inserts the event into the double-linked list. At this time, assuming that the Z-axis angular velocity change between the last time and the current time is large, and the change exceeds the set threshold, it is determined as a lane changing event.

[0098] If the time difference between the current lane changing and the first lane changing is less than or equal to S time (the value of S can be determined according to the actual situation), the system will mark it as "frequent lane changing" and trigger the corresponding safety warning measures.

[0099] In summary, the present application provides a vehicle lane changing detection method based on IMU sensor, which realizes high-precision and high-reliability detection of vehicle lane changing behavior by accurately calculating and analyzing the lateral acceleration and steering angle change.

[0100] Further, the present application uses the acceleration and angular velocity data in the IMU sensor to directly reflect the actual motion state of the vehicle, effectively avoiding the error caused by the external signal (such as GPS) affected by the environment. Even in tunnels, viaducts or bad weather conditions, the IMU sensor can still work stably, ensuring that the system can accurately judge whether the vehicle has changed lanes, thereby greatly improving the detection accuracy and robustness of the system.

[0101] Further, by accurately recording and analyzing the timestamp of each lane changing event, the present application can accurately identify the continuous lane changing and frequent lane changing behavior of the vehicle. This ability is crucial for timely discovering the non-standard or abnormal driving behavior of the driver, and helps to provide timely warnings, reduce the risk of traffic accidents, and significantly improve road safety.

[0102] Further, the application adopts IMU data combined with low-delay timestamp calculation to ensure that lane change detection and frequent lane change detection can be quickly completed within milliseconds. This means that the automatic driving system and intelligent transportation system can realize real-time monitoring and rapid response to the driving state of the vehicle, providing strong support for making correct driving decisions in a timely manner.

[0103] Further, compared with the traditional method relying on high-cost sensors such as cameras and laser radars, the application is realized based on an IMU sensor, which significantly reduces the system cost. At the same time, the IMU sensor is not affected by environmental factors such as light and weather, and can work stably in various complex environments, enhancing the environmental adaptability and reliability of the system.

[0104] Therefore, by introducing the IMU sensor and combining advanced algorithm technology, the application realizes high-precision, high-reliability, and real-time detection of vehicle lane changing behavior, effectively reduces the system cost, enhances the environmental adaptability, and provides strong support for the development of intelligent transportation systems and automatic driving technology, which helps to improve road safety, optimize traffic flow, and promote the widespread application of intelligent driving technology.

[0105] It should be noted that the embodiments of the application can be deployed on a server with a network. Those skilled in the art can understand that the above method and system can be realized by using computer executable instructions and / or included in processor control code. The above is only a specific embodiment of the application, but the protection scope of the application is not limited thereto. Any modification, equivalent replacement and improvement made by those skilled in the art within the technical range disclosed by the application, which is within the spirit and principle of the application, should be covered within the protection scope of the application.

[0106] The above embodiments are only preferred embodiments of the application, and cannot be used to limit the protection scope of the application. Any non-substantial changes and replacements made by those skilled in the art on the basis of the application should be covered within the protection scope of the application.

Claims

1. A method for detecting implementation of continuous lane changing of a vehicle, characterized in that, The method comprises the following steps: Two double-linked lists are created to store the obtained yaw angle and Z-axis angular velocity data, and the first X data are extracted from each list to calculate the average values of the data to analyze the steering behavior of the vehicle and obtain the change of the current yaw angle; The average values of the yaw angle and Z-axis angular velocity data are integrated, the difference between the current Z-axis angular velocity and the previous Z-axis angular velocity is calculated, and the difference is added to the yaw angle, and the integral change of the average value is calculated by calculating the difference between the average value of the current Z-axis data and the average value of the previous Z-axis data, to determine whether the vehicle is in a lane changing state; It is judged whether the integral change value of the Z-axis average value exceeds a preset lane changing angle threshold, if it exceeds, it is determined that the vehicle is changing lanes, when it is detected that the vehicle is changing lanes, a double-linked list node is created to store the time node of the vehicle lane changing, and it is checked whether the lane changing times of the previous node of the current lane changing node is 0, if it is 0, it is considered as the first lane changing, and the node information is updated; the system timestamp when the current vehicle lane changing occurs is recorded; The characteristics of the double-linked list are used to detect the lane changing behavior of the vehicle in a loop, when it is detected that the vehicle changes lanes continuously for three times in a short time, the time difference between the current lane changing and the first lane changing is calculated, if the time difference is less than or equal to a preset threshold S, it is determined that the vehicle has a frequent lane changing behavior, and a corresponding flag variable is set; After completing the frequent lane changing judgment, the flag variable is reset, and the node information in the double-linked list is updated to continue to detect the frequent lane changing behavior of the vehicle in a loop.

2. The method of claim 1, wherein: a microcontroller unit is used to obtain raw data of an inertial measurement unit (IMU) through a communication interface, the inertial measurement unit (IMU) comprising a three-axis accelerometer and a three-axis gyroscope; the obtained raw data is subjected to low-pass filtering to eliminate high-frequency noise; and the low-pass filtered data is subjected to Kalman filtering; the three-axis acceleration data and the three-axis angular velocity data subjected to Kalman filtering are subjected to six-axis fusion algorithm processing to obtain three-axis Euler angle data, including a pitch angle, a roll angle and a yaw angle; the obtained three-axis acceleration, three-axis angular velocity and three-axis Euler angle data are subjected to logical processing, combined with signal filtering and threshold judgment algorithms, to achieve accurate detection of vehicle lane changing.

3. The method of claim 1, wherein: When the vehicle is determined to change lane for the first time, the node information is updated at the same time: IMU_Current_LanChange_Node->App_Numbers = 1, App_Numbers records the number of lane changes; IMU_Current_LanChange_Node->App_TimeTick_Count = IMU_App_TickCount, which records the system time stamp when the current vehicle lane change occurs; wherein, IMU_Current_LanChange_Node is a pointer to the current lane change node or event, and App_TimeTick_Count is a specific time recording the occurrence of the lane change event; The condition for meeting the frequent lane change includes that if the condition judgment if ((IMU_Current_LanChange_Node->App_TimeTick_Count- IMU_Current_LanChange_Node->prev->prev->App_TimeTick_Count) <= 60) is true, the flag variable App_Fre_Lane_Change is set to 1 to indicate that the frequent lane change behavior occurs, wherein, prev is a field in the node, which points to the previous node in the linked list, and IMU_Current_LanChange_Node->prev->prev refers to the previous two nodes of the current node, i.e. the last two lane change events.

4. The method of claim 3, wherein: After completing the judgment of whether three consecutive lane changes of the vehicle constitute a frequent lane change, the flag variable App_Fre_Lane_Change is reset to 0 to prepare for the next judgment; Wherein, the node position in the double-linked list is updated, the node originally representing the second lane change is moved to the position representing the first lane change, the node originally representing the third lane change is moved to the position representing the second lane change, and the latest lane change node is added to the end of the double-linked list, in this way, the continuous lane change behavior of the vehicle is continuously monitored and recorded, and the dynamic detection of the frequent lane change of the vehicle is realized.

5. The method of claim 4, wherein: IMU_Current_LanChange_Node is a pointer to the current lane change node or event, and each node in a linked list or similar data structure represents a lane change event; App_TimeTick_Count is a specific time recording the occurrence of the lane change event, which is a time stamp or a time count since a certain fixed point; prev is a field in the node, which points to the previous node in the linked list, so IMU_Current_LanChange_Node->prev->prev refers to the previous two nodes of the current node, i.e. the last two lane change events; Condition judgment: if ((IMU_Current_LanChange_Node->App_TimeTick_Count - IMU_Current_LanChange_Node->prev->prev->App_TimeTick_Count) <= 60), this condition judgment is to compare the time difference between the current lane change event and the last two lane change events; if the difference is less than or equal to 60, the condition is true; App_Fre_Lane_Change: this flag variable is set to 1, indicating that the frequent lane changing behavior is detected, that is, when the time interval between three lane change events is less than or equal to 60, the App_Fre_Lane_Change flag is set to 1 to indicate that the vehicle has a frequent lane changing behavior.

6. The method of claim 2, wherein: The low-pass filtering process is implemented using a difference equation, and the output is y[n] = a * x[n] + (1-a) * y[n-1], where a is a smoothing factor.

7. The method of claim 2, wherein: The six-axis fusion algorithm includes: Collecting three-axis acceleration data and three-axis angular velocity data of the vehicle; Applying Madgwick algorithm or Mahony algorithm to fuse the low-frequency stable information of the three-axis accelerometer with the high-frequency dynamic information of the three-axis gyroscope through complementary filtering technology; In the fusion process, set an appropriate weight a, and calculate the fused three-axis Euler angle according to the formula Angle_fused = a * Angle_acc + (1-a) * Angle_gyro, including pitch angle, roll angle and yaw angle.

8. The method of claim 1, wherein, Further comprising introducing a time window mechanism to confirm the lane changing behavior, the specific steps are as follows: Set a time window, which contains multiple consecutive data sampling periods; In each data sampling period, detect the change of the vehicle's Z-axis angular velocity and calculate whether it meets the preset lane changing angle threshold; Only when the change of the vehicle's Z-axis angular velocity in all data sampling periods within the time window meets the lane changing angle threshold, it is preliminarily confirmed that a lane changing behavior has occurred; In the time window, integrate the Z-axis angular velocity change that meets the lane changing angle threshold to obtain an integral value; Compare the integral value with a preset integral threshold, and only when the integral value exceeds the integral threshold, it is finally confirmed that a lane changing behavior has occurred; After confirming a lane changing behavior, reset the time window and start a new data sampling period for monitoring the next lane changing behavior.

9. The method of claim 7, wherein: When calculating the integral value in the time window, for each new data sampling period, add its Z-axis angle change value to the time window, and at the same time remove the Z-axis angle change value of the earliest data sampling period in the time window to keep the length of the time window constant; calculate the cumulative sum of all Z-axis angle change values in the time window as the integral value in the time window.

10. The method of claim 1, wherein: In creating two double-linked lists, the first double-linked list is used to store the yaw angle data of the vehicle, and the second double-linked list is used to store the Z-axis angular velocity data of the vehicle; wherein the calculated three-axis Euler angles are stored every 20 ms.

Citation Information

Patent Citations

  • Navigation-based motor vehicle continuous lane changing behavior monitoring system and method

    CN106408935A

  • Vehicle fatigue driving accurate judgment method, terminal equipment and storage medium

    CN111325869A