Cable diagnosis method for industrial field bus and industrial field bus chip
By using pseudo-random sequences and correlation estimation methods on industrial fieldbus cables, combined with block signals and phase ergodic mechanisms, the problem of high sensitivity to external interference and noise in cable diagnosis is solved, achieving higher diagnostic reliability and accuracy.
Patent Information
- Application Number
- CN202511995288.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-03-20
AI Technical Summary
Existing cable diagnostic technologies face challenges such as high sensitivity to external interference and noise, and poor robustness to signal distortion in industrial fieldbus cables, leading to a decrease in diagnostic reliability and accuracy.
Pseudo-random sequences are used for cable diagnosis. By generating pseudo-random sequences and injecting them into the cable, the receiver collects the echo signals and performs correlation estimation. Peak values are detected to determine the fault type and location. Block signals and phase ergodic mechanisms are combined to reduce the impact of interference.
It improves diagnostic reliability and accuracy in complex electromagnetic environments, reduces sensitivity to external interference and noise, and is suitable for fault detection of long-distance industrial fieldbus cables.
Smart Images

Figure CN121703702A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of cable detection, in particular to a cable diagnosis method for an industrial field bus and an industrial field bus chip. BACKGROUND
[0002] The existing cable diagnosis technology usually adopts a Time Domain Reflectometry (TDR) method. The basic principle is: a step or narrow pulse signal is injected into the cable to be tested, and the state of the cable is judged by detecting the reflected echo along the cable. According to the transmission line theory, when the cable characteristic impedance is uniform and the terminal is well matched, the signal has no reflection; if there is a discontinuity point of impedance caused by a broken circuit, a short circuit or a physical damage, part of the signal energy will be reflected at this position. By analyzing the polarity, amplitude, waveform shape and time delay of the reflected echo, the fault type can be accurately identified and its position can be located.
[0003] Some industrial field bus cables, such as AUTBUS bus cables, support long-distance communication. When the traditional TDR technology is directly applied to the diagnosis of such industrial field bus cables, the following two key challenges are faced: 1) TDR technology is highly sensitive to external interference and noise: Industrial field bus cables are widely deployed in industrial sites, and the electromagnetic environment is complex, often with strong electromagnetic interference, power supply noise or crosstalk of adjacent signal lines. During the diagnosis process, these external interferences may be superimposed on the cable echo, and the traditional TDR only relies on a single transient response, which is difficult to effectively distinguish between real reflected signals and random interferences, resulting in misjudgment or missed detection, and the diagnosis reliability is significantly reduced.
[0004] 2) TDR technology has poor robustness to signal distortion: Traditional TDR usually relies on accurate capture of the rising edge (i.e. step jump) of the reflected signal to realize fault detection and positioning. However, industrial field bus cables support long-distance communication (such as AUTBUS bus cables supporting more than 500 meters of communication), and in a longer transmission path, the signal will be significantly distorted due to cable loss, dispersion and impedance fluctuations, etc. The rising edge becomes blurred or even disappears. This makes it difficult for the traditional TDR method based on edge detection to work stably, and the diagnosis accuracy cannot be guaranteed.
[0005] Therefore, under this background, how to provide a cable diagnosis technology suitable for industrial field bus is a technical problem to be solved. SUMMARY
[0006] In view of the above problems of the prior art, the present application provides a cable diagnosis method for an industrial field bus and an industrial field bus chip, so as to reduce the sensitivity to external interference and noise, and to be suitable for the diagnosis of cable faults of the industrial field bus in a complex electromagnetic measurement environment.
[0007] To achieve the above object, the present application provides a cable diagnosis method for an industrial field bus, comprising the following steps: generating a pseudo-random sequence at the transmitting end, and injecting the pseudo-random sequence into the cable to be tested after being converted into an analog signal; the pseudo-random sequence is also provided to the receiving end as a reference sequence; collecting echo signals on the cable at the receiving end, and converting the echo signals into a sample sequence by sampling; performing a peak detection process, comprising: estimating a channel impulse response based on the sample sequence and the reference sequence by an iterative correlation estimation method, wherein the channel impulse response comprises a discrete coefficient vector; and detecting a peak value satisfying a preset condition from the channel impulse response; determining a fault type of the cable according to the sign and amplitude of the detected peak value, and / or calculating a fault position on the cable according to the position of the peak value in the channel impulse response.
[0008] According to the above, the present application estimates a channel impulse response by correlating the sample sequence corresponding to the echo signal with the pseudo-random sequence, so as to be used for cable diagnosis. Since the external interference and noise are irrelevant to the transmitting signal, their influence can be eliminated by correlation estimation. Compared with the traditional TDR which transmits a step signal at one time and records the echo waveform, the present method has lower sensitivity to external interference and noise, and is more suitable for the diagnosis of cable faults of the industrial field bus in a complex electromagnetic measurement environment.
[0009] As a possible implementation manner of the first aspect, the generating of the pseudo-random sequence comprises: generating the pseudo-random sequence in blocks at a symbol rate fs / K, wherein fs is a sampling frequency of the receiving end performing the sampling, and K is an integer greater than 1; and the converting of the sample sequence comprises: sampling the echo signal at the sampling frequency fs, and then performing K-fold downsampling processing to obtain a sample sequence with an equivalent sampling rate fs / K and a sampling interval K / fs.
[0010] As a possible implementation manner of the first aspect, the method further comprises: performing the peak detection process for K sampling phases corresponding to the K-fold downsampling, respectively, to obtain K main peak values; and selecting an optimal main peak value from the K main peak values as a peak value for determining the fault type and / or the fault position of the cable.
[0011] As a possible implementation manner of the first aspect, the selecting the optimal main peak from the K main peaks comprises one of the following manners or any combination of the following manners: calculating the amplitude of the main peak in each phase, and selecting the phase with the largest amplitude as the optimal phase, wherein the main peak in the optimal phase is the optimal main peak; counting the number of peaks satisfying a threshold condition in each phase, and selecting the phase with the least number of peaks or only one significant peak as the optimal phase, wherein the significant peak in the optimal phase is the optimal main peak.
[0012] As a possible implementation manner of the first aspect, the method further comprises performing near-end echo bias correction on the channel impulse response.
[0013] As a possible implementation manner of the first aspect, the method further comprises performing line loss compensation on the channel impulse response, comprising: applying a corresponding gain to each tap coefficient of the channel impulse response according to the signal propagation delay corresponding thereto, to compensate for the attenuation of the signal amplitude caused by the increase of the propagation distance due to the cable loss.
[0014] As a possible implementation manner of the first aspect, the determining the fault type of the cable according to the sign and amplitude of the detected peak comprises: representing p as the peak, Tshort as a short-circuit threshold, Topen1 as a first open-circuit threshold, and Topen2 as a second open-circuit threshold; if p < 0 and |p| > Tshort, determining that the fault type of the cable is a short circuit; if p > 0 and p > Topen2, determining that the fault type of the cable is a double-wire open circuit; if p > 0 and Topen1 < p ≤ Topen2, determining that the fault type of the cable is a single-wire open circuit; and otherwise, determining that the cable is not faulty.
[0015] As a possible implementation manner of the first aspect, the calculating the fault position on the cable according to the position of the peak in the channel impulse response is calculated according to the following parameters: the nominal propagation speed of the signal in the cable, the position of the peak in the channel impulse response, the down-sampling multiple, the sampling frequency, the current down-sampling phase, the configurable speed scale factor, and the fixed distance offset compensation.
[0016] For example, the fault position on the cable can be calculated by the following formula: wherein, d fault represents the fault location, v is the nominal propagation speed of the signal in the cable, imax is the peak index, corresponding to the position of the peak in the channel impulse response, K is the down-sampling multiple, fs is the sampling frequency, K / fs represents the sampling interval, phase_id is the current down-sampling phase, phase_id / fs represents the phase-based fractional delay, line_speed_adj is a configurable speed scaling factor, and fault_loc_correction is a fixed distance offset compensation.
[0017] The second aspect of the present application provides an industrial fieldbus chip, comprising: a transmitting end, a digital-to-analog conversion module, a receiving end, an analog-to-digital conversion module, and an analog front end. The transmitting end is configured to generate a pseudo-random sequence. The digital-to-analog conversion module is configured to convert the pseudo-random sequence into a single-ended analog signal. The analog front end is configured to convert the single-ended analog signal into a differential signal injected into a cable to be tested, and to collect a differential echo signal on the cable and convert it into a single-ended analog signal. The analog-to-digital conversion module is configured to sample the single-ended analog signal converted by the analog front end and convert it into a sampled sequence. The receiving end is configured to obtain a pseudo-random sequence as a reference sequence, estimate a channel impulse response based on the sampled sequence and the reference sequence by using an iterative correlation estimation method, detect a peak value satisfying a preset condition from the channel impulse response, determine a fault type of the cable according to a sign and amplitude of the detected peak value, and / or calculate a fault location on the cable according to a position of the peak value in the channel impulse response; wherein the channel impulse response comprises a discrete coefficient vector.
[0018] As a possible implementation manner of the second aspect, the receiving end comprises: a buffer module, a down-sampling module, an echo estimation module, and a fault analysis module. The buffer module is configured to buffer the reference sequence. The down-sampling module is configured to down-sample the sampled sequence. The echo estimation module is configured to perform echo estimation based on the reference sequence and the down-sampled sequence to obtain a peak value satisfying a preset condition. The fault analysis module is configured to determine the fault type and / or the fault location of the cable according to the peak value.
[0019] As a possible implementation manner of the second aspect, the echo estimation module comprises: a FIR filter, an error estimation module, and an iterative algorithm module. The FIR filter is configured to generate an echo prediction signal according to the reference sequence and a current filter parameter; The error estimation module is configured to compare the down-sampled sequence with the predicted echo signal, and output a deviation signal between the two; The iterative algorithm module is configured to adjust the filter parameter according to the deviation signal, and the adjusted filter parameter is used to provide to the FIR filter; The FIR filter, the error estimation module, and the iterative algorithm module constitute a closed-loop iterative mechanism, and the filter parameter after the iteration is used for fault analysis.
[0020] The third aspect of the present application provides a computing device, comprising a processor and a memory having program instructions stored thereon, the program instructions, when executed by the processor, causing the processor to execute the method of any one of the first aspect.
[0021] The fourth aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, the program instructions, when executed by a computer, causing the computer to implement the method of any one of the first aspect.
[0022] In summary, the present application can be applied to fault detection of industrial fieldbus in long-distance and high-interference application scenarios. The present application has strong anti-interference ability, is robust to signal distortion, and can be integrated in a chip, thereby overcoming the limitations of the existing TDR method. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 is a flowchart of the cable diagnosis method for industrial fieldbus provided by the first embodiment of the present application; Figure 2A is a schematic diagram of the principle of the AUTBUS chip provided by the embodiment of the present application; Figure 2B is a schematic diagram of the principle of TDR_RX provided by the embodiment of the present application; Figure 2C is a schematic diagram of the principle of echo estimation provided by the embodiment of the present application; Figure 2D is a schematic diagram of the principle of fault analysis provided by the embodiment of the present application; Figure 3A is a flowchart of the cable diagnosis method for industrial fieldbus provided by the second embodiment of the present application; Figure 3B is a flowchart of the generation and transmission of block PRS signals provided by the embodiment of the present application; Figure 4 is a fault classification reference diagram provided by the embodiment of the present application; Figure 5is a schematic diagram of a cable diagnosis device for an industrial field bus provided by an embodiment of the present application. Figure 6 is a schematic diagram of a computing device provided by an embodiment of the present application.
[0024] It should be understood that in the above structural schematic diagram, the size and shape of each block diagram are only for reference and should not constitute an exclusive interpretation of the embodiments of the present application. The relative position and inclusion relationship between the block diagrams presented by the structural schematic diagram are only used to represent the structural association between the block diagrams and do not limit the physical connection mode of the embodiments of the present application. DETAILED DESCRIPTION
[0025] The technical solutions provided by the present application will be further described below in conjunction with the drawings and embodiments. It should be understood that the system structure and business scenarios provided in the embodiments of the present application are mainly used to illustrate possible implementation modes of the technical solutions of the present application and should not be interpreted as the only limitation of the technical solutions of the present application. Those skilled in the art can know that the technical solutions provided by the present application are also applicable to similar technical problems as the system structure evolves and new business scenarios appear.
[0026] It should be understood that the cable diagnosis scheme for the industrial field bus provided by the embodiments of the present application includes a cable diagnosis method and diagnosis device for the industrial field bus, an industrial field bus chip and a computing device, a storage medium and software, etc. Since the principles of solving problems of these technical solutions are the same or similar, in the following specific embodiments, some repeated parts may not be described again, but should be regarded as mutual reference between these specific embodiments, which can be combined with each other.
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. If there is any inconsistency, the meaning explained in the specification or the meaning derived from the content described in the specification shall prevail. In addition, the terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application. In order to accurately describe the technical content in the present application and to accurately understand the present application, before the specific embodiments are described, the following explanations or definitions of the terms used in the specification are given: 1) AUTBUS bus: an industrial real-time bus, which uses a pair of differential signal lines (such as twisted pair) for communication, and the same pair of differential signal lines is used for transmission and reception.
[0028] 2) Differential signal: refers to a pair of signals transmitted through two signal lines, wherein the amplitudes of the pair of signals transmitted through the two signal lines are the same and the phases are opposite. The two signal lines are called differential signal lines.
[0029] 3) AUTBUS chip: such as Figure 2A As shown, it includes at least a transmitter (TDR_TX), a digital-to-analog converter (DAC), a receiver (TDR_RX), an analog-to-digital converter (ADC), and an analog front-end (AFE). When sending digital signals (i.e., data) to the AUTBUS bus, the transmitter's digital signal (i.e., data) is converted into a single-ended analog signal by the DAC, and then converted into a differential signal by the AFE to drive the signal onto the bus. When acquiring data from the AUTBUS bus, the AFE captures the differential signal from the bus and converts it into a single-ended analog signal, which is then sampled by the ADC into a digital signal (i.e., data) and provided to the receiver.
[0030] 4) Reflected signal and echo signal: Reflected signal: This refers to the portion of the transmitted signal that is reflected back when it encounters a point of impedance discontinuity (such as an open circuit or short circuit) during transmission in a cable. Essentially, it is a reverse propagation wave generated by electromagnetic waves at the boundary of a medium due to a sudden change in impedance.
[0031] Echo signal: refers to the signal observed at the receiving end that returns to the measurement point from the reflected signal. The observed reflected signal has been superimposed with the attenuation and distortion of the round-trip propagation path. Attenuation and distortion include, for example, near-end leakage (the local transmitted signal is directly coupled to the receiving path, not cable reflection), propagation loss, noise and interference, near-end echo bias, etc.
[0032] 5) Correlation and Correlation Estimates: Cross-correlation: A concept in signal processing used to measure the similarity between two signals (such as transmitted and echo signals) at different time offsets. In systems based on reflected waves, such as cable diagnostics, cross-correlation can be used to extract weak echoes and suppress noise.
[0033] Correlation estimate: By calculating the degree of similarity between two signals (such as transmitted signals and echo signals), we can infer a certain causal or delay relationship between them. The value of the quantified strength of this relationship is called the correlation estimate.
[0034] 6) The relevant estimates can be calculated using an iterative update algorithm, which will be introduced below.
[0035] First, let's introduce the Channel Impulse Response (CIR). CIR is the physical response of the channel to a unit impulse signal, expressed as the discrete-time impulse response of the real channel. (For example, CIR can directly reflect the physical characteristics of cables, providing a basis for fault detection.
[0036] Assume the reference signal received by the receiver (the reference signal can be relayed back to the receiver from the transmitter, the reference signal is the same as the signal transmitted to the cable, and the reference signal is a pseudo-random sequence) is: The sampled signal obtained by the ADC at the receiving end is: The k mentioned above is the timing index. (Based on the reference signal) and sampling signal The correlation estimate can be used to calculate the CIR in the time domain (i.e., the correlation estimate after convergence, as discussed later). This provides a foundation for fault detection.
[0037] To cover all possible echo delay scenarios, the receiver needs to calculate N correlation estimates in parallel when performing correlation estimation. These N correlation estimates are referred to as the correlation estimation vector. , Each relevant estimate corresponds to a fixed delay. There are N delays in total, and they satisfy... And it must satisfy the following two constraints: Full coverage of latency range: minimum latency The delay should not exceed the time it takes for the reflected signal from this end to reach the receiver (TDR_RX) to ensure that no near-end echo is missed; maximum delay The delay of the reflected signal arriving at the receiver (TDR_RX) at the maximum communication distance is not less than the delay to ensure that no far-end echoes are missed. Delay interval (or delay period) rule: the difference between any two adjacent delays It is an integer multiple of the receiving end clock cycle (corresponding to the ADC sampling frequency) to ensure sampling timing consistency.
[0038] The receiving end utilizes continuously updated sampling signals over a relatively long period of time. and the corresponding reference signal The correlation estimate of the two signals is calculated and updated iteratively. The core logic of iteratively updating and calculating the correlation estimate is as follows: a. Iterative formula, general form: , in, This is the correlation estimation vector after the (k+1)th iteration (the initial value can be set to 0); This represents an iterative update algorithm; It is the sampled signal at time k; This represents the sliding window (of length N, corresponding to N correlation estimates) of the reference signal at time k. It should be noted that, since the iteration process and the sampling process are synchronized in real time, each new sampling time signal triggers an iterative update of the correlation estimate vector; therefore, both the sampling time and the number of iterations are represented by the same parameter k.
[0039] b. Iterative update algorithm Examples include the Least Mean Squares (LMS) method, the Alpha filter method (i.e., first-order low-pass smoothing), the Recursive Least Squares (RLS) method, and the Sliding Cross-Correlation method. Two examples are given below: LMS algorithm : ,in ,in: The correlation estimation vector is obtained in the k-th iteration. The i-th estimate in , It is the error calculated in the k-th iteration. It is the reference signal corresponding to the i-th estimated value in the sliding window of the reference signal. It is the kth sampled signal. This is the step size parameter (used to control the convergence speed).
[0040] Alpha filter method : ,in: This is the smoothing coefficient (used to balance stability and response speed); the other parameters have the same meaning as the LMS algorithm.
[0041] c. Convergence results and anti-interference principle: With reasonable parameter settings (such as...) Given appropriate values and sufficient iteration time, the relevant estimated vector The value will gradually stabilize (i.e., converge), and the converged vector is denoted as . , This is the optimal estimate of CIR, and its physical meaning can be expressed as: ,in This indicates a statistical average operation over time series k. Where CIR (i.e., ...) It can reflect the reflection characteristics along the cable and is used for cable fault identification and location.
[0042] Due to external interference and noise on the cable, and the pseudo-random sequence at the transmitting end. Unrelated, in the long-term iterative statistical averaging process, the effects of these irrelevant disturbances will be canceled out, and eventually... It can accurately reflect the true characteristics of cable echo, therefore, It not only reflects echo information, but also effectively reduces the impact of external interference and noise.
[0043] 7) Improvements in correlation estimation: blocky signals and phase ergodicy: As mentioned above, through reference signals and sampling signal The relevant estimates can yield the CIR (i.e., This can provide a foundation for fault detection, but it also faces the following two potential problems: a. what was obtained It can be regarded as a discrete value generated by sampling a continuous time-domain impulse response. It is relatively sensitive to the sampling phase. However, since cable detection does not rely on clock and data recovery (CDR) technology (CDR technology is used to recover the accurate sampling clock from the received data stream to ensure reliable reception during normal data communication, while the receiver uses the clock frequency of the ADC to sample the received signal in cable diagnostic mode, without relying on CDR), the sampling phase is arbitrary. Therefore, the peak value of the discrete time-domain impulse response is uncertain, which has a certain probability of causing the fault to be missed.
[0044] b. The correlation estimation algorithm requires parallel estimation of the correlation between transmitted and received signals at N delays. To cover the possible range of echo delays, the value of N must be proportional to the upper limit of the cable length. Therefore, the resources required for algorithm computation (such as processors, memory, etc.) are also proportional to the cable length. Supporting long-distance communication is one of the characteristics of the AUTBUS bus, so when the bus cable is long, the resources required for algorithm computation are also greater. For example, taking a typical AUTBUS scenario: communication distance (i.e., bus cable length) L = 500m, ADC sampling rate fs = 100MHz, assuming signal propagation speed... Then the upper limit of the echo delay is ; with ADC sampling interval As a delayed resolution, This means that 500 relevant estimates need to be calculated in parallel iterations, which requires a lot of resources.
[0045] To address the two potential problems mentioned above, this application employs a solution combining block signals and phase ergonomics, as detailed below: 7.1) Block signal strategy: The basic principle is as follows: the update rate of the pseudo-random sequence (PRS) transmitted by TDR_TX is set to 1 / K of the ADC sampling frequency fs. That is, the PRS symbol rate (the symbol rate corresponds to the duration of each bit in the PRS) is reduced from the original fs to fs / K. In other words, the transmission duration of each symbol (i.e. each bit of the PRS) is 1 / (fs / K). Within this duration of 1 / (fs / K), the ADC will sample K times. That is, the same PRS symbol value remains unchanged at K consecutive ADC sampling points. These K sampling points constitute a "signal block".
[0046] For the receiver, since the transmitted signal remains unchanged within each block, TDR_RX can downsample the ADC output by a factor of K (keeping only one sample from each block), thereby reducing the data rate of subsequent related calculations to fs / K, which reduces the resource requirements and complexity of the calculation.
[0047] By employing a block signal strategy, the time interval between adjacent delay taps after downsampling is increased to K times the original value. Therefore, to cover the same maximum detection distance (e.g., 500m), the number N of parallel correlation estimates required can be reduced to 1 / K of the original value. Furthermore, since the correlation calculations are performed on the low-speed (after downsampling) data stream, the timing convergence difficulty of the receiver circuitry is significantly reduced, hardware resource consumption and design complexity are decreased, and chip integration is also beneficial. For example, when fs = 100MHz and cable length L = 500m, if K = 16 is used, N = 32 correlation estimates can be calculated using N = |(2L / v) / (K / fs)|, significantly reducing hardware resource consumption and design complexity compared to the original 500 correlation estimates.
[0048] On the other hand, block signals, due to their lower frequency, have the advantage of lower propagation loss. Block signals are equivalent to reducing the spectral bandwidth of the excitation signal (the main energy is concentrated near fs / K). For example, when AUTBUS samples CAT-5 twisted-pair cable, according to the transmission characteristics of CAT-5 twisted-pair cable, on a 500m round trip path: the power loss of a 100MHz square wave sequence is about 28dB; while the loss of a 6.25MHz square wave sequence (i.e., fs / K=100 / 16MHz) is only about 16dB. Lower loss means a stronger echo signal, which helps improve the detectability of remote faults.
[0049] 7.2) Phase traversal mechanism: The implementation method is as follows: During the downsampling process, there are K possible sampling phases (i.e., the 0th, 1st, ..., 1st phase can be selected in each block). (Each sampling point is used as the downsampled output). TDR_RX repeats the correlation estimation process K times, each time using a different downsampled phase. Then, from the K sets of correlation estimation results, the one with the most significant echo peak (e.g., the largest amplitude or the highest signal-to-noise ratio) is selected as the basis for cable fault diagnosis.
[0050] This mechanism can eliminate the risk of missed fault detection caused by random sampling phase, effectively restore the temporal resolution that may be lost due to downsampling, and ensure that the fault location accuracy is not reduced due to downsampling.
[0051] The cable diagnostic scheme for industrial fieldbuses provided in this application involves the transmitter generating a pseudo-random sequence as a transmission signal and sending it to the bus cable. Over a relatively long period, the receiver captures the signal received from the bus cable and calculates its correlation with the transmitted signal to estimate the CIR (Constant Intensity Reduction). Since external interference and noise are uncorrelated with the transmitted signal, their effects can be eliminated through time averaging. Compared to traditional TDR (Transmitter-Received Response) methods that transmit a step signal only once and record the echo waveform, this method is less sensitive to external interference / noise and is more suitable for complex electromagnetic measurement environments. Furthermore, based on high-quality time-domain impulse response estimation, precise peak detection and filtering can improve the accuracy of fault detection and location. This cable diagnostic scheme for industrial fieldbuses can be applied to fault diagnosis of cables such as AUTBUS, CAN, and RS-485 buses.
[0052] The present application will now be described in detail with reference to the accompanying drawings.
[0053] The first embodiment of this application provides a cable diagnostic method for industrial fieldbus, such as... Figure 1 As shown, it includes the following steps: S1: A pseudo-random sequence is generated at the transmitting end, converted into an analog signal, and injected into the cable under test; the pseudo-random sequence is also provided to the receiving end as a reference sequence.
[0054] In some embodiments, a pseudo-random symbol sequence (PRS) is generated by the transmitter (TDR_TX) as a test signal. The PRS is sent to a DAC to be converted into an analog signal, and then converted into a differential signal by an analog front-end (AFE) and injected into the bus cable under test (TBD), i.e., sent to the bus cable. Simultaneously, the generated raw PRS serves as a reference signal (PRS_ref) and is fed into the asynchronous FIFO of TDR_RX through another path, i.e., looped back to the receiver (TDR_RX) within the chip.
[0055] In some embodiments, the PRS can be generated using a linear feedback shift register (LFSR).
[0056] In some embodiments, the PRS can be a pseudo-random binary sequence (PRBS).
[0057] In some embodiments, the period of the PRS (which corresponds to the length of the PRS) is P. P should be greater than the upper limit of the time required for the test signal to travel one round trip in the cable under test; otherwise, the correlation between the transmitted and received signals may be affected by the autocorrelation of the PRS, leading to misjudgment. Specifically, if the pseudo-random sequence is relatively short, the autocorrelation function of the pseudo-random sequence may exhibit obvious periodic peaks, making it impossible to distinguish whether a peak originates from reflection from the cable or from the periodic autocorrelation characteristics of the sequence itself, thus leading to misjudgment. The above can be described by the formula: assuming the cable length is L, then P > 2L / v, where v is the propagation speed of the test signal in the cable.
[0058] In some embodiments, the period P of the PRS is determined by the order n of the primitive polynomial used to generate it in the LFSR, wherein the period When selecting the order n of the primitive polynomial, the requirements of P mentioned above should be satisfied.
[0059] In some embodiments, the pseudo-random sequence must be emitted for a sufficiently long time, and this time threshold should be sufficient to meet the requirement of convergence after a certain number of iterations during the execution of the iterative correlation estimation method in subsequent step S3.
[0060] S2: The receiving end collects the echo signal on the cable and converts the sample into a sampling sequence.
[0061] In some embodiments, the differential echo signal on the bus cable is first captured by the analog front-end (AFE), and then converted into a single-ended signal and provided to the ADC. The ADC samples the signal at its sampling frequency (e.g., clock frequency fs), such as 100MHz, to obtain a high sampling rate sequence tdr_rx_data, which is then transmitted to TDR_RX. The differential echo signal at this point may contain superimposed signals including near-end leakage, far-end reflection, and noise.
[0062] S3: Perform a peak detection process, including: estimating the channel impulse response (CIR) based on the sampled sequence and the reference sequence using an iterative correlation estimation method, wherein the channel impulse response includes a discrete coefficient vector; and detecting peak values that satisfy preset conditions from the channel impulse response.
[0063] In some embodiments, the iterative correlation estimation method estimates the CIR, which can employ a correlation iterative algorithm. Examples of iterative algorithms include the Least Mean Squares (LMS) method, the Alpha filter method (i.e., the first-order low-pass smoothing method), the Recursive Least Squares (RLS) method, and the Sliding Cross-Correlation method.
[0064] S4: Determine the fault type of the cable based on the sign and amplitude of the detected peak, and / or calculate the fault location on the cable based on the position of the peak in the channel impulse response.
[0065] As described above, this application estimates the channel impulse response by performing correlation estimation between the sampling sequence and the pseudo-random sequence corresponding to the echo signal, for use in cable diagnostics. Since external interference and noise are uncorrelated with the transmitted signal, their influence can be eliminated through correlation estimation. Compared to traditional TDR methods that transmit a step signal only once and record the echo waveform, this method is less sensitive to external interference and noise, and is more suitable for complex electromagnetic measurement environments.
[0066] In some embodiments, generating the pseudo-random sequence in step S1 includes: generating a block-shaped pseudo-random sequence at a symbol rate of fs / K, where fs is the sampling frequency at which the receiver performs the sampling, and K is an integer greater than 1. Correspondingly, converting the sampling into a sampling sequence includes: sampling the echo signal at a sampling frequency of fs, and then performing a K-fold downsampling process to obtain a sampling sequence with an equivalent sampling rate of fs / K and a sampling interval of K / fs.
[0067] As described above, reducing the data rate to fs / K lowers the resource requirements and complexity of the receiver's computation. Since the relevant calculations are performed on the low-speed (after downsampling) data stream, it also significantly reduces the timing convergence difficulty of the receiver circuit, lowers hardware resource consumption and design complexity, and facilitates chip integration. Furthermore, block signals, due to their lower frequency, have the advantage of lower propagation loss. Lower loss means a stronger echo signal, which helps improve the detectability of remote faults.
[0068] In some embodiments, the method further includes: performing the peak detection process described in step S3 on each of the K sampling phases corresponding to the K times downsampling to obtain K main peak values; and selecting the optimal main peak value from the K main peak values as the peak value used to determine the fault type and / or fault location of the cable.
[0069] Therefore, the optimal phase is selected from the K results, that is, the phase that provides the clearest, strongest, and most representative impulse response, thereby improving detection accuracy. Furthermore, it eliminates the sensitivity of channel estimation to the sampling phase, preventing the fault location accuracy from decreasing due to a drop in the sampling rate.
[0070] In some embodiments, selecting the optimal dominant peak from the K dominant peaks includes one or any combination of the following methods: 1) Calculate the amplitude of the dominant peak in each phase, and select the phase with the largest amplitude as the optimal phase, wherein the dominant peak in the optimal phase is the optimal dominant peak; 2) Count the number of peaks that meet the threshold condition in each phase, and select the phase with the fewest peaks or only one significant peak as the optimal phase. The significant peak in the optimal phase is the optimal main peak.
[0071] When selecting using any combination of methods, different selection weights can be set for different methods.
[0072] In some embodiments, step S3 is followed by: performing near-end echo offset correction on the channel impulse response.
[0073] Typically, physical layer transceivers do not have complete isolation between transmitted and received signals. The signal observed at the receiving end includes the actual echo on the line and the near-end echo. After the above correction, the channel impulse response can more accurately characterize the reflection characteristics caused only by the cable, providing a reliable basis for subsequent fault location and classification.
[0074] In some embodiments, step S3 may further include: performing line loss compensation on the channel impulse response, which may specifically include: applying a corresponding gain to each tap coefficient of the channel impulse response according to its corresponding signal propagation delay, so as to compensate for the attenuation of signal amplitude caused by cable loss as the propagation distance increases.
[0075] Because signal amplitude attenuation occurs during signal propagation in cables, the echo amplitude decreases exponentially with increasing fault distance, which can cause reflection peaks from distant faults to be misjudged as fault-free. The compensation described above can offset the accumulated propagation loss, making the fault echo amplitude at different distances more consistent, facilitating subsequent unified threshold judgment.
[0076] In some embodiments, the step S4 of determining the cable fault type based on the sign and amplitude of the detected peak value can be as follows: Figure 4 As shown, it includes the following: Let p = fir_coef_comp[ipeak], which represents the peak value, Tshort be the short - circuit threshold, Topen1 be the first open - circuit threshold, and Topen2 be the second open - circuit threshold; If p < 0 and |p| > Tshort, then determine that the cable fault type is a short circuit; If p > 0 and p > Topen2, then determine that the cable fault type is a double - line open circuit; If p > 0 and Topen1 < p ≤ Topen2, then determine that the cable fault type is a single - line open circuit; In other cases, determine that the cable has no fault.
[0077] From the above, it is possible to determine the cable fault type based on the peak value compliance and amplitude.
[0078] In some embodiments, for the step of calculating the fault position on the cable according to the position of the peak value in the channel impulse response in step S4, it can be calculated according to the following parameters: the nominal propagation speed of the signal in the cable, the position of the peak value in the channel impulse response, the down - sampling multiple, the sampling frequency, the current down - sampling phase, the configurable speed scale factor, and the fixed - distance offset compensation.
[0079] In some embodiments, the fault position on the cable can be calculated using the following formula: , where d_fault represents the fault position, v is the nominal propagation speed of the signal in the cable, imax is the peak index corresponding to the position of the peak value in the channel impulse response, K is the down - sampling multiple, fs is the sampling frequency, K / fs represents the sampling interval, phase_id is the current down - sampling phase, phase_id / fs represents the phase - based fractional delay, line_speed_adj is the configurable speed scale factor, and fault_loc_correction is the fixed - distance offset compensation.
[0080] From the above, the calculation of the cable fault position can be achieved. And during the calculation process, line_speed_adj is used to calibrate the actual propagation speed deviation, and fault_loc_correction is used to compensate for the fixed - distance offset, improving the accuracy of the fault position calculation. In some embodiments, line_speed_adj and fault_loc_correction in the formula are optional.
[0081] The following describes the cable diagnostic method for industrial fieldbus provided in the second embodiment of this application, taking the application of the solution of this application to AUTBUS bus cable diagnostics as an example. In addition, the optional embodiments provided in the second embodiment below can also be applied to the first embodiment or the subsequent third embodiment, which will not be described again.
[0082] In the second embodiment, the bus cable diagnostic method can be implemented by an AUTBUS chip, wherein, as... Figure 2A As shown, the AUTBUS chip includes a transmitter (TDR_TX) and a receiver (TDR_RX), multiplexing the physical layer's digital-to-analog converter (DAC) and analog-to-digital converter (ADC) modules, as well as the analog front-end (AFE). The ADC and DAC sampling periods both use the system-provided clock period to maintain consistency.
[0083] In this example, as Figure 2B As shown, TDR_TX can be used to receive the PRS as a reference sequence via FIFO, and to downsample the sampling sequence of the ADC (corresponding to step S20 described later), and to perform echo estimation (corresponding to step S30 described later) and fault analysis (corresponding to steps S40-S90 described later) based on the PRS and the downsampled sequence.
[0084] In this example, as Figure 2C As shown, the LMS algorithm was used iteratively to estimate the CIR for echo estimation. See the description of step S30 below for details.
[0085] In this example, as Figure 2D As shown, the corresponding fault analysis includes near-end echo offset correction, line loss compensation, peak detection, sorting to select the main peak, determining the fault type, and calculating the fault location. For details, please refer to the description of steps S40-S90 below.
[0086] The bus cable diagnostic method provided in this second embodiment, such as Figure 3A As shown, the process includes the following steps S10-S90: S10: In the transmission direction, a pseudo-random symbol sequence (PRS) is generated by TDR_TX as a test signal. One path of the PRS is sent to the DAC to be converted into an analog signal, and then converted into a differential signal by the analog front-end before being injected into the bus cable under test, i.e., sent to the bus cable. Simultaneously, the generated raw PRS, as a reference signal (PRS_ref), is sent to the asynchronous FIFO of TDR_RX through another path, i.e., looped back to the TDR_RX side within the chip.
[0087] In some embodiments, the pseudo-random sequence must be emitted for a sufficiently long time, and the threshold (lower limit) of this time should be sufficient for the iterative correlation estimation method (e.g., LMS algorithm, etc.) in the subsequent step S30 to converge after several iterations.
[0088] In some embodiments, TDR_TX can also generate a block-shaped PRS as both the test signal and the reference signal (PRS_ref). Specifically, the PRS block size parameter K can be set, i.e., the duration of each PRS symbol is set to K ADC sampling periods, where K ≥ 2, and typical values for K are 4, 8, 16, and 32. Based on this, as... Figure 3B As shown, the process of generating and transmitting block PRS signals includes the following steps S11-S13: S11: For the generated original PRS (assuming it is generated at a clock frequency of fs=100MHz), according to the preset K value, keep the symbol of each PRS unchanged for K periods to form a block PRS sequence.
[0089] For example, when K=16, the same bit is output every 16 ADC sampling cycles. In this case, the output rate (i.e., the sampling rate) is equivalent to fs / K=100MHz / 16=6.25MHz. That is, reducing the original PRS symbol rate to 6.25MHz, the duration of each PRS symbol (i.e., each block) (i.e., the sampling period, or sampling interval) is 1 / 6.25MHz=160ns.
[0090] S12: The block-shaped PRS sequence is fed into the DAC. Since each PRS symbol (i.e., each block) lasts for 160 ns, the DAC updates its output voltage only once every 160 ns. This can also be understood as the DAC sending PRS at a rate of fs / K. The output of the DAC is a single-ended analog voltage waveform signal.
[0091] S13: The single-ended analog voltage waveform signal output by the DAC is converted into a differential signal by the analog front end (AFE) and injected into the bus cable.
[0092] It should be noted that when the block-shaped PRS signal is transmitted as described above, the subsequent TDR_RX needs to perform downsampling processing for K DAC sampling cycles after receiving the echo signal. This will be described in detail in step S20 below.
[0093] S20: In the receiving direction, the analog front end (AFE) captures the differential echo signal on the bus cable and converts it into a single-ended signal for the ADC. The ADC samples the signal at its sampling frequency (e.g., clock frequency fs), such as 100MHz, to obtain a high sampling rate sequence tdr_rx_data, which is then transmitted to TDR_RX. The differential echo signal at this point may contain superimposed signals including near-end leakage, far-end reflections, and noise.
[0094] In addition, corresponding to the block signal described in steps S11-S13 above, this will further include a downsampling process, which may include the following: performing a K-fold downsampling (i.e., reducing the sampling rate to fs / K) on the high sampling rate sequence tdr_rx_data to obtain the downsampled sequence tdr_rx_data_ds.
[0095] For example, when K is 16 and fs is 100MHz, the sampling rate drops to fs / K = 6.25MHz, which means each sampling period (i.e., sampling interval) Tds = 1 / 6.25MHz = 160ns.
[0096] As can be seen above, after downsampling, each sampling period corresponds to K fs. In this application, these K fs are called the K phases of downsampling. Theoretically, if the echo signal has no interference, the signals corresponding to these K phases are the same, and any signal value corresponding to the K phases can be selected as the sampling value of that period. Therefore, the analysis process described in subsequent steps S30-S90 can be executed once.
[0097] In reality, due to interference, the signals corresponding to these K phases may be different. Therefore, the analysis process described in subsequent steps S30-S90 (including echo estimation and fault analysis) can iterate through the K phases, that is, perform steps S30-S90 for each phase to obtain K fault diagnosis results (including fault type and fault location), and then select the optimal phase. This eliminates the sensitivity of channel estimation to the sampling phase and avoids the decrease in fault location accuracy due to the decrease in sampling rate. Alternatively, subsequent steps S30-S70 can be performed for each phase to obtain K main peaks. The optimal main peak is then selected, and subsequent steps S80-S90 are performed based on this selected optimal main peak to determine the fault type and calculate the fault location.
[0098] The selection of the optimal phase from the K results aims to use the phase that provides the clearest, strongest, and most representative impulse response. The optimal phase can be evaluated using one of the following methods or a combination of several: 1) Peak amplitude assessment: In an ideal situation, a real fault point will produce a significant peak. The larger the amplitude of this peak, the more obvious the detected fault is. Therefore, the main peak amplitude of each phase can be calculated, and the phase with the largest amplitude can be selected as the optimal phase.
[0099] 2) Peak Count Assessment: Excessive non-physical peaks (such as spurious peaks caused by noise) can interfere with fault diagnosis. Therefore, the number of spurious peaks should be minimized. Thus, the number of peaks satisfying the threshold condition for each phase can be counted, and the phase with the fewest peaks or only one significant peak can be selected as the optimal phase.
[0100] The analysis process of S30-S90 is described below, which is applicable to the analysis of signals of any phase of K phases.
[0101] S30: Based on the downsampled sequence and the corresponding pseudo-random sequence block, the optimal estimate of the CIR of length N is calculated using an iterative correlation estimation method. The principle of this iterative calculation is as follows: First, the downsampled signal tdr_rx_data_ds (which can be denoted as y[n]) is input into an FIR filter (Finite Impulse Response Filter) of length N, and simultaneously a sliding window of the corresponding reference sequence PRS_ref is input. As a correlation coefficient, it is used to calculate cross-correlation or drive adaptive algorithm updates. Here, N ≈ maximum delay / downsampling interval. For example, when L = 500m, the maximum round-trip delay τ_max = 2L / v = 5μs, and the downsampling time interval is 160ns. The N value set in this way ensures that the time delay window covered by the FIR structure is sufficient to capture all echo responses generated at any location in the cable.
[0102] Set the output of the FIR filter to the echo prediction value echo_predict; set the calculation error to: err=tdr_rx_data_ds-echo_predict; where tdr_rx_data_ds is the result of downsampling the received signal in step S20.
[0103] Here, we take the LMS algorithm as an example: using the error err as the driving signal, the LMS algorithm is used to adaptively iteratively update the coefficient vector (fir_coef) of the FIR filter. This process is continuously iterated, typically covering multiple PRS cycles, to adequately average the noise and approximate the true channel characteristics. When the coefficient vector fir_coef converges, its steady-state value is the best estimate of the cable CIR.
[0104] The LMS algorithm can be represented as follows: for: ,in, .
[0105] in, Let fir_coef be the CIR estimate for the k-th iteration, where fir_coef is the FIR coefficient vector. Let be the PRS input vector for the ki-th iteration, and μ be the step size (used to control the convergence speed and stability). This represents the error err calculated in real time. It is the actual received signal (tdr_rx_data_ds).
[0106] During the iterative calculation, the coefficient vector (fir_coef) of the FIR filter can be initialized to an all-zero vector or a set of preset values. The LMS algorithm aims to minimize the instantaneous error err[n], or minimize its mean square value (i.e., ... With the objective function fir_coef, the coefficient vector is updated using gradient descent until it converges to a steady state. This steady-state solution is the best estimate of the CIR.
[0107] S40: For the best estimate of CIR, i.e. the coefficient vector (fir_coef) obtained after iterative convergence, perform near-end echo offset correction to obtain the corrected CIR (i.e., fir_coef_corr, which will be described later).
[0108] In AUTBUS time-division half-duplex communication systems, physical layer transceivers typically lack complete isolation between transmitted and received signals (e.g., without integrated hybrid coil circuitry). Therefore, during echo-based diagnostics, the signal observed at the receiver includes both the actual on-line echo and the near-end echo. Since the electrical characteristics of this near-end coupling path are fixed, it manifests in the time domain as a fixed-delay, stable-amplitude interference component, as shown in the estimated FIR coefficient vector fir_coef= In this context, it is manifested as a specific tap (usually...). A constant bias is applied to the first few taps (or the first few taps). This constant bias value can be predetermined through factory calibration, no-load testing, or circuit modeling. To avoid this bias interfering with subsequent fault analysis, the bias value needs to be subtracted from the corresponding tap's FIR coefficient vector fir_coef, while the remaining taps remain unchanged. This correction is expressed by the following formula: fir_coef_corr[i]= .
[0109] Where fir_coef_corr[i] is the corrected CIR. This is the tap index corresponding to the near-end echo, typically located at the point of minimum delay (physical delay close to zero). In this embodiment, it is taken as... After this correction, fir_coef_corr more accurately characterizes the reflection characteristics caused solely by the cable, providing a reliable basis for subsequent fault location and classification.
[0110] S50: Perform line loss compensation on the corrected CIR, i.e., fir_coef_corr.
[0111] Because signals experience frequency-dependent attenuation during propagation in cables, the echo amplitude decreases exponentially with increasing fault distance. This can cause reflection peaks from distant faults to be misinterpreted as fault-free conditions. To eliminate this distance dependence, amplitude compensation of the CIR is necessary. The specific compensation method is as follows: Each tap i corresponds to a delay. Where Tds=K / fs is the time interval after downsampling; a gain is applied to the coefficient fir_coef_corr[i] corresponding to each tap i. To offset the cumulative propagation loss, this compensation can be expressed by the following formula: ,in >1 is the attenuation compensation factor, and α reflects the loss characteristics per unit delay of the cable, which can be configured through calibration.
[0112] After this line loss compensation process, the amplitude of fault echoes at different distances tends to be consistent, which facilitates subsequent unified threshold judgment.
[0113] S60: Perform peak detection from the CIR after line loss compensation, i.e., fir_coef_comp[i], that is, filter out candidate fault peaks and add them to the candidate peak list peaks. Peak detection requires the following two conditions to be met simultaneously: Amplitude threshold condition: |fir_coef_comp[i]|>Tth, where Tth is a configurable threshold used to filter out noise and small impedance fluctuations; Local maximum condition: within the neighborhood window Within this range, |fir_coef_comp[i]| represents the maximum value, ensuring that each peak represents an independent physical reflection point. Here, M is a preset radius, such as 2~5.
[0114] The specific execution process of peak selection in this step is as follows: traverse all taps and add the index i and its corresponding value fir_coef_comp[i] that simultaneously meet the above conditions to the candidate peak list peaks, where i represents the coding fault location information and fir_coef_comp[i] represents the intensity of the coding fault.
[0115] S70: For the peak list peaks, sort the absolute values of the amplitudes of each candidate peak in descending order, and select the first peak after sorting, that is, the most significant peak (i.e., the main peak), as the main fault feature for subsequent fault classification and location.
[0116] S80: As Figure 4 shown, the type of bus cable fault can be determined according to the sign (polarity) and amplitude of the main peak, combined with a preset threshold. The specific judgment method is as follows: If p < 0 and |p| > Tshort, it is determined that the cable fault type is a short circuit; If p > 0 and p > Topen2, it is determined that the cable fault type is a double wire open circuit; If p > 0 and Topen1 < p ≤ Topen2, it is determined that the cable fault type is a single wire open circuit; In other cases, it is determined that the cable has no fault.
[0117] Among them, p = fir_coef_comp[ipeak], representing the main peak, Tshort is the short circuit threshold, Topen1 is the first open circuit threshold, and Topen2 is the second open circuit threshold. These three thresholds are all configurable thresholds, supporting adaptive adjustment under different cable types and noise environments.
[0118] S90: According to the main peak index imax and its corresponding decimated phase, calculate the fault location, which may include the following process: First, perform a rough delay calculation using the following formula: , where K is the decimation factor and fs is the ADC sampling frequency. Among them, K / fs is the sampling interval Tds.
[0119] Then, perform fractional delay compensation. Specifically, introduce the current optimal decimated phase through the following formula to align the sampling offset: τfine = τ + phase_id / fs, where phase_id / fs is the phase-based fractional delay. phase_id is the current decimated phase.
[0120] Finally, calculate the fault distance through the following formula: , where v is the nominal propagation speed of the signal in the cable (such as ), line_speed_adj is a configurable speed scale factor (used to calibrate the actual propagation speed deviation), and fault_loc_correction is a fixed distance offset compensation (used to calibrate system delay, connector length, etc.).
[0121] Finally, the fault type determined in step S80 and the fault location d_fault calculated in step S90 can be reported as diagnostic results.
[0122] In addition, as described in step S20, steps S30-S70 can be performed for each of the K phases, and the optimal phase can be selected based on the K main peak values calculated for the K phases. Based on the main peak value of the optimal phase, the cable fault diagnosis corresponding to steps S80-S90 can be performed.
[0123] To better understand the solution of this application, a third embodiment of this application is further described below. This embodiment is a specific application of the above-described AUTBUS bus cable diagnostic method. First, assume the scenario of this embodiment is as follows: Transmitter (TDR_TX): used to generate a pseudo-random sequence (PRS), with a PRS symbol update rate of fs / K, meaning a symbol is updated once every K = 16 ADC sampling cycles. The ADC sampling rate is: fs = 100MHz (i.e., sampling interval Ts = 10ns). Cable parameters are: AUTBUS twisted pair total length L = 500m, signal propagation speed... The maximum round-trip delay is: Assume the cable fault is set as follows: a single-wire break occurs 300m from this end (the phenomenon is a sudden increase in impedance to infinity, resulting in positive polarity reflection). The PRS period needs to be greater than τmax = 5μs (corresponding to >500 original sampling points) to avoid autocorrelation aliasing.
[0124] The AUTBUS bus cable diagnostic method of the third embodiment includes the following steps S101-S109: S101: TDR_TX performs the excitation transmission of PRS and distributes it as a reference signal to TDR_RX.
[0125] TDR_TX generates a PRS at an update rate of fs / K, which is then converted into a differential signal by a DAC and an analog front-end (AFE) and injected into the AUTBUUS bus. Simultaneously, this PRS sequence (denoted as PRS_ref) is copied and synchronously sent to the receiver's TDR_RX as a local reference for channel estimation.
[0126] S102: TDR_RX performs echo sampling and downsampling.
[0127] The ADC continuously samples the echo signal on the bus at 100MHz. It is assumed that the echo signal includes: strong near-end leakage at t≈0ns (caused by internal chip coupling, not cable fault), positive polarity reflection from a single wire break at 300m at t≈3μs (due to impedance surge caused by open circuit), and other background noise and crosstalk.
[0128] TDR_RX downsamples the original sampling sequence by 16 times, that is, the equivalent sampling rate fs / K = 6.25 MHz, and the sampling period (i.e., sampling interval) Tds = 160 ns.
[0129] S103: Perform adaptive channel estimation to obtain the coefficient vector fir_coef.
[0130] For a FIR filter with a sampling length N = 32, perform adaptive filtering on the downsampled signal based on the LMS algorithm. After multiple PRS cycles of iteration, the coefficient vector fir_coef converges; and, at the tap index a significant positive peak appears (this peak corresponds to the 300 m fault location).
[0131] S104: Perform near-end echo bias correction.
[0132] Since the AUTBUS transceiver has no hybrid isolation, fir_coef[0] contains a fixed near-end leakage bias (such as 0.8 V). Therefore, subtract the pre-stored bias value bias from fir_coef[0] to obtain the corrected CIR: fir_coef_corr.
[0133] S105: Perform line loss compensation.
[0134] To cancel the propagation attenuation, apply an exponential gain to each tap:
[0135] , where α = 1.05. Among them, for the i = 19 position, the compensation gain Through line loss compensation, the amplitude of the far-end fault echo is increased to a detectable level.
[0136] S106: Perform peak detection.
[0137] [[ID=३३]]Set the amplitude threshold Tth = 0.1; detect that fir_coef_comp
[19] satisfies: , and if it is a local maximum within the neighborhood (such as ±3 points), then add (i = 19, value) to the candidate peak list peaks.
[0138] S107: Perform fault classification.
[0139] Among them, the main peak p = fir_coef_comp
[19] value is positive polarity, and the two preset thresholds are: Topen1 = 0.3, Topen2 = 0.6. Determine that p > 0 and Topen1 < p ≤ Topen2, then the fault type is determined to be a single-line open circuit.
[0140] S108: Perform fault location.
[0141] Assume the determined optimal phase index is phase_id=5. This optimal phase index is selected through phase traversal, specifically by performing steps S103-S106 once for each of the K=16 downsampled phases (phase_id=0 to 15), obtaining a set of fir_coef and the corresponding main peak value each time; and selecting the phase with the largest peak amplitude (assuming phase_id=5) as the optimal phase.
[0142] The following formula is used for fine-grained delay calculation: .
[0143] Perform fault distance calculation:
[0144] In this formula, 0.97 represents line_speed_adj. 2 is fault_loc_correction.
[0145] S109: Based on the results of S107 and S108, the reported fault information is: single-line open circuit, location 299.73. 2m.
[0146] like Figure 5 As shown, the fourth embodiment of this application also provides a cable diagnostic device for industrial fieldbus, including: A signal generation module is used to generate a pseudo-random sequence at the transmitting end, convert it into an analog signal, and then inject it into the cable under test; the pseudo-random sequence is also provided to the receiving end as a reference sequence. The signal acquisition module is used to acquire the echo signal on the cable at the receiving end and convert the sample into a sampling sequence; A peak detection module is used to estimate the channel impulse response based on the sampled sequence and the reference sequence using an iterative correlation estimation method, and to detect peak values that meet preset conditions from the channel impulse response; wherein, the channel impulse response includes a discrete coefficient vector; The fault diagnosis module is used to determine the fault type of the cable based on the sign and amplitude of the detected peak value, and / or to calculate the fault location on the cable based on the position of the peak value in the channel impulse response.
[0147] The fifth embodiment of this application also provides an industrial fieldbus chip, such as... Figure 2A As shown, it includes: a transmitter (TDR_TX), a digital-to-analog converter (DAC), a receiver (TDR_RX), an analog-to-digital converter (ADC), and an analog front-end (AFE), wherein: The transmitter (TDR_TX) is used to generate pseudo-random sequences (PRS). In some embodiments, TDR_TX can specifically be used to generate block-shaped PRS at a symbol rate of fs / K.
[0148] The digital-to-analog converter (DAC) is used to convert the pseudo-random sequence into a single-ended analog signal.
[0149] The analog front end (AFE) is used to convert the single-ended analog signal into a differential signal and inject it into the cable under test. It is also used to collect the differential echo signal on the cable and convert it into a single-ended analog signal.
[0150] The analog-to-digital converter (ADC) is used to sample the single-ended analog signal converted by the analog front-end and convert it into a sampling sequence. In some embodiments, the ADC can specifically be used to sample the echo signal at a sampling frequency fs.
[0151] The receiver (TDR_RX) is used to acquire a pseudo-random sequence and use it as a reference sequence. Based on the sampled sequence and the reference sequence, it estimates the channel impulse response using an iterative correlation estimation method, detects peak values that meet preset conditions from the channel impulse response, determines the fault type of the cable based on the sign and amplitude of the detected peak values, and / or calculates the fault location on the cable based on the position of the peak values in the channel impulse response; wherein, the channel impulse response includes a discrete coefficient vector.
[0152] In some embodiments, such as Figure 2B As shown, the receiver (TDR_RX) includes: a buffer module, a downsampling module, an echo estimation module, and a fault analysis module, wherein: The buffer module is used to buffer the received PRS as a reference sequence. The buffer module can be, for example, a first-in-first-out (FIFO) buffer.
[0153] The downsampling module is used to downsample the sampling sequence transmitted from the ADC. In some embodiments, the downsampling module can specifically be used to perform K-fold downsampling processing to obtain a sampling sequence with an equivalent sampling rate fs / K and a sampling interval K / fs.
[0154] The echo estimation module is used to perform echo estimation based on a reference sequence (PRS) and a downsampled sequence to obtain a peak value that meets preset conditions. In some embodiments, the echo estimation module can specifically be used to estimate the channel impulse response (CIR) using an iterative correlation estimation method, and detect the peak value that meets preset conditions from the channel impulse response.
[0155] The fault analysis module is used to determine the fault type and / or fault location of the cable based on the peak value. In some embodiments, the fault analysis module may specifically be used to determine the fault type of the cable based on the sign and amplitude of the detected peak value, and / or to calculate the fault location on the cable based on the position of the peak value in the channel impulse response.
[0156] In some embodiments, such as Figure 2C As shown, the echo estimation module includes: an FIR filter, an error estimation module, and an iterative algorithm module, wherein: The FIR filter is used to generate an echo prediction signal (echo_predict) based on a reference sequence (i.e., PRS) and the current filter coefficients (fir_coef). In some embodiments, the FIR filter can specifically be used to take the reference sequence (i.e., PRS) as input and perform a convolution operation on the sequence using the current filter coefficients (fir_coef) to generate an echo prediction signal (echo_predict) consistent with the current channel response.
[0157] The error estimation module is used to compare the downsampled sequence with the predicted echo signal (echo_predict) and output the deviation signal (err) between the two.
[0158] The iterative algorithm module is used to adjust the filter parameters (fir_coef) according to the deviation signal (err) and then provide them to the FIR filter. In some embodiments, the specific algorithm used in the iterative algorithm module may be, for example, the LMS algorithm, the Alpha filter method, the recursive least squares method, the sliding cross-correlation method, etc.
[0159] The three modules described above constitute a closed-loop iterative mechanism: in each iteration, the FIR filter generates a new prediction signal based on the latest fir_coef and PRS, the error estimation module generates a new error accordingly, and the iterative algorithm module adjusts fir_coef accordingly (i.e., continuously optimizes fir_coef). By repeatedly executing this process, when multiple iterations converge (i.e., the error err tends to 0 or a fixed value), fir_coef can be output for fault analysis.
[0160] In some embodiments, such as Figure 2D As shown, the fault analysis module may include a bias correction module, a line loss compensation module, a peak detection module, a peak sorting module, a fault classification module, and a fault location module. The functions or specific implementations of each module can be found in the relevant descriptions in steps S40-S90 above, and will not be repeated here.
[0161] Figure 6This is a schematic structural diagram of a computing device 900 provided in an embodiment of this application. This computing device can execute or implement various optional embodiments of the above-described methods. The computing device can be a terminal, or a chip or chip system within the terminal. Figure 6 As shown, the computing device 900 includes: a processor 910, a memory 920, and a communication interface 930.
[0162] It should be understood that Figure 6 The communication interface 930 in the computing device 900 shown can be used to communicate with other devices, and may specifically include one or more transceiver circuits or interface circuits.
[0163] The processor 910 can be connected to the memory 920. The memory 920 can be used to store the program code and data. Therefore, the memory 920 can be a storage unit inside the processor 910, an external storage unit independent of the processor 910, or a component that includes both the storage unit inside the processor 910 and the external storage unit independent of the processor 910.
[0164] Optionally, the computing device 900 may also include a bus. The memory 920 and communication interface 930 can be connected to the processor 910 via the bus. The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The symbol is represented by a line without an arrow, but this does not mean that there is only one bus or one type of bus.
[0165] It should be understood that in the embodiments of this application, the processor 910 may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. Alternatively, the processor 910 may employ one or more integrated circuits to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0166] The memory 920 may include read-only memory and random access memory, and provides instructions and data to the processor 910. A portion of the processor 910 may also include non-volatile random access memory. For example, the processor 910 may also store device type information.
[0167] When the computing device 900 is running, the processor 910 executes computer execution instructions stored in the memory 920 to perform any of the operational steps of the above method and any of the optional embodiments thereof.
[0168] It should be understood that the computing device 900 according to the embodiments of this application can correspond to the corresponding subject in executing the methods according to the various embodiments of this application, and the above and other operations and / or functions of each module in the computing device 900 are respectively for implementing the corresponding processes of the methods of this embodiment. For the sake of brevity, they will not be described in detail here.
[0169] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0170] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0171] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0172] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0173] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0174] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0175] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is used to perform the above-described method, which includes at least one of the schemes described in the above embodiments.
[0176] The computer storage medium in this application embodiment can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0177] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0178] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0179] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0180] Furthermore, the terms "first, second, third, etc." or similar terms such as module A, module B, and module C used in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that, where permissible, a specific order or sequence may be interchanged so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0181] In the above description, the labels of the steps involved, such as S110, S120, etc., do not mean that the steps will necessarily be executed. The order of the steps can be interchanged or executed simultaneously if permitted.
[0182] The term "comprising" as used in the specification and claims should not be construed as limiting itself to what follows; it does not exclude other elements or steps. Therefore, it should be interpreted as specifying the presence of the mentioned feature, integral, step, or component, but does not exclude the presence or addition of one or more other features, integrals, steps, or components, or groups thereof. Thus, the statement "device comprising means A and B" should not be limited to a device consisting solely of components A and B.
[0183] The terms "an embodiment" or "an embodiment" as used in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in at least one embodiment of this application. Therefore, the terms "in one embodiment" or "in an embodiment" appearing throughout this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. Furthermore, in one or more embodiments, the particular features, structures, or characteristics can be combined in any suitable manner, as will be apparent to those skilled in the art from this disclosure.
[0184] Note that the above are merely preferred embodiments and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application, all of which fall within the scope of protection of this application.
Claims
1. A cable diagnostic method for industrial fieldbus, characterized in that, It includes the following steps: Generate a pseudo-random sequence at the transmitting end, convert it into an analog signal and inject it into the cable under test; the pseudo-random sequence is also provided to the receiving end as a reference sequence; The receiving end collects the echo signal on the cable and samples and converts it into a sampling sequence; Perform a peak detection process, including: estimating the channel impulse response based on the sampling sequence and the reference sequence by an iterative correlation estimation method, where the channel impulse response includes a discrete coefficient vector; detecting peaks in the channel impulse response that meet preset conditions; Determine the fault type of the cable according to the sign and amplitude of the detected peak, and / or calculate the fault position on the cable according to the position of the peak in the channel impulse response.
2. The method according to claim 1, wherein The generation of the pseudo-random sequence includes: generating the pseudo-random sequence in a block manner at a symbol rate of fs / K, where fs is the sampling frequency at which the receiving end performs the sampling, and K is an integer greater than 1; The sampling conversion into a sampling sequence includes: sampling the echo signal at a sampling frequency of fs, and then performing a K-fold downsampling process to obtain a sampling sequence with an equivalent sampling rate of fs / K and a sampling interval of K / fs.
3. The method according to claim 2, characterized in that, It further includes: For each of the K sampling phases corresponding to the K-fold downsampling, perform the peak detection process respectively to obtain K main peaks; Select the optimal main peak from the K main peaks as the peak for determining the fault type and / or fault position of the cable.
4. The method according to claim 3, characterized in that, The selection of the optimal main peak from the K main peaks includes one of the following methods or any combination of the following methods: Calculate the amplitude of the main peak at each phase, and select the phase with the largest amplitude as the optimal phase, and the main peak in the optimal phase is the optimal main peak; Count the number of peaks that meet the threshold condition at each phase, and select the phase with the least number of peaks or only one significant peak as the optimal phase, and the significant peak in the optimal phase is the optimal main peak.
5. The method according to claim 2, characterized in that, It further includes: Perform proximal echo bias correction on the channel impulse response.
6. The method according to claim 2, characterized in that, It further includes: Apply corresponding gains to each tap coefficient of the channel impulse response according to the signal propagation delay corresponding to it to compensate for the attenuation of the signal amplitude caused by cable loss as the propagation distance increases.
7. The method according to any one of claims 3-6, characterized in that, The determination of the fault type of the cable according to the sign and amplitude of the detected peak includes: Let p represent the peak, Tshort be the short-circuit threshold, Topen1 be the first open-circuit threshold, and Topen2 be the second open-circuit threshold; If p < 0 and |p| > Tshort, then determine that the fault type of the cable is a short circuit; If p > 0 and p > Topen2, then determine that the fault type of the cable is a double-line open circuit; If p > 0 and Topen1 < p ≤ Topen2, then determine that the fault type of the cable is a single-line open circuit; In other cases, it is determined that the cable has no fault.
8. The method according to any one of claims 3-6, characterized in that, The calculation of the fault position on the cable according to the position of the peak in the channel impulse response is calculated according to the following parameters: The nominal propagation speed of the signal in the cable, the position of the peak in the channel impulse response, the downsampling factor, the sampling frequency, the current downsampling phase, the configurable speed scaling factor, and the fixed distance offset compensation.
9. An industrial fieldbus chip, characterized in that, include: Transmitter, analog-to-digital converter module, receiver, analog-to-digital converter module, analog front-end; The transmitter is used to generate pseudo-random sequences; The digital-to-analog conversion module is used to convert the pseudo-random sequence into a single-ended analog signal; The analog front end is used to convert the single-ended analog signal into a differential signal and inject it into the cable under test. It is also used to collect the differential echo signal on the cable and convert it into a single-ended analog signal. The analog-to-digital conversion module is used to sample the single-ended analog signal converted by the analog front-end and convert it into a sampling sequence; The receiving end is used to acquire a pseudo-random sequence and use it as a reference sequence. Based on the sampled sequence and the reference sequence, it estimates the channel impulse response using an iterative correlation estimation method, detects peak values that meet preset conditions from the channel impulse response, determines the fault type of the cable based on the sign and amplitude of the detected peak values, and / or calculates the fault location on the cable based on the position of the peak values in the channel impulse response; wherein, the channel impulse response includes a discrete coefficient vector.
10. The chip according to claim 9, characterized in that, The receiving end includes: a buffer module, a downsampling module, an echo estimation module, and a fault analysis module; The caching module is used to cache the reference sequence; The downsampling module is used to downsample the sampling sequence; The echo estimation module is used to perform echo estimation based on the reference sequence and the downsampled sequence to obtain the peak value that meets the preset conditions. The fault analysis module is used to determine the fault type and / or fault location of the cable based on the peak value.
11. The chip according to claim 10, characterized in that, The echo estimation module includes: an FIR filter, an error estimation module, and an iterative algorithm module; The FIR filter is used to generate an echo prediction signal based on the reference sequence and the current filter parameters. The error estimation module is used to compare the downsampled sequence with the predicted echo signal and output the deviation signal between the two. The iterative algorithm module is used to adjust the filtering parameters according to the deviation signal, and the adjusted filtering parameters are used to provide the FIR filter. The FIR filter, error estimation module, and iterative algorithm module constitute a closed-loop iterative mechanism, and the filter parameters after the iteration are used for fault analysis.