CN115905869A - An Ultrasonic Water Meter Fault Early Warning Method - Google Patents
An Ultrasonic Water Meter Fault Early Warning Method Download PDFInfo
- Publication number
- CN115905869A CN115905869A CN202211503257.XA CN202211503257A CN115905869A CN 115905869 A CN115905869 A CN 115905869A CN 202211503257 A CN202211503257 A CN 202211503257A CN 115905869 A CN115905869 A CN 115905869A
- Authority
- CN
- China
- Prior art keywords
- data
- water meter
- ultrasonic water
- fault
- training set
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 title claims abstract description 68
- 238000000034 method Methods 0.000 title claims abstract description 19
- 238000012549 training Methods 0.000 claims abstract description 29
- 238000013145 classification model Methods 0.000 claims abstract description 20
- 238000007781 pre-processing Methods 0.000 claims abstract description 5
- 238000011144 upstream manufacturing Methods 0.000 claims description 9
- 238000004140 cleaning Methods 0.000 claims description 6
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 claims description 4
- 238000005457 optimization Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 claims description 2
- 238000010606 normalization Methods 0.000 claims 1
- 238000012216 screening Methods 0.000 claims 1
- 238000005406 washing Methods 0.000 claims 1
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000032683 aging Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 101100409194 Rattus norvegicus Ppargc1b gene Proteins 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 238000002405 diagnostic procedure Methods 0.000 description 1
- 238000012706 support-vector machine Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A20/00—Water conservation; Efficient water supply; Efficient water use
Landscapes
- Testing And Monitoring For Control Systems (AREA)
Abstract
Description
技术领域technical field
本发明涉及水表故障预警技术领域,尤其涉及一种超声水表故障预警方法。The invention relates to the technical field of water meter fault early warning, in particular to an ultrasonic water meter fault early warning method.
背景技术Background technique
物联网时代来临,传统的机械式水表逐渐被智能水表取代。其中,超声波水表是智能水表中备受关注的产品,超声波水表是通过检测超声波声束在水中顺流与逆流传播时因速度发生变化而产生的时差,分析计算得出水的流速,从而进一步计算出水的流量的一种新式水表。由于水表的工作环境十分恶劣,在实际应用中,电子元器件损坏、水表换能器老化、流场结构损坏等故障都会导致水表计量精度下降,给居民或者供水公司带来经济上的损失。With the advent of the Internet of Things era, traditional mechanical water meters are gradually being replaced by smart water meters. Among them, the ultrasonic water meter is a product that has attracted much attention in the smart water meter. The ultrasonic water meter detects the time difference caused by the change of the speed of the ultrasonic sound beam when it propagates downstream and upstream in the water, analyzes and calculates the flow velocity of the water, and further calculates the water flow rate. A new type of water meter for the flow rate. Due to the very harsh working environment of water meters, in practical applications, failures such as damage to electronic components, aging of water meter transducers, and damage to flow field structures will lead to a decrease in the measurement accuracy of water meters and bring economic losses to residents or water supply companies.
现有对于超声水表故障的诊断方式都是实时或者滞后的,当诊断出故障时,该故障已经对水表的安全运行产生了破坏,对于用户或者供水公司造成了损失。同时超声水表的故障种类比较多,比如电池欠电压引起的测试电路工作不正常;换能器老化导致水表计量性能下降;或者流场结构损坏导致水表受到扰流影响。对于这些故障,常规的故障检测算法极易出现故障漏报或者误报的现象。The existing diagnostic methods for ultrasonic water meter faults are all real-time or lagging. When the fault is diagnosed, the fault has already damaged the safe operation of the water meter and caused losses to users or water supply companies. At the same time, there are many types of faults in ultrasonic water meters, such as the abnormal operation of the test circuit caused by the undervoltage of the battery; the degradation of the measurement performance of the water meter due to the aging of the transducer; For these faults, the conventional fault detection algorithm is very prone to false negatives or false positives.
发明内容Contents of the invention
本发明针对现有技术存在的不足和缺陷,提供了一种超声水表故障预警方法,通过LSTM预测模型对超声水表6小时内数据进行预测后,通过OCSVM分类模型对超声水表故障进行识别,从而实现超声水表提前6小时的故障预警,减少经济损失。Aiming at the deficiencies and defects existing in the prior art, the present invention provides an ultrasonic water meter failure early warning method. After predicting the data of the ultrasonic water meter within 6 hours through the LSTM prediction model, the ultrasonic water meter failure is identified through the OCSVM classification model, thereby realizing Ultrasonic water meters give 6 hours early warning of faults to reduce economic losses.
本发明的目的可以通过以下技术方案来实现:The purpose of the present invention can be achieved through the following technical solutions:
一种超声水表故障预警方法,包括以下步骤:An ultrasonic water meter failure early warning method, comprising the following steps:
s1,获取超声水表近一段时间T的正常运行数据与故障数据用于形成LSTM预测模型的预测训练集;s1, obtain the normal operation data and fault data of the ultrasonic water meter in the recent period T to form the prediction training set of the LSTM prediction model;
获取超声水表近一段时间T的正常运行数据用于形成OCSVM分类模型的分类训练集;Obtain the normal operation data of the ultrasonic water meter in the recent period T to form the classification training set of the OCSVM classification model;
上述数据包括上下游信号传播时间差、水温、上下游接收信号峰峰值、瞬时流量、电池电压;The above data includes the propagation time difference of upstream and downstream signals, water temperature, peak-to-peak value of upstream and downstream received signals, instantaneous flow rate, and battery voltage;
s2,对获取的数据进行预处理;s2, preprocessing the acquired data;
对预处理后的数据进行归一化处理;Normalize the preprocessed data;
对归一化处理后的数据,每6个小时的数据作为一组来组成预测训练集与分类训练集;For the normalized data, the data of every 6 hours is used as a group to form a prediction training set and a classification training set;
s3,根据预测训练集构建LSTM预测模型,并利用Adam优化算法对模型进行参数寻优;s3, build an LSTM prediction model based on the prediction training set, and use the Adam optimization algorithm to optimize the parameters of the model;
s4,提取分类训练集特征;s4, extracting classification training set features;
构建OCSVM分类模型;Build an OCSVM classification model;
利用提取的特征值训练及优化OCSVM分类模型;Use the extracted feature values to train and optimize the OCSVM classification model;
s5,通过LSTM预测模型预测接下来6小时的超声水表数据;s5, predict the ultrasonic water meter data for the next 6 hours through the LSTM prediction model;
s6,将接下来6小时的预测数据送入OCSVM分类模型中进行故障识别,若识别出故障,则超声水表上报预警信息。s6, send the forecast data for the next 6 hours into the OCSVM classification model for fault identification, and if a fault is identified, the ultrasonic water meter will report early warning information.
进一步地,所述步骤s2中的数据预处理流程为:Further, the data preprocessing flow in step s2 is:
s21,利用比值阈值法对数据进行筛选,即设定其中上下游信号传播时间差与瞬时流量的比值R的阈值范围,抛弃R的阈值范围外的数据;s21, use the ratio threshold method to screen the data, that is, set the threshold range of the ratio R of the upstream and downstream signal propagation time difference to the instantaneous flow rate, and discard the data outside the threshold range of R;
s22,通过滑动平均法清洗数据,公式如下:s22, clean the data by moving average method, the formula is as follows:
其中,x(n)为清洗前的数据;y(m)为清洗后的数据;n为超声波水表数据索引,步长为5。Among them, x(n) is the data before cleaning; y(m) is the data after cleaning; n is the index of ultrasonic water meter data, and the step size is 5.
进一步地,所述步骤s4中利用高斯径向基核函数来构建OCSVM分类模型。Further, in the step s4, a Gaussian radial basis kernel function is used to construct an OCSVM classification model.
本发明的有益技术效果:通过LSTM预测模型对超声水表6小时内数据进行预测后,通过OCSVM分类模型对超声水表故障进行识别。不同于现有故障诊断的实时性与滞后性,本发明可以对水表故障提前6小时上报,有效避免水表故障造成的损失与破坏。同时,超声波水表故障种类很多,通过提取每一种故障特征来进行分类是行不通的,作为单分类支持向量机,OCSVM分类模型判断数据样本是否为超声波水表正常数据,然后进行上报,因此故障识别率很高。Beneficial technical effects of the present invention: after the data of the ultrasonic water meter within 6 hours is predicted by the LSTM prediction model, the failure of the ultrasonic water meter is identified by the OCSVM classification model. Different from the real-time and hysteresis of the existing fault diagnosis, the present invention can report the water meter fault 6 hours in advance, effectively avoiding the loss and damage caused by the water meter fault. At the same time, there are many types of ultrasonic water meter faults, and it is not feasible to classify by extracting each fault feature. As a single classification support vector machine, the OCSVM classification model judges whether the data sample is normal data of the ultrasonic water meter, and then reports it, so fault identification The rate is high.
附图说明Description of drawings
图1为本发明所述方法示图。Figure 1 is a schematic diagram of the method of the present invention.
图2为本发明实施例所述LSTM预测模型的单元结构图。Fig. 2 is a unit structure diagram of the LSTM prediction model according to the embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
如图1~2所示,一种超声水表故障预警方法,包括以下步骤:As shown in Figures 1-2, an ultrasonic water meter fault early warning method includes the following steps:
s1:获取某小区近三年来超声波水表正常运行数据与故障数据用于形成LSTM预测模型的预测训练集,获取该小区近三年超声波水表正常运行时的数据用于形成OCSVM分类模型的分类训练集,超声波水表数据包括上下游信号传播时间差、水温、上下游接收信号峰峰值、瞬时流量、电池电压;s1: Obtain the normal operation data and fault data of the ultrasonic water meter in a community in the past three years to form the prediction training set of the LSTM prediction model, and obtain the data of the normal operation of the ultrasonic water meter in the community in the past three years to form the classification training set of the OCSVM classification model , Ultrasonic water meter data include upstream and downstream signal propagation time difference, water temperature, peak-to-peak value of upstream and downstream received signals, instantaneous flow, battery voltage;
s2:对获取的数据进行预处理;s2: Preprocess the acquired data;
对预处理后的数据进行归一化处理;Normalize the preprocessed data;
对归一化处理后的数据,每6个小时的数据作为一组来组成预测训练集与分类训练集;具体地:For the normalized data, every 6 hours of data is used as a group to form a prediction training set and a classification training set; specifically:
s21: 利用比值阈值法对数据进行筛选,其比值R计算公式如下:s21: Use the ratio threshold method to screen the data, and the formula for calculating the ratio R is as follows:
通过对R设定阈值范围Rmin≤R≤Rmax来筛选异常数据,其中Rmin是流量为Q4时的比值,Rmax是流量为Q1时的比值,抛弃R的阈值范围外的数据;Screen abnormal data by setting a threshold range Rmin≤R≤Rmax for R, where Rmin is the ratio when the flow rate is Q4, Rmax is the ratio when the flow rate is Q1, and discard data outside the threshold range of R;
s22: 通过滑动平均法对超声波水表数据进行清洗,其计算公式如下:s22: The ultrasonic water meter data is cleaned by the moving average method, and the calculation formula is as follows:
其中,x(n)为清洗前的数据;y(m)为清洗后的数据;n为超声波水表数据索引,步长为5。Among them, x(n) is the data before cleaning; y(m) is the data after cleaning; n is the index of ultrasonic water meter data, and the step size is 5.
s23:将预处理后的数据进行归一化处理,对原始数据进行线性变换,公式如下:s23: Normalize the preprocessed data, and perform linear transformation on the original data, the formula is as follows:
其中,y为预处理后的数据,为最小值,为最大值。Among them, y is the preprocessed data, is the minimum value, is the maximum value.
s24:每6个小时超声波水表数据作为一组数据组成训练集;每组数据包含4320个数据点。s24: Every 6 hours of ultrasonic water meter data is used as a set of data to form a training set; each set of data contains 4320 data points.
s3: 根据预测训练集构建LSTM预测模型,并利用Adam优化算法对模进行参数寻优:s3: Construct the LSTM prediction model based on the prediction training set, and use the Adam optimization algorithm to optimize the parameters of the model:
s31: 选取初始化网络参数搭建LSTM预测模型,在确定模型的输入层、隐藏层和输出层节点后,将归一化的数据送入模型进行训练。LSTM预测模型通过sigmoid激活函数控制传输状态,对于用水量极低的数据,网络模型会选择性 “忘记”。这极大地压缩了网络训练时间。s31: Select the initial network parameters to build the LSTM prediction model. After determining the input layer, hidden layer and output layer nodes of the model, send the normalized data into the model for training. The LSTM prediction model controls the transmission state through the sigmoid activation function. For data with extremely low water consumption, the network model will selectively "forget". This greatly compresses the network training time.
s32: 结合预测训练集,采用Adam算法,对网络参数进行优化。s32: Combined with the prediction training set, the Adam algorithm is used to optimize the network parameters.
s33: 为了更直观的衡量模型预测结果与实际结果的误差,采用常用的平均绝对误差(mae)作为度量标准。平均绝对值误差公式如下所示,用来表示预测值与实际值之间绝对误差的平均值:s33: In order to more intuitively measure the error between the model prediction results and the actual results, the commonly used mean absolute error (mae) is used as the metric. The mean absolute value error formula is shown below, which is used to express the average value of the absolute error between the predicted value and the actual value:
其中,y为实际超声波水表数据;为模型输出预测值;m为样本个数。Among them, y is the actual ultrasonic water meter data; Output the predicted value for the model; m is the number of samples.
s4:对分类训练集进行特征提取,搭建OCSVM分类模型,对训练集进行故障分类识别;s4: Perform feature extraction on the classification training set, build an OCSVM classification model, and perform fault classification and identification on the training set;
s41:假设其中某一正常状态下的超声波水表数据为,实施例中t取500。对正常数据进行预处理,并提取以下3个特征值S、Perc、K来构建特征集:s41: Assume that the ultrasonic water meter data in one of the normal states is , t is taken as 500 in the embodiment. Preprocess the normal data, and extract the following three eigenvalues S, Perc, K to construct the feature set:
1)标准差S:1) Standard deviation S:
其中,是数据平均值。in, is the data mean.
2)波动幅度占均值的百分比Perc:2) The percentage of fluctuation range to the average value Perc:
其中,max(L)为最大值;min(L)为最小值。Among them, max(L) is the maximum value; min(L) is the minimum value.
3)t组数据的数据变化斜率K:3) Data change slope K of group t data:
s42: 选取高斯径向基核函数建立OCSVM分类模型,其误差惩罚系数设置为0.1;利用提取的特征值进行模型的训练及优化,保存最优模型。s42: Select the Gaussian radial basis kernel function to establish the OCSVM classification model, and set the error penalty coefficient to 0.1; use the extracted feature values to train and optimize the model, and save the optimal model.
s43: 为了更好地评估模型的分类效果,本实施例采用精确率P和召回率R两个分类指标。其定义为:s43: In order to better evaluate the classification effect of the model, this embodiment uses two classification indicators, the precision rate P and the recall rate R. It is defined as:
其中,TP表示正类数据被识别为正类的样本数,FP表示正类数据被识别为负类的样本数,FN表示负类数据被识别为正类的样本数。Among them, TP indicates the number of positive samples identified as positive data, FP indicates the number of positive samples identified as negative, and FN indicates the number of negative samples identified as positive.
s5: 将当前时刻前六个小时内的数据送入LSTM预测模型中预测此后六个小时内的超声波水表数据,之后进行反归一化处理。s5: Send the data within six hours before the current moment into the LSTM prediction model to predict the ultrasonic water meter data within the next six hours, and then perform denormalization processing.
s6: 对预测的数据进行特征提取,送入OCSVM分类模型中进行故障识别,若识别为故障则上报。s6: Perform feature extraction on the predicted data, send it to the OCSVM classification model for fault identification, and report if it is identified as a fault.
上述实施例是对本发明的具体实施方式的说明,而非对本发明的限制,有关技术领域的技术人员在不脱离本发明的精神和范围的情况下,还可做出各种变换和变化以得到相对应的等同的技术方案,因此所有等同的技术方案均应归入本发明的专利保护范围。The foregoing embodiments are descriptions of specific implementations of the present invention, rather than limitations of the present invention. Those skilled in the art may also make various transformations and changes without departing from the spirit and scope of the present invention to obtain Corresponding equivalent technical solutions, therefore all equivalent technical solutions should fall into the patent protection scope of the present invention.
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211503257.XA CN115905869A (en) | 2022-11-29 | 2022-11-29 | An Ultrasonic Water Meter Fault Early Warning Method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211503257.XA CN115905869A (en) | 2022-11-29 | 2022-11-29 | An Ultrasonic Water Meter Fault Early Warning Method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115905869A true CN115905869A (en) | 2023-04-04 |
Family
ID=86477623
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211503257.XA Pending CN115905869A (en) | 2022-11-29 | 2022-11-29 | An Ultrasonic Water Meter Fault Early Warning Method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115905869A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117574244A (en) * | 2024-01-15 | 2024-02-20 | 成都秦川物联网科技股份有限公司 | Ultrasonic water meter fault prediction method, device and equipment based on Internet of things |
-
2022
- 2022-11-29 CN CN202211503257.XA patent/CN115905869A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117574244A (en) * | 2024-01-15 | 2024-02-20 | 成都秦川物联网科技股份有限公司 | Ultrasonic water meter fault prediction method, device and equipment based on Internet of things |
CN117574244B (en) * | 2024-01-15 | 2024-04-02 | 成都秦川物联网科技股份有限公司 | Ultrasonic water meter fault prediction method, device and equipment based on Internet of things |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107941537B (en) | A method for evaluating the health status of mechanical equipment | |
CN109974782A (en) | Equipment fault early warning method and system based on optimal selection of sensitive features of big data | |
CN115270860A (en) | A kind of transformer abnormality diagnosis method, system and diagnosis equipment | |
CN111964909A (en) | Rolling bearing operation state detection method, fault diagnosis method and system | |
CN116066343A (en) | An intelligent early warning method and system for a failure model of an oil pump unit | |
CN111949480A (en) | A Component Awareness-Based Log Anomaly Detection Method | |
CN108918111A (en) | Breaker mechanical method for diagnosing faults based on the classification of k- neighbour's Bayes's multi-tag | |
CN115905869A (en) | An Ultrasonic Water Meter Fault Early Warning Method | |
CN118329138A (en) | High-precision electromagnetic flowmeter assembly and flowmeter control system | |
CN114004331A (en) | A fault analysis method based on key indicators and deep learning | |
CN117092980A (en) | Electrical fault detection control system based on big data | |
CN110266527B (en) | Sensor node fault classification alarm method and device based on spatial correlation | |
CN115876467A (en) | Pseudo label transfer type two-stage field self-adaptive rolling bearing fault diagnosis method | |
CN118100446B (en) | Intelligent detection method for node running state of power system | |
CN118536048A (en) | Switchgear insulation status monitoring and management system | |
CN109872511B (en) | An adaptive two-level alarm method for monitoring the sudden change of axial displacement | |
CN110647086B (en) | Intelligent operation and maintenance monitoring system based on operation big data analysis | |
CN117149486A (en) | Alarm and root cause positioning method, model training method, device, equipment and medium | |
CN116338391A (en) | Insulator state detection method, device, electronic equipment and medium | |
CN116086296A (en) | Fault Diagnosis Method for Axial Displacement of Transformer Windings Based on Three-dimensional Sweeping Impedance Curve Analysis | |
CN115130496A (en) | Anomaly detection method of pipeline pressure signal based on bagging and RM-LOF ensemble single classifier | |
CN119004278B (en) | Online identification system of power grid faults based on big data | |
He et al. | Building cognizance rule knowledge for fault diagnosis based on fuzzy rough sets 1 | |
CN117978619B (en) | Communication network fault analysis method and system based on digital twin | |
CN118777774A (en) | AI vision and sensor fusion power grid fault detection system and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Country or region after: China Address after: 266000 12 / F, 4b building, Dingxin science and Technology Industrial Park, No. 858, Huaguan Road, high tech Zone, Qingdao, Shandong Applicant after: Qingdao Zhidian New Energy Technology Co.,Ltd. Applicant after: QINGDAO TOPSCOMM COMMUNICATION Co.,Ltd. Address before: 12th Floor, Building 4B, Dingxin Technology Industrial Park, No. 858 Huaguan Road, High tech Zone, Qingdao City, Shandong Province Applicant before: QINGDAO TOPSCOMM COMMUNICATION Co.,Ltd. Country or region before: China |
|
CB02 | Change of applicant information |