Background
The current intelligent automobile technology is advanced at a high speed, the technologies of auxiliary driving and automatic driving are also developed and matured rapidly, and the anti-collision early warning function of the vehicle is gradually improved. The method mainly adopts automatic driving as a main implementation scheme in the field of vehicle anti-collision early warning. As shown in fig. 1, the automatic driving classification standard is used, and the current automatic driving field is mainly in conditional automation (L3) and partial automation (L2) stages, and forms a vehicle detection, identification and early warning scheme taking machine vision and radar as cores. This scheme can be comparatively accurate discernment stadia within range's vehicle, can also detect the distance of discerning the vehicle simultaneously, position, speed.
Along with the development of car networking and intelligent networking car, the advantage of V2X technique in the anti-collision early warning field of vehicle is gradually obvious, compares the vehicle detection ability in the stadia scope of camera, radar, and the vehicle that non-stadia scope was surveyed, scans can be realized to V2X technique. The C-V2X is a vehicular wireless communication technology evolved based on 3G/4G/5G and other cellular network communication technologies, and supports short-distance direct communication among vehicles, people and roads and communication among terminal and good people base stations. Two parts including LTE-V2X and 5G-V2X, wherein LTE-V2X can smoothly evolve to 5G-V2X. DSRC is a dedicated short-range communication technology, an efficient wireless communication technology that enables identification and two-way communication of objects within a communication area (typically tens to hundreds of meters). The WAVE standard, 802.11p, has been promulgated based on IEEE improvements and extensions to the conventional wireless short-range communication technology. In addition, the development of current high-precision positioning, the V2X technology is higher in accuracy, higher in positioning precision, lower in hardware requirement and better in real-time for vehicle identification, distance, position and speed detection.
The anti-collision early warning system constructed based on machine vision and radar identifies a front vehicle in an image identification mode, continuously improves the identification accuracy of the vehicle by learning and optimizing the image characteristics of the vehicle, calculates the distance between the identified vehicle and the vehicle, identifies the lane where the vehicle is located, identifies the speed of the vehicle, and further determines the position of the vehicle. According to the technology, when the distance of the vehicle is far and the image characteristics of the vehicle are not obvious, the recognition error is large, the accuracy is low, and meanwhile, the accuracy of detection on the speed, the lane and the position of the vehicle is low. Machine vision is compared, the anticollision early warning system that the radar found, adopt V2X communication mode to combine GPS, gyroscope inertial navigation, the anticollision early warning system of high accuracy location, detect surrounding vehicle and receive following position, speed, acceleration, course angle, the height above sea level navigation data of vehicle through V2X communication mode, data accuracy is higher, and the real-time is better, and the calculation operand is little, and is less to the hardware requirement, can realize the vehicle detection of non-line of sight again simultaneously. The comparative analysis will be performed from three aspects:
(1) accuracy and real-time of target detection.
The anti-collision early warning system constructed by machine vision and radar identifies vehicles by adopting an image feature identification mode, a camera or a radar is needed to collect feature images of the vehicles, the accuracy fluctuation is large under the influence of distance, environment, vehicle and road color, and the accuracy is low when the method is used for processing multi-target detection. And the V2X communication mode is combined with the GPS, gyroscope inertial navigation and high-precision positioning anti-collision early warning system to receive vehicle state data through V2X communication, so that the task overhead of image acquisition and feature extraction is reduced, and the accuracy and the real-time performance of target identification are greatly improved.
(2) The popularization of the front loading and the rear loading of the system.
The anti-collision early warning system constructed by machine vision and radar has high difficulty in front loading and rear loading of a vehicle, and requires installation and debugging of sensors such as a camera and the radar, even requires modification of the vehicle, and requires a specially-assigned person to install and debug. Meanwhile, the installation difficulty is increased due to the fact that different installation methods of the shapes and the structures of different vehicle types are different. The anti-collision early warning system adopting the V2X communication mode is composed of a communication antenna and a vehicle-mounted system, is low in installation requirement and low in difficulty, and is suitable for factory adaptation of vehicles and after-loading popularization of the vehicles.
(3) The accuracy and the real-time performance of the early warning algorithm.
The anti-collision early warning system constructed by machine vision and radar has higher target detection task overhead and single early warning function, and the hidden Markov model and the K-Means model are adopted to carry out model parameter learning through data, so that the model can predict the early warning condition of the current state according to the driving state time sequence before the current state, the prediction accuracy of the model is higher, the real-time performance is lower, and in addition, a new data optimization model can be continuously collected, so that the prediction accuracy of the model is improved.
Disclosure of Invention
The invention aims to solve the problems that the current vehicle anti-collision early warning system based on machine vision and radar is greatly influenced by environmental factors, the anti-collision prediction accuracy is not high and the real-time performance is not good in the prior art. An HMM-based V2X vehicle networking vehicle pre-crash warning system is provided that improves the accuracy of positioning. The technical scheme of the invention is as follows:
an HMM-based V2X internet of vehicles vehicle pre-warning system, comprising: the vehicle data acquisition/transceiving module comprises a V2X communication module, a high-precision positioning module and an inertial navigation module, wherein the V2X communication module is used for carrying out wireless communication between vehicles, sending and receiving vehicle driving data and used for detecting and identifying surrounding vehicles in an beyond-the-horizon range; the inertial navigation module comprises a GPS positioning module, an accelerometer and a gyroscope, and the GPS positioning module and the high-precision positioning module are responsible for positioning the position of the vehicle and acquiring position data; the accelerometer and gyroscope attitude module is used for acquiring attitude data of the vehicle, acquiring the attitude data and then carrying out high-precision positioning;
the vehicle state data classification module is used for classifying the vehicle state data; clustering the acquired vehicle running data by adopting a K-means algorithm according to the altitude, the relative speed, the relative distance, the acceleration, the relative course angle and the relative angle of the two vehicles to obtain vehicle driving state data for representing the vehicle traffic conditions in different scenes;
and the early warning observation data module is used for obtaining a driving state time sequence with matched speed and duration by adopting a speed self-adaptive algorithm, and further clustering the driving state time sequence by a K-Means algorithm to obtain vehicle state data.
And the anti-collision early warning prediction module is used for estimating parameters of the HMM model, training and learning parameters of multiple early warning scenes in the HMM model according to the vehicle state data, estimating a state transition probability matrix and an observation matrix in the model, and early warning to obtain five early warning states of safety, reminding, warning and danger by adopting an HMM prediction algorithm.
Furthermore, in the vehicle state data classification module, the distribution condition of the vehicle course angles in the current road section is analyzed by counting the relative course angles of the vehicles in the current road section, the category of the current road section course angles is judged to identify the early warning scene of the current road section, the early warning scene to which the vehicles belong is judged to be identified, the vehicle driving data is clustered through a K-means algorithm, and the current state data is marked by the cluster category and the early warning scene judgment result of the vehicles together for the learning of the prediction model.
Further, in the early warning observation data module, a speed adaptive driving state time sequence is adopted as a method of an observation sequence, and the method comprises the following steps: observation sequence O ═ O (O)1,o2,…,oT) The length T is determined by the speed v of the vehiclehAnd the relative speed v of the host vehicle and the recognized vehicledJointly determining the length of the observation sequence at the current moment according to vhAnd vdDynamically changing the length of the observation sequence.
Further, the K-means algorithm is used for representing the vehicle running state data { x) of the characteristics including the altitude, the relative speed, the relative distance, the acceleration, the heading angle and the relative angle of the two vehicles1,x2,x3,x4,x5,x6Are clustered into K classes c(i)Characterizing vehicle driving state data by classifying class c(i)The traffic condition category at the current time is quickly identified.
Further, the HMM model improves and optimizes the traditional hidden Markov model, introduces a state transition probability matrix A 'and an observation probability matrix B' of multiple early warning scenes, performs independent training on model parameters of different early warning scenes through anti-collision early warning classification in training data to obtain the state transition probability matrix A 'and the observation probability matrix B' of the multiple early warning scenes, and performs early warning prediction on the current scene through the parameters in the model.
Further, the gyroscope module is used for acquiring attitude data of the vehicle, including lateral acceleration, longitudinal acceleration, vertical acceleration, and attitude data including a roll angle, a pitch angle, and a yaw angle, so as to judge the state of the vehicle and provide data support for the inertial navigation technology.
Furthermore, the inertial navigation algorithm adopts a strapdown inertial navigation technology to calculate the attitude, speed and position parameters of the vehicle, the inertial navigation technology calculates the speed and displacement of a target carrier by an inertial navigation positioning system by using the acceleration data of the target carrier through integration, then calculates the position coordinate of the target carrier by combining the course angle of an inertial navigation sensor, and calculates the actual acceleration alpha of the vehicle:
wherein a is the actual acceleration of the vehicle, alpha and beta are respectively the included angles between the z axis and the x axis and the direction of the gravity acceleration, the data acquisition frequency of the inertial navigation system is known to be f, and the attitude angle and the acceleration data acquired by the accelerometer and the gyroscope are processed in an integral mode to obtain the velocity v of the inertial motion of the vehiclenAnd a displacement sn:
In the formula anFor the actual motion acceleration of the vehicle at the nth point, the position coordinate of the vehicle inertia motion is obtained by the formula:
where x, y are the true position coordinates of the vehicle motion, xlast,ylastFor coordinate buffering, s is the displacement measured at the current time, slastAnd gamma is the running course angle of the vehicle for displacement buffering.
Further, based on the acquired vehicle state data of the vehicle and the surrounding vehicles, four quantities of a relative distance d, a relative speed v, a relative acceleration a and a relative course angle h of the two vehicles are selected as characteristics of a K-means algorithm, the algorithm converts a clustering problem of K clusters into a plurality of sub-clustering problems, and finally clusters the vehicle state data into K classes, wherein the center of each class is C ═ { C ═ C { (C) } C1,c2,…,cKAnd adopting a flat error as a clustering criterion function, namely:
in the formula fijAnd searching an optimal clustering center for the data elements in the vehicle state data set through repeated iterative clustering until the clustering criterion function is converged.
Further, the distribution condition of the vehicle course angle in the current road section is analyzed by counting the vehicle relative course angle in the current road section, namely:
c=f(P)
in the formula, Head is a vehicle course angle, N is a total number of vehicles, c is an early warning scene category, the distribution condition of the vehicle course angle in the current road section is counted through the formula, the category distribution of the current road section course angle is analyzed, and the early warning scene to which the vehicle belongs can be identified through the category of the course angle.
The invention has the following advantages and beneficial effects:
the anti-collision early warning system is constructed on the basis of a prediction model of a Hidden Markov Model (HMM) and through vehicle state data acquired by software and hardware modules such as a vehicle state classification model V2X communication module, a positioning and posture recognition module and the like of a K-means model, and is high in prediction accuracy and good in instantaneity. The invention is composed of software and hardware modules such as a prediction model of a Markov model (HMM), a K-means model, a V2X communication module, a GPS, gyroscope positioning and attitude recognition module and the like. The method has the advantages that detection and identification of surrounding vehicles in a non-line-of-sight range are effectively solved, the position of the vehicle is obtained through a GPS, a gyroscope and an inertial navigation technology, the positioning accuracy is improved, data classification is carried out through a K-means model to represent the traffic state of the vehicle, and vehicle anti-collision early warning is realized through training parameters of an HMM model.
Detailed Description
The technical solutions in the embodiments of the present invention will be described in detail and clearly with reference to the accompanying drawings. The described embodiments are only some of the embodiments of the present invention.
The technical scheme for solving the technical problems is as follows:
the anti-collision early warning system is constructed on the basis of a prediction model of a Hidden Markov Model (HMM) and through vehicle state data acquired by software and hardware modules such as a vehicle state classification model V2X communication module, a positioning and posture recognition module and the like of a K-means model, and is high in prediction accuracy and good in instantaneity. The invention is composed of software and hardware modules such as a prediction model of a Markov model (HMM), a K-means model, a V2X communication module, a GPS, gyroscope positioning and attitude recognition module and the like.
The invention can effectively solve the detection and identification of surrounding vehicles in a non-line-of-sight range, acquire the position of the vehicle through GPS, a gyroscope and an inertial navigation technology, improve the positioning accuracy, carry out data classification by a K-means model to represent the traffic state of the vehicle, and realize the anti-collision early warning of the vehicle by training the parameters of an HMM model. The V2X module is responsible for wireless communication between vehicles, receives the state data of surrounding vehicles, and sends the state data of local vehicles to the surrounding vehicles. The GPS module is responsible for positioning the position of the vehicle and acquiring position data such as longitude and latitude, course angle, speed, altitude and the like of the vehicle. The gyroscope module is mainly responsible for acquiring attitude data of the vehicle, including lateral acceleration, longitudinal acceleration, vertical acceleration, and attitude data such as a rolling angle, a pitch angle, a yaw angle and the like, so as to judge the state of the vehicle and provide data support for an inertial navigation technology.
The K-means model is responsible for classifying the current vehicle running states of the two vehicles according to the altitude, the relative speed, the relative distance, the acceleration, the course angle and the relative angle of the two vehicles so as to represent different running states. The HMM model is mainly responsible for training and learning parameters of the model according to vehicle data, estimating a state transition probability matrix and an observation matrix in the model, wherein the state transition probability matrix comprises five early warning states of safety, reminding, warning and danger, then acquiring fixed-length time series data, and analyzing and predicting the vehicle driving state at the current moment of observation data.
The invention provides the following technical scheme for solving the problems of a vehicle anti-collision early warning system based on machine vision and radar.
(1) Target vehicle detection and identification based on V2X communication mode
The Internet of vehicles is a huge Internet system, traffic objects such as vehicles, pedestrians, traffic lights and the like are contained in the Internet of vehicles, and the data exchange between the vehicles can be more efficient and accurate and is low in time delay by adopting a V2X communication mode. Meanwhile, the communication capability of the V2X communication in the non-line-of-sight range can prolong the recognition distance of anti-collision early warning, and meanwhile, the collision danger is analyzed and predicted in advance more accurately and quickly.
(2) Positioning accuracy is improved based on high-accuracy positioning and inertial navigation of GPS and gyroscope
The invention adopts high-precision positioning technology to greatly improve positioning precision, and simultaneously adopts inertial navigation technology to assist vehicle positioning, thereby improving the effective updating frequency of position data. The length of the time sequence period of the driving state is reduced, and the prediction accuracy can be improved.
(3) Driving state time sequence based on K-Means classification method
The invention adopts the K-Means model to classify the data, can rapidly classify the continuous vehicle state data consisting of a plurality of characteristics of relative speed, distance, relative acceleration and course angle difference into discrete driving state categories, converts a discrete time sequence of a period of time into a discrete sequence, and analyzes the vehicle driving condition in the period of time by analyzing the discrete sequence.
(4) Anti-collision early warning prediction based on hidden Markov model
The driving state is analyzed through the hidden Markov model, the model parameters are estimated, and the anti-collision early warning condition at the current moment is predicted according to the driving condition of the vehicle at the previous moment.
Referring to fig. 1, the invention is composed of software and hardware modules such as a prediction model of a markov model (HMM), a K-means model, a V2X communication module, a GPS, a gyroscope positioning and gesture recognition module, and the like. An anti-collision early warning system with high prediction accuracy and good real-time performance is constructed by a prediction model based on a Hidden Markov Model (HMM) and vehicle state data acquired by software and hardware modules such as a vehicle state classification model V2X communication module and a positioning and posture recognition module of a K-means model.
To achieve the above object, the present invention provides a vehicle identification and data communication function in a non-line-of-sight range. Referring to fig. 2, the non-line-of-sight vehicle identification and data communication function includes the following two parts:
1) aiming at the scenes that the road conditions are good, curves and intersections are few, and no building blocks communication signals, the V2V communication mode is adopted to realize the detection, identification and data transceiving of surrounding vehicles. The V2V communication mode is good in real-time performance and low in communication delay, the vehicle detects surrounding vehicles within a communication distance, vehicle data are analyzed, and vehicles with potential risks in the same road section are identified. Under the condition, the V2X communication mode can be in the flying distance
2) Aiming at the condition that the road condition is not good and comprises a plurality of curves, trails, crossroads or other scenes that a building blocks communication signals, the detection, the identification and the data receiving and sending of surrounding vehicles are realized by adopting a mode of V2I communication to forward vehicle state data. The road side equipment is used for forwarding the vehicle state data through V2I communication, so that the road side equipment can be applied to scenes such as curves and intersections shielded by the following buildings, and the condition that data cannot be received or receiving is delayed due to shielding signals is avoided.
The mode of combining the vehicle-vehicle communication of V2V and the forwarding of the road-side equipment of V2I adopted by the invention can be applied to different road scenes, including straight roads, curved roads, traverses, and road scenes such as curved roads and intersections shielded by buildings.
And secondly, acquiring the position and the posture of the vehicle by adopting a GPS, a gyroscope, a high-precision positioning technology and an inertial navigation technology. The position data is acquired by a GPS module, and then the acquired GPS position data is subjected to high-precision calculation by using a high-precision positioning technology to acquire high-precision positioning data. Referring to fig. 3, vehicle position information is acquired through a GPS module, high-precision positioning calculation is performed on vehicle position data by a high-precision positioning calculation module to obtain high-precision positioning data, and vehicle attitude data of an acceleration and a deflection angle of a vehicle is acquired by a gyroscope; for the condition that real-time GPS data cannot be acquired under road conditions such as tunnels, mountainous areas, indoors or GPS data loss, the inertial navigation method adopts the following inertial navigation algorithm to carry out inertial navigation positioning on vehicle data, and can effectively improve positioning accuracy and instantaneity.
Referring to fig. 2, the inertial navigation algorithm calculates the attitude, speed, and position parameters of the vehicle by using the strapdown inertial navigation technique, so that the interference of the external environment can be effectively reduced. The vehicle collision early warning system adopts the strapdown inertial navigation technology combined with the GPS positioning technology, calculates the attitude matrix of the vehicle in real time by extracting data of a gyroscope and an accelerometer, acquires position positioning data at the moment by extracting data of a GPS module, acquires the motion attitude and the position data of the vehicle by attitude calculation by the strapdown inertial navigation technology, corrects the GPS positioning data by navigation data, improves the positioning precision of the vehicle, simultaneously solves the problem of poor data real-time performance existing in the GPS positioning technology, can effectively improve the real-time performance of the positioning data, further improves the real-time performance of vehicle state data, and improves the accuracy of collision early warning prediction.
In the inertial navigation technology, an inertial navigation positioning system calculates the speed and displacement of a target carrier by integration by using the acceleration data of the target carrier, and then the position coordinate of the target carrier is obtained by combining the course angle of an inertial navigation sensor. The actual acceleration a of the vehicle can be calculated:
wherein alpha is the actual acceleration of the vehicle, and alpha and beta are respectively the included angles between the z axis and the x axis and the direction of the gravitational acceleration. The data acquisition frequency of the inertial navigation system is known to be f, and the speed v of the inertial motion of the vehicle is obtained by processing the attitude angle and the acceleration data acquired by the accelerometer and the gyroscope in an integral modenAnd a displacement sn:
In the formula anIs the actual motion acceleration of the vehicle at the nth point. The position coordinate of the inertial motion of the vehicle can be obtained by the formula as follows:
where x, y are the true position coordinates of the vehicle motion, xlast,ylastFor coordinate buffering, s is the displacement measured at the current time, slastFor displacement damping, gamma for vehicle transportA heading angle.
Referring to fig. 3, the invention classifies the vehicle state data by using the K-means algorithm, and selects four quantities of the relative distance d, the relative speed v, the relative acceleration a and the relative course angle h of the two vehicles as the characteristics of the K-means algorithm based on the acquired vehicle state data of the vehicle and the surrounding vehicles. The algorithm converts the clustering problem of K clusters into a plurality of sub-clustering problems, and finally clusters the vehicle state data into K classes, wherein the center of each class is C ═ { C {1,c2,…,cKAnd adopting a flat error as a clustering criterion function, namely:
in the formula fijAre data elements in the vehicle state data set. And searching an optimal clustering center through repeated iterative clustering until the clustering criterion function is converged. The specific process is as follows:
1) initializing the cluster centers, firstly calculating the cluster centers of all samples in the data set, namely:
at this time k is 1.
2) And setting a termination condition, namely, when K is larger than K, the iteration is terminated, otherwise, continuing to make K equal to K + 1.
3) Selecting the initial clustering center of the next cluster, and calculating the parameter amThe value of (c):
a is to
mThe sample point with the largest value is taken as the initial cluster center of the next cluster.
4) Find and fjThe center point with the shortest distance and fjAre assigned to the class.
5) The center point of each cluster is recalculated,
and calculates the E value.
6) And judging whether the value E is converged or not, returning to the second step if the value E is converged, and returning to the fourth step for one-step iteration if the value E is not converged. Through the steps, the vehicle state data can be clustered and divided into K clustering categories.
The K-means algorithm for multi-early-warning scene recognition solves the problem of low accuracy of anti-collision early-warning prediction by only depending on vehicle running data. The invention analyzes the distribution condition of the vehicle course angle in the current road section by counting the relative course angle of the vehicle in the current road section, namely:
c=f(P)
in the formula, Head is the vehicle heading angle, N is the total number of vehicles, and c is the early warning scene category. The distribution condition of the vehicle course angles in the current road section can be counted through the formula, the category distribution of the current road section course angles is analyzed, and the early warning scene to which the vehicle belongs can be identified through the category of the course angles
Referring to fig. 4, the invention designs a Hidden Markov Model (HMM) with multiple warning scenes to analyze the driving condition of a vehicle and predict the current anti-collision warning condition of the vehicle. The hidden Markov model is a process of randomly generating a non-observable state random sequence by a hidden Markov chain and then generating observation by each state, and the model randomly generates observation by the state sequence. The hidden Markov model consists of an initial probability distribution, a transition probability distribution and an observation probability distribution. The method adopts a hidden Markov model in a discrete observation sequence form, carries out classification identification on multi-state data through a K-means algorithm, converts continuous vehicle driving data into discrete vehicle state data, and carries out early warning scene marking on the data through a multi-early warning scene recognition method to obtain a vehicle state data mark ci=(ki,wj) Therefore, the accuracy of the model can be well guaranteed, and the real-time performance of model processing is improved. The state transition probability matrix A' is formed by the following safety, reminding, warning and predictionThe observation probability matrix B' is an observation probability matrix which is composed of the following safety, reminding, warning, early warning, dangerous five states and driving state sequence length.
Firstly, parameters of the model are trained through a large number of training data sets, wherein the parameters comprise an initial state probability vector pi ', a state transition probability matrix A ' and an observation probability matrix B ', and a hidden Markov model of a multi-early-warning scene is obtained. Namely:
λ=(A′,B′,π′)
in the formula, the hidden Markov model parameter is trained by adopting a Baum-Welch algorithm, and the model parameter in the invention is estimated by adopting an unsupervised learning mode. On the basis of the initial value of the model parameters, the training data set is iterated repeatedly through a Baum-Welch algorithm, the element values in the state transition probability matrix A 'and the observation probability matrix B' are estimated, and the state transition probability matrix A 'and the observation probability matrix B' reach the optimal solution, namely:
in the formula:
is in slave state s
iTransition to state s
jThe desired number of times of the first and second,
to transfer from s
iThe expected number of times of exit, k, represents the state of the observed variable after classification. And obtaining a state transition probability matrix A 'and an observation probability matrix B' through the algorithm to complete the estimation of the model parameters.
Referring to FIG. 5, in the present invention, a speed is designedAnd carrying out vehicle anti-collision early warning state prediction by a Viterbi prediction algorithm of a degree-adaptive Hidden Markov Model (HMM). Acquiring vehicle state data of a vehicle and surrounding vehicles in a vehicle running state, clustering, identifying and converting the vehicle state data into driving state time series data through a K-means algorithm, wherein an observation sequence O is (O)1,o2,…,oT) The length T is determined by the speed v of the vehiclehAnd the relative speed v of the host vehicle and the recognized vehicledJointly determining, the relationship formula is as follows:
in the formula vhAnd vdIs the absolute speed and relative speed of the vehicle, and T is the observation sequence length. The algorithm is based on vhAnd vdThe length of the observation sequence is dynamically changed, the Viterbi prediction algorithm of a Hidden Markov Model (HMM) analyzes and calculates the driving state time sequence data, and the dynamic programming is applied to efficiently solve the early warning type (safety, reminding, warning, early warning and danger) of the maximum probability at the current moment under the support of the current driving state time sequence data. And then the early warning result is prompted to a driver, early warning is realized, the problem of poor prediction real-time performance when the speed difference is large can be predicted by optimally adopting the time sequence length of a single driving state as an observation sequence, the driving safety of the vehicle is improved, and the occurrence probability of traffic accidents is reduced.
The above examples are to be construed as merely illustrative and not limitative of the remainder of the disclosure. After reading the description of the invention, the skilled person can make various changes or modifications to the invention, and these equivalent changes and modifications also fall into the scope of the invention defined by the claims.