Vehicle state identification method, device and equipment based on triaxial accelerometer and medium
By using single-point static calibration of the triaxial accelerometer and vehicle signal fusion, the problem of high false trigger rate of G-sensor is solved, achieving low-cost and high-reliability vehicle status recognition, which is suitable for economy vehicles and low-cost in-vehicle equipment.
Patent Information
- Application Number
- CN202511835307.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-01-23
AI Technical Summary
In the existing technology, low-cost triaxial accelerometers (G-sensors) have a high false trigger rate in vehicle state recognition, making it difficult to meet the high reliability requirements. In addition, high-cost inertial measurement units (IMUs) have high hardware costs, making them difficult to widely use in economy passenger cars and low-cost in-vehicle equipment.
Single-point static calibration is performed using a three-axis accelerometer to calculate the initial attitude angle. The attitude deviation value is calculated by combining real-time acceleration data and vehicle status signals, including vehicle speed and power mode signals, to reduce the false trigger rate.
It achieves reliable and accurate identification of vehicle status at extremely low cost, significantly reduces false triggering rate, is suitable for economy vehicles and low-cost aftermarket, simplifies calibration operations, and reduces hardware costs and computing power requirements.
Smart Images

Figure CN121375803A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive electronics technology, specifically to a vehicle status recognition method, device, electronic device, and storage medium based on a triaxial accelerometer. Background Technology
[0002] Vehicle status recognition (VSR) is one of the key functions of automotive electronic systems. Its core requirement is to determine in real time whether the vehicle is in a normal driving, tilting, rolling or collision state, etc., so as to provide a basis for subsequent safety control (such as airbag triggering), abnormal warning (such as anti-theft tilt alarm) and data statistics (such as driving behavior analysis).
[0003] Currently, the mainstream solution for achieving high-precision vehicle status recognition in the industry relies on inertial measurement units (IMUs). IMUs typically integrate a three-axis accelerometer and a three-axis gyroscope, enabling them to simultaneously acquire acceleration and angular velocity data. Through data fusion algorithms, they calculate vehicle attitude, effectively counteracting motion interference and achieving high recognition accuracy. However, IMU hardware is expensive (typically 5-10 times the cost of a three-axis accelerometer) and requires significant computing power from the accompanying microprocessor unit (MCU), making it difficult to widely apply in economy passenger cars, commercial vehicles, or low-cost aftermarket vehicle-mounted devices (such as simple anti-theft devices).
[0004] To reduce costs, some solutions attempt to achieve vehicle status recognition using only low-cost triaxial accelerometers (G-sensors). However, the inherent limitations of G-sensors restrict their reliability: G-sensors measure the vector sum of all accelerations experienced by the vehicle, including both gravitational acceleration components used to determine attitude and linear acceleration components (such as acceleration and braking) and centrifugal acceleration components (such as turning) generated by vehicle motion. During vehicle movement, motion acceleration components severely interfere with the extraction of gravitational acceleration components, leading to significant deviations in attitude calculations based on G-sensors, and consequently, false triggering. For example, sudden braking is easily misjudged as forward tilting, and turning is easily misjudged as side tilting, with a false triggering rate exceeding 30%, failing to meet practical application requirements.
[0005] Therefore, there is an urgent need in this field for a vehicle status recognition solution that can maintain low cost while achieving high reliability. Summary of the Invention
[0006] The purpose of this application is to provide a vehicle status recognition method, device, electronic device and storage medium based on a three-axis accelerometer, which can achieve reliable and accurate recognition of vehicle status at extremely low cost and significantly reduce the false trigger rate.
[0007] In a first aspect, embodiments of this application provide a vehicle status recognition method based on a three-axis accelerometer, including:
[0008] S1. During the calibration phase, the vehicle is placed on an absolutely horizontal plane, and the triaxial accelerometer is controlled to collect the initial acceleration data at this time. Based on the initial acceleration data, the initial attitude angle θ1, which represents the horizontal stationary state of the vehicle, is calculated and stored. The initial attitude angle is the inverse cosine value of the angle between the gravitational acceleration vector and the vehicle's Z-axis in the initial state.
[0009] S2. During the data acquisition phase, the three-axis accelerometer is controlled to collect real-time three-axis acceleration data of the vehicle during vehicle operation. Based on the real-time three-axis acceleration data, the real-time attitude angle θ2, which represents the real-time state of the vehicle, is calculated. The real-time attitude angle is the inverse cosine value of the angle between the gravitational acceleration vector and the Z-axis of the vehicle under motion.
[0010] S3. Deviation value calculation stage: The attitude deviation value Δθ is calculated based on the initial attitude angle θ1 and the real-time attitude angle θ2. The attitude deviation value Δθ is the absolute value of the difference between the real-time attitude angle θ2 and the initial attitude angle θ1, that is, Δθ=|θ2 – θ1|, which is used to characterize the degree of deviation of the vehicle's current attitude from the horizontal reference.
[0011] S4. In the vehicle status recognition and decision-making stage, at least one set of attitude deviation thresholds is preset. The attitude deviation value Δθ is compared with the attitude deviation thresholds. At the same time, at least two vehicle status signals are obtained through the vehicle communication interface. Based on the comparison result of the attitude deviation value Δθ and the attitude deviation thresholds and the vehicle status signals, the current vehicle status is comprehensively judged.
[0012] In one possible implementation, the formula for calculating the attitude angle θ is:
[0013]
[0014] in, This represents the real-time acceleration value along the X-axis. This represents the real-time acceleration value along the Y-axis. This represents the real-time acceleration value along the Z-axis.
[0015] In one possible implementation, the method further includes:
[0016] After calculating the initial attitude angle θ1, verify whether the value of θ1 is within the preset range. If it exceeds the range, re-execute the calibration stage.
[0017] In one possible implementation, the vehicle communication interface is a CAN bus interface, which establishes bidirectional data communication with the vehicle's controller to acquire vehicle status signals in real time. The vehicle status signals include vehicle speed signals and vehicle power mode signals.
[0018] In one possible implementation, the attitude deviation threshold includes a first deviation threshold ΔA and a second deviation threshold ΔB;
[0019] The determination of the vehicle's current state based on the comparison between the attitude deviation value Δθ and the attitude deviation threshold, and the vehicle state signal, includes:
[0020] When the vehicle speed signal indicates a vehicle speed of 0, if Δθ≤ΔA, the vehicle is determined to be in a normal state; if ΔA<Δθ≤ΔB, the vehicle is determined to be in a tilted state; if Δθ>ΔB, the vehicle is determined to be in a rollover state.
[0021] When the vehicle speed signal indicates a vehicle speed greater than 0, the tilt and roll state recognition logic based on the attitude deviation value Δθ is paused.
[0022] In one possible implementation, the step of comprehensively determining the vehicle's current state based on the comparison result of the attitude deviation value Δθ and the attitude deviation threshold and the vehicle state signal further includes:
[0023] When the vehicle power mode signal indicates that the power is in the OFF or ACC position, the first deviation threshold ΔA and the second deviation threshold ΔB are lowered by a preset angle to activate the high-sensitivity anti-theft tilt / rollover monitoring.
[0024] In one possible implementation, the method further includes:
[0025] After determining that the vehicle is tilted or overturned, verify the duration of the attitude deviation value Δθ.
[0026] If the duration of Δθ exceeding the corresponding deviation threshold is greater than or equal to the preset duration, a tilt or flip status signal is output; if the duration is less than the preset duration, it is determined to be a momentary disturbance, and no status signal is output.
[0027] Secondly, embodiments of this application provide a vehicle status recognition device based on a triaxial accelerometer, comprising:
[0028] The calibration module is used to place the vehicle on an absolutely horizontal plane, control the triaxial accelerometer to collect the initial acceleration data at this time, calculate and store the initial attitude angle θ1 representing the horizontal stationary state of the vehicle based on the initial acceleration data, and the initial attitude angle is the inverse cosine value of the angle between the gravitational acceleration vector and the vehicle Z-axis in the initial state.
[0029] The data acquisition module is used to control the triaxial accelerometer to collect real-time triaxial acceleration data of the vehicle during vehicle operation, and to calculate the real-time attitude angle θ2, which represents the real-time state of the vehicle, based on the real-time triaxial acceleration data. The real-time attitude angle is the inverse cosine value of the angle between the gravitational acceleration vector and the vehicle's Z-axis under motion.
[0030] The deviation value calculation module is used to calculate the attitude deviation value Δθ based on the initial attitude angle θ1 and the real-time attitude angle θ2. The attitude deviation value Δθ is the absolute value of the difference between the real-time attitude angle θ2 and the initial attitude angle θ1, that is, Δθ=|θ2 – θ1|, which is used to characterize the degree of deviation of the vehicle's current attitude from the horizontal reference.
[0031] The vehicle status recognition and decision-making module is used to preset at least one set of attitude deviation thresholds, compare the attitude deviation value Δθ with the attitude deviation thresholds, and simultaneously acquire at least two types of vehicle status signals through the vehicle communication interface. Based on the comparison result of the attitude deviation value Δθ and the attitude deviation thresholds and the vehicle status signals, the module comprehensively determines the current status of the vehicle.
[0032] In one possible implementation, the formula for calculating the attitude angle θ is:
[0033]
[0034] in, This represents the real-time acceleration value along the X-axis. This represents the real-time acceleration value along the Y-axis. This represents the real-time acceleration value along the Z-axis.
[0035] In one possible implementation, the calibration module is further configured to:
[0036] After calculating the initial attitude angle θ1, verify whether the value of θ1 is within the preset range. If it exceeds the range, re-execute the calibration stage.
[0037] In one possible implementation, the vehicle communication interface is a CAN bus interface, which establishes bidirectional data communication with the vehicle's controller to acquire vehicle status signals in real time. The vehicle status signals include vehicle speed signals and vehicle power mode signals.
[0038] In one possible implementation, the attitude deviation threshold includes a first deviation threshold ΔA and a second deviation threshold ΔB;
[0039] The vehicle status recognition and decision-making module is specifically used for:
[0040] When the vehicle speed signal indicates a vehicle speed of 0, if Δθ≤ΔA, the vehicle is determined to be in a normal state; if ΔA<Δθ≤ΔB, the vehicle is determined to be in a tilted state; if Δθ>ΔB, the vehicle is determined to be in a rollover state.
[0041] When the vehicle speed signal indicates a vehicle speed greater than 0, the tilt and roll state recognition logic based on the attitude deviation value Δθ is paused.
[0042] In one possible implementation, the vehicle status recognition and decision-making module is further specifically used for:
[0043] When the vehicle power mode signal indicates that the power is in the OFF or ACC position, the first deviation threshold ΔA and the second deviation threshold ΔB are lowered by a preset angle to activate the high-sensitivity anti-theft tilt / rollover monitoring.
[0044] In one possible implementation, the vehicle status recognition and decision-making module is further used for:
[0045] After determining that the vehicle is tilted or overturned, verify the duration of the attitude deviation value Δθ.
[0046] If the duration of Δθ exceeding the corresponding deviation threshold is greater than or equal to the preset duration, a tilt or flip status signal is output; if the duration is less than the preset duration, it is determined to be a momentary disturbance, and no status signal is output.
[0047] Thirdly, this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method as described in the first aspect.
[0048] Fourthly, this application provides a computer-readable storage medium having computer-readable instructions stored thereon, which can be executed by a processor to implement the method described in the first aspect.
[0049] Compared to existing technologies, the vehicle state recognition method based on a triaxial accelerometer provided in this application has the following stages: In the calibration stage, the vehicle is placed on an absolutely horizontal plane, and the triaxial accelerometer is controlled to collect initial acceleration data. Based on this initial acceleration data, an initial attitude angle θ1 representing the vehicle's horizontal stationary state is calculated and stored. In the data acquisition stage, during vehicle operation, the triaxial accelerometer is controlled to collect real-time triaxial acceleration data of the vehicle. Based on this real-time triaxial acceleration data, a real-time attitude angle θ2 representing the vehicle's real-time state is calculated. In the deviation calculation stage, an attitude deviation value Δθ is calculated based on the initial attitude angle θ1 and the real-time attitude angle θ2. In the vehicle state recognition and decision-making stage, at least one set of attitude deviation thresholds is preset, and the attitude deviation value Δθ is compared with the attitude deviation thresholds. Simultaneously, at least two vehicle state signals are acquired through the vehicle communication interface. Based on the comparison result of the attitude deviation value Δθ and the attitude deviation thresholds and the vehicle state signals, the current state of the vehicle is comprehensively judged. Compared to existing technologies, this application, using a triaxial accelerometer, can achieve reliable and accurate vehicle state recognition at extremely low cost and significantly reduces the false trigger rate. Attached Figure Description
[0050] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0051] Figure 1 A flowchart of a vehicle status recognition method based on a triaxial accelerometer provided in an embodiment of this application is shown;
[0052] Figure 2 A schematic diagram of the attitude angle θ provided in an embodiment of this application is shown;
[0053] Figure 3 This illustration shows a schematic diagram of a vehicle status recognition device based on a triaxial accelerometer provided in an embodiment of this application;
[0054] Figure 4 A schematic diagram of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0055] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0056] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.
[0057] Furthermore, the terms "first" and "second," etc., are used to distinguish different objects, not to describe a specific order. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to those processes, methods, products, or apparatuses.
[0058] This application creatively utilizes a low-cost G-sensor, through simple single-point static calibration, precise spatial angle calculation algorithms, and intelligent enabling logic based on whole-vehicle signal fusion, to achieve recognition reliability comparable to high-end sensors at extremely low hardware costs.
[0059] Please refer to Figure 1 , Figure 1 This is a flowchart of a vehicle status recognition method based on a triaxial accelerometer provided in an embodiment of this application, including the following steps S101~S104:
[0060] S101, Calibration phase: Place the vehicle on an absolutely horizontal plane, control the triaxial accelerometer to collect the initial acceleration data at this time, calculate and store the initial attitude angle θ1 that represents the horizontal stationary state of the vehicle based on the initial acceleration data, the initial attitude angle is the inverse cosine value of the angle between the gravitational acceleration vector and the vehicle Z axis in the initial state;
[0061] This invention performs single-point calibration of a triaxial accelerometer on an absolutely horizontal surface. The data measured by the triaxial accelerometer includes the X-axis acceleration value, Y-axis acceleration value, and Z-axis acceleration value. Traditional IMUs or complex systems require multi-point, multi-attitude calibration. This application simplifies this process. The vehicle only needs to be parked on an absolutely horizontal surface (such as a water platform in a 4S shop or repair shop). After the system is powered on, a single calibration command is executed. The G-sensor reading (the components of gravitational acceleration on the three axes) at this point is defined as the "horizontal reference," and the initial calibration angle is calculated. This process greatly simplifies production and after-sales maintenance.
[0062] The formula for calculating the attitude angle θ is:
[0063]
[0064] in, This represents the real-time acceleration value along the X-axis. This represents the real-time acceleration value along the Y-axis. This represents the real-time acceleration value along the Z-axis. The formula has a clear physical meaning and requires minimal computation, making it ideal for operation on resource-constrained embedded MCUs. By monitoring the change in angle θ relative to the initial calibration angle, it is possible to accurately detect whether the vehicle is pitching forward, backward, rolling sideways, or overturning.
[0065] like Figure 2 As shown, the attitude angle θ represents the angle between the vehicle's Z-axis and the gravitational acceleration vector, and its change directly reflects the degree of vehicle pitch or roll.
[0066] In some embodiments, the above method further includes the step of: after calculating the initial attitude angle θ1, verifying whether the value of θ1 is within a preset range; if it exceeds the range, re-execute the calibration stage.
[0067] S102. During the data acquisition phase, the three-axis accelerometer is controlled to collect real-time three-axis acceleration data of the vehicle in real time during vehicle operation. Based on the real-time three-axis acceleration data, the real-time attitude angle θ2, which represents the real-time state of the vehicle, is calculated. The real-time attitude angle is the inverse cosine value of the angle between the gravitational acceleration vector and the Z-axis of the vehicle in motion.
[0068] S103, Deviation value calculation stage: The attitude deviation value Δθ is calculated based on the initial attitude angle θ1 and the real-time attitude angle θ2. The attitude deviation value Δθ is the absolute value of the difference between the real-time attitude angle θ2 and the initial attitude angle θ1, that is, Δθ=|θ2 – θ1|, which is used to characterize the degree of deviation of the current attitude of the vehicle from the horizontal reference.
[0069] S104, Vehicle Status Recognition and Decision-Making Stage: At least one set of attitude deviation thresholds is preset, the attitude deviation value Δθ is compared with the attitude deviation thresholds, and at least two vehicle status signals are obtained through the vehicle communication interface. Based on the comparison result of the attitude deviation value Δθ and the attitude deviation thresholds and the vehicle status signals, the current state of the vehicle is comprehensively judged.
[0070] Specifically, the vehicle communication interface is a CAN bus interface, which establishes bidirectional data communication with the vehicle's controller to acquire vehicle status signals in real time. These vehicle status signals include vehicle speed signals and vehicle power mode signals. This application integrates vehicle signals (such as vehicle speed and power mode) as enabling conditions, for example, tilt / rollover determination is only performed when the vehicle is stationary (vehicle speed = 0), effectively filtering out motion acceleration interference.
[0071] In some embodiments, the attitude deviation threshold includes a first deviation threshold ΔA and a second deviation threshold ΔB; for example, the first deviation threshold ΔA can be set to 60 degrees and the second deviation threshold ΔB can be set to 120 degrees.
[0072] In step S104 above, based on the comparison result of the attitude deviation value Δθ and the attitude deviation threshold and the vehicle status signal, the current state of the vehicle is comprehensively judged, which can achieve the following:
[0073] When the vehicle speed signal indicates a vehicle speed of 0, if Δθ≤ΔA, the vehicle is determined to be in a normal state; if ΔA<Δθ≤ΔB, the vehicle is determined to be in a tilted state; if Δθ>ΔB, the vehicle is determined to be in a rollover state.
[0074] When the vehicle speed signal indicates a vehicle speed greater than 0, the tilt and roll state recognition logic based on the attitude deviation value Δθ is paused.
[0075] This application introduces a vehicle speed signal, enabling tilt or rollover state recognition based on attitude angle θ only when the vehicle speed is zero, thereby eliminating the influence of linear and centrifugal acceleration generated by vehicle motion on G-sensor readings. A vehicle power mode signal is also introduced, activating the rollover monitoring function only in specific power modes (such as OFF or ACC, vehicle stationary / standby), reducing the risk of false alarms during normal vehicle operation.
[0076] In some embodiments, step S104 above, which involves comprehensively determining the current state of the vehicle based on the comparison result of the attitude deviation value Δθ and the attitude deviation threshold and the vehicle state signal, may further include:
[0077] When the vehicle power mode signal indicates that the power is in the OFF or ACC position, the first deviation threshold ΔA and the second deviation threshold ΔB are lowered by a preset angle to activate the high-sensitivity anti-theft tilt / rollover monitoring.
[0078] In some embodiments, the method provided in this application further includes the steps of: after determining that the vehicle is in a tilted or overturned state, verifying the duration of the attitude deviation value Δθ; if the duration of Δθ exceeding the corresponding deviation threshold is greater than or equal to a preset duration, outputting a tilted or overturned state signal; if the duration is less than the preset duration, it is determined to be a momentary disturbance and no state signal is output.
[0079] The vehicle status recognition method based on a triaxial accelerometer provided in this application has the following beneficial effects:
[0080] 1. Significant cost optimization: The use of a three-axis accelerometer (G-sensor) with a unit price of only a few yuan to replace the expensive inertial measurement unit (IMU) greatly reduces hardware costs, breaks through the cost barrier of traditional solutions, and adapts to the needs of economical vehicles and low-cost aftermarket.
[0081] 2. Reliable recognition and low false alarm rate: By integrating vehicle signals such as vehicle speed and power mode, the system intelligently selects the best judgment scenario (such as only activating tilt / rollover recognition when the vehicle is stationary), filtering out acceleration interference caused by vehicle movement from the source, significantly improving recognition reliability and effectively reducing the risk of false triggering.
[0082] 3. Simple and efficient algorithm: The core attitude angle calculation logic has a clear physical meaning and a small amount of computation. It has low performance requirements for the microprocessor unit (MCU), can be adapted to low-computing-power embedded chips, and is easy to integrate, develop and commercialize quickly.
[0083] 4. Convenient calibration operation: The single-point horizontal calibration scheme eliminates the need for complex multi-position calibration procedures, greatly simplifying the calibration process in production and assembly, while reducing the difficulty and time cost of after-sales maintenance.
[0084] In the above embodiments, a vehicle status recognition method based on a three-axis accelerometer is provided. Correspondingly, this application also provides a vehicle status recognition device based on a three-axis accelerometer. The vehicle status recognition device based on a three-axis accelerometer provided in this application can implement the above-described vehicle status recognition method based on a three-axis accelerometer. This vehicle status recognition device based on a three-axis accelerometer can be implemented through software, hardware, or a combination of both. For example, the vehicle status recognition device based on a three-axis accelerometer may include integrated or separate functional modules or units to perform the corresponding steps in the above methods. Please refer to... Figure 3 As shown, the vehicle status recognition device 10 based on a triaxial accelerometer of this application includes:
[0085] The calibration module 101 is used to place the vehicle on an absolutely horizontal plane, control the triaxial accelerometer to collect the initial acceleration data at this time, calculate and store the initial attitude angle θ1 representing the horizontal static state of the vehicle based on the initial acceleration data, and the initial attitude angle is the inverse cosine value of the angle between the gravitational acceleration vector and the vehicle Z-axis in the initial state.
[0086] The data acquisition module 102 is used to control the triaxial accelerometer to acquire real-time triaxial acceleration data of the vehicle during vehicle operation, and to calculate the real-time attitude angle θ2, which characterizes the real-time state of the vehicle, based on the real-time triaxial acceleration data. The real-time attitude angle is the inverse cosine value of the angle between the gravitational acceleration vector and the Z-axis of the vehicle under motion.
[0087] The deviation value calculation module 103 is used to calculate the attitude deviation value Δθ based on the initial attitude angle θ1 and the real-time attitude angle θ2. The attitude deviation value Δθ is the absolute value of the difference between the real-time attitude angle θ2 and the initial attitude angle θ1, that is, Δθ=|θ2 – θ1|, which is used to characterize the degree of deviation of the current attitude of the vehicle from the horizontal reference.
[0088] The vehicle status recognition and decision module 104 is used to preset at least one set of attitude deviation thresholds, compare the attitude deviation value Δθ with the attitude deviation thresholds, and at the same time acquire at least two kinds of vehicle status signals through the vehicle communication interface. Based on the comparison result of the attitude deviation value Δθ and the attitude deviation thresholds and the vehicle status signals, the current status of the vehicle is comprehensively determined.
[0089] In one possible implementation, the formula for calculating the attitude angle θ is:
[0090]
[0091] in, This represents the real-time acceleration value along the X-axis. This represents the real-time acceleration value along the Y-axis. This represents the real-time acceleration value along the Z-axis.
[0092] In one possible implementation, the calibration module 101 is further configured to:
[0093] After calculating the initial attitude angle θ1, verify whether the value of θ1 is within the preset range. If it exceeds the range, re-execute the calibration stage.
[0094] In one possible implementation, the vehicle communication interface is a CAN bus interface, which establishes bidirectional data communication with the vehicle's controller to acquire vehicle status signals in real time. The vehicle status signals include vehicle speed signals and vehicle power mode signals.
[0095] In one possible implementation, the attitude deviation threshold includes a first deviation threshold ΔA and a second deviation threshold ΔB;
[0096] The vehicle status recognition and decision-making module 104 is specifically used for:
[0097] When the vehicle speed signal indicates a vehicle speed of 0, if Δθ≤ΔA, the vehicle is determined to be in a normal state; if ΔA<Δθ≤ΔB, the vehicle is determined to be in a tilted state; if Δθ>ΔB, the vehicle is determined to be in a rollover state.
[0098] When the vehicle speed signal indicates a vehicle speed greater than 0, the tilt and roll state recognition logic based on the attitude deviation value Δθ is paused.
[0099] In one possible implementation, the vehicle status recognition and decision-making module 104 is further specifically used for:
[0100] When the vehicle power mode signal indicates that the power is in the OFF or ACC position, the first deviation threshold ΔA and the second deviation threshold ΔB are lowered by a preset angle to activate the high-sensitivity anti-theft tilt / rollover monitoring.
[0101] In one possible implementation, the vehicle status recognition and decision-making module 104 is further used for:
[0102] After determining that the vehicle is tilted or overturned, verify the duration of the attitude deviation value Δθ.
[0103] If the duration of Δθ exceeding the corresponding deviation threshold is greater than or equal to the preset duration, a tilt or flip status signal is output; if the duration is less than the preset duration, it is determined to be a momentary disturbance, and no status signal is output.
[0104] The vehicle status recognition device based on a three-axis accelerometer provided in this application embodiment and the vehicle status recognition method based on a three-axis accelerometer provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.
[0105] This application also provides an electronic device corresponding to the method provided in the foregoing embodiments. The electronic device may be an in-vehicle terminal or a terminal device such as a mobile phone, laptop, tablet computer, or desktop computer, to execute the above-described vehicle status recognition method based on a three-axis accelerometer.
[0106] Please refer to Figure 4 This illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 4 As shown, the electronic device 20 includes: a processor 200, a memory 201, a bus 202, and a communication interface 203. The processor 200, the communication interface 203, and the memory 201 are connected via the bus 202. The memory 201 stores a computer program that can run on the processor 200. When the processor 200 runs the computer program, it executes the vehicle status recognition method based on a triaxial accelerometer provided in any of the foregoing embodiments of this application.
[0107] The memory 201 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 203 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network.
[0108] Bus 202 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used to store programs. After receiving an execution instruction, the processor 200 executes the program. The vehicle status recognition method based on a triaxial accelerometer disclosed in any of the foregoing embodiments of this application can be applied to the processor 200, or implemented by the processor 200.
[0109] The processor 200 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 200 or by instructions in software form. The processor 200 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 201. The processor 200 reads the information in memory 201 and, in conjunction with its hardware, completes the steps of the above method.
[0110] The electronic device provided in this application embodiment and the vehicle status recognition method based on a three-axis accelerometer provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.
[0111] This application also provides a computer-readable storage medium corresponding to the vehicle status recognition method based on a triaxial accelerometer provided in the foregoing embodiments, wherein a computer program (i.e., a program product) is stored thereon. When the computer program is run by a processor, it executes the vehicle status recognition method based on a triaxial accelerometer provided in any of the foregoing embodiments.
[0112] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here.
[0113] The computer-readable storage medium provided in the above embodiments of this application and the vehicle status recognition method based on a triaxial accelerometer provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods used, run or implemented by the application stored therein.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application.
Claims
1. A vehicle status recognition method based on a triaxial accelerometer, characterized in that, include: S1. During the calibration phase, the vehicle is placed on an absolutely horizontal plane, and the triaxial accelerometer is controlled to collect the initial acceleration data at this time. Based on the initial acceleration data, the initial attitude angle θ1, which represents the horizontal stationary state of the vehicle, is calculated and stored. The initial attitude angle is the inverse cosine value of the angle between the gravitational acceleration vector and the vehicle's Z-axis in the initial state. S2. During the data acquisition phase, the three-axis accelerometer is controlled to collect real-time three-axis acceleration data of the vehicle during vehicle operation. Based on the real-time three-axis acceleration data, the real-time attitude angle θ2, which represents the real-time state of the vehicle, is calculated. The real-time attitude angle is the inverse cosine value of the angle between the gravitational acceleration vector and the Z-axis of the vehicle under motion. S3. Deviation value calculation stage: The attitude deviation value Δθ is calculated based on the initial attitude angle θ1 and the real-time attitude angle θ2. The attitude deviation value Δθ is the absolute value of the difference between the real-time attitude angle θ2 and the initial attitude angle θ1, that is, Δθ=|θ2 – θ1|, which is used to characterize the degree of deviation of the vehicle's current attitude from the horizontal reference. S4. In the vehicle status recognition and decision-making stage, at least one set of attitude deviation thresholds is preset. The attitude deviation value Δθ is compared with the attitude deviation thresholds. At the same time, at least two vehicle status signals are obtained through the vehicle communication interface. Based on the comparison result of the attitude deviation value Δθ and the attitude deviation thresholds and the vehicle status signals, the current vehicle status is comprehensively judged.
2. The method according to claim 1, characterized in that, The formula for calculating the attitude angle θ is: in, This represents the real-time acceleration value along the X-axis. This represents the real-time acceleration value along the Y-axis. This represents the real-time acceleration value along the Z-axis.
3. The method according to claim 1, characterized in that, The method further includes: After calculating the initial attitude angle θ1, verify whether the value of θ1 is within the preset range. If it exceeds the range, re-execute the calibration stage.
4. The method according to claim 1, characterized in that, The vehicle communication interface is a CAN bus interface. The CAN bus interface establishes bidirectional data communication with the vehicle's controller to acquire vehicle status signals in real time. The vehicle status signals include vehicle speed signals and vehicle power mode signals.
5. The method according to claim 1, characterized in that, The attitude deviation threshold includes a first deviation threshold ΔA and a second deviation threshold ΔB; The determination of the vehicle's current state based on the comparison between the attitude deviation value Δθ and the attitude deviation threshold, and the vehicle state signal, includes: When the vehicle speed signal indicates a vehicle speed of 0, if Δθ≤ΔA, the vehicle is determined to be in a normal state; if ΔA<Δθ≤ΔB, the vehicle is determined to be in a tilted state; if Δθ>ΔB, the vehicle is determined to be in a rollover state. When the vehicle speed signal indicates a vehicle speed greater than 0, the tilt and roll state recognition logic based on the attitude deviation value Δθ is paused.
6. The method according to claim 5, characterized in that, The method of comprehensively judging the current state of the vehicle based on the comparison result of the attitude deviation value Δθ and the attitude deviation threshold and the vehicle state signal also includes: When the vehicle power mode signal indicates that the power is in the OFF or ACC position, the first deviation threshold ΔA and the second deviation threshold ΔB are lowered by a preset angle to activate the high-sensitivity anti-theft tilt / rollover monitoring.
7. The method according to claim 5, characterized in that, The method further includes: After determining that the vehicle is tilted or overturned, verify the duration of the attitude deviation value Δθ. If the duration of Δθ exceeding the corresponding deviation threshold is greater than or equal to the preset duration, a tilt or flip status signal is output; if the duration is less than the preset duration, it is determined to be a momentary disturbance, and no status signal is output.
8. A vehicle status recognition device based on a triaxial accelerometer, characterized in that, include: The calibration module is used to place the vehicle on an absolutely horizontal plane, control the triaxial accelerometer to collect the initial acceleration data at this time, calculate and store the initial attitude angle θ1 representing the horizontal stationary state of the vehicle based on the initial acceleration data, and the initial attitude angle is the inverse cosine value of the angle between the gravitational acceleration vector and the vehicle Z-axis in the initial state. The data acquisition module is used to control the triaxial accelerometer to collect real-time triaxial acceleration data of the vehicle during vehicle operation, and to calculate the real-time attitude angle θ2, which represents the real-time state of the vehicle, based on the real-time triaxial acceleration data. The real-time attitude angle is the inverse cosine value of the angle between the gravitational acceleration vector and the vehicle's Z-axis under motion. The deviation value calculation module is used to calculate the attitude deviation value Δθ based on the initial attitude angle θ1 and the real-time attitude angle θ2. The attitude deviation value Δθ is the absolute value of the difference between the real-time attitude angle θ2 and the initial attitude angle θ1, that is, Δθ=|θ2 – θ1|, which is used to characterize the degree of deviation of the vehicle's current attitude from the horizontal reference. The vehicle status recognition and decision-making module is used to preset at least one set of attitude deviation thresholds, compare the attitude deviation value Δθ with the attitude deviation thresholds, and simultaneously acquire at least two types of vehicle status signals through the vehicle communication interface. Based on the comparison result of the attitude deviation value Δθ and the attitude deviation thresholds and the vehicle status signals, the module comprehensively determines the current status of the vehicle.
9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that can be executed by a processor to implement the method as described in any one of claims 1 to 7.
