Implementation method for detecting continuous lane change of vehicle
By utilizing IMU data and advanced algorithm technology, high-precision detection of vehicle continuous lane change and frequent lane change behaviors is solved, and the shortcomings in the existing technology are improved, and road safety and the reliability of intelligent traffic systems are improved.
Patent Information
- Application Number
- CN202411801468.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-09
AI Technical Summary
The existing lane-change detection methods have shortcomings in accuracy, real-time, cost and environmental adaptability, and are difficult to meet the needs of intelligent transportation and autonomous driving technology.
Using inertial measurement unit (IMU) data, combined with low-pass filtering, Kalman filtering and six-axis fusion algorithm, the yaw angle and Z-axis angular velocity data are stored and analyzed through a two-way linked list to achieve accurate detection of the vehicle's continuous lane change and frequent lane change behavior.
It improves the accuracy and real-time nature of lane change detection, reduces system costs, enhances environmental adaptability, and can accurately judge vehicle lane change behavior in harsh environments, reducing the risk of traffic accidents.
Smart Images

Figure CN119625983A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of intelligent transportation, automatic driving technology and driving behavior monitoring technology, and in particular to a method for detecting continuous lane changes of a vehicle. Background Art
[0002] With the rapid development of intelligent transportation systems and autonomous driving technology, the detection of vehicle lane change behavior is a key safety monitoring indicator. Its accuracy and real-time performance play a vital role in improving road safety, optimizing traffic flow, and promoting the mature application of autonomous driving technology. However, the existing lane change detection methods still face a series of technical challenges and are difficult to meet the growing needs of traffic safety and intelligent driving.
[0003] First, traditional lane change detection methods mainly rely on the vehicle's positioning system (such as a global satellite system) or visual recognition technology. However, these methods are subject to many external environmental limitations in practical applications. For example, global satellite systems may face signal obstruction or reflection interference in certain specific environments (such as urban canyons, tunnels, or high-rise building dense areas), resulting in reduced positioning accuracy. Visual recognition technology is easily affected by factors such as lighting conditions, weather conditions (such as haze, rain and snow), and road conditions (such as water accumulation and oil pollution), resulting in blurred images and reduced recognition accuracy, making it impossible to accurately judge the vehicle's lane change behavior.
[0004] Secondly, some existing lane change detection methods have obvious deficiencies in identifying continuous and frequent lane changes. These technologies can often only identify single lane changes, but cannot effectively distinguish and record continuous and frequent lane changes of vehicles. However, in intelligent transportation systems and autonomous driving scenarios, frequent lane changes are often a direct manifestation of driver fatigue, impatience or irregular driving. If they cannot be identified and measures taken in a timely manner, the risk of traffic accidents will be greatly increased.
[0005] In addition, lack of real-time performance is also a major challenge faced by current lane change detection methods. Many existing detection systems require a long data processing time to analyze the vehicle's driving trajectory and lane change behavior, resulting in an inability to respond quickly to continuous lane changes. This delay may not only miss the best time to intervene, but may also aggravate traffic congestion and safety hazards.
[0006] At the same time, large data processing and response delays are also a significant disadvantage of traditional lane change detection technology. Due to the need to process large amounts of sensor data and perform complex algorithm calculations, these systems often have high computational delays, resulting in the inability to make accurate driving decisions in a timely manner. In an autonomous driving system, this delay can directly endanger driving safety, as fast and accurate lane change recognition is key to ensuring the safe driving of autonomous vehicles.
[0007] Finally, strong sensor dependence and high cost are also important issues facing current lane change detection technology. Some existing technologies rely on high-cost sensors (such as lidar, high-precision cameras, etc.), which are expensive to purchase and maintain, and may fail in severe weather conditions, seriously affecting the reliability and stability of the system.
[0008] In summary, the existing lane change detection methods still have many deficiencies in terms of accuracy, real-time performance, cost, and environmental adaptability, and are difficult to meet the urgent needs of the development of intelligent transportation systems and autonomous driving technology. Therefore, developing a new, efficient, and accurate lane change detection method is of great significance for improving road safety, optimizing traffic flow, and promoting the mature application of autonomous driving technology. Summary of the invention
[0009] In order to solve the problems existing in the prior art, the purpose of the present invention is to provide a method for detecting continuous lane changes of vehicles, aiming to use IMU data, combined with advanced algorithm technology, to accurately detect the continuous lane change behavior of vehicles, and further determine whether there is frequent lane change behavior. The present invention can track the driving trajectory of the vehicle in real time, identify each lane change behavior, and determine whether the driver has abnormal driving behavior of frequent lane changes by counting the lane change frequency, analyzing the lane change interval and other key indicators.
[0010] The present invention achieves the above-mentioned purpose through the following technical solutions:
[0011] A method for detecting continuous lane change of a vehicle, the method comprising the following steps:
[0012] Create two bidirectional linked lists to store the acquired yaw angle and Z-axis angular velocity data respectively, extract the first X data from each linked list, and calculate the average value of these data to analyze the vehicle's steering behavior and obtain the change of the current yaw angle;
[0013] The average values of the yaw angle and the 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. At the same time, the difference between the average value integral of the current Z-axis data and the previous 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 change state.
[0014] Determine whether the integral change value of the Z-axis average value exceeds the preset lane change angle threshold. If so, it is determined that the vehicle is changing lanes. When it is detected that the vehicle is changing lanes, a bidirectional linked list node is created to store the time node of the vehicle's lane change. At the same time, check whether the number of lane changes of the node before the current lane change node is 0. If it is 0, it is regarded as the first lane change, and the node information is updated at the same time; record the system timestamp when the current vehicle changes lanes;
[0015] Using the characteristics of a bidirectional linked list, the vehicle's lane-changing behavior is detected cyclically. When it is detected that the vehicle changes lanes three times in a short period of time, 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 the preset threshold S, it is determined that the vehicle has changed lanes frequently and the corresponding flag variable is set.
[0016] After completing the frequent lane change judgment, the flag variable is reset and the node information in the bidirectional linked list is updated to continue the loop to detect the frequent lane change behavior of the vehicle.
[0017] According to a method for detecting continuous lane change of a vehicle provided by the present invention, a microcontroller unit is used to obtain raw data of an inertial measurement unit IMU through a communication interface, wherein the inertial measurement unit IMU includes a three-axis accelerometer and a three-axis gyroscope;
[0018] The acquired raw data is subjected to low-pass filtering to eliminate high-frequency noise; the data subjected to low-pass filtering is subjected to Kalman filtering;
[0019] The three-axis acceleration data and three-axis angular velocity data after Kalman filter processing are processed by six-axis fusion algorithm to obtain three-axis Euler angle data, including pitch angle, roll angle and yaw angle;
[0020] The obtained three-axis acceleration, three-axis angular velocity and three-axis Euler angle data are logically processed and combined with signal filtering processing and threshold judgment algorithm to achieve accurate detection of vehicle lane changes.
[0021] According to an implementation method for detecting continuous lane changes of a vehicle provided by the present invention, when the vehicle is determined to be changing 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 changes; IMU_Current_LanChange_Node->App_TimeTick_Count=IMU_App_TickCount, records the system timestamp when the current vehicle changes lanes;
[0022] The conditions for satisfying frequent lane changes include, that is, if the conditional 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 frequent lane changes have occurred.
[0023] According to a method for detecting continuous lane changes of a vehicle provided by the present invention, after determining whether three continuous lane changes of the vehicle constitute frequent lane changes, the flag variable App_Fre_Lane_Change is reset to 0 to prepare for the next determination;
[0024] Among them, the node positions in the bidirectional linked list are 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 current latest lane change node is added to the end of the bidirectional linked list. In this way, the update is continuously cyclically updated to continuously monitor and record the vehicle's continuous lane change behavior, thereby realizing dynamic detection of frequent lane changes of vehicles.
[0025] According to an implementation method for detecting continuous lane changes of a vehicle provided by the present invention, IMU_Current_LanChange_Node is a pointer to a current lane change node or event, and in a linked list or similar data structure, each node represents a lane change event;
[0026] App_TimeTick_Count is used to record the specific time when the lane change event occurs, which is a timestamp or a time count since a fixed point;
[0027] prev is a field in the node, pointing to the previous node in the linked list. Therefore, IMU_Current_LanChange_Node->prev->prev refers to the two nodes before the current node, that is, the last two lane change events.
[0028] Conditional judgment: if((IMU_Current_LanChange_Node->App_TimeTick_Count-IMU_Current_LanChange_Node->prev->prev->App_TimeTick_Count)<=60), this conditional 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;
[0029] App_Fre_Lane_Change: This flag variable is set to 1, indicating that frequent lane changes are detected. That is, 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 frequently changed lanes.
[0030] According to a method for detecting continuous lane changes of a vehicle provided by the present invention, the low-pass filtering process is implemented using a differential equation, and the output is y[n]=α×x[n]+(1-α)×y[n-1], where α is a smoothing factor.
[0031] According to a method for detecting continuous lane change of a vehicle provided by the present invention, the six-axis fusion algorithm includes:
[0032] Collect the vehicle's three-axis acceleration data and three-axis angular velocity data;
[0033] Apply the Madgwick algorithm or Mahony algorithm, combined with complementary filtering technology, to fuse the low-frequency stability information of the three-axis accelerometer with the high-frequency dynamic information of the three-axis gyroscope;
[0034] During the fusion process, an appropriate weight α is set, and the fused three-axis Euler angles, including pitch angle, roll angle, and yaw angle, are calculated according to the formula Angle_fused = α × Angle_acc + (1-α) × Angle_gyro.
[0035] According to the present invention, a method for detecting continuous lane changes of a vehicle is provided, which further includes introducing a time window mechanism to confirm the lane change behavior. The specific steps are as follows:
[0036] Setting a time window, the time window includes a plurality of consecutive data sampling periods;
[0037] In each data sampling period, the vehicle's Z-axis angular velocity change is detected and calculated to see whether it meets the preset lane change angle threshold;
[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 has occurred;
[0039] Integrate the Z-axis angular velocity change that meets the lane change angle threshold within the time window to obtain an integral value;
[0040] Comparing the integral value with a preset integral threshold, and only when the integral value exceeds the integral threshold, finally confirming that a lane change behavior has occurred;
[0041] After confirming a lane change behavior, the time window is reset and monitoring of a new data sampling cycle is restarted for the detection of the next lane change behavior.
[0042] According to an implementation method for detecting continuous lane changes of vehicles provided by the present invention, when calculating the integral value within a time window, for each new data sampling period, its Z-axis angle change value is added to the time window, and at the same time, the Z-axis angle 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 angle change values in the time window is calculated as the integral value in the time window.
[0043] According to an implementation method for detecting continuous lane changes of vehicles provided by the present invention, when creating two bidirectional linked lists, the first bidirectional linked list is used to store the vehicle's yaw angle data; the second bidirectional linked list is used to store the vehicle's Z-axis angular velocity data; wherein the calculated three-axis Euler angles are stored every 20 ms.
[0044] Compared with the prior art, the present invention proposes a vehicle lane change detection method based on an IMU sensor, which achieves high-precision and high-reliability detection of vehicle lane change behavior by accurately calculating and analyzing the lateral acceleration and steering angle changes, and has the following significant beneficial effects:
[0045] 1. The present invention 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 environmental interference of external signals (such as GPS). Even in tunnels, viaducts or bad weather conditions, the IMU sensor can still work stably, ensuring that the system can accurately determine whether the vehicle changes lanes, thereby greatly improving the detection accuracy and system robustness.
[0046] 2. The present invention can accurately identify the continuous and frequent lane changes of vehicles by accurately recording and analyzing the timestamp of each lane change event. This capability is crucial for timely detection of irregular or abnormal driving behaviors of drivers, helping to provide timely warnings, reduce the risk of traffic accidents, and significantly improve road safety.
[0047] 3. The present invention 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. For autonomous driving systems and intelligent transportation systems, this means that real-time monitoring and rapid response to vehicle driving status can be achieved, providing strong support for making correct driving decisions in a timely manner.
[0048] 4. Compared with the traditional method that relies on high-cost sensors such as cameras and lidar, the present invention is based on IMU sensors, which significantly reduces the system cost. At the same time, IMU sensors are 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, the present invention achieves high-precision, high-reliability, and real-time detection of vehicle lane-changing behavior by introducing IMU sensors and combining them with advanced algorithm technology, effectively reduces system costs, and enhances environmental adaptability. It provides strong support for the development of intelligent transportation systems and autonomous driving technologies, helps to improve road safety, optimize traffic flow, and promote the widespread application of intelligent driving technology.
[0050] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 The present invention is a flowchart of an implementation method for detecting continuous lane changes of a vehicle.
[0052] Figure 2 It is a flow chart of a method embodiment of the present invention for detecting continuous lane changes of vehicles. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0055] See also Figure 1 and Figure 2 The present invention provides a method for detecting continuous lane change of a vehicle, the method comprising the following steps:
[0056] Step S1, create two bidirectional linked lists, respectively used to store the acquired yaw angle and Z-axis angular velocity data, and extract the first X data from each linked list, calculate the average value of these 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 angle is stored every 20ms, and the size of the linked list is dynamically adjusted according to the vehicle's driving speed and the required detection sensitivity (for example, storing the latest N data points).
[0057] Step S2, integrating the average values of the yaw angle and the Z-axis angular velocity data, by calculating the difference between the current Z-axis angular velocity and the previous Z-axis angular velocity, and adding the difference to the yaw angle, and at the same time calculating the difference between the integral of the average values of the current Z-axis data and the previous Z-axis data, to find 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 change angle threshold. If so, it is determined that the vehicle is changing lanes. When it is detected that the vehicle is changing lanes, a bidirectional linked list node is created to store the time node of the vehicle's lane change. At the same time, check whether the number of lane changes of the node before the current lane change node is 0. If it is 0, it is regarded as the first lane change, and the node information is updated at the same time; record the system timestamp when the current vehicle changes lanes.
[0059] Step S4, using the characteristics of a bidirectional linked list, cyclically detecting the lane change behavior of the vehicle, when detecting that the vehicle changes lanes three times in a short period of time, calculating the time difference between the current lane change and the first lane change, if the time difference is less than or equal to a preset threshold value S, it is determined that the vehicle has frequent lane changes, and a corresponding flag variable is set;
[0060] Step S5, after completing the frequent lane change judgment, reset the flag variable and update the node information in the bidirectional linked list to continue cyclically detecting the frequent lane change 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, wherein the inertial measurement unit IMU includes a three-axis accelerometer and a three-axis gyroscope, and collects raw data of three-axis acceleration and angular velocity at a fixed time interval (e.g., 20 milliseconds) to monitor the motion state of the vehicle. Before data acquisition, the sensor needs to be offset calibrated and temperature compensated to reduce the impact of external factors (such as temperature changes, sensor drift) on the data.
[0062] The acquired raw data is low-pass filtered to eliminate high-frequency noise. It can be seen that this embodiment uses a low-pass filter to remove high-frequency noise in the gyroscope data, retain low-frequency effective signals, and reduce the interference of noise on attitude calculation. These data may include six-axis information such as angular velocity and acceleration. Implementation method: For digital filters, use differential equations to implement filters.
[0063] The calculated output is: y[n]=α·x[n]+(1-α)·y[n-1], where α is a smoothing factor.
[0064] The low-pass filtered data is processed by Kalman filtering. Kalman filtering is used to further process the low-pass filtered data to eliminate uncertainty and perform state estimation. The algorithm combines the state estimate of the previous moment with the current measurement data to obtain a more accurate state prediction. Kalman gain is used to dynamically adjust the weight between the measured value and the estimated value to better adapt to the noisy environment. This is especially effective for dynamic systems (such as the turning motion of a vehicle).
[0065] The three-axis acceleration data and three-axis angular velocity data processed by Kalman filtering are processed by a six-axis fusion algorithm to obtain three-axis Euler angle data, including pitch angle, roll angle and yaw angle. Among them, the Madgwick algorithm or the Mahony algorithm can be selected for data fusion.
[0066] The obtained three-axis acceleration, three-axis angular velocity and three-axis Euler angle data are logically processed and combined with signal filtering processing and threshold judgment algorithm to achieve accurate detection of vehicle lane changes.
[0067] In the above step S2, regarding the Z-axis angular velocity integration: the average value is obtained, and the yaw angle is accumulated by integrating the yaw angle and the average value of the Z-axis angular velocity (the current Z-axis angular velocity x9.8-the angular velocity x9.8 obtained last time). The Z-axis data of the current integration is calculated each time with the Z-axis data obtained last time to obtain the average value of the integral change. Integrate the angular velocity of the Z-axis (yaw angle) to calculate the angle change when the vehicle turns. Integration can be achieved by numerical integration methods, such as the trapezoidal method or the Simpson method. The calculation formula is: θ Z轴 (t) = θ Z轴 (t-1)+∫ t t--1 ω z dt, where ω z is the Z-axis angular velocity, θ Z轴 is the accumulated yaw angle.
[0068] In the above step S3, after each integration, the system compares the real-time calculated Z-axis angle change value with the preset lane change angle threshold. The typical lane change angle threshold can be set to any value, and the specific value is adjusted according to the vehicle type, driving habits and traffic environment. The judgment logic includes: if the Z-axis angle change value θZ axis exceeds the lane change threshold, the system judges that the vehicle is changing lanes; if the Z-axis angle change value does not exceed the threshold, the system judges that the vehicle is not changing lanes.
[0069] In the above step S3, when the vehicle is judged to change lanes, a bidirectional linked list is created to store the time node of the vehicle's lane change, and the App_Numbers of the node before the current lane change node (i.e., the previous lane change event) is checked to see if it is 0. If it is 0, it means that this is the first lane change, and the node information is updated at the same time: when the vehicle is judged to be the first lane change, IMU_Current_LanChange_Node->App_Numbers=1, the current lane change is set to the first lane change, and App_Numbers records the number of lane changes; IMU_Current_LanChange_Node->App_TimeTick_Count=
[0070] IMU_App_TickCount, records the system timestamp when the current vehicle changes lanes.
[0071] Utilizing the characteristics of a bidirectional linked list, loop detection is implemented. 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 time (the value of S can be determined based on actual conditions), it is determined to be a frequent lane change. The conditions for satisfying frequent lane changes include, that is, if the conditional 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 frequent lane changes have occurred.
[0072] After completing the determination of whether the vehicle's three consecutive lane changes constitute frequent lane changes, the flag variable App_Fre_Lane_Change is reset to 0 to prepare for the next determination.
[0073] Among them, the node positions in the bidirectional linked list are 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 current latest lane change node is added to the end of the bidirectional linked list. In this way, the update is continuously cyclically updated to continuously monitor and record the vehicle's continuous lane change behavior, thereby realizing dynamic detection of frequent lane changes of vehicles.
[0074] In this embodiment, IMU_Current_LanChange_Node is a pointer to the current lane change node or event. In a linked list or similar data structure, each node represents a lane change event. App_TimeTick_Count is used to record the specific time when the lane change event occurs, 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. Therefore, IMU_Current_LanChange_Node->prev->prev refers to the two nodes before the current node, that is, the previous 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), this conditional judgment is to compare 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.
[0076] App_Fre_Lane_Change: This flag variable is set to 1, indicating that frequent lane changes are detected. That is, 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 frequently changed lanes.
[0077] In this embodiment, the low-pass filtering process is implemented using a differential equation, and the output is y[n]=α×x[n]+(1-α)×y[n-1], where α is a smoothing factor.
[0078] In this embodiment, the six-axis fusion algorithm includes:
[0079] Collect the vehicle's three-axis acceleration data and three-axis angular velocity data;
[0080] Apply the Madgwick algorithm or Mahony algorithm, combined with complementary filtering technology, to fuse the low-frequency stability information of the three-axis accelerometer with the high-frequency dynamic information of the three-axis gyroscope;
[0081] During the fusion process, an appropriate weight α is set, and the fused three-axis Euler angles, including pitch angle, roll angle, and yaw angle, are calculated according to the formula Angle_fused=α×Angle_acc+(1-α)×Angle_gyro. Among them, the fused Euler angle can accurately reflect the posture changes of the vehicle, especially the yaw angle of the 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, and the time window includes a plurality of continuous data sampling periods.
[0084] In each data sampling period, the vehicle's Z-axis angular velocity change is detected and calculated to see whether it meets the preset lane change angle threshold.
[0085] 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, is it preliminarily confirmed that a lane change behavior has occurred.
[0086] In the time window, the change in Z-axis angular velocity 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 is it finally confirmed that a lane change behavior has occurred.
[0088] After confirming a lane change behavior, the time window is reset and monitoring of a new data sampling cycle is restarted for the detection of the next lane change behavior.
[0089] When calculating the integral value within the time window, for each new data sampling period, its Z-axis angle change value is added to the time window, and at the same time, the Z-axis angle 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 angle 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 vehicle's Z-axis angular velocity change is required to meet the angle threshold of lane change in multiple consecutive data sampling cycles before the lane change behavior can be confirmed. The integral value within the time window is also used to further reduce the system's misjudgment rate, especially when the vehicle accelerates or makes a sharp turn, to ensure the accuracy of the detection results.
[0091] When creating two bidirectional linked lists, the first bidirectional linked list is used to store the vehicle's yaw angle data; the second bidirectional linked list is used to store the vehicle's Z-axis angular velocity data; wherein the calculated three-axis Euler angles are stored every 20ms.
[0092] Specifically, the method provided in this embodiment includes the following steps: using IMU (three-axis accelerometer and three-axis gyroscope), MCU obtains IMU raw data through SPI interface, the first stage processes raw data through low-pass filtering, the first layer of filtered data is processed by Kalman filtering, and finally the nine-axis fusion algorithm is used to obtain the three-axis Euler angle, the obtained three-axis acceleration, three-axis angular velocity, and three-axis Euler angle data are processed by algorithm, and the signal filtering processing and threshold judgment algorithm are combined to achieve accurate detection of lane change. Extract the first X data from the two created bidirectional linked lists (yaw angle, Z-axis angular velocity), and calculate the average value of these data. This step is used to analyze the steering behavior of the vehicle to obtain the change of the current yaw angle. By integrating the average values obtained by the yaw angle and the Z-axis angular velocity, the difference between the current Z-axis angular velocity and the last angular velocity obtained is calculated (current Z-axis angular velocity × 9.8-last Z-axis angular velocity × 9.8), and the change value is accumulated to the yaw angle. At the same time, the difference between the average integral of the current Z-axis data and the previous Z-axis data is calculated to find the integral change of the average value. This process helps to determine whether the vehicle is in a lane change state. Determine whether the value of the integral change of the average value exceeds the set threshold. If it exceeds, it is determined that the vehicle is changing lanes. Create a bidirectional linked list to store the time nodes of the vehicle's lane change and check whether the App_Numbers of the node before the current lane change node (that is, the previous lane change event) is 0. If it is 0, it means that this is the first lane change. IMU_Current_LanChange_Node->App_TimeTick_Count=
[0093] IMU_App_TickCount records the system timestamp when the current lane change occurs. It uses the characteristics of a bidirectional linked list to implement cyclic detection. When the vehicle changes lanes three times, it calculates the time difference between the current lane change and the first previous lane change. If the time difference is less than or equal to S time (the value of S can be determined based on actual conditions), it is determined to be a frequent lane change.
[0094] The condition is judged as 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 frequent lane changes have occurred.
[0095] After determining whether the vehicle has changed lanes three times frequently, the flag variable App_Fre_Lane_Change is reset, the second lane change node is moved to the first lane change node, the third lane change node is moved to the second lane change node, and the current lane change node is updated to the third lane change node. This method is used to continuously update the detection of frequent lane changes of vehicles.
[0096] In practical applications, assume that the method provided in this embodiment is analyzing the lane change behavior of an autonomous vehicle. During the driving process, the IMU sensor continuously collects the acceleration and angular velocity data of the vehicle, 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 get the three-axis Euler angle data.
[0097] During the data analysis process, if the vehicle changes lanes at a certain moment, the system records the current timestamp and inserts the event into a bidirectional linked list. At this time, if the Z-axis angular velocity between the previous moment and the current moment changes significantly and the change exceeds the set threshold, it is determined to be a lane change event.
[0098] If the time difference between the current lane change and the first lane change is less than or equal to S time (the value of S can be determined based on actual conditions) between three consecutive lane changes, the system will mark it as "frequent lane change" and trigger corresponding safety warning measures.
[0099] In summary, the present invention proposes a vehicle lane change detection method based on an IMU sensor, which achieves high-precision and high-reliability detection of vehicle lane change behavior by accurately calculating and analyzing lateral acceleration and steering angle changes.
[0100] Furthermore, the present invention 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 environmental interference of external signals (such as GPS). Even in tunnels, viaducts or in bad 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 system robustness.
[0101] Furthermore, by accurately recording and analyzing the timestamp of each lane change event, the present invention can accurately identify the continuous and frequent lane changes of the vehicle. This capability is crucial for timely detection of irregular or abnormal driving behaviors of drivers, helping to provide timely warnings, reduce the risk of traffic accidents, and significantly improve road safety.
[0102] Furthermore, the present invention 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. For autonomous driving systems and intelligent transportation systems, this means that real-time monitoring and rapid response to vehicle driving status can be achieved, providing strong support for making correct driving decisions in a timely manner.
[0103] Furthermore, compared with the traditional method that relies on high-cost sensors such as cameras and lidar, the present invention is based on IMU sensors, which significantly reduces the system cost. At the same time, IMU sensors are 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, the present invention, by introducing IMU sensors and combining them with advanced algorithm technology, achieves high-precision, high-reliability, and real-time detection of vehicle lane-changing behavior, effectively reduces system costs, and enhances environmental adaptability. It provides strong support for the development of intelligent transportation systems and autonomous driving technologies, 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 present invention can be deployed on a server with a network. A person skilled in the art can understand that the above methods and systems can be implemented using computer executable instructions and / or included in a processor control code. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any modification, equivalent replacement and improvement made by any person skilled in the art within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered within the protection scope of the present invention.
[0106] The above-mentioned embodiments are only preferred embodiments of the present invention and cannot be used to limit the scope of protection of the present invention. Any non-substantial changes and substitutions made by technicians in this field on the basis of the present invention shall fall within the scope of protection required by the present invention.
Claims
1. A method for detecting continuous lane change of a vehicle, characterized in that: The method comprises the following steps: Create two bidirectional linked lists to store the acquired yaw angle and Z-axis angular velocity data respectively, extract the first X data from each linked list, and calculate the average value of these data to analyze the vehicle's steering behavior and obtain the change of the current yaw angle; The average values of the yaw angle and the 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. At the same time, the difference between the average value integral of the current Z-axis data and the previous 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 change state. Determine whether the integral change value of the Z-axis average value exceeds the preset lane change angle threshold. If so, it is determined that the vehicle is changing lanes. When it is detected that the vehicle is changing lanes, a bidirectional linked list node is created to store the time node of the vehicle's lane change. At the same time, check whether the number of lane changes of the node before the current lane change node is 0. If it is 0, it is regarded as the first lane change, and the node information is updated at the same time; record the system timestamp when the current vehicle changes lanes; Using the characteristics of a bidirectional linked list, the vehicle's lane-changing behavior is detected cyclically. When it is detected that the vehicle changes lanes three times in a short period of time, 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 the preset threshold S, it is determined that the vehicle has changed lanes frequently and the corresponding flag variable is set. After completing the frequent lane change judgment, the flag variable is reset and the node information in the bidirectional linked list is updated to continue the loop to detect the frequent lane change behavior of the vehicle.
2. The method according to claim 1, characterized in that: Using a microcontroller unit 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 acquired raw data is subjected to low-pass filtering to eliminate high-frequency noise; the data subjected to low-pass filtering is subjected to Kalman filtering; The three-axis acceleration data and three-axis angular velocity data after Kalman filter processing are processed by six-axis fusion algorithm to obtain three-axis Euler angle data, including pitch angle, roll angle and yaw angle; The obtained three-axis acceleration, three-axis angular velocity and three-axis Euler angle data are logically processed and combined with signal filtering processing and threshold judgment algorithm to achieve accurate detection of vehicle lane changes.
3. The method according to claim 1, characterized in that: When the vehicle is determined to be changing 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 changes; IMU_Current_LanChange_Node->App_TimeTick_Count = IMU_App_TickCount, records the system timestamp when the current vehicle changes lanes; The conditions for satisfying frequent lane changes include, that is, if the conditional 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 frequent lane changes have occurred.
4. The method according to claim 3, characterized in that: After completing the determination of whether the vehicle's three consecutive lane changes constitute frequent lane changes, the flag variable App_Fre_Lane_Change is reset to 0 to prepare for the next determination; Among them, the node positions in the bidirectional linked list are 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 current latest lane change node is added to the end of the bidirectional linked list. In this way, the update is continuously cyclically updated to continuously monitor and record the vehicle's continuous lane change behavior, thereby realizing dynamic detection of frequent lane changes of vehicles.
5. The method according to claim 4, characterized in that: IMU_Current_LanChange_Node is a pointer to the current lane change node or event. In a linked list or similar data structure, each node represents a lane change event. App_TimeTick_Count is used to record the specific time when the lane change event occurs, 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. Therefore, IMU_Current_LanChange_Node->prev->prev refers to the two nodes before the current node, that is, the last two lane change events. Conditional judgment: if((IMU_Current_LanChange_Node->App_TimeTick_Count-IMU_Current_LanChange_Node->prev->prev->App_TimeTick_Count)<=60), this conditional 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 frequent lane changes are detected. That is, 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 frequently changed lanes.
6. The method according to claim 2, characterized in that: 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 a smoothing factor.
7. The method according to claim 2, characterized in that: The six-axis fusion algorithm includes: Collect the vehicle's three-axis acceleration data and three-axis angular velocity data; Apply the Madgwick algorithm or Mahony algorithm, combined with complementary filtering technology, to fuse the low-frequency stability information of the three-axis accelerometer with the high-frequency dynamic information of the three-axis gyroscope; During the fusion process, an appropriate weight α is set, and the fused three-axis Euler angles, including pitch angle, roll angle, and yaw angle, are calculated according to the formula Angle_fused = α × Angle_acc + (1-α) × Angle_gyro.
8. The method according to claim 1, characterized in that: It also includes the introduction of a time window mechanism to confirm lane change behavior. The specific steps are as follows: Setting a time window, the time window includes a plurality of consecutive data sampling periods; In each data sampling period, the vehicle's Z-axis angular velocity change is detected and calculated to see whether it meets the preset lane change angle threshold; 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 has occurred; Integrate the Z-axis angular velocity change that meets the lane change angle threshold within the time window to obtain an integral value; Comparing the integral value with a preset integral threshold, and only when the integral value exceeds the integral threshold, finally confirming that a lane change behavior has occurred; After confirming a lane change behavior, the time window is reset and monitoring of a new data sampling cycle is restarted for the detection of the next lane change behavior.
9. The method according to claim 7, characterized in that: When calculating the integral value within the time window, for each new data sampling period, its Z-axis angle change value is added to the time window, and at the same time, the Z-axis angle 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 angle change values in the time window is calculated as the integral value in the time window.
10. The method according to claim 1, characterized in that: When creating two bidirectional linked lists, the first bidirectional linked list is used to store the vehicle's yaw angle data; the second bidirectional linked list is used to store the vehicle's Z-axis angular velocity data; wherein the calculated three-axis Euler angles are stored every 20ms.
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
Device and program for determination of driver's status
JP2011060207A
Method and system for detecting frequent lane changes of moving vehicles
US20160253900A1