A vehicle driving state detection method based on an IMU sensor and machine learning
By combining IMU sensors and machine learning algorithms with feature extraction and frequency domain analysis, the problems of high cost and environmental complexity in vehicle driving status recognition systems have been solved, achieving low-cost and accurate vehicle driving status recognition and accident detection.
Patent Information
- Application Number
- CN202211261029.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-14
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2042-10-14
AI Technical Summary
Existing vehicle driving status recognition systems are expensive, cannot perform post-event detection and analysis, and are difficult to accurately identify driving behavior in complex environments.
Vehicle attitude information is collected using IMU sensors, and vehicle status is identified through feature extraction and machine learning algorithms (such as XGboost). Time windows and frequency domain analysis are set, and judgment is made in combination with forklift speed and fork lifting information.
It enables low-cost and accurate identification of vehicle driving status, especially in complex environments, improving the accuracy and wide applicability of accident detection.
Smart Images

Figure CN115784093B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicle driving state recognition, and in particular to a vehicle driving state detection method based on an IMU sensor and machine learning. BACKGROUND
[0002] Vehicle driving state recognition refers to collecting data when a vehicle is running, processing the data through an algorithm, analyzing the current motion state of the vehicle, and achieving the purpose of real-time monitoring of the vehicle. Vehicle driving state recognition has always been a challenging problem in the field of vehicle driving and safety research.
[0003] In the daily operation of a forklift, it is difficult to accurately and in real time analyze and identify driving behavior information due to the complex and diverse working environment (inside a warehouse, open-air work, steep slopes, and bumpy roads) and different driving habits of drivers. There are mature driving assistance systems (ADAS) at home and abroad at present, but the cameras and sensors required by the system are expensive, and all applications are limited to high-end cars and high-end groups. Most products on the market similar to ADAS belong to pre-prevention, and measures are taken to prevent safety accidents before they occur, but this method requires a high cost and cannot be used for post-detection analysis. SUMMARY
[0004] This section aims to summarize some aspects of the embodiments of the present application and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of the specification to avoid obscuring the purpose of this section, abstract and title, and such simplifications or omissions cannot be used to limit the scope of the present application.
[0005] In view of the above problems of the existing vehicle driving state detection method based on an IMU sensor and machine learning, the present application is proposed.
[0006] Therefore, the purpose of the present application is to provide a vehicle driving state detection method based on an IMU sensor and machine learning, which analyzes the data at the time of the accident, extracts the accident information factor in the data, and deeply analyzes the causes to ensure that such safety accidents do not occur again.
[0007] To solve the above technical problems, the present application provides the following technical solution: a vehicle driving state detection method based on an IMU sensor and machine learning, comprising the following steps:
[0008] Step 1: Feature value extraction, specifically including the following modes:
[0009] (1) Correct the attitude of the IMU;
[0010] (2) carry out time domain, frequency domain analysis, and screen out characteristics that can represent the occurrence of collision according to the analysis results;
[0011] (3) Set a time window with a size of 100, and extract the acceleration and angular velocity values of each axis from the window respectively;
[0012] (4) Divide the time window into 10 sub-windows, and extract the mean value and maximum value respectively;
[0013] (5) Extract the gravity frequency, average frequency, root mean square frequency and frequency standard deviation in the time window;
[0014] (6) classify the running state of the forklift, and set the classified state as the label of training; Step 2: XGboost algorithm in machine learning is trained, which specifically includes the following modes:
[0015] (1) Put the feature value data set into the algorithm for training, adjust the parameters, and generate an algorithm model;
[0016] (2) Use the model to infer, and design a queue with a length of 5, put the inference results and the corresponding speed and fork lifting information into the queue;
[0017] (3) When the queue is full, judge the state value of the third queue element; The reason why the standard deviation of the speed is used as the basis for judgment is that the speed change in a short time will be larger when the forklift collides;
[0018] (4) Determine whether the state value is a collision according to the judgment result;
[0019] (5) Output the result, output the state value of the third element of the queue, delete the first element of the queue, keep the length of the queue unchanged, and make the next judgment.
[0020] As a preferred scheme of the vehicle running state detection method based on the IMU sensor and machine learning, in the step one process, the running state of the forklift is specifically classified into four kinds, which are: static, normal driving, jolt and collision, and the four states are used as training labels at the same time, and the extracted feature information is corresponding to the four labels; wherein, the jolt refers to the motion state of the forklift running on the jolted road surface.
[0021] As a preferred scheme of the vehicle running state detection method based on the IMU sensor and machine learning, in the step two process, when the third queue state is a collision, the standard deviation of the speed of the five elements in the queue is calculated, and whether the fork state of the forklift is lifting is judged at the same time, when the speed standard deviation is greater than the threshold value 1000 and the fork state is lowering, it is determined that this collision is a real collision.
[0022] As a preferred scheme of the vehicle driving state detection method based on the IMU sensor and machine learning, in the step two, when the queue is full, the third queue state is judged to be a collision, and if the standard deviation of the speed of five elements in the calculation queue is less than a threshold value, the collision state is adjusted to a jolt state and then the result is output.
[0023] As a preferred scheme of the vehicle driving state detection method based on the IMU sensor and machine learning, in the step one, the specific way of time domain and frequency domain analysis is wavelet transform and Fourier transform.
[0024] As a preferred scheme of the vehicle driving state detection method based on the IMU sensor and machine learning, in the step one, the time window is filtered with a step of 30 to filter the IMU data, and then the driving state features are extracted in the window.
[0025] As a preferred scheme of the vehicle driving state detection method based on the IMU sensor and machine learning, in the step one, the IMU performs posture correction according to the acceleration, angular velocity and forklift speed information collected by the sensor.
[0026] The beneficial effects of the present application are as follows:
[0027] 1. The vehicle driving state recognition algorithm uses the IMU 6-axis sensor installed on the vehicle to collect the acceleration, angular velocity and other posture information of the vehicle, uses the eigenvalue algorithm to extract features from the data, and inputs the extracted features into the machine learning algorithm. This method can accurately identify the driving state of the vehicle, and has low cost and wide application scenarios.
[0028] 2. The IMU posture recognition calibration function is added, a time window with a size of 100 is set, the IMU data is filtered with a step of 30, and the driving state features are extracted in the window. When the vehicle is in an abnormal state (collision occurs), the 100-size window can contain the whole process of the abnormal state, the extracted features can comprehensively describe the abnormal state, and the forklift speed and fork lifting information are added for auxiliary judgment to improve the accuracy of the judgment. DETAILED DESCRIPTION OF DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor. Among them:
[0030] Figure 1 A flow principle schematic diagram of a vehicle driving state detection method based on an IMU sensor and machine learning is provided for the present application. DETAILED DESCRIPTION
[0031] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0032] Embodiment 1
[0033] Reference Figure 1 For an embodiment of the present application, a vehicle driving state detection method based on an IMU sensor and machine learning is provided, which comprises the following steps:
[0034] Step one: feature value extraction, specifically including the following modes:
[0035] (1) According to the sensor collected forklift acceleration, angular velocity, forklift speed information, the IMU is corrected in posture;
[0036] (2) Time domain and frequency domain analysis, such as wavelet transform, Fourier transform, and screening according to the analysis results, screening out features that can represent collision;
[0037] (3) Set a time window with a size of 100, and filter the IMU data in turn with a step size of 30, and extract the acceleration and angular velocity values of each axis from the window;
[0038] (4) Divide the time window into 10 sub-windows, and extract the mean and maximum values respectively;
[0039] (5) Extract the center of gravity frequency, average frequency, root mean square frequency, and frequency standard deviation in the time window;
[0040] (6) Classify the running state of the forklift, specifically, the running state of the forklift is classified into four kinds, namely: static, normal driving, jolt, and collision, and the four states are used as training labels at the same time, and the extracted feature information is corresponding to the four labels; wherein, jolt refers to the motion state of the forklift running on a jolted road surface, and the classified state is set as the training label;
[0041] Step two: XGboost algorithm in machine learning is trained, specifically including the following modes:
[0042] (1) Put the feature value data set into the algorithm for training, adjust the parameters, and generate an algorithm model;
[0043] (2) using the model to reason, and designing a queue with a length of 5, putting the reasoning result and the corresponding speed and fork lifting information into the queue;
[0044] (3) judging the state value of the third queue element when the queue is full;
[0045] (4) judging whether the result of the state value is a collision, that is, judging whether the third queue state is a collision when the queue is full, calculating the standard deviation of the speed of the 5 elements in the queue, and simultaneously judging whether the state of the fork of the forklift is lifting, when the standard deviation of the speed is greater than the threshold value 1000 and is in the lowering state, it is determined that this collision is a real collision, if the standard deviation of the speed of the 5 elements in the queue is less than the threshold value, the collision state is adjusted to a jolt state and the result is output, and the reason why the standard deviation of the speed is used as the basis for judgment is that the speed change in a short time will be relatively large when the forklift collides, and the threshold value of 1000 can be calculated by summarizing the speed change in a large amount of real collision data;
[0046] (5) outputting the result, outputting the state value of the third element of the queue, deleting the first element of the queue, keeping the length of the queue unchanged, and performing the next judgment.
[0047] The IMU attitude recognition calibration function is added. In daily work scenes, due to the need of working conditions, the installation attitude of the IMU cannot be completely standard, so it is necessary to convert the data output by the IMU from the carrier coordinate system to the geographic coordinate system to eliminate the influence of the gravity component caused by the attitude, filter the IMU data in turn in a time window with a size of 100 and with a step of 30, and extract the driving state features in the window; when the vehicle is in an abnormal state (collision occurs), the 100-size window can contain the whole process of the abnormal state, and the extracted features can comprehensively describe the abnormal state;
[0048] By adding the forklift speed, fork lifting and other information for auxiliary judgment, the accuracy of the judgment is improved, when the forklift is lifting or starting, there is a small probability of misidentification, when the state of the forklift is static within 2s before the collision occurs, it is determined that the collision is a false alarm of the forklift starting, when the forklift is lifting when the collision occurs, it is determined that the collision is a false alarm of the forklift lifting, because the forklift will produce strong vibration when lifting, which is similar to the collision.
[0049] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit it, although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.
Claims
1.A driving state detection method based on IMU sensor and machine learning, characterized in that: Comprise the following steps; Step one: feature value extraction, specifically including the following ways: (1) the IMU posture correction; (2) time domain, frequency domain analysis, and screening on the analysis results, screening out the characteristics that can represent the collision; (3) set the size of the time window to 100, and extract the acceleration and angular velocity values of each axis from the window respectively; (4) the time window is divided into 10 sub windows, and the mean and maximum values are extracted respectively; (5) extract the gravity frequency, average frequency, root mean square frequency and frequency standard deviation in the time window; (6) classify the running state of the forklift, and set the classified state as the label of training; Step two: XGboost algorithm in machine learning is trained, specifically including the following ways: (1) put the feature value data set into the algorithm for training, adjust the parameters, and generate the algorithm model; (2) use the model to infer, and design a queue with a length of 5, put the inference result and the corresponding speed and fork lifting information into the queue; (3) when the queue is full, judge the state value of the third queue element; (4) according to the state value, judge whether it is a collision; (5) output the result, output the state value of the third element of the queue, delete the first element of the queue, keep the length of the queue unchanged, and judge the next time. 2.The IMU sensor and machine learning based vehicle driving state detection method according to claim 1, wherein: In the process of step one, the running state of the forklift is classified into four kinds, which are: static, normal driving, jolt and collision, and the four states are used as training labels at the same time, and the extracted feature information is corresponding to the four labels; Among them, jolt refers to the motion state of forklift running on the jolt road. 3.The IMU sensor and machine learning based vehicle driving state detection method according to claim 2, characterized in that: In the process of step two, when the queue is full, it is judged that the third queue state is collision, then the standard deviation of the speed of the five elements in the queue is calculated, and it is judged whether the fork state of the forklift is lifting at the same time, when the speed standard deviation is greater than the threshold value 1000 and is in the state of descending fork, it is determined that this collision is a real collision. 4.The IMU sensor and machine learning based vehicle driving state detection method according to claim 3, characterized in that: In the process of step two, when the queue is full, it is judged that the third queue state is collision, if the standard deviation of the speed of the five elements in the queue is less than the threshold value, the collision state is adjusted to jolt state and the result is output. 5.The vehicle driving state detection method based on IMU sensor and machine learning according to any one of claims 1 to 4, characterized in that: In the process of step one, the specific way of time domain and frequency domain analysis is wavelet transform and Fourier transform. 6.The IMU sensor and machine learning based vehicle driving state detection method according to claim 1, wherein: In the process of step one, the time window filters the IMU data in turn with a step length of 30, and then extracts the driving state characteristics in the window. 7.The IMU sensor and machine learning based vehicle driving state detection method according to claim 1, wherein: In the process of step one, the IMU posture correction is specifically based on the sensor collected acceleration, angular velocity and forklift speed information.
Citation Information
Patent Citations
Service anomaly detection method, method for training service anomaly detection model and method for training sound model
CN111951560A
Action recognition method and device based on Wi-Fi signal
CN112600630A