Mathematical Problems in Engineering
Volume 2021 (2021), Article ID 5540837, 11 pages
https://doi.org/10.1155/2021/5540837

Research Article

An Improved Vehicle Detection Algorithm Based on Multi-Intermediate State Machine

Baosen Xiao,¹ Jingbo Xia,¹ Xiaolu Li,¹ and Qinquan Gao²

¹College of Information Science and Technology, Xiamen University Tan Kah Kee College, Zhangzhou 363105, Fujian, China
²College of Physics and Information Engineering, Fuzhou University, Fuzhou 350108, Fujian, China

Correspondence should be addressed to Qinquan Gao; gqinquan@fzu.edu.cn

Received 21 January 2021; Revised 5 April 2021; Accepted 9 April 2021; Published 21 April 2021

Academic Editor: Taseer Muhammad

Copyright © 2021 Baosen Xiao et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

The vehicle detection algorithm is an important part of the intelligent transportation system. The accuracy of the algorithm will determine whether accurate vehicle information can be obtained. The system contains several functional modules, including signal amplification, wireless communication, A/D converter, and sensor set/reset functions. To detect all the intersection vehicles, a number of magnetoresistive sensors are connected to the computer system through the wireless communication module, and then, the detected vehicle information will be transferred back to the master host computer. In this paper, two common vehicle detection algorithms, fixed threshold algorithm and adaptive threshold algorithm, were analyzed in the vehicle detection system with magnetoresistive sensors, simultaneously. Finally, an improved multi-intermediate state machine algorithm for vehicle detection was proposed. Using the intermediate state, this algorithm cannot only detect when the vehicle enters the detection area but also decide whether the vehicle leaves the sensor node or not. In this way, it improves the detection accuracy.

1. Introduction

With the rapid development of China’s national economy and the modernization of social life, China’s urbanization and motorization process has been further promoted. However, it also brought a series of problems, of which the traffic problem is one of the most important. In addition to the rapid growth in the number of motor vehicles, the lack of advanced transportation infrastructure is the main source of long-term traffic congestion. Under this situation, the Intelligent Transportation System (ITS) is emerging to meet with the requirements of the times.

At present, the traffic order of the crossroad is maintained by periodically changing traffic lights. One of the main drawbacks of this timing control method is that when the signal light is red and there is no car waiting in the crossing lane, the green light signal will still be released. This not only wastes the driver’s time in other lanes but also causes environmental pollution due to the waiting of the vehicles. A worse situation is that a small number of drivers may cause the traffic accident by running the red light in a hurry. Thus, in the control of traffic signs at the crossroads, it is important to improve control efficiency through advanced traffic sign schemes based on the traffic characteristics and queuing rules of the crossroad. At present, large cities in some developed countries have begun to adopt intelligent traffic control systems. The technical basis is to detect the vehicle in real time. There are various types of vehicle detection technologies, and they either have insufficient detection accuracy or require relatively complicated installations [1–3]. Such as the loop coil technology, it requires the toroidal coil to be buried in the ground which will cause certain damage to the road surface. Moreover, the road surface will be damaged again during maintenance, which inevitably increases the cost [4, 5]. For the microwave technology, the detection accuracy is often insufficient when traffic is congested or a big car blocks a small car [6]. The video detection technology is the most widely used way in China. Its detection accuracy is able to meet the demand under normal weather conditions. However, the detection accuracy of the technology will be greatly reduced under dust or fog conditions [7].

The system contains several functional modules, including signal amplification, wireless communication, A/D converter, and sensor set/reset functions. To detect all the intersection vehicles, a number of magnetoresistive sensors are connected to the computer system through the wireless communication module, and then, the detected vehicle information will be transferred back to the master host computer. Finally, an improved multi-intermediate state machine algorithm for vehicle detection was proposed.

2. Detection Principle

The geomagnetic vehicle detector is a vehicle detection technology based on a magnetoresistive sensor, with the characteristics of small size, convenient installation, no response to nonferromagnetic objects, and high reliability [6]. Generally, the geomagnetic field around the car changes during driving due to a steel plate with a ferromagnetic component at the bottom of the automobile engine. Therefore, the magnetoresistive sensor can be used to detect the changes of the Earth’s magnetic field, so as to determine the existence of a vehicle. In addition, when the nonferromagnetic part of the car passes through the magnetoresistive sensor, the magnetic field changes are very small and can even be ignored (called “dead zone”) owing to the magnetoresistive sensor that does not respond to the nonferromagnetic object. Furthermore, the magnetoresistive sensor mainly utilizes the magnetoresistance effect of a nickel-iron magnetic alloy (Figure 1), while its basic component is a Wheatstone Bridge, which is made by a nickel-iron magnetic alloy material. At the same time, the value of the resistor has a certain relationship with the angle between the bias current and the magnetic field vector. As shown in Figure 2, within a certain range, the resistance is linear with the magnetic field vector [8, 9]. Besides, the Wheatstone bridge converts the changes of the magnetic field to output in the form of differential voltages.

(a)

(b)

Figure 1: Magnetoresistive effect.

Figure 2: Functional relationship between nickel alloy iron magnetic resistance and angle.

The resistivity ρ of the nickel-iron magnetic alloy material depends on the angle θ between the magnetic field strength M and the current I. The functional relationship is as follows [10]:

In this equation, and indicate the resistivity when the direction of magnetic field strength is perpendicular and parallel to the direction of the current, respectively.

The Earth’s magnetic field is weak, with an average intensity of about 0.06 mT at the strongest poles, so the Earth’s magnetic field can be regarded as uniform within a limited space. The ferromagnetic material contained in the vehicle itself affects the geomagnetic signal and bends the magnetic field lines in the area where the vehicle is located. When this uniform magnetic field is disturbed by ferromagnetic materials (such as iron, steel, nickel, and cobalt), its uniformity is destroyed [11]. So the vehicle information can be obtained through signal analysis since the sensor is sensitive to the change of the signal as the vehicle passes the sensor.

3. Hardware Design

Honeywell has the world’s leading technology in the manufacturing of magnetic induction and measuring elements. HMC1022 is one of HMC series double-axis magnetoresistive sensor produced by Honeywell. It not only has a wide range of magnetic field strength and a low set/reset current performance but also has the characteristics of high detection accuracy, stable working performance, small size, antielectromagnetic noise, and no response to nonferrous magnetic objects, which is mainly used to detect the weak magnetic field. The main technical parameters are shown in Table 1 in the appendix.

Table 1: Technical parameters of HMC1022.

Characteristics
Conditions
Min.
Type
Max.
Unit

Bridge supply
Vbridge referenced to GND

5
25
Volts

Bridge resistance
Bridge current = 5 mA
800
1100
1300
Ω

Operating temperature (1)
HMC1021S, 1021Z, and 1022
−55

150
°C

HMC1021D
−55

300

Storage temperature (1)
Unbiased
−55

175
°C

Field range (1)
Full-scale (FS), total applied field
−6

+6
Gauss

Linearity error (1)
Best fit straight line ±1 gauss

0.05

(%) FS

±3 gauss

0.4

±6 gauss

1.6

Hysteresis error (1)
3 sweeps across ±3 gauss

0.08

(%) FS

Repeatability error (1)
3 sweeps across ±3 gauss

0.08

(%) FS

Bridge offset
Offset = (OUT+)–(OUT−), field = 0 gauss after set pulse, Vbridge = 5 V
−10
±2.5
11.25
mV

Sensitivity
S/R current = 0.5 A
0.8
1.0
1.25
Mv/V/gauss

Noise density (1)
Noise at 1 Hz, Vbridge = 5V

48

nV/Hz

Resolution (1)
Bandwidth = 10 Hz and Vbridge = 5V

85

ugauss

Bandwidth (1)
Magnetic signal (lower limit = DC)

5

MHz

OFFSET strap
Measured from OFFSET + to OFFSET-
38
50
60
Ω

OFFSET strap Ω tempco (1)
TA = −40 to 125°C

0.39

(%)°C

OFFSET field (1)
Field applied in sensitive direction
4.0
4.6
6.0
mA/gauss

Set/reset strap
Measured from S/R+ to S/R−
5.5
7.7
9
Ω

Set/reset current
2us current pulse, 1% duty cycle
0.5
0.5
4.0
Amp

Set/reset Ω tempco (1)
TA = −40 to 125°C

0.37

(%)°C

Disturbing field (1)
Sensitivity starts to degrade. Use S/R pulse to restore sensitivity
20

Gauss

Sensitivity tempco (1)
TA = -40 to 125°C Vbridge = 5 V
−0.32
−0.3
−0.28
(%)°C

Ibridge = 5 mA

−0.06

Bridge offset tempco (1)
TA = -40 to 125°C no set/Reset

+0.05

(%)°C

Vbridge = 5 V with set/reset

+0.001

Resistance tempco (1)
Vbridge = 5 V, TA = –40 to 125°C

0.25

(%)°C

Cross-axis effect (1)
Cross field = 1 gauss (see AN-205) Happlied = ±1 gauss

+0.3

(%) FS

Max. exposed field (1)
No perming effect on zero reading

10000
Gauss

Set/reset (1)
S/R current ≥ 0.5 amps

30
uV

The detection system is a single-node distributed vehicle information collection and control system with HMC1022 as the information acquisition sensor, which mainly includes signal amplification module, A/D conversion module, sensor setting/reset module, and ZigBee wireless communication module. The sensor node is composed of a dual-axis magnetoresistive sensor HMC1022, a ZigBee wireless communication module, and a power source. Compared with the HMC1001/1002 and three-axis magnetoresistive sensor, the HMC1022 has lower power consumption. It also reduces peripheral circuits. The maximum energy of the node is mainly consumed at two time points of wireless transmission and reception of data. A plurality of magnetoresistive sensor nodes is connected to the computer system through the serial port wireless communication module, and the detected vehicle information is fed back to the upper computer. Thereby, the detection of the intersection vehicle is realized. The design framework of the vehicle detection system hardware is shown in Figure 3.

Figure 3: Flowchart of the system hardware structure.

3.1. Signal Amplification Module

In order to effectively use the sampling accuracy of the A/D converter and improve the detection accuracy, the weak voltage signal output by the magnetoresistive sensor needs to be amplified before A/D sampling. The instrument amplifier AD620 is selected in this project, while the signal input + IN and –IN correspond to the differential input OUT+(A) and OUT-(A) of the sensor, respectively.

There is a linear relationship between the voltage value at the output of AD620 and the voltage difference between the two input terminals. The functional relationship is

while denotes the gain magnification, and its relationship with the resistance RG is

It can be seen that is only affected by RG.

3.2. A/D Conversion Module

The magnetoresistive sensor HMC1022 transmits the detected magnetic field analog signal to the A/D conversion module through the I/O interface. It converts the analog signal into a digital signal and transmits the converted digital signal to each base station through the RF circuit. The change of the magnetic field is converted into the change of voltage. But the change of voltage is very weak and short, which requires the accuracy of A/D conversion to be high enough and the sampling frequency as high as possible. The system adopts 14 bit A/D conversion in CC2530. Its acquisition frequency reaches hundreds of times per second, which can meet the system requirements.

3.3. Set/Reset Circuit

General power supply is difficult to generate high current pulse, which is usually generated by capacitor charging and discharging. In this project, the CMOS switch IRF7105 is selected, and on and off are controlled by the clock signal to generate set/reset pulse. Based on the requirements, a pulse current-generating circuit with the pulse width of 2 us and the pulse period of 50 ms can be designed, and the frequency can be further reduced to save power consumption. The setting pulse is formed by a 1 uF tantalum capacitor, and a 200 Ω step-down resistor is connected in series with the power supply to reduce the noise. The output terminal of IRF7105 is connected to the S/R + terminal of HMC1022 through a 0.1 uF capacitor.

3.4. ZigBee Wireless Communication Module

ZigBee’s typical wireless communication distance is 50–300 m, and its protocol stack includes 5 layers: application layer, network layer, data link layer, media access layer, and physical layer. Among them, the application layer is developed by users based on their own needs, the network layer and data link layer are developed by ZigBee alliance, and the media access layer and physical layer follow the IEEE802.15.4 standard. Furthermore, the ZigBee wireless sensor consists of an 8 bit MCU and CC2530 RF chip.

3.5. Anti-Interference Design of the Hardware Circuit

In the magnetoresistive sensor vehicle flow detection system, the sensor nodes are placed in the open traffic environment, where there exists a variety of electromagnetic signal interference, such as electromagnetic signals generated by high-voltage transmission lines/high-voltage equipment, radio stations, mobile communications, and electronic instruments. Moreover, the vehicle flow detection system has both the analog circuit and digital circuit; hence, the electromagnetic compatibility problems should be well-dealt with, especially the electromagnetic interference caused by the RF circuit. Therefore, the following measures can be taken to reduce electromagnetic interference during PCB wiring:

(1)In the clock circuit, the wire connecting crystal input/output and the ground wire of the crystal capacitor should be wide and short to reduce noise interference.(2)In terms of power supply and ground, first of all, the power line should be close to the ground wire as much as possible to reduce the area of the power supply loop. Secondly, the analog circuit power supply and digital circuit power supply should be separated to avoid interference. Thirdly, a decoupling capacitor is connected between the power pin and the ground pin of the chip. Furthermore, the ground wire should be designed as a closed loop to avoid large potential difference and improve the noise tolerance when the circuit board has multiple chips.(3)In order to improve the stability of the circuit, the right angle and acute angle should not appear in PCB wiring, and the principle of 135° is ought to followed in the broken line. Besides, the width of the signal line, the power line and ground wire need to increase in turn, with the width of 1 mm, 1.5 mm, and 2 mm, respectively.

3.6. Sampled Waveform Preprocessing

First, the sliding average filtering and peak filtering methods are used to weaken the high-frequency interference signals of each axis, and then, the magnetic field component information of the two axes is combined to obtain the entire disturbance effect generated when the vehicle passes over the sensor. The geometric mean of the differential of the magnetic field components of each axis is used to characterize the overall disturbance degree of the magnetic field, which cannot only eliminate the slow drift of the time series but also eliminate the interference of vehicles in adjacent lanes. Finally, the overall disturbance is sampled and averaged to obtain stability time series:

where and represent the values of the nth sampling point after filtering on the X-axis and Y-axis, respectively, and and are the overall disturbance degree at the nth sampling point and the mth sampling point after filtering, respectively.

4. Common Detection Algorithms

This project designs a vehicle detection system based on the dual-axis magnetoresistive sensor HMC1022 to detect the vehicle information on the road in real time. Therefore, the selection of the vehicle detection algorithm, the accurate analysis of various signal characteristics influencing factors, and the acquisition of traffic flow information will be the focus of this project. The general considerations include (1) extracting relatively accurate vehicle signals from the vehicle detection signal, (2) minimizing other electromagnetic signal interference, (3) conducting a series of processing on the extracted signals, (4) requiring no change about the original vehicle signal characteristics after processing, and (5) using a simpler algorithm to improve the accuracy of vehicle detection.

The fixed threshold algorithm and adaptive threshold algorithm (ATA) are the main algorithms for vehicle detection technologies by using magnetoresistive sensors [7]. At present, these two algorithms are widely used with accurate detection results and strong representativeness. Comparing with the multi-intermediate state machine algorithm, the advantages of the multi-intermediate state machine algorithm can be better presented. The abovementioned algorithms will be introduced, respectively, hereinafter.

4.1. Fixed Threshold Algorithm

Since the geomagnetic signal collected by the magnetoresistive sensor is not continuous but discrete data, the algorithm compares the magnetic field signal acquired from the Z-axis (the direction perpendicular to the road surface) with the given fixed threshold. The vehicle is considered to be present, while the values of 10 magnetic field signals are greater than the fixed threshold, or the vehicle is considered to be leaving, while the magnetic field signal value of the X-axis (the direction parallel to the road surface) and Z-axis is below the threshold for more than 0.25 s. This algorithm is easy to understand and fast; moreover, it can reflect the current traffic flow information in real time. However, the magnetic field signal value collected may sometimes appear as breakpoints or outliers since the magnetoresistive sensor is susceptible to magnetic interference in the open air, which may cause misjudgment of vehicles.

4.2. ATA

In this method, the energy of the original magnetic field signal is calculated firstly; then, the signal is processed by the FIR filter to obtain the average energy, which is compared with the adaptive threshold value. Finally, the comparative results are input into the state machine for decision analysis. The ATA algorithm flow chart is shown in Figure 4.

Figure 4: ATA algorithm flow chart.

This algorithm uses the FIR filter to detect the magnetic field signal, which makes the algorithm complicated to some extent.

5. System Algorithm Implementation

Considering that the vehicle flow detection system requires the sensor node to transmit the road conditions to the host computer in real time and accurately through the ZigBee wireless communication module, the detection algorithm should be as simple as possible to reduce the calculation time.

A multi-intermediate state machine algorithm with high accuracy and simple feasibility is first proposed by Ding et al. which typically has five states: nocar, car, count0, count00, and count1. The input is denoted as u(k), the intermediate states are count0 and count00, and the output states are car and nocar. First, the magnetoresistive sensor detects and collects the geomagnetic field signal, and the signal is averaged to obtain f(k); then, f(k) is binarized to obtain u(k), which is used as the state machine input. The threshold T(k) is set reasonably as needed, and u(k) = 1 when f(k) ≥ T(k), and u(k) = 0 when f(k) < T(k). The state machine has a car counter (represented by count1), an interference counter (represented by count0), and a vehicle departure counter (represented by count00). The threshold values of these three counters are set, respectively, as N, M, and M. When the count is greater than M, the vehicle is considered to be leaving, and when it is less than M, it is considered to be interference. Changes in the sensor temperature or the external environment may cause the output signal to drift, so the values of all counters are set to 0. The improved state machine algorithm is shown in Figure 5.

Figure 5: State machine detection algorithm.

The multi-intermediate state machine algorithm has an intermediate state, which can be used to determine whether the vehicle is leaving the sensor node, rather than just determining when the vehicle enters the detection zone. Thus, it improves the detection accuracy.

6. Tests and Results

Since the vehicle counter threshold is closely related to the number of sampling points in the state machine algorithm, the more the points, the more reliable the threshold design. The number of sampling points N can be derived as

In this equation, L indicates the length of the car (m), and and f are the vehicle speed (km/h) and sampling frequency (Hz), respectively.

The length of a small car is about 4.8 m. If it takes about 0.17 s to pass the node at a speed of 100 km/h, it can be sampled about 10 points under 60 Hz sampling frequency. But the vehicle can’t reach this speed in urban. Thus, the vehicle counter threshold N = 10. The sampling frequency needs to be increased, while it is necessary to sample a higher speed vehicle. Based on the test data, the vehicle threshold T is equal to 40, the interference counter and the vehicle leaving counter M is 20, and the forced reset threshold is 200. The experimental test results show that when the vehicle passes the sensor nodes, the vehicle can be detected as long as most of the vehicle body is in the lane; however, it cannot be detected in the adjacent lane. A total of 156 vehicles actually passed in the 20 minutes, and 153 vehicles were tested by the sensor node; therefore, the detection accuracy rate was 98.08%, and the false detection rate was 1.92%. In addition, the detection accuracy could be improved by adjusting the threshold value. In this method, the problem of sensor output signal drift is solved by re-setting and re-sampling the environmental magnetic field so that the output magnetic field is the net magnetic field generated by the vehicle, which improves the test accuracy.

According to the state machine algorithm, the vehicle detection accuracy is mainly determined by the vehicle threshold T and the vehicle counter N. The higher the threshold T, the stronger the anti-interference. However, it easier to miss passing vehicles, and the same applies to vehicle counters. Thus, the most reasonable threshold should be selected after analyzing a large amount of test data.

Before verifying the reliability of the relevant algorithms, some testing work was conducted in the early stage. The experimental results were obtained through field tests in the road field. According to the different placement positions of the detection points and the different placement directions of the sensor’s sensitive axis, the test was carried out, respectively, to collect the corresponding magnetic field signal change information and carry out classification comparison and analysis further.

Detection nodes A and B were placed in the center and edge of the lane, respectively, while the driving direction of the vehicle was from west to east, as shown in Figure 6. The X-axis was marked as the positive direction, and by changing the X-axis (the sensitive axis) direction of the magnetoresistive sensor to make it face to the east, west, south, and north, respectively, the magnetic field changes of the detected node were tested when a car passes by. The experimental results of the detection nodes A and B are shown in Figure 7 and Figure 8, respectively.

Figure 6: Location diagram of the detection node.

Figure 7: Waveform measured at node A.

Figure 8: Waveform measured at node B.

By comparing and analyzing the test waveforms of the detection node A and B, it can be found that (1) when the vehicle passes the detection node, the detection value has a significant change; (2) As the vehicle passes by the detection node, the detection value changes, but the change is not obvious. Based on this different variation feature, the detection node can be placed in the center of each lane of the road, which cannot only accurately distinguish whether there is a vehicle passing through the lane but also effectively prevent the interference caused by vehicles passing the side lane and avoid false detection. It can be seen from Figure 7 that, in case of the vehicle passes, the detection value of the X-axis is the largest when the sensitive axis is placed in the north direction. As a result, the positive axis of the sensitive axis should be oriented to the north, while placing the magnetoresistive sensor, and the subsequent test should be performed under this condition.

On the basis of completing the hardware and software design of the vehicle detection system, the hardware module of the vehicle detection system was placed on the road for field test and analysis, so as to verify the reliability of the multi-intermediate state machine algorithm and compare the fixed threshold algorithm and ATA. In order to eliminate the interference of other factors and determine the superiorities of different algorithms, the system with the self-designed hardware module adopted for the test and location of road detection were all the same. In addition, the module was installed in the same position and direction (the detection node was located in the center of the road, that is, the detection node A.); besides, the test weather was also basically the same. In order to obtain different vehicle judgment test results, the detection algorithms used the fixed threshold algorithm, ATA, and multi-intermediate state machine algorithm, respectively, and the results are shown in Table 2. It should be noted that, based on the test results of repeated trials in advance, the reasonable threshold parameters are finally determined for each algorithm. Detailed data of vehicle test results are shown in Table 3.

Table 2: Vehicle test results.

Algorithm
Actual number of vehicles passing/car
Detected number of vehicles passing/car
Detection accuracy (%)

Multi-intermediate state machine
200
197
98.5

Fixed threshold
200
181
90.5

Adaptive threshold
200
182
91

Table 3: Detailed data of vehicle test results.

Is there a vehicle? (Y/N)

No.
Detection value
Multi-intermediate state machine
Fixed threshold
Adaptive threshold

1
2.6185
Y
Y
Y

2
2.6031
Y
Y
Y

3
2.5948
Y
Y
Y

4
2.5660
Y
Y
Y

5
2.5184
Y
Y
Y

6
2.4730
Y
Y
Y

7
2.4529
Y
Y
Y

8
2.5255
Y
Y
Y

9
2.6168
Y
Y
Y

10
2.5814
Y
Y
Y

11
2.4964
Y
Y
Y

12
2.5064
Y
Y
Y

13
2.5453
Y
Y
Y

14
2.5313
Y
Y
Y

15
2.3760
Y
N
N

16
2.4658
Y
Y
Y

17
2.5250
Y
Y
Y

18
2.4179
Y
N
N

19
2.5286
Y
Y
Y

20
2.4981
Y
Y
Y

21
2.4109
Y
N
N

22
2.5285
Y
Y
Y

23
2.4344
Y
N
N

24
2.5683
Y
Y
Y

25
2.4586
Y
Y
Y

26
2.5142
Y
Y
Y

27
2.5312
Y
Y
Y

28
2.5413
Y
Y
Y

29
2.4512
Y
Y
Y

30
2.5781
Y
Y
Y

31
2.6035
Y
Y
Y

32
2.4632
Y
Y
Y

33
2.5489
Y
Y
Y

34
2.6145
Y
Y
Y

35
2.4689
Y
Y
Y

36
2.4751
Y
Y
Y

37
2.4693
Y
Y
Y

38
2.5462
Y
Y
Y

39
2.5489
Y
Y
Y

40
2.5358
Y
Y
Y

41
2.5697
Y
Y
Y

42
2.4869
Y
Y
Y

43
2.3658
Y
N
N

44
2.3789
Y
N
N

45
2.4785
Y
Y
Y

46
2.5478
Y
Y
Y

47
2.6102
Y
Y
Y

48
2.6189
Y
Y
Y

49
2.5691
Y
Y
Y

50
2.5486
Y
Y
Y

51
2.4653
Y
Y
Y

52
2.5662
Y
Y
Y

53
2.5449
Y
Y
Y

54
2.6358
Y
Y
Y

55
2.5397
Y
Y
Y

56
2.5269
Y
Y
Y

57
2.3649
N
N
N

58
2.4769
Y
Y
Y

59
2.6589
Y
Y
Y

60
2.4854
Y
Y
Y

61
2.5698
Y
Y
Y

62
2.5485
Y
Y
Y

63
2.5684
Y
Y
Y

64
2.4536
Y
Y
Y

65
2.6245
Y
Y
Y

66
2.5632
Y
Y
Y

67
2.5215
Y
Y
Y

68
2.5632
Y
Y
Y

69
2.5325
Y
Y
Y

70
2.5745
Y
Y
Y

71
2.5362
Y
Y
Y

72
2.5486
Y
Y
Y

73
2.5568
Y
Y
Y

74
2.5742
Y
Y
Y

75
2.5690
Y
Y
Y

76
2.5701
Y
Y
Y

77
2.5120
Y
Y
Y

78
2.5313
Y
Y
Y

79
2.5426
Y
Y
Y

80
2.5580
Y
Y
Y

81
2.5243
Y
Y
Y

82
2.5368
Y
Y
Y

83
2.5472
Y
Y
Y

84
2.5542
Y
Y
Y

85
2.5617
Y
Y
Y

86
2.6310
Y
Y
Y

87
2.4782
Y
Y
Y

88
2.4957
Y
Y
Y

89
2.4325
Y
N
N

90
2.4365
Y
Y
Y

91
2.5210
Y
Y
Y

92
2.5472
Y
Y
Y

93
2.5101
Y
Y
Y

94
2.5240
Y
Y
Y

95
2.5431
Y
Y
Y

96
2.5571
Y
Y
Y

97
2.5240
Y
Y
Y

98
2.4532
Y
Y
Y

99
2.4781
Y
Y
Y

100
2.4235
Y
N
N

101
2.4582
Y
Y
Y

102
2.5325
Y
Y
Y

103
2.5472
Y
Y
Y

104
2.4625
Y
Y
Y

105
2.5214
Y
Y
Y

106
2.4125
Y
N
N

107
2.6325
Y
Y
Y

108
2.6214
Y
Y
Y

109
2.6302
Y
Y
Y

110
2.5412
Y
Y
Y

111
2.5003
Y
Y
Y

112
2.5268
Y
Y
Y

113
2.5412
Y
Y
Y

114
2.5471
Y
Y
Y

115
2.5862
Y
Y
Y

116
2.5521
Y
Y
Y

117
2.4305
Y
N
N

118
2.5014
Y
Y
Y

119
2.5478
Y
Y
Y

120
2.5325
Y
Y
Y

121
2.5411
Y
Y
Y

122
2.4690
Y
Y
Y

123
2.4364
Y
Y
Y

124
2.4521
Y
Y
Y

125
2.4781
Y
Y
Y

126
2.5302
Y
Y
Y

127
2.5201
Y
Y
Y

128
2.5131
Y
Y
Y

129
2.4520
Y
Y
Y

130
2.3945
Y
N
N

131
2.4368
Y
Y
Y

132
2.4528
Y
Y
Y

133
2.6582
Y
Y
Y

134
2.5832
Y
Y
Y

135
2.6048
Y
Y
Y

136
2.6102
Y
Y
Y

137
2.6352
Y
Y
Y

138
2.4563
Y
Y
Y

139
2.5048
Y
Y
Y

140
2.3652
N
N
N

141
2.6245
Y
Y
Y

142
2.6325
Y
Y
Y

143
2.4587
Y
Y
Y

144
2.4782
Y
Y
Y

145
2.4632
Y
Y
Y

146
2.5017
Y
Y
Y

147
2.4785
Y
Y
Y

148
2.5201
Y
Y
Y

149
2.4690
Y
Y
Y

150
2.4703
Y
Y
Y

151
2.4258
Y
N
N

152
2.4569
Y
Y
Y

153
2.4586
Y
Y
Y

154
2.4260
Y
N
N

155
2.5203
Y
Y
Y

156
2.5249
Y
Y
Y

157
2.5862
Y
Y
Y

158
2.5841
Y
Y
Y

159
2.5428
Y
Y
Y

160
2.5269
Y
Y
Y

161
2.5423
Y
Y
Y

162
2.5148
Y
Y
Y

163
2.5905
Y
Y
Y

164
2.5826
Y
Y
Y

165
2.5472
Y
Y
Y

166
2.5630
Y
Y
Y

167
2.5325
Y
Y
Y

168
2.3520
N
N
N

169
2.5124
Y
Y
Y

170
2.5642
Y
Y
Y

171
2.5820
Y
Y
Y

172
2.5802
Y
Y
Y

173
2.6102
Y
Y
Y

174
2.5501
Y
Y
Y

175
2.5321
Y
Y
Y

176
2.5321
Y
Y
Y

177
2.5703
Y
Y
Y

178
2.5903
Y
Y
Y

179
2.5836
Y
Y
Y

180
2.6025
Y
Y
Y

181
2.5123
Y
Y
Y

182
2.5802
Y
Y
Y

183
2.5621
Y
Y
Y

184
2.5421
Y
Y
Y

185
2.5478
Y
Y
Y

186
2.6130
Y
Y
Y

187
2.6012
Y
Y
Y

188
2.5891
Y
Y
Y

189
2.6472
Y
Y
Y

190
2.5747
Y
Y
Y

191
2.5201
Y
Y
Y

192
2.4512
Y
Y
Y

193
2.5120
Y
Y
Y

194
2.5362
Y
Y
Y

195
2.4352
Y
N
Y

196
2.5210
Y
Y
Y

197
2.4258
Y
N
N

198
2.4365
Y
Y
Y

199
2.4524
Y
Y
Y

200
2.4125
Y
N
N

From the test results in Table 2, it can be seen that the multi-intermediate state machine algorithm has a higher accuracy than the fixed threshold algorithm and ATA. The detection accuracy of the multi-intermediate state machine algorithm reaches 98.5%. It can also be seen that each algorithm has a certain probability of misjudgments. The reason for these misjudgments may be the interference of wireless signals sent by external radio equipment [12].

Up to now, the detection accuracy of some research vehicle detection systems is mostly concentrated in 75%–90%. For example, the vehicle detection system designed uses a HMC1022 as the detection sensor and uses the vehicle classification algorithm in Reference [13], which has a detection accuracy of about 85.7%.

7. Conclusion

This project has analyzed several common vehicle presence detection algorithms, such as the fixed threshold algorithm and ATA. And, the multi-intermediate state machine algorithm is used as the vehicle detection method in the hardware system. By adding an intermediate state variable, the algorithm can judge when the vehicle leaves the sensor detection node, rather than when the vehicle enters the detection area, thus the detection accuracy is improved. The experimental results show that, because of the simple and reasonable traffic flow algorithm adopted by the system and the correct circuit design, the system has high detection accuracy, fast running speed, and good detection effect and can be widely used in the traffic field of large- and medium-sized cities.

Data Availability

http://file.imperial-vision.com/f/8ffd6993fa/?raw=1

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This research was funded by National Natural Science Foundation of China Youth Project (no. 61802065).

References

X. Y. Liu, H. Wei, and C. H. Liu, “Marker-free coil-misalignment detection approach using TMR sensor array for dynamic wireless charging of electric vehicles,” IEEE Transactions On Magnetics, vol. 54, no. 11, Article ID 2844863, 2018.

U. P. Borole, S. Sasikala, I. R. Kulkarni, P. Saravanan, H. C. Barshilia, and P. Chowdhury, “Highly sensitive giant magnetoresistance (GMR) based ultra low differential pressure sensor,” Sensors and Actuators A-Physical, vol. 280, pp. 125–131, 2018.

V. S. Luong, A. T. Nguyen, Q. K. Hoang et al., “Magnetoresistive performances in exchange-biased spin valves and their roles in low-field magnetic sensing applications,” Journal of Science: Advanced Materials and Devices, vol. 3, no. 4, pp. 399–405, 2018.

C. X. Chang, Y. G. Wang, and Y. L. Zhan, “Vehicle classification under different feature sets with a single anisotropic magnetoresistive sensor,” IEICE Transactions On Electronics Communications and Computer Sciences, vol. E100A, no. 2, pp. 440–447, 2017.

Y. S. Byun, R. G. Jeong, and S. W. Kang, “Vehicle position estimation based on magnetic markers: enhanced accuracy by compensation of time delays,” Sensors (Basel, Switzerland), vol. 15, no. 11, pp. 28807–28825, 2015.

C. Xu, Y. G. Wang, B. X. He, and F. G. Li, “Vehicle classification using an imbalanced dataset based on a single magnetic sensor,” Sensors, vol. 18, no. 6, p. 1690, 2018.

C. F. Ye, R. Anders, and U. Lalita, “Using magnetoresistive sensors in nondestructive testing,” Materials Evaluation, vol. 76, no. 2, pp. 144–154, 2018.

J. H. Hu, M. C. Pan, J. F. Hu et al., “Resolution improvement of low frequency AC magnetic field detection for modulated MR sensors,” Review of Scientific Instruments, vol. 88, no. 9, Article ID 095006, 2017.

X. P. Zeng, S. Song, J. S. Wang, H. Dai, and S. Su, “An analytic algorithm based position and orientation detection using a tri-axial magnetoresistive sensor,” in Proceedings of the 16th IEEE Sensors Conference, pp. 1158–1160, Glasgow, UK, November 2017.

F. Nording, S. Weber, F. Ludwig, and M. Schilling, “Measurement system for temperature dependent noise characterization of magnetoresistive sensors,” Review of Scientific Instruments, vol. 88, no. 3, Article ID 035006, 2017.

X. Liu, C. Liu, W. Han, and P. W. T. Pong, “Design and implementation of a multi-purpose TMR sensor matrix for wireless electric vehicle charging,” IEEE Sensors Journal, vol. 19, no. 5, pp. 1683–1692, 2019.

W. Han, K. T. Chau, C. Q. Jiang, and W. Liu, “Accurate position detection in wireless power transfer using magnetoresistive sensors for implant applications,” IEEE Transactions on Magnetics, vol. 54, no. 11, Article ID 2843796, 2018.

X. Lei, Y. Y. Hou, and Q. S. Wu, “Algorithm design of vehicle type classification for geomagnetic vehicle detector,” Journal of Chang'an University (Natural Science Edition), vol. 33, no. 5, pp. 118–123, 2013.