Automatic Corrosion Detection Using High-Resolution Magnetic Flux Data for Well Integrity Management
Abstract
Well-casing integrity management is critical for the safe and reliable operation of oil and gas wells, and natural-gas-storage wells where corrosion induced casing failures can lead to loss of containment, environmental incidents, and increased operational risk. High-resolution MFL inspection systems collect high-frequency MFL data across the full length of the casing wall, providing detailed data for corrosion defect identification and well integrity assessment. However, these data are often dominated by strong magnetic flux responses from casing joint collars, centralizers, scratchers, and other hardware artifacts, while corrosion signatures typically appear as small, localized anomalies that are difficult to identify. The high-resolution MFL inspection tool used in this study consists of two inspection modules - upper and lower modules. Each inspection module contains 48 tri-axial Flux Leakage (FL) sensors and 48 Discriminator (DIS) sensors, providing 100% circumferential coverage of the casing wall. Because the sensors are distributed along a long inspection assembly, corresponding measurements are acquired at different locations and times. In addition, tool motion is influenced by variable winch speed, stick-slip behavior, vibration, wellbore curvature, and mechanical interactions between the tool and well casing, resulting in significant depth and positional uncertainty. These effects complicate the conversion of MFL measurements from the time domain to the physical depth domain and make corrosion identification and repeated-inspection comparison challenging. To address these challenges, we developed an artificial intelligence (AI)-based workflow that automatically identifies casing joint collars, estimates sensor and inspection-module depth offsets, and aligns high-resolution MFL measurements acquired from distributed sensor arrays. Casing collars serve as reliable landmarks because they generate distinctive and repeatable MFL signatures that can be consistently matched across sensor groups in both inspection modules. In addition, collar locations can be correlated with the physical depths reported in the casing tally records of the well. Accurate collar identification and alignment enable the conversion of MFL measurements from the time domain to the physical depth domain, which is essential for corrosion localization and monitoring corrosion progression across repeated inspections. Measurements from multiple sensor groups are subsequently aligned using cross-correlation, Genetic Algorithm (GA) optimization, and Dynamic Time Warping (DTW) to establish a consistent depth reference throughout the inspection interval. Following MFL depth alignment, circumferential-depth images are generated for each casing joint and analyzed using a patch-based denoising convolutional autoencoder (DCAE). Reconstruction-error-based anomaly maps are combined with statistical anomaly scores to automatically detect and localize corrosion defects, while complementary FL and DIS measurements enable discrimination between internal and external corrosion. The proposed workflow transforms high-resolution MFL interpretation from a labor-intensive, expert-driven process into a scalable and automated analytics framework. By combining physics-guided alignment techniques with deep-learning-based anomaly detection, the methodology improves data consistency, enhances corrosion identification, and enables more reliable tracking of corrosion progression across repeated inspections, supporting well-integrity management for large well populations.