Machine Vision-Based Adaptive Measurement for Power Battery Modules

The rapid expansion of the new energy vehicle industry has placed unprecedented demands on the manufacturing precision of power battery modules. As the core energy storage unit of electric vehicles, the geometric accuracy of battery modules directly determines the safety, consistency, and energy density of the entire battery pack. Deviations in flatness exceeding ±0.1 mm on module surfaces can lead to uneven stress distribution among cells, reduced heat dissipation efficiency, and in severe cases, thermal runaway risks. Mainstream automotive manufacturers have escalated dimensional inspection requirements to ±0.05 mm accuracy levels. However, traditional contact coordinate measuring machines (CMM) and manual visual inspection methods suffer from low efficiency, high miss rates, and potential surface damage from contact probes. More critically, lithium battery production lines are accelerating their transition toward “multi-variety, small-batch” flexible manufacturing modes, where frequent model changeovers pose unprecedented challenges to inspection systems. Conventional detection equipment lacks flexible design, often requiring hours of reconfiguration after each changeover, severely constraining production efficiency. This study addresses these critical bottlenecks by developing an adaptive machine vision measurement system that integrates innovations in autofocus technology, camera calibration, and precision measurement algorithms for electric vehicle battery modules.

1. Introduction and Background

The inspection technology for power battery modules has evolved significantly over the past decade. The industry faces three primary challenges: frequent model changeovers requiring manual recalibration, complex surface characteristics including high-reflectivity metals and low-texture plastics that interfere with measurement accuracy, and insufficient hardware-software integration preventing closed-loop optimization. In addressing these challenges, machine vision technology has emerged as a promising solution due to its non-contact nature and high parallel processing capability. However, its application specifically to power battery modules requires overcoming several technical hurdles. The autofocus process after model changeovers currently depends heavily on human experience without quantitative evaluation standards, compromising measurement consistency. The subsequent calibration typically requires skilled technicians to perform multiple adjustments. Furthermore, existing point cloud fitting algorithms prove sensitive to noise from high-reflective surfaces, potentially introducing flatness calculation errors exceeding ±0.1 mm.

This research focuses on breaking through the traditional trade-off between precision and efficiency. For micron-level inspection requirements, we propose an improved RANSAC-based subpixel edge fitting algorithm, a robust PCA plane fitting algorithm, and a dual-camera affine transformation thickness measurement model. Experimental validation demonstrates that this approach maintains two-dimensional measurement accuracy at 0.02 mm and three-dimensional flatness measurement accuracy at 0.04 mm while reducing average detection time per module to 42.1 seconds. In terms of system flexibility, the study employs modular hardware architecture and motion-vision collaborative control strategies, successfully overcoming the rigid limitations of conventional “one machine for one type” systems. The integration of an innovative gradient-variance fused focusing evaluation function with vanishing point-constrained monocular camera calibration substantially reduces system calibration time. Practical application confirms the system’s compatibility with over 15 different battery module shapes, significantly decreasing changeover debugging costs and providing critical technical support for small-batch, customized production of electric vehicle battery modules.

2. System Hardware Design and Component Selection

The overall system architecture adopts a modular design philosophy comprising a motion control subsystem and a machine vision processing subsystem. The motion control subsystem uses an Advantech PCIe-1203 motion control card as the core controller, communicating via EtherCAT bus to manage servo drives and I/O signals for module inflow, lifting, flipping, and conveyor positioning. The vision detection subsystem employs cameras, lenses, and light sources for image acquisition, combined with an image processing analysis system to perform autofocus, camera calibration, three-dimensional reconstruction, and dimensional measurements.

The complete workflow proceeds as follows: the motion board detects module arrival through proximity switches, triggers lifting cylinders to raise the module from the conveyor, lowers mechanical arms with pressing and clamping cylinders to secure the module at the 2D camera photographing position, then triggers eight cameras mounted on active and driven arms to photograph the end-plate holes and lifting holes at four corners. This enables measurement of length, width, and end-plate hole diameters. After 2D measurement, the mechanical arms move to the 3D camera position, where XY-axis slides drive side-mounted 3D cameras to measure module width. Subsequently, the module is flipped, and 3D cameras scan both bottom and top surfaces to complete flatness and thickness measurements.

2.1 Motion Control System Design

For the servo system selection, we analyzed the dynamic requirements of each axis. The lifting axes employ rack-and-pinion transmission with a maximum load of 50 kg, a vertical stroke of 500 mm, and requirements of 0.3 m/s lifting speed and ±0.01 mm repeatability. Based on gear-rack dynamics modeling, the axial load thrust is approximately 500 N. With a module-2, 30-tooth helical gear having a radius of 0.03 m, the load torque is 15 Nm. Considering gear transmission efficiency and safety margins, the motor-side torque requirement is approximately 25 Nm. We selected the Inovance MS1H2-15C30CB motor (rated torque 4.9 Nm, rated speed 3000 rpm) with a 7:1 planetary reducer, providing an actual output torque of 34.3 Nm while maintaining motor speed at 1300 rpm. For the flip axes, the load moment of inertia is calculated as:

$$J = \frac{1}{12}m(L^2 + H^2) = \frac{1}{12} \times 50 \times (0.5^2 + 0.1^2) = 1.08 \, \text{kg·m}^2 \tag{2-1}$$

Equivalent to 0.0432 kg·m² at the motor side. For a 90° flip within 2 seconds with 0.2s acceleration, the angular acceleration requirement is 4.36 rad/s². The required torque is:

$$T = \frac{J \cdot \alpha \cdot \eta}{i} = \frac{0.0432 \times 4.36 \times 0.95}{5} = 0.039 \, \text{Nm} \tag{2-2}$$

For the distributed I/O system, we selected Beckhoff EL series modules with EtherCAT daisy-chain topology, reducing wiring by 90%, supporting IP67 protection, and providing delays under 1 μs per node. The EL modules incorporate built-in signal filtering to suppress high-frequency noise from variable frequency drives and servo drivers, ensuring phase synchronization errors between laser trigger signals and encoder feedback below 0.1 ms, which is critical for subsequent measurement precision.

2.2 Vision System Component Selection

The 2D camera selection was based on field-of-view requirements and measurement accuracy specifications. The field of view must accommodate end-plate holes of approximately 10 mm diameter, establishing a visual field of 30 mm × 30 mm. With the pixel accuracy requirement set at 0.02 mm/pixel, the single-direction resolution becomes 1500 pixels. Considering measurement stability with four pixels corresponding to one detection accuracy, the actual camera resolution requirement reaches at least 9 million pixels. Therefore, we selected the Hikvision MV-CH100-60GM camera with CMOS sensor technology, offering higher frame rates and cost-effectiveness compared to CCD alternatives.

For the 3D measurement task, we conducted a comprehensive comparison of available technologies as summarized in Table 2-1.

Table 2-1: Comparison of Mainstream 3D Camera Technologies
Technology Principle Advantages Disadvantages Application Scenarios
Binocular Vision Dual-camera parallax with stereo matching algorithm for depth calculation No active light source, low cost Texture-dependent, poor accuracy in low light, complex computation Static objects, indoor environments
Structured Light Projects encoded gratings/points, calculates 3D profile from deformation High static accuracy (0.01-0.1 mm) Weak ambient light resistance, blurring in dynamic scenes Small component inspection, face recognition
TOF Camera Measures laser pulse time-of-flight for distance calculation Strong dynamic performance, high frame rates (100+ fps) Low resolution, accuracy degradation at long distances Logistics sorting, robot navigation
Line Laser 3D Projects line laser, linear sensor synchronously scans, triangulation-based reconstruction High precision (micron level), strong interference resistance Requires motion platform, complex system integration Industrial precision measurement, large-scale scanning

Line laser technology demonstrated superior precision and stability for power battery module inspection, leading to its selection. The lens selection process considered the magnification relationship:

$$\beta = \frac{H_{sensor}}{H_{object}} = \frac{17.6}{30} \approx 0.587 \tag{2-3}$$

The focal length is derived from the working distance constraint:

$$f = \frac{WD}{\frac{1}{\beta} + 1} = \frac{150}{\frac{1}{0.587} + 1} \approx 42.4 \, \text{mm} \tag{2-4}$$

Based on this calculation, the Hikvision MVL-KF5028M high-resolution industrial lens was selected with a pixel accuracy of 0.012 mm/pixel, satisfying the ±0.02 mm measurement accuracy requirement. For illumination, an aperture-type ring LED surface light source was designed. With a working distance of 100 mm, lens working distance of 150 mm, and measurement area of 50 mm × 50 mm, the aperture diameter was calculated as 19 mm, resulting in the selection of the CFK-120 model with a 70 mm × 70 mm effective light-emitting area.

3. Adaptive System Algorithms

3.1 Gradient-Variance Fused Focus Evaluation Function

The adaptive system addresses the core challenge of rapid model changeover for electric vehicle battery modules. Traditional manual focus adjustment relies on subjective operator judgment without quantitative evaluation, leading to inconsistent measurement accuracy. To overcome this limitation, we developed a high-reflectance-adaptive gradient-variance fused focus evaluation function (RAGVF).

The proposed algorithm first applies two-dimensional Gaussian filtering to suppress high-frequency noise from reflective surfaces:

$$G(x,y) = \frac{1}{2\pi\sigma^2}e^{-\frac{x^2+y^2}{2\sigma^2}} \tag{3-1}$$

With standard deviation σ = 1.5, achieving optimal balance between noise suppression and edge preservation. Boundary pixels are handled through nearest-neighbor interpolation to prevent gradient discontinuity:

$$x_{clamp} = \max(0, \min(x, W-1)), \quad y_{clamp} = \max(0, \min(y, H-1)) \tag{3-2}$$

Following preprocessing, an eight-neighborhood Laplacian kernel captures the second-order gradient information:

$$G(i,j) = L \otimes I_g(i,j) \tag{3-3}$$

where \(I_g\) is the Gaussian-filtered image. The Laplacian operator exhibits natural robustness to uniform illumination changes, as linear intensity variations have zero second derivatives. To address challenges in low-texture regions where traditional gradient algorithms fail, we introduce local variance as a weighting factor. For each pixel, the 3×3 neighborhood variance is computed as:

$$\mu_W = \frac{1}{9}\sum_{m=-1}^{1}\sum_{n=-1}^{1} I_g(i+m, j+n) \tag{3-4}$$

$$Var(W_{i,j}) = \frac{1}{9}\sum_{m=-1}^{1}\sum_{n=-1}^{1} (I_g(i+m,j+n) – \mu_W)^2 \tag{3-5}$$

The final evaluation function combines gradient magnitude squared with variance weighting:

$$F = \sum_{i,j} G^2(i,j) \cdot Var(W_{i,j}) \tag{3-6}$$

Table 3-1 presents a comprehensive performance comparison of the proposed function against traditional evaluation functions. The design sensitivity metric MSE quantifies slope sharpness near the focus position:

$$MSE = \frac{f_{max} – f_{max}(x+\Delta)}{f_{max} \cdot \Delta} \times 100\% \tag{3-7}$$

Table 3-1: Performance Comparison of Different Evaluation Functions
Metric Variance EOG Tenengrad Fourier Entropy Proposed RAGVF
MSE (Sensitivity) 5.01 18.60 10.97 17.90 12.32 19.70
Processing Time (s) 10.02 19.71 6.20 20.80 6.01 16.81

The experimental results demonstrate that the proposed RAGVF achieves the highest sensitivity of 19.70, surpassing Tenengrad (10.97) and EOG (18.60), while maintaining competitive processing time. Under Gaussian noise conditions with mean 0.1 and variance 0.05, the normalized evaluation curve of RAGVF exhibits superior single-peak characteristics, demonstrating exceptional anti-noise performance. The normalized evaluation curves were computed using:

$$F_i = \frac{f_i – f_{min}}{f_{max} – f_{min}} \tag{3-8}$$

3.2 Camera Calibration via Distortion Correction and Vanishing Points

Traditional calibration methods require multiple views with high-precision calibration boards, which is impractical in the space-constrained inspection station. To address this limitation, we developed a monocular calibration method based on distortion correction and vanishing point constraints.

The camera imaging model follows the pinhole model, where a world point transforms to camera coordinates through rigid body transformation:

$$\begin{bmatrix} X_c \\ Y_c \\ Z_c \\ 1 \end{bmatrix} = \begin{bmatrix} R & t \\ 0^T & 1 \end{bmatrix} \begin{bmatrix} X_w \\ Y_w \\ Z_w \\ 1 \end{bmatrix} \tag{3-9}$$

Projection to the image plane yields:

$$Z_c \begin{bmatrix} u \\ v \\ 1 \end{bmatrix} = \begin{bmatrix} f_x & 0 & u_0 \\ 0 & f_y & v_0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} X_c \\ Y_c \\ Z_c \end{bmatrix} \tag{3-10}$$

Lens distortion introduces radial and tangential offsets between ideal and actual image points. The complete distortion model is:

$$\delta_u = \Delta u(k_1 r^2 + k_2 r^4 + \cdots) + p_1(3\Delta u^2 + \Delta v^2) + 2p_2\Delta u\Delta v \tag{3-11}$$
$$\delta_v = \Delta v(k_1 r^2 + k_2 r^4 + \cdots) + 2p_1\Delta u\Delta v + p_2(\Delta u^2 + 3\Delta v^2) \tag{3-12}$$

The calibration algorithm leverages circular calibration plate features. For each row of feature points, the ideal projection satisfies a straight-line constraint \(a_i u + b_i v + c_i = 0\). Through Levenberg-Marquardt optimization minimizing the sum of squared perpendicular distances:

$$\min_{a_i,b_i,c_i} \sum_{j=1}^{N} \frac{(a_i u_{ij} + b_i v_{ij} + c_i)^2}{a_i^2 + b_i^2} \tag{3-13}$$

This optimization enables joint correction of radial and tangential distortions. Following distortion correction, orthogonal vanishing points from the calibration plate’s row and column directions constrain the camera intrinsics. For horizontal vanishing point \(V_x(u_{x1}, v_{x1})\) and vertical vanishing point \(V_y(u_{y1}, v_{y1})\), the orthogonality condition yields:

$$V_x^T K^{-T} K^{-1} V_y = 0 \tag{3-14}$$

Substituting the intrinsic matrix and expanding, the focal length can be solved in closed form:

$$f^2 = -\frac{(u_{x1} – u_0)(u_{y1} – u_0) + (v_{x1} – v_0)(v_{y1} – v_0)}{(u_{x1} – u_0)(u_{y1} – u_0) – (v_{x1} – v_0)(v_{y1} – v_0)} \tag{3-15}$$

where \(f_x = f_y = f\) under the square-pixel assumption. Experimental validation demonstrated a reprojection error of 0.43 pixels for the proposed method compared to 0.38 pixels for Zhang’s method, confirming comparable accuracy with significantly reduced complexity. 2D measurement verification using a standard 10 mm calibration plate yielded dimensional tolerance of ±0.0030 mm for the proposed method versus ±0.0015 mm for Zhang’s method.

4. Measurement System Algorithms

4.1 Aperture Measurement via Improved RANSAC

The 2D aperture measurement system implements a three-stage preprocessing architecture followed by template matching and robust fitting. The preprocessing chain comprises adaptive Gaussian filtering, piecewise linear gray-scale enhancement, and morphological closing operations. The Gaussian filter with adaptive standard deviation dynamically adjusts based on local signal-to-noise ratio:

$$G(x,y) = \frac{1}{2\pi\sigma^2}e^{-\frac{x^2+y^2}{2\sigma^2}}, \quad \sigma = \begin{cases} 1.5 & \text{high-noise regions} \\ 0.8 & \text{stable regions} \end{cases} \tag{4-1}$$

Following preprocessing, a multi-scale ROI shape matching algorithm locates hole positions using normalized cross-correlation:

$$S = \frac{T_{rot} \cap I_{sub}}{\sqrt{\sum T_{rot}^2 \cdot \sum I_{sub}^2}} \tag{4-2}$$

where \(T_{rot}\) is the rotated template and \(I_{sub}\) is the candidate sub-image. Based on coarse positioning results, a circular caliper measurement model establishes 128 measurement points along the circumference. Each point applies Canny-Zernike subpixel edge detection to extract accurate boundary coordinates. The improved RANSAC fitting algorithm then robustly fits a circle model. Each iteration randomly selects 3 non-collinear points to determine candidate circle parameters. Points with radial distance less than 1.2 pixels are classified as inliers. The iteration count adaptively adjusts based on the inlier ratio:

$$k = \frac{\log(1-p)}{\log(1-\varepsilon)} \tag{4-3}$$

where \(p = 0.99\) is the confidence probability. Table 4-1 compares the 2D aperture measurement results across different methods.

Table 4-1: End-plate Hole Measurement Results
Method Mean (mm) Std. Dev. (mm) Max Deviation (mm) Time per Hole (ms)
Manual Micrometer 7.992 0.012 0.025 2100
Halcon Edge Detection 8.003 0.008 0.018 320
Improved RANSAC 7.999 0.003 0.006 180

The improved RANSAC algorithm demonstrated 62.5% precision improvement over standard Halcon edge detection, with standard deviation reduced to 0.003 mm and maximum deviation bounded within ±0.006 mm across 100 repeated measurements.

4.2 3D Reconstruction via Cross-Ratio Invariance

Line laser three-dimensional reconstruction utilizes optical triangulation principles with an active laser light plane constraint to resolve depth information. The system comprises a laser projector and line-scan camera working in coordination. The image formation process establishes the mapping from pixel coordinates to camera coordinates:

$$\begin{bmatrix} u \\ v \\ 1 \end{bmatrix} = K \begin{bmatrix} X_c/Z_c \\ Y_c/Z_c \\ 1 \end{bmatrix} \tag{4-4}$$

The light plane equation provides the crucial depth constraint:

$$AX_c + BY_c + CZ_c = D \tag{4-5}$$

Light plane calibration employs cross-ratio invariance property: for three collinear points A, B, C on the calibration board with a laser stripe intersection point D, the cross-ratio remains invariant between world and pixel coordinates:

$$\frac{AQ \cdot BC}{AC \cdot BQ} = \frac{aq \cdot bc}{ac \cdot bq} \tag{4-6}$$

The world coordinates of intersection point D are derived as:

$$X_{WD} = \frac{K \cdot X_{WA}(X_{WB}-X_{WC}) – X_{WB}(X_{WA}-X_{WC})}{K(X_{WB}-X_{WC}) – (X_{WA}-X_{WC})} \tag{4-7}$$

By moving the calibration plate to multiple positions, sufficient feature points on the light plane are collected. These points satisfy the plane equation \(AX_i + BY_i + CZ_i = D\). Expressing as a linear system:

$$\begin{bmatrix} X_1 & Y_1 & Z_1 & 1 \\ X_2 & Y_2 & Z_2 & 1 \\ \vdots & \vdots & \vdots & \vdots \\ X_n & Y_n & Z_n & 1 \end{bmatrix} \begin{bmatrix} A \\ B \\ C \\ D \end{bmatrix} = 0 \tag{4-8}$$

Singular value decomposition of the coefficient matrix provides the optimal solution, where the last column of V corresponds to the light plane parameters with minimal singular value:

$$P = U D V^T, \quad X = V_{last} \tag{4-9}$$

The reconstructed 3D data can be represented as either depth maps or point clouds depending on the visualization and analysis requirements. Depth maps provide intuitive multi-channel pseudo-color rendering for user interface display, while point clouds enable precise spatial analysis for measurement algorithms.

4.3 Robust PCA-based Plane Fitting Algorithm

Traditional plane fitting methods each have inherent limitations: least-squares exhibits extreme sensitivity to outliers, RANSAC maintains robustness but randomly rejects valid data points, while standard PCA is affected by anisotropic point distributions. To overcome these challenges, we propose a robust PCA-based plane fitting algorithm that integrates the RANSAC framework with principal component analysis.

The algorithm executes iterative sampling: each iteration randomly selects 3 points to construct a local subset. Local PCA modeling computes the centroid:

$$\bar{p} = \frac{1}{3}\sum_{i=1}^{3} p_i \tag{4-10}$$

The covariance matrix of the centered subset reveals the distribution characteristics:

$$\Sigma = \frac{1}{n}\sum_{i=1}^{n} p_i’ p_i’^T \tag{4-11}$$

where \(p_i’ = p_i – \bar{p}\). Eigen decomposition of the covariance matrix yields eigenvalues \(\lambda_1 \leq \lambda_2 \leq \lambda_3\) and corresponding eigenvectors. The smallest eigenvalue’s eigenvector serves as the candidate normal vector:

$$\hat{n} = v_1 \tag{4-12}$$

Global evaluation computes the orthogonal distance from all points to the candidate plane:

$$d_i = \frac{|p_i \cdot \hat{n} – \bar{p} \cdot \hat{n}|}{\|\hat{n}\|} \tag{4-13}$$

Points with distance below threshold \(\tau = 0.1\) are classified as inliers. The algorithm iteratively updates the maximum inlier set and final plane parameters. Simulation experiments compared four methods under ideal and noisy conditions.

Table 4-2: Simulation Results – Plane Fitting without Outliers
Method a b c En (°) Ed (μm)
Least Squares 0.491 0.294 1.003 -0.436 85.28
Standard PCA 0.533 0.291 1.014 -1.566 86.40
RANSAC 0.482 0.260 0.942 -2.000 88.27
Proposed Method 0.503 0.302 1.003 -0.177 84.97
Table 4-3: Simulation Results – Plane Fitting with Outliers
Method a b c En (°) Ed (μm)
Least Squares 0.606 0.422 1.079 -6.53 112.2
Standard PCA 0.677 0.341 0.904 -7.32 118.3
RANSAC 0.467 0.228 0.900 -3.64 94.84
Proposed Method 0.535 0.350 0.998 -2.64 89.51

When outliers were introduced (Table 4-3), traditional methods exhibited significant performance degradation: least-squares and standard PCA normal vector errors reached 6.53° and 7.32° respectively, with distance errors exceeding 112 μm. The proposed algorithm reduced normal vector error to 2.64°, achieving a 27.5% improvement over classical RANSAC, while preserving approximately 95% of valid data points. In real-world validation using a 100 mm × 200 mm region containing approximately 500,000 point cloud data from an electric vehicle battery module side surface, the proposed algorithm achieved flatness of 41.8 μm compared to CMM reference of 38.6 μm (8.3% deviation), while least-squares estimation reached 102.3 μm significantly deviating from the true value.

4.4 Thickness Measurement via Dual-Camera Affine Transform

Thickness measurement of large-scale power battery modules presents unique challenges due to spatial constraints and the requirement for micron-level precision. Our approach employs dual line laser 3D cameras in a symmetric configuration, synchronously scanning both surfaces of the module. Since each camera operates in its independent coordinate system, a multi-reference composite calibration device was designed containing precision reference sphere arrays on both surfaces, geometrically simulating the characteristic features of power battery modules.

The calibration procedure begins with CMM measurement to obtain physical coordinates of all sphere centers. Subsequently, both cameras scan the calibration device. Center point coordinates of the spheres are determined through subpixel localization in the point cloud data. The affine transformation model relating physical coordinates to image coordinates is:

$$\begin{bmatrix} X \\ Y \\ Z \end{bmatrix} = A \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix} \tag{4-14}$$

where the transformation matrix contains 12 degrees of freedom:

$$A = \begin{bmatrix} a_{11} & a_{12} & a_{13} & t_x \\ a_{21} & a_{22} & a_{23} & t_y \\ a_{31} & a_{32} & a_{33} & t_z \end{bmatrix} \tag{4-15}$$

For each feature point correspondence, three independent equations are established:

$$X = a_{11}x + a_{12}y + a_{13}z + t_x \tag{4-16}$$
$$Y = a_{21}x + a_{22}y + a_{23}z + t_y \tag{4-17}$$
$$Z = a_{31}x + a_{32}y + a_{33}z + t_z \tag{4-18}$$

With 9 spheres per side providing 27 equations for 12 unknown parameters, the system forms an overdetermined set solved by least squares:

$$H = (M^T M)^{-1} M^T N \tag{4-19}$$

The calibrated affine matrices for both cameras were obtained through this procedure. During production inspection, point clouds from both cameras are transformed into a unified world coordinate system using the pre-calibrated matrices. The thickness is then computed by fitting a reference plane to one surface and calculating the distances from all points on the opposite surface to this plane, with the mean distance representing the measured thickness.

4.5 Measurement Results and Analysis

Comprehensive system evaluation encompassed algorithm precision, stability testing, and production line validation. Table 4-4 presents the flatness measurement comparison results from 10 groups of electric vehicle battery module bottom surface point clouds.

Table 4-4: Flatness Measurement Results
Method Mean Flatness (mm) Repeatability Std. Dev. (mm) Outlier Rejection Rate Computation Time (s)
Least Squares 0.102 0.015 0% 0.12
Traditional RANSAC 0.057 0.008 12.3% 1.35
Robust PCA 0.041 0.003 5.7% 0.85

The proposed algorithm achieved closest approximation to the CMM reference value with outstanding repeatability. The outlier rejection rate reduction from 12.3% to 5.7% demonstrates the algorithm’s ability to preserve valid measurement data while maintaining robust outlier suppression.

Table 4-5: Comprehensive System Performance Test Results
Indicator Design Requirement Measured Mean Fluctuation Range
2D Measurement Accuracy (mm) ≤0.03 0.018 ±0.005
3D Measurement Accuracy (mm) ≤0.05 0.031 ±0.008
Single Module Inspection Time (s) ≤70 42.1 7.9-9.1
Changeover Debugging Time (min) ≤30 10 0.8-1.2

During 72-hour continuous production operation, the system demonstrated exceptional stability with 2D and 3D measurement standard deviations maintaining at 0.02 mm and 0.04 mm respectively after inspecting 3,200 modules. The implementation achieved a 4.2× efficiency improvement over manual inspection with a miss rate reduction from 1.8% to 0.11%.

5. Software System Design and Development

The measurement system software integrates motion control and vision processing through a modular architecture. Motion control operations are performed using C# language while vision algorithms leverage the Halcon library. Direct communication between these layers is achieved through a standardized TCP/IP protocol, with an asynchronous double-buffering mechanism providing the required performance stability. The main system incorporates multiple functional interfaces including user login, automatic operation, manual motion control, and changeover configuration. The changeover configuration module enables one-click model switching of electric vehicle battery: after the operator places the calibration board and confirms parameters, the motion system automatically imports the recipe configuration and updates set points while the vision system executes the complete autofocus-to-calibration flow.

The vision software interface integrates industrial camera control, image analysis, and data management in a modularized layout. The MSE settings module deeply connects to the manufacturing execution system, supporting real-time work order synchronization and automatic result transmission. Through the parameter settings interface, users can dynamically adjust camera exposure time, light source intensity, and ROI regions while supporting one-click import of preset parameter files in XML format for rapid model adaptation. Calibrated parameters, displayed in a dedicated window, store all intrinsic and extrinsic matrices using secure calibration tools. The alarm record module maintains a temporal event sequence with screenshots and associated processing logs for configuration deviations. On the production floor, this comprehensive architecture has substantially improved the equipment’s user operability and traceability for electric vehicle battery module manufacturing.

6. Conclusion and Future Outlook

This research successfully developed a machine vision-based adaptive measurement system for power battery modules in electric vehicle battery manufacturing, addressing critical challenges in multi-variety, small-batch production environments. The key contributions and findings can be summarized as follows:

Firstly, in the adaptive system domain, we proposed innovative gradient-variance fusion autofocus function (RAGVF) that effectively suppresses surface reflection noise while maintaining sensitivity to low-texture regions. Experimental results demonstrated superior focus evaluation performance with a peak sensitivity of 19.70 under noisy conditions. The vanishing point-constrained camera calibration method reduced calibration time from 20 to 5 minutes while maintaining accuracy comparable to traditional approaches.

Secondly, in precision measurement algorithms, the improved RANSAC-based subpixel edge fitting achieved 2D aperture measurement precision of ±0.02 mm, representing a 62.5% improvement over standard edge detection. The robust PCA plane fitting algorithm reduced flatness measurement error to 0.041 mm, and the dual-camera affine transformation model enabled thickness measurement within ±0.03 mm of CMM reference values.

Thirdly, the engineering system integration achieved single-module detection time of 42.1 seconds with the “one-click changeover” function enabling model switching within 10 minutes. The production-verified system successfully inspected over 3,200 modules with no accumulated error, demonstrating exceptional operational stability.

Future research directions may explore the integration of multimodal sensor fusion incorporating spectral imaging or polarization analysis to further enhance adaptability to complex material combinations. The application of graph neural networks for point cloud topology analysis could improve the robustness of plane fitting under non-structured anomalies. Additionally, the development of FPGA-accelerated edge computing solutions with embedded vision capabilities may reduce hardware costs while maintaining measurement precision for electric vehicle battery manufacturing.

The continuous evolution of intelligent manufacturing and industrial internet technologies will continue to drive machine vision inspection systems toward greater intelligence, flexibility, and integration, ultimately contributing to the realization of fully automated, high-precision quality control systems for electric vehicle battery production.

Scroll to Top