An anti-interference pipeline detection method and device

By employing adaptive parameter selection and continuous phase frequency shift keying modulation techniques, combined with multi-channel reception and adaptive processing, the accuracy and reliability issues of pipeline detection under complex electromagnetic interference have been resolved. This has enabled effective signal identification and accurate evaluation, thereby improving the adaptability and accuracy of the detection.

CN122151219APending Publication Date: 2026-06-05深圳市易登科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-04
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In complex electromagnetic interference environments, traditional pipeline detection methods suffer from low accuracy, poor reliability, and lack of adaptability and measurement confidence assessment.

Method used

Adaptive parameter selection and continuous phase frequency shift keying modulation method are used to generate pipeline excitation signal. Combined with multi-channel reception and adaptive preprocessing, frequency shift keying demodulation, correlation matching and reliability assessment, combined with multi-point fitting and model inversion, signal validity determination and parameter optimization are achieved.

Benefits of technology

It enables effective signal identification in environments with strong interference, improves the accuracy and adaptability of detection, provides signal quality assessment, and ensures the confidence of measurement results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122151219A_ABST
    Figure CN122151219A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of pipeline detection, and discloses an anti-interference pipeline detection method and device, which comprises the following steps: acquiring a detection environment parameter, generating and transmitting a pipeline excitation signal through adaptive parameter selection and continuous phase frequency shift keying modulation; receiving an electromagnetic response signal in multiple channels, obtaining a digital signal through adaptive preprocessing; acquiring a digital code sequence through frequency shift keying demodulation, judging the signal effectiveness and outputting a quality score through correlation matching and reliability evaluation; based on the effective signal, solving pipeline position, buried depth parameters and uncertainty through multi-point fitting and model inversion; and adaptively optimizing system working parameters in combination with a detection performance index. The application can realize accurate detection and positioning of underground pipelines in a complex electromagnetic interference environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pipeline detection technology, and more specifically, to an anti-interference pipeline detection method and apparatus. Background Technology

[0002] Underground pipelines are a crucial component of urban infrastructure, encompassing various types such as power cables, communication cables, water supply pipes, and gas pipes. With rapid urban development, underground pipeline networks are becoming increasingly complex. Accurate detection and location of underground pipelines are of paramount importance for urban planning, construction safety, and pipeline maintenance. Traditional pipeline detection methods primarily rely on the principle of electromagnetic induction. This involves applying an excitation signal to the target pipeline and receiving the electromagnetic field signal generated by the pipeline on the ground, thereby determining the pipeline's location and burial depth.

[0003] However, in urban environments, electromagnetic interference sources are numerous and complex, including power frequency interference from high-voltage transmission lines, stray current interference from rail transit systems, and radio frequency interference from communication base stations. The intensity of these interference signals is often far greater than the effective signal generated by the pipeline, causing traditional detection methods to experience a sharp drop in signal-to-noise ratio, reduced detection accuracy, or even complete failure under strong interference conditions. Especially in core urban areas, the superposition of multiple interference sources creates an extremely harsh electromagnetic environment, making reliable pipeline detection difficult with existing technologies.

[0004] Existing anti-interference technologies mainly employ fixed-frequency filtering methods, but these are insufficiently adaptable to complex, time-varying interference environments. Furthermore, existing methods lack quantitative assessments of measurement reliability, failing to provide users with measurement confidence information. Therefore, a pipeline detection method is needed that can achieve accurate detection, adaptively adjust operating parameters, and provide reliability assessments in complex electromagnetic interference environments. Summary of the Invention

[0005] This invention provides an anti-interference pipeline detection method and device, which solves the technical problems of low accuracy, poor reliability, lack of self-adaptive capability, and measurement confidence assessment in pipeline detection under complex electromagnetic interference environments in related technologies.

[0006] This invention provides an anti-interference pipeline detection method, comprising the following steps: S1. Obtain the detection environment parameters, and use adaptive parameter selection and continuous phase frequency shift keying modulation method to generate and transmit pipeline excitation signal; S2 receives the electromagnetic field signal generated by the pipeline excitation signal, and uses a multi-channel receiving and adaptive preprocessing method to obtain the preprocessed digital signal; S3, Based on the preprocessed digital signal, frequency shift keying demodulation method is used to obtain the demodulated digital code sequence; S4. Based on the demodulated digital code sequence, correlation matching and reliability assessment methods are used to obtain the signal validity determination result and quality score; S5. Based on the signal validity determination results and quality score, multi-point fitting and model inversion methods are used to obtain the pipeline location burial depth parameters and uncertainty assessment. S6. Based on the pipeline's location and burial depth parameters and detection performance indicators, an adaptive optimization method is used to obtain the optimized system operating parameters.

[0007] In a preferred embodiment, step S1 involves acquiring detection environment parameters, employing adaptive parameter selection and continuous phase frequency shift keying modulation methods, and generating and transmitting a pipeline excitation signal, including: Based on the pipeline type and estimated burial depth of the current detection mission, the reference carrier frequency and frequency offset parameters are determined by looking up a table. Based on the environmental noise level assessment results, a hierarchical selection strategy is adopted to determine the type and length of the modulation code sequence. According to the noise level index, the environment is divided into three levels: low noise, medium noise, and high noise. Gold code sequences of different lengths are selected for different noise levels. Based on the Gold code sequence and carrier frequency parameters, a continuous phase frequency shift keying modulation technique is used to generate the modulation signal. A Gaussian filter is used to achieve a smooth transition at the frequency switching time to realize phase continuity.

[0008] In a preferred embodiment, the electromagnetic field signal generated by the pipeline excitation signal received in step S2 is processed using a multi-channel receiving and adaptive preprocessing method to obtain a preprocessed digital signal, including: Based on the spatial electromagnetic field distribution generated by the pipeline, an orthogonal double coil structure is adopted to realize multi-dimensional signal reception, with the two magnetic induction coils arranged orthogonally in space. Based on the amplified signal, real-time spectrum analysis technology is used to identify environmental interference characteristics, and the main interference frequencies are identified through fast Fourier transform. Based on the interference frequency information obtained from spectrum analysis, an adaptive digital notch filter technique is used to suppress narrowband interference, and the digital notch filter is dynamically configured to accurately suppress the interference frequency.

[0009] In a preferred embodiment, step S3, based on the preprocessed digital signal, employs a frequency shift keying demodulation method to obtain a demodulated digital code sequence, including: Based on dual-channel digital signals, a sliding correlation search algorithm is used to realize frame synchronization detection. The receiver locally stores a standard synchronization header signal template and performs sliding correlation operation on the received signal to determine the frame start position. Based on the extracted modulation data segment, a dual-channel bandpass filter separation technique is used to extract two modulation frequency components, and narrowband bandpass filters are designed for the two frequencies respectively. Based on the separated frequency component signals, the instantaneous amplitude envelope is obtained by using Hilbert transform envelope detection technology, and the envelope is extracted by constructing an analytic signal through Hilbert transform.

[0010] In a preferred embodiment, step S4, based on the demodulated digital code sequence, employs correlation matching and reliability assessment methods to obtain a signal validity determination result and a quality score, including: Based on the demodulated code sequence and the standard code sequence, the correlation function is calculated using a weighted sliding correlation algorithm, which considers the reliability of each symbol. Based on the correlation function, peak search and feature extraction techniques are used to identify relevant peaks and extract peak amplitude, peak position and peak width feature parameters. Based on the correlation coefficient and the secondary peak suppression ratio, a two-dimensional threshold decision criterion is used to determine the validity of the signal. This requires that the normalized weighted correlation coefficient be greater than the correlation coefficient threshold and the secondary peak suppression ratio be greater than the secondary peak suppression ratio threshold.

[0011] In a preferred embodiment, step S5, based on the signal validity determination result and quality score, employs multi-point fitting and model inversion methods to obtain the pipeline's burial depth parameters and uncertainty assessment, including: Based on the effective signal amplitude data from multiple measuring points, the amplitude distribution model is determined by Gaussian curve fitting, and the horizontal position of the pipeline is determined by Gaussian curve fitting on the measured amplitude data. Based on the standard deviation parameter and amplitude distribution characteristics of the Gaussian curve, the half-width at half-height method is used to calculate the pipeline burial depth, and the burial depth is directly calculated based on the standard deviation obtained by fitting. Based on the statistical properties of parameter estimation, the Monte Carlo method is used to evaluate measurement uncertainty. The uncertainty distribution of the output parameter is obtained by propagating the uncertainty of the input parameter through random simulation.

[0012] In a preferred embodiment, step S6 uses an adaptive optimization method based on the pipeline's burial depth parameters and detection performance indicators to obtain optimized system operating parameters, including: Based on continuous noise monitoring data, power spectrum analysis and statistical methods are used to obtain environmental noise characteristics and identify the main interference frequencies and noise levels. Based on the noise type identification results, a rule base matching method is used to select an anti-interference strategy from a preset strategy rule base. Based on the detection success rate statistics, a feedback control algorithm is used to dynamically adjust the decision threshold, and the correlation coefficient threshold is dynamically adjusted according to the success rate. Based on the calculation results of optimized parameters, a parameter update mechanism is used to configure the system's working status in real time.

[0013] In a preferred embodiment, determining the type and length of the modulation code sequence based on the environmental noise level assessment results using a hierarchical selection strategy specifically includes: Before the formal detection begins, environmental noise sampling and analysis are performed. The receiver collects environmental electromagnetic noise data without applying an excitation signal. The collected noise data is then subjected to a fast Fourier transform to calculate the power spectrum. The average noise power is calculated within the target frequency range to obtain the environmental noise level index. When the noise power is lower than the preset first noise threshold, it is determined to be a low noise environment; when the noise power is higher than the preset second noise threshold, it is determined to be a high noise environment; otherwise, it is determined to be a medium noise environment. In low-noise environments, a Gold code sequence of the first length is selected; in medium-noise environments, a Gold code sequence of the second length is selected; and in high-noise environments, a Gold code sequence of the third length is selected.

[0014] In a preferred embodiment, the step of extracting the target frequency band signal using adaptive bandpass filtering technology based on the notch-filtered signal specifically includes: The center frequency of the bandpass filter is set to the center frequency of the carrier wave of the transmitted signal, and the filter covers two modulation frequencies; The bandwidth of the bandpass filter is adaptively adjusted according to the signal-to-noise ratio. When the system detects that the current signal-to-noise ratio is greater than a preset first signal-to-noise ratio threshold, the first passband width is used. When the system detects that the signal-to-noise ratio is less than a preset second signal-to-noise ratio threshold, the second passband width is used. The second passband width is greater than the first passband width. The bandpass filter is designed using a Butterworth filter, and the filter implementation adopts a cascaded second-order section structure.

[0015] In a preferred embodiment, an anti-interference pipeline detection device is used to perform the steps of the above-described anti-interference pipeline detection method, including: The signal generation and transmission module is used to acquire detection environment parameters and generate and transmit pipeline excitation signals using adaptive parameter selection and continuous phase frequency shift keying modulation methods. The signal receiving and preprocessing module is used to receive the electromagnetic field signal generated by the pipeline excitation signal. It adopts a multi-channel receiving and adaptive preprocessing method to obtain the preprocessed digital signal. The signal demodulation module is used to obtain the demodulated digital code sequence based on the preprocessed digital signal using the frequency shift keying demodulation method. The signal identification and evaluation module is used to obtain the signal validity determination result and quality score based on the demodulated digital code sequence, using correlation matching and reliability evaluation methods. The parameter calculation module is used to obtain the pipeline location and burial depth parameters and uncertainty assessment based on the signal validity judgment results and quality scores, using multi-point fitting and model inversion methods. The adaptive optimization module is used to obtain optimized system operating parameters based on pipeline location and burial depth parameters and detection performance indicators using an adaptive optimization method.

[0016] The beneficial effects of this invention are as follows: By employing continuous phase frequency shift keying modulation (CPSD) to generate pipeline excitation signals, combined with Gold code sequence modulation and adaptive parameter selection, effective signal identification can be achieved in environments with strong interference. Real-time spectrum analysis identifies interference characteristics, and adaptive digital notch filters and bandpass filters are dynamically configured to specifically suppress narrowband interference and broadband noise, improving the system's anti-interference capability and detection reliability in complex electromagnetic environments. A complete signal quality evaluation system was established, using multiple indicators such as correlation coefficient, side-peak suppression ratio, and continuous detection success rate for comprehensive scoring. The Monte Carlo method was employed to assess measurement uncertainty, providing users with a confidence level for the measurement results. Simultaneously, based on environmental noise characteristics and detection performance indicators, the system dynamically adjusts its operating parameters using an adaptive optimization method, ensuring the system always operates at its optimal state, thus improving detection accuracy and adaptability. Attached Figure Description

[0017] Figure 1 This is a flowchart of an anti-interference pipeline detection method according to the present invention; Figure 2 This is a block diagram of an anti-interference pipeline detection system according to the present invention. Detailed Implementation

[0018] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.

[0019] At least one embodiment of the present invention discloses an anti-interference pipeline detection method, such as Figure 1 As shown, it includes: S1. Obtain the detection environment parameters, and use adaptive parameter selection and continuous phase frequency shift keying modulation method to generate and transmit pipeline excitation signal; S11: Based on the pipeline type and estimated burial depth of the current detection mission, the reference carrier frequency and frequency offset parameters are determined by looking up a table. Based on user input or system-preset detection parameters, the system acquires information about the target pipeline type and estimated burial depth. Pipeline types include power cables, communication cables, metal water supply pipes, and metal gas pipes. Different types of pipelines have significantly different electrical parameters, requiring the selection of an appropriate excitation frequency to achieve optimal electromagnetic coupling efficiency. The system internally stores a table mapping pipeline type, burial depth, and optimal frequency. This table was established through extensive experimental testing and theoretical calculations. For power cable pipelines with a burial depth between 0.5 and 2 meters, the reference carrier frequency is selected to be around 500 Hz. This frequency ensures sufficient skin depth for effective electromagnetic induction while avoiding major power frequency interference points. For burial depths exceeding 3 meters, the reference frequency is reduced to 300 Hz to improve penetration. For shallowly buried pipelines with a burial depth less than 0.5 meters, the reference frequency is increased to 800 Hz to improve positioning accuracy. After determining the reference carrier frequency, the frequency offset parameter of frequency shift keying modulation is set. The frequency offset is defined as the difference between two frequencies representing digital zero and digital one. The selection of the frequency offset needs to balance modulation efficiency and spectrum occupancy. Too small a frequency offset will lead to demodulation difficulties, while too large a frequency offset will increase bandwidth requirements and the impact of frequency selective fading. In this embodiment, the frequency offset is set to eight percent of the reference frequency. When the reference frequency is 500 Hz, the frequency offset is 40 Hz, and the two modulation frequencies are 480 Hz and 520 Hz, respectively.

[0020] S12: Based on the environmental noise level assessment results, a hierarchical selection strategy is adopted to determine the type and length of the modulation code sequence; Before commencing formal detection, the system performs a short-term environmental noise sampling analysis. The receiver collects environmental electromagnetic noise data for five seconds without applying any excitation signal. The collected noise data is then subjected to a Fast Fourier Transform to calculate the power spectrum. The average noise power within the target frequency range is calculated to obtain an environmental noise level index. Based on the noise level index, the environment is classified into three levels: low noise, medium noise, and high noise. A low-noise environment is defined as noise power below a preset first noise threshold, a high-noise environment as noise power above a preset second noise threshold, and a medium-noise environment otherwise. The first and second noise thresholds are set based on the receiver's noise floor level and practical application experience. To balance detection speed and anti-interference capability, modulation code sequences of different lengths are selected for different noise levels. In low-noise environments, a 63-bit Gold code sequence is chosen. Gold code sequences possess good autocorrelation and cross-correlation properties, and the correlation processing gain of a 63-bit code sequence is approximately 18 dB, meeting the identification requirements in low-noise environments. Furthermore, due to its short code length, the detection response speed is fast, suitable for rapid scanning operations. In medium-noise environments, a 127-bit Gold code sequence is selected, increasing the correlation processing gain to 21 dB. In high-noise environments, a 255-bit Gold code sequence is selected, achieving a correlation processing gain of 24 dB, enabling reliable signal identification even in strong noise backgrounds. Although increasing the code length reduces detection speed, it ensures detection reliability. The Gold code sequence is generated using two linear feedback shift registers driven by optimized primitive polynomials. The outputs of the two shift registers are modulo-2 added to generate the Gold code. The code sequence is generated and fixed at the start of each detection task, and the receiver stores the same standard code sequence for correlation matching.

[0021] S13: Based on the Gold code sequence and carrier frequency parameters, a continuous phase frequency shift keying modulation technique is used to generate the modulation signal; After determining the code sequence and carrier frequency parameters, the digital signal processor (DSP) begins generating the modulation signal. The modulation process employs continuous phase shift keying (CPSK), which offers narrower spectral occupancy and better spectral characteristics compared to traditional discontinuous phase shift keying. Specifically, the modulation process involves generating a corresponding instantaneous frequency sequence based on each bit value of the Gold code sequence. When the symbol is zero, the instantaneous frequency is set to a lower frequency f1; when the symbol is one, the instantaneous frequency is set to a higher frequency f2. To achieve phase continuity, instead of abrupt switching, a Gaussian filter is used for a smooth transition at frequency switching points. The time-bandwidth product of the Gaussian filter is set to 0.3, and the transition time is approximately 20% of the symbol period. This smooth transition ensures that the phase function remains continuously differentiable, effectively suppressing sidelobe radiation caused by frequency switching. After the instantaneous frequency sequence is determined, the phase function is obtained by integrating the frequency over time. The phase function is expressed as the integral of the instantaneous frequency from time zero to the current time t over time. Then, a modulation signal is generated based on the phase function. The modulation signal is expressed as the amplitude multiplied by the cosine of the phase function. The amplitude parameter is set to a normalized unit amplitude at this stage, and the actual transmitted amplitude is controlled by the subsequent power amplification stage. The sampling rate of the generated digital modulation signal sequence is set to 100 kHz to ensure sufficient sampling density for the carrier signal at approximately 500 Hz, satisfying the Nyquist sampling theorem and leaving ample margin. To facilitate frame synchronization at the receiver, a synchronization header signal is added before each complete modulation code sequence. The synchronization header uses a 13-bit Barker code sequence. Barker codes have ideal autocorrelation characteristics, with a sharp main lobe and low side lobes, facilitating accurate time synchronization detection. The synchronization header signal also uses frequency shift keying modulation.

[0022] S14: Based on pipeline electrical parameters and burial depth information, an adaptive power calculation algorithm is used to determine the transmission power. Before applying the modulation signal to the pipeline, a suitable transmission power needs to be determined. If the transmission power is too low, the induction signal will be too weak to be detected, while if the transmission power is too high, it will waste energy and may cause electromagnetic interference to other equipment. This invention uses an adaptive power calculation algorithm to comprehensively consider the pipeline's electrical parameters and burial depth information to determine the optimal transmission power. The pipeline's electrical parameters mainly include conductivity and permeability. The conductivity of pipelines made of different materials varies greatly. Copper pipelines have a conductivity as high as 5.8 x 10^7 Siemens per meter, while steel pipelines have a conductivity of approximately 1.0 x 10^7 Siemens per meter. Pipelines with higher conductivity have a stronger ability to conduct excitation current and require relatively less excitation power. The diameter of the pipeline also affects the induction effect. Pipelines with larger diameters have lower resistance, larger induction areas, and can generate stronger electromagnetic fields. Burial depth is a key factor affecting the strength of the induced signal. According to electromagnetic field theory, the magnetic field strength generated by a point current source is inversely proportional to the square of the distance. The magnetic field strength generated by the pipeline at the ground receiving point is approximately inversely proportional to the square of the burial depth. Doubling the burial depth reduces the ground magnetic field strength to one-quarter. Therefore, the greater the burial depth, the greater the excitation power required. Considering the above factors, the adaptive power calculation algorithm first obtains the nominal conductivity and permeability parameters from the database based on the pipeline type. Then, it queries the power-burial depth correspondence table based on the estimated burial depth to obtain the reference transmit power. The correspondence table stores the transmit power values ​​required to obtain the standard received signal strength at different burial depths. This correspondence table was established through calibration experiments in a standard test field. For cases where the actual pipeline parameters differ from the nominal parameters, the reference power is corrected based on the conductivity ratio. The correction coefficient is equal to the nominal conductivity divided by the actual conductivity. The actual conductivity can be obtained by measuring the received signal strength after transmitting a signal with known power. The dynamic range of power control is designed to be from 20 decibels to 60 decibels, corresponding to power from one watt to one kilowatt. Power adjustment is achieved using a digitally programmable attenuator and a gain-controlled power amplifier. The digital signal processor sets the corresponding attenuation and gain control words according to the calculated target power value to achieve precise power control with a power control accuracy of one decibel.

[0023] S15: Based on the generated modulation signal and power control parameters, the signal is applied to the pipeline using digital-to-analog conversion and power amplification techniques; The digital modulation signal is converted into an analog signal by a digital-to-analog converter (DAC). The DAC uses 16-bit resolution, a conversion rate of 100 kHz per second, and an output voltage range of ±5 volts, accurately reproducing the waveform details of the digital modulation signal. The analog modulation signal output by the DAC has a small amplitude and cannot directly drive the pipeline; it requires power amplification. The power amplifier uses a Class AB push-pull amplification topology, balancing efficiency and linearity. The amplifier gain is dynamically adjustable based on the previously calculated target power, achieved by changing the supply voltage and bias current. The output impedance of the power amplifier is designed to match the pipeline impedance. For typical long-distance metal pipelines, the pipeline impedance is mainly resistive, ranging from a few ohms to tens of ohms. The power amplifier output stage uses transformer coupling, and the transformer turns ratio can be adjusted according to the pipeline impedance to achieve impedance matching and obtain maximum power transfer. The amplified modulated signal is applied to the target pipeline via a transmitting connection device. The device selects either a direct connection or an inductive connection based on the pipeline's accessibility. For accessible pipelines, a direct connection clamp is used to hold the signal directly onto the pipeline; this method is efficient and reliable. For buried, inaccessible pipelines, a high-power induction coil is used at a known location on the pipeline for inductive coupling. The induction coil core uses a high-permeability ferrite material, and the number of coil turns is optimized based on the coupling distance. Regardless of the connection method, the excitation signal establishes an alternating current in the pipeline. This current propagates along the pipeline, generating an alternating magnetic field in the surrounding space. This magnetic field carries the modulation information, providing a signal source for subsequent reception and identification.

[0024] S2 receives the electromagnetic field signal generated by the pipeline excitation signal, and uses a multi-channel receiving and adaptive preprocessing method to obtain the preprocessed digital signal; S21: Based on the spatial electromagnetic field distribution generated by the pipeline, an orthogonal double coil structure is used to achieve multi-dimensional signal reception; The receiver receives alternating magnetic field signals around the pipeline via magnetic induction coils. To obtain richer field information and improve the signal-to-noise ratio, the receiver adopts an orthogonal dual-coil structure. The two magnetic induction coils are arranged orthogonally in space. The axis of the first coil points horizontally and is perpendicular to the predicted pipeline direction, mainly receiving the horizontal magnetic field component generated by the pipeline. The axis of the second coil points vertically and mainly receives the vertical magnetic field component generated by the pipeline. The magnetic cores of both coils are made of permalloy material with high permeability, reaching tens of thousands of relative permeability, which can efficiently concentrate magnetic field lines. The coil winding adopts a multi-layer close winding method, with each coil wound with 10,000 turns. The coil diameter is 8 cm and the length is 20 cm. This size ensures sensitivity while having a reasonable size and weight. According to the law of electromagnetic induction, the induced electromotive force (EMF) in a coil is proportional to the rate of change of magnetic flux through the coil. Magnetic flux equals the product of magnetic flux density and the equivalent area of ​​the coil. Therefore, the induced EMF is proportional to the magnetic field strength, the number of coil turns, the coil area, the core permeability, and the frequency of magnetic field changes. For an excitation frequency of 500 Hz and a typical pipeline magnetic field strength, the induced voltage output by the coil is in the microvolt to millivolt range, resulting in a very weak signal requiring a highly sensitive front-end processing circuit. The advantage of the orthogonal dual-coil structure is that although both channels receive signals containing pipeline signals, their phase and amplitude relationships differ. Through joint processing of the dual-channel signals, a higher signal-to-noise ratio can be obtained compared to a single channel. Furthermore, the orthogonal dual coils have different responses to noise sources in different spatial directions. For far-field noise, such as the power frequency magnetic field of high-voltage lines, the two coils exhibit approximate common-mode interference characteristics, which can be partially canceled through differential processing. For near-field pipeline signals, the two coils exhibit differential-mode signal characteristics, which can be enhanced through a reasonable signal synthesis algorithm.

[0025] S22: Based on the weak signal induced by coil, the primary amplification of the signal is achieved by using low-noise pre-amplification technology; The weak induced voltage signal output from each magnetic induction coil first enters a low-noise preamplifier for amplification. The design of the preamplifier directly affects the system's noise figure and dynamic range, making it a critical component of the entire receiving link. The preamplifier employs a three-op-amp instrumentation amplifier topology, which features extremely high input impedance, extremely low noise figure, and excellent common-mode rejection ratio (CMRR). The input stage uses low-noise field-effect transistors, with an equivalent input noise voltage as low as 3 nanovolts per square root of hertz and an input impedance greater than 100 megohms. This effectively matches the high-impedance output of the coils, avoiding noise degradation caused by the signal source impedance. The differential input of the instrumentation amplifier is connected to both ends of the coil, while the common-mode input is grounded through a high-impedance circuit, suppressing common-mode interference. The CMRR reaches over 80 decibels in the low-frequency range, demonstrating strong suppression capability against common-mode noise such as power frequency interference. The preamplifier gain is set to 40 dB (100 times voltage amplification) to amplify the microvolt-level coil output to the millivolt level, providing sufficient signal amplitude for subsequent processing. Gain selection needs to balance signal amplification and dynamic range; too high a gain will cause amplifier saturation distortion under strong signals, while too low a gain will increase the noise contribution of subsequent stages. A gain of 40 dB achieves a good balance in most applications. The preamplifier is powered by a low-noise linear regulated power supply with a power supply ripple rejection ratio greater than 70 dB, preventing power supply noise from entering the signal path through the amplifier with limited power supply rejection ratio. The amplifier circuit board uses a four-layer design with dedicated ground and power planes. Signal traces use differential pair routing and are well shielded. All these measures are to maintain low noise characteristics at the front end, because according to the noise theory of cascaded systems, the noise figure of the first stage plays a decisive role in the total noise figure; the higher the gain of the first stage and the lower its noise figure, the smaller the noise contribution of subsequent stages.

[0026] S23: Based on the amplified signal, real-time spectrum analysis technology is used to identify environmental interference characteristics; The pre-amplified signal contains valid pipeline signals and various environmental noises. Before further processing, the system performs real-time spectrum analysis to identify the main interference components, providing a basis for subsequent adaptive filtering. Spectrum analysis is achieved through Fast Fourier Transform (FFT), converting the time-domain signal to the frequency domain to obtain the amplitude and phase information of each frequency component. The FFT is set to 256 points, corresponding to a 25.6 millisecond time window at a 10 kHz sampling rate, with a frequency resolution of 39 Hz. This resolution can distinguish adjacent frequency components, meeting the requirements for interference identification. The system performs FFT on multiple consecutive time windows to calculate the power spectral density. The power spectral density is obtained by squaring the amplitude spectrum and performing time averaging. The averaging window contains ten time windows, approximately 0.25 seconds. Time averaging smooths random fluctuations and obtains stable spectral characteristics. After obtaining the power spectral density, the system uses a peak search algorithm to identify peaks in the spectrum. The frequency corresponding to the peak is the frequency of the interference signal. The peak search threshold is set to twice the noise floor, meaning the peak amplitude must be at least 3 dB higher than the surrounding noise floor to be identified as a valid peak. Special attention is paid to the 50 Hz power frequency and its integer multiples of harmonics, such as 100 Hz, 150 Hz, 200 Hz, and 250 Hz. These frequencies are characteristic frequencies of power system interference and are prevalent in urban environments. If significant peak values ​​are detected at these frequency points, it is marked as power frequency interference, requiring notch filtering. In addition to power frequency interference, the system also identifies other narrowband interferences. For any peak frequency in the power spectrum exceeding a threshold, its frequency position and amplitude are recorded as target frequencies for subsequent adaptive filtering. The spectrum analysis results are updated in real time to adapt to the time-varying characteristics of the interference environment, with an update cycle of one second. This ensures timely response to interference while avoiding instability caused by overly frequent parameter adjustments.

[0027] S24: Based on the interference frequency information obtained from spectrum analysis, adaptive digital notch filtering technology is used to suppress narrowband interference; Based on the interference frequencies identified through spectral analysis, the system dynamically configures digital notch filters to precisely suppress these frequencies. A notch filter is a band-stop filter capable of generating significant attenuation within an extremely narrow frequency range while having minimal impact on signals at other frequencies, making it ideal for suppressing narrowband interference. This embodiment employs a second-order infinite impulse response notch filter, whose transfer function is determined by the notch center frequency and quality factor. The notch center frequency is set to the detected interference frequency, and the quality factor determines the sharpness of the notch; a higher quality factor results in a narrower and deeper notch. In this embodiment, the quality factor is set to fifty, corresponding to a notch bandwidth of approximately half the center frequency (1 / 2 Hz). At a notch frequency of fifty Hz, the bandwidth is approximately one Hz, with attenuation reaching forty decibels within this narrow band. At a distance of ten Hz from the center frequency, the attenuation is less than one decibel, ensuring minimal impact on the effective signal. The system supports cascading multiple notch filters, with notch filters configured for each of the identified interference frequencies, supporting up to eight cascaded notch filters. This allows for the simultaneous suppression of narrowband interference at eight different frequencies. For power frequency interference, a four-stage notch filter is typically configured to target the 50 Hz fundamental frequency and the first three harmonics at 100 Hz, 150 Hz, and 200 Hz, effectively removing the main components of power frequency interference. The notch filter is implemented using a direct type-II digital filter structure. The filter coefficients are calculated in real-time based on the notch frequency and quality factor. The calculation uses a bilinear transform method to convert the analog filter design into a digital filter. The sampling frequency of the bilinear transform is set to 10 kHz, consistent with the actual sampling rate. The digital filter operation uses 32-bit floating-point numbers to ensure sufficient numerical accuracy and avoid quantization errors that could degrade the notch filter performance. The notch filter processes dual-channel signals independently, with each channel configured with an independent filter bank. The parameters are the same, but the operations are independent. The filtering process uses a pipelined approach, with continuous input and output of signal samples. The delay time is only a few sampling cycles corresponding to the filter order, without affecting real-time performance.

[0028] S25: Based on the signal after notch filtering, the target frequency band signal is extracted using adaptive bandpass filtering technology; After notch filtering suppresses the main narrowband interference, the signal still contains broadband background noise. Bandpass filtering is needed to further extract the signal in the target frequency band. Bandpass filters allow signals within a specific frequency range to pass through while attenuating signals outside that range, making them an effective means of signal extraction. The center frequency of the bandpass filter is set to the center frequency of the transmitted signal's carrier. For dual-frequency modulation using 480 Hz and 520 Hz, the center frequency is set to the geometric center of both, 500 Hz. The filter needs to cover both modulation frequencies, therefore the passband width must at least cover the range from 480 Hz to 520 Hz, i.e., 40 Hz. Considering factors such as frequency stability and the Doppler effect, the actual passband width is designed to be 60 Hz, with a passband range of 470 Hz to 530 Hz. Within the passband, the filter gain is flat with fluctuations less than one decibel. Rapid attenuation begins at the passband edges, and the stopband attenuation is greater than 40 decibels. The innovation of this invention lies in the adaptive adjustment of the bandwidth of the bandpass filter based on the signal-to-noise ratio (SNR). When the system detects a high SNR, a narrower passband width is used to suppress more out-of-band noise and improve the SNR. When the system detects a low SNR, the passband width is appropriately widened to avoid loss of edge components of the effective signal due to the non-ideal characteristics of the filter. The SNR is estimated by comparing the signal power of the target frequency band with the noise power of other frequency bands. When the SNR is high (greater than 10 dB), the passband width is narrowed to 40 Hz. When the SNR is low (less than 0 dB), the passband width is widened to 100 Hz. The bandwidth adjustment is achieved using a variable-parameter digital filter. The bandpass filter adopts a sixth-order Butterworth filter design. The characteristics of Butterworth filters are that the amplitude frequency response in the passband is as flat as possible without fluctuations, the phase frequency response is close to linear, the group delay is relatively constant, and the distortion of the signal waveform is small. It is suitable for applications that need to preserve signal details. The sixth-order design provides a roll-off of 36 dB per octave, which ensures sufficient stopband attenuation without generating excessive group delay. The filter is implemented using a cascaded second-order section structure, decomposing the sixth-order filter into three cascaded second-order sections. Each second-order section is designed and implemented independently. The cascaded structure has good numerical stability and flexible parameter adjustment.

[0029] S26: Based on the dual-channel analog signal after bandpass filtering, synchronous high-precision analog-to-digital conversion technology is used to digitize the signal; The dual-channel analog signal, after notch filtering and bandpass filtering, needs to be converted into a digital signal for subsequent digital signal processing. The quality of the analog-to-digital converter (ADC) directly affects the final signal quality; key indicators such as resolution, sampling rate, and synchronization all require careful design. This embodiment uses a 16-bit ADC. A 16-bit resolution corresponds to a theoretical dynamic range of 96 dB, which can precisely represent signal amplitude changes. It provides sufficient quantization accuracy for both weak and strong signals, and quantization noise is controlled to a very low level, not becoming a limiting factor for system performance. The sampling rate is set to 10 kHz. For signal frequencies around 500 Hz, the sampling rate is 20 times the signal frequency, far exceeding the Nyquist sampling theorem's requirement of twice the highest frequency. The advantage of a high sampling rate is that it facilitates the implementation of digital filters, providing ample frequency margin. Simultaneously, the design requirements for analog anti-aliasing filters are reduced at high sampling rates, allowing for a gentler roll-off and minimizing the impact on signals within the passband. The ADC's input range is set to ±5 volts to match the output amplitude of the preceding filter, achieving maximum signal swing while ensuring unsaturation to improve the signal-to-noise ratio. Dual-channel analog-to-digital (ADC) conversion requires strict time synchronization; sampling of both channels must occur simultaneously. Otherwise, phase errors between channels will be introduced, affecting subsequent dual-channel joint processing. This embodiment employs a dual-channel synchronous sampling ADC, where both conversion channels share the same sampling clock and trigger signal. The sampling time difference between channels is less than one nanosecond, and the corresponding phase difference at a 500 Hz frequency is less than 0.002 degrees, which is negligible, ensuring accurate preservation of the phase relationship between the two channels. The ADC is also equipped with a programmable gain amplifier, which can perform a final adjustment of the signal amplitude before ADC conversion, allowing the signal amplitude to fully utilize the dynamic range of the ADC. The programmable gain range is from 0 dB to 24 dB, with a step size of 6 dB. Gain control is automatically adjusted by the digital signal processor based on the signal amplitude. The gain is increased when the signal is too small and decreased when the signal approaches full scale, achieving automatic gain control. The time constant for gain adjustment is set to a relatively slow one second to avoid transient distortion caused by rapid changes.

[0030] S3, Based on the preprocessed digital signal, frequency shift keying demodulation method is used to obtain the demodulated digital code sequence; S31: Frame synchronization detection is achieved based on dual-channel digital signals and using a sliding correlation search algorithm; The preprocessed digital signal contains complete modulated data frames. Each data frame includes a synchronization header, valid data, and a frame trailer. To correctly demodulate the valid data, the starting position of the data frame must first be determined, i.e., frame synchronization must be achieved. Frame synchronization is the first step in receiving and processing, and its accuracy directly affects the success or failure of subsequent demodulation. Frame synchronization detection is based on correlation detection of the synchronization header signal. The Barker code sequence used in the synchronization header has ideal autocorrelation characteristics. When correctly aligned, the correlation value reaches its peak, and when misaligned, the correlation value is close to zero. This characteristic makes the Barker code an ideal signal for synchronization detection. The specific implementation process of frame synchronization detection is as follows: The receiver locally stores a standard synchronization header signal template. This template is a sequence of digital samples of the synchronization header signal generated through the same modulation process as the transmitter. The template length is equal to the synchronization header time length multiplied by the sampling rate. For a 13-bit Barker code and a symbol rate of 500 Hz, the synchronization header time length is approximately 26 milliseconds, corresponding to 260 samples at a sampling rate of 10 kHz. The system performs sliding correlation on the received signal, performing correlation calculations on the 260 consecutive samples of the received signal with the template. The correlation calculation is implemented using time-domain convolution or frequency-domain multiplication. Time-domain convolution directly calculates the accumulation of the multiplication of the received samples and the template samples. Frequency-domain multiplication first performs a fast Fourier transform on the received signal and the template, then multiplies them in the frequency domain, and finally performs an inverse fast Fourier transform to obtain the correlation function. The frequency-domain method has a small computational load and is suitable for long sequences. Sliding correlation is performed continuously throughout the entire received data stream. A correlation calculation is performed once for each new sample received, and the output of the correlation function changes continuously with time. When a synchronization header appears in the received signal, the correlation function shows a sharp peak at the corresponding moment. The position of the peak corresponds to the start time of the synchronization header. The frame start position can be determined by detecting the peak of the correlation function. The peak detection adopts the threshold comparison method. A correlation threshold is set. When the correlation value exceeds the threshold, it is determined that a synchronization header has been detected. The setting of the correlation threshold needs to balance the detection probability and the false alarm probability. If the threshold is too low, it will lead to an increase in false alarms. If the threshold is too high, it will lead to an increase in missed detections. In this embodiment, the correlation threshold is set to 70% of the theoretical peak value. The theoretical peak value is the correlation peak value under noise-free conditions. In actual cases with noise, the correlation peak value will decrease. The 70% threshold can still ensure a detection probability of more than 95% when the signal-to-noise ratio is negative six dB, and the false alarm probability is controlled to less than one in a thousand. Frame synchronization detection is performed independently on the dual-channel signals. The two channels may detect the synchronization header at different times. The system integrates the detection results of the two channels. When at least one channel is successfully detected, the frame synchronization is considered successful. If both channels are successfully detected and the time difference is less than one symbol period, the average of the two detection times is taken as the final frame start time. If the time difference is large, the detection result of the channel with the larger correlation peak is selected. The reliability and accuracy of frame synchronization are improved by joint detection of the two channels.

[0031] S32: Based on the time reference determined by frame synchronization, the effective modulation data segment is obtained by using the time window extraction method; After determining the frame start time, the effective modulation data segment is extracted according to the data frame structure. The data frame structure consists of a synchronization header occupying the first thirteen symbols, effective modulation data occupying several symbols in the middle (equal to the length of the Gold code sequence), and a frame tail occupying the last few symbols for frame end marking. For the 127-bit Gold code, the effective data portion consists of 127 symbols. The symbol rate is determined based on the carrier frequency. For an average carrier frequency of 500 Hz, a design of four carrier cycles per symbol is adopted, resulting in a symbol rate of 125 symbols per second. Each symbol duration is eight milliseconds, and the total duration of 127 symbols is approximately one second and sixteen milliseconds, corresponding to 10,160 samples at a 10 kHz sampling rate. The system calculates the start time of the effective data based on the frame start time and the known synchronization header length. The start time equals the frame start time plus the synchronization header duration. From this start time, 10,160 samples are extracted as the effective modulation data segment. The extraction operation is performed synchronously on both channels to ensure strict time alignment of the extracted data from the two channels. The extracted data segments are then processed in subsequent demodulation. The synchronization header and frame tail are removed, and the effective information is processed in a concentrated manner, which improves processing efficiency. At the same time, based on an accurate time base, the subsequent symbol timing is also more precise. The start and end times of each symbol can be accurately calculated according to the symbol rate, avoiding the accumulation of symbol timing errors.

[0032] S33: Based on the extracted modulation data segment, two modulation frequency components are extracted using dual-channel bandpass filtering separation technology; The effective modulation data segment is a frequency shift keying (FSK) modulation signal containing two frequency components, f1 and f2, with different dominant frequencies at different times. To determine whether each symbol is a digital zero or a digital one, the two frequency components need to be extracted separately and their strengths compared. Frequency component extraction is achieved using narrowband bandpass filtering. A narrowband bandpass filter with a center frequency of f1 is designed for frequency f1, and a narrowband bandpass filter with a center frequency of f2 is designed for frequency f2. The passband widths of both filters are designed to be very narrow, covering only a small range near the target frequency. In this embodiment, the passband width is set to 8 Hz, with center frequencies of 480 Hz and 520 Hz, respectively. The passband ranges are 476 Hz to 484 Hz and 516 Hz to 524 Hz, respectively. There is sufficient spacing between the two passbands, and they do not overlap, ensuring clean frequency separation. The narrowband bandpass filter is implemented using a high-order digital filter, with an order of 12. It employs an elliptic filter design, characterized by its ability to achieve the steepest transition band for a given order. Both the passband and stopband allow for some ripple, but the transition band is extremely narrow, making it suitable for applications requiring high selectivity. The design parameters are a passband ripple of 0.5 dB and a stopband attenuation of 40 dB. This design ensures the filter remains flat within the 8 Hz passband and attenuates rapidly outside the passband, effectively suppressing other frequency components. The modulated data segment is processed in parallel by two filters, resulting in two filtered outputs. The first output primarily contains the signal component at frequency f1, and the second output primarily contains the signal component at frequency f2. When transmitting a digital zero symbol, the output amplitude of channel f1 is large, while the output amplitude of channel f2 is small. When transmitting a digital one symbol, the output amplitude of channel f2 is large, while the output amplitude of channel f1 is small. The dual-channel signals are processed by frequency separation, and each channel obtains two components, f1 and f2, for a total of four signals. The energy of each of the four signals is calculated in subsequent processing and then combined for decision-making. The information redundancy of the multi-channel is used to improve the reliability of the decision.

[0033] S34: Based on the separated frequency component signals, the instantaneous amplitude envelope is obtained by using Hilbert transform envelope detection technology; Frequency component signals are narrowband signals whose amplitude varies with the modulation symbols. To accurately measure the signal energy, it is necessary to extract the signal's amplitude envelope. The envelope represents the instantaneous amplitude of the signal, eliminating the rapid oscillations of the carrier phase and facilitating energy calculation and comparison. Envelope extraction employs the Hilbert transform method, a classic method for extracting instantaneous parameters in signal processing. For real signals, the Hilbert transform can construct their analytic signals, and the magnitude of the analytic signal is the envelope of the original signal. The Hilbert transform shifts all frequency components of the signal by 90 degrees: -90 degrees for positive frequencies and +90 degrees for negative frequencies. The transformed signal is called the Hilbert transform of the original signal. Using the original signal as the real part and the Hilbert transform as the imaginary part, a complex analytic signal is constructed. The amplitude of the analytic signal is the envelope, and its phase is the instantaneous phase. The digital implementation of the Hilbert transform employs a finite impulse response (FIR) filter. A 90-degree phase-shift all-pass filter of order 64 is designed, capable of achieving a precise 90-degree phase shift in the target frequency band with a phase shift error of less than one degree. The filter coefficients are designed using the Parks-McClellan optimization algorithm to balance the approximately ideal phase shift characteristics within a specified frequency range. The Hilbert transform is applied to the filtered outputs of channels f1 and f2 respectively to obtain the corresponding analytic signals. The amplitude of the analytic signals is then calculated by taking the square root of the sum of the squares of the real and imaginary parts. The resulting amplitude sequence is the envelope. The sampling rate of the envelope is the same as the original signal, 10 kHz. The envelope sequence clearly reflects the change in signal amplitude over time; the envelope value is large at high-energy frequencies and small at low-energy frequencies. Envelope extraction is performed on all four frequency component signals to obtain four envelope signals, which form the basis for subsequent energy calculations.

[0034] S35: Based on the amplitude envelope signal, the decision metric is obtained by using the symbol synchronization integral energy calculation method; To determine whether each symbol is a digit zero or a digit one, the energy of the two frequency channels at that symbol moment needs to be compared. The channel with higher energy corresponds to the transmission frequency, thus determining the symbol value. Energy calculation is performed within each symbol period. First, the start and end times of each symbol need to be determined. Symbol timing is based on the time base determined by frame synchronization and the known symbol rate. The start time of the first symbol is the start time of the valid data segment, and subsequent symbols are arranged sequentially. The duration of each symbol is the symbol period, which is the reciprocal of the symbol rate. For a symbol rate of 125 symbols per second, the symbol period is 8 milliseconds, corresponding to 80 samples at a 10 kHz sampling rate. To avoid the transitional effects of symbol switching moments, energy integration is not performed throughout the entire symbol period, but rather in the central segment of the symbol. The integration window is 80% of the symbol period, i.e., the 64 samples in the center, corresponding to 6.4 milliseconds. This window includes the main energy of the symbol while avoiding unstable regions at the edges. For each symbol and each frequency channel, the squares of the envelope signal are summed within the integration window to obtain the energy of that channel for that symbol. The square of the envelope is proportional to the signal power, and the energy is obtained by time integration of the power. For the k-th symbol, the energy E1k of channel f1 and the energy E2k of channel f2 are calculated. The energy calculation is performed independently for both channels, and E1k and E2k are obtained for each channel. Then, a soft-decision metric is used. Compared with hard-decision, soft-decision can utilize the reliability information of the decision to improve the error correction capability. The soft-decision metric is defined as the normalized energy difference, and the calculation formula is Dk equal to the difference between E2k and E1k divided by the sum of E2k and E1k. The metric value is between -1 and +1. When E2k is much greater than E1k, the metric value is close to +1, corresponding to a high-confidence number one. When E1k is much greater than E2k, the metric value is close to -1, corresponding to a high-confidence number zero. When E1k and E2k are close, the metric value is close to zero, corresponding to a low-confidence decision uncertainty. The absolute value of the metric value reflects the reliability of the decision. The soft-decision metrics of the two channels are weighted and fused. The weights are determined based on the signal quality of each channel. The signal quality is represented by the signal-to-noise ratio (SNR) estimate, which is calculated by the ratio of signal power to noise power. The signal power is taken as the total energy of the effective data segment, and the noise power is estimated by analyzing the energy of the out-of-band frequency band. The channel with a higher SNR is more reliable and is given a larger weight. The fusion formula is that the total metric Dk is equal to the first channel metric multiplied by the first channel weight plus the second channel metric multiplied by the second channel weight. The weights are normalized so that the sum of the weights is one. The fused metric integrates the information of both channels, and the reliability of the decision is further improved.

[0035] S36: Based on soft-decision metrics, a reliable digital code sequence is generated using threshold decision and error correction methods; Digital decisions are made based on the soft decision metric value of each symbol. The decision rule is as follows: when the metric value Dk is greater than the positive soft decision threshold Dth, the symbol is decided as a number one; when the metric value Dk is less than the negative soft decision threshold negative Dth, the symbol is decided as a number zero; when the absolute value of the metric value Dk is less than the soft decision threshold Dth, the symbol is decided as an unreliable symbol and marked for erasure. The soft decision threshold Dth is set according to the noise level and error correction capability. The higher the threshold, the more conservative the decision and the more symbols are erased, but the higher the reliability of the decided symbols. The lower the threshold, the more aggressive the decision and the fewer symbols are erased, but errors may be introduced. In this embodiment, the soft decision threshold is set to 0.3, which can achieve a good balance between detection rate and reliability in most cases. The original code sequence is obtained after the decision, and the length of the code sequence is equal to the length of the Gold code. Some code elements may be marked as erased. In order to improve the reliability of the code sequence, error correction processing is performed. The error correction processing includes two levels. The first level is to perform majority voting on code elements at the same position in multiple consecutive frames. The system continuously receives multiple data frames, for example, three consecutive frames. Each code element in the three frames is decided separately, and then the code elements at the same position are voted on. The result with the most occurrences in the three decisions is taken as the final result. Code elements marked as erased do not participate in the voting. Multi-frame voting can effectively correct random errors. When the error is random, the probability of it occurring in multiple repetitions is very small, and the probability of the correct code occurring is high. Majority voting can correct a minority of errors, provided that the error rate is not too high. The system designed in this embodiment has a single-frame error rate of less than 10% under normal working conditions, and the error rate is reduced to less than 1% after three-frame voting. The second layer of error correction employs Hamming code forward error correction. At the transmitting end, the Gold code sequence is encoded using Hamming code. Hamming code is a linear block code capable of correcting single-bit errors and detecting double-bit errors. For 127 information bits, eight parity bits are added after Hamming code encoding, resulting in a total length of 135 bits. At the receiving end, the 135-bit code sequence obtained from demodulation is Hamming decoded. The decoding process first calculates the parity check, which is obtained by multiplying the received codeword by the parity check matrix. Based on the value of the parity check, the presence and location of errors can be determined. If the parity check is zero, it indicates no error; if the parity check is non-zero, it indicates the location of the error bit, which can be corrected by flipping the bit. If there are two errors, the parity check cannot correctly indicate the location, but the presence of an error can still be detected. For cases where errors are detected but cannot be corrected, the entire code sequence is marked as unreliable, and the frame data is discarded. Through two-stage error correction, the final code sequence has high reliability, with a bit error rate controlled below one ten-thousandth, providing reliable input for subsequent correlation matching.

[0036] S4. Based on the demodulated digital code sequence, correlation matching and reliability assessment methods are used to obtain the signal validity determination result and quality score; S41: Based on the demodulated code sequence and the standard code sequence, the correlation function is calculated using a weighted sliding correlation algorithm; The receiver locally stores the same standard Gold code sequence as the transmitter. This standard code sequence serves as a template for signal identification. By performing correlation operations between the demodulated received code sequence and the standard code sequence, it can be determined whether the received signal contains the expected modulation information. The correlation operation employs a sliding correlation method, comparing the received code sequence and the standard code sequence bit by bit to calculate the degree of matching. The correlation operation is not performed at a single position in the received code sequence but at all possible relative positions to search for the optimal matching position. This sliding search can handle possible time offsets. The basic method of correlation calculation is to compare the symbol values ​​at corresponding positions of the two sequences bit by bit. If they are the same, it is counted as a match; if they are different, it is counted as a mismatch. The number of matches at all positions is accumulated to obtain the correlation value. The larger the correlation value, the more similar the two sequences are. The innovation of this invention lies in employing a weighted correlation algorithm, which considers the reliability of each symbol. Symbols with high reliability have a larger weight in the correlation calculation and a greater impact on the result, while symbols with low reliability have a smaller weight, or even be negligible. The reliability metric is derived from the soft decision metric during demodulation. A large absolute value of the metric indicates a reliable decision for that symbol, while a small absolute value indicates an unreliable decision. The absolute value of the metric is normalized to between zero and one and used as the reliability weight for that symbol. The weighted correlation calculation formula is: the correlation value equals the sum of the weights of all symbol positions multiplied by the matching indicator function. The matching indicator function is one when two symbols are the same and zero when they are different. In this way, the matching bits with high reliability contribute more to the correlation value, while the positions with low reliability have a smaller impact on the result. Weighted correlation can more accurately reflect the similarity of the sequence and suppress interference from unreliable symbols. Sliding correlation is performed over the entire received code sequence. If the received data contains multiple code sequence periods, the sliding range covers the entire data segment. The correlation function is a function of the sliding position. A correlation value is calculated at each position, forming a correlation function curve. When the sliding reaches the correct alignment position, the received code sequence matches the standard code sequence best, and the correlation value shows a peak. The position of the peak indicates the starting position of the code sequence, and the magnitude of the peak indicates the degree of matching.

[0037] S42: Based on the correlation function, peak search and feature extraction techniques are used to identify relevant peaks; After the correlation function is calculated, significant correlation peaks need to be identified. The presence of correlation peaks indicates that the received signal contains the expected code sequence. Peak search uses a combination of threshold detection and local maximum determination. First, the global maximum value of the correlation function is calculated. Then, a search threshold is set, which is a certain percentage of the global maximum value, such as 50%. All points exceeding this threshold are marked as candidate peaks. Then, local maximum determination is performed on the candidate peaks. The candidate peak value is required to be greater than several adjacent points, such as five points before and after it. Candidate peaks that meet the local maximum condition are confirmed as valid peaks. Through local maximum determination, plateau regions and noise spikes can be eliminated. Feature parameters are extracted from the identified correlation peaks, including peak amplitude, peak position, and peak width. Peak amplitude, i.e., the value of the correlation function at the peak point, reflects the degree of matching between the received code sequence and the standard code sequence. The larger the peak amplitude, the better the matching and the more reliable the signal. Peak position, i.e., the coordinates of the peak point on the sliding position axis, reflects the position of the code sequence in the received data and can be used for precise adjustment of time synchronization. Peak width, i.e., the half-width at half maximum (WHM) of the correlation peak, is defined as the range of positions where the correlation value is greater than half the peak value. Peak width reflects the sharpness of the correlation peak. Ideally, the autocorrelation peak of the Gold code is very sharp, with a WHM of only one or two symbols. A wide correlation peak may indicate that the signal is affected by multipath propagation or time dispersion. Peak width can also be used as an indicator of signal quality. The system not only identifies the main peak, i.e. the peak with the largest amplitude, but also identifies secondary peaks, i.e. other smaller peaks. The existence of secondary peaks may be spurious peaks caused by noise, or they may be generated by multipath propagation or interference. The ratio of the amplitude of the secondary peak to the amplitude of the main peak is called the secondary peak suppression ratio. The secondary peak suppression ratio is an important indicator of signal uniqueness and reliability. A high secondary peak suppression ratio indicates that the main peak is significantly higher than other peaks, and the signal identification is highly certain. A low secondary peak suppression ratio indicates the presence of strong secondary peaks, poor signal identification uniqueness, and a potential risk of misjudgment.

[0038] S43: Based on peak feature parameters, the normalized weighted correlation coefficient calculation method is used to quantify the degree of matching; To quantitatively assess the matching degree between the received code sequence and the standard code sequence, a normalized weighted correlation coefficient is calculated. This coefficient normalizes the correlation value to between zero and one, facilitating the setting of a unified decision threshold. The calculation of the normalized weighted correlation coefficient takes into account the influence of symbol weights. The formula is: the correlation coefficient equals the sum of the weighted matching bits divided by the sum of the total weights. The sum of the weighted matching bits is the aforementioned correlation value, and the sum of the total weights is the sum of the reliability weights of all symbols. This normalization ensures that the correlation coefficient is unaffected by the code sequence length and weight distribution. A correlation coefficient of one indicates a perfect match and all symbols are highly reliable. A correlation coefficient close to 0.5 indicates a random match, and a correlation coefficient between 0.5 and one indicates a partial match. The closer the correlation coefficient is to one, the higher the degree of matching and the more reliable the signal. The correlation coefficient calculation is performed at the peak position, which is the position with the largest correlation value in the sliding correlation. The accurate normalized correlation coefficient is calculated at this position as the final matching measure, and the correlation coefficient is one of the main bases for subsequent decisions.

[0039] S44: Based on the amplitudes of the main peak and the secondary peak, the secondary peak suppression ratio index is obtained by using the ratio calculation method; The sidepeak suppression ratio (PSR) is defined as the ratio of the amplitude of the main peak to the amplitude of the largest sidepeak. The amplitude of the main peak is the global maximum value of the correlation function, and the amplitude of the largest sidepeak is the second largest peak value excluding the main peak. If there are no obvious sidepeaks in the correlation function, the amplitude of the largest sidepeak is taken as the average noise level of the correlation function. The PSR is calculated by dividing the amplitude of the main peak by the amplitude of the largest sidepeak, usually expressed in decibels (dB), which is the common logarithm of the ratio of the main peak to the sidepeak. The larger the PSR, the more prominent the main peak, and the stronger the uniqueness of signal identification. For an ideal Gold code sequence, under noise-free conditions, the ratio of the autocorrelation peak to the sidelobe is equal to the code length. For a 127-bit code, the theoretical PSR is 21 dB. Under noisy conditions, the PSR will decrease; the stronger the noise, the lower the PSR. When the PSR is below a certain threshold, it indicates that the signal is severely contaminated by noise, and the reliability of identification is insufficient. This invention uses the side peak suppression ratio as an important indicator for decision-making, and combines it with the correlation coefficient to form a two-dimensional decision criterion. Only when both the correlation coefficient and the side peak suppression ratio meet the requirements is the signal deemed valid. This multi-dimensional decision-making significantly reduces the false alarm probability and improves the reliability of the decision.

[0040] S45: Based on the correlation coefficient and the side peak suppression ratio, a two-dimensional threshold decision criterion is used to determine the signal validity; The signal validity determination adopts a two-dimensional threshold decision criterion, requiring the simultaneous fulfillment of two conditions: first, the normalized weighted correlation coefficient must be greater than the correlation coefficient threshold; second, the subpeak suppression ratio (SSR) must be greater than the subpeak suppression ratio (SSR) threshold. These two conditions are logically ANDed; only when both conditions are met is the received signal considered a valid pipeline signal. Otherwise, it is considered noise interference or an invalid signal. The correlation coefficient threshold is adaptively set based on the environmental noise level. An initial threshold is set at the start of detection based on the environmental noise assessment results. In low-noise environments, the threshold is set lower (0.75), allowing for a more lenient match; in high-noise environments, the threshold is set higher (0.9), requiring a more stringent match. During detection, the threshold is dynamically adjusted based on the actual detection situation. If multiple consecutive detections easily exceed the threshold, the signal strength is sufficient, and the threshold can be appropriately increased to enhance anti-interference capabilities. If the correlation coefficient frequently approaches the threshold, the signal is weak, and the threshold can be appropriately lowered to improve detection sensitivity. The threshold adjustment range is 0.7 to 0.95, the adjustment step size is 0.05, and the adjustment time constant is ten detection cycles. The side-peak suppression ratio (SPR) threshold is set relatively fixed. Based on the theoretical characteristics of Gold codes and experimental statistics, the threshold is set to six dB, meaning the amplitude of the main peak must be at least twice the amplitude of the largest side-peak. This threshold is easily met under normal signal-to-noise ratio (SNR) conditions and plays an additional filtering role under low SNR conditions. When the SPR is below six dB, even if the correlation coefficient meets the standard, it is considered unreliable and rejected, thus avoiding false alarms. The advantage of two-dimensional decision-making lies in utilizing multiple independent features of the signal. The correlation coefficient reflects the overall matching degree, while the SPR reflects the uniqueness of identification. The two indicators evaluate signal quality from different perspectives, and joint decision-making is more reliable than single-threshold decision-making. Especially in complex interference environments, while one indicator may be affected by interference, the probability of both indicators being interfered with simultaneously is greatly reduced, thereby improving the robustness of the system.

[0041] S46: Based on the results of multiple consecutive detections, the signal stability is verified using a time-domain continuity test method; A single successful detection does not fully guarantee the authenticity of the signal, as it may be a false alarm caused by accidental noise spikes. To further improve the reliability of the detection, a consistency check is performed on the results of multiple consecutive detections, requiring the signal to have temporal continuity and stability. The system performs N consecutive detections, where N is set to five. Each detection includes receiving a complete data frame, demodulation, correlation matching, and detection. The time interval between the five detections is approximately one frame period, with a total observation time of approximately five seconds. In these N detections, the number M of successful detections is counted. The criterion for success is simultaneously satisfying the aforementioned two-dimensional threshold criterion. If the number of successful detections in M ​​is greater than or equal to the preset continuity threshold Mth, the continuity check is passed, and the signal is finally confirmed as valid. Otherwise, it is determined to be an unstable signal and is rejected. The continuity threshold Mth is set to three, meaning that at least three of the five detections must be successful to pass. This three-out-of-five criterion can tolerate two random failures, ensuring a certain degree of fault tolerance, while requiring a majority of successes to guarantee reliability. The principle of continuity testing is that real pipeline signals are continuous and stable. As long as the relative position of the receiver and the pipeline remains unchanged, the received signal should be continuous and consistent, and the correlation matching should be successful continuously. Random noise or transient interference does not have this continuity. The probability of accidentally meeting the decision condition is very small, and the probability of meeting it multiple times in a row is even more negligible. Continuity testing can effectively eliminate false alarms and ensure that the identified signal is indeed a stable pipeline signal.

[0042] S47: Based on the valid signals that have passed all tests, amplitude and phase information are obtained using signal feature extraction techniques; For signals deemed valid, amplitude and phase information are further extracted. This information forms the basis for subsequent calculations of pipeline location and burial depth. Amplitude information reflects the electromagnetic field strength generated by the pipeline, while phase information reflects the spatial relationship between the receiving point and the pipeline. Signal amplitude extraction is performed at the moment corresponding to the relevant peak, when the received signal is optimally aligned with the standard code sequence. The instantaneous amplitude of the signal best represents the true pipeline signal strength. Amplitude extraction employs an envelope detection method, performing a Hilbert transform on the received signal to obtain an analytic signal. The magnitude of the analytic signal is the envelope. Within the time window of the code sequence corresponding to the relevant peak, the average value of the envelope is calculated as the signal amplitude. The averaging window is the time length of a complete code sequence. Time averaging reduces the impact of instantaneous noise, resulting in a stable amplitude value. The unit of amplitude is millivolts, representing the induced voltage at the receiver front end. Signal phase extraction is also based on the Hilbert transform. The argument of the analytical signal is the instantaneous phase. The instantaneous phase value is extracted at the moment corresponding to the correlation peak. The phase value ranges from -180 degrees to +180 degrees. The phase reflects the phase difference between the received signal and the transmitted signal. This phase difference contains information about the propagation path length and is important for determining the spatial location of the pipeline. Amplitude and phase extraction are performed separately for the dual-channel signals, and then a weighted average is calculated. The weights are still determined based on the signal-to-noise ratio (SNR) of each channel. The extracted parameters from the channel with a higher SNR are more reliable and have a larger weight. After weighted averaging, the final signal amplitude and phase values ​​are obtained. These two parameters, along with the receiver's current spatial coordinates, are recorded as data from a single measurement point to provide input for subsequent parameter calculations.

[0043] S48: A signal quality scoring mechanism is established based on multiple evaluation indicators and a comprehensive scoring algorithm. To provide users with an intuitive assessment of measurement reliability, the system establishes a signal quality scoring mechanism. This mechanism comprehensively considers multiple indicators such as correlation coefficient, side-peak suppression ratio, continuous detection success rate, and signal-to-noise ratio (SNR) to calculate a comprehensive quality score. The score ranges from 0 to 100; a higher score indicates better signal quality and more reliable measurement results. The comprehensive scoring algorithm uses a weighted summation method, with each indicator contributing a certain score. The weights are determined based on the importance of the indicator: correlation coefficient has a weight of 40%, side-peak suppression ratio has a weight of 30%, continuous detection success rate has a weight of 20%, and SNR has a weight of 10%. The score for each indicator is calculated by normalizing the indicator value, multiplying it by the maximum score of 100, and then multiplying by the weight. The correlation coefficient score is calculated as correlation coefficient minus 0.5, divided by 0.5, multiplied by 100, and multiplied by 0.4. Normalization ensures that a correlation coefficient of 0.5 corresponds to 0 points, and a correlation coefficient of 1 corresponds to a maximum score of 40. The side-peak suppression ratio score is calculated as side-peak suppression ratio divided by 20, multiplied by 100, and multiplied by 0.3. Normalization ensures that a side-peak suppression ratio of 0 points corresponds to 0 points, and 20 points corresponds to a maximum score of 40. The maximum score is 30 points, with any score exceeding 20 decibels counted as full marks. The success rate of continuous detection is calculated by dividing the number of successful detections (M) by the total number of detections (N), multiplying by 100, and then by 0.2. The signal-to-noise ratio (SNR) score is calculated by dividing the SNR by 20, multiplying by 100, and then by 0.1. Normalization ensures that a SNR of 0 decibels corresponds to 0 points, 20 decibels corresponds to a full score of 10, and any score exceeding 20 decibels counts as full marks. The scores of all indicators are added together to obtain the comprehensive quality score. The quality score is output along with the amplitude and phase parameters, providing users with a quantitative assessment of measurement reliability. Users can judge the credibility of the measurement results based on the quality score. Measurement results with high quality scores can be used directly, while measurement results with low quality scores require careful consideration or remeasurement. The quality scoring mechanism enhances the transparency and credibility of the system.

[0044] S5. Based on the signal validity determination results and quality score, multi-point fitting and model inversion methods are used to obtain the pipeline location burial depth parameters and uncertainty assessment. S51: Based on the effective signal amplitude data from multiple measurement points, the amplitude distribution model is determined using a Gaussian curve fitting method. During the detection process, the receiver moves along the measurement line perpendicular to the predicted pipeline direction and takes measurements at multiple locations. At each measurement point, a signal amplitude value is obtained. These amplitude values ​​constitute the amplitude distribution along the measurement line. According to electromagnetic field theory, the magnetic field distribution generated by a long straight current source in the vertical direction is approximately Gaussian curve-shaped, reaching its maximum value directly above the current and gradually attenuating towards both sides. Using this theoretical model, Gaussian curve fitting is performed on the measured amplitude data, which can accurately determine the horizontal position of the pipeline. The Gaussian curve is expressed as: amplitude A equals peak amplitude A0 multiplied by an exponential function, where the exponent is the negative x-coordinate minus the square of the peak position x0 divided by twice the square of the standard deviation σ. This expression has three parameters: peak amplitude A0, peak position x0, and standard deviation σ. The goal of fitting is to estimate these three parameters from the measured data. The fitting method is nonlinear least squares. The objective function is the sum of squared errors between the measured amplitude and the model amplitude. An iterative optimization algorithm is used to find the parameter values ​​that minimize the objective function. The optimization algorithm uses the Levenberg-Marquardt algorithm, which combines the advantages of the Gauss-Newton method and the gradient descent method. It has a fast convergence speed and good robustness. The initial values ​​of the iteration are set according to the preliminary analysis of the data. The initial value of the peak amplitude is the maximum value of the measured amplitude, the initial value of the peak position is the coordinate of the measurement point corresponding to the maximum amplitude, and the initial value of the standard deviation is one-quarter of the measurement line length. The iteration termination condition is that the parameter change is less than a preset threshold or the number of iterations exceeds one hundred. After fitting, the goodness of fit is evaluated, and the coefficient of determination R-squared is calculated. The R-squared is defined as the regression sum of squares divided by the total sum of squares. An R-squared value close to 1 indicates a good fit, meaning the model can describe the data well. An R-squared value much less than 1 indicates a poor fit, meaning the data does not match the model. An R-squared value greater than 0.95 is required for a successful fit. If the goodness of fit does not meet the requirements, it may be due to poor measurement data quality or invalid pipeline model assumptions, requiring remeasurement or the use of other methods.

[0045] S52: Based on the Gaussian curve parameters obtained by fitting, the peak positioning method is used to determine the horizontal position coordinates of the pipeline. The peak position x0 obtained from Gaussian curve fitting is the horizontal coordinate directly above the pipeline. This coordinate is the position in the survey line coordinate system and needs to be transformed to the geodetic coordinate system or engineering coordinate system. The coordinate transformation is based on the azimuth angle and starting point coordinate of the survey line. The azimuth angle of the survey line is determined by compass or GPS during measurement, and the starting point coordinate is the coordinate of the first measuring point of the survey line. After coordinate transformation, the absolute coordinates of the pipeline's horizontal position are obtained, including east and north coordinates. To improve positioning accuracy, the results of multiple survey lines are cross-validated. Multiple survey lines are laid out at different locations along different directions of the pipeline, and each survey line is independently fitted to obtain a horizontal position coordinate. Ideally, these coordinates should fall on the same straight line, i.e., the trajectory line of the pipeline. In reality, due to measurement errors, there will be some dispersion. The least squares linear fitting method is used to fit multiple positioning points into a straight line. This straight line is the trajectory of the pipeline. The parameters of the fitted straight line include the slope and intercept of the line, corresponding to the direction angle and position of the pipeline. By fusing multiple survey lines, the positioning accuracy and reliability can be significantly improved, reaching the decimeter or even centimeter level.

[0046] S53: Based on the standard deviation parameter and amplitude distribution characteristics of the Gaussian curve, the half-width at half-height method is used to calculate the pipeline burial depth; The standard deviation σ of the Gaussian curve is directly related to the burial depth of the pipeline. According to electromagnetic field theory and numerous experimental calibrations, there is a fixed proportional relationship between the pipeline burial depth d and the half-width at half-maximum (WHM) of the Gaussian curve. The WHM is defined as the distance between two positions where the amplitude equals half the peak value. For the Gaussian curve, the WHM is equal to 2.355 times the standard deviation σ, and the burial depth d is equal to 0.61 times the WHM. Combining the two equations, the burial depth d is equal to 1.436 times the standard deviation σ. Therefore, the burial depth d can be directly calculated from the standard deviation σ obtained from the fitting. This method is called the half-width at half-maximum method or the standard deviation method. It is a commonly used method for calculating burial depth in pipeline detection. The advantages of this method are its simplicity and directness. It only requires amplitude distribution data and does not require phase information. It is applicable to various types of pipelines, and the calculation accuracy can reach 10% under ideal conditions. It should be noted that the theoretical derivation of the half-width at half-height method is based on the assumption of long straight current, which requires the pipeline to be straight and its length to be much greater than the burial depth. If the pipeline is curved or the burial depth is close to the pipeline length, the accuracy of the method will decrease. In this case, a more complex model is required. In practical applications, the half-width at half-height method can provide a reliable burial depth estimate for cases where the burial depth is less than five meters and the pipeline length is greater than fifty meters.

[0047] S54: Based on signal phase data, the phase gradient method is used to help determine the pipeline routing angle; The signal phase contains information about the relative position of the receiving point and the pipeline. As the measurement line moves, the signal phase changes with the position. The phase change pattern can be used to determine the pipeline direction. The phase gradient method is based on the phase change rate. The phase change rate is the largest in the direction perpendicular to the pipeline and close to zero in the direction parallel to the pipeline. By measuring the phase gradient in different directions, the pipeline direction can be determined. Specifically, during the measurement point layout, in addition to the main measurement line perpendicular to the estimated pipeline direction, several auxiliary measurement lines in different directions are also arranged. The signal phase of multiple points is measured on each measurement line, and the phase gradient is calculated. The phase gradient is defined as the phase difference divided by the distance difference. For each measurement line, a linear regression is used to fit the relationship between phase and position. The slope of the regression line is the phase gradient in that direction. The magnitude of the phase gradient in each direction is compared. The direction with the largest phase gradient is the direction perpendicular to the pipeline, and the direction perpendicular to that direction is the pipeline direction. The pipeline direction angle is defined as the angle between the pipeline direction and true north. The direction angle determined by the phase gradient method is compared with the direction angle based on the multi-point position fitting. The two should be consistent. If there is a difference, the weighted average of the two is taken as the final result. The weights are determined according to their respective uncertainties. The smaller the uncertainty, the greater the weight. By fusing multiple methods, the accuracy of direction determination is improved. The accuracy of direction angle determination can reach one degree.

[0048] S55: Based on the electromagnetic field forward model, an iterative inversion algorithm is used to optimize pipeline parameter estimation; For complex situations, such as pipelines with bends, varying burial depths, or multiple pipelines interfering with each other, simple Gaussian fitting and the full width at half maximum (FWHM) method may lack sufficient accuracy. In such cases, a more precise electromagnetic field model is needed for inversion calculations. The forward model calculates the magnetic field amplitude and phase at each measuring point based on the pipeline's current, location, and burial depth parameters. The forward calculation is based on the Biot-Savart law. For a finite-length pipeline, it is discretized into several small segments, each considered a current element. The magnetic field generated by each current element at the measuring point is calculated, and then vectoredly superimposed to obtain the total magnetic field. The forward model can accurately describe the actual electromagnetic field distribution, including near-field effects and end-point effects. The inversion process is the reverse of the forward model. Given the measured magnetic field data at the measuring points, the pipeline parameters are deduced. The inversion problem is an optimization problem; the goal is to find a set of pipeline parameters that most closely approximates the magnetic field calculated in the forward model with the measured magnetic field. The objective function for optimization is the sum of squared errors between the measured and calculated values. An iterative optimization algorithm is used to solve this problem. The optimization algorithm can be a genetic algorithm, particle swarm optimization, or gradient-based algorithm. This embodiment uses the Levenberg-Marquardt algorithm, which is suitable for solving nonlinear least squares problems. During the iteration process, pipeline parameters are continuously updated, the objective function is calculated, and convergence is determined. The convergence condition is that the change in the objective function is less than a threshold or the number of iterations exceeds a limit. The pipeline parameters obtained through inversion include horizontal position, burial depth, current magnitude, and directional angle. The inversion method can fully utilize the amplitude and phase information of all measuring points, achieving higher accuracy than simpler methods, especially in complex situations. However, the computational load of the inversion calculation is large, requiring a digital signal processor with strong computing power. Alternatively, preliminary processing can be completed at the detection site, followed by precise inversion back in the office.

[0049] S56: Based on the signal quality scores of each measurement point, a weighted average method is used to improve the accuracy of parameter estimation; In the aforementioned fitting and inversion calculations, the data from each measurement point are treated equally. However, in reality, the data quality varies between different measurement points. High-quality data is more reliable and should be given greater weight in the calculation, while low-quality data has greater uncertainty and should have smaller weights. Weighted processing can improve the overall accuracy. The weights are determined based on the aforementioned signal quality score. Measurement points with high quality scores have larger weights, and those with low quality scores have smaller weights. The weights are proportional to the quality scores. Normalization ensures that the sum of all weights is one. In the objective function of fitting and inversion, the error term is multiplied by the weight of the corresponding measurement point. Measurement points with larger weights contribute more to the error, and the optimization algorithm will prioritize fitting these high-quality measurement points. Measurement points with smaller weights have less impact on the results, and even if these points have large deviations, they will not significantly affect the overall results. The effect of weighted processing is to suppress the interference of low-quality data, make full use of the information of high-quality data, and improve the accuracy and robustness of parameter estimation. When there are large differences in data quality, weighted processing can significantly improve the results.

[0050] S57: Based on the statistical properties of parameter estimation, the Monte Carlo method is used to evaluate measurement uncertainty; The measurement results should not only provide estimated parameter values ​​but also an uncertainty assessment. Uncertainty represents the confidence range of the measurement results and is an important indicator of measurement quality. The uncertainty assessment uses the Monte Carlo method, which propagates the uncertainty of the input parameters through random simulation to obtain the uncertainty distribution of the output parameters. Specifically, firstly, based on the noise level of the measurement data, the standard deviation of the amplitude and phase measurements at each measuring point is estimated. The noise level can be obtained from signal quality scoring and signal-to-noise ratio estimation. It is assumed that the measurement error follows a normal distribution, with the mean being the measured value and the standard deviation being the estimated standard deviation. Then, multiple random samplings are performed. Each sampling randomly perturbs the amplitude and phase values ​​of all measuring points. The perturbation amount is randomly drawn from a normal distribution. The data is used as a new set of input data. This set of data is then refitted or inverted to obtain a set of pipeline parameter estimates. The above sampling and calculation process is repeated many times, for example, a thousand times, to obtain a thousand sets of parameter estimates. The distribution of these thousand sets of estimates reflects the uncertainty of the parameters. The mean and standard deviation of these estimates are calculated. The mean is used as the final estimate of the parameter, and the standard deviation is the standard uncertainty. The expanded uncertainty is defined as the standard uncertainty multiplied by the coverage factor. At a 95% confidence level, the coverage factor is taken as 1.96. The expanded uncertainty gives the possible range of the true value of the parameter. The Monte Carlo method does not rely on the derivation of complex error propagation formulas and obtains results directly through numerical simulation, making it suitable for various complex nonlinear calculation problems.

[0051] S58: Based on the uncertainty assessment results, the confidence level grading method is used to output the measurement reliability level; Based on the calculated measurement uncertainty and signal quality score, the measurement results are classified into three reliability levels: high confidence, medium confidence, and low confidence. The classification criteria comprehensively consider the magnitude of uncertainty and the signal quality score. When the relative uncertainty of the burial depth measurement is less than 10% and the signal quality score is greater than 80, it is judged as high confidence. When the relative uncertainty is between 10% and 20% or the signal quality score is between 60 and 80, it is judged as medium confidence. When the relative uncertainty is greater than 20% or the signal quality score is less than 60, it is judged as low confidence. The confidence level is output along with the measurement results to provide users with an intuitive reliability indication. High confidence results can be directly used for engineering decisions, medium confidence results are recommended for review, and low confidence results need to be remeasured or verified using other methods.

[0052] S6. Based on the pipeline's location and burial depth parameters and detection performance indicators, an adaptive optimization method is used to obtain the optimized system operating parameters. S61: Based on continuous noise monitoring data, environmental noise characteristics are obtained using power spectrum analysis and statistical methods; During the detection process, the system continuously monitors the environmental electromagnetic noise, sampling and analyzing noise every ten seconds. Noise sampling is performed with the transmitter off, and the receiver collects five seconds of environmental noise data. The system then performs a fast Fourier transform on the data to calculate the power spectral density, identify the main interference frequencies and noise levels, and uses a moving average to average the power spectrum of multiple measurements. The averaging window is six measurements, or one minute, to obtain stable noise characteristic parameters. These parameters include the average noise power of the target frequency band, power frequency interference intensity, narrowband interference frequency list, and the temporal stability of the noise. These parameters are updated in real time and used as input for adaptive optimization.

[0053] S62: Based on the noise type identification results, the optimal anti-interference strategy is selected using a rule base matching method; Based on the identified noise type, the system selects the optimal anti-interference strategy from a preset rule base. The rule base contains various typical noise scenarios and corresponding optimization strategies. When power frequency interference is identified as the dominant noise, the strategy is to enhance the notch filter stage and adjust the carrier frequency to avoid power frequency harmonics. When broadband noise is identified as the dominant noise, the strategy is to increase the modulation code sequence length and improve the correlation processing gain. When narrowband single-frequency interference is identified, the strategy is to activate the frequency agility mode and automatically select the frequency with the least interference. The rule base is established based on expert experience and a large amount of experimental data, covering common interference scenarios. Rule matching adopts a fuzzy inference method, calculates the matching degree of each rule based on the similarity of noise features, and selects the rule with the highest matching degree for execution.

[0054] S63: Based on the detection success rate statistics, a feedback control algorithm is used to dynamically adjust the decision threshold; The system calculates the success rate of recent continuous detections. The success rate is defined as the number of times a signal is determined to be valid divided by the total number of detections. The statistical window is 20 detections. When the success rate is below 70%, the system is deemed to have insufficient sensitivity, and a strategy of lowering the decision threshold is adopted, with the correlation coefficient threshold lowered by 0.05. When the success rate is above 95% and there are no false positives, the decision threshold can be increased to enhance anti-interference capabilities, with the correlation coefficient threshold increased by 0.05. The threshold adjustment adopts a gradual adjustment to avoid instability caused by large sudden changes. The time constant for threshold adjustment is 20 detection cycles. After each adjustment, the effect is observed before deciding whether to continue adjusting, forming a closed-loop feedback control.

[0055] S64: Based on the received signal strength indication, a closed-loop power control algorithm is used to adjust the transmit power; The system adaptively adjusts the transmission power based on the strength of the received signal. The received signal strength is measured by the amplitude of the effective signal. A target signal strength range is set. When the received signal strength is lower than the lower limit of the target range, the transmission power increases by 3 dB. When the received signal strength is higher than the upper limit of the target range, the transmission power decreases by 3 dB. The target signal strength range is set according to the dynamic range and signal-to-noise ratio requirements of the analog-to-digital converter. This ensures that the signal is not saturated while making full use of the dynamic range. The response time for power adjustment is three detection cycles to avoid oscillation caused by excessively fast adjustment. The power control range is limited to between 20 dB and 60 dB to protect the equipment and avoid excessive interference.

[0056] S65: Based on historical detection data, a performance prediction model is established using machine learning methods; The system records and stores the environmental parameters, operating parameters, and performance indicators of each probe, forming a historical database. Historical data includes noise power, modulation parameters, transmit power, decision threshold, detection success rate, and signal quality score. Based on this data, a performance prediction model is trained. The prediction model uses a support vector machine regression algorithm, with environmental and operating parameters as inputs and predicted detection performance indicators as outputs. Model training uses 80% of the historical data as the training set and 20% as the test set. After training, the model's prediction error is less than 15%. This model is used for online prediction, quickly predicting performance under various operating modes when environmental parameters change, and selecting the operating mode with the optimal prediction performance. Compared to trial and error, the prediction model can quickly find the optimal parameters, improving adaptive efficiency.

[0057] S66: Based on the calculation results of optimized parameters, a parameter update mechanism is used to configure the system working status in real time; Based on the optimal parameters obtained from the above optimization strategies, the system updates the working parameter configuration in real time. The parameter update is achieved by writing to the registers of the digital signal processor. The updated content includes the modulation code sequence length, carrier frequency pair, transmit power, notch filter parameters, bandpass filter parameters, and related decision thresholds. The parameter update is performed during the detection interval and does not affect the current detection task. After the update is completed, the next detection uses the new parameters. The parameter update is recorded in the log file for easy fault analysis and performance evaluation. Through continuous adaptive optimization, the system always works in the optimal state and maintains stable detection performance in response to environmental changes.

[0058] This invention focuses on the application of precise underground pipeline detection in complex urban electromagnetic environments, and is particularly suitable for urban core areas with complex interference sources such as power frequency interference from high-voltage transmission lines, stray current interference from rail transit, and radio frequency interference from communication base stations. In a road renovation project in a city center, it was necessary to accurately locate old power cables three meters underground. A high-voltage transmission line passed overhead in this area, and the power frequency interference intensity was five times that of normal signals. Traditional pipeline detectors could not function properly in this environment. The anti-interference pipeline detection device of this invention was used for the detection operation.

[0059] Before the detection began, the system conducted an environmental noise assessment and detected significant peaks in 50 Hz power frequency interference and its harmonics at 100 Hz and 150 Hz. The noise level was determined to be a high-noise environment. The system automatically selected a 255-bit Gold code sequence as the modulation information, and selected 480 Hz and 520 Hz carrier frequencies to avoid the power frequency harmonic frequencies. Four-stage notch filters were configured to precisely suppress 50 Hz, 100 Hz, 150 Hz and 200 Hz respectively.

[0060] The transmitter applies the modulation signal to the cable through a direct-connect clamp. The transmission power is adaptively set to 45 dB based on the burial depth of 3 meters. The receiver is laid out with a 10-meter-long measuring line perpendicular to the cable, with a measuring point set every 0.5 meters, for a total of 21 measuring points.

[0061] Table 1 shows examples of data from some measuring points: Table 1. Examples of data from some measuring points Gaussian curve fitting was performed based on the measurement point data. The goodness of fit R-squared value was 0.98, the peak position was 5.1 meters, and the standard deviation was 2.1 meters. The burial depth was calculated to be 3.0 meters based on the standard deviation, with an error of only 0.1 meters from the actual burial depth. The measurement uncertainty was assessed as 0.2 meters, and the confidence level was high. The entire detection process still obtained reliable measurement results under strong power frequency interference, verifying the effectiveness of the method of the present invention.

[0062] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.

Claims

1. A method for detecting interference-resistant pipelines, characterized in that, Includes the following steps: S1. Obtain the detection environment parameters, and use adaptive parameter selection and continuous phase frequency shift keying modulation method to generate and transmit pipeline excitation signal; S2 receives the electromagnetic field signal generated by the pipeline excitation signal, and uses a multi-channel receiving and adaptive preprocessing method to obtain the preprocessed digital signal; S3, Based on the preprocessed digital signal, frequency shift keying demodulation method is used to obtain the demodulated digital code sequence; S4. Based on the demodulated digital code sequence, correlation matching and reliability assessment methods are used to obtain the signal validity determination result and quality score; S5. Based on the signal validity determination results and quality score, multi-point fitting and model inversion methods are used to obtain the pipeline location burial depth parameters and uncertainty assessment. S6. Based on the pipeline's location and burial depth parameters and detection performance indicators, an adaptive optimization method is used to obtain the optimized system operating parameters.

2. The anti-interference pipeline detection method according to claim 1, characterized in that, In step S1, detection environment parameters are acquired, and an adaptive parameter selection and continuous phase frequency shift keying modulation method are used to generate and transmit pipeline excitation signals, including: Based on the pipeline type and estimated burial depth of the current detection mission, the reference carrier frequency and frequency offset parameters are determined by looking up a table. Based on the environmental noise level assessment results, a hierarchical selection strategy is adopted to determine the type and length of the modulation code sequence. According to the noise level index, the environment is divided into three levels: low noise, medium noise, and high noise. Gold code sequences of different lengths are selected for different noise levels. Based on the Gold code sequence and carrier frequency parameters, a continuous phase frequency shift keying modulation technique is used to generate the modulation signal. A Gaussian filter is used to achieve a smooth transition at the frequency switching time to realize phase continuity.

3. The anti-interference pipeline detection method according to claim 1, characterized in that, The electromagnetic field signal generated by the receiving pipeline excitation signal in S2 is processed using a multi-channel receiving and adaptive preprocessing method to obtain a preprocessed digital signal, including: Based on the spatial electromagnetic field distribution generated by the pipeline, an orthogonal double coil structure is adopted to realize multi-dimensional signal reception, with the two magnetic induction coils arranged orthogonally in space. Based on the amplified signal, real-time spectrum analysis technology is used to identify environmental interference characteristics, and the main interference frequencies are identified through fast Fourier transform. Based on the interference frequency information obtained from spectrum analysis, an adaptive digital notch filter technique is used to suppress narrowband interference, and the digital notch filter is dynamically configured to accurately suppress the interference frequency.

4. The anti-interference pipeline detection method according to claim 1, characterized in that, In step S3, based on the preprocessed digital signal, a frequency shift keying demodulation method is used to obtain the demodulated digital code sequence, including: Based on dual-channel digital signals, a sliding correlation search algorithm is used to realize frame synchronization detection. The receiver locally stores a standard synchronization header signal template and performs sliding correlation operation on the received signal to determine the frame start position. Based on the extracted modulation data segment, a dual-channel bandpass filter separation technique is used to extract two modulation frequency components, and narrowband bandpass filters are designed for the two frequencies respectively. Based on the separated frequency component signals, the instantaneous amplitude envelope is obtained by using Hilbert transform envelope detection technology, and the envelope is extracted by constructing an analytic signal through Hilbert transform.

5. The anti-interference pipeline detection method according to claim 1, characterized in that, In step S4, based on the demodulated digital code sequence, correlation matching and reliability assessment methods are used to obtain signal validity determination results and quality scores, including: Based on the demodulated code sequence and the standard code sequence, the correlation function is calculated using a weighted sliding correlation algorithm, which considers the reliability of each symbol. Based on the correlation function, peak search and feature extraction techniques are used to identify relevant peaks and extract peak amplitude, peak position and peak width feature parameters. Based on the correlation coefficient and the secondary peak suppression ratio, a two-dimensional threshold decision criterion is used to determine the validity of the signal. This requires that the normalized weighted correlation coefficient be greater than the correlation coefficient threshold and the secondary peak suppression ratio be greater than the secondary peak suppression ratio threshold.

6. The anti-interference pipeline detection method according to claim 1, characterized in that, In step S5, based on the signal validity determination result and quality score, multi-point fitting and model inversion methods are used to obtain the pipeline location burial depth parameters and uncertainty assessment, including: Based on the effective signal amplitude data from multiple measuring points, the amplitude distribution model is determined by Gaussian curve fitting, and the horizontal position of the pipeline is determined by Gaussian curve fitting on the measured amplitude data. Based on the standard deviation parameter and amplitude distribution characteristics of the Gaussian curve, the half-width at half-height method is used to calculate the pipeline burial depth, and the burial depth is directly calculated based on the standard deviation obtained by fitting. Based on the statistical properties of parameter estimation, the Monte Carlo method is used to evaluate measurement uncertainty. The uncertainty distribution of the output parameter is obtained by propagating the uncertainty of the input parameter through random simulation.

7. The anti-interference pipeline detection method according to claim 1, characterized in that, In step S6, based on the pipeline's burial depth parameters and detection performance indicators, an adaptive optimization method is used to obtain optimized system operating parameters, including: Based on continuous noise monitoring data, power spectrum analysis and statistical methods are used to obtain environmental noise characteristics and identify the main interference frequencies and noise levels. Based on the noise type identification results, a rule base matching method is used to select an anti-interference strategy from a preset strategy rule base. Based on the detection success rate statistics, a feedback control algorithm is used to dynamically adjust the decision threshold, and the correlation coefficient threshold is dynamically adjusted according to the success rate. Based on the calculation results of optimized parameters, a parameter update mechanism is used to configure the system's working status in real time.

8. The anti-interference pipeline detection method according to claim 2, characterized in that, The method for determining the type and length of the modulation code sequence based on the environmental noise level assessment results and using a hierarchical selection strategy specifically includes: Before the formal detection begins, environmental noise sampling and analysis are performed. The receiver collects environmental electromagnetic noise data without applying an excitation signal. The collected noise data is then subjected to a fast Fourier transform to calculate the power spectrum. The average noise power is calculated within the target frequency range to obtain the environmental noise level index. When the noise power is lower than the preset first noise threshold, it is determined to be a low noise environment; when the noise power is higher than the preset second noise threshold, it is determined to be a high noise environment; otherwise, it is determined to be a medium noise environment. In low-noise environments, a Gold code sequence of the first length is selected; in medium-noise environments, a Gold code sequence of the second length is selected; and in high-noise environments, a Gold code sequence of the third length is selected.

9. The anti-interference pipeline detection method according to claim 3, characterized in that, The signal based on the notch-filtered signal is used to extract the target frequency band signal using adaptive bandpass filtering technology, specifically including: The center frequency of the bandpass filter is set to the center frequency of the carrier wave of the transmitted signal, and the filter covers two modulation frequencies; The bandwidth of the bandpass filter is adaptively adjusted according to the signal-to-noise ratio. When the system detects that the current signal-to-noise ratio is greater than a preset first signal-to-noise ratio threshold, the first passband width is used. When the system detects that the signal-to-noise ratio is less than a preset second signal-to-noise ratio threshold, the second passband width is used. The second passband width is greater than the first passband width. The bandpass filter is designed using a Butterworth filter, and the filter implementation adopts a cascaded second-order section structure.

10. An anti-interference pipeline detection device, used to perform the steps in the anti-interference pipeline detection method as described in any one of claims 1-9, characterized in that, include: The signal generation and transmission module is used to acquire detection environment parameters and generate and transmit pipeline excitation signals using adaptive parameter selection and continuous phase frequency shift keying modulation methods. The signal receiving and preprocessing module is used to receive the electromagnetic field signal generated by the pipeline excitation signal. It adopts a multi-channel receiving and adaptive preprocessing method to obtain the preprocessed digital signal. The signal demodulation module is used to obtain the demodulated digital code sequence based on the preprocessed digital signal using the frequency shift keying demodulation method. The signal identification and evaluation module is used to obtain the signal validity determination result and quality score based on the demodulated digital code sequence, using correlation matching and reliability evaluation methods. The parameter calculation module is used to obtain the pipeline location and burial depth parameters and uncertainty assessment based on the signal validity judgment results and quality scores, using multi-point fitting and model inversion methods. The adaptive optimization module is used to obtain optimized system operating parameters based on pipeline location and burial depth parameters and detection performance indicators using an adaptive optimization method.