The rapid development of new energy vehicles has placed unprecedented demands on the performance and safety of the electric vehicle battery. Among the many parameters that must be monitored in a battery management system, current stands out as a critical quantity for state-of-charge estimation, state-of-health diagnosis, and thermal runaway prevention. In the limited internal space of an electric vehicle battery, however, conventional current sensors often struggle to achieve both compactness and high accuracy. This work focuses on a Hall-element elliptical array current sensor designed specifically for rectangular busbars used in electric vehicle battery systems. The proposed sensor abandons the traditional magnetic core and uses a number of Hall elements arranged in an elliptical contour around the conductor. This approach reduces installation area and weight while preserving the ability to measure high currents with high precision.

In recent years, the market share of electric vehicles has grown rapidly. With the mass production of new energy vehicles, the integration density of power batteries has increased, and the available space for sensing devices has become extremely limited. A current sensor for an electric vehicle battery must therefore be not only accurate but also lightweight and compact. In this work, I first discuss the fundamentals of magnetic field sensing, including the Hall effect, and then describe the design of an elliptical Hall sensor array. I also propose a full-temperature-domain calibration algorithm to reduce initial errors caused by component spread, and a grey wolf optimizer back-propagation neural network (GWO-BP) error optimization algorithm to reduce eccentricity and tilt errors. The experimental results demonstrate that the proposed sensor achieves a measurement accuracy within 3‰ across a wide temperature range and substantially reduces the errors caused by conductor misalignment.
Magnetic Field Sensing Fundamentals
Magnetic field sensors used in current measurement can be broadly divided into fluxgate sensors and Hall sensors. The fluxgate effect relies on the nonlinear permeability of soft magnetic materials. When the magnetic core is driven into saturation, the second harmonic component of the induced voltage is proportional to the external field. Fluxgate sensors provide very high resolution, but they require a core and complex excitation circuits, which makes them relatively bulky. In an electric vehicle battery, where space is scarce, this is a serious disadvantage.
The Hall effect is the basis of the Hall sensor. When a current-carrying conductor is placed in a perpendicular magnetic field, the Lorentz force deflects the charge carriers and creates a transverse electric field. At equilibrium, the Hall voltage \(V_H\) can be written as
$$
V_H = \frac{IB}{nqd} = K_H B,
$$
where \(I\) is the bias current through the Hall plate, \(B\) is the magnetic flux density, \(n\) is the carrier concentration, \(q\) is the elementary charge, \(d\) is the thickness of the Hall plate, and \(K_H\) is the Hall sensitivity. From this equation, the magnetic field around a current-carrying busbar can be measured by reading the Hall voltage.
Hall current sensors can be implemented in open-loop or closed-loop configurations. In the open-loop structure, a magnetic core concentrates the magnetic field into an air gap, and a Hall element placed in the gap provides an output voltage proportional to the current. The closed-loop configuration additionally uses a secondary coil to generate a compensating magnetic field, thus operating in a magnetic balance mode. Although closed-loop sensors usually provide higher accuracy, they require more power and are larger. For an electric vehicle battery, the array-based sensor provides a better trade-off because it removes the magnetic core entirely and reconstructs the current by integrating the magnetic field along a closed path around the conductor.
Array-Based Hall Current Sensor Theory
The array-based Hall current sensor is based on Ampère’s circuital law:
$$
\oint \mathbf{H} \cdot \mathrm{d}\boldsymbol{l} = I,
$$
where \(\mathbf{H}\) is the magnetic field strength and \(I\) is the current enclosed by the integration path. If \(N\) Hall sensors are placed along a closed contour around the conductor, the current can be approximated as
$$
I_{\mathrm{calc}} = \sum_{i=1}^{N} H_{\mathrm{MFS},i} \, \Delta s_i,
$$
where \(H_{\mathrm{MFS},i}\) is the magnetic field component sensed by the \(i\)-th Hall element along its sensitive axis and \(\Delta s_i\) is the arc length segment associated with that element.
For a rectangular busbar commonly found in an electric vehicle battery, the magnetic field distribution around the conductor is not uniform. A circular array around a rectangular conductor either becomes too large or suffers from poor signal-to-noise ratio at points far from the conductor. A rectangular array follows the shape of the conductor, but the magnetic field changes rapidly at the corners, leading to integration errors. An elliptical array offers a compromise: it is more compact than a circular array and has a smoother field distribution than a rectangular array. Therefore, in this work I choose an elliptical array as the basis of the current sensor.
Elliptical Array Geometry and Parameter Selection
Two methods can be used to distribute Hall elements on an ellipse. The first is the projection method, in which a circular array is projected onto an ellipse using parallel projection. The second is the uniform curve segment length method (UCSL), where the ellipse is divided into curve segments of equal arc length. In this work, I use UCSL because it produces smaller integration errors when the number of sensors is fixed.
For an ellipse with semi-major axis \(a\) and semi-minor axis \(b\), the aspect ratio is defined as \(AR = b/a\). The coordinates of the \(i\)-th Hall element are obtained by first discretizing the ellipse into a large number of points and then searching for the point that corresponds to the desired arc length. The position of the \(i\)-th Hall element is given by
$$
P_{i-1} = \left( a \cos\frac{2\pi m_i}{K}, \; b \sin\frac{2\pi m_i}{K} \right),
$$
where \(K\) is the number of discretization points and \(m_i\) is the index satisfying the arc-length condition. The sensitive axis direction is the tangent direction at that point:
$$
\boldsymbol{t}_{i-1} = \frac{\left( -a\sin\frac{2\pi m_i}{K}, \; b\cos\frac{2\pi m_i}{K} \right)}{\sqrt{a^2 \sin^2\frac{2\pi m_i}{K} + b^2 \cos^2\frac{2\pi m_i}{K}}}.
$$
In the design, the semi-major axis is set to \(a = 30\) mm, which is compatible with the rectangular busbar size of 20 mm × 4 mm. The number of Hall elements and the aspect ratio are selected by calculating the theoretical current error using MATLAB. The results show that an array with \(N=6\) and \(AR=0.33\) provides both good accuracy and a small footprint. I also selected a seven-element array and a circular array for comparison.
| Array configuration | Number of Hall elements | Aspect ratio | Theoretical current error |
|---|---|---|---|
| Elliptical array | 6 | 0.33 | 0.35% |
| Elliptical array | 7 | 0.31 | 0.18% |
| Circular array | 6 | 1 | 0.24% |
| Circular array | 7 | 1 | 0.11% |
Although the circular array with seven elements has the lowest theoretical error, its installation area is much larger. The elliptical array with \(N=6\) and \(AR=0.33\) reduces the Y-direction envelope significantly, which makes it easier to install in the narrow space between adjacent cells in an electric vehicle battery. Therefore, this configuration is chosen as the main design in this work.
Hall Element Selection and Hardware Design
The Hall element is the core sensing component of the array. In this work, I selected two types of Hall devices. For the main six-element array, I used the AKM EQ-730L single-axis Hall sensor. This device has a sensitivity of 130 mV/mT, a supply voltage range of 3.0–5.5 V, and a magnetic range of ±18 mT. Its temperature range covers -40°C to 125°C, which satisfies the operating requirements of an electric vehicle battery. The main characteristics of this element are summarized in the following table.
| Parameter | Min | Typical | Max | Unit |
|---|---|---|---|---|
| Supply voltage | 3.0 | 5.0 | 5.5 | V |
| Supply current | – | 12 | – | mA |
| Output voltage | 10 | – | 90 | %Vcc |
| Sensitivity | 110 | 130 | 150 | mV/mT |
| Operating temperature | -40 | 25 | 125 | °C |
In addition to the single-axis sensors, I used the Infineon TLV493DA1B6 three-axis Hall sensor for the conductor-state estimation experiments. The three-axis sensor measures the X, Y and Z magnetic field components simultaneously, enabling the reconstruction of the three-dimensional field around an inclined conductor. Its supply voltage is 2.8–3.5 V and its sensitivity is approximately 10.2 LSB/mT.
The hardware circuit of the proposed current sensor consists of several modules. A programmable DC power supply provides 12 V power. The DC-DC converter module E1205SY converts 12 V to 5 V to supply the Hall elements and operational amplifiers. A TLV1117 low-dropout regulator converts 5 V to 3.3 V for the main microcontroller STM32F103C8T6. The Hall voltages are buffered by voltage followers and then summed by an adder circuit. The microcontroller samples the voltage signals through its 12-bit ADC and sends the processed current value through a CAN bus using the TJA1050 transceiver. This design is compact and suitable for integration in an electric vehicle battery pack.
Full Temperature Domain Calibration
Initial errors in a Hall array current sensor arise from component tolerances, soldering offsets, and amplifier nonlinearity. To reduce these errors, I designed a calibration procedure that operates at room temperature, low temperature, and high temperature. The calibration process converts the digital current telegram into an ADC digital signal \(ADC_{\mathrm{dif}}\) using:
$$
ADC_{\mathrm{dif}} = ADC_{\mathrm{high}} – ADC_{\mathrm{low}},
$$
where \(ADC_{\mathrm{high}}\) and \(ADC_{\mathrm{low}}\) are the decimal values of the first and second half-cycle samples. The measured output current is then
$$
I_{\mathrm{out}} = \frac{V_{\mathrm{ADC}}}{R},
$$
where \(R = 0.47\,\Omega\) and \(V_{\mathrm{ADC}}\) is obtained from the ADC voltage. The current deviation is
$$
\Delta I = I_{\mathrm{out}} – I_{\mathrm{ref}},
$$
where \(I_{\mathrm{ref}}\) is the reference current supplied by the high-power source. A first-order linear fit is applied to the relationship between \(I_{\mathrm{out}}\) and \(\Delta I\) for small, medium, and large current intervals:
$$
\Delta I_{\mathrm{fit}} = k_i I_{\mathrm{out}} + b_i.
$$
The compensated current is then calculated as
$$
I_{\mathrm{mea}} = I_{\mathrm{out}} – \Delta I_{\mathrm{fit}}.
$$
The relative error after compensation is defined as
$$
\Delta I_{\mathrm{re}} = \frac{\Delta I_{\mathrm{mea}}}{I_{\mathrm{ref}}} \times 1000\permille .
$$
At low temperature, the ambient temperature is \(-40^{\circ}\mathrm{C}\), at room temperature it is \(25^{\circ}\mathrm{C}\), and at high temperature it is \(125^{\circ}\mathrm{C}\). The temperature drift coefficient is evaluated separately for the low-temperature range and the high-temperature range:
$$
k_{\mathrm{low}} = \frac{l_i – k_i}{65}, \quad k_{\mathrm{high}} = \frac{h_i – k_i}{100},
$$
where \(l_i\) and \(h_i\) are the slopes of the linear fits at low and high temperatures. The combined drift coefficient is
$$
k = \frac{k_{\mathrm{low}} + k_{\mathrm{high}}}{2}.
$$
The temperature-compensated deviation is given by
$$
\Delta I_{\mathrm{fit,tem}} = (k_i + k T) I_{\mathrm{out}} + b_i,
$$
and the final calibrated current becomes
$$
I_{\mathrm{mea,tem}} = I_{\mathrm{out}} – \Delta I_{\mathrm{fit,tem}}.
$$
The calibration coefficients obtained for different temperature ranges and current ranges are shown in the following table.
| Current range | Direction | Slope at low temperature | Slope at room temperature | Slope at high temperature |
|---|---|---|---|---|
| Small current | Positive | -0.00349 | -0.00505 | -0.00369 |
| Small current | Negative | -0.00369 | -0.00508 | -0.00386 |
| Medium current | Positive | -0.00380 | -0.00367 | -0.00421 |
| Medium current | Negative | -0.00392 | -0.00395 | -0.00387 |
| Large current | Positive | -0.00272 | -0.00284 | -0.00618 |
| Large current | Negative | -0.00293 | -0.00316 | -0.00564 |
The temperature calibration results show that the initial error is reduced by 85.58% at room temperature, 62.59% at low temperature, and 42.99% at high temperature. After the full-temperature calibration, the relative error of the sensor is maintained within 3‰ over the whole temperature range. This is an important improvement for an electric vehicle battery current sensor.
Three-Dimensional Magnetic Field Model and Error Analysis
When the conductor inside the sensor is not exactly at the center of the elliptical array, the magnetic field sampled at the Hall element positions changes. The resulting error is called the eccentricity error. When the conductor is tilted with respect to the plane of the array, the projection of the conductor cross-section on the array plane changes, producing the tilt error. In order to analyze these errors, I developed a three-dimensional magnetic field model. Let the center of the ellipse be the coordinate origin. The conductor central axis is described by a unit direction vector
$$
\boldsymbol{l}_e = (m, n, p),
$$
where
$$
m = \sin\alpha \cos\beta, \quad n = \sin\alpha \sin\beta, \quad p = \cos\alpha.
$$
Here \(\alpha\) is the angle between the conductor axis and the positive Z-axis, and \(\beta\) is the angle between the projection of the conductor axis on the XOY plane and the positive X-axis. For a point \(P(a, b, 0)\) on the array plane, the distance to the conductor axis is
$$
\rho = |\boldsymbol{l}_e \times \overrightarrow{QP}|,
$$
where \(Q(x_0, y_0, 0)\) is the intersection of the conductor axis with the array plane. The magnetic field at \(P\) can be decomposed into three components. Under the assumption of uniform current density over the rectangular cross-section, the X-component is
$$
H_{ix} = \int_{S} \frac{I p (b-y’)}{2\pi A \left[(p(a-x’))^2 + (p(b-y’))^2 + (m(a-x’) + n(b-y’))^2\right]} \, \mathrm{d}x’\mathrm{d}y’,
$$
the Y-component is
$$
H_{iy} = \int_{S} \frac{I p (a-x’)}{2\pi A \left[(p(a-x’))^2 + (p(b-y’))^2 + (m(a-x’) + n(b-y’))^2\right]} \, \mathrm{d}x’\mathrm{d}y’,
$$
and the Z-component is
$$
H_{iz} = \int_{S} \frac{I \left(m(a-x’) + n(b-y’)\right)}{2\pi A \left[(p(a-x’))^2 + (p(b-y’))^2 + (m(a-x’) + n(b-y’))^2\right]} \, \mathrm{d}x’\mathrm{d}y’.
$$
In these equations, \(S\) is the projection of the tilted or eccentric conductor cross-section on the array plane, and \(A\) is the conductor cross-sectional area. The integration region is reconstructed from the conductor state parameters \(x_0\), \(y_0\), \(m\), \(n\) and \(p\). Once the field components are known, each Hall element output is converted into the magnetic field component along its sensitive axis, and the current is reconstructed using the discretized Ampère integral.
Eccentricity Error Analysis
For the chosen elliptical array, the conductor can be displaced along the X direction or the Y direction. The theoretical eccentricity error increases rapidly when the displacement becomes large. For example, when the conductor is displaced by 10 mm along the X direction, the current error reaches 4.18% without any compensation. When the conductor is displaced along the Y direction, the allowable range is smaller due to the short semi-minor axis, but the current error can still exceed 1% at the extreme position. The permissible eccentricity ranges for four different arrays are listed below.
| Array configuration | -X limit (mm) | +X limit (mm) | -Y limit (mm) | +Y limit (mm) |
|---|---|---|---|---|
| N=6, AR=0.33 | -10.5 | 10.5 | -2.1 | 2.1 |
| N=7, AR=0.31 | -10.7 | 10.7 | -2.0 | 2.0 |
| N=6, AR=1 | -14.9 | 14.9 | -20.9 | 20.9 |
| N=7, AR=1 | -14.9 | 14.9 | -20.9 | 20.9 |
Although the circular array allows a larger conductor displacement, its larger installation area is not suitable for an electric vehicle battery. The elliptical array, despite its tighter Y-direction clearance, offers a better trade-off in practical applications. The error analysis also indicates that the current error is approximately symmetric for positive and negative eccentricity in the X direction, and that the error is strongly influenced by the combination of X and Y displacements.
GWO-BP Neural Network for Conductor State Estimation
To reduce the eccentricity and tilt errors, the conductor state parameters must be estimated accurately. In this work, I used a three-axis Hall sensor to capture the magnetic field information around the conductor, and then estimated the conductor state parameters with a neural network. The BP neural network is a classical multilayer feedforward network that uses gradient descent to update its weights and thresholds. However, the traditional BP algorithm often becomes trapped in local optima. To overcome this problem, I used the grey wolf optimizer (GWO) to optimize the initial weights and thresholds of the BP network.
In the GWO algorithm, the search agents are divided into four levels: \(\alpha\), \(\beta\), \(\delta\) and \(\omega\). The distance between a grey wolf and its prey is
$$
\mathbf{D} = \left|\mathbf{C} \cdot \mathbf{X}_p(t) – \mathbf{X}(t)\right|,
$$
where
$$
\mathbf{C} = 2\mathbf{r}_2.
$$
The position update equation is
$$
\mathbf{X}(t+1) = \mathbf{X}_p(t) – \mathbf{A} \cdot \mathbf{D},
$$
with
$$
\mathbf{A} = 2a\mathbf{r}_1 – a,
$$
and \(a\) decreases linearly from 2 to 0 during the iteration process. The positions of the \(\omega\) wolves are updated according to the three best solutions \(\alpha\), \(\beta\) and \(\delta\):
$$
\mathbf{X}(t+1) = \frac{\mathbf{X}_\alpha + \mathbf{X}_\beta + \mathbf{X}_\delta}{3}.
$$
The proposed GWO-BP conductor state estimation model has an input layer of 18 nodes, corresponding to the three-axis magnetic outputs of six Hall elements. The hidden layer contains 12 nodes, and the output layer has 5 nodes, corresponding to \(x_0\), \(y_0\), \(m\), \(n\) and \(p\). The dataset for training is generated by finite-element simulation using COMSOL Multiphysics. The model performance is evaluated using mean absolute error, mean squared error, and mean absolute percentage error.
| Estimated parameter | Algorithm | MAE | MSE | MAPE |
|---|---|---|---|---|
| \(x_0\) | BP | 0.2272 | 0.0771 | 0.84% |
| \(x_0\) | GWO-BP | 0.0498 | 0.0041 | 1.04% |
| \(y_0\) | BP | 0.0619 | 0.0043 | 5.26% |
| \(y_0\) | GWO-BP | 0.0146 | 0.0004 | 1.06% |
| \(m\) | BP | 0.0124 | 0.0003 | 10.35% |
| \(m\) | GWO-BP | 0.0037 | 0.0001 | 2.86% |
| \(n\) | BP | 0.0071 | 0.0002 | 3.96% |
| \(n\) | GWO-BP | 0.0028 | 0.0001 | 0.86% |
| \(p\) | BP | 0.0143 | 0.0005 | 2.25% |
| \(p\) | GWO-BP | 0.0029 | 0.0001 | 0.42% |
For most parameters, GWO-BP significantly reduces the MAE and MSE compared with the standard BP network. In particular, the estimation error for \(m\), \(n\) and \(p\) is much smaller, which is important for the reconstruction of the integration region and the accurate calculation of the final current.
Experimental Test Platform
To validate the proposed sensor and algorithms, I built a hardware test platform that simulates the environment of an electric vehicle battery. The platform includes an industrial PC, a high-power programmable DC power supply, a current direction switching board, a data acquisition unit, a programmable DC power supply for the sensor, and a temperature chamber. The industrial PC controls the entire test sequence. The high-power supply generates currents from -1500 A to 1500 A. The switching board, which is based on an Arduino Nano, uses IGBTs to reverse the current direction. The data acquisition unit is a KEITHLEY DAQ6510 that scans all measurement channels and sends the data to the PC. The temperature chamber provides an ambient temperature range of -40°C to 150°C.
| Module | Equipment | Function |
|---|---|---|
| Host computer | ADVANTECH IPC-610-L | Control and data storage |
| Current source | AMETEK Sorensen SGX | Generate DC current |
| Current switching | Arduino-based switching board | Reverse current direction |
| Signal acquisition | KEITHLEY DAQ6510 | Multichannel measurement |
| Sensor power supply | TONGHUI TH6313 | 12 V sensor excitation |
| Temperature chamber | BOYI B-TH-120B | Control ambient temperature |
A LabVIEW-based software platform was also developed to automate the test procedure. The software allows the user to set multiple current points and multiple temperature points, monitor the test progress, and store the acquired data for offline analysis. This automated platform greatly improves the efficiency and repeatability of the tests.
Finite-Element Simulation
The finite-element simulation was carried out in COMSOL Multiphysics. The geometry includes a rectangular copper busbar with dimensions 20 mm × 4 mm and the surrounding air domain. The electrical conductivity of copper is set to \(5.998 \times 10^7\ \mathrm{S/m}\), and the air domain has zero conductivity. After meshing the model with adaptive refinement, I placed probes at the Hall element positions to obtain the magnetic flux density. The simulation results confirm that the field distribution around a rectangular conductor is approximately elliptical, which supports the use of an elliptical Hall array in an electric vehicle battery. The simulation also provides training data for the GWO-BP conductor state estimation model.
Eccentricity Error Reduction Experiments
After completing the full-temperature calibration, I used a special fixture to move the rectangular conductor to known eccentric positions. The current error was measured before optimization, after BP optimization, and after GWO-BP optimization. Figure 29 shows the X-direction eccentricity results. The original current error increases from zero at the center to about 4.18% at an X-displacement of 10 mm. After BP optimization, the error is reduced to about 2.30%. After GWO-BP optimization, the error is reduced to 1.46%, a reduction of 65.07% compared with the unoptimized case.
For the Y-direction eccentricity, the conductor displacement range is much smaller due to the small semi-minor axis. At a Y-displacement of 2.4 mm, the unoptimized error is about 0.94%. The BP algorithm reduces the error to around 0.70%, while the GWO-BP algorithm reduces it to 0.51%, corresponding to a 45.74% reduction. The error reduction achieved by the proposed GWO-BP algorithm is especially meaningful for the safe and reliable operation of an electric vehicle battery, where the busbar may shift because of vibration or thermal expansion.
Tilt Error Reduction Experiments
The tilt angle of the conductor also has a significant effect on the current measurement. When the conductor axis is tilted away from the Z-axis, the projection of the conductor cross-section on the sensor plane changes, causing the magnetic field at the Hall positions to change. The experimental results show that when \(\alpha = 45^\circ\), the unoptimized current error reaches about 12.37%. After applying the GWO-BP optimization, this error is reduced to 2.95%, corresponding to a 76.15% reduction. Similarly, for variation of \(\beta\), the maximum error is reduced by 62.92% after GWO-BP optimization. These results confirm that the proposed algorithm can substantially reduce the tilt error and enhance the overall robustness of the current sensor.
Measurement Accuracy Verification
Finally, I tested the accuracy of the proposed sensor by applying currents in the range of -1500 A to 1500 A at three ambient temperatures: -40°C, 25°C and 125°C. Three samples were tested at each temperature to verify repeatability. The measured current relative deviations at -40°C, 25°C and 125°C are all below 3‰. Although the error at the extremes of the temperature range is slightly larger than at room temperature, the sensor still satisfies the accuracy requirement for an electric vehicle battery. The experimental results demonstrate that the proposed Hall-element elliptical array current sensor, together with the full-temperature calibration and the GWO-BP error optimization, forms a reliable solution for high-current measurement in the limited space of an electric vehicle battery.
Conclusion
In this work, I designed and tested a Hall-element elliptical array current sensor for the electric vehicle battery. The sensor structure is based on the uniform curve segment length method, with six Hall elements arranged on an ellipse with an aspect ratio of 0.33. A compact hardware circuit was developed using single-axis Hall sensors, an STM32 microcontroller, and a CAN interface. I also proposed a full-temperature-domain calibration algorithm that reduces the initial error of the sensor to less than 3‰ over a wide temperature range. For the errors caused by conductor eccentricity and tilt, I developed a three-dimensional current inversion model and a GWO-BP neural network to estimate the conductor state parameters. Experimental results show that the X-direction eccentricity error is reduced by 65.07%, the Y-direction eccentricity error is reduced by 45.74%, and the tilt error is reduced by 76.15%. These results indicate that the proposed sensor is well suited to the requirements of an electric vehicle battery, providing high accuracy, small size, light weight, and strong robustness against conductor misalignment.
