Implementation method for detecting left turning of vehicle

Through the six-axis inertial measurement unit IMU and data fusion algorithm, vehicle left turn detection in complex traffic environments is realized, solving the problem of insufficient detection accuracy and real-time in the prior art, and improving traffic safety and management efficiency.

CN119773782AActive Publication Date: 2025-04-08ZHUHAI MAGIC CUBE INTELLIGENT TECHNOLOGY CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411753592.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-04-08
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

The prior art is difficult to accurately detect vehicle turn left behavior in complex traffic environments, resulting in an increase in the risk of traffic accidents.

Method used

By monitoring the vehicle's motion state using the six-axis inertial measurement unit IMU, combining the SPI interface to collect three-axis acceleration and angular velocity data, perform data processing and six-axis fusion algorithm processing, obtain the three-axis Euler angle of the vehicle, and determine whether the vehicle is turning left through integral and angle changes.

Benefits of technology

It improves the accuracy and real-time performance of vehicle left turn detection, can work normally under various complex traffic conditions and environments, reduces the occurrence of traffic accidents, and provides intelligent decision-making support for the traffic management system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119773782A_ABST
    Figure CN119773782A_ABST
Patent Text Reader

Abstract

The invention provides an implementation method for detecting left turning of a vehicle. The implementation method comprises the following steps: monitoring the motion state of the vehicle by using a six-axis inertial measurement unit IMU; performing data processing and six-axis fusion algorithm processing on the acquired three-axis acceleration and three-axis angular velocity data to obtain a three-axis Euler angle of the vehicle; carrying out integration and angle change calculation on the stored yaw angle and Z-axis angular velocity data to obtain the angle change of the vehicle during steering; the Z-axis angle change value calculated in real time is compared with a preset left turning angle threshold value, and if the Z-axis angle change value exceeds the preset left turning angle threshold value, it is judged that the vehicle is turning left; introducing a time window mechanism; and after the vehicle starts to turn left, Z-axis angle change of each data sampling period of the vehicle is continuously monitored, and when the Z-axis angular speed is reduced and tends to zero, it is judged that the left turning action is ended. According to the method, the left turning action of the vehicle is accurately recognized, so that traffic accidents are reduced, and more intelligent decision support is provided for a traffic management system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent transportation and vehicle motion detection, and in particular to a method for detecting a vehicle turning left. Background Art

[0002] As the number of motor vehicles in cities increases, the pressure on traffic management also increases. Especially in complex traffic environments, vehicles are very likely to collide with straight-moving vehicles or pedestrians when turning left, causing serious traffic accidents. Existing left-turn detection technologies are insufficient in detection accuracy, real-time performance, and adaptability to complex environments, making it difficult to meet actual needs. For example, detection methods based on a single sensor (such as a camera or GPS) cannot accurately determine a vehicle's turning action in situations such as traffic congestion and bad weather.

[0003] Many existing systems rely on single sensor data (such as cameras or GPS), which makes it impossible to accurately judge whether the vehicle is performing a left turn in complex environments (such as dense traffic, changing weather, etc.), especially at high speeds and in emergency situations.

[0004] Existing technologies perform poorly under different road and weather conditions. For example, when driving in rainy or snowy weather or at night, the camera's image clarity is reduced, affecting recognition capabilities; and LiDAR may be obstructed in certain environments, resulting in data loss.

[0005] Existing detection systems often require a long processing time to analyze data and are unable to respond quickly to left-turn behaviors, which may cause delays in the vehicle's right turn and increase the risk of traffic accidents. When implementing right-turn detection, a certain threshold may be set based on the vehicle's steering angle and acceleration.

[0006] Many traditional systems fail to fully utilize data fusion from multiple sensors, resulting in redundant and missing information and an inability to form a comprehensive understanding of vehicle behavior. In complex traffic environments, existing technologies often lack the ability to make intelligent decisions based on real-time data, and are unable to provide safety and reliability for vehicle users.

[0007] Therefore, developing a method that can accurately detect vehicle left-turn behavior in complex road environments is crucial to improving road safety. Summary of the invention

[0008] In order to solve the problems existing in the prior art, the purpose of the present invention is to provide a method for detecting a vehicle turning left, aiming to improve the accuracy and real-time performance of the vehicle turning left detection, and in particular to be able to adapt to various complex traffic conditions and environments. The method reduces the occurrence of traffic accidents by accurately identifying the vehicle turning left, and provides more intelligent decision support for the traffic management system.

[0009] The present invention achieves the above-mentioned purpose through the following technical solutions:

[0010] A method for detecting a left turn of a vehicle, the method comprising the following steps:

[0011] Use a six-axis inertial measurement unit (IMU) to monitor the vehicle's motion state, and collect raw data of three-axis acceleration and angular velocity at fixed time intervals through the SPI interface;

[0012] The collected three-axis acceleration and three-axis angular velocity data are processed by data processing and six-axis fusion algorithm to obtain the three-axis Euler angle of the vehicle, including pitch angle, roll angle, and yaw angle;

[0013] Create a storage structure to store multiple data points of yaw angle and Z-axis angular velocity;

[0014] Integrate the stored yaw angle and Z-axis angular velocity data and calculate the angle change to obtain the angle change when the vehicle turns;

[0015] Compare the real-time calculated Z-axis angle change value with the preset left turn angle threshold. If it exceeds the threshold, it is determined that the vehicle is turning left.

[0016] The time window mechanism is introduced, requiring the vehicle's Z-axis angular velocity change to meet the left turn angle threshold for multiple consecutive data sampling cycles in order to confirm the left turn behavior;

[0017] After the vehicle starts to turn left, the Z-axis angle change of the vehicle in each data sampling cycle is continuously monitored. When the Z-axis angular velocity decreases and approaches zero, it is determined that the left turn action is completed.

[0018] According to a method for detecting a left turn of a vehicle provided by the present invention, the data processing includes low-pass filtering the collected three-axis acceleration and three-axis angular velocity data, and performing Kalman filtering on the low-pass filtered data to eliminate uncertainty and perform state estimation; wherein the low-pass filtering is implemented using a discrete Fourier transform DFT or a Butterworth filter.

[0019] According to a method for detecting a left turn of a vehicle provided by the present invention, the stored yaw angle and Z-axis angular velocity data are integrated and the angle change is calculated, including:

[0020] Get the current yaw angle and Z-axis angular velocity;

[0021] Calculate the change between the current Z-axis angular velocity and the last Z-axis angular velocity obtained, specifically, multiply the current Z-axis angular velocity by 9.8 and subtract the result of multiplying the last Z-axis angular velocity by 9.8;

[0022] Integrate the calculated Z-axis angular velocity change value to obtain the current integrated Z-axis data;

[0023] Calculate the average value of the current integrated Z-axis data and the previous integrated Z-axis data as the average integrated change value;

[0024] The obtained average integrated change value is added to the yaw angle, thereby updating the yaw angle;

[0025] Continuously calculate and update the angle change when the vehicle turns.

[0026] According to a method for detecting a left turn of a vehicle provided by the present invention, the obtained average integral change value is accumulated to the yaw angle, which is expressed as the following formula:

[0027] θ Z轴 (t) = θ Z轴 (t-1)+∫ t t--1 ω z dt

[0028] Among them, ω z is the Z-axis angular velocity, θ Z轴 is the accumulated yaw angle.

[0029] According to a method for detecting a left turn of a vehicle provided by the present invention, the step of comparing the Z-axis angle change value calculated in real time with a preset left turn angle threshold comprises:

[0030] Set a left turn angle threshold that is specifically adjusted based on vehicle type, turning habits, and traffic conditions;

[0031] The calculated Z-axis angle change value θ Z轴 Compare with the set left turn angle threshold;

[0032] If the Z-axis angle changes by θ Z轴 If the left turning angle threshold is exceeded, the vehicle is judged to be turning left;

[0033] If the Z-axis angle changes by θ Z轴 If the left turn angle threshold is not exceeded, it is determined that the vehicle is not turning left.

[0034] According to an implementation method for detecting a left turn of a vehicle provided by the present invention, when a time window mechanism is introduced, a time window length is set, wherein the time window length is defined as the number of data sampling cycles that need to continuously meet the left turn angle threshold, and the threshold and window length are specifically adjusted according to the vehicle type, turning habits and traffic environment;

[0035] In the time window, the Z-axis angle change value of each data sampling period is compared with the left turn angle threshold, and the integral value in the time window is calculated;

[0036] If the Z-axis angle change values ​​of multiple consecutive data sampling periods in the time window exceed the left turn angle threshold, and the integral value in the time window also meets the preset conditions, it is determined that the vehicle is turning left;

[0037] If within the time window, the Z-axis angle change value of any one or more data sampling periods does not exceed the left turn angle threshold, or the integral value within the time window does not meet the preset conditions, it is determined that the vehicle did not make a left turn.

[0038] According to an implementation method for detecting left turns 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.

[0039] According to a method for detecting a left turn of a vehicle provided by the present invention, if the change value of the Z-axis angular velocity does not exceed a set left turn angle threshold within a certain period of time, the system considers that the vehicle has completed the left turn.

[0040] After the vehicle starts to turn left, if the Z-axis angle change value does not exceed the set left turn angle threshold within M consecutive data sampling periods, where M is a preset positive integer, and the time length corresponding to the M data sampling periods is sufficient to reflect the process of the vehicle completing the left turn, then it is determined that the vehicle has completed the left turn;

[0041] If the Z-axis angle change value of any one or more data sampling periods within M data sampling periods exceeds the set left turn angle threshold, the subsequent Z-axis angle change values ​​will continue to be monitored until the condition that the vehicle has completed the left turn is met.

[0042] According to an implementation method for detecting a left turn of a vehicle provided by the present invention, when creating a storage structure, two bidirectional linked lists or circular buffers are created, which are respectively used to store the yaw angle and the Z-axis angular velocity, wherein the first bidirectional linked list or circular buffer is used to store the vehicle's yaw angle data; the second bidirectional linked list or circular buffer is used to store the vehicle's Z-axis angular velocity data; the system stores the calculated three-axis Euler angle every 20 ms.

[0043] According to a method for detecting a left turn of a vehicle provided by the present invention, the six-axis fusion algorithm processing includes:

[0044] A data fusion module is provided, which uses the Madgwick algorithm or the Mahony algorithm to fuse the acquired three-axis acceleration data and the three-axis angular velocity data to calculate the three-axis Euler angles of the vehicle, including the pitch angle, the roll angle and the yaw angle;

[0045] Wherein, the data fusion module is configured to pay special attention to the yaw angle of the Z axis, which is used to reflect the steering behavior of the vehicle;

[0046] The data fusion module also includes:

[0047] A filtering unit, used for preprocessing the original three-axis acceleration and three-axis angular velocity data;

[0048] The fusion algorithm implementation unit specifically implements the Madgwick algorithm or the Mahony algorithm to iteratively calculate the three-axis Euler angles;

[0049] The attitude output module is used to output the calculated three-axis Euler angles in a standard format for use by other systems or modules;

[0050] Wherein, the fusion algorithm implementation unit is optimized to provide efficient and accurate posture estimation in real-time applications.

[0051] It can be seen that compared with the prior art, the present invention has the following beneficial effects:

[0052] 1. The present invention can greatly improve the accuracy of left turn detection by fusing multi-source sensor data (such as gyroscopes and accelerometers) and using a six-axis fusion algorithm and filtering processing.

[0053] 2. The present invention can work normally under various weather and road conditions, and can maintain high detection accuracy regardless of rainy and snowy weather, low visibility environment at night, or complex road conditions such as traffic congestion.

[0054] 3. The present invention can monitor the left-turning behavior of the vehicle in real time, and issue a warning or take other safety measures in a timely manner when a dangerous situation is detected.

[0055] 4. The present invention adopts multi-source data fusion technology, so that the system can make full use of data from different sensors and reduce the occurrence of misjudgment, especially in the scenario of sharp turns or high-speed turns.

[0056] 5. The present invention combines the intelligent dispatching function of the traffic management system to optimize traffic signals according to the detected left-turn behavior and improve the efficiency of traffic management.

[0057] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 The present invention is a flowchart of an implementation method for detecting a vehicle turning left.

[0059] Figure 2 The present invention is a flowchart of a method for detecting a left turn of a vehicle. DETAILED DESCRIPTION

[0060] 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.

[0061] 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.

[0062] See also Figure 1 and Figure 2 The present invention provides a method for detecting a left turn of a vehicle, the method comprising the following steps:

[0063] Step S1, using a six-axis inertial measurement unit IMU to monitor the motion state of the vehicle, and collecting raw data of three-axis acceleration and angular velocity at fixed time intervals through an SPI interface;

[0064] Step S2, performing data processing and six-axis fusion algorithm processing on the collected three-axis acceleration and three-axis angular velocity data to obtain the three-axis Euler angles of the vehicle, including pitch angle, roll angle, and yaw angle;

[0065] Step S3, creating a storage structure for storing multiple data points of the yaw angle and the Z-axis angular velocity;

[0066] Step S4, integrating the stored yaw angle and Z-axis angular velocity data and calculating the angle change to obtain the angle change when the vehicle turns;

[0067] Step S5, comparing the real-time calculated Z-axis angle change value with a preset left turn angle threshold, and if it exceeds the threshold, it is determined that the vehicle is turning left;

[0068] Step S6, introducing a time window mechanism, requiring the vehicle's Z-axis angular velocity change to meet the left turn angle threshold for a left turn within multiple consecutive data sampling periods, before the left turn behavior can be confirmed;

[0069] Step S7, after the vehicle starts to turn left, continuously monitor the change in the Z-axis angle of the vehicle in each data sampling period, and when the Z-axis angular velocity decreases and approaches zero, it is determined that the left turn action is completed.

[0070] It can be seen that this embodiment uses a six-axis gyroscope IMU (three-axis accelerometer and three-axis gyroscope), and the MCU obtains raw data through the SPI interface. The first stage processes the raw data through low-pass filtering, and the first layer of filtered data is processed by Kalman filtering. Finally, the six-axis fusion algorithm is used to obtain the three-axis Euler angle, and the obtained data is processed by algorithm, combining signal filtering processing with threshold judgment algorithm to achieve accurate recognition of left turns.

[0071] In the above step S1, a six-axis inertial measurement unit IMU, including a three-axis accelerometer and a three-axis gyroscope, is used to monitor the motion state of the vehicle. The MCU communicates with the IMU through the SPI interface to collect the raw data of the three-axis acceleration and angular velocity at a fixed time interval (e.g., 20 milliseconds).

[0072] Among them, before data acquisition, the sensor needs to be offset calibrated and temperature compensated to reduce the impact of external factors (such as temperature changes and sensor drift) on the data.

[0073] In the above step S2, the data processing includes low-pass filtering the collected three-axis acceleration and three-axis angular velocity data to remove high-frequency noise; wherein, the low-pass filtering is implemented by discrete Fourier transform DFT or Butterworth filter, and the filtered data will be smoother, retaining the main motion signal and reducing the interference of environmental noise, thereby ensuring the availability of the data.

[0074] 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, which is especially effective for dynamic systems (such as the turning motion of a vehicle).

[0075] In the above step S2, the six-axis fusion algorithm processing includes:

[0076] The three-axis acceleration and three-axis angular velocity data are fused to obtain the vehicle's three-axis Euler angle (pitch angle, roll angle, yaw angle). You can choose to use the Madgwick algorithm or Mahony algorithm for data fusion. The fused Euler angle can accurately reflect the vehicle's posture changes, especially the Z-axis yaw angle, which is used to judge the vehicle's steering behavior.

[0077] Specifically, a data fusion module is provided, which adopts Madgwick algorithm or Mahony algorithm to fuse the acquired three-axis acceleration data and three-axis angular velocity data to calculate the three-axis Euler angle of the vehicle, including pitch angle, roll angle and yaw angle.

[0078] The data fusion module is configured to pay special attention to the yaw angle of the Z axis, which is used to reflect the steering behavior of the vehicle.

[0079] In this embodiment, the data fusion module further includes:

[0080] A filtering unit, used for preprocessing the original three-axis acceleration and three-axis angular velocity data;

[0081] The fusion algorithm implementation unit specifically implements the Madgwick algorithm or the Mahony algorithm to iteratively calculate the three-axis Euler angles;

[0082] The attitude output module is used to output the calculated three-axis Euler angles in a standard format for use by other systems or modules;

[0083] The fusion algorithm implementation unit is optimized to provide efficient and accurate posture estimation in real-time applications.

[0084] In the above step S3, when creating the storage structure, two bidirectional linked lists or circular buffers are created, which are respectively used to store the yaw angle and the Z-axis angular velocity. Among them, the first bidirectional linked list or circular buffer is used to store the vehicle's yaw angle data; the second bidirectional linked list or circular buffer is used to store the vehicle's Z-axis angular velocity data; the system stores the calculated three-axis Euler angle 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 most recent N data points).

[0085] The value of N is dynamically determined according to the vehicle's driving speed and detection sensitivity requirements to ensure that more data points can be stored when driving at high speed or when high-sensitivity detection is required, and that the number of stored data points can be reduced when driving at low speed or when lower-sensitivity detection is required.

[0086] In the above step S4, the stored yaw angle and Z-axis angular velocity data are integrated and angle change calculated, including:

[0087] Get the current yaw angle and Z-axis angular velocity;

[0088] Calculate the change between the current Z-axis angular velocity and the last Z-axis angular velocity obtained, specifically, multiply the current Z-axis angular velocity by 9.8 and subtract the result of multiplying the last Z-axis angular velocity by 9.8;

[0089] Integrate the calculated Z-axis angular velocity change value to obtain the current integrated Z-axis data;

[0090] Calculate the average value of the current integrated Z-axis data and the previous integrated Z-axis data as the average integrated change value;

[0091] The obtained average integrated change value is added to the yaw angle, thereby updating the yaw angle;

[0092] Continuously calculate and update the angle change when the vehicle turns.

[0093] In this embodiment, the obtained average integrated change value is accumulated to the yaw angle, which is expressed as the following formula:

[0094] θ Z轴 (t) = θ Z轴 (t-1)+∫ t t--1 ω z dt

[0095] Among them, ω z is the Z-axis angular velocity, θ Z轴 (t) is the accumulated yaw angle at time t, ∫ t t--1 ω z dt represents the angular velocity ω from t-1 to t z The integral of , that is, the cumulative change of angular velocity during this period of time.

[0096] Specifically, when performing integration and angle change calculation, for the Z-axis angular velocity integral: the average value is obtained, 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 last angular velocity x9.8), and the average value integral change is calculated each time by calculating the current integrated Z-axis data and the last Z-axis data, and the angular velocity of the Z-axis (yaw angle) is integrated to calculate the angle change when the vehicle turns. Among them, the integration can be achieved by a numerical integration method, such as the trapezoidal method or the Simpson method.

[0097] In the above step S5, the Z-axis angle change value calculated in real time is compared with the preset left turn angle threshold, including:

[0098] Set a left turn angle threshold that is specifically adjusted based on vehicle type, turning habits, and traffic conditions;

[0099] The calculated Z-axis angle change value θ Z轴 Compare with the set left turn angle threshold;

[0100] If the Z-axis angle changes by θ Z轴 If the left turning angle threshold is exceeded, the vehicle is judged to be turning left;

[0101] If the Z-axis angle changes by θ Z轴 If the left turn angle threshold is not exceeded, it is determined that the vehicle is not turning left.

[0102] Specifically, after each integration, the system compares the real-time calculated Z-axis angle change value with the preset left turn angle threshold. The typical left turn angle threshold can be set to any value, and the specific value is adjusted according to the vehicle type, turning habits and traffic environment.

[0103] If the Z-axis angle changes by θ Z轴 If the Z-axis angle change value exceeds the threshold, the system determines that the vehicle is turning left. If the Z-axis angle change value does not exceed the threshold, the system determines that the vehicle is not turning left.

[0104] In the above step S6, in order to avoid misjudgment, the system introduces a time window mechanism based on angle judgment. For example, when introducing the time window mechanism, a time window length is set, where the time window length is defined as the number of data sampling cycles that need to continuously meet the left turn angle threshold. The threshold and window length are specifically adjusted according to the vehicle type, turning habits and traffic environment;

[0105] In the time window, the Z-axis angle change value of each data sampling period is compared with the left turn angle threshold, and the integral value in the time window is calculated;

[0106] If the Z-axis angle change values ​​of multiple consecutive data sampling periods in the time window exceed the left turn angle threshold, and the integral value in the time window also meets the preset conditions, it is determined that the vehicle is turning left;

[0107] If within the time window, the Z-axis angle change value of any one or more data sampling periods does not exceed the left turn angle threshold, or the integral value within the time window does not meet the preset conditions, it is determined that the vehicle did not make a left turn.

[0108] In this embodiment, 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.

[0109] Of course, the time window length of this embodiment is adjustable to meet the needs of different driving scenarios. For example, when the vehicle accelerates or makes a sharp turn, the time window length can be appropriately extended to improve the accuracy of the judgment.

[0110] In the above step S7, if the change value of the Z-axis angular velocity does not exceed the set left turn angle threshold within a certain period of time, the system considers that the vehicle has completed the left turn.

[0111] After the vehicle starts to turn left, if the Z-axis angle change value does not exceed the set left turn angle threshold within M consecutive data sampling periods, where M is a preset positive integer, and the time length corresponding to the M data sampling periods is sufficient to reflect the process of the vehicle completing the left turn, then it is determined that the vehicle has completed the left turn;

[0112] If the Z-axis angle change value of any one or more data sampling periods within M data sampling periods exceeds the set left turn angle threshold, the subsequent Z-axis angle change values ​​will continue to be monitored until the condition that the vehicle has completed the left turn is met.

[0113] In this embodiment, the method further includes triggering corresponding vehicle control or navigation operations, such as adjusting vehicle speed, steering assistance, issuing a warning signal, or updating a navigation path, after determining that the vehicle is turning left.

[0114] In practical applications, this embodiment uses MCU to obtain the raw data of the six-axis gyroscope through the SPI interface. The first stage processes the raw data through low-pass filtering, and the first layer of filtered data is processed by Kalman filtering to obtain the second layer of data. Finally, the six-axis fusion algorithm is used to obtain the three-axis Euler angle, and two array linked lists of size N are created. The N data of the yaw angle and Z-axis angular velocity obtained every 20MS are stored in this cache array linked list, and the first x data stored in the two-way linked list are calculated to average. Finally, each average value is averaged before and after, and the obtained integral value is judged to be greater than the set predetermined threshold. It is then converted into the corresponding change angle, and the angle obtained each time is added to the obtained Z-axis Euler angle to calculate the first x average integrals, and it is judged whether it is greater than the predetermined threshold of the left turn angle to determine whether it is a left turn. When it is less than the set predetermined threshold, the change value tends to zero, and it is judged that the left turn is completed, and the corresponding left turn flag position is set to 1.

[0115] Furthermore, when calculating the integral value within the time window, weighted average, sliding average or other mathematical processing methods may be used to smooth or emphasize the influence of certain data sampling periods.

[0116] Furthermore, the integration threshold is determined based on experimental data, statistical analysis, or expert experience to ensure that left-turning behavior can be accurately distinguished from other types of movements under vehicle acceleration, sharp turns, or other complex driving scenarios.

[0117] Furthermore, the method provided in this embodiment also includes triggering a series of preset vehicle control or navigation operations after confirming that the vehicle is turning left, such as adjusting the vehicle speed, activating the steering assist system, issuing visual or auditory warnings, or updating the path planning of the navigation system.

[0118] The method provided in this embodiment is used as part of a vehicle automatic driving system, an assisted driving system or a vehicle dynamic monitoring system, and is integrated with other sensor data (such as GPS position, vehicle speed, steering wheel angle, etc.) to improve the accuracy and reliability of left turn judgment.

[0119] In summary, the present invention can greatly improve the accuracy of left turn detection by fusing multi-source sensor data, using a six-axis fusion algorithm and filtering processing. The present invention can work normally under various weather and road conditions, whether it is rainy and snowy weather, low visibility environment at night, or complex road conditions such as traffic congestion, it can maintain a high detection accuracy. The present invention can monitor the left turn behavior of the vehicle in real time, and issue an early warning or take other safety measures in time when a dangerous situation is detected. The present invention adopts multi-source data fusion technology, so that the system can make full use of data from different sensors and reduce the occurrence of misjudgment, especially in the scene of sharp turns or high-speed turns. The present invention is combined with the intelligent scheduling function of the traffic management system, and can optimize traffic signals according to the detected left turn behavior, thereby improving the efficiency of traffic management.

[0120] 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.

[0121] 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 a vehicle turning left, characterized in that: The method comprises the following steps: Use a six-axis inertial measurement unit (IMU) to monitor the vehicle's motion state, and collect raw data of three-axis acceleration and angular velocity at fixed time intervals through the SPI interface; The collected three-axis acceleration and three-axis angular velocity data are processed by data processing and six-axis fusion algorithm to obtain the three-axis Euler angle of the vehicle, including pitch angle, roll angle, and yaw angle; Create a storage structure to store multiple data points of yaw angle and Z-axis angular velocity; Integrate the stored yaw angle and Z-axis angular velocity data and calculate the angle change to obtain the angle change when the vehicle turns; Compare the real-time calculated Z-axis angle change value with the preset left turn angle threshold. If it exceeds the threshold, it is determined that the vehicle is turning left. The time window mechanism is introduced, requiring the vehicle's Z-axis angular velocity change to meet the left turn angle threshold for multiple consecutive data sampling cycles in order to confirm the left turn behavior; After the vehicle starts to turn left, the Z-axis angle change of the vehicle in each data sampling cycle is continuously monitored. When the Z-axis angular velocity decreases and approaches zero, it is determined that the left turn action is completed.

2. The method according to claim 1, characterized in that: The data processing includes low-pass filtering the collected three-axis acceleration and three-axis angular velocity data, and Kalman filtering the low-pass filtered data to eliminate uncertainty and perform state estimation; wherein the low-pass filtering is implemented using discrete Fourier transform DFT or Butterworth filter.

3. The method according to claim 1, characterized in that: Integrate the stored yaw angle and Z-axis angular velocity data and calculate the angle change, including: Get the current yaw angle and Z-axis angular velocity; Calculate the change between the current Z-axis angular velocity and the last Z-axis angular velocity obtained, specifically, multiply the current Z-axis angular velocity by 9.8 and subtract the result of multiplying the last Z-axis angular velocity by 9.8; Integrate the calculated Z-axis angular velocity change value to obtain the current integrated Z-axis data; Calculate the average value of the current integrated Z-axis data and the previous integrated Z-axis data as the average integrated change value; The obtained average integrated change value is added to the yaw angle, thereby updating the yaw angle; Continuously calculate and update the angle change when the vehicle turns.

4. The method according to claim 3, characterized in that: The average integrated change value is added to the yaw angle, which is expressed as the following formula: θ Z轴 (t)=θ Z轴 (t-1)+∫ t t--1 ω z dt Among them, ω z is the Z-axis angular velocity, θ Z轴 is the accumulated yaw angle.

5. The method according to claim 1, characterized in that The step of comparing the real-time calculated Z-axis angle change value with a preset left turn angle threshold comprises: Set a left turn angle threshold that is specifically adjusted based on vehicle type, turning habits, and traffic conditions; The calculated Z-axis angle change value θ Z轴 Compare with the set left turn angle threshold; If the Z-axis angle changes by θ Z轴 If the left turning angle threshold is exceeded, the vehicle is judged to be turning left; If the Z-axis angle changes by θ Z轴 If the left turn angle threshold is not exceeded, it is determined that the vehicle is not turning left.

6. The method according to claim 1, characterized in that: When the time window mechanism is introduced, a time window length is set, where the time window length is defined as the number of data sampling cycles that need to continuously meet the left turn angle threshold. The threshold and window length are specifically adjusted according to the vehicle type, turning habits and traffic environment; In the time window, the Z-axis angle change value of each data sampling period is compared with the left turn angle threshold, and the integral value in the time window is calculated; If the Z-axis angle change values ​​of multiple consecutive data sampling periods in the time window exceed the left turn angle threshold, and the integral value in the time window also meets the preset conditions, it is determined that the vehicle is turning left; If within the time window, the Z-axis angle change value of any one or more data sampling periods does not exceed the left turn angle threshold, or the integral value within the time window does not meet the preset conditions, it is determined that the vehicle did not make a left turn.

7. The method according to claim 6, 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.

8. The method according to claim 1, characterized in that: If the change in the Z-axis angular velocity does not exceed the set left turn angle threshold within a certain period of time, the system considers that the vehicle has completed the left turn; After the vehicle starts to turn left, if the Z-axis angle change value does not exceed the set left turn angle threshold within M consecutive data sampling periods, where M is a preset positive integer, and the time length corresponding to the M data sampling periods is sufficient to reflect the process of the vehicle completing the left turn, then it is determined that the vehicle has completed the left turn; If the Z-axis angle change value of any one or more data sampling periods within M data sampling periods exceeds the set left turn angle threshold, the subsequent Z-axis angle change values ​​will continue to be monitored until the condition that the vehicle has completed the left turn is met.

9. The method according to claim 1, characterized in that: When creating a storage structure, two bidirectional linked lists or circular buffers are created to store the yaw angle and the Z-axis angular velocity, respectively. The first bidirectional linked list or circular buffer is used to store the vehicle's yaw angle data; the second bidirectional linked list or circular buffer is used to store the vehicle's Z-axis angular velocity data; the system stores the calculated three-axis Euler angle every 20 ms.

10. The method according to claim 1, characterized in that: The six-axis fusion algorithm processing includes: A data fusion module is provided, which uses the Madgwick algorithm or the Mahony algorithm to fuse the acquired three-axis acceleration data and the three-axis angular velocity data to calculate the three-axis Euler angles of the vehicle, including the pitch angle, the roll angle and the yaw angle; Wherein, the data fusion module is configured to pay special attention to the yaw angle of the Z axis, which is used to reflect the steering behavior of the vehicle; The data fusion module also includes: A filtering unit, used for preprocessing the original three-axis acceleration and three-axis angular velocity data; The fusion algorithm implementation unit specifically implements the Madgwick algorithm or the Mahony algorithm to iteratively calculate the three-axis Euler angles; The attitude output module is used to output the calculated three-axis Euler angles in a standard format for use by other systems or modules; Wherein, the fusion algorithm implementation unit is optimized to provide efficient and accurate posture estimation in real-time applications.

Citation Information

Patent Citations

  • Method for detecting turning angle of vehicle based on three-axis acceleration sensor

    CN105523084A

  • Method for vehicle running state description and driving behavior detection based on state machine

    CN106585636A

  • Navigation parameter acquisition method and vehicle sharp turn judgment method, system and device

    CN109000643A

  • Vehicle running condition monitoring method, device, computer device and storage medium

    CN109109866A

  • Vehicle driving state monitoring method and system

    CN112238858A