Gyroscope-based vehicle lane change detection method, vehicle-mounted device and vehicle

By constructing a vehicle state machine and combining the angular velocity of the gyroscope with other vehicle parameters, the problem of false alarms in lane change detection in traditional methods is solved, enabling accurate identification of vehicle lane change trends in curves and improving detection accuracy.

CN121268869BActive Publication Date: 2026-07-21XIAMEN AUTOSTAR ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAMEN AUTOSTAR ELECTRONICS CO LTD
Filing Date
2025-10-16
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Traditional gyroscope-based vehicle lane change detection methods are prone to false alarms during the vehicle's return-to-center process after a lane change, leading to inaccurate judgments.

Method used

By constructing a vehicle state machine, the gyroscope is used to collect the vehicle's angular velocity and speed in real time. Combined with the vehicle's horizontal displacement and body angle, the vehicle state machine is constructed, including straight driving state, lane change judgment state, lane change state, turning state, and straightening state. The transition between these states is used to accurately determine the vehicle's lane change trend, and the gyroscope's angular velocity is corrected in curves to eliminate the influence of the curve itself.

Benefits of technology

It improves the accuracy of vehicle lane change detection, can correctly identify lane change situations in curves, reduces false alarms, and enhances the precision of vehicle lane change detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121268869B_ABST
    Figure CN121268869B_ABST
Patent Text Reader

Abstract

The application provides a vehicle lane change detection method based on a gyroscope, a vehicle-mounted device and a vehicle. The method constructs a vehicle state machine by collecting parameters such as a driving speed, an angular speed and a horizontal displacement of the vehicle which can be calculated according to the driving speed and the angular speed, and gives a state transition table of the vehicle state machine based on fitting of a conventional road behavior model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle lane change detection, and in particular to a gyroscope-based vehicle lane change detection method, vehicle-mounted device, and vehicle. Background Technology

[0002] Currently, traditional gyroscope-based lane change detection is relatively simple, generally only checking if the vehicle is turning left or right. This simplistic approach can lead to false alarms when the vehicle returns to center after a lane change. Summary of the Invention

[0003] The embodiments of the present invention provide a gyroscope-based vehicle lane change detection method, an on-board device, and a vehicle to improve the accuracy of judging vehicle lane change trends.

[0004] To achieve the above objectives, on the one hand, a gyroscope-based vehicle lane change detection method is provided. This method constructs a vehicle state machine based on the vehicle's speed and angular velocity. The vehicle states in the state machine include at least: a straight-ahead state, a lane change judgment state, a lane change state, a turning state, and a straightening state; including:

[0005] The vehicle's angular velocity is collected in real time using a gyroscope;

[0006] When a vehicle is traveling straight, if its current average angular velocity is greater than or equal to a first angular velocity threshold, the vehicle is determined to begin turning, exiting the straight-traffic state and entering a lane-change judgment state, where lane-change judgment begins. The current average angular velocity is the average of angular velocities over a predetermined time period prior to the current moment. The first angular velocity threshold ranges from [0, 4], with units of radians per second. The lane-change judgment includes: when the time it takes for the vehicle to exit the straight-traffic state is less than or equal to a predetermined first time period threshold and the vehicle's horizontal displacement is greater than or equal to a predetermined first displacement threshold, the vehicle is judged to be changing lanes, exiting the lane-change judgment state and entering the lane-change state. The first time period threshold ranges from [1, 10], with units of seconds. The first displacement threshold ranges from [1, 10], with units of seconds. Where, d r The road width is defined as follows: when the duration of the vehicle exiting the straight-going state is greater than the first duration threshold and the horizontal displacement of the vehicle is less than the first displacement threshold, it is determined that the vehicle is still going straight, and the vehicle exits the lane change judgment state and returns to the straight-going state.

[0007] When the vehicle is in a lane-changing state, the system continuously calculates the vehicle's current average angular velocity and horizontal displacement, and determines the change in the vehicle's state based on these values. Specifically: when the vehicle's horizontal displacement is greater than a predetermined second displacement threshold and the vehicle's current average angular velocity is greater than or equal to the first angular velocity threshold, the system determines that the vehicle is turning, causing the vehicle to exit the lane-changing state and enter the turning state. The range of the second displacement threshold is... When the direction of the vehicle's angular velocity changes to the opposite direction, it is determined that the vehicle is returning to center, and the vehicle exits the lane-changing state and enters the centering state; when the vehicle's horizontal displacement is greater than a predetermined second displacement threshold and the vehicle's current average angular velocity is less than the first angular velocity threshold, it is determined that the lane-changing is over and the vehicle returns to straight driving, and the vehicle exits the lane-changing state and enters the straight driving state.

[0008] Preferably, the vehicle lane change detection method further includes: when the vehicle is in a straightening state, continuously calculating the vehicle's current average angular velocity, horizontal displacement, and body angle, and judging the change in vehicle state based on the vehicle's current average angular velocity, horizontal displacement, and body angle; wherein:

[0009] When the vehicle’s current average angular velocity is greater than 0 dps, it is determined that the vehicle is still turning, and the vehicle exits the straightening state and enters the lane changing state.

[0010] When the vehicle body angle is less than the predetermined vehicle body angle threshold, it is determined that the vehicle body has returned to straight, the lane change ends, and the vehicle exits the straightening state and enters the straight driving state; the value range of the vehicle body angle threshold is [0, 5] degrees.

[0011] When the horizontal displacement of the vehicle is greater than the second displacement threshold and the current average angular velocity of the vehicle is less than the first angular velocity threshold, it is determined that the lane change has ended, and the vehicle exits the straight-ahead state and enters the straight-ahead state.

[0012] Preferably, in the vehicle lane change detection method, the vehicle state machine further includes: a turning state; after collecting the angular velocity for a predetermined duration, calculating the turning radius of the vehicle within that predetermined duration based on the collected angular velocity; turning radius = vehicle speed / vehicle angular velocity; when the turning radius is within the range of [20, 60] meters, determining that the vehicle is in a turning state; the method further includes:

[0013] When the vehicle is turning, the system continuously calculates the vehicle's current average angular velocity and turning radius, and determines the changes in the vehicle's state based on these parameters; where:

[0014] When the vehicle’s current average angular velocity is less than the first angular velocity threshold, it is determined that the vehicle should return to straight driving, so that the vehicle exits the turning state and enters the straight driving state.

[0015] When the turning radius of the vehicle is less than 60m, the vehicle is judged to be entering a turning state, and the vehicle is made to exit the turning state and enter the turning state.

[0016] When the change in angular velocity of the vehicle within a predetermined time window is less than a predetermined threshold for angular velocity change, it is determined that the vehicle is currently traveling straight in a curve. The gyroscope is corrected by removing the angular velocity added by the curve itself, so that the vehicle exits the turning state and enters the straight-going state.

[0017] Preferably, the vehicle lane change detection method further includes the following when the vehicle is traveling straight:

[0018] The average angular velocity, calculated from the continuously collected angular velocities, is used to correct the gyroscope's values.

[0019] Preferably, in the vehicle lane change detection method, the vehicle state machine further includes: a U-turn state; when the turning radius is less than 20 meters, the vehicle is determined to be in a U-turn state; the method further includes:

[0020] When the vehicle is turning, the system continuously calculates the vehicle's current average angular velocity and turning radius, and determines the change in the vehicle's state based on the changes in the average angular velocity and the turning radius; where:

[0021] When the turning radius of the vehicle is greater than 60m within 2 seconds, the vehicle exits the steering state and enters the turning state.

[0022] When the turning radius of the vehicle is less than 20m within 2 seconds, the vehicle exits the turning state and enters the U-turn state.

[0023] Preferably, the vehicle lane change detection method further includes:

[0024] When a vehicle is making a U-turn, if the turning radius of the vehicle is greater than 20m within 2 seconds, it will exit the U-turn state and return to the steering state.

[0025] Preferably, in the vehicle lane change detection method, the vehicle state machine further includes: a stationary state; when the vehicle is stationary, continuously detecting the vehicle's speed; if the vehicle's speed is not 0, then causing the vehicle to exit the stationary state and enter the straight-ahead state; when the vehicle is in the straight-ahead state, continuously detecting the vehicle's speed; if the vehicle's speed becomes 0, then causing the vehicle to exit the straight-ahead state and enter the stationary state.

[0026] On the other hand, an in-vehicle device is also provided, including a memory and a processor, the memory storing at least one program, the at least one program being executed by the processor to implement the steps of the gyroscope-based vehicle lane change detection method as described above.

[0027] In another aspect, a computer program product is also provided, comprising a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of the gyroscope-based vehicle lane change detection method as described above.

[0028] On the other hand, a vehicle is also provided, which includes the vehicle-mounted device as described above.

[0029] The above technical solution has the following technical effects:

[0030] The technical solution of this invention constructs a vehicle state machine by collecting parameters such as the vehicle's driving speed, angular velocity, and horizontal displacement that can be calculated based on the driving speed and angular velocity. Based on the fitting of a conventional road behavior model, a state transition table for the vehicle state machine is provided. In contrast to existing traditional methods, this approach can more accurately determine the vehicle's lane-changing trend.

[0031] In a further embodiment, when the vehicle is turning, it is determined whether the vehicle is currently traveling straight in the curve by judging whether the change in angular velocity of the vehicle within a predetermined time window is less than a predetermined threshold for angular velocity change; and when it is determined that the vehicle is traveling straight in the curve, the gyroscope is corrected to remove the angular velocity added by the curve itself, so that the vehicle exits the turning state and enters the straight state, which can correctly identify whether the vehicle has changed lanes in the curve; thus solving the problem that existing traditional methods cannot effectively monitor lane change situations in curves. Attached Figure Description

[0032] Figure 1 This is a schematic flowchart of a gyroscope-based vehicle lane change detection method according to an embodiment of the present invention.

[0033] Figure 2 This is a schematic diagram of the structure of a vehicle-mounted device according to an embodiment of the present invention. Detailed Implementation

[0034] To further illustrate the various embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention, primarily used to illustrate the embodiments and to explain the operating principles of the embodiments in conjunction with the relevant descriptions in the specification. With reference to these drawings, those skilled in the art should be able to understand other possible implementations and the advantages of the present invention. Components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.

[0035] During their research on gyroscope-based lane change detection, the inventors of this application discovered during road testing that the fundamental reason for misjudgments in existing lane change detection methods lies in insufficient acquisition of road information. In the absence of directly obtainable real-time road information, to address the problem of misjudgments caused by insufficient information, this invention uses historical data from a predetermined time period prior to the current moment to determine the current vehicle behavior, thereby identifying which lane change action the vehicle is currently performing and recognizing lane change actions on curves.

[0036] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.

[0037] Example 1:

[0038] Figure 1 This is a flowchart illustrating a gyroscope-based vehicle lane change detection method according to an embodiment of the present invention. The gyroscope-based vehicle lane change detection method of this embodiment is characterized by constructing a vehicle state machine based on the vehicle's speed and angular velocity. The vehicle states in the vehicle state machine include at least: straight-ahead state, lane change judgment state, lane change state, turning state, and straightening state. Figure 1 The gyroscope-based vehicle lane change detection method of this embodiment includes:

[0039] The vehicle's angular velocity is collected in real time using a gyroscope;

[0040] When the vehicle is traveling straight, if the vehicle's current average angular velocity is greater than or equal to a first angular velocity threshold, the vehicle is determined to begin turning, exiting the straight-traffic state and entering a lane-change judgment state, whereby the lane-change judgment process begins. The current average angular velocity is the average of the angular velocities over a predetermined time period prior to the current moment. The first angular velocity threshold ranges from [0, 4], with units of radians per second. Preferably, the first angular velocity threshold is 1 radian / second. The lane-change judgment process includes:

[0041] When the time it takes for a vehicle to exit the straight-ahead state is less than or equal to a predetermined first time threshold and the horizontal displacement of the vehicle is greater than or equal to a predetermined first displacement threshold, it is determined that the vehicle is changing lanes, causing the vehicle to exit the lane-changing judgment state and enter the lane-changing state; the first time threshold ranges from [1, 10], in seconds; preferably, the first time threshold is 7 seconds; the first displacement threshold ranges from... Where, d r For road width; in one specific implementation, d r The value is 3.5m, and the first displacement threshold is set to...

[0042] When the duration of the vehicle exiting the straight-going state is greater than the first duration threshold and the horizontal displacement of the vehicle is less than the first displacement threshold, it is determined that the vehicle is still going straight, and the vehicle exits the lane change judgment state and returns to the straight-going state.

[0043] When the vehicle is changing lanes, its current average angular velocity and horizontal displacement are continuously calculated, and the changes in the vehicle's state are determined based on these values; where:

[0044] When the vehicle's horizontal displacement exceeds a predetermined second displacement threshold and the vehicle's current average angular velocity is greater than or equal to a first angular velocity threshold, the vehicle is determined to be turning, and it exits the lane-changing state and enters the turning state; the range of the second displacement threshold is... In one specific implementation, d r The value is 3.5m, and the second displacement threshold is set to...

[0045] When the direction of the vehicle's angular velocity changes to the opposite direction, it is determined that the vehicle is returning to center, causing the vehicle to exit the lane-changing state and enter the centering state.

[0046] When the horizontal displacement of the vehicle is greater than the predetermined second displacement threshold and the current average angular velocity of the vehicle is less than the first angular velocity threshold, it is determined that the lane change has ended and the vehicle returns to straight driving, causing the vehicle to exit the lane change state and enter the straight driving state.

[0047] Preferably, the method of this embodiment further includes: when the vehicle is in a straightening state, continuously calculating the vehicle's current average angular velocity, horizontal displacement, and body angle, and determining the change in the vehicle's state based on the vehicle's current average angular velocity, horizontal displacement, and body angle; wherein:

[0048] When the vehicle’s current average angular velocity is greater than 0 dps, it is determined that the vehicle is still turning, and the vehicle exits the straightening state and enters the lane changing state.

[0049] When the vehicle body angle is less than the predetermined vehicle body angle threshold, it is determined that the vehicle body has returned to straight, the lane change ends, and the vehicle exits the straightening state and enters the straight-going state; the value range of the vehicle body angle threshold is [0, 5] degrees; preferably, the vehicle body angle threshold is 3 degrees.

[0050] When the vehicle's horizontal displacement is greater than the second displacement threshold and the vehicle's current average angular velocity is less than the first angular velocity threshold, the lane change is determined to be complete, and the vehicle exits the straight-ahead state and enters the straight-ahead state.

[0051] Preferably, the vehicle state machine further includes: a turning state; after collecting the angular velocity for a predetermined duration, calculating the turning radius of the vehicle within that predetermined duration based on the collected angular velocity; turning radius = vehicle speed / vehicle angular velocity; when the turning radius is within the range of [20, 60] meters, determining that the vehicle is in a turning state; the method further includes:

[0052] When the vehicle is turning, the system continuously calculates the vehicle's current average angular velocity and turning radius, and determines the changes in the vehicle's state based on these parameters; where:

[0053] When the vehicle’s current average angular velocity is less than the first angular velocity threshold, it is determined that the vehicle should return to straight driving, so that the vehicle exits the turning state and enters the straight driving state.

[0054] When the turning radius of the vehicle is less than 60m, the vehicle is judged to be entering a turning state, and the vehicle is made to exit the turning state and enter the turning state.

[0055] When the change in angular velocity of the vehicle within a predetermined time window is less than a predetermined threshold for angular velocity change, it is determined that the vehicle is currently traveling straight in a curve. The gyroscope is corrected by removing the angular velocity added by the curve itself, so that the vehicle exits the turning state and enters the straight-going state.

[0056] Preferably, the vehicle lane change detection method further includes the following when the vehicle is traveling straight:

[0057] The average angular velocity, calculated from the continuously collected angular velocities, is used to correct the gyroscope's values.

[0058] Preferably, the vehicle lane change detection method is characterized in that the vehicle state machine further includes: a U-turn state; when the turning radius is less than 20 meters, the vehicle is determined to be in a U-turn state; the method further includes:

[0059] When the vehicle is turning, the system continuously calculates the vehicle's current average angular velocity and turning radius, and determines the change in the vehicle's state based on the changes in the average angular velocity and the turning radius; where:

[0060] When the turning radius of the vehicle is greater than 60m within 2 seconds, the vehicle exits the steering state and enters the turning state.

[0061] When the turning radius of the vehicle is less than 20m within 2 seconds, the vehicle exits the turning state and enters the U-turn state.

[0062] Preferably, the vehicle lane change detection method further includes:

[0063] When a vehicle is making a U-turn, if the turning radius of the vehicle is greater than 20m within 2 seconds, it will exit the U-turn state and return to the steering state.

[0064] Preferably, in the vehicle lane change detection method, the vehicle state machine further includes: a stationary state; when the vehicle is stationary, continuously detecting the vehicle's speed; if the vehicle's speed is not 0, then causing the vehicle to exit the stationary state and enter the straight-ahead state; when the vehicle is in the straight-ahead state, continuously detecting the vehicle's speed; if the vehicle's speed becomes 0, then causing the vehicle to exit the straight-ahead state and enter the stationary state.

[0065] Example 2:

[0066] This embodiment of the invention constructs a vehicle state machine by collecting the vehicle's driving speed (v) and angular velocity (ω), and combining them with the derived parameters such as the vehicle's turning radius (r), body angle (θ), and horizontal displacement (d), to determine the vehicle's current driving state.

[0067] Parameter definition

[0068] Vehicle speed (v): The speed at which a vehicle travels; in one specific implementation, the unit is km / h;

[0069] Angular velocity (ω): The angular velocity of the vehicle body rotation, measured in dps (radians per second). This value can be an instantaneous value or an average value over a period of time. In one specific implementation, the time window for calculating the average angular velocity value can be 0 to 4 seconds.

[0070] Angular velocity variation range (Δω): the difference between the maximum and minimum angular velocity within a time window, i.e., Δω = max(ω) - min(ω); in one specific implementation, the value range of this time window is 0 to 10 s;

[0071] Turning radius (r): The radius of the arc that the vehicle body travels when turning, in meters; when v is in meters per second and angular velocity is in radians per second, turning radius = v / ω; when v is in km / h and ω is in degrees per second, the formula for calculating the turning radius is: r = (v / 3.6) * (360 / ω / 2).

[0072] Turning time (t): The time the vehicle is in a turning state, in seconds; in one specific implementation, the timer starts from when the vehicle exits the straight-ahead state.

[0073] Vehicle body angle (θ): The angle of the vehicle body relative to the straight-line direction, measured in degrees (°).

[0074] Horizontal displacement (d): The lateral displacement of the vehicle, in meters (m). Calculation formula:

[0075] d=(cos(θ*π / 180)-cos((θ+ω*t)*π / 180))*r;

[0076] Lane width (dr): In one specific implementation, preferably, it is 3.5m;

[0077] Explanation of the principle of the method in the embodiments of the present invention

[0078] Lane changes are detected by analyzing the vehicle's average angular velocity: angular velocity data is collected over a specific time period; if the average angular velocity is below a certain value, the vehicle is determined to be going straight; otherwise, a lane change is considered. When a vehicle is in a curve, angular velocity correction is required because the curve itself adds to the angular velocity. This angular velocity needs to be removed to accurately identify whether a vehicle is changing lanes in a curve. This requires collecting angular velocity data over a specific time period to calculate the additional angular velocity value added by the curve itself.

[0079] The lane-changing process involves three stages: steering, cutting in, and straightening. The stage of the lane change is determined by parameters such as vehicle horizontal displacement, angular velocity, and vehicle angle. Entering lane-changing mode requires meeting initial angular velocity change conditions, and within a certain time, satisfying conditions related to vehicle horizontal displacement, angular velocity, and vehicle angle. Changes in angular velocity determine whether the vehicle has begun to steer, horizontal displacement determines the vehicle's current position within the lane, and finally, vehicle angle determines whether the vehicle has straightened.

[0080] Vehicle turning and U-turns are identified by determining the vehicle's turning radius: angular velocity data is collected over a certain period of time. When 20m ≤ r ≤ 60m, the vehicle is determined to be turning; when r < 20m, the vehicle is determined to be making a U-turn.

[0081] In the method of this embodiment of the invention, the constructed vehicle state machine includes 7 states, S0-S7, and the definitions of each state are as follows:

[0082] S0 is at rest.

[0083] Initial default state;

[0084] Exit condition: Vehicle speed ≠ 0 → Enter S1.

[0085] S1 Straight-through state

[0086] Continuously collect angular velocities and perform averaging corrections;

[0087] Exit conditions:

[0088] Vehicle speed = 0 → Enter S0.

[0089] When |ω|>=1dps, enter S2. This value can range from 0 to 4dps.

[0090] S2 Lane Change Detection

[0091] Calculate d, θ, and t;

[0092] Exit condition:

[0093] If t ≤ 7s and d ≥ dr / 7 → Enter S3; The value can range from 0 to 1 / 2*dr. t is the turning time; d is the horizontal displacement;

[0094] If t > 7s and d < dr / 7 → Return to S1. dr is the lane width;

[0095] S3 Lane-changing state

[0096] Taking a right turn as an example, the direction of the right turn is positive, and d, θ, and t are continuously calculated;

[0097] Exit condition:

[0098] If d > dr*(8 / 7) and ω ≥ 1dps → Enter S5; The value can range from 1+(0 to 1 / 2)*dr.

[0099] If ω < 0dps → Enter S4;

[0100] If d > dr*(8 / 7) and |ω| < 1dps → Return to S1.

[0101] S4 Straightening state

[0102] Continuously calculate d, θ, and t;

[0103] Exit condition:

[0104] If ω > 0dps → Enter S3;

[0105] If |θ| < 3° → Return to S1. The value can range from 0 to 5°.

[0106] If d > dr*8 / 7 and |ω| < 1dps → Return to S1.

[0107] S5 Turning state (small turning), in a specific implementation, the small turning has a turning radius greater than 60m;

[0108] Exit condition:

[0109] |ω| < 1dps → Return to S1;

[0110] r < 60m → Enter S6;

[0111] Δω < ±1dps → Return to S1 and correct the gyroscope. In a specific implementation, the absolute value of this Δω can range from 1 to 5.

[0112] S6 Steering state, steering means turning left or right at an intersection;

[0113] [[ID=6४]]Exit condition:

[0114] r>60m→Enter S5;

[0115] r<20m→Enter S7.

[0116] S7 turning around

[0117] Exit conditions:

[0118] r>20m→Return to S6.

[0119] The specific state machine transition table is shown in Table 1 below:

[0120] Table 1 State Machine Transition Table

[0121]

[0122]

[0123] The implementation of this invention is based on fitting a conventional road behavior model, which can cover most common scenarios as much as possible, but still cannot completely cover all possible special situations; therefore, this invention aims to provide an auxiliary judgment mechanism, rather than completely replacing the judgment of human drivers. By combining vehicle angular velocity data and intelligent algorithms, the system can achieve preliminary identification of vehicle lane-changing trends and trigger a warning function when potential dangers are detected, thereby providing auxiliary decision support for drivers and improving driving safety.

[0124] Example 3:

[0125] The present invention also provides a vehicle-mounted device, such as Figure 2 As shown, the device includes a processor 201, a memory 202, a bus 203, and a computer program stored in the memory 202 and executable on the processor 201. The processor 201 includes one or more processing cores. The memory 202 is connected to the processor 201 via the bus 203. The memory 202 is used to store program instructions. When the processor executes the computer program, it implements the steps in the above-described method embodiment of Embodiment 1 of the present invention.

[0126] Furthermore, as an executable solution, the device can be a computer unit, which may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer unit may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above-described structure of the computer unit is merely an example and does not constitute a limitation on the computer unit. It may include more or fewer components, or combine certain components, or use different components. For example, the computer unit may also include input / output devices, network access devices, buses, etc., and this embodiment of the invention does not limit this.

[0127] Furthermore, as an executable solution, the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The processor is the control center of the computer unit, connecting various parts of the entire computer unit via various interfaces and lines.

[0128] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the computer unit by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0129] Example 4:

[0130] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps described above.

[0131] Example 5:

[0132] The present invention also provides a vehicle that includes the vehicle-mounted device described above.

[0133] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.

Claims

1. A vehicle lane change detection method based on a gyroscope, characterized in that, A vehicle state machine is constructed based on the vehicle's speed and angular velocity. The vehicle states in the state machine include at least: straight-ahead state, lane change judgment state, lane change state, turning state, and straightening state; including: The vehicle's angular velocity is collected in real time using a gyroscope; When a vehicle is traveling straight, if its current average angular velocity is greater than or equal to a first angular velocity threshold, the vehicle is determined to begin turning, exiting the straight-traffic state and entering a lane-change judgment state, whereby lane-change judgment begins. The current average angular velocity is the average of the angular velocities over a predetermined time period prior to the current moment. The first angular velocity threshold ranges from [0, 4], with units of radians per second. The lane-change judgment includes: When the time it takes for a vehicle to exit the straight-ahead state is less than or equal to a predetermined first time threshold and the horizontal displacement of the vehicle is greater than or equal to a predetermined first displacement threshold, the vehicle is determined to be changing lanes, and the vehicle exits the lane-changing judgment state and enters the lane-changing state; the value range of the first time threshold is [1, 10], and the unit is seconds; the value range of the first displacement threshold is... Where, d r Road width; When the duration of the vehicle exiting the straight-going state is greater than the first duration threshold and the horizontal displacement of the vehicle is less than the first displacement threshold, it is determined that the vehicle is still going straight, and the vehicle exits the lane change judgment state and returns to the straight-going state. When the vehicle is changing lanes, its current average angular velocity and horizontal displacement are continuously calculated, and the changes in the vehicle's state are determined based on these values; where: When the vehicle's horizontal displacement exceeds a predetermined second displacement threshold and the vehicle's current average angular velocity is greater than or equal to the first angular velocity threshold, it is determined that the vehicle is turning, causing the vehicle to exit the lane-changing state and enter the turning state; the range of the second displacement threshold is... When the direction of the vehicle's angular velocity changes to the opposite direction, it is determined that the vehicle is returning to center, causing the vehicle to exit the lane-changing state and enter the centering state. When the horizontal displacement of the vehicle is greater than the predetermined second displacement threshold and the current average angular velocity of the vehicle is less than the first angular velocity threshold, it is determined that the lane change has ended and the vehicle returns to straight driving, causing the vehicle to exit the lane change state and enter the straight driving state.

2. The vehicle lane change detection method according to claim 1, characterized in that, Also includes: When the vehicle is in the straightening state, the system continuously calculates the vehicle's current average angular velocity, horizontal displacement, and body angle, and determines the changes in the vehicle's state based on these parameters; where: When the vehicle’s current average angular velocity is greater than 0 dps, it is determined that the vehicle is still turning, and the vehicle exits the straightening state and enters the lane changing state. When the vehicle body angle is less than the predetermined vehicle body angle threshold, it is determined that the vehicle body has returned to straight, the lane change ends, and the vehicle exits the straightening state and enters the straight driving state; the value range of the vehicle body angle threshold is [0, 5] degrees. When the horizontal displacement of the vehicle is greater than the second displacement threshold and the current average angular velocity of the vehicle is less than the first angular velocity threshold, it is determined that the lane change has ended, and the vehicle exits the straight-ahead state and enters the straight-ahead state.

3. The vehicle lane change detection method according to claim 1, characterized in that, The vehicle state machine further includes: a turning state; after collecting the angular velocity for a predetermined duration, calculating the turning radius of the vehicle within that predetermined duration based on the collected angular velocity; turning radius = vehicle speed / vehicle angular velocity; when the turning radius is within the range of [20, 60] meters, it is determined that the vehicle is in a turning state; the method further includes: When the vehicle is turning, the system continuously calculates the vehicle's current average angular velocity and turning radius, and determines the changes in the vehicle's state based on these parameters; where: When the vehicle’s current average angular velocity is less than the first angular velocity threshold, it is determined that the vehicle should return to straight driving, so that the vehicle exits the turning state and enters the straight driving state. When the turning radius of the vehicle is less than 60m, the vehicle is judged to be entering a turning state, and the vehicle is made to exit the turning state and enter the turning state. When the change in angular velocity of the vehicle within a predetermined time window is less than a predetermined threshold for angular velocity change, it is determined that the vehicle is currently traveling straight in a curve. The gyroscope is corrected by removing the angular velocity added by the curve itself, so that the vehicle exits the turning state and enters the straight-going state.

4. The vehicle lane change detection method according to claim 1, characterized in that, When the vehicle is traveling straight, this also includes: The average angular velocity, calculated from the continuously collected angular velocities, is used to correct the gyroscope's values.

5. The vehicle lane change detection method according to claim 3, characterized in that, The vehicle state machine further includes: a U-turn state; when the turning radius is less than 20 meters, the vehicle is determined to be in a U-turn state; the method further includes: When the vehicle is turning, the system continuously calculates the vehicle's current average angular velocity and turning radius, and determines the change in the vehicle's state based on the changes in the average angular velocity and the turning radius; where: When the turning radius of the vehicle is greater than 60m within 2 seconds, the vehicle exits the steering state and enters the turning state. When the turning radius of the vehicle is less than 20m within 2 seconds, the vehicle exits the turning state and enters the U-turn state.

6. The vehicle lane change detection method according to claim 5, characterized in that, Also includes: When a vehicle is making a U-turn, if the turning radius of the vehicle is greater than 20m within 2 seconds, it will exit the U-turn state and return to the steering state.

7. The vehicle lane change detection method according to claim 1, characterized in that, The vehicle state machine also includes: a stationary state; when the vehicle is stationary, the vehicle's speed is continuously monitored; if the vehicle's speed is not 0, the vehicle exits the stationary state and enters the straight-moving state; when the vehicle is in the straight-moving state, the vehicle's speed is continuously monitored; if the vehicle's speed becomes 0, the vehicle exits the straight-moving state and enters the stationary state.

8. A vehicle-mounted device, characterized in that, The system includes a memory and a processor, the memory storing at least one program, which is executed by the processor to implement the steps of the gyroscope-based vehicle lane change detection method as described in any one of claims 1 to 7.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the gyroscope-based vehicle lane change detection method as described in any one of claims 1 to 7.

10. A vehicle, characterized in that, It includes the vehicle-mounted device as described in claim 8.