A water meter detection process automation control method
By collecting multi-source signals from inside the water meter and performing time-frequency domain analysis, the expected error value can be predicted in real time, and personalized or adaptive detection commands can be generated. This solves the systematic error problem caused by high pressure in traditional water meter detection and improves the accuracy and flexibility of flow detection.
Patent Information
- Application Number
- CN202511648637.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-11-12
AI Technical Summary
Traditional water meter testing methods cause internal micro-elastic deformation under high pressure, resulting in unavoidable systematic errors that affect the accuracy and reliability of flow measurement.
The system collects multi-source physical signals of the water meter's internal structure after pressure is released, performs joint time-frequency domain analysis, extracts multi-dimensional feature vectors, and inputs them into a pre-trained stress-flow coupled dynamic model to predict expected error values in real time, generate personalized or adaptive detection instruction sets, and optimize the flow detection process.
It improves the accuracy and reliability of flow detection, enhances the flexibility and efficiency of the detection process, and adapts to the actual stress state of the water meter through real-time data analysis and personalized processing, thereby reducing systematic errors.
Smart Images

Figure CN121113236B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent detection and automatic control, and particularly relates to a water meter detection process automatic control method. BACKGROUND
[0002] In the production, installation and use of water meters, it is very important to ensure their accuracy and reliability. Traditionally, the detection of water meters mainly relies on methods such as sealing pressure test and flow detection to evaluate their performance. However, with the increasing demand for precision and the development of technology, the traditional detection methods gradually reveal their limitations, especially in dealing with potential errors caused by internal stress.
[0003] The prior art has the following disadvantages:
[0004] In the existing automatic detection process of water meters, a constant high pressure static pressure needs to be applied to the water meter and the pipeline system in the sealing test stage to ensure no leakage. However, the high pressure environment will inevitably cause microscopic elastic deformation of the internal precision mechanical structure of the water meter. This deformation includes: main shaft micro-bending, bearing clearance change, gear tooth profile deflection and micro-expansion of the shell cavity. Although the pressure reading can remain stable during the static pressure maintaining process, thereby determining the sealing qualification, the change of the mechanical state actually hides systematic error risks for subsequent flow measurement detection. SUMMARY
[0005] The purpose of the present application is to provide a water meter detection process automatic control method to solve the problems in the above background.
[0006] The purpose of the present application can be achieved by the following technical solutions:
[0007] A water meter detection process automatic control method, S1: after completing the sealing pressure test of the water meter, collecting multi-source physical signals generated by the internal structure of the water meter after pressure removal, including acoustic emission signals, vibration signals and temperature signals;
[0008] S2: performing time-frequency domain joint analysis on the multi-source physical signals, extracting a multi-dimensional feature vector representing the internal mechanical stress release process of the water meter, the multi-dimensional feature vector including time domain features, frequency domain features and nonlinear dynamics features;
[0009] S3: inputting the multi-dimensional feature vector into a pre-trained stress-flow coupling dynamics model to real-time predict the expected error value that the current water meter will produce in the subsequent flow detection due to stress residue;
[0010] S4: judging whether the expected error value exceeds the compensation range allowed by the flow detection procedure:
[0011] If the flow rate is not exceeded, a personalized flow detection instruction set is generated. The personalized flow detection instruction set includes detection parameters of the current water meter status, including: initial flow value, flow rate change rate, stabilization time threshold, and data acquisition frequency.
[0012] If the pressure exceeds the limit, an adaptive pressure control command is generated to adjust the working pressure in the detection pipeline, execute a targeted secondary pressure loading and unloading cycle, and then return to S1.
[0013] S5: When the expected error value does not exceed the allowable compensation range, the flow generation device is driven to perform a flow accuracy detection process that matches the current state of the water meter based on the personalized flow detection instruction set.
[0014] As a further aspect of the present invention: the process of obtaining the time-domain features is as follows:
[0015] Empirical mode decomposition is used to preprocess the acoustic emission signal and vibration signal to obtain several intrinsic mode functions; the energy entropy and skewness coefficient of each intrinsic mode function are calculated as signal envelope features; dual-tree complex wavelet transform is performed on the temperature signal to extract the statistical moment features of the approximation coefficients and detail coefficients; the time-domain features include: signal envelope features and statistical moment features.
[0016] As a further aspect of the present invention: the process of obtaining the frequency domain features is as follows:
[0017] The acoustic emission signal is analyzed using an adaptive optimal kernel time-frequency distribution method to extract ridge features and energy concentration indices in the time-frequency plane. Harmonic wavelet packet transform is applied to the vibration signal to calculate the wavelet entropy and band energy ratio of each frequency band. The temperature signal is processed using cepstral analysis to extract the main peak amplitude and peak position shift in the cepstral frequency domain. The frequency domain features include: ridge features, wavelet entropy, band energy ratio, main peak amplitude, and peak position shift.
[0018] As a further aspect of the present invention: the process for obtaining the nonlinear dynamic characteristics is as follows:
[0019] Acoustic emission signals are processed using recursive quantitative analysis techniques to calculate the length distribution of diagonal structures and the quantitative characteristics of vertical structures in the recursive graph. Multi-scale permutation entropy analysis is applied to vibration signals to extract permutation entropy values at time scales from 1 to 8. A chaotic feature extraction algorithm is used to analyze temperature signals, calculating the correlation dimension and Kolmogorov entropy. The nonlinear dynamic characteristics include: quantitative characteristics, permutation entropy values, correlation dimension, and Kolmogorov entropy.
[0020] As a further aspect of the present invention: the construction process of the stress-flow coupled dynamic model is as follows:
[0021] A large number of multi-dimensional feature vectors of water meters under various pressure conditions were collected as training samples, and the actual error values of the corresponding water meters in flow detection were recorded as labels. A nonlinear mapping relationship between feature vectors and error values was established through layer-by-layer pre-training and global fine-tuning. The network parameters were optimized using an adaptive moment estimation algorithm, and finally a stress-flow coupled dynamic model that can accurately reflect the intrinsic relationship between stress state and flow error was obtained. The input of the stress-flow coupled dynamic model is a multi-dimensional feature vector, and the output is the expected error value.
[0022] As a further aspect of the present invention: the prediction of the expected error value that the current water meter will generate in subsequent flow detection due to residual stress specifically includes:
[0023] The multi-dimensional feature vectors collected in real time are standardized and preprocessed to eliminate the influence of dimensions; the processed multi-dimensional feature vectors are input into the trained stress-flow coupled dynamic model, and preliminary prediction results are obtained through forward propagation calculation; the prediction results of multiple consecutive time points are fused and the expected error value is output.
[0024] As a further aspect of the present invention: the generation process of the personalized traffic detection instruction set includes:
[0025] Based on the magnitude and distribution characteristics of the expected error value, fuzzy inference is used to determine the initial flow rate; the flow rate change rate is adaptively adjusted according to the stress release degree of the internal structure of the water meter; the stable time threshold of each flow point is intelligently set using historical detection data; and the data acquisition frequency is optimized in real time based on the signal-to-noise ratio analysis results.
[0026] As a further aspect of the present invention: the generation process of the adaptive pressure control command is as follows:
[0027] The amplitude of the secondary pressure loading is determined based on the degree to which the expected error value exceeds the range; the pressure loading rate and holding time are dynamically calculated based on the changing trend of multi-dimensional feature vectors, and the shape of the unloading curve is optimized; the pressure control parameters are adjusted by real-time monitoring of the stress release status.
[0028] As a further aspect of the present invention: the flow generation device driven by the personalized flow detection instruction set to perform flow accuracy detection matching the current state of the water meter specifically includes:
[0029] Based on the initial flow value in the personalized flow detection instruction set, the opening of the electric regulating valve is adjusted; according to the flow change rate requirements, the flow smoothly transitions to each target flow point through gradient control; based on the stable time threshold, data acquisition is started after confirming that the flow is stable; the measurement process is optimized according to the data acquisition frequency setting; and finally, a dynamic detection curve that perfectly matches the actual stress state of the water meter is generated.
[0030] The beneficial effects of this invention are:
[0031] (1) By collecting multi-source physical signals (such as acoustic emission signals, vibration signals, and temperature signals) after completing the sealing pressure test and performing joint time-frequency domain analysis, multi-dimensional feature vectors characterizing the mechanical stress release process inside the water meter can be extracted. These feature vectors are further input into a pre-trained stress-flow coupled dynamic model to predict in real time the expected error value that the current water meter may produce in subsequent flow detection due to residual stress. This method not only considers the traditional time and frequency characteristics but also combines nonlinear dynamic characteristics, thereby providing a more comprehensive stress state assessment and improving the accuracy and reliability of flow detection.
[0032] (2) Based on whether the expected error value exceeds the allowable range of the regulations, the system can intelligently generate a personalized flow detection instruction set or an adaptive pressure control instruction. For cases within the error range, parameters such as the initial flow value, flow change rate, stabilization time threshold, and data acquisition frequency are adjusted to make the flow detection process more closely match the actual stress state of the water meter. For cases exceeding the error range, the stress distribution of the water meter is optimized by adjusting the secondary pressure loading and unloading cycle, ensuring that subsequent flow detection can be performed in a better state. This approach, based on real-time data analysis and personalized processing, enhances the flexibility and efficiency of the detection process. Attached Figure Description
[0033] The invention will now be further described with reference to the accompanying drawings.
[0034] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0035] The technical solutions of 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.
[0036] Please see Figure 1 As shown, this invention is an automated control method for a water meter detection process, comprising the following steps:
[0037] S1: After completing the sealing pressure test of the water meter, collect multi-source physical signals generated by the internal structure of the water meter after the pressure is released, including acoustic emission signals, vibration signals and temperature signals.
[0038] S2: Perform joint time-frequency domain analysis on multi-source physical signals to extract multi-dimensional feature vectors characterizing the mechanical stress release process inside the water meter. The multi-dimensional feature vectors include time-domain features, frequency-domain features, and nonlinear dynamic features.
[0039] S3: Input the multi-dimensional feature vector into the pre-trained stress-flow coupled dynamic model to predict in real time the expected error value that the current water meter will generate in subsequent flow detection due to residual stress.
[0040] S4: Determine whether the expected error value exceeds the compensation range allowed by the flow detection procedure:
[0041] If the flow rate is not exceeded, a personalized flow detection instruction set is generated. The personalized flow detection instruction set includes detection parameters of the current water meter status, including: initial flow value, flow rate change rate, stabilization time threshold, and data acquisition frequency.
[0042] If the pressure exceeds the limit, an adaptive pressure control command is generated to adjust the working pressure in the detection pipeline, execute a targeted secondary pressure loading and unloading cycle, and then return to S1.
[0043] S5: When the expected error value does not exceed the allowable compensation range, the flow generation device is driven to perform a flow accuracy detection process that matches the current state of the water meter based on the personalized flow detection instruction set.
[0044] In S1, after completing the water meter's sealing pressure test, multi-source physical signals generated by the water meter's internal structure after the pressure is released are collected, including acoustic emission signals, vibration signals, and temperature signals, specifically including:
[0045] First, the system activates a multimodal sensor array installed at specific locations on the water meter casing. This array includes three dedicated sensors: an acoustic emission sensor installed in the transmission gearbox area of the casing to collect elastic wave signals generated by stress release within the material; a vibration sensor installed at the water inlet end of the casing to monitor mechanical vibrations generated by the internal mechanical structure of the water meter during stress redistribution; and a temperature sensor installed in the middle of the outer wall of the casing to monitor temperature changes during stress release. The installation positions of all sensors have been optimized using finite element analysis to ensure effective capture of the corresponding physical signals.
[0046] Acoustic emission signals were acquired using a resonant acoustic emission sensor with a center frequency of 150 kHz and a frequency response range of 50 kHz to 400 kHz. During signal acquisition, the sensor was fixed to the water meter housing surface using a magnetic chuck, and a specialized silicone grease was used as the coupling agent to ensure acoustic coupling quality. The acoustic emission signal acquisition settings were as follows: sampling rate of 2 MHz, sampling accuracy of 16 bits, preamplifier gain of 40 dB, and a 100 kHz to 500 kHz bandpass filter. The signal amplitude was monitored in real time during acquisition, and data recording was initiated when the signal amplitude exceeded a preset threshold.
[0047] Vibration signals were acquired using a triaxial integrated circuit piezoelectric vibration sensor with a measurement range of ±50 grams and a frequency response range of 0.5–5000 Hz. The sensor was fixed to the water meter housing via a threaded connection to ensure the rigidity of the mechanical connection. The vibration signal acquisition settings were as follows: sampling rate of 20 kHz, sampling accuracy of 24 bits, and anti-aliasing filter cutoff frequency of 10 kHz. Vibration data along three axes were recorded simultaneously during the acquisition process, and the data for each axis were preprocessed separately.
[0048] Temperature signals are acquired using a platinum resistance temperature sensor with a measurement range of 0-100 degrees Celsius and an accuracy class of A. The sensor is attached to the surface of the water meter housing using thermally conductive adhesive, and an external heat insulation cover is added to reduce ambient temperature interference. The temperature signal acquisition settings are as follows: sampling rate set to 10 Hz, sampling accuracy to 16 bits, software filtering using a first-order low-pass filter, and cutoff frequency set to 1 Hz. The rate of temperature change is monitored in real time during acquisition, and the sampling strategy is automatically adjusted when the temperature change exceeds the set range.
[0049] During data acquisition, the system employs a synchronous acquisition card to ensure the timing consistency of multi-source signals. The acquisition card is equipped with multiple independent analog input channels, each with its own independent analog-to-digital converter. All channels use a common sampling clock to ensure accurate relative time relationships between different signals. Before acquisition begins, the system executes a self-calibration procedure to automatically correct the gain and offset of each channel.
[0050] The signal acquisition duration is dynamically determined based on the water meter specifications and test pressure value. The basic acquisition duration is set to 180 seconds after pressure is released, with a minimum acquisition duration of 120 seconds and a maximum acquisition duration of 300 seconds. Signal quality is monitored in real time during acquisition, and the acquisition time is automatically extended when the signal-to-noise ratio falls below a set threshold. All acquired data is timestamped and includes test condition identifiers, and is stored in real-time in binary format on a high-speed solid-state drive.
[0051] In S2, a joint time-frequency domain analysis is performed on the multi-source physical signals to extract a multi-dimensional feature vector characterizing the mechanical stress release process inside the water meter. This multi-dimensional feature vector includes time-domain features, frequency-domain features, and nonlinear dynamic features, specifically including:
[0052] The extraction of time-domain features begins with empirical mode decomposition (EMD) of the acoustic emission and vibration signals. EMD is an adaptive signal processing method suitable for handling non-stationary and nonlinear signals. The specific implementation process is as follows: First, all local extrema of the signal are identified, including maxima and minima. Then, the upper and lower envelopes are fitted using cubic spline interpolation. The average value of the upper and lower envelopes is calculated and subtracted from the original signal. This process is repeated until the obtained signal satisfies the conditions for intrinsic mode functions (IMFs), i.e., the number of extrema is equal to or differs by at most one from the number of zero-crossings, and the upper and lower envelopes are symmetric about the zero mean. For each IMF obtained, its energy entropy and skewness coefficient are calculated. The energy entropy is calculated as follows: First, the energy value of each IMF is calculated, i.e., the sum of squares of the signal sample values. Then, the proportion of energy of each IMF to the total energy is calculated. Finally, the Shannon entropy values of these proportions are calculated. The skewness coefficient is calculated as follows: the ratio of the third central moment of the signal to the cube of the standard deviation is calculated. The third central moment is the average of the cube of the difference between the signal sample value and the mean, and the standard deviation is the square root of the average of the squares of the difference between the signal sample value and the mean.
[0053] For the temperature signal, a dual-tree complex wavelet transform is used for processing. The dual-tree complex wavelet transform is an improved wavelet analysis method that better preserves the phase information of the signal and reduces frequency aliasing. The processing includes: first, multi-scale decomposition of the temperature signal; then, two sets of parallel real wavelet filter banks are used to process the real and imaginary parts of the signal respectively, obtaining approximation coefficients and detail coefficients. The approximation coefficients represent the low-frequency components of the signal, and the detail coefficients represent the high-frequency components. Statistical moment characteristics are calculated for these coefficients, including mean, variance, skewness, and kurtosis. The mean is calculated as the arithmetic mean of all coefficient values; the variance is the average of the squares of the differences between the coefficient values and the mean; the skewness is the ratio of the average of the cube of the differences between the coefficient values and the mean to the cube of the standard deviation; and the kurtosis is the ratio of the average of the fourth power of the differences between the coefficient values and the mean to the fourth power of the standard deviation, minus 3.
[0054] The extraction of frequency domain features begins with the analysis of the acoustic emission signal using an adaptive optimal kernel time-frequency distribution method. This method obtains a distribution map with high time-frequency resolution by optimizing the form of the kernel function. The specific implementation process includes: first, calculating the ambiguity function of the signal, i.e., the squared modulus of the short-time Fourier transform; then, designing an adaptive kernel function that maximizes the preservation of the signal's self-terms while suppressing cross-terms within the ambiguity function domain; finally, obtaining the time-frequency distribution by performing a two-dimensional inverse Fourier transform on the product of the ambiguity function and the kernel function. In the obtained time-frequency plane, ridge features and energy concentration indices are extracted. Ridge features are obtained by finding the maximum energy point at each time point in the time-frequency plane and connecting these points to form a trajectory; the energy concentration index is the ratio of the energy value on the ridge to the total energy value.
[0055] The vibration signal is processed using harmonic wavelet packet transform. Harmonic wavelet packet transform possesses strict frequency band division characteristics and zero phase distortion characteristics. The processing steps include: first, decomposing the vibration signal into multiple frequency bands, each corresponding to a specific frequency range; then, calculating the wavelet entropy and band energy ratio for each frequency band. The wavelet entropy calculation process is as follows: first, calculating the wavelet coefficient energy of each frequency band, i.e., the sum of squares of the coefficient values; then, calculating the proportion of energy in each frequency band to the total energy; finally, calculating the Shannon entropy values of these proportions. The band energy ratio is the ratio of the energy value of a specific frequency band to the total energy value.
[0056] Cepstral analysis was applied to the temperature signal. Cepstral analysis is a technique that converts a frequency-domain signal into its inverse frequency domain, highlighting periodic components in the spectrum. The process includes: first, performing a Fourier transform on the temperature signal to obtain the power spectrum; then, taking the logarithm of the power spectrum; finally, performing an inverse Fourier transform on the logarithmized power spectrum to obtain the cepstral. In the inverse frequency domain, the amplitude of the main peak and the peak position offset were extracted. The amplitude of the main peak is the height of the largest peak in the cepstral; the peak position offset is the difference between the main peak's position and its expected position.
[0057] The extraction of nonlinear dynamic characteristics begins with recursive quantitative analysis of the acoustic emission signal. Recursive quantitative analysis is a method for analyzing the dynamic characteristics of nonlinear systems, revealing the system's dynamic features by constructing a recursion graph. The specific implementation process includes: first, reconstructing the phase space of the acoustic emission signal by selecting appropriate time delays and embedding dimensions to convert the one-dimensional time series into a trajectory in a multi-dimensional phase space; then, calculating the length distribution of diagonal structures and the quantity of vertical structures in the recursion graph. The length of the diagonal structures is calculated by identifying and measuring the length of the diagonals formed by consecutive recursion points in the recursion graph; the number of vertical structures is calculated by counting the number of vertical line segments in the recursion graph.
[0058] A multi-scale permutation entropy analysis method is used for vibration signals. Multi-scale permutation entropy is a method for measuring the complexity of time series, reflecting the complexity characteristics of signals at different time scales. The processing includes: first, coarse-graining the vibration signal, i.e., averaging the original signal at different scales to obtain time series at multiple scales; then, calculating the permutation entropy value for each scale time series. The calculation process of permutation entropy is as follows: first, reconstructing the time series into a multi-dimensional vector; then, calculating the permutation pattern type of each vector; finally, statistically analyzing the probability of occurrence of various permutation patterns and calculating their Shannon entropy values.
[0059] A chaotic feature extraction algorithm is employed for temperature signals. This algorithm extracts feature parameters characterizing the chaotic properties of the system by analyzing the time series of the temperature signal. The processing steps include: first, reconstructing the phase space of the temperature signal by selecting appropriate time delay and embedding dimension; then, calculating the correlation dimension and Kolmogorov entropy. The correlation dimension is calculated by calculating the distance distribution between pairs of points in the phase space and analyzing the logarithmic linear relationship between the distance distribution and the scale parameter; the Kolmogorov entropy is calculated by analyzing the divergence rate of trajectories in the phase space and calculating the rate of change of the average logarithm of the distance between adjacent trajectories over time.
[0060] Each feature parameter is normalized to eliminate the influence of dimensions. The system also includes a feature quality assessment mechanism to verify the reliability of the extracted feature parameters and ensure the validity of the feature data. The final generated multi-dimensional feature vector contains feature information from the time domain, frequency domain, and nonlinear dynamics, providing a sufficient data foundation for subsequent stress state assessment.
[0061] In S3, multi-dimensional feature vectors are input into a pre-trained stress-flow coupled dynamics model to predict in real time the expected error value that residual stress in the current water meter will produce in subsequent flow detection. Specifically, this includes:
[0062] The construction of the stress-flow coupled dynamics model is a systematic machine learning process. First, a large amount of training sample data needs to be collected, derived from test results of multiple water meters under different pressure conditions. For each water meter, after completing the sealing pressure test, its multi-dimensional feature vector is collected, including time-domain features, frequency-domain features, and nonlinear dynamic features. Simultaneously, the actual error value of the water meter in subsequent flow detection is recorded. The actual error value is calculated by comparing the water meter reading with the standard flow meter reading; the calculation method is to subtract the standard reading from the water meter reading, divide by the standard reading, and then multiply by 100%. At least one thousand training samples are required to ensure the model's generalization ability. The samples need to cover different water meter models, different pressure test conditions, and different ambient temperature ranges to ensure the model's applicability.
[0063] In the data preprocessing stage, all feature vectors are standardized. The standardization process uses the z-score method, which calculates the mean and standard deviation of all samples for each feature dimension, then subtracts the mean from the feature value of each sample and divides by the standard deviation. This eliminates the influence of different feature units, ensuring all features are within the same numerical range. The label data, i.e., the actual error values, are also normalized accordingly, mapping them to the range of zero to one.
[0064] The stress-flow coupled dynamics model employs a deep neural network structure, consisting of one input layer, three hidden layers, and one output layer. The number of nodes in the input layer is the same as the dimension of the multi-dimensional feature vector, with each node corresponding to one feature dimension. The first hidden layer contains 128 nodes using the ReLU activation function; the second hidden layer contains 64 nodes using the ReLU activation function; and the third hidden layer contains 32 nodes using the ReLU activation function. The output layer contains one node using the Sigmoid activation function, outputting the predicted error value. The network weights are initialized using the Xavier initialization method, with the biases initialized to 0.
[0065] The model training employs a combination of layer-by-layer pre-training and global fine-tuning. First, layer-by-layer pre-training is performed, using unsupervised learning to train each hidden layer sequentially. The first hidden layer uses an autoencoder structure, with the training objective being to reconstruct the input features as much as possible. The second hidden layer also uses an autoencoder structure, taking the output of the first hidden layer as input. The third hidden layer uses the same training method. After pre-training, all layers are connected to form a complete deep neural network, and then supervised global fine-tuning is performed. Global fine-tuning uses mean squared error as the loss function, and the optimization objective is to minimize the difference between the predicted error value and the actual error value.
[0066] The training process utilizes an adaptive moment estimation algorithm for optimization, which adaptively adjusts the learning rate. The initial learning rate is set to 0.001, and the momentum parameter is set to 0.9. Training employs mini-batch gradient descent with a batch size of 32 samples. The training iterations are set to 1000, with model performance validated every 50 iterations. Training is terminated early if the validation set loss fails to improve for 10 consecutive iterations. To prevent overfitting, L2 regularization is used during training with a regularization coefficient of 0.001, and a dropout layer is added after each hidden layer with a dropout rate of 0.2.
[0067] After the model is trained, its performance needs to be evaluated. Evaluation metrics include root mean square error (RMSE), mean absolute error (MAO), and coefficient of determination (CDO). RMSE is the square root of the average of the squares of the differences between predicted and actual error values; MAO is the average of the absolute values of the differences between predicted and actual error values; and the CDO reflects the model's explanatory power for changes in the target variable. Only when all evaluation metrics meet predetermined standards can the model be used in practice.
[0068] In the real-time prediction phase, the multi-dimensional feature vectors acquired in real time are first standardized. Standardization uses the mean and standard deviation calculated during the training phase to ensure consistency with the training method. The standardized feature vectors are then input into the trained stress-flow coupled dynamics model, and preliminary prediction results are obtained through forward propagation. The forward propagation process is as follows: the input feature vector is multiplied by the first hidden layer weight matrix, a bias vector is added, and the result is obtained by passing the ReLU activation function to obtain the first hidden layer output; the first hidden layer output is multiplied by the second hidden layer weight matrix, a bias vector is added, and the result is obtained by passing the ReLU activation function to obtain the second hidden layer output; the second hidden layer output is multiplied by the third hidden layer weight matrix, a bias vector is added, and the result is obtained by passing the ReLU activation function to obtain the third hidden layer output; the third hidden layer output is multiplied by the output layer weight matrix, a bias vector is added, and the result is obtained by passing the Sigmoid activation function to obtain the preliminary prediction result.
[0069] To improve the stability and reliability of the prediction results, the prediction results from multiple consecutive time points are fused. The system uses a sliding window of length 10 to store the prediction results from the ten most recent time points. These prediction results are fused using a weighted average method, with predictions closer to the current time having a higher weight. The weights are assigned in a linear decreasing manner, with the most recent time point having a weight of 10, the previous time point having a weight of 9, and the earliest time point having a weight of 1. The final prediction result is the weighted average value after inverse normalization, which maps the value between 0 and 1 back to the actual error range.
[0070] The system also includes a quality assessment mechanism for prediction results. When prediction results fluctuate significantly across multiple consecutive time points, it indicates low prediction reliability, and the system will automatically extend the observation time or prompt operator intervention. The prediction results are accompanied by a confidence index, calculated based on the consistency of the most recent prediction results. The final output expected error value includes both the predicted value and confidence information, providing a reference for subsequent decision-making. The entire prediction process is fully automated, completing all calculations from feature input to result output within three seconds, meeting real-time requirements.
[0071] In S4, it is determined whether the expected error value exceeds the compensation range allowed by the flow detection procedure. If it does not exceed the range, a personalized flow detection instruction set is generated. This personalized flow detection instruction set includes detection parameters of the current water meter status, including: initial flow value, flow change rate, stabilization time threshold, and data acquisition frequency. If it exceeds the range, an adaptive pressure control instruction is generated to adjust the working pressure in the detection pipeline, execute a targeted secondary pressure loading and unloading loop, and then return to S1. Specifically, this includes:
[0072] When the expected error value does not exceed the compensation range allowed by the flow detection procedure, the system generates a personalized flow detection instruction set. The generation process begins with determining the initial flow value. This determination employs a fuzzy inference method, based on the magnitude and distribution characteristics of the expected error value. The fuzzy inference process requires establishing a fuzzy rule base between input and output variables. Input variables include the numerical magnitude of the expected error value and its temporal distribution characteristics; the output variable is the initial flow value. First, the input variables are fuzzified, converting precise numerical values into fuzzy linguistic values. The magnitude of the expected error value is divided into three fuzzy sets: small, medium, and large; the distribution characteristics are divided into two fuzzy sets: concentrated and dispersed. Then, predefined fuzzy rules are used for inference. These rules are in an "if-then" form; for example, if the expected error value is small and concentrated, the initial flow value is the standard initial value; if the expected error value is large and dispersed, the initial flow value is increased by 10% from the standard value. Finally, through defuzzification, the fuzzy inference result is converted into a precise initial flow value.
[0073] The flow rate change rate is adaptively adjusted based on the stress release level of the water meter's internal structure. The stress release level is assessed through changes in multi-dimensional eigenvectors. First, the Euclidean distance between the current eigenvector and the initial eigenvector is calculated; a larger distance indicates a greater stress release. Then, the flow rate change rate is determined based on the distance value: a rate of 5 liters per minute (L / min) for smaller distances and 2 liters per minute (L / min) for larger distances. Specific values are determined using linear interpolation, with a minimum flow rate change rate of 2 liters per minute and a maximum flow rate change rate of 5 liters per minute. The actual flow rate change rate is calculated based on the proportional relationship between the minimum and maximum distance values.
[0074] The stabilization time threshold for each flow point is intelligently set using historical monitoring data. The system maintains a historical monitoring database, recording the actual stabilization time of each flow point during past monitoring processes. First, it retrieves historical records from the database that are the same model as the current water meter and have similar pressure test conditions. Then, it calculates the statistical characteristics of the stabilization time of each flow point in these historical records, including the mean and standard deviation. The final stabilization time threshold is set to the historical mean plus twice the standard deviation, ensuring that the flow rate is sufficiently stable in 95% of cases.
[0075] The data acquisition frequency is optimized in real time based on the signal-to-noise ratio (SNR) analysis results. First, the SNR of the real-time acquired signal is calculated, defined as the ratio of signal power to noise power. Signal power is obtained by calculating the average of the squared values of the signal samples, and noise power is obtained by calculating the average of the squared differences between the signal and the smoothed signal. Then, the data acquisition frequency is adjusted according to the SNR: a 1000 Hz acquisition frequency is used when the SNR is higher than 20 dB, and a 100 Hz acquisition frequency is used when the SNR is lower than 10 dB. The specific correspondence is determined by a pre-established lookup table based on a large amount of experimental data.
[0076] When the expected error value exceeds the compensation range allowed by the flow detection procedure, the system generates an adaptive pressure control command. Generating the pressure control command first requires determining the amplitude of the secondary pressure loading. The loading amplitude is determined based on the degree to which the expected error value exceeds the range; the degree of exceedance is defined as the ratio of the difference between the expected error value and the allowable upper limit to the allowable upper limit. The loading amplitude is divided into three levels based on the degree of exceedance: a pressure amplitude of 0.5 MPa for slight exceedance, 0.8 MPa for moderate exceedance, and 1.2 MPa for severe exceedance. Specific values are determined using a lookup table method, with the table data based on extensive experimental data.
[0077] The pressure loading rate and holding time are dynamically calculated based on the changing trends of multi-dimensional eigenvectors. First, the changing trends of the multi-dimensional eigenvectors over the past 10 seconds are analyzed, and the rate of change of each eigencomponent is calculated. Then, the pressure loading rate is determined based on the magnitude of the rate of change: a loading rate of 0.1 MPa per second is used when the rate of change is large, and a loading rate of 0.05 MPa per second is used when the rate of change is small. The holding time is determined based on the stability of the eigenvectors. The stability is evaluated by calculating the variance of the eigenvectors at five consecutive time points: a holding time of 30 seconds is used when the variance is less than 0.1, and a holding time of 120 seconds is used when the variance is greater than 0.5.
[0078] The unloading curve shape was optimized using a piecewise linearization method. The unloading process was divided into three stages: a rapid unloading stage, a uniform unloading stage, and a slow unloading stage. The rapid unloading stage lasted 20% of the total unloading time, and the pressure drop was 40% of the total pressure drop. The uniform unloading stage lasted 60% of the total unloading time, and the pressure drop was 50% of the total pressure drop. The slow unloading stage lasted 20% of the total unloading time, and the pressure drop was 10% of the total pressure drop. The time and pressure change ratios for each stage could be fine-tuned according to actual conditions.
[0079] By monitoring the stress release status in real time, pressure control parameters are adjusted based on feedback. During pressure control, changes in multi-dimensional characteristic vectors are continuously monitored. When the trend of the characteristic vector changes is found to be inconsistent with expectations, the pressure control parameters are adjusted in a timely manner. For example, if the stress release rate is detected to be too slow, the pressure loading amplitude is increased by 10% or the holding time is extended by 20%; if the stress release is detected to be too fast, the pressure loading amplitude is decreased by 10% or the holding time is shortened by 20%. This feedback adjustment mechanism ensures that the pressure control process is always maintained in an optimal state.
[0080] All generated instructions undergo validity checks before being sent to the actuator. Validity checks include parameter range checks, logical consistency checks, and safety checks. Parameter range checks ensure all parameters are within the device's permissible operating range; logical consistency checks ensure there are no contradictions between parameters; and safety checks ensure the instructions will not damage the device. Only instructions that pass all checks are actually executed, ensuring the safety and reliability of the entire process. The system also records all generated instructions and their execution results, providing data support for subsequent process optimization.
[0081] In S5, when the expected error value does not exceed the allowable compensation range, the flow generator is driven by a personalized flow detection instruction set to execute a flow accuracy detection process that matches the current state of the water meter. This process specifically includes:
[0082] Flow regulation first adjusts the opening of the electric regulating valve based on the initial flow value in the instruction set. The system uses a closed-loop control method to regulate the valve opening, and the specific process is as follows: First, the initial flow value set in the instruction set is read, which is usually between the minimum flow and the normal flow. Then, the estimated opening value corresponding to this flow value is obtained by querying the valve characteristic curve. The valve characteristic curve is pre-determined experimentally, recording the flow values corresponding to different openings. After adjusting the valve to the estimated opening, the flow is allowed to stabilize. During this period, the readings of the flow sensor are monitored in real time. When the deviation between the actual flow and the target flow exceeds 2%, the fine adjustment program is initiated. Fine adjustment uses an incremental PID control algorithm, which calculates the adjustment amount of the valve opening based on the magnitude and trend of the flow deviation. The proportional coefficient is set to 0.5, the integral time is set to 30 seconds, and the derivative time is set to 10 seconds. During the adjustment process, the opening adjustment amount does not exceed 1% of the total stroke each time to ensure smooth flow changes. When the deviation between the actual flow and the target flow is less than 0.5%, the flow is considered to have reached a stable state.
[0083] After adjusting the initial flow rate, the system smoothly transitions to each target flow rate point using gradient control, based on the flow rate change rate requirements in the instruction set. The specific implementation process of gradient control is as follows: First, the expected transition time is calculated based on the difference between the current flow rate and the next target flow rate, as well as the flow rate change rate set in the instruction set. For example, if the current flow rate is 10 liters / hour, the target flow rate is 50 liters / hour, and the flow rate change rate is 5 liters / minute, then the transition time is 8 minutes. Then, the entire transition process is divided into 100 equal time steps. Within each time step, the expected flow rate value is calculated, forming a smooth flow rate change curve. This curve is generated using an S-shaped function to ensure continuous acceleration of flow rate change and avoid abrupt changes. Within each time step, the valve opening is adjusted according to the expected flow rate value, so that the actual flow rate follows the expected flow rate curve as closely as possible. Throughout the transition process, the flow rate change is monitored in real time. When the deviation between the actual flow rate and the expected flow rate exceeds 3%, the rate of change is automatically reduced to ensure the smoothness of the transition process.
[0084] Flow stability is determined based on a stabilization time threshold set in the instruction set. Stability monitoring begins once the flow reaches the target value. The specific process for stability determination is as follows: First, flow sensor readings are continuously collected at a sampling frequency of 10Hz. The moving average and standard deviation of 100 consecutive sampled values are calculated. When the deviation of the moving average from the target value is less than 0.2%, and the standard deviation is less than 1% of the flow value, stabilization time timing is initiated. Within the subsequent stabilization time threshold, these two indicators are continuously monitored. If the flow remains within the allowable fluctuation range throughout the entire stabilization time threshold, the flow is considered to have reached a stable state. If the flow fluctuation exceeds the allowable range at any point within the stabilization time threshold, timing restarts. During stability determination, the system also monitors the flow trend. If a continuous upward or downward trend is detected, even if the fluctuation range is within the allowable range, the stabilization time threshold will be extended to ensure the flow truly reaches a stable state.
[0085] The data acquisition process is optimized according to the data acquisition frequency set in the instruction set. The optimization process includes the following aspects: First, the base acquisition frequency is determined based on the signal-to-noise ratio (SNR). A 100Hz acquisition frequency is used when the SNR is higher than 20dB, a 50Hz acquisition frequency is used when the SNR is between 10dB and 20dB, and a 20Hz acquisition frequency is used when the SNR is lower than 10dB. Then, the base acquisition frequency is dynamically adjusted according to different detection stages. A higher acquisition frequency, typically 100Hz, is used during the flow regulation stage to capture rapid changes in flow; a lower acquisition frequency, typically 10Hz, is used during the stabilization stage to reduce data storage. Digital filtering technology is also used during the data acquisition process to process the acquired raw data in real time. A fourth-order Butterworth low-pass filter is used, with the cutoff frequency set to 1 / 5 of the acquisition frequency, effectively removing high-frequency noise while preserving the main characteristics of the signal.
[0086] Finally, a dynamic detection curve that perfectly matches the actual stress state of the water meter is generated. The generation process of the dynamic detection curve includes the following steps: First, the collected flow data and water meter readings are arranged in chronological order to form an original data sequence. Then, outlier removal is performed on the original data using a 3-standard-deviation criterion to remove data points that significantly deviate from the normal range. The data sequence after outlier removal is then smoothed using a moving average algorithm with a window width of 11.
[0087] The working principle of this invention is as follows: First, after completing the water meter sealing pressure test, an optimized array of multimodal sensors collects acoustic emission, vibration, and temperature signals during the pressure release process. Then, the collected signals undergo in-depth time-frequency domain joint analysis to extract multi-dimensional feature vectors containing time-domain, frequency-domain, and nonlinear dynamic characteristics. This feature vector is input into a pre-trained stress-flow coupled dynamic model to predict in real time the expected error value generated by residual stress in subsequent flow detection. The system makes intelligent decisions based on the prediction results: if the expected error does not exceed the compensation range allowed by the regulations, a personalized detection instruction set is generated, including the initial flow value, flow change rate, stabilization time threshold, and data acquisition frequency parameters; if it exceeds the range, an adaptive pressure control instruction is generated, executing a targeted secondary pressure loading and unloading cycle to release residual stress, and returning to the signal acquisition step. Finally, based on the personalized instruction set, the flow generator performs high-precision flow detection. Through closed-loop control, gradient adjustment, and stability judgment, a dynamic detection curve that perfectly matches the actual stress state of the water meter is generated, achieving precise matching between the detection process and the individual water meter state, and full-process automation.
[0088] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. A method for automatic control of water meter detection process, characterized in that, The method comprises the following steps: S1: After completing the sealing pressure test of the water meter, collect the multi-source physical signals generated by the internal structure of the water meter after pressure removal, including acoustic emission signals, vibration signals and temperature signals; S2: Perform joint time-frequency domain analysis on the multi-source physical signals to extract a multi-dimensional feature vector representing the internal mechanical stress release process of the water meter, the multi-dimensional feature vector including time domain features, frequency domain features and nonlinear dynamic features; S3: Input the multi-dimensional feature vector into a pre-trained stress-flow coupling dynamic model to predict the expected error value of the current water meter caused by stress residue in subsequent flow detection, specifically including: Collect a large number of multi-dimensional feature vectors of water meters under multiple pressure conditions as training samples, and record the actual error values of the corresponding water meters in flow detection as labels; establish a nonlinear mapping relationship between the feature vector and the error value through layer-by-layer pre-training and global fine-tuning; use the adaptive moment estimation algorithm to optimize the network parameters to obtain a stress-flow coupling dynamic model that accurately reflects the internal correlation between stress state and flow error; Standardize the real-time collected multi-dimensional feature vector to eliminate the dimension effect; input the processed multi-dimensional feature vector into the trained stress-flow coupling dynamic model to obtain the preliminary prediction result through forward propagation calculation; fuse the prediction results of multiple time points to output the expected error value; S4: Determine whether the expected error value exceeds the compensation range allowed by the flow detection procedure: If not, generate a personalized flow detection instruction set containing the detection parameters of the current water meter state, including the initial flow value, the flow change rate, the stability time threshold and the data acquisition frequency; If so, generate an adaptive pressure regulation instruction to adjust the working pressure in the detection pipeline, perform targeted secondary pressure loading and unloading cycles, and then return to S1; S5: When the expected error value does not exceed the allowed compensation range, drive the flow generating device to execute a flow accuracy detection process matching the current state of the water meter based on the personalized flow detection instruction set.
2. The method of claim 1, wherein, The acquisition process of the time domain features is as follows: Use empirical mode decomposition to preprocess the acoustic emission signals and vibration signals to obtain a plurality of intrinsic mode functions; calculate the energy entropy and skewness coefficient of each intrinsic mode function as signal envelope features; Perform dual-tree complex wavelet transform on the temperature signal to extract statistical moment features of the approximation coefficients and detail coefficients; the time domain features include signal envelope features and statistical moment features.
3. The method of claim 1, wherein, The acquisition process of the frequency domain features is as follows: Use the adaptive optimal kernel time-frequency distribution method to analyze the acoustic emission signals to extract ridge line features and energy concentration indicators on the time-frequency plane; use harmonic wavelet packet transform on the vibration signals to calculate wavelet entropy and frequency band energy ratio of each frequency band; use the cepstrum analysis method to process the temperature signal to extract the main peak amplitude and peak shift in the cepstrum domain; the frequency domain features include ridge line features, wavelet entropy and frequency band energy ratio, main peak amplitude and peak shift.
4. The method of claim 1, wherein, The acquisition process of the nonlinear dynamic features is as follows: The acoustic emission signal is processed based on a recursive quantitative analysis technique, length distribution of diagonal structure and number characteristics of vertical structure in a recurrence plot are calculated; the vibration signal is analyzed by using a multi-scale permutation entropy analysis method, permutation entropy values of time scales of 1-8 are extracted; a chaotic feature extraction algorithm is used to analyze the temperature signal, correlation dimension and Kolmogorov entropy are calculated; the nonlinear dynamic characteristics include: number characteristics, permutation entropy values, and correlation dimension and Kolmogorov entropy.
5. The method of claim 1, wherein, The generation process of the personalized flow detection instruction set includes: Based on the size and distribution characteristics of the expected error value, the starting flow value is determined by using fuzzy reasoning; the flow change rate is adaptively adjusted according to the stress release degree of the internal structure of the water meter; the stable time threshold of each flow point is intelligently set by using historical detection data; the data acquisition frequency is optimized in real time based on the signal signal-to-noise ratio analysis result.
6. The method of claim 1, wherein, The generation process of the adaptive pressure regulation instruction is: According to the degree of the expected error value exceeding the range, the amplitude of the secondary pressure loading is determined; based on the change trend of the multi-dimensional feature vector, the pressure loading rate and the pressure holding time are dynamically calculated, and the unloading curve shape is optimized; by monitoring the stress release state in real time, the pressure regulation parameters are feedback adjusted.
7. The method of claim 1, wherein, The personalized flow detection instruction set drives the flow generating device to execute flow precision detection matched with the current state of the water meter, specifically including: According to the starting flow value in the personalized flow detection instruction set, the opening degree of the electric regulating valve is adjusted; according to the flow change rate requirement, the gradient control mode is used to smoothly transition to each target flow point; based on the stable time threshold, data acquisition is started after the flow is stabilized; according to the data acquisition frequency setting, the measurement process is optimized; finally, a dynamic detection curve completely matched with the actual stress state of the water meter is generated.
Citation Information
Patent Citations
Flowmeter on-line calibration system and calibration method
CN119860829A
Electromagnetic flowmeter online calibration system and acquisition and storage device
CN120121141A