A multi-perception intelligent water meter system for pipe network leakage early warning

By combining low-frequency monitoring mode and dynamic threshold judgment with hardware triggering technology, the problems of power consumption and data resolution in smart water meters for pipeline leakage early warning are solved, realizing low-power, high-resolution pipeline flow monitoring and accurate leakage early warning.

CN122447656APending Publication Date: 2026-07-24SANCHUAN WISDOM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SANCHUAN WISDOM TECH CO LTD
Filing Date
2026-06-01
Publication Date
2026-07-24

Smart Images

  • Figure CN122447656A_ABST
    Figure CN122447656A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent water meters, and discloses a multi-sensing intelligent water meter system for network leakage early warning, which comprises a controller, a pressure sensor, a flow sensor and a communicator. The controller wakes up the flow sensor to calculate flow sliding variance at a low-frequency sampling rate, and generates an out-of-limit pulse signal when the variance is greater than a dynamic threshold. The signal triggers a hardware timing action through a routing matrix, controls the pressure and flow sensors to synchronously collect data at a high-frequency sampling rate in the same clock cycle, and generates discrete pressure sequences and discrete flow sequences. The controller removes the sequence direct-current baseline, extracts time phase difference and energy type transient impedance, combines the time phase difference and the energy type transient impedance into a transient hydraulic feature vector, judges a leakage state by calculating the weighted Euclidean distance between the vector and a leakage feature centroid. When indicating the leakage, the system generates a fixed-length dimension-reduced feature data packet, sends the data packet through the communicator, and then clears an interruption flag and restores a low-frequency monitoring mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart water meter technology, specifically to a multi-sensor smart water meter system for early warning of pipeline leakage. Background Technology

[0002] In water supply network operation monitoring, smart water meters are often used to acquire hydraulic parameters of the network for leak warning. Conventional leak monitoring equipment uses a fixed sampling frequency when collecting pressure and flow data. While a high sampling rate can capture data on transient hydraulic changes in the network, it increases battery consumption; a low sampling rate reduces power consumption but struggles to capture transient changes in the network during leaks. In actual operation, the system often fails to balance daily standby power consumption with data acquisition resolution under abnormal conditions.

[0003] In early warning mechanisms involving joint analysis of multi-sensor parameters, existing water meter devices typically rely on software instructions from the central processing unit to sequentially read data from different sensors. This triggering method, which relies on software polling or software interrupts, suffers from delays in the microprocessor instruction cycle, causing deviations in the time axis between the acquired pressure and flow data sequences. When extracting phase or impedance features based on multi-dimensional data, these time-dimensional deviations can lead to calculation errors, reducing the accuracy of identifying pipeline leakage conditions. Furthermore, existing anomaly detection methods often rely on pre-set static thresholds for comparison, making it difficult to adapt to changes in background flow and pressure in the pipeline network. When the device determines that data exceeds limits, the existing mechanism triggers the overall uploading of the original sampled data, which increases the bandwidth usage of the communication network and the power consumption of the water meter's communication module's radio frequency transmission. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a multi-sensor smart water meter system for early warning of pipeline leakage. This system solves the problems in existing technologies, such as smart water meters not taking into account sampling power consumption and data resolution in early warning of pipeline leakage, time deviations in multi-sensor software triggering acquisition leading to errors in hydraulic feature extraction, and increased communication power consumption due to uploading all raw sampling data.

[0005] To achieve the above objectives, the present invention provides the following technical solution: This invention provides a multi-sensor smart water meter system for early warning of pipeline leakage, including a controller, a pressure sensor, a flow sensor, and a communicator.

[0006] The controller contains a memory and is connected to a pressure sensor, a flow sensor, and a communicator. The controller is set to operate the system in a low-frequency monitoring mode, waking up the flow sensor at a low-frequency sampling rate to collect flow sampling points and store them in the memory.

[0007] The controller allocates a contiguous memory address space in the memory to construct a circular buffer, continuously writes traffic sampling points into the circular buffer to maintain a sliding time window, calculates the average traffic within the sliding time window, and uses the average traffic and each traffic sampling point to calculate the traffic sliding variance.

[0008] The system calculates the arithmetic mean of historical data on flow rate sliding variance within a set nighttime steady-state period. This arithmetic mean is then multiplied by a floating coefficient ranging from 1.5 to 3.0 to generate a dynamic threshold. When the flow rate sliding variance exceeds the dynamic threshold, the flow sensor outputs an over-limit pulse signal, triggering the controller to synchronously drive the pressure sensor and flow sensor to collect data at a high-frequency sampling rate, generating discrete pressure and discrete flow sequences.

[0009] The pressure sensor has an embedded converter, and the controller integrates a routing matrix. The over-limit pulse signal is input to the routing matrix in digital level form. The routing matrix, based on its internally preset connection mapping register, bypasses the controller's central processing unit core and transmits the transition edge of the over-limit pulse signal to the converter's injection conversion trigger channel, driving the analog switch of the converter's internal sample-and-hold circuit to close.

[0010] Meanwhile, the controller sets its internal general-purpose timer module to operate in output compare mode, periodically generating trigger events based on the high-frequency sampling rate. These trigger events are simultaneously routed on the internal bus to the converter's normal conversion trigger input and the flow sensor's sampling enable input, ensuring that the analog-to-digital conversion operations of the pressure sensor and flow sensor are initiated within the same clock cycle.

[0011] Furthermore, when the flow sensor is woken up at a low sampling rate, the controller sends a power gating command to the converter, cutting off the power supply path to the main conversion core circuit inside the converter and maintaining a static bias current input to the reference voltage source included in the converter. Under this drive, the reference voltage source outputs an analog reference voltage and performs closed-loop charging and steady-state voltage maintenance on the bypass holding capacitor connected to the converter, thereby controlling static power consumption and maintaining the voltage state.

[0012] The controller calculates the average pressure value of the discrete pressure sequence and the average high-frequency flow value of the discrete flow sequence, respectively. It then performs a point-by-point subtraction operation between each sampling point in the discrete pressure sequence and the discrete flow sequence and the corresponding average value, eliminating the DC pressure baseline and the DC flow baseline, and generating the AC pressure fluctuation sequence and the AC flow fluctuation sequence.

[0013] Furthermore, the controller fixes the index of the pressure AC fluctuation sequence and shifts the flow AC fluctuation sequence point by point on the time axis. Zero-padding is performed on data points whose indexes exceed the limits after shifting. At each shift step, the sum of the products of corresponding data points in the two sequences is calculated to generate a discrete cross-correlation sequence. By traversing and locating the array index position where the maximum value is obtained from the discrete cross-correlation sequence, the corresponding hysteresis shift step is extracted, and the time phase difference is calculated in conjunction with the high-frequency sampling rate.

[0014] The controller performs a square operation on each sampling point of the pressure AC fluctuation sequence and then sums the results to generate a zero-hysteresis pressure autocorrelation function; it also performs a square accumulation operation on each sampling point of the flow AC fluctuation sequence to generate a zero-hysteresis flow autocorrelation function; the ratio of the zero-hysteresis pressure autocorrelation function to the zero-hysteresis flow autocorrelation function is calculated and square rooted to obtain the energy-type transient impedance.

[0015] The controller acquires the pre-stored reference time phase difference and reference transient impedance, performs division operations to obtain the normalized time phase difference and normalized energy-type transient impedance respectively, and combines them to generate a transient hydraulic characteristic vector. Based on the set phase characteristic weighting coefficients and impedance characteristic weighting coefficients, the weighted Euclidean distance between the transient hydraulic characteristic vector and the pre-stored leakage characteristic centroid is calculated.

[0016] When the distance to the leakage feature is less than or equal to the set identification threshold, a leakage event is determined to have occurred in the pipeline network, and a Boolean-type leakage alarm status code is generated. When the pipeline network status identification result indicates leakage, the controller writes a wake-up byte and a frame header identifier to the starting address of the internal transmission buffer. The device's globally unique identifier, current timestamp, leakage alarm status code, normalized time phase difference, and normalized energy transient impedance are sequentially written into the effective load area. The hardware cyclic redundancy check calculation unit is called to generate a check code and appended to the end. A fixed-length dimensionality-reduced feature data packet is then assembled and sent through the communicator.

[0017] After the data packet is sent, the controller resets the write pointers corresponding to the discrete pressure sequence and discrete flow sequence allocated in the memory to the base address of the pre-allocated memory, writes a clear instruction to the interrupt controller to clear the over-limit interrupt pending flag triggered by the over-limit pulse signal, and resets and starts the low-frequency timer to resume low-speed polling monitoring of the static pressure of the pipeline network.

[0018] This invention provides a multi-sensor smart water meter system for early warning of pipeline leakage. It has the following beneficial effects: 1. This invention achieves monitoring of abnormal pipeline flow conditions by combining low-frequency sampling under normal conditions with a dynamic threshold determination mechanism, while controlling the overall power consumption of the equipment. Utilizing historical data of flow sliding variance from the steady-state period at night, combined with a floating coefficient, a dynamic threshold is calculated to adapt to changes in the background flow of the pipeline, reducing false triggering caused by a single fixed threshold setting. When the flow variance exceeds the limit, a pulse signal is output to trigger high-frequency acquisition of pressure and flow, balancing low power consumption during daily operation with the data acquisition resolution requirements during abnormal events.

[0019] 2. This invention employs a hardware triggering architecture that coordinates a routing matrix and a general-purpose timer. The over-limit pulse signal bypasses the central processing unit core and is transmitted to the injection conversion trigger channel, controlling the pressure sensor and flow sensor to initiate analog-to-digital conversion within the same clock cycle. This satisfies the alignment requirements of the discrete sequence on the time axis needed for subsequent extraction of the time phase difference. Simultaneously, in low-frequency monitoring mode, a power gating command cuts off the main conversion core circuit while maintaining a static bias current input to the reference voltage source. This reduces standby power consumption while maintaining the transient stability and measurement accuracy of the analog reference voltage during high-frequency sampling.

[0020] 3. This invention calculates discrete cross-correlation and autocorrelation functions based on discrete pressure and flow AC fluctuation sequences after removing the DC baseline, extracts time phase difference and energy-type transient impedance, and uses weighted Euclidean distance to determine pipeline network leakage. This mechanism introduces multi-dimensional transient hydraulic characteristics of the pipeline network, increasing the data parameters for leakage status identification. After generating the identification results, the system only assembles and sends fixed-length, dimensionality-reduced feature data packets containing status codes and normalized hydraulic characteristics, reducing the amount of original sampled data uploaded and controlling the communication network bandwidth usage and equipment transmission power consumption during alarm interaction. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the system architecture of the present invention; Figure 2 This is a schematic diagram of the method flow of the present invention; Figure 3 This is a comparison chart of the system response delay of the present invention; Figure 4 This is a graph showing the discrete cross-correlation results of the pressure and flow fluctuation sequences of the present invention; Figure 5 This is a comparison chart of the two-dimensional feature spatial distance identification results of the present invention. Detailed Implementation

[0022] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] Please see the appendix Figure 1 This invention provides a multi-sensor smart water meter system for early warning of pipeline leakage, including: a controller, a pressure sensor, a flow sensor, and a communicator.

[0024] The controller establishes physical connections with the pressure sensor, flow sensor, and communicator via a bus.

[0025] The pressure sensor incorporates a converter. The converter includes a reference voltage source and sample-and-hold circuitry. The controller integrates a routing matrix and memory. The inputs of the routing matrix are mapped to the comparator pins of the flow sensor, and the outputs of the routing matrix are connected to the trigger channel of the converter.

[0026] Please see the appendix Figure 2 This invention provides a multi-sensor smart water meter method for early warning of pipeline leakage, comprising the following steps: S10, the controller wakes up the flow sensor according to the set low-frequency sampling rate, collects discrete flow sampling points and stores them in the memory, controls the supply of bias current to the reference voltage source and disconnects the power supply to the converter core, and calculates the flow sliding variance based on the discrete flow sampling points in the memory. S20, the controller compares the flow sliding variance with the set dynamic threshold. When the flow sliding variance is greater than the set dynamic threshold, the flow sensor outputs an over-limit pulse signal. The over-limit pulse signal is transmitted to the converter through the routing matrix and triggers the closed sample-and-hold circuit. S30: Within a set time window, the controller synchronously drives the pressure sensor and flow sensor to collect data at a set high-frequency sampling rate, generates discrete pressure sequences and discrete flow sequences, and stores the data in the memory. After the set time window ends, the power supply to the converter core is disconnected. S40, the controller calculates the average value of the discrete pressure sequence and the discrete flow sequence, performs zero-meaning operation, removes the DC baseline data, and generates a reconstructed AC fluctuation sequence; S50, the controller performs discrete cross-correlation function integration on the AC wave sequence, extracts the peak value of the discrete cross-correlation function and its corresponding lag step, outputs the time phase difference, calculates the zero-lag autocorrelation value of the flow component in the AC wave sequence, and calculates the output energy-type transient impedance by combining the peak value of the discrete cross-correlation function. S60, the controller matches the time phase difference and energy transient impedance with the set judgment rules, outputs the target pipeline status identification result, if the identification result indicates that the pipeline has leaked, extracts the time phase difference, energy transient impedance, timestamp and sequence average data to construct a dimension-reduced feature data packet, controls the communicator to send the dimension-reduced feature data packet, performs data clearing operation and releases the memory space of the memory.

[0027] When the controller executes the edge data processing method, to balance the static power consumption limit under battery power conditions with the real-time requirements of transient waveform capture, a non-complete power-off dwell control is implemented on the converter under low-frequency monitoring conditions. As a functionally generalized technical feature, the converter is specifically implemented in this embodiment as a successive approximation register-type analog-to-digital converter or a high-precision trigonometric integrator analog-to-digital converter with independent power domain control pins. The specific dwell control logic includes the following steps: The controller's power management unit configures the converter's power domain state. The controller sends a power gating command to the converter, cutting off the power supply path to the converter's internal main conversion core circuit. The main conversion core circuit specifically includes a programmable gain amplifier, a comparator array, and a digital decimation filter. By shutting down the main conversion core circuit, the system reduces the base standby current to the range of 1 to 5 microamps. For the specific register configuration and wake-up pin settings of the controller's power management unit, those skilled in the art can perform conventional settings based on the datasheet of the selected chip. Its power gating and clock tree configuration are well-known technologies in the field and will not be elaborated upon here.

[0028] With the main conversion core circuit disconnected from power, the controller maintains a bias current input to the reference voltage source. Specifically, this reference voltage source is a bandgap reference voltage source. The controller continuously inputs a static bias current to the reference voltage source through its internal low-power bias network, with the static bias current ranging from 10nA to 500nA. Physically, the bandgap reference voltage source relies on the mutual compensation of the base-emitter voltage and thermal voltage of its internal transistors to generate a low-temperature coefficient reference voltage. Maintaining a static bias current within this range ensures that the core transistors inside the reference voltage source are biased in the on-state, thereby maintaining the stability of the internal node voltage.

[0029] Driven by a static bias current, the reference voltage source continuously outputs a stable analog reference voltage and performs closed-loop charging and steady-state voltage maintenance on the bypass holding capacitor connected externally to the converter. From a hardware circuit principle perspective, the converter has a bypass holding capacitor connected externally at the microfarad level. If the converter is completely powered off, the charge on the bypass holding capacitor will discharge to zero potential. Upon subsequent power-up, the reference voltage source needs to recharge the bypass holding capacitor. Due to the time constant of the resistors and capacitors in the hardware circuit, this charging process introduces a time delay. Because the bypass holding capacitor and the reference voltage source always maintain a steady operating voltage, the converter enters a reference voltage dwell mode.

[0030] Through the aforementioned logic control, the reference voltage dwell mode eliminates the cold start setup time required for analog devices to be powered on again after a complete power outage. When a hydraulic transient occurs in the pipeline network and generates an external trigger signal, the system does not need to wait for the reference voltage to climb from zero potential to the target steady-state voltage, allowing the converter to complete the closing action of the sample-and-hold circuit within a microsecond time range after receiving the trigger signal. This mechanism ensures that the water meter system 10 can completely capture the high-frequency transient wavefront generated in the initial stage of a pipeline burst, eliminating the problem of missing wavefront data caused by underlying hardware delays.

[0031] The controller operates in low-frequency monitoring mode by default. An internal timer wakes up the flow sensor according to a set low-frequency sampling rate. The set low-frequency sampling rate ranges from 0.5Hz to 2Hz. After being woken up, the flow sensor collects instantaneous pipeline flow data and outputs discrete flow sampling points.

[0032] The controller allocates a contiguous memory address space in memory to construct a circular buffer. This circular buffer is implemented as a first-in, first-out (FIFO) queue at the underlying data structure level. The controller continuously writes discrete flow sampling points into the circular buffer through its internal direct memory access controller, maintaining a sliding time window in memory. The length of the sliding time window is set according to the steady-state fluctuation period of the pipeline network, and its value ranges from 30 to 60 data length units.

[0033] After receiving newly written discrete flow rate sampling points, the controller calls the arithmetic logic unit to calculate the flow rate slip variance within the slip time window. From a fluid physics perspective, during the steady-state period when there is no water usage or leakage, the flow rate data fluctuates around a constant mean due to background noise interference, resulting in low data dispersion. When a pipe ruptures and leaks, or a valve at the water-using end is opened, the hydraulic steady-state equilibrium is disrupted, causing instantaneous flow rate changes and increasing data dispersion. The flow rate slip variance mathematically characterizes the degree of data dispersion, and the system uses it as a characteristic parameter to determine sudden changes in the hydraulic steady-state of the pipe network.

[0034] The controller calculates the average flow rate based on discrete flow rate sampling points within a sliding time window. The core formula for calculating the average flow rate is as follows: ; in, The average flow rate is... The length of the sliding time window. The first time within the sliding time window Discrete flow sampling points.

[0035] The controller uses the mean flow rate and each discrete flow rate sampling point to further calculate the flow rate sliding variance. The core formula for calculating the flow rate sliding variance is as follows: ; in, For flow sliding variance, The length of the sliding time window. The first time within the sliding time window Discrete flow sampling points, This represents the average flow rate.

[0036] The controller's internal digital comparator compares the real-time calculated flow sliding variance with a set dynamic threshold. The specific logic for determining the set dynamic threshold is as follows: Within a set nighttime steady-state period, the controller calculates the arithmetic mean of the historical flow sliding variance. This arithmetic mean is then multiplied by a fluctuation coefficient ranging from 1.5 to 3.0 to generate the set dynamic threshold. The nighttime steady-state period is set from 2:00 AM to 4:00 AM, during which user water usage is at its lowest, and the pipe network has basic hydraulic stability. The fluctuation coefficient is introduced to provide tolerance matching for the pipe network baseline background noise, avoiding false triggering caused by environmental noise.

[0037] When the flow slip variance exceeds the set dynamic threshold, the output level of the digital comparator flips, and the peripheral pin corresponding to the flow sensor outputs an over-limit pulse signal. The over-limit pulse signal indicates a transient hydraulic event in the pipeline network and serves as an interrupt source in the underlying hardware circuitry for subsequent high-frequency sampling by the wake-up converter.

[0038] When the flow sensor outputs an out-of-limit pulse signal, if a software interrupt response mechanism based on the CPU kernel is used, the controller needs to execute instructions such as register stack protection, interrupt vector table lookup, and interrupt service routine call. These instruction-level operations introduce clock cycle delays, causing a time deviation between the starting point of subsequent pressure waveform acquisition and the point where the flow anomaly occurs. To control this time deviation, the system employs a direct-connection routing mechanism at the underlying hardware level for trigger control.

[0039] As a functionally generalized technical feature, the routing matrix is ​​specifically implemented in this embodiment as a peripheral interconnect bus network or a trigger selection multiplexer within the controller. The routing matrix provides direct digital signal transmission paths between different hardware peripherals. The controller's configuration unit pre-configures the connection mapping register of the routing matrix, designating the comparator output pin of the flow sensor as the trigger source input node and the injection conversion trigger channel of the converter as the target receiving node. For the specific address assignment of the routing matrix mapping register, those skilled in the art can perform conventional mapping based on the microcontroller's datasheet; the register mapping and multiplexing configuration are well-known technologies in the field and will not be elaborated further here.

[0040] When the flow slip variance exceeds the set dynamic threshold, the flow sensor outputs an over-limit pulse signal in digital form, which is then input to the routing matrix. The routing matrix, based on its pre-defined logic gate connections, transmits this digital level transition edge to the converter's injection conversion trigger channel. This transmission bypasses the controller's central processing unit core and does not execute software instructions. The converter's underlying hardware state machine initiates its workflow upon receiving the transition edge signal. Combined with a reference voltage source in reference voltage dwell mode, the converter drives the analog switch within the sample-and-hold circuit to close. From a hardware circuit principle perspective, the sample-and-hold circuit controls the closing of the analog switch to connect the internal sampling capacitor to the analog voltage signal corresponding to the external pipeline pressure. After a charging process with a resistor-capacitor time constant, the voltage on the sampling capacitor tracks and maintains a potential equal to the input analog voltage, completing the discretization and capture of the analog signal.

[0041] From the underlying physical principles of digital circuit timing, the response time of software interrupts is constrained by the current bus load state of the processor and exhibits fluctuations. By utilizing the hardware connection paths constructed using a routing matrix, the physical time of signal propagation is limited to the transmission delay of internal logic gate circuits. This transmission delay is typically on the nanosecond level, much smaller than the converter's operating clock cycle. This mechanism eliminates software-level delay fluctuations, aligning the occurrence point of pipeline flow fluctuations with the sampling start point of pressure data on the time axis, providing boundary conditions for subsequent synchronous sampling and feature decomposition.

[0042] After the converter receives the over-limit pulse signal, the controller's state machine logic switches from low-frequency monitoring mode to high-frequency burst sampling mode.

[0043] The controller is configured to operate its internal general-purpose timer module in output compare mode. The general-purpose timer module periodically generates trigger events based on a set high-frequency sampling rate. These trigger events are simultaneously routed on the internal bus to the converter's regular conversion trigger input and the flow sensor's sampling enable input, thus achieving dual-channel clock alignment in the underlying hardware logic. The set high-frequency sampling rate is set to a range of 50Hz to 200Hz. From the perspective of sampling control principles, the analog-to-digital conversion process includes sampling, holding, quantization, and encoding stages, which consumes multiple machine clock cycles. If software instructions are used to read data from the two sensors sequentially, the conversion time of the first channel will cause a lag in the sampling start time of the second channel, resulting in a physical time difference at the microsecond level. This time difference will be equivalent to the phase difference between channels in subsequent signal processing. The system distributes trigger signals through the same underlying hardware timer, ensuring that the analog-to-digital conversion actions for pressure and flow are initiated within the same clock cycle. This eliminates the inherent time difference caused by serial software reading and guarantees the correspondence between pipeline pressure and flow data on the time axis at the same moment.

[0044] Before initiating high-frequency sampling, the controller stops running the low-frequency timer in low-frequency monitoring mode. Subsequently, the controller starts the general-purpose timer module and simultaneously opens a set time window. The set time window range is 2 to 5 seconds. This range depends on the physical period from the generation of a typical pipeline water hammer waveform to the initial decay, ensuring coverage of the wavefront data range. Within the set time window, the controller continuously transfers digital data output from the converter and flow sensor to memory via its internal direct memory access controller. For the address auto-increment and peripheral request mapping configuration of the direct memory access controller, those skilled in the art can perform conventional settings based on the microcontroller's datasheet; its memory data transfer control is well-known in the field and will not be elaborated upon here.

[0045] After the set time window expires, the controller shuts down the general-purpose timer module and stops the data acquisition task. At this time, a one-dimensional discrete pressure sequence and a discrete flow sequence are generated in the memory. The controller determines the length of the data sequence based on the set high-frequency sampling rate and the set time window. The formula for calculating the data sequence length is as follows: ; in, The total number of sampling points. For the set high-frequency sampling rate, This is the set time window.

[0046] The generated discrete pressure sequence is labeled as Discrete flow sequences are labeled as .in, It is a discrete pressure sequence. It is a discrete flow sequence. This refers to the discrete sequence index number. The value range satisfies the condition that it is greater than or equal to 1 and less than or equal to the total number of sampling points. .

[0047] After completing the data transfer, the controller sends a power gating command to cut off the power supply to the main conversion core circuit of the converter again. The converter returns to the reference voltage dwell mode, which disconnects the power supply to the main conversion core circuit and maintains the reference voltage source bias current input, and stops processing external analog signals, so that the overall operating power consumption of the water meter system drops back to the standby level.

[0048] The controller reads discrete pressure and flow sequences from memory. From the perspective of fluid mechanics and signal processing principles, the raw sequences acquired by the sensors are composed of a low-frequency DC baseline component and a high-frequency AC fluctuation component. The DC baseline component corresponds to the current static water pressure and steady-state basic flow rate of the pipeline network; the AC fluctuation component corresponds to the hydraulic wavefront or step fluctuation generated when abnormal hydraulic events occur in the pipeline network. If cross-correlation integration is directly performed on the sequences containing the DC baseline component, the DC bias will have a cumulative effect during the integration operation. From the underlying mathematical principles of signal processing, when two finite-length data sequences with DC bias are summed by sliding dot product, the DC component will generate a background baseline in the cross-correlation function that is proportional to the overlap length of the data window. This background baseline is triangular or trapezoidal in shape, and its magnitude can mask the correlation peak changes caused by hydraulic transient fluctuations, leading to a bias in the baseline of the cross-correlation function and obscuring the peak positions. Therefore, the controller calls its internal arithmetic logic unit to perform zero-mean normalization on the raw sequences.

[0049] The controller calculates the average pressure of the discrete pressure sequence based on the data array in the memory. The formula for calculating the average pressure is as follows: ; in, The average pressure. The total number of sampling points. It is a discrete pressure sequence. For discrete sequence index number, discrete sequence index number The value range satisfies the condition that it is greater than or equal to 1 and less than or equal to the total number of sampling points. .

[0050] The controller calculates the high-frequency average flow rate of the discrete flow rate sequence based on the data array in the memory. The formula for calculating the high-frequency average flow rate is as follows: ; in, This is the average high-frequency flow rate. The total number of sampling points. It is a discrete flow sequence. For discrete sequence index number, discrete sequence index number The value range satisfies the condition that it is greater than or equal to 1 and less than or equal to the total number of sampling points. .

[0051] The controller uses its internal arithmetic logic unit to execute vector subtraction instructions, subtracting the average pressure value from each sampling point in the discrete pressure sequence, eliminating the DC pressure baseline, and generating an AC pressure fluctuation sequence. The calculation formula is as follows: ; in, It is a pressure-fluctuation wave sequence. It is a discrete pressure sequence. The average pressure. For discrete sequence index number, discrete sequence index number The value range satisfies the condition that it is greater than or equal to 1 and less than or equal to the total number of sampling points. .

[0052] The controller subtracts the average high-frequency flow rate from each sampling point in the discrete flow rate sequence, eliminating the DC flow baseline and generating an AC flow fluctuation sequence. The calculation formula is as follows: ; in, For flow exchange fluctuation sequence, It is a discrete flow sequence. This is the average high-frequency flow rate. For discrete sequence index number, discrete sequence index number The value range satisfies the condition that it is greater than or equal to 1 and less than or equal to the total number of sampling points. .

[0053] Through the aforementioned zero-mean operation, the mathematical expectations of the reconstructed pressure AC fluctuation sequence and flow AC fluctuation sequence approach zero. The controller stores the generated pressure AC fluctuation sequence and flow AC fluctuation sequence in an independently allocated memory area within the memory, serving as the data basis for subsequent calculations of phase difference and transient impedance. The pointer auto-increment addressing, register reading, and arithmetic logic unit calculation processes during vector subtraction operations within the controller can be configured by those skilled in the art according to the controller chip's instruction set manual. The underlying data handling and numerical calculations are well-known technologies in the field and will not be elaborated upon here.

[0054] The controller reads the pressure and flow rate AC fluctuation sequences from memory. Based on fluid dynamics and signal analysis principles, the pressure and flow sensors in a multi-sensor smart water meter system have a physical installation distance. When hydraulic transients occur in the pipeline, the arrival times of the water hammer wavefront at the two sensors differ, causing a phase difference between the acquired pressure and flow waveforms on the time axis. Discrete cross-correlation is used to evaluate the waveform similarity of the two discrete time sequences at different time shift positions, and the controller uses this to calculate the physical time difference between the pressure and flow rate AC fluctuation sequences.

[0055] The controller utilizes its internal digital signal processing kernel or multiply-accumulate unit to perform sliding point multiplication and summation operations. The specific implementation of the cross-correlation function calculation is as follows: the controller fixes the index of the pressure AC fluctuation sequence in memory, translates the flow AC fluctuation sequence point by point on the time axis, and calculates the sum of the products of corresponding data points of the two sequences at each translation step. From the perspective of signal processing and physical matching principles, when the translation steps cause the flow waveform to slide on the time axis until it completely overlaps with the pressure waveform, the sum of the products of the data points of the two sequences at the corresponding time point reaches its maximum value. At this point, the translation amount numerically cancels out the time difference caused by the wavefront propagation between the two sensors. The core calculation formula for discrete cross-correlation is as follows: ; in, For discrete cross-correlation sequences, The number of translation steps. The total number of sampling points. It is a pressure-fluctuation wave sequence. This is the shifted flow exchange fluctuation sequence. This refers to the discrete sequence index number. The value range satisfies the condition that it is greater than or equal to 1 and less than or equal to the total number of sampling points Translation steps It is an integer, and its value range is set to 1. For the calculation of indexes during the calculation process. Exceeding 1 to For data points within a given range, the controller uses zero-padding for boundary alignment. In the underlying hardware memory access mechanism, when the address index exceeds the pre-allocated array boundary, a direct memory overflow error is triggered, causing program exceptions. By padding the overflow locations with zeros, the pipeline of the multiply-accumulate unit can maintain normal operation. For this type of zero-padding operation of discrete sequences, those skilled in the art can write programs according to standard digital signal processing procedures; the zero-padding strategy is a well-known technique in the field and will not be elaborated upon here.

[0056] After generating the discrete cross-correlation sequence, the controller calls a comparison instruction to traverse the memory array containing the discrete cross-correlation sequence and locate the array index position where the sequence reaches its maximum value. The number of translation steps corresponding to this index position represents the delay state when the two signals overlap in waveform shape, that is, the number of hysteresis translation steps between the pressure AC fluctuation sequence and the flow AC fluctuation sequence.

[0057] The controller calculates the time phase difference based on the extracted hysteresis translation steps and the set high-frequency sampling rate. The formula for calculating the time phase difference is as follows: ; in, For time phase difference, The number of steps for the delayed translation. The set high-frequency sampling rate. Number of hysteresis translation steps. The range of values ​​is Integers within.

[0058] The controller stores the calculated time phase difference in memory. Physically, this time phase difference corresponds to the propagation time delay of the fluid wavefront within the physical distance between the two sensors. To improve the generation speed of the cross-correlation sequence, the controller is configured to use a single-instruction multiple-data extended instruction set when performing the above dot multiplication and summation operation. This allows multiple data multiplication and addition operations to be completed within a single clock cycle, reducing the overall machine cycle count consumed by the processor in running this loop and meeting the data processing requirements of edge devices.

[0059] The controller retrieves the pressure and flow rate AC fluctuation sequences generated by the previous processing from the memory. In transient analysis of fluid dynamics, transient impedance is defined as the ratio of pressure change to flow rate change. If impedance is calculated based on data points at a single moment, local high-frequency reflection noise in the pipeline network will cause numerical jitter in the calculation results. From the perspective of signal processing and the equivalence principle of fluid dynamics, using the root mean square ratio of the discrete-time series over the entire time window as the equivalent impedance can smooth out local noise interference. The autocorrelation function value of the discrete-time series at its zero-hysteresis position (i.e., zero translation steps) is mathematically equal to the sum of the squares of all data points of the series within the time window, and physically characterizes the energy carried by the waveform. By calculating the energy ratio of pressure to flow rate and performing a square root operation, the energy-type transient impedance can be derived.

[0060] The arithmetic logic unit inside the controller performs pressure zero-hysteresis autocorrelation calculation. Specifically, the lower-level feature implementation involves the controller traversing the pressure AC fluctuation sequence, performing a squared operation on each sampling point, and then summing the results. The core calculation formula for the zero-hysteresis pressure autocorrelation function is as follows: ; in, It is a zero-hysteresis pressure autocorrelation function. The total number of sampling points. It is a pressure-fluctuation wave sequence. This refers to the discrete sequence index number. The value range satisfies the condition that it is greater than or equal to 1 and less than or equal to the total number of sampling points. At the physics level, this calculation corresponds to the energy of the transient pressure wave within the sampling time window.

[0061] The controller performs zero-hysteresis autocorrelation calculation of the flow rate using the same mechanism. The controller iterates through the flow rate fluctuation sequence, summing the squares of each sample point. The core formula for the zero-hysteresis flow autocorrelation function is as follows: ; in, The autocorrelation function of zero-hysteresis flow is The total number of sampling points. For flow exchange fluctuation sequence, This refers to the discrete sequence index number. The value range satisfies the condition that it is greater than or equal to 1 and less than or equal to the total number of sampling points. The calculation results characterize the energy of transient flow fluctuations within a time window.

[0062] After acquiring the energy characteristics of pressure and flow, the controller calls its internal floating-point unit to calculate the energy-type transient impedance. The core calculation formula for the energy-type transient impedance is as follows: ; in, It is an energy-type transient impedance. It is a zero-hysteresis pressure autocorrelation function. It is the autocorrelation function of zero-hysteresis flow.

[0063] In the underlying hardware computation mechanism, the square accumulation operation of a large number of data points will result in an expansion of the data bit width. To prevent overflow errors in the accumulation register in the arithmetic logic unit, which could lead to the loss of high-order data truncation, the controller is configured to call a 32-bit or 64-bit wide-bit data register to store the accumulation result when performing autocorrelation operations. This wide-bit data register calling mechanism ensures the accuracy of the underlying numerical values ​​in the energy calculation process. After the calculation is completed, the controller writes the energy-type transient impedance into memory as a characteristic parameter characterizing the current physical state of the pipeline network for subsequent evaluation.

[0064] The controller reads the time phase difference and energy-type transient impedance from memory. Based on the principle of pipeline network physical condition diagnosis, various hydraulic events, such as pipeline leakage and normal valve opening and closing, can cause transient water hammer waves that propagate within the pipeline network. A single impedance parameter has limitations in distinguishing similar hydraulic events. The time phase difference contains information about the propagation and reflection delay of the hydraulic wavefront between spatial nodes, while the energy-type transient impedance reflects the local energy dissipation characteristics at the measuring point. Combining these two parameters in the data structure allows for the establishment of a two-dimensional feature space to differentiate different pipeline network physical conditions.

[0065] Because the time phase difference and energy-type transient impedance have different physical dimensions, their numerical ranges differ. From a data processing principle perspective, directly combining parameters with different dimensions will result in parameters with larger absolute values ​​dominating subsequent distance matching or pattern recognition calculations, masking the physical characteristics of parameters with smaller absolute values. The controller calls its internal floating-point unit to perform normalization mapping on these two parameters.

[0066] The controller reads the reference time phase difference and reference transient impedance from its internal non-volatile storage area. The reference time phase difference and reference transient impedance are determined as follows: during the factory network calibration phase of the water meter system or when the network is in a stable operating period, the controller calculates these parameters multiple times, takes the arithmetic mean, and then stores it in its internal memory. The stable operating period of the network is defined as a quiescent state where the sliding variance of the data outputs from the pressure sensor and flow sensor remains within a set minimum range, indicating no abnormal hydraulic disturbances in the network. The reference time phase difference and reference transient impedance are real numbers greater than zero. The controller divides the current calculated value by the reference value to eliminate dimensional differences and combines them to generate a transient hydraulic feature vector. From the perspective of underlying mathematical mapping principles, dividing the current physical quantity by a reference constant of the same dimension converts the absolute measurement value with physical units into a relative change ratio. This operation generates dimensionless data, uniformly mapping physical quantities distributed across different numerical ranges to a numerical space with a mean of approximately 1, thus avoiding imbalances in feature weights. The core formula for calculating transient hydraulic eigenvectors is as follows: ; in, This is the transient hydraulic eigenvector. For time phase difference, As the reference time phase difference, It is an energy-type transient impedance. The reference transient impedance. Transient hydraulic eigenvector. It is a two-dimensional column vector containing two dimensionless real elements.

[0067] The controller stores the generated transient hydraulic feature vector in a designated address space of the memory. This vector serves as a numerical representation of the current physical state of the pipeline network. The anomaly detection logic within the water meter system performs boundary comparisons, or it is uploaded to an upper-level server via a communication interface. For the structure encapsulation of the feature vector in memory, pointer addressing, and the low-level register operations for pushing data to the peripheral bus, those skilled in the art can configure these based on the microcontroller's datasheet. Memory allocation and data transmission are well-known technologies in the field and will not be elaborated upon here.

[0068] The controller reads the transient hydraulic feature vector from the memory. Based on the preceding processing logic, the transient hydraulic feature vector It contains elements with two dimensionless dimensions. The first element is the normalized time phase difference, defined as a parameter. The second element is the normalized energy-type transient impedance, defined as a parameter. Numerically, this is equivalent to the ratio of energy-type transient impedance to reference transient impedance.

[0069] Analysis of the hydraulic transient mechanism of the pipeline network reveals that both sudden leakage events and user valve opening for water intake physically cause a drop in water pressure within the pipeline. Relying on a single absolute threshold for judgment is prone to false alarms. Jet dissipation caused by pipeline rupture leads to a decrease in the local equivalent impedance of the pipeline, and the rupture point, acting as a new wave source, generates transient pressure waves with an inherent time delay as they propagate towards the sensors at both ends. From the perspective of pattern recognition principles, the physical characteristics of these different types of hydraulic disturbances, after being converted into normalized phase and impedance, will form independently distributed data point clusters in a two-dimensional feature space. Among them, the sample dataset caused by pipeline rupture will converge and aggregate in space, forming a leakage feature region with a central extremum. Combining time and energy characteristics, by measuring the geometric distance between the current coordinates and the center of this clustered region, the leakage pattern can be distinguished from other hydraulic disturbances in the two-dimensional feature space.

[0070] The controller reads the centroid coordinates and weighting coefficients of the leakage feature stored in its internal non-volatile memory area. The controller's internal arithmetic logic unit then calls floating-point instructions to calculate the current transient hydraulic feature vector. The weighted Euclidean distance between the centroid of the leakage feature and the centroid. The core formula for distance calculation is as follows: ; in, The distance is the characteristic distance of leakage. To normalize the time phase difference, For normalized energy-type transient impedance, This is the theoretical leakage phase center value. This is the theoretical center value of leakage impedance. The phase feature weighting coefficient, This is the impedance characteristic weighting coefficient. Theoretical leakage phase center value. and the theoretical leakage impedance center value All are real numbers greater than zero. Phase feature weighting coefficients and impedance characteristic weighting coefficient A floating-point number greater than zero, where the sum of the two is equal to 1. The specific values ​​of the above parameters are determined during the equipment's factory calibration phase by analyzing sample data from simulated leakage events in a standard experimental pipeline network. The mean space clustering analysis was used to derive the results, which were then stored in the controller's internal memory.

[0071] The controller executes a comparison command and calculates the leakage characteristic distance. The set identification threshold Perform size comparison. Identification threshold. A floating-point constant set in memory within the range of 0.1 to 0.5 is used; its physical meaning is the tolerance radius of the decision boundary within the feature space. Discrimination threshold. The specific value is determined by the confidence interval boundary of the point cloud distribution of leakage data in the historical experimental pipeline network, which is used to strike a balance between reducing false alarms from background noise and avoiding underreporting of minor leakage events.

[0072] When the leakage characteristic distance Less than or equal to the discrimination threshold When the current hydraulic state of the pipeline falls within the cluster boundary of the leakage characteristics, the controller determines that a leakage event has occurred, generates a Boolean-type leakage alarm status code, and sets the abnormal flag of the internal diagnostic state machine. When the leakage characteristics are far from the cluster boundary... Greater than the discrimination threshold If the current fluctuation is caused by user water usage or pump station pressure regulation, and the feature vector does not fall within the leakage detection area, the controller determines that the pipeline network is in a non-leakage state and maintains the standby process. For the configuration of the arithmetic square root calculation of floating-point instructions and the register assignment operation of the alarm status code, those skilled in the art can configure them according to the microcontroller chip instruction set manual. The rewriting of the underlying state machine flag bits is a well-known technique in this field and will not be elaborated upon here.

[0073] The controller reads the leakage alarm status code generated by the preceding judgment logic. When the leakage alarm status code indicates a leakage event in the pipeline network, the controller initiates the communication reporting process. In narrowband IoT communication architectures, smart water meters are typically battery-powered and rely on narrowband communication networks to upload data. The discrete pressure and flow sequences generated during the high-frequency burst sampling phase contain thousands of continuous numerical nodes. If the original sequences are directly uploaded to a remote platform, radio frequency transmission delays and energy consumption will occur due to communication bandwidth limitations. From the perspective of signal processing and information compression principles, the preceding mapping and distance calculations transform high-dimensional time series data into transient hydraulic feature vectors containing two dimensionless parameters. This dimensionality reduction transformation from high-frequency discrete curves to two-dimensional feature points directly reduces the continuous on-time of the radio frequency transmission module, which meets the energy constraints of battery-powered water meter systems.

[0074] The controller utilizes its internal direct memory access controller to move the required data fields from different memory addresses to the transmit buffer, performing data frame splicing and assembly. The specific lower-level characteristics of the splicing are implemented as follows: the controller writes a wake-up byte and frame header identifier to the starting address of the transmit buffer; and sequentially writes the device's globally unique identifier, current timestamp, leakage alarm status code, and parameters contained in the transient hydraulic feature vector to the payload area. and parameters .parameter To normalize the time phase difference, the parameters This is the normalized energy-type transient impedance. At the end of the data frame, the controller calls the hardware cyclic redundancy check (CRC) calculation unit to generate a checksum and appends it to the end. This assembly process generates a fixed-length data packet. The controller drives the external or internally integrated RF communication interface to send the packaged data frame to the upper-layer platform.

[0075] After transmission is complete, the controller performs a system environment and internal state reset. From a memory management perspective, the controller needs to release the buffer areas in memory used to store various transitional data such as discrete pressure sequences, discrete flow sequences, discrete cross-correlation sequences, and pressure AC fluctuation sequences. In the underlying microcontroller operation, the controller does not need to perform byte-by-byte clearing of the aforementioned memory areas; it only needs to reset the write pointer of the relevant data array to the pre-allocated memory base address, allowing subsequent new high-frequency sampling data to directly overwrite the old data, reducing the CPU's memory erasure time. At the hardware state machine reset level, the controller writes a clear instruction to the interrupt controller, clearing the over-limit interrupt pending flag generated by the hardware comparator. This operation prevents erroneous interrupt nesting or repeated sampling triggered by residual interrupt flags after the system returns to standby.

[0076] The controller reconfigures and starts the low-frequency timer in low-frequency monitoring mode, resuming low-speed polling monitoring of the pipeline static pressure. The controller's internal state machine logic switches from high-frequency burst sampling mode back to low-frequency monitoring mode. At this time, the controller enters standby mode, waiting for the next over-limit pulse signal triggered by the hardware comparator. For the configuration of the underlying registers of the RF communication interface, the modulation and demodulation protocol processing, and the calculation and configuration of the hardware cyclic redundancy check, those skilled in the art can operate according to the corresponding communication protocol stack and microcontroller datasheet. The communication networking and hardware verification are well-known technologies in this field and will not be elaborated upon here.

[0077] Specific application examples: To verify the performance of the multi-sensor smart water meter system and method for pipeline leakage early warning according to the embodiments of the present invention, an equivalent standard experimental pipeline network was constructed for comparative testing. The experimental pipeline network used DN100 ductile iron pipes, with a total pipeline length of 100 meters, and the static water pressure was maintained at 0.35MPa. The experimental process included benchmark voltage dwell and hardware routing response testing, feature extraction algorithm verification, and leakage state pattern recognition testing.

[0078] Hardware-level low-latency response test: High-frequency transient data of water hammer wavefronts in pipeline networks are useful for leak diagnosis. The experiment simulated the hydraulic transients caused by a sudden leak (pipe rupture) at the end of a pipeline.

[0079] The existing technology group uses a traditional microcontroller architecture, namely: After the central processing unit calculates that the flow sliding variance exceeds the threshold in the software loop, it triggers a software interrupt and then wakes up the analog-to-digital converter (ADC cold start time exists).

[0080] The present invention adopts the mechanism described in the embodiments, namely: The system calculates the flow sliding variance. Once the threshold value exceeds the set dynamic threshold, the underlying hardware link is triggered using the internal routing matrix. Combined with the converter's reference voltage dwell mode, this enables data acquisition to be initiated without software instruction intervention.

[0081] Please see the appendix Figure 3 In the figure, the horizontal axis “1” represents the traditional software interrupt scheme, and “2” represents the hardware routing scheme of the present invention.

[0082] As shown in the figure, the traditional solution corresponding to the horizontal axis 1 is limited by software stacking, interrupt vector jump and the charging time delay of the external bypass capacitor of the ADC, with a total response time of about 125 microseconds, resulting in the loss of about 6 to 8 high-frequency sampling points at the forefront of the wavefront. The solution of the present invention corresponding to the horizontal axis 2 has a response delay that depends only on the conduction of the internal logic gates and the closing of the sample-and-hold circuit, with a total response time of about 2.5 microseconds, which realizes the data capture of the transient wavefront of the pipeline network.

[0083] Cross-correlation algorithm and phase difference extraction verification in capturing high-frequency discrete pressure sequences and discrete flow sequences Then, the controller performs the aforementioned zero-means operation to generate a pressure AC fluctuation sequence. Fluctuation sequence with flow If zero-mean normalization is not performed, the DC bias will produce a trapezoidal background baseline in subsequent integrations, masking the true peak value.

[0084] Please see the appendix Figure 4 The controller executes the formula The calculation results are then transformed into normalized amplitudes as shown in the graph. It can be observed in the graph that when the number of translation steps... When moving near zero, the cross-correlation sequence curve produces a peak. The controller locks this maximum value by traversing the array and extracts the corresponding hysteresis shift step number. As shown in the figure, the cross-correlation peaks marked by circles and the corresponding positions indicated by the downward vertical dashed lines indicate the number of lag steps extracted in this experiment. .

[0085] Experiments have shown that the number of hysteresis steps corresponding to the peak value reflects the physical delay of the water hammer wave propagation between the pressure sensor and the flow sensor. The underlying operation based on Single Instruction Multiple Data Stream (SIMD) avoids the time positioning error caused by noise glitches.

[0086] To address the issue of easily confusing leakage events with normal valve opening for water intake in complex pipe networks, two-dimensional feature reduction and leakage identification verification were implemented. The controller calculated the energy-type transient impedance under both operating conditions. Phase difference with time It is then normalized into a dimensionless transient hydraulic characteristic vector. , respectively corresponding to parameters and The pre-calibrated centroid coordinates of the leakage characteristics of the experimental pipeline network are: The set identification threshold Set to 0.30.

[0087] Please see the appendix Figure 5 In the figure, the horizontal axis "1" represents a pipe rupture and leakage event, "2" represents a normal water use (valve opening) event, and the horizontal dotted line in the figure represents the set identification threshold of 0.30.

[0088] For pipeline rupture and leakage events (i.e., the dark bar corresponding to x-axis 1), due to their central extreme value distribution characteristics, the leakage characteristic distance is calculated according to the formula. If the value is 0.12, which is less than the identification threshold of 0.30, the system will determine and output a leakage alarm status code.

[0089] Correspondingly, for a normal valve opening water intake event (i.e., the light-colored column corresponding to x-axis 2), the calculated leakage characteristic distance is different due to the different distribution of its leakage boundary and dissipated energy. The value was 0.58, which is greater than the discrimination threshold, so the system filtered it out, avoiding false alarms caused by background water noise. This experiment demonstrates the robustness of the present invention in low-level feature extraction and lightweight Euclidean distance dimensionality reduction recognition.

Claims

1. A multi-sensor smart water meter system for early warning of pipeline leakage, characterized in that, Includes a controller, pressure sensor, flow sensor, and communicator; The controller includes a memory and is connected to the pressure sensor, flow sensor, and communicator respectively. The controller wakes up the flow sensor at a low frequency sampling rate to collect flow sampling points and store them in the memory, and calculates the flow sliding variance. When the flow rate sliding variance is greater than the dynamic threshold, the flow sensor outputs an over-limit pulse signal; The over-limit pulse signal triggers the controller to synchronously drive the pressure sensor and flow sensor to collect data at a high-frequency sampling rate, generating discrete pressure sequences and discrete flow sequences; The controller extracts the time phase difference and energy-type transient impedance based on the discrete pressure sequence and discrete flow sequence, matches the two with the judgment rule, and outputs the pipeline status identification result. When leakage is indicated, it sends a dimension-reduced feature data packet through the communicator.

2. The multi-sensor smart water meter system for early warning of pipeline leakage according to claim 1, characterized in that, The controller calculates the flow sliding variance and generates the dynamic threshold, specifically including: The controller allocates a contiguous memory address space in the memory to construct a circular buffer, and continuously writes the traffic sampling points into the circular buffer to maintain a sliding time window; Calculate the mean flow rate within the sliding time window, and use the mean flow rate and each of the flow rate sampling points to further calculate the flow rate sliding variance; The controller calculates the arithmetic mean of the historical data of the flow sliding variance within the set nighttime steady-state period, and multiplies the arithmetic mean by a floating coefficient in the range of 1.5 to 3.0 to generate the dynamic threshold.

3. The multi-sensor smart water meter system for early warning of pipeline leakage according to claim 1, characterized in that, The pressure sensor has an embedded converter, and the controller integrates a routing matrix. The over-limit pulse signal triggers the controller to synchronously drive the pressure sensor and the flow sensor, specifically including: The over-limit pulse signal triggers the converter through the routing matrix; The controller sets the general-purpose timer module inside the controller to operate in output comparison mode, and the general-purpose timer module periodically generates trigger events based on the high-frequency sampling rate; The trigger event is simultaneously routed on the internal bus to the normal conversion trigger input of the converter and the sampling enable input of the flow sensor, controlling the analog-to-digital conversion of the pressure sensor and the flow sensor to start within the same clock cycle.

4. A multi-sensor smart water meter system for early warning of pipeline leakage according to claim 3, characterized in that, The converter includes a reference voltage source; When the controller wakes up the flow sensor according to the low-frequency sampling rate, the controller sends a power gating command to the converter to cut off the power supply path of the main conversion core circuit inside the converter and maintain the static bias current input to the reference voltage source. The reference voltage source outputs an analog reference voltage under the drive of the static bias current, and performs closed-loop charging and steady-state voltage maintenance on the bypass holding capacitor connected externally to the converter.

5. A multi-sensor smart water meter system for early warning of pipeline leakage according to claim 3, characterized in that, The converter also includes a sample-and-hold circuit; The input of the routing matrix is ​​mapped to the comparator output pin of the flow sensor, and the output of the routing matrix is ​​connected to the injection conversion trigger channel of the converter. The over-limit pulse signal triggers the converter through the routing matrix, specifically including: The over-limit pulse signal is input to the routing matrix in digital level form; The routing matrix, based on an internally pre-set connection mapping register, bypasses the central processing unit core of the controller and transmits the transition edge of the over-limit pulse signal to the injection conversion trigger channel of the converter. Upon receiving the transition edge, the converter drives the analog switch in the sample-and-hold circuit to close.

6. A multi-sensor smart water meter system for early warning of pipeline leakage according to claim 1, characterized in that, The controller extracts the time phase difference and the energy-type transient impedance based on the discrete pressure sequence and the discrete flow sequence, specifically including: Calculate the average pressure value of the discrete pressure sequence and the average high-frequency flow rate value of the discrete flow rate sequence, respectively. The DC pressure baseline is removed by subtracting the average pressure value from each sampling point in the discrete pressure sequence to generate an AC pressure fluctuation sequence. The DC flow baseline is removed by subtracting each sampling point in the discrete flow sequence from the mean high-frequency flow, and an AC flow fluctuation sequence is generated. The controller uses the pressure AC fluctuation sequence and the flow AC fluctuation sequence as the parameter basis for extracting the time phase difference and the energy-type transient impedance.

7. A multi-sensor smart water meter system for early warning of pipeline leakage according to claim 6, characterized in that, The controller extracts the time phase difference based on the pressure AC fluctuation sequence and the flow AC fluctuation sequence, specifically including: The controller fixes the index of the pressure AC fluctuation sequence, shifts the flow AC fluctuation sequence point by point on the time axis, and performs zero-padding operation on data points that exceed the index limit after shifting. And at each translation step, the sum of the products of the pressure AC fluctuation sequence and the corresponding data points of the translated flow AC fluctuation sequence is calculated to generate a discrete cross-correlation sequence; Traverse the memory array containing the discrete cross-correlation sequence, locate the array index position where the discrete cross-correlation sequence reaches its maximum value, and extract the corresponding hysteresis shift step; The time phase difference is calculated based on the extracted number of hysteresis translation steps and the high-frequency sampling rate.

8. A multi-sensor smart water meter system for early warning of pipeline leakage according to claim 6, characterized in that, The controller extracts the energy-type transient impedance based on the pressure AC fluctuation sequence and the flow AC fluctuation sequence, specifically including: The controller performs a square operation on each sampling point of the pressure AC fluctuation sequence and then sums the results to obtain a zero-hysteresis pressure autocorrelation function. The zero-hysteresis flow autocorrelation function is obtained by squaring and summing the squares of each sampling point in the flow fluctuation sequence. Calculate the ratio of the zero-hysteresis pressure autocorrelation function to the zero-hysteresis flow autocorrelation function, and perform a square root operation on the ratio. Use the result of the square root operation as the energy-type transient impedance.

9. A multi-sensor smart water meter system for early warning of pipeline leakage according to claim 1, characterized in that, The controller matches the time phase difference and the energy-type transient impedance with the judgment rules and outputs the pipeline state identification result, specifically including: The controller acquires the pre-stored reference time phase difference and reference transient impedance; The normalized time phase difference is obtained by dividing the time phase difference by the reference time phase difference, and the normalized energy transient impedance is obtained by dividing the energy transient impedance by the reference transient impedance. The normalized time phase difference is combined with the normalized energy-type transient impedance to generate a transient hydraulic feature vector; Based on the set phase characteristic weighting coefficient and impedance characteristic weighting coefficient, the weighted Euclidean distance between the transient hydraulic characteristic vector and the pre-stored leakage characteristic centroid is calculated, and the weighted Euclidean distance is used as the leakage characteristic distance; When the distance of the leakage feature is less than or equal to the set identification threshold, a leakage event is determined to have occurred in the pipeline network, and a Boolean type leakage alarm status code is generated. The set identification threshold is a floating-point constant in the range of 0.1 to 0.

5.

10. A multi-sensor smart water meter system for early warning of pipeline leakage according to claim 9, characterized in that, When the pipeline status identification result indicates leakage, a dimensionality-reduced feature data packet is sent through the communicator, specifically including: The controller writes the wake-up byte and frame header identifier to the starting address of its internal transmit buffer; The device's globally unique identifier, current timestamp, leakage alarm status code, normalized time phase difference, and normalized energy transient impedance are sequentially written into the effective load area. The hardware cyclic redundancy check calculation unit is called to generate a check code and append it to the end. The assembly process generates a fixed-length dimensionality reduction feature data packet, which is then sent through the communicator. After transmission is completed, the controller resets the write pointers corresponding to the discrete pressure sequence and discrete flow sequence allocated in the memory to the pre-allocated base address, writes a clear instruction to the interrupt controller to clear the over-limit interrupt suspension flag triggered by the over-limit pulse signal, and resets and starts the low-frequency timer in the low-frequency monitoring mode to resume low-speed polling monitoring of the pipeline static pressure.