Professional Documents
Culture Documents
Practical Design of A Vehicle Magneti Signature Generator Manuscript
Practical Design of A Vehicle Magneti Signature Generator Manuscript
rs (corresponding author)
1
Department of Microelectronics, University of Niš, Faculty of Electronic Engineering, Niš, Serbia
2
Department of Theoretical Electrical Engineering, University of Niš, Faculty of Electronic Engineering, Niš,
Serbia
3
Public Enterprise ''Roads of Serbia'', 11000 Belgrade, Serbia.
Abstract
Detection of vehicles and determination of their type, moving direction and velocity can be done using the
distortions of the Earth’s magnetic field. These distortions differ for each type of a vehicle and are called
magnetic signatures. Facilitating development of vehicle detector requires a generator of the same magnetic
field disturbances in laboratory conditions as produced by a specific vehicle. The experimental setup for
measuring the magnetic field distortion caused by a vehicle was presented and, based on the obtained values
the magnetic signature generator was designed. The generator consists of a solenoid with a copper wire
wound on the body made by the 3D printer, and an arbitrary function generator RIGOL DG1022Z.
Determination of the solenoid parameters, and a voltage level of a generator are described thoroughly.
Magnetic signatures of four different vehicles are generated and compared with measured ones by the
Keywords
magnetic field measurement, magnetic signature generator, vehicle detector, multilayer solenoid, signal
Introduction
Some of the first applications of magnetic sensors were navigation and direction-founding. Over time, they
expanded the field of application as they became more accurate and sophisticated. Due to the high sensitivity
and accuracy, they have found a significant place in Intelligent transportation systems (ITS). Vehicle
detection and counting is one part of the ITS that was designed to collect information about traffic status and
Vehicle can be detected by analyzing distortions of the Earth’s magnetic field, considering that the magnetic
field of the Earth is uniform over a wide area and that the presence of an object, made of ferromagnetic
materials, creates local disturbances in this magnetic field. For this purpose, the magnetic sensor is placed on
the road or the pavement (Wang et al., 2018) and as a vehicle approaching the sensor, the measured value of
the magnetic field is changing. When the measured value is above the predefined threshold that means there is
Beside the vehicle presence (whether it is moving or standing still), it is also possible to determine the type of
a vehicle, moving direction and velocity of a vehicle. The value of the magnetic field depends on the
environment, but this does not affect the changes caused by the ferromagnetic material when it is near the
sensor.
The vehicle detectors have to operate in different traffic conditions, such as slow-moving and congested
traffic zones (Yang and Lei, 2015). One way to detect a vehicle's presence is using a single-axis magnetic
sensor (Caruso and Withanawasam, 1999). The measurements that provide more information about the
magnetic field can be done by a 3-axis magnetometer (Vançin and Erdem, 2017). The sensor node equipped
with 3-axis magnetic sensor HMC5983L, is also used for vehicle detection and determining the type of the
vehicle. The vehicle presence can be detected based on the magnitude of the magnetic field, and the duration
of magnetic field distortion (proximity vehicle to the sensor) (Vançin and Erdem, 2018). There are different
types of magnetic sensors used for vehicle detection and determining the type of a vehicle, and one of them is
based on MEMS technology (Lan and Shi, 2009). The length estimation of a vehicle in real traffic condition
The device for vehicle detection and recognition has to provide accurate information regardless of the velocity
and type of the vehicle, as well as the environment and weather conditions. Considering these facts, it is clear
that designing of vehicle detectors represents a demanding task. Also, the installation process requires time
and material resources and causes traffic stops. In case that detector does not operate properly, uninstallation,
troubleshooting and reinstallation have to be performed, which additionally increases costs. Therefore, it is of
great importance to examine the reliability of the detector in detail before installation.
One way for that is creating the simulation environment. Simulation enables the development of new systems,
compares alternative designs, troubleshoot existing systems, and observes behavior before the prototype is
completed, thus saving resources (Hosseinpour and Hajihosseini, 2009). The virtual simulation environment,
described in (Belenguer et al., 2019), includes different complex models that characterize vehicles as multiple
metal plates of different sizes and heights, which simplifies analyzing the changes in the magnetic field.
Information about traffic occupancy, obtained by vehicle detectors, can be used to control traffic lights. The
process of calculation and simulation of traffic light timing operation should be performed in the simulator
before practical realization (Dissanayake et al., 2009). The functional tests can be done using the simulation.
It includes test patterns applied to the inputs and the evaluation of the outputs.
The main goal of this paper is to present the real simulation environment (magnetic signature generator) for
testing the functionality of the vehicle detectors, composed of the solenoid and an arbitrary signal generator.
The input parameters are different types of vehicles moving with different velocities, and the output
This paper is organized as follows. First, a short introduction to the measurement of the Earth’s magnetic field
is provided. Then, based on these measurements the parameters of a solenoid as well as a shape of a signal
generator are determined. Further, magnetic field distortions introduced by vehicles and produced by our
generator are compared by a Pearson's correlation coefficient and a root mean square error. Finally, a short
The block diagram of the experimental setup for measurement of the magnetic field of the Earth’s is shown in
Figure 1.
Figure 1. The block diagram of the experimental setup for magnetic field measurement.
The magnetic field was measured by the digital magnetic field sensor BM1422AGMV (ROHM
Semiconductor, 2016). The new data was sampled every 20 ms by the microcontroller PIC18F45K22
(Microchip, 2010-2021), and transmitted via RS485 communication lines to the PC computer. The
experimental setup positioned on the road and the vehicle that passed over it, are shown in Figure 2.
Figure 2. The placement of the experimental setup on the road during the measurement.
Measured values induced by the vehicle are shown in Figure 3. The vehicle model was VW Polo9N.
Figure 3. The distortion of the Earth’s magnetic field induced by the vehicle VW Polo9N.
In this case the maximum changes of magnetic field per x, y and z-axis are |ΔBX|=22.17 μT, |ΔBY|=24.32 μT,
|ΔBZ|=40.23 μT, respectively. Thus, the magnetic field generator has to generate the same or higher values of
the magnetic field. These values are essential for determining parameters of the solenoid geometry. In other
words, the solenoid should generate a magnetic field of 100 μT at point A, when the current is maximum. The
maximum value of current, that was considered in this research is 20 mA. This current intensity is chosen
because practical reasons. It can be generated by professional signal generators or a simple signal generator
based on a microcontroller.
Design of a solenoid
The intensity of the magnetic field generated by the solenoid depends on the current, and the geometric
parameters. The magnetic field generated by the solenoid is directly proportional to the current intensity, both
for DC and AC (Cai et al., 2019), and its intensity for multilayer solenoids depends on several factors, such as
inner radius, outer radius, length, and the number of turns (Supardiyono and Saptaaji, 2007; Bowtell and
Point A is located on the radial axis of the solenoid, and the distance from this point to the center of the
solenoid is z. So, the values of geometric parameters of the solenoid have to be calculated. Three solenoids are
necessary to generate changes per all axes, and the process of calculation and construction of all solenoids is
the same.
The windings are wound on the body of solenoid of cylindrical shape that is limited by two boundary surfaces
(Figure 4). The body of the solenoid was made of PLA material using a 3D printer. Inside the solenoid body
is a cavity of diameter d=4 mm. The solenoid was formed by wrapping wire around the body. To get a higher
value of magnetic field intensity, the multilayer solenoid was formed by wild winding.
Figure 1. The shape and the geometrical parameters of the wild winding solenoid.
The diameter of a wire is d0=0.12 mm. The length of a solenoid l=12 mm enables 100 wire turns per layer.
The inner radius is r1=3 mm and the outer radius can be calculated using equation (1):
d02 N
r2 = r1 + , (1)
l
where N denotes the number of turns. The intensity of the magnetic field at a multilayer solenoid axis can be
l
2
l
2
r2 + r22 + − z r2 + r22 + + z
0 NI l 2 l 2
B( z ) = − z ln + + z ln ,
2l (r2 − r1 ) 2
(2)
l
2
2 l
2
r1 + r1
2
+ − z r1 + r1
2
+ + z
2 2
where intensity of the current through the solenoid is denoted by I, and 0 = 4 10 −7 H/ m is magnetic
permeability of a vacuum.
The number of layers ranging from one to ten assures the number of turns ranging from 100 to 1000,
respectively. If solenoid has different values of turns (different outer radius) it generates different intensities
of the magnetic field on the radial axis. These values were calculated using equation (2) and shown in
Figure 5.
Figure 2. Magnetic field on the radial axis of a solenoid for different number of turns.
The magnetic field has the maximum value at the center of the solenoid. The amplitude of the magnetic field
intensity increases with the number of turns. However, the larger number of turns induces more
Due to the small size of the solenoid, the sensor cannot be placed in its cavity. The boundary surface of a
thickness db=2 mm imposes a sensor at minimal distance of z=l/2+db=8 mm with respect to the center of the
solenoid. Therefore, a magnetic field intensity of 100 μT has to be produced at z greater or equal 8 mm by the
solenoid observed above. Hence, the intersection points between 100 μT magnetic field intensity and curves
that represent the magnetic field generated by the solenoids of the different numbers of turns should be found,
Figure 3. The magnetic field on the part of the radial axis of the solenoid, for different number of turns.
The magnetic field at all presented points A-I is equal to 100 μT. The value of z represents the distance from
the center of the solenoid to the point on the radial axis of the solenoid where the magnetic field has the
specified intensity. It can be seen that solenoids made of 100 and 200 turns can generate the magnetic field of
100 μT only at a distance smaller than 8 mm (the grey part of Figure 6). The solenoids with 300 or more turns
can generate 100 μT outside the cavity, and the distance from the center of the solenoid, where the magnetic
field has desired intensity, increases when the solenoid has more turns.
For experimental measurement of the magnetic field, generated by the described solenoids, it is necessary to
make the holder for the solenoid and the magnetic sensor. The solenoid should be placed over the sensor, in a
way that the radial axis of the solenoid and the z-axis of the sensor should be in the same line. Also, it should
be possible to change the distance between the sensor and the solenoid. It is performed with 3D printer
(Figure 7) and using the same material as it was used for the body of the solenoids.
Figure 4. The holder for the solenoid and the magnetic field sensor, made with 3D printer.
The sensor is fixed to the bottom of the holder. The solenoid can be moved up and down by moving the upper
supporter. With the presented setup, it is possible to measure the magnetic field outside the solenoid at the
same distance as it was done in the theoretical part. The obtained results are shown in Figure 8.
Figure 5. The magnetic field on the part of the radial axis of the solenoid for different number of turns,
These results show that it is not possible to generate the magnetic field of 100 μT outside the solenoid, if the
number of turns is 100, 200 or 300, in real conditions. With this number of turns, the magnetic field has
desired intensity at the points inside the solenoids. The intensity of the magnetic field, when the distance is
z=8 mm and the number of turns 900 and 1000, is higher than 340 μT (the maximum value that sensor
BM1422AGMV can measure). Because of that, two values are missing on the part of Figure 10 that is framed
by the dashed line. The magnetic field at points D’-I’ has the same intensity as in case with theoretical results
(points D-I). The values of z for all presented points, for both theoretical calculation and the experimental
Number of turns The distance from the center of the solenoid - z[mm]
cavity
cavity
cavity
The solenoid generates smaller magnetic field intensity in real conditions than the value calculated in theory,
at the same distance from its center. The theoretical model is based on ideal, layer winding solenoid and in
practical design the solenoids were made by wild winding. Considering this, and also the finite thickness of
the lacquer on the wire, the outer radius of the solenoid is larger than in theory, as is shown in Figure 9.
Further, based on equation (2), the increased value of the outer radius contributes to a smaller value of
generated magnetic field. PLA is not a magnetic material, and it does not contribute to increasing the
Figure 6. The outer radius of the solenoid for different number of turns.
For the further design of the magnetic field simulator, the solenoid with 800 turns was selected. The resistance
As it already said, the magnetic field generated by the solenoid should have the same shape as the vehicle’s
signature. For that purpose, the voltage generator RIGOL DG1022Z was used, because it can generate an
arbitrary waveform voltage signal reading the values from a file. Hence, the task is to create a file with
appropriate values of voltage level to drive the solenoid, and generate the same magnetic signature as the
vehicle. This file contains 8192 points that represent voltage values V[n], where n is the serial number of a
voltage level (one of 8192 points). These values are obtained by dividing the measured changes of the
Bm n
V n = ,1 n N . (3)
k1
Value ΔBm[n] denotes the difference between the measured value of the magnetic field and the previous
baseline value or Bm[n]- Bbase[n-1]. The baseline value is calculated based on the measured, using the slow
rate limiter filter (Microchip, 2010-2013). All values of ΔBm[n] are inserted into the array, and 8192 points
were obtained by linear interpolation. The vehicle’s signature, shown in Figure 3, consists of increasing and
decreasing the magnetic field per z-axis. Therefore, the current through the solenoid is alternating current, and
the signal generator produces alternating voltage. Because of that, the effective values of the voltage and the
current have to be used in observation. So, the intensity of the current through the solenoid is described by
equation (4):
where keff represents the ratio between maximum and effective values of voltage, and Rtotal represents the sum
of all series resistance in the RL circuit. That includes RL, R, and RW that represent the resistance of the
solenoid, resistance connected in series with the solenoid, and the resistance of the wires, respectively. The
resistance Rtotal should limit the current through the solenoid up to the 20 mA, when the voltage of the signal
generator is 5 V. In this case, the measured value of current was 20.05 mA, and the generated magnetic field
The change of the magnetic field is not equal to 100 µT because the distance from the center of the solenoid
to the sensor is not exactly 10.95974 mm (as presented in Table 1), but the obtained change has satisfactory
precision.
Figure 7. The magnetic field generated by the solenoid (V=0 V, I=0 mA; V=5 V, I=20.05 mA).
Substituting the right part of equation (3) into equation (4), equation (5) was obtained:
keff Bm n
I n = . (5)
Rtotal k1
If this current flows through the solenoid, the generated magnetic field, Bg[n], can be described by
equation (6).
Bg n = I n k2 . (6)
Coefficient k2 describes the proportionality of the generated magnetic field and the geometrical parameters of
the solenoid. Since selected solenoid produces 99.5 µT for the current intensity of 20.05 mA, it can be
considered that the value of k2=5 mT/A. The generated magnetic field Bg[n] should be equal to the measured
ΔBm[n]. Based on that fact, and equations (5) and (6), it can be written:
keff Bm n Bg n
= , or
Rtotal k1 k2
keff k2 = Rtotal k1
Thus, for the calculation of the value k1, it is necessary to know the value of keff. The voltage signal is directly
proportional to the magnetic signature and it has an arbitrary shape, so the ratio between the maximum and
effective level of voltage cannot be calculated mathematically. Because of that, the value of k1 has to be found
experimentally. The idea is to find the best matching between the measured and the generated magnetic field
for the different values of k1. Some of the generated signatures, that correspond to the different value of k1 are
All generated signatures have a shape that is very similar to the measured one, but their intensity depends on
the coefficient k1. The best matching between the measured and the generated magnetic signature is obtained
when the coefficient k1 is 16 µT/V. Finally, the values of coefficient keff can be calculated using the values of
k1 Rtotal
keff = = 0.7912 .
k2
Results
The parameters of four vehicles whose magnetic signatures were measured are shown in Table 2. Also, the
described process of creating appropriate files for the signal generator for all noted vehicles was done.
Table 2. The characteristics of the vehicles whose magnetic signatures were measured.
[mm] [km/h]
VW Polo 9N
3743 165 960 20
Peugeot 307
4202 120 1243 30
Fiat Grande
KIA Stonic
4140 180 1157 50
The magnetic signature of a vehicle depends on several vehicle parameters. The duration of the magnetic
signature is denoted by the vehicle’s length and vehicle’s velocity. The intensity of magnetic signature (value
of maximum distortion) depends on the vehicle’s weight (amount of ferromagnetic material) and the vehicle’s
ground clearance (the gap between the road and the vehicle). Finally, the distribution of ferromagnetic
material inside the vehicle influences the shape of the magnetic signature. The measured signatures of four
selected vehicles and the magnetic signatures generated using the described magnetic field generator are
Figure 9. The measured and generated magnetic signatures of the different types of vehicles.
As can see, the generated signature is almost identical to the measured for all four vehicles. The duration of
the magnetic signature of Peugeot 307 is longer than VW Polo9N, even the velocity was higher. It can be
concluded that the duration of the magnetic signature does not depend only on the vehicle’s velocity but also
on vehicle’s length. That is the consequence of the different distribution of ferromagnetic materials inside the
vehicles.
The equality between the measured and the generated signatures can be approved by calculating the
correlation and difference between them. Equation 7 represents the Pearson’s correlation coefficient rX,Y, and
describes the degree of linear correlation between these two data sets (Kundrata et al., 2020). If the value of
the correlation coefficient is 1, it means that there is a perfect positive correlation between values.
N
N N
N X [n]Y [n] − X [n] Y [n]
rX ,Y = n =1 n =1 n =1 . (7)
2 2
N
N N
N
N X 2 [ n] − X [ n] N Y 2 [ n] − Y [ n]
n =1 n =1 n =1 n =1
In this case, X[n] represents the generated magnetic field and the Y[n] is the measured values, and N is the
total number of samples. The sampling period, as during the first measurement was 20 ms. The obtained
values are presented in Table 3, and they confirm the high level of correlation between the measured and
Table 3. The linear correlation and difference between the measured and the generated signatures.
provide a guarantee that two presented curves are equal. To approve equality between curves, the Root Mean
Square Error (RMSE), described by equation 8, was used (Chai and Draxler, 2014).
( X [ n] − Y [ n] )
2
N
RMSE =
n =1 N
(8)
The values X[n], Y[n], and N represent the same quantities such in equation (7). The calculated values show
that there is a high degree of equality between all generated and measured values. So, the described principle
of creating the solenoid, and the signal generator can be applied to generate the magnetic signatures of
Conclusion
Vehicles tend to distort the Earth’s magnetic field lines due to their metal skeletons. This distortion is called a
vehicle signature. Using this signature, we can detect a vehicle on a road or determine its type or velocity.
Design and testing of such a detector in a laboratory environment require a generator of the same distortions
We produce the magnetic signatures using a solenoid supplied by a generator of arbitrary shaped signals. The
parameters of a solenoid, and a signal are determined by measured values of magnetic field intensity
measured values. The presented results show the high matching level between signatures obtained in these
two ways for all four vehicles, so the described magnetic field simulator can generate magnetic signatures of
The main goal is creating this generator using the microcontroller, and we aim to obtain magnetic signatures
for a lot of different vehicles. Based on that, a vehicle detector and identifier will be developed.
Acknowledgements
The described research is done in cooperation with Public Enterprise ''Roads of Serbia'', Serbia.
Funding
This work was supported by the Serbian Ministry of Education, Science and Technological Development
Data availability
All data included in this study are available upon request by contacting the corresponding author.
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or
References
Basharat, M., et al. (2017) ‘Design and Analysis of Multilayer Solenoid Coil for Faraday Modulator’,
International Conference on Mechanical, Material and Aerospace Engineering, 12-14 May 2017. doi:
10.1051/matecconf/201711404004.
Belenguer, MF, et al., (2019) ‘Vehicle modeling for the analysis of the response of detectors based on
Bowtell, R, Robyr, R, (1998) ‘Multilayer Gradient Coil Design’, Journal of magnetic resonance, 131(2), pp.
Cai, W, et al., (2019). ‘Magnetic field analysis of solenoid driven by alternating current’, Journal of Physics:
Caruso, MJ, Withanawasam, LS, (1999) ‘Vehicle detection and compass applications using
AMR magnetic sensors’,Sensors Expo (1999 : Baltimore, Md.). Proceedings, pp. 477-489.
Chai, T, Draxler, RR (2014) ‘Root mean square error (RMSE) or mean absolute error (MAE)? – Arguments
against avoiding RMSE in the literature’, Geoscientific Model Development, 7(3), pp. 1247–1250.
doi:10.5194/gmd-7-1247-2014.
Datta, S. (2007) ‘Electric and Magnetic Fields from a Circular Coil Using Elliptic Integrals”, Physics
Education.
Dissanayake, DT, et al., (2009) ‘Real-time dynamic traffic light timing adaptation algorithm and simulation
software’, International Conference on Industrial and Information Systems (ICIIS), 28-31 Dec. 2009, pp. 563-
Kundrata, J., et al. (2020) ‘Comparison of Pearson correlation coefficient and distance correlation in
Convention on Information, Communication and Electronic Technology (MIPRO), 28 Sept.-2 Oct. 2020. doi:
10.23919/MIPRO48935.2020.9245325.
Lan, J, Shi, Y, (2009)‘Vehicle Detection and Recognition Based on a MEMS Magnetic Sensor’, 4th IEEE
International Conference on Nano/Micro Engineered and Molecular Systems,5-8 Jan. 2009, pp. 404-408. doi:
10.1109/NEMS.2009.5068605.
Technology.Available at https://ww1.microchip.com/downloads/en/DeviceDoc/PIC18(L)F2X-4XK22-Data-
Miklusis, D, et al., (2021) ‘Research of Distorted Vehicle Magnetic Signatures Recognitions, for Length
https://fscdn.rohm.com/en/products/databook/datasheet/ic/sensor/geomagnetic/bm1422agmv-e.pdf (Accessed
10 Dec. 2021).
Supardiyono, B, Saptaaji, R, (2007) ‘Calculation of Magnetic Field of the Multi Layer Solenoid’, Proceedings
of the Scientific Meeting and Presentation on Basic Research in Nuclear of the Science and Technology part
Vançin, S, Erdem, E, (2018) ‘Detection of the Vehicle Direction with Adaptive Threshold Algorithm Using
Magnetic Sensor Nodes’, Journal of Polytechnic, 21(2), pp. 333-340. doi: 10.2339/politeknik.389586.
Wang, J., et al. (2018) ‘Analysis of the Magnetic Field in the Cavity of Multi-Layer Winding Electromagnetic
Wang, Q, et al., (2018) ‘Roadside Magnetic Sensor System for Vehicle Detection in Urban Environments’,
doi:10.1109/tits.2017.2723908.
Yang B, Lei, Y, (2015) ‘Vehicle Detection and Classification for Low-Speed Congested Traffic With
Anisotropic Magnetoresistive Sensor’, IEEE Sensors Journal, 15(2), pp. 1132-1138. doi:
10.1109/JSEN.2014.2359014.