Abstract:
An improved method and apparatus for detecting leaks in pipelines using cross-correlation techniques including improved correlating circuitry featuring a pair of circulating delay lines for respectively receiving, temporarily storing and processing in a revolving sequence samples of input data obtained from a pair of remotely positioned sensors, a multiplying circuit for causing samples input to each channel to be multiplied by each sample stored in the circulating delay line associated with the other channel, an adder and accumulator memory for accumulating the multiplication results, and a display for displaying the correlation results.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates generally to pipeline leak detection methods and apparatus, and more particularly to an improved method and apparatus for quickly and accurately locating the source of a leak in a pipeline utilizing improved cross-correlation techniques which allow the entire length of pipe between two sensors to be scanned without requiring use of a fixed delay or reversal of sensor inputs. 
     2. Brief Description of the Prior Art 
     It has long been known that water or any other fluid escaping from a pressurized pipe produces a characteristic noise which is propagated along the pipe with a constant velocity in both directions away from the leak location. It is likewise known that by placing sensors on opposite sides of the leak, the leak noise will be received at different times depending upon the distance of each sensor from the leak. Since the propagating velocity can easily be determined the location of the leak can be determined as a function of the time difference. In the U.S. Pat. No. 4,083,229 to Alan Anway, a cross-correlation measurement technique is disclosed wherein one signal is progressively delayed relative to the other while the apparatus continues to compare the similarity between the two signals. This enables the device to measure the difference in travel time T d  of the leak noise to the respective sensors. By determining the velocity of sound for the particular piperline under test and using the distance between the sensors, the apparatus can compute the leak position in accordance with the following formula: 
     
         L=[D-(V×T.sub.d)]/2 
    
     where L is the leak position, D is the overall distance between the sensors, V is the velocity of sound in the pipeline medium, and T d  is the transit time difference. 
     One of the problems associated with such prior art correlation techniques is that, in order to scan the entire length of the pipe between the two sensors, a fixed delay must be introduced into one of the input data streams, or means must be provided for switching the device inputs. Not only does this add additional complexity to the apparatus, but it also means that a certain delay is introduced into the operational function before meaningful data can be accumulated. 
     SUMMARY OF THE PRESENT INVENTION 
     It is therefore an object of the present invention to provide an improved method and apparatus for analyzing leak detector signals obtained from positions on opposite sides of a leak location to determine with a high degree of precision the location of the leak. 
     Another object of the invention is to provide an improved correlation device and method of the type described wherein the inputs from each of two detectors are simultaneously recirculated and compared to each other. 
     Still another object of the present invention is to provide an improved leak detection apparatus of the, type described including the use of circulating delay lines in each input leg. 
     Briefly, a presently preferred embodiment of the present invention includes improved correlating circuitry featuring a pair of circulating delay lines for respectively receiving, temporarily storing and processing in a revolving sequence samples of input data obtained from a pair of remotely positioned sensors, a multiplying circuit for causing samples input to each channel to be multiplied by each sample stored in the circulating delay line associated with the other channel, an adder and accumulator memory for accumulating the multiplication results, and a display for displaying the correlation results. 
     An important advantage of the present invention is that the entire length of pipe between sensors can be scanned on a real-time basis. 
     Another advantage of the present invention is that a user begins to obtain useful information almost immediately after the scanning operation is commenced. 
     Yet another advantage of the present invention is that it can be implemented in a more efficient and less expensive manner than has heretofore been possible. 
     These and other objects and advantages of the present invention will no doubt become apparent to those skilled in the art after having read the following detailed description of the preferred embodiment which is illustrated in the drawing. 
    
    
     IN THE DRAWING 
     FIG. 1 is a diagram generally illustrating operation of a leak detector apparatus in accordance with the present invention; 
     FIGS. 2a and 2b show block diagrams schematically illustrating a preferred embodiment of the present invention; 
     FIG. 3 is a diagram schematically illustrating the basic components of the system clock and correlation address counter depicted in FIG. 2 of the drawing; and 
     FIG. 4 is a timing diagram illustrating operation of the preferred embodiment. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring now to FIG. 1 of the drawing, there is shown at 10 a section of pipe suspected of having a leak located at some unknown position 12. The waves 14 are intended to illustrate movement of sound from the leak toward each end of the pipe 10. In order to detect the position of the leak relative to the length of pipe, a detection system depicted at 16 utilizes correlation techniques to determine the difference in time it takes for sound originating at the source 12 to arrive at the locations of two sensors 18 and 20 placed at a known distance D apart on opposite sides of the leak. As indicated above, the transit time difference T d  can then be used to locate the leak relative to one of the sensors by solving the equation L=[D-(V ×T d )]/2. As will be further explained below, data accumulated at correlation points related to the display centerpoint &#34;C&#34; will locate the leak, as indicated by the pulse &#34;P&#34; on the system display depicted in enlarged form at 17. Note that the signal correlation results at other points along the length of pipe are also shown at &#34;n&#34; points on each side of the centerpoint &#34;C&#34;. 
     Turning now to FIG. 2 of the drawing, the principal functional components of the correlation circuit of the present system are illustrated. More particularly, the circuit includes a correlation system clock 22, a cyclic correlation address counter 24, a dual channel circulating delay memory unit 26, and an accumulator or result memory 28. 
     An X-input channel receiving inputs from a sensor 18 begins with an analog signal input terminal 30 and extends through an analog-to-4-bit-digital converter 32 and latch 34 to one input 36 of a digital signal multiplier 38. An alternate bi-directional 4-bit signal path 40 also extends from multiplier input 36 to the junction between the input to a latch 42 and the output from a latch 44. A 4-bit signal path 43 extends from the output of latch 42 to the input 45 of an X-channel delay memory 26. A return path 46 extends from the output port 47 of the X-channel delay memory 26 to the input side of latch 44. Signals returning from delay memory 26 follow path 46 through latch 44 and path 40 to multiplier input 36. 
     A Y-input channel receiving an analog input from sensor 20 begins with a terminal 50 and passes through an A-to-D converter 52 and latch 54 to a second input 56 of multiplier 38. An alternate bi-directional signal path 60 connects the output of latch 54 (and multiplier input 56) to the junction between latches 62 and 64. The output of latch 62 is coupled to the Y-channel of circulating delay memory 26 via line 63. A return path for Y-channel data is provided via line 65 through latch 64 and line 60 to the input 56 of multiplier 38. 
     The output of multiplier 38, which may be configured as a look-up ROM, is latched by a latch 70 for input to an adder 72 which adds the new information developed by multiplier 38 to old information stored at an addressed location in result memory 28 and input to adder 72 on line 74. The output of adder 72 is latched by a latch 76 for return to result memory 28 via line 78 or alternatively, to be made available via line 79 as a result value at an output terminal 80. Input and output to and from memories 26 and 28 is controlled by the address counter 24 via address signals developed on lines 81, 82 and 84. A current address in memory 28 may be latched by latch 86 for output as a correlation result address at an output terminal 88. 
     Sample data is input to latches 34 and 54 in response to LOAD signals developed on line 90 and applied at CLK inputs 35 and 55 respectively. Latched signals are output from latches 34 and 54 at ports 37 and 57 in response to COUNT and COUNT signals applied to the enable inputs 39 and 59 respectively. Similarly, data is input to latches 42 and 62, and 44 and 64, in response to 1 MHz CLK signals developed by clock 22 on lines 43 and 45. These latches have their outputs enabled by COUNT signals input on lines 47 and 49. Various inhibit signals are also generated for use during sample input but for simplicity are not shown. 
     Operation of latch 70 is controlled by a CLK input at 71. Latch 76 is controlled by a CLK input at 77 and an enable input at 79. 
     Turning now to FIG. 3 of the drawing, details of the correlation clock 22 and correlation address counter 24 are depicted As illustrated, clock 22 is comprised of a pair of integrated circuit flip-flop devices 100 and 102 interconnected to provide a &#34;divide-by-four&#34; function converting the 4 MHz CPU clock input at 104 into 1 MHz correlation clock signals CLK and CLK for output on lines 106 and 108 respectively. 
     Address counter 24 is comprised of three integrated circuit counters 110, 112 and 114 interconnected to jointly act as an eleven-bit counting circuit. The signal generated on line 108 is input to one input of a NAND-gate 116 to generate the LOAD  output on line 118. The output from the RCO (Ripple Carry Out) pin of chip 114 is used to generate the LOAD signal. The RCO signal is gated with the IMHz clock signal in gate 1 16 to ensure that the LOAD signal is present on the LOAD inputs of chips 110, 112, 114 when the leading edge of the IMHz clock on the clock input is used to preset the counter chips 110, 112, 114 to a value presented on the A, B, C, D pins of each chip. The counters count from this preset value to 7FF, generate the next RCO signal and hence, LOAD and thus continuously cycle. This cycle count is the correlation address. 
     The eleven-bit correlation address is output on bus 81. A second NAND-gate 120 responds to an input of the count signal on line 92, which is the least significant bit of the output of counter 110, and generates the COUNT output on line 94. 
     In operation, and referring additionally to FIG. 4, an internally generated LOAD pulse input at 90 from source 116 (FIG. 3) causes latches 34 and 54 to simultaneously latch four-digital bits of sample data (X S  and Y S ) generated by each of the converters 32 and 52. The internal correlation counter 24 then counts from a particular count value (preselected depending on pipe length, size, material and selected range) to a terminal count T c  and then resets, at the same time generating the LOAD pulse on input 90. This enables the length of the static RAM (SRAM) delay line 26 to be varied for optimum length. 
     The least significant bit of the binary correlation count is used to generate the &#34;COUNT&#34; and &#34;e,ovs/COUNT/ &#34; generated on lines 92 and 94 respectively. These signals are used as control signals to select one of two similar latch/sample memory blocks in an alternating fashion. One of the blocks is made up of latches 34, 62 and 64, and the Y-channel of memory 26. The other block is made up of latches 54, 42 and 44, and the X-channel of memory 26. 
     Addressing of the sample memory 26 and result memory 28 is directly driven by the 11-bit outputs generated by correlation counter 24 on lines 82 and 84. Although memories 26 and 28 are shown as discrete elements, for convenience, both memory blocks are contained within a common SRAM so that each discrete address has a 16-bit memory site occupied by a 4-bit Y- or X-sample value and a 12-bit correlation result stored in it. The effect of this addressing technique is that, as depicted in FIG. 2, all of the results for one side of the pipe, i.e., from the midpoint to one of the sensors, are stored in the odd-numbered memory addresses of memory (26, 28), and the results for the other side of the pipe are stored in the even-numbered memory addresses. 
     The latched samples in latches 34 and 54 are alternately enabled by the least significant bit of the correlation count so that in one count the new X-sample (X S ) in latch 34 is multiplied by the sample taken out of the previous address in the Y-sample memory previously latched into latch 64, or the new Y-sample (Y S ) latched into latch 54 by the load pulse. The resulting product generated by multiplier 38 is then latched by latch 10 and added by adder 72 to the results stored at the same address in memory 28, and the sample used to form the results is returned to memory 26 for storage at the same address via line 62. In the next count the new Y-sample (Y S ) in latch 54 is enabled for multiplication by the previous X-sample in memory or the new X-sample latched into latch 34 by the load pulse. This product is likewise added to the result at the same address in memory 28, and the X-sample is put back into sample memory 26 at the same address via latch 42. 
     The latched sample values in latches 34 and 54 are held as constants X S  and Y S  for one entire loop of the correlation counter 24 from preset value to terminal count. A LOAD pulse is then generated which latches another new set of sample values into latches 34 and 54. This is repeated for every loop of the correlation counter. On each even count output by the counter the sample value that was stored in the RAM location of the previous even count is multiplied in multiplier 38 by the Y S  constant for that loop and then exchanged with the sample value at the current count. Similarly, on each odd count the sample value for the previous odd RAM location is multiplied by the X S  constant for that loop then exchanged with the sample in the current odd count RAM location. 
     The products are stored in the current odd or even locations. This means that the sample values in the delay memory move along one odd or even place for each loop of the counter, but the results remain at the same odd or even RAM location and represent a correlation result for one-half of the pipe shifted in time relative to the other half. 
     At the preset location of the counter when the load pulse is generated, the new sample values take the place of the previous odd or even RAM sample values and get multiplied and swapped into the delay memory in place of the previous values, so that the oldest odd and even samples get discarded each loop of the counter. If the sample delay memory is 256 samples long, the length of the pipe being represented by the result in RAM is 256*256 time delay units long. 
     In this embodiment the results interlaced in memory are read out as required for a display of results with &#34;0&#34; delay in the center to show leak positions either side of the centerpoint &#34;C&#34; (see FIG. 1) using a hardware look-up table 86 to put the results in the correct positions. In another embodiment the result position look-up table can be accomplished in the software of the controlling micro-processor. 
     It is therefore intended that the appended claims be interpreted broadly as covering all alterations and modifications which fall within the true spirit and scope of the invention.