Vehicle type classification detection method based on single geomagnetic sensor

By collecting vehicle magnetic field disturbance values ​​using a single geomagnetic sensor and generating a SoftMax function model, the problems of complex vehicle classification and detection algorithms and the influence of environmental factors are solved, achieving low-cost, real-time, and accurate vehicle detection.

CN116469257BActive Publication Date: 2026-03-31XIDIAN UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-25
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing vehicle classification and detection algorithms are complex, leading to information delays, and sensor data acquisition is easily affected by environmental factors, resulting in insufficient accuracy of vehicle information.

Method used

A single geomagnetic sensor is used to collect vehicle magnetic field disturbance values. By selecting effective magnetic field features, a SoftMax function model is generated to accurately distinguish between large, medium and small vehicle models, reducing computational complexity and minimizing the impact of environmental factors.

Benefits of technology

Achieving vehicle model detection with low computational complexity improves the real-time performance and accuracy of vehicle model classification, reduces costs, and facilitates large-scale deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116469257B_ABST
    Figure CN116469257B_ABST
Patent Text Reader

Abstract

The application discloses a vehicle type classification detection method based on a single geomagnetic sensor, and mainly solves the problems of delay of acquired vehicle type classification information caused by complex existing vehicle type classification detection algorithm, and precision of acquired vehicle type information caused by that data collection of the sensor is easily affected by environmental factors. The application places a geomagnetic sensor on a lane line on one side of a lane, adopts the single geomagnetic sensor to collect a magnetic field disturbance value of a vehicle, extracts a magnetic field feature in the magnetic field disturbance value of the vehicle, generates a SoftMax function model by using the screened effective magnetic field feature, and realizes vehicle type judgment of a small vehicle, a medium vehicle and a large vehicle. The vehicle type classification detection method based on the single geomagnetic sensor used by the application has low calculation complexity, reduces calculation pressure of the geomagnetic sensor, is convenient to install, has low cost, is not easily affected by weather factors, and can be used for road intelligentization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of physical technology, and more specifically relates to a traffic vehicle classification method based on a single geomagnetic sensor within the field of intelligent transportation technology. This invention uses a geomagnetic sensor to collect magnetic field fluctuations caused by vehicles to achieve vehicle type detection on roads, and can be used to realize intelligent highways. Background Technology

[0002] As modern transportation gradually enters the era of intelligence and digitalization, the acquisition of traffic information is a necessary foundation for traffic flow control, traffic safety management, and traffic accident detection. Vehicle model information, as a fundamental attribute of vehicle information, requires rapid and accurate statistical analysis to provide a real-time and reliable data source for ITS (Intelligent Transportation Systems) to conduct traffic big data analysis. However, current vehicle model classification methods still have some problems in practical applications. For example, the accuracy of sensor data acquisition is easily affected by environmental factors, resulting in inaccurate vehicle model information. Especially in scenarios such as highways, where vehicle speeds are high, the methods for acquiring vehicle information have a certain delay, leading to insufficient real-time information.

[0003] Beijing Jiaotong University proposed a vehicle classification method based on frequency domain spectral energy using a geomagnetic sensor in its patent application, "A Vehicle Classification Method Based on Geomagnetic Sensor Frequency Domain Spectral Energy" (Application No.: CN 201310244509.6, Authorization Announcement No.: CN 103345841B). The method involves first obtaining the spectrum of each vehicle using Fast Discrete Fourier Transform (FFT), then analyzing the distribution characteristics of the vehicle spectrum in different frequency domain intervals, and finally using an optimal frequency domain interval search algorithm to obtain the optimal frequency domain interval or optimal combination of frequency domain intervals suitable for different vehicle classification standards, thus providing the vehicle classification result. The drawback of this method is that the FFT algorithm is complex and difficult to implement, placing computational pressure on edge computing devices and consuming significant computing resources and time. If the edge device cannot complete the algorithm processing and output the result within the specified time, it will lead to information acquisition delays, affecting subsequent decision-making and applications, and failing to meet the demands of scenarios with high real-time requirements.

[0004] Xi'an University of Electronic Science and Technology proposed a vehicle classification method based on multiple geomagnetic sensors in its patent application "A Method for Vehicle Classification Using Multiple Geomagnetic Sensors" (Application No.: CN202010391089.4, Publication No.: CN 111524365A). The method involves aligning data acquired by N geomagnetic sensors as the vehicle passes through them, calculating the average time it takes for the vehicle to pass between two adjacent sensors, and calculating the vehicle's magnetic length based on the vehicle's speed and the average time it takes to pass each sensor. The vehicle type is then determined based on this magnetic length. However, this method has drawbacks. The data from multiple geomagnetic sensors needs to be synchronized and aligned. Data collected by different sensors at different times is more susceptible to environmental factors such as temperature and humidity changes, leading to errors in the calculation of the average time for the vehicle to pass between adjacent sensors, thus affecting the accuracy of vehicle classification. Summary of the Invention

[0005] The purpose of this invention is to address the shortcomings of the existing technology by proposing a vehicle classification and detection method based on a single geomagnetic sensor. This method solves the problems of delayed vehicle classification information acquisition due to the complexity of current vehicle classification and detection algorithms, and the inaccuracy of vehicle information acquisition due to the susceptibility of sensor data acquisition to environmental factors.

[0006] The technical approach to achieving the objectives of this invention is as follows: This invention utilizes selected effective magnetic field features to generate a SoftMax function model, and incorporates a computationally efficient vehicle magnetic field feature calculation method and a model for distinguishing between large, medium, and small vehicle types into the geomagnetic sensor. This enables accurate differentiation of large, medium, and small vehicles, solving the problem of delayed vehicle classification information acquisition caused by the high computational complexity of existing vehicle detection algorithms. This invention deploys a single geomagnetic sensor on one side of the lane, without affecting normal traffic and facilitating maintenance. A single geomagnetic sensor is less susceptible to weather conditions compared to multiple sensors, addressing the issue of inaccurate vehicle information acquisition due to environmental factors affecting sensor data collection. The geomagnetic sensor used in this invention has lower power consumption, is easy to install, has lower cost, and is less affected by weather, facilitating large-scale deployment and solving the problems of high cost and instability associated with using cameras, radar, and other sensors.

[0007] To achieve the above objectives, the technical solution of the present invention is as follows:

[0008] Step 1: Collect the vehicle's magnetic field disturbance value using a single geomagnetic sensor:

[0009] Collect discrete magnetic field disturbance values ​​caused by each vehicle passing through a single geomagnetic sensor; use a vehicle detection algorithm to obtain the arrival and departure timestamps of each vehicle, and compose the time period in which the vehicle passes through a single geomagnetic sensor;

[0010] Step 2: Extract the magnetic field features from the vehicle's magnetic field disturbance signal:

[0011] Extract the magnetic field characteristics of each vehicle's data within a time period; perform standardized normalization on the magnetic field characteristics of each vehicle, and combine the normalized magnetic field characteristics of all vehicles into a dataset.

[0012] Step 3, Screening for effective magnetic field characteristics:

[0013] Calculate the information gain of each magnetic field feature data in the dataset. Sort all normalized magnetic field feature data according to the information gain value raised to the power of the information gain value to obtain the magnetic field feature data sequence for each vehicle. Calculate the Pearson correlation coefficient between each pair of magnetic field feature data in the magnetic field feature data sequence. Remove the magnetic field feature data with the smallest information gain among the two magnetic field feature data with a Pearson correlation coefficient greater than 0.8 from the sequence. Repeat this step until all Pearson correlation coefficients in the sequence are less than or equal to 0.8 to obtain the effective magnetic field feature data sequence for each vehicle.

[0014] Step 4: Generate a SoftMax function model using the effective magnetic field feature data sequence;

[0015] Step 5, Generate the training set:

[0016] Select at least 300 vehicles to form a sample set, select the number of samples of small cars, medium cars and large cars in a ratio of 6:5:4, set the corresponding category label for the samples of each type of vehicle, and use all samples in the sample set and their corresponding category labels as the training set.

[0017] Step 6: Input the training set into the SoftMax function model, use the gradient descent algorithm to iteratively update the weighting coefficients until the cost function converges, and obtain the trained SoftMax function model.

[0018] Step 7, predict the vehicle category:

[0019] Using the same method as steps 1 to 3, the effective magnetic field feature data sequence of the vehicle to be predicted is obtained, and it is input into the trained SoftMax function model to output the category of the vehicle to be predicted.

[0020] Compared with the prior art, the present invention has the following advantages:

[0021] First, because the present invention uses the selected effective magnetic field features to generate the SoftMax function model corresponding to each type of vehicle, the computational complexity of the function model is low, which will not put computational pressure on the geomagnetic sensor. This overcomes the problem that the vehicle classification and detection algorithm in the prior art is complex and causes the delay in obtaining vehicle classification information, so that the present invention can realize vehicle detection with low computational complexity.

[0022] Secondly, since the present invention uses a single geomagnetic sensor to collect the magnetic field disturbance value of the vehicle, it overcomes the problem in the prior art that the data collection of the sensor is easily affected by environmental factors, resulting in the inaccuracy of the vehicle model information. This enables the present invention to achieve vehicle model classification detection without being affected by environmental factors, thereby improving the level of road intelligence.

[0023] Third, the geomagnetic sensor used in this invention has lower power consumption, is easier to install, has lower cost, and is less affected by weather factors compared to sensors such as cameras and radar. This overcomes the shortcomings of existing vehicle detection methods, which are costly and easily affected by weather factors, resulting in high cost and instability of the detection scheme. This invention enables vehicle model detection at low cost and is easy to deploy on a large scale. Attached Figure Description

[0024] Figure 1 This is a flowchart illustrating the implementation of the method of the present invention;

[0025] Figure 2 This is a deployment diagram of the geomagnetic sensor of the present invention. Detailed Implementation

[0026] The embodiments of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0027] Reference Figure 1 The implementation steps of the embodiments of the present invention will be further described below.

[0028] Step 1: Collect the magnetic field disturbance value of the vehicle using a single geomagnetic sensor.

[0029] A geomagnetic sensor is placed on the lane line on one side of the lane to detect the type of vehicle in the lane.

[0030] refer to Figure 2 The method of deploying geomagnetic sensors will be further described.

[0031] The geomagnetic sensor used in the embodiments of this invention is the RM3100 series triaxial geomagnetic sensor, but it is not limited to other geomagnetic sensors on the market that can detect magnetic field disturbances caused by vehicles. The geomagnetic sensor in the embodiments of this invention can simultaneously collect magnetic field strength data along the X, Y, and Z axes. The X-axis is parallel to the lane line and points in the direction of vehicle travel; the Y-axis is perpendicular to the X-axis on the lane plane; and the Z-axis is perpendicular to the lane plane and points upwards.

[0032] In the embodiments of the present invention, the sampling frequency of the geomagnetic sensor is between 100Hz and 300Hz. A single geomagnetic sensor collects the discrete magnetic field disturbance values ​​caused by each vehicle at the sensor's location. At each moment, the geomagnetic sensor collects the magnetic field disturbance values ​​along the X, Y, and Z axes, as well as the magnetic field disturbance values ​​caused by the environment. In the embodiments of the present invention, the magnetic field disturbance values ​​obtained at the 23rd moment are: F X (23)=1667,F Y (23)=-2423,F Z (23) = -2802, the value of magnetic field disturbance caused by the environment F Xbase (23)=1666,F Ybase (23)=-2419,F Zbase (23) = -2802.

[0033] Using a vehicle detection algorithm, the arrival and departure timestamps of each vehicle are obtained, forming the time period in which the vehicle passes through a single geomagnetic sensor. The steps of the vehicle detection algorithm are as follows:

[0034] The first step is to calculate the triaxial fused magnetic field disturbance value detected at a single geomagnetic sensor using the following formula:

[0035]

[0036] Where F(k) represents the triaxial fused magnetic field perturbation value detected at a single geomagnetic sensor at time k, F X (k),F Y (k),F Z (k) represents the magnetic field disturbance values ​​of the X, Y, and Z axes detected by the geomagnetic sensor at the k-th time, respectively, F Xbase (k),F Ybase (k),F Zbase (k) represents the environmental magnetic field disturbance values ​​of the X, Y, and Z axes detected by the geomagnetic sensor at the k-th time.

[0037] The second step is to determine whether F(k) is greater than the vehicle detection threshold Th. If it is, then determine that a vehicle has entered the detection range of the geomagnetic sensor and record the timestamp of the vehicle's arrival. Otherwise, set k = k + 1 and then execute the first step of this process.

[0038] The third step is to determine whether F(k+1) is less than Th after determining that the vehicle is within the detection range of the geomagnetic sensor. If so, determine that the vehicle has left the detection range of the geomagnetic sensor and record the timestamp of the vehicle's departure. Combine the timestamps of the vehicle's arrival and departure to form the time period of the vehicle passing through a single geomagnetic sensor. Otherwise, proceed to the first step.

[0039] For example, in the embodiments of the present invention, the vehicle detection threshold Th is 80nT, and the magnetic field disturbance values ​​obtained at the 208th moment are: F X (23)=1753,F Y (23)=-2354,F Z (23) = -2752, the value of magnetic field disturbance caused by the environment F Xbase (23)=1661,F Ybase (23)=-2414,F Zbase (23) = -2803, the calculated triaxial fused magnetic field disturbance value is F(k) = 121.09. At this time, F(k) is greater than the vehicle detection threshold Th, so it is determined that a vehicle has entered the detection range of the geomagnetic sensor and the timestamp data of the detected vehicle is recorded as 208; after determining that the vehicle is in the detection range of the geomagnetic sensor, the magnetic field disturbance values ​​obtained at the 281st moment are: F X (23)=1696,F Y (23)=-2424,F Z (23) = -2799, the value of magnetic field disturbance caused by the environment F Xbase (23)=1661,F Ybase (23)=-2414,F Zbase (23) = -2803, the calculated three-axis fused magnetic field disturbance value is F(k) = 11.18. At this time, F(k) is less than the vehicle detection threshold Th, so it is determined that the vehicle leaves the detection range of the geomagnetic sensor and the timestamp of the vehicle leaving is recorded as 281.

[0040] Step 2: Extract the magnetic field features from the vehicle magnetic field disturbance signal.

[0041] Extract the magnetic field features of each vehicle's data within a time period; perform Z-score normalization on the magnetic field features of each vehicle, and combine the normalized magnetic field features of all vehicles into a dataset.

[0042] The magnetic field characteristics of each vehicle's data within a time period are obtained by the following formula:

[0043] f1 = n lea -n arr +1

[0044] f2 = max(F(k-1), F(k))

[0045]

[0046] f4=count{F(k)|F'(k-1)>0andF'(k)<0}

[0047] f5=count{F(k)|F'(k-1)<0andF'(k)>0}

[0048]

[0049] Where f1 represents the total number of sampling points within the time period from the vehicle's arrival timestamp to its departure timestamp, and n lea n arr f1 represents the sampling point position when the vehicle enters and leaves the geomagnetic sensor, f2 represents the maximum value of the magnetic field disturbance during the time period from the vehicle's arrival time stamp to its departure time stamp, max(·) represents the maximum value operation, F(k-1) and F(k) represent the magnetic field disturbance values ​​at time k-1 and time k, respectively, and f3 represents the time corresponding to the maximum value of the magnetic field disturbance during the time period from the vehicle's arrival time stamp to its departure time stamp. Let f'(k) represent the time corresponding to the maximum value of k, f4 represent the number of peak values ​​of magnetic field disturbance during the time period from the vehicle's arrival time to its departure time, count{·} represent the number of data points that satisfy the conditions in parentheses, F'(k-1) and F'(k) represent the derivatives of the magnetic field disturbance values ​​at the (k-1)th and kth times, respectively, f5 represent the number of valley values ​​of the magnetic field disturbance during the time period from the vehicle's arrival time to its departure time, and f6 represent the average value of the magnetic field disturbance during the time period from the vehicle's arrival time to its departure time. The magnetic field characteristics of each vehicle are standardized and normalized, and the normalized magnetic field characteristics of all vehicles are combined into a dataset.

[0050] In this embodiment of the invention, the number of sampling points calculated within the time period from the arrival timestamp of vehicle 208 to the departure timestamp of vehicle 281 is f1 = 74, the maximum magnetic field disturbance is f2 = 321, the time corresponding to the maximum magnetic field disturbance is f3 = 244, the number of peaks is f4 = 1, the number of valleys is f5 = 1, and the average magnetic field disturbance is f6 = 107. The normalized magnetic field characteristics are f 1,23_norm =0.054, f 2,23_norm =0.31, f 3,23_norm =0.2, f 4,23_norm =-0.75, f 5,23_norm =-0.35, f 6,23_norm =0.28.

[0051] Step 3: Screen for effective magnetic field characteristics.

[0052] The information gain of each magnetic field feature data in the dataset is calculated according to the following formula. All normalized magnetic field feature data are then sorted by power of the information gain value to obtain the magnetic field feature data sequence for each vehicle as follows:

[0053]

[0054] Where Gain(p,a) represents the information gain of the a-th magnetic field feature data in the p-th dataset, p represents the total number of samples in the p-th dataset, Ent(·) represents the information entropy operation, V represents the total number of value types for all data in the a-th magnetic field feature data in the p-th dataset, and |·| represents taking the absolute value. v p represents the subset of samples in the a-th magnetic field feature data that takes values ​​of the v-th class. v This represents the total number of samples in the subset.

[0055] In an embodiment of the present invention, the information gain of each magnetic field feature data is calculated using a dataset consisting of 620 samples. The calculation results are as follows: the information gain of the number of sampling points is 0.62, the information gain of the maximum magnetic field disturbance value is 0.49, the information gain of the time corresponding to the maximum magnetic field disturbance value is 0.61, the information gain of the number of peaks is 0.31, the information gain of the number of valleys is 0.2, and the information gain of the average magnetic field disturbance value is 0.58. The magnetic field feature data are sorted according to the information gain value in ascending order to obtain the magnetic field feature data sequence.

[0056] Calculate the Pearson correlation coefficient between each pair of magnetic field feature data in the magnetic field feature data sequence. Remove the magnetic field feature data with the smallest information gain among the two magnetic field feature data with a Pearson correlation coefficient greater than 0.8 from the sequence. Repeat this step until all Pearson correlation coefficients in the sequence are less than or equal to 0.8 to obtain the effective magnetic field feature data sequence.

[0057] The Pearson correlation coefficient between any two pairs of magnetic field feature data in the magnetic field feature data sequence is calculated using the following formula:

[0058]

[0059] Where, ρ x,y The Pearson correlation coefficient represents the relationship between feature x and feature y, where n represents the number of samples. and Let x and y represent the sample means of features x and y, respectively. i and y i Let x and y represent the values ​​of the features of the i-th sample, respectively.

[0060] In the embodiments of this invention, the Pearson correlation coefficient between the number of peaks and the estimated number of peaks in the magnetic field feature data is greater than 0.8, with the number of valleys having the least information gain; therefore, the number of valleys is removed from the magnetic field feature data sequence. Similarly, the Pearson correlation coefficient between the number of sampling points and the number of peaks in the magnetic field feature data is greater than 0.8, with the number of peaks having the least information gain; therefore, the number of peaks is removed from the magnetic field feature data sequence. Furthermore, the Pearson correlation coefficient between the maximum value of the magnetic field disturbance and the time corresponding to the maximum value of the magnetic field disturbance in the magnetic field feature data is greater than 0.8, with the maximum value of the magnetic field disturbance in the magnetic field feature data having the least information gain; therefore, the maximum value of the magnetic field disturbance in the magnetic field feature data is removed from the magnetic field feature data sequence. Thus, the Pearson correlation coefficients in the sequence are all less than 0.8, resulting in an effective magnetic field feature data sequence comprising three types of features: the number of sampling points f1, the time corresponding to the maximum value of the magnetic field disturbance f3, and the mean value of the magnetic field disturbance f6.

[0061] Step 4: Based on the effective magnetic field feature data sequence obtained in Step 3, generate the SoftMax function model as follows:

[0062] z m =w 1m f1+w 2m f3+w 3m f6+b m

[0063] Among them, z m This represents the calculation formula for the m-th type of vehicle in the SoftMax function model. In the embodiments of this invention, there are only three types of vehicles: m=1 represents a small car, m=2 represents a medium-sized car, and m=3 represents a large car. 1m ,w 2m ,w 3m b represents the weighting coefficients of the effective magnetic field characteristic data corresponding to each type of vehicle. m This represents the weighted constant of the calculation formula corresponding to each type of vehicle.

[0064] Step 5: Generate the training set.

[0065] In this embodiment of the invention, a sample set is composed of effective magnetic field feature data sequences from 609 vehicles, including 276 samples of small cars, 180 samples of medium-sized cars, and 153 samples of large cars. The samples of small cars are labeled as 1, the samples of medium-sized cars as 2, and the samples of large cars as 3. All samples in the sample set and their corresponding category labels are used as the training set.

[0066] Step 6: Input the training set into the SoftMax function model, and use the gradient descent algorithm to iteratively update the weighting coefficients until the cost function converges, thus obtaining the trained function model.

[0067] The cost function is as follows:

[0068]

[0069] Where J(W) represents the loss value between the model prediction result and the actual result under the weighted coefficient matrix W. The weighted coefficient matrix W is composed of the weighted coefficients of the calculation formulas for all different vehicle types. In the embodiment of this invention, the weighted coefficients w of the effective magnetic field characteristic data corresponding to the calculation formulas for the three vehicle types are used. 1m ,w 2m ,w 3m The weighted coefficient vectors corresponding to the weighted coefficients of each type of vehicle are respectively formed as [w 11 ,w 21 ,w 31 ] T 、[w 12 ,w 22 ,w 32 ] T 、[w 13 ,w 23 ,w 33 ] T The weighted coefficient vectors of the calculation formulas for the three types of vehicle models are used to construct a weighted coefficient matrix W. Let j represent the label of the i-th sample. This indicates that the label of the i-th sample is not j. `log(·)` represents the logarithmic operation, and `λ` represents the weight decay parameter. The value range of the weight decay parameter is usually [0,1]. In this embodiment of the invention, by comparing the model fitting effect under different weight decay parameter values, `λ = 0.0001` is selected. ij Let W represent the weighting coefficient of the j-th effective magnetic field feature data corresponding to the i-th type of vehicle. In this embodiment of the invention, a gradient descent algorithm is used to iteratively update the weighting coefficients. After 100 iterations, the cost function converges, and the obtained weighting coefficient matrix W is:

[0070]

[0071] The weighted coefficient matrix W is composed of the weighted coefficients of the calculation formulas for all different types of vehicle models.

[0072] The weighted constants corresponding to the calculation formulas for the three types of vehicle models are b1, b2, and b3, respectively. The weighted constant vector b = (0.598 - 0.815 - 1.403) constitutes the calculation formula for the three types of vehicle models. T The SoftMax function model is obtained as follows:

[0073] z1=-9.647f1+6.013f3+3.638f6+0.598

[0074] z2=4.723f1+2.681f3+7.414f6+0.815

[0075] z3=7.27f1-1.398f3-5.867f6-1.403

[0076] Where z1, z2, and z3 represent the calculation formulas for small cars, medium cars, and large cars in the SoftMax function model, respectively.

[0077] Step 7: Input the data of the vehicle type to be predicted into the trained SoftMax function model, and output the vehicle category.

[0078] In an embodiment of the present invention, the normalized magnetic field feature data of the vehicle model to be predicted are as follows: number of sampling points f1 = 0.14, time corresponding to the maximum value of magnetic field disturbance f3 = 0.61, and average value of magnetic field disturbance f6 = 0.23. These are input into the SoftMax function model to obtain z1 = 3.75, z2 = 4.82, and z3 = -2.59. Since z2 > z1 and z2 > z3, the output is 2, predicting that the vehicle model of the third sample is a mid-size vehicle.

Claims

1. A vehicle type classification detection method based on a single geomagnetic sensor, characterized by, The magnetic field disturbance value of the vehicle is collected by using a single geomagnetic sensor, and a SoftMax function model is generated by using the screened effective magnetic field feature data sequence; the steps of the detection method include the following: Step 1, collecting the magnetic field disturbance value of the vehicle by using a single geomagnetic sensor: Collecting the discrete magnetic field disturbance value caused by each vehicle passing through the single geomagnetic sensor; using a vehicle detection algorithm, obtaining the time stamp of the arrival and departure of each vehicle, and forming the time period of the vehicle passing through the single geomagnetic sensor; Step 2, extracting the magnetic field feature in the vehicle magnetic field disturbance signal: Extracting the magnetic field feature of the data in the time period of each vehicle; performing Z-score standardization normalization processing on the magnetic field feature of each vehicle, and forming a data set by normalizing the magnetic field features of all vehicles; Step 3, screening effective magnetic field features: Calculating the information gain of each magnetic field feature data in the data set, sorting all normalized magnetic field feature data according to the information gain value, and obtaining the magnetic field feature data sequence of each vehicle; calculating the Pearson correlation coefficient between two magnetic field feature data in the magnetic field feature data sequence, and removing the magnetic field feature data with the smallest information gain from the sequence if the Pearson correlation coefficient is greater than 0.8; repeating this step until the Pearson correlation coefficient in the sequence is less than or equal to 0.8, and obtaining the effective magnetic field feature data sequence of each vehicle; Step 4, generating a SoftMax function model using the effective magnetic field feature data sequence; Step 5, generating a training set: Selecting at least 300 vehicle effective magnetic field feature data sequences to form a sample set, selecting sample numbers of small, medium and large vehicles according to the ratio of 6:5:4, setting corresponding class labels for each vehicle type sample, and taking all samples in the sample set and their corresponding class labels as the training set; Step 6, inputting the training set into the SoftMax function model, using gradient descent algorithm to iteratively update the weighted coefficients until the cost function converges, and obtaining the trained SoftMax function model; Step 7, predicting the class of the vehicle: Using the same method as steps 1 to 3, obtaining the effective magnetic field feature data sequence of the vehicle to be predicted, inputting it into the trained SoftMax function model, and outputting the class of the vehicle.

2. The single geomagnetic sensor-based vehicle type classification detection method according to claim 1, characterized in that, The steps of the vehicle detection algorithm in step 1 are as follows: First, calculate the three-axis fusion magnetic field disturbance value detected by the single geomagnetic sensor by the following formula: Wherein, F(k) represents the three-axis fusion magnetic field disturbance value detected at the kth moment through a single geomagnetic sensor, F X (k), F Y (k), F Z (k) respectively represent the X, Y, Z three-axis magnetic field disturbance values detected by the geomagnetic sensor at the kth moment, F Xbase (k), F Ybase (k), F Zbase (k) respectively represent the X, Y, Z three-axis environmental magnetic field disturbance values detected by the geomagnetic sensor at the kth moment Second, determine whether F(k) is greater than the vehicle detection threshold Th, if yes, determine that a vehicle has entered the geomagnetic sensor detection range and record the time stamp of the vehicle arrival, otherwise, let k=k+1 and execute the first step; Third, when determining that the vehicle is in the geomagnetic sensor detection range, determine whether F(k+1) is less than Th, if yes, determine that the vehicle has left the geomagnetic sensor detection range and record the time stamp of the vehicle departure, form the time period of the vehicle passing through the single geomagnetic sensor by the time stamp of the vehicle arrival and departure, otherwise, execute the first step.

3. The single geomagnetic sensor-based vehicle type classification detection method according to claim 1, characterized in that, The magnetic field feature of the data in the time period of each vehicle in step 2 is obtained by the following formula: f1 = n lea - n arr + 1 f2 = max(F(k-1), F(k)) f4 = count{F(k) | F'(k-1) > 0 and F'(k) < 0} f5 = count{F(k) | F'(k-1) < 0 and F'(k) > 0} wherein f1 represents the total number of sampling points within the time period from the vehicle arrival timestamp to the vehicle departure timestamp, n lea , n arr respectively represent the sampling point positions when the vehicle enters and leaves the geomagnetic sensor, f2 represents the maximum value of the magnetic field disturbance value within the time period from the vehicle arrival timestamp to the vehicle departure timestamp, max(·) represents a maximum value taking operation, F(k-1), F(k) respectively represent the magnetic field disturbance values at the (k-1)th time point and the kth time point, f3 represents the time point corresponding to the maximum value of the magnetic field disturbance value within the time period from the vehicle arrival timestamp to the vehicle departure timestamp, , f4 represents the number of peaks of the magnetic field disturbance value within the time period from the vehicle arrival timestamp to the vehicle departure timestamp, count{·} represents the number of data satisfying the condition in the bracket, F'(k-1), F'(k) respectively represent the derivatives of the magnetic field disturbance values at the (k-1)th time point and the kth time point, f5 represents the number of valleys of the magnetic field disturbance value within the time period from the vehicle arrival timestamp to the vehicle departure timestamp, and f6 represents the average value of the magnetic field disturbance value within the time period from the vehicle arrival timestamp to the vehicle departure timestamp.

4. The single geomagnetic sensor-based vehicle type classification detection method according to claim 1, characterized in that, The information gain of each magnetic field feature data in the data set described in step 3 is obtained by the following formula: wherein Gain(p, a) represents information gain of the a-th magnetic field feature data in the p-th data set, p represents the total number of samples in the p-th data set, Ent(·) represents an information entropy operation, V represents the total number of value types of all data in the a-th magnetic field feature data in the p-th data set, |·| represents taking an absolute value, p v represents a subset of samples with the value of the v-th type in the a-th magnetic field feature data, p v represents the total number of samples in the subset.

5. The single geomagnetic sensor-based vehicle type classification detection method according to claim 1, characterized in that, The Pearson correlation coefficient between two magnetic field feature data in the magnetic field feature data sequence described in step 3 is obtained by the following formula: where ρ x,y denotes the Pearson correlation coefficient between feature x and feature y, n denotes the number of samples, and denote the sample mean of feature x and feature y, respectively, x i and y i denote the value of feature x and feature y, respectively, of the i-th sample.

6. The single geomagnetic sensor-based vehicle type classification detection method according to claim 3, characterized in that, The SoftMax function model in step 4 is obtained by the following formula: z m = w 1m f1 + w 2m f3 + w 3m f6 + b m wherein z m represents the calculation formula of the mth type of vehicle in the SoftMax function model, w 1m ,w 2m ,w 3m respectively represent the weighting coefficients of the effective magnetic field feature data corresponding to each type of vehicle, b m represents the weighting constant of the linear model corresponding to each type of vehicle.

7. The single geomagnetic sensor-based vehicle type classification detection method according to claim 6, characterized in that, The cost function in step 6 is as follows: wherein J(W) represents a loss value between the model prediction result and the actual result under the weighting coefficient matrix W, if represents that the label of the i-th sample is j, if represents that the label of the i-th sample is not j, log(·) represents a logarithm operation, λ represents a weight decay parameter, and w ij represents the weighting coefficient of the j-th effective magnetic field feature data corresponding to the i-th vehicle type.

Citation Information

Patent Citations

  • A frequency domain spectral energy-based vehicle classification method based on geomagnetic sensors

    CN103345841B

  • A method for vehicle classification using multiple geomagnetic sensors

    CN111524365B

  • Speed measurement system and a speed measurement method based on double geomagnetic sensors

    CN111311928A

  • Method for classifying vehicle types by using multiple geomagnetic sensors

    CN111524365A