CN114235111B - Ultrasonic water meter flow calibration method based on model optimization - Google Patents
Ultrasonic water meter flow calibration method based on model optimization Download PDFInfo
- Publication number
- CN114235111B CN114235111B CN202210168812.1A CN202210168812A CN114235111B CN 114235111 B CN114235111 B CN 114235111B CN 202210168812 A CN202210168812 A CN 202210168812A CN 114235111 B CN114235111 B CN 114235111B
- Authority
- CN
- China
- Prior art keywords
- population
- individuals
- mathematical model
- water meter
- test
- 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.)
- Active
Links
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 title claims abstract description 56
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000005457 optimization Methods 0.000 title claims abstract description 14
- 238000013178 mathematical model Methods 0.000 claims abstract description 60
- 238000012360 testing method Methods 0.000 claims abstract description 48
- 230000011218 segmentation Effects 0.000 claims abstract description 8
- 238000005259 measurement Methods 0.000 claims description 25
- 238000011144 upstream manufacturing Methods 0.000 claims description 25
- 230000035772 mutation Effects 0.000 claims description 12
- 238000004364 calculation method Methods 0.000 claims description 8
- 238000011156 evaluation Methods 0.000 claims description 5
- 150000001875 compounds Chemical class 0.000 claims 3
- 230000009191 jumping Effects 0.000 claims 2
- 238000009434 installation Methods 0.000 abstract description 3
- 238000012545 processing Methods 0.000 abstract description 3
- 238000013461 design Methods 0.000 description 5
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000012530 fluid Substances 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Measuring Volume Flow (AREA)
Abstract
Description
技术领域technical field
本发明涉及智慧水务技术领域,尤其涉及一种基于模型优化的超声波水表流量校准方法。The invention relates to the technical field of smart water affairs, in particular to an ultrasonic water meter flow calibration method based on model optimization.
背景技术Background technique
超声波水表因计量精度高、量程比宽、压损小等优势,在民用、工业等领域得以广泛应用,其通过计算上下游超声波信号的传播时间差计算流速,基于校准系数,获得管道内平均流速。当前,在流量校准过程中,一般参考流体力学的理论公式,依据人工经验,进行流量分段校准,过程反复迭代,且很难保证最优解。此外,考虑时间成本和经济成本,在对同型号多支水表的校准系数进行二次修正时,利用的测量数据往往较少,通过传统二次修正方法很难保证水表在全流量区间内的精度。Ultrasonic water meters are widely used in civil, industrial and other fields due to the advantages of high measurement accuracy, wide range ratio, and small pressure loss. At present, in the process of flow calibration, the theoretical formula of fluid mechanics is generally referred to, and the flow is calibrated in segments based on manual experience. The process is repeated and iterative, and it is difficult to guarantee the optimal solution. In addition, considering the time cost and economic cost, when the calibration coefficient of multiple water meters of the same model is corrected twice, less measurement data is often used, and it is difficult to ensure the accuracy of the water meter in the full flow range through the traditional second correction method. .
发明内容SUMMARY OF THE INVENTION
本发明针对现有技术存在的不足和缺陷,提供了一种基于模型优化的超声波水表流量校准方法。该方法直接使用原始测量数据求解校准系数,避免了因人工选择分段点不合理而引起的精度误差。此外,从源头修正校准系数,在初始数学模型基础上,为每支水表优化独立的数学模型参数,消除因加工或安装误差带来的影响,将精度控制在要求范围内。Aiming at the deficiencies and defects existing in the prior art, the present invention provides a flow calibration method for ultrasonic water meters based on model optimization. This method directly uses the original measurement data to solve the calibration coefficient, which avoids the precision error caused by the unreasonable manual selection of segmentation points. In addition, the calibration coefficient is corrected from the source, and on the basis of the initial mathematical model, the independent mathematical model parameters are optimized for each water meter to eliminate the influence caused by processing or installation errors, and control the accuracy within the required range.
本发明的目的可以通过以下技术方案来实现:The object of the present invention can be realized through the following technical solutions:
一种基于模型优化的超声波水表流量校准方法,其特征在于,包括以下步骤:A method for calibrating ultrasonic water meter flow based on model optimization is characterized in that, comprising the following steps:
s1:使用一只已校准的超声波水表在全流量区间内测量到的流量数据作为标准组,以所有待校准的超声波水表在全流量区间内测量到的流量数据作为测试组; s1: Use the flow data measured by a calibrated ultrasonic water meter in the full flow range as the standard group, and use the flow data measured by all ultrasonic water meters to be calibrated in the full flow range as the test group;
s2:基于标准组数据,绘制流量特征曲线,对流量特征曲线进行非线性拟合,获得初始数学模型;s2: Based on the standard group data, draw the flow characteristic curve, perform nonlinear fitting on the flow characteristic curve, and obtain the initial mathematical model;
s3:基于测试组数据计算相对误差RD,根据相对误差RD评价数学模型,以评价结果决定是否跳过步骤s4;s3: Calculate the relative error RD based on the test group data, evaluate the mathematical model according to the relative error RD , and decide whether to skip step s4 according to the evaluation result;
s4:基于测试组数据,通过差分进化算法,对数学模型参数进行优化;s4: Based on the test group data, the parameters of the mathematical model are optimized through the differential evolution algorithm;
s5:基于数学模型,通过差分进化算法,获得单只待校准超声波水表最优的分段校准系数;s5: Based on the mathematical model, through the differential evolution algorithm, the optimal segmentation calibration coefficient of the single ultrasonic water meter to be calibrated is obtained;
s6:重复步骤s3至步骤s5,完成所有待校准超声波水表的流量校准。s6: Repeat steps s3 to s5 to complete the flow calibration of all ultrasonic water meters to be calibrated.
进一步地,所述步骤s1中数据集包括每支超声波水表测得的平均流速及上下游接收信号传播时间差的平均值,其中平均流速的计算公式如下:Further, in the step s1, the data set includes the average flow rate measured by each ultrasonic water meter and the average value of the difference in the propagation time of the upstream and downstream received signals. , where the average velocity The calculation formula is as follows:
式中,T j 为第j次测量时长,m j 为第j次测量时长T j 内流入水箱内的水的质量,为第j次测量时的水密度,S为测量段管道截面积。In the formula, T j is the jth measurement duration, m j is the quality of the water flowing into the water tank during the jth measurement duration T j , is the water density at the jth measurement, and S is the cross-sectional area of the pipeline in the measurement section.
进一步地,所述上下游接收信号传播时间差是以上下游接收信号作为输入,通过时差法计算得到的。Further, the propagation time difference of the upstream and downstream received signals is obtained by taking the upstream and downstream received signals as input and calculated by the time difference method.
进一步地,所述步骤s2中流量特征曲线为校准系数随上下游接收信号传播时间差的平均值变化的曲线,其中校准系数K计算公式如下:Further, in the step s2, the flow characteristic curve is a curve in which the calibration coefficient changes with the average value of the propagation time difference of the upstream and downstream received signals, and the calculation formula of the calibration coefficient K is as follows:
式中,为在第j次测量时第i组的上下游接收信号传播时间差,Nj为第j次测量时的上下游接收信号传播时间差总数,为第j次测量的已校准的超声波水表获得的标准组的平均流速,为第j次测量的上下游接收信号传播时间差的平均值。In the formula, is the propagation time difference of the upstream and downstream received signals of the i -th group at the jth measurement, N j is the total number of upstream and downstream received signal propagation time differences at the jth measurement, the mean flow rate of the standard set obtained for the jth measurement of the calibrated ultrasonic water meter, is the average value of the propagation time difference between the upstream and downstream received signals measured for the jth time.
进一步地,所述步骤s2中的非线性拟合为最小二乘拟合,获得初始数学模型,其中为模型参数。Further, the nonlinear fitting in the step s2 is the least square fitting to obtain an initial mathematical model ,in are model parameters.
进一步地,所述步骤s3中相对误差RD的计算公式如下:Further, the calculation formula of the relative error RD in the step s3 is as follows:
式中,为测试组第l组的平均流速,K为通过数学模型计算的校准系数,为测试组中第l组的上下游接收信号传播时间差的平均值;In the formula, is the average flow velocity of the lth group of the test group, K is the calibration coefficient calculated by the mathematical model, is the average value of the propagation time difference of the upstream and downstream received signals of the lth group in the test group;
数学模型评价原则如下:The evaluation principles of the mathematical model are as follows:
若RD l 均小于或等于最大允许误差的二分之一,则认为数学模型与测试组数据吻合,跳过步骤s4;If RD l is less than or equal to half of the maximum allowable error, it is considered that the mathematical model is consistent with the test group data, and step s4 is skipped;
若存在RD l 大于最大允许误差的二分之一,且小于或等于最大允许误差,则认为数学模型与测试组数据不吻合,需进入步骤s4进行数学模型参数的优化;If there is RD1 greater than half of the maximum allowable error, and less than or equal to the maximum allowable error, it is considered that the mathematical model does not match the test group data, and it is necessary to enter step s4 to optimize the parameters of the mathematical model;
若存在RD l 大于最大允许误差,则认为数学模型不满足要求,需脱离本流程,对该超声波水表单独分析。If there is RD l greater than the maximum allowable error, it is considered that the mathematical model does not meet the requirements, and the ultrasonic water meter needs to be analyzed separately from this process.
进一步地,所述步骤s4具体步骤如下: Further, the specific steps of the step s4 are as follows:
s4.1:基于测试组数据的平均流速值与()之间的欧氏距离定义目标函数,以数学模型中参数的预设允许范围为约束条件,基于数学模型参数θ设计变量;s4.1: Average flow velocity value based on test group data and( ) between the Euclidean distances to define the objective function to the mathematical model Medium parameter The preset allowable range of is the constraint condition, and the design variable is based on the mathematical model parameter θ;
s4.2:设定差分进化算法对数学模型的搜索范围,初始化种群个体数目、最大迭代次数、交叉因子和变异因子;s4.2: Set the search range of the differential evolution algorithm for the mathematical model, initialize the number of individuals in the population, the maximum number of iterations, the crossover factor and the mutation factor;
s4.3:在数学模型参数θ的搜索范围内随机生成种群作为父代种群,迭代次数加1,根据目标函数和约束条件,计算父代种群中个体的适应度;s4.3: Randomly generate a population within the search range of the mathematical model parameter θ as the parent population, add 1 to the number of iterations, and calculate the fitness of individuals in the parent population according to the objective function and constraints;
s4.4:基于交叉因子与变异因子,在父代种群中随机选择个体进行交叉和变异,生成试验种群;s4.4: Based on the crossover factor and variation factor, randomly select individuals in the parent population for crossover and mutation to generate a test population;
s4.5:计算试验种群中个体的适应度,将父代种群与试验种群中个体的适应度进行比较,根据比较结果生成子代种群;s4.5: Calculate the fitness of individuals in the test population, compare the fitness of the parent population with that of the individuals in the test population, and generate the offspring population according to the comparison results;
s4.6:进行子代种群中个体的非支配排序;s4.6: Perform non-dominated sorting of individuals in the offspring population;
s4.7:计算子代种群中个体的拥挤距离,剔除拥挤距离相对较小的个体以保持子代种群个体数目与初始种群个体数目一致;s4.7: Calculate the crowding distance of individuals in the offspring population, and remove the individuals with relatively small crowding distances to keep the number of individuals in the offspring population consistent with the number of individuals in the initial population;
s4.8:判断现有迭代次数是否到达最大迭代次数要求,若满足,则完成数学模型参数优化,结束流程;否则跳转至步骤s4.3。s4.8: Determine whether the current number of iterations reaches the maximum number of iterations. If so, complete the mathematical model parameter optimization and end the process; otherwise, jump to step s4.3.
进一步地,所述步骤s5具体步骤如下: Further, the specific steps of the step s5 are as follows:
s5.1:基于测试组数据的平均流速值与()之间的欧氏距离定义目标函数,随机生成分段点位置β和分段校准系数α,以分段点位置β和分段校准系数α的允许范围作为约束条件,以参数设计变量;s5.1: Average flow velocity value based on test group data and( ) defines the objective function, randomly generates the segment point position β and the segment calibration coefficient α, and takes the allowable range of the segment point position β and the segment calibration coefficient α as the constraint condition, and uses the parameter design variable;
s5.2:设定差分进化算法对参数γ的搜索范围,初始化种群个体数目、最大迭代次数、交叉因子和变异因子;s5.2: Set the search range of the parameter γ by the differential evolution algorithm, initialize the number of individuals in the population, the maximum number of iterations, the crossover factor and the mutation factor;
s5.3:在参数γ的搜索范围内随机生成种群作为父代种群,迭代次数加1,根据目标函数和约束条件,计算父代种群中个体的适应度;s5.3: Randomly generate a population as the parent population within the search range of the parameter γ, add 1 to the number of iterations, and calculate the fitness of the individuals in the parent population according to the objective function and constraints;
s5.4:基于交叉因子与变异因子,在父代种群中随机选择个体进行交叉和变异,生成试验种群;s5.4: Based on the crossover factor and variation factor, randomly select individuals in the parent population for crossover and mutation to generate a test population;
s5.5:计算试验种群中个体的适应度,将父代种群与试验种群中个体的适应度进行比较,根据比较结果生成子代种群;s5.5: Calculate the fitness of individuals in the test population, compare the fitness of the parent population with that of the individuals in the test population, and generate offspring populations according to the comparison results;
s5.6:进行子代种群中个体的非支配排序; s5.6: Perform non-dominated sorting of individuals in the offspring population;
s5.7:计算子代种群中个体的拥挤距离,剔除拥挤距离相对较小的个体以保持子代种群个体数目与初始种群个体数目一致; s5.7: Calculate the crowding distance of individuals in the offspring population, and remove individuals with relatively small crowding distances to keep the number of individuals in the offspring population consistent with the number of individuals in the initial population;
s5.8:判断现有迭代次数是否到达最大迭代次数要求,若满足,则完成参数优化,结束流程;否则跳转至步骤s5.3。s5.8: Determine whether the existing number of iterations reaches the maximum number of iterations. If so, complete the parameter optimization and end the process; otherwise, jump to step s5.3.
本发明的有益技术效果:直接使用原始测量数据求解校准系数,简单高效,避免了因人工选择分段点不合理而引起的精度误差。此外,从源头修正校准系数,在初始数学模型基础上,为每支水表优化独立的数学模型参数,消除因加工或安装误差带来的影响,将精度控制在要求范围内,从而实现同批次或型号水表的高度一致性。 Beneficial technical effects of the present invention: directly use the original measurement data to solve the calibration coefficient, which is simple and efficient, and avoids precision errors caused by unreasonable manual selection of segment points. In addition, the calibration coefficient is corrected from the source. On the basis of the initial mathematical model, the independent mathematical model parameters are optimized for each water meter to eliminate the influence caused by processing or installation errors, and control the accuracy within the required range, so as to achieve the same batch of water. or high consistency of model water meters.
附图说明Description of drawings
图1为本发明的总体流程图。FIG. 1 is an overall flow chart of the present invention.
图2为本发明实施例中超声波水表的流量特征曲线。Fig. 2 is the flow characteristic curve of the ultrasonic water meter in the embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to illustrate the present invention, but not to limit the present invention.
实施例: Example:
如图1所示,一种基于模型优化的超声波水表流量校准方法,包括以下步骤:As shown in Figure 1, a model-based optimization method for ultrasonic water meter flow calibration includes the following steps:
s1:调节流量控制装置,待流量稳定后,使用一只已校准的超声波水表在全流量区间内测量到的流量数据作为标准组,以所有待校准的超声波水表在全流量区间内测量到的流量数据作为测试组。数据集包括每支超声波水表测得的平均流速及上下游接收信号传播时间差的平均值,其中平均流速的计算公式如下:s1: Adjust the flow control device. After the flow is stable, use the flow data measured by a calibrated ultrasonic water meter in the full flow range as the standard group, and use the flow measured by all ultrasonic water meters to be calibrated in the full flow range. data as a test group. The data set includes the average flow velocity measured by each ultrasonic water meter and the average value of the propagation time difference of the upstream and downstream received signals , where the average velocity The calculation formula is as follows:
式中,T j 为第j次测量时长,m j 为第j次测量时长T j 内流入水箱内的水的质量,为第j次测量时的水密度,S为测量段管道截面积。In the formula, T j is the jth measurement duration, m j is the quality of the water flowing into the water tank during the jth measurement duration T j , is the water density at the jth measurement, and S is the cross-sectional area of the pipeline in the measurement section.
所述上下游接收信号传播时间差是以上下游接收信号作为输入,通过时差法计算得到的。 The propagation time difference of the upstream and downstream received signals is obtained by taking the upstream and downstream received signals as input and calculated by the time difference method.
s2:基于标准组数据,绘制流量特征曲线,对流量特征曲线进行非线性拟合,获得初始数学模型。流量特征曲线为校准系数随上下游接收信号传播时间差的平均值的变化曲线,其中校准系数K计算公式如下:s2: Based on the standard group data, draw the flow characteristic curve, perform nonlinear fitting on the flow characteristic curve, and obtain the initial mathematical model. The flow characteristic curve is the change curve of the calibration coefficient with the average value of the propagation time difference of the upstream and downstream received signals, and the calculation formula of the calibration coefficient K is as follows:
式中,为在第j次测量时第i组的上下游接收信号传播时间差,Nj为第j次测量时的上下游接收信号传播时间差总数,为第j次测量的已校准的超声波水表获得的标准组的平均流速,为第j次测量的上下游接收信号传播时间差的平均值。In the formula, is the propagation time difference of the upstream and downstream received signals of the i -th group at the jth measurement, N j is the total number of upstream and downstream received signal propagation time differences at the jth measurement, the mean flow rate of the standard set obtained for the jth measurement of the calibrated ultrasonic water meter, is the average value of the propagation time difference between the upstream and downstream received signals measured for the jth time.
所述非线性拟合为最小二乘拟合,获得初始数学模型。数学模型表达式与超声波水表型号相关,数学模型中参数与水表管道结构和声路设计参数相关。The nonlinear fitting is a least squares fitting to obtain an initial mathematical model . The mathematical model expression is related to the ultrasonic water meter model, and the parameters in the mathematical model are related to the water meter pipeline structure and sound path design parameters.
如图2所示为某型号DN15超声波水表的流量特征曲线,校准系数随上下游接收信号传播时间差的平均值的变化而改变。基于图2数据进行最小二乘拟合后,获得初始数学模型的表达式如下: Figure 2 shows the flow characteristic curve of a certain type of DN15 ultrasonic water meter. The calibration coefficient changes with the average value of the propagation time difference of the upstream and downstream received signals. After performing least squares fitting based on the data in Figure 2, the expression of the initial mathematical model is obtained as follows:
式中,a、b、c、d均为数学模型中的可调参数,取值与超声波水表型号相关。参数 a的取值范围为[0.02016, 0.02107],参数b的取值范围为[-0.0001136, 0.0003671],参数c的取值范围为[-0.009227, -0.008075],参数d的取值范围为[-0.2465, -0.1726]。In the formula, a, b, c, and d are all adjustable parameters in the mathematical model, and the values are related to the model of the ultrasonic water meter. The value range of parameter a is [0.02016, 0.02107], the value range of parameter b is [-0.0001136, 0.0003671], the value range of parameter c is [-0.009227, -0.008075], and the value range of parameter d is [ -0.2465, -0.1726].
s3:基于测试组数据计算相对误差RD,根据相对误差RD评价数学模型,以评价结果决定是否跳过步骤s4。相对误差RD的计算公式如下:s3: Calculate the relative error RD based on the test group data, evaluate the mathematical model according to the relative error RD , and decide whether to skip step s4 according to the evaluation result. The formula for calculating the relative error RD is as follows:
式中,为测试组第l组的平均流速,K为通过数学模型计算的校准系数,为测试组中第l组的上下游接收信号传播时间差的平均值。In the formula, is the average flow velocity of the lth group of the test group, K is the calibration coefficient calculated by the mathematical model, is the average value of the propagation time difference of the upstream and downstream received signals of the lth group in the test group.
数学模型评价原则如下: The evaluation principles of the mathematical model are as follows:
若RD l 均小于或等于最大允许误差的二分之一,则认为数学模型与测试组数据吻合,跳过步骤s4;If RD l is less than or equal to half of the maximum allowable error, it is considered that the mathematical model is consistent with the test group data, and step s4 is skipped;
若存在RD l 大于最大允许误差的二分之一,且小于或等于最大允许误差,则认为数学模型与测试组数据不吻合,需进入步骤s4进行数学模型参数的优化;If there is RD1 greater than half of the maximum allowable error, and less than or equal to the maximum allowable error, it is considered that the mathematical model does not match the test group data, and it is necessary to enter step s4 to optimize the parameters of the mathematical model;
若存在RD l 大于最大允许误差,则认为数学模型不满足要求,需脱离本流程,对该超声波水表单独分析。If there is RD l greater than the maximum allowable error, it is considered that the mathematical model does not meet the requirements, and the ultrasonic water meter needs to be analyzed separately from this process.
实施例中,某型号DN15超声波水表为2级表,设定最大允许误差即为国标要求的2级精度。 In the embodiment, a certain type of DN15 ultrasonic water meter is a 2-level meter, and the maximum allowable error is set to be the 2-level accuracy required by the national standard.
s4:基于测试组数据,通过差分进化算法,对数学模型参数进行优化。具体步骤如下: s4: Based on the test group data, the parameters of the mathematical model are optimized through the differential evolution algorithm. Specific steps are as follows:
s4.1:基于测试组数据的平均流速值与()之间的欧氏距离定义目标函数,以数学模型中参数的预设允许范围为约束条件,基于数学模型参数θ设计变量;s4.1: Average flow velocity value based on test group data and( ) between the Euclidean distances to define the objective function to the mathematical model Medium parameter The preset allowable range of is the constraint condition, and the design variable is based on the mathematical model parameter θ;
s4.2:设定差分进化算法对数学模型的搜索范围,初始化种群个体数目、最大迭代次数、交叉因子和变异因子;s4.2: Set the search range of the differential evolution algorithm for the mathematical model, initialize the number of individuals in the population, the maximum number of iterations, the crossover factor and the mutation factor;
s4.3:在数学模型参数θ的搜索范围内随机生成种群作为父代种群,迭代次数加1,根据目标函数和约束条件,计算父代种群中个体的适应度;s4.3: Randomly generate a population within the search range of the mathematical model parameter θ as the parent population, add 1 to the number of iterations, and calculate the fitness of individuals in the parent population according to the objective function and constraints;
s4.4:基于交叉因子与变异因子,在父代种群中随机选择个体进行交叉和变异,生成试验种群;s4.4: Based on the crossover factor and variation factor, randomly select individuals in the parent population for crossover and mutation to generate a test population;
s4.5:计算试验种群中个体的适应度,将父代种群与试验种群中个体的适应度进行比较,根据比较结果生成子代种群;s4.5: Calculate the fitness of individuals in the test population, compare the fitness of the parent population with that of the individuals in the test population, and generate the offspring population according to the comparison results;
s4.6:进行子代种群中个体的非支配排序;s4.6: Perform non-dominated sorting of individuals in the offspring population;
s4.7:计算子代种群中个体的拥挤距离,剔除拥挤距离相对较小的个体以保持子代种群个体数目与初始种群个体数目一致;s4.7: Calculate the crowding distance of individuals in the offspring population, and remove the individuals with relatively small crowding distances to keep the number of individuals in the offspring population consistent with the number of individuals in the initial population;
s4.8:判断现有迭代次数是否到达最大迭代次数要求,若满足,则完成数学模型参数优化,结束流程;否则跳转至步骤s4.3。s4.8: Determine whether the current number of iterations reaches the maximum number of iterations. If so, complete the mathematical model parameter optimization and end the process; otherwise, jump to step s4.3.
s5:基于数学模型,通过差分进化算法,获得单只待校准超声波水表最优的分段校准系数。分段校准系数是对数学模型的分段线性表征,s5的具体步骤如下:s5: Based on the mathematical model, through the differential evolution algorithm, the optimal segmentation calibration coefficient of the single ultrasonic water meter to be calibrated is obtained. The piecewise calibration coefficients are for the mathematical model The piecewise linear representation of , the specific steps of s5 are as follows:
s5.1:基于测试组数据的平均流速值与()之间的欧氏距离定义目标函数,随机生成分段点位置β和分段校准系数α,以分段点位置β和分段校准系数α的允许范围作为约束条件,以参数设计变量;s5.1: Average flow velocity value based on test group data and( ) defines the objective function, randomly generates the segment point position β and the segment calibration coefficient α, and takes the allowable range of the segment point position β and the segment calibration coefficient α as the constraint condition, and uses the parameter design variable;
s5.2:设定差分进化算法对参数γ的搜索范围,初始化种群个体数目、最大迭代次数、交叉因子和变异因子;s5.2: Set the search range of the parameter γ by the differential evolution algorithm, initialize the number of individuals in the population, the maximum number of iterations, the crossover factor and the mutation factor;
s5.3:在参数γ的搜索范围内随机生成种群作为父代种群,迭代次数加1,根据目标函数和约束条件,计算父代种群中个体的适应度;s5.3: Randomly generate a population as the parent population within the search range of the parameter γ, add 1 to the number of iterations, and calculate the fitness of the individuals in the parent population according to the objective function and constraints;
s5.4:基于交叉因子与变异因子,在父代种群中随机选择个体进行交叉和变异,生成试验种群;s5.4: Based on the crossover factor and variation factor, randomly select individuals in the parent population for crossover and mutation to generate a test population;
s5.5:计算试验种群中个体的适应度,将父代种群与试验种群中个体的适应度进行比较,根据比较结果生成子代种群;s5.5: Calculate the fitness of individuals in the test population, compare the fitness of the parent population with that of the individuals in the test population, and generate offspring populations according to the comparison results;
s5.6:进行子代种群中个体的非支配排序;s5.6: Perform non-dominated sorting of individuals in the offspring population;
s5.7:计算子代种群中个体的拥挤距离,剔除拥挤距离相对较小的个体以保持子代种群个体数目与初始种群个体数目一致;s5.7: Calculate the crowding distance of individuals in the offspring population, and remove individuals with relatively small crowding distances to keep the number of individuals in the offspring population consistent with the number of individuals in the initial population;
s5.8:判断现有迭代次数是否到达最大迭代次数要求,若满足,则完成参数优化,结束流程;否则跳转至步骤s5.3。s5.8: Determine whether the existing number of iterations reaches the maximum number of iterations. If so, complete the parameter optimization and end the process; otherwise, jump to step s5.3.
s6:重复步骤s3至步骤s5,完成所有待校准超声波水表的流量校准。s6: Repeat steps s3 to s5 to complete the flow calibration of all ultrasonic water meters to be calibrated.
上述实施例是对本发明的具体实施方式的说明,而非对本发明的限制,有关技术领域的技术人员在不脱离本发明的精神和范围的情况下,还可做出各种变换和变化以得到相对应的等同的技术方案,因此所有等同的技术方案均应归入本发明的专利保护范围。The above-mentioned embodiments are descriptions of specific embodiments of the present invention, rather than limitations of the present invention. Those skilled in the art can also make various transformations and changes without departing from the spirit and scope of the present invention to obtain Corresponding and equivalent technical solutions, therefore all equivalent technical solutions should be included in the patent protection scope of the present invention.
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210168812.1A CN114235111B (en) | 2022-02-24 | 2022-02-24 | Ultrasonic water meter flow calibration method based on model optimization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210168812.1A CN114235111B (en) | 2022-02-24 | 2022-02-24 | Ultrasonic water meter flow calibration method based on model optimization |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114235111A CN114235111A (en) | 2022-03-25 |
CN114235111B true CN114235111B (en) | 2022-07-15 |
Family
ID=80747867
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210168812.1A Active CN114235111B (en) | 2022-02-24 | 2022-02-24 | Ultrasonic water meter flow calibration method based on model optimization |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114235111B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114485865B (en) * | 2022-04-15 | 2022-09-27 | 青岛鼎信通讯股份有限公司 | A flow calibration method for ultrasonic water meters based on Shannon entropy |
CN115950495B (en) * | 2023-02-09 | 2023-06-09 | 青岛鼎信通讯科技有限公司 | A Method for Adjusting Measurement Frequency of Ultrasonic Water Meter |
CN116793462B (en) * | 2023-08-21 | 2023-11-03 | 成都千嘉科技股份有限公司 | Calibration method and calibration device based on ultrasonic gas meter |
CN117109709B (en) * | 2023-10-20 | 2024-06-28 | 青岛鼎信通讯科技有限公司 | Ultrasonic water meter calibration method |
CN117268512B (en) * | 2023-11-23 | 2024-02-09 | 青岛鼎信通讯科技有限公司 | Consistency optimization method suitable for ultrasonic water meter |
CN117367527B (en) * | 2023-12-08 | 2024-03-19 | 青岛鼎信通讯科技有限公司 | Metering method capable of improving reliability of ultrasonic water meter |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101048645A (en) * | 2004-08-13 | 2007-10-03 | 恩特格里公司 | System and method for calibration of a flow device |
CN102435265A (en) * | 2011-09-19 | 2012-05-02 | 苏州聚元微电子有限公司 | Method for correcting precision of ultrasonic flowmeter by time difference method |
CN105181040A (en) * | 2015-09-25 | 2015-12-23 | 辽宁聚焦科技有限公司 | Method for digitized calibration and optimization of difference pressure flow meter |
CN107270983A (en) * | 2017-07-05 | 2017-10-20 | 青岛积成电子股份有限公司 | The method that data based on instantaneous delivery build ultrasonic flow model |
CN109724657A (en) * | 2018-12-29 | 2019-05-07 | 杭州莱宸科技有限公司 | Watermeter flowing rate metering method and system based on modified Delphi approach |
CN113033093A (en) * | 2021-03-24 | 2021-06-25 | 南京航空航天大学 | Simulation model-based system design parameter multi-objective optimization method |
-
2022
- 2022-02-24 CN CN202210168812.1A patent/CN114235111B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101048645A (en) * | 2004-08-13 | 2007-10-03 | 恩特格里公司 | System and method for calibration of a flow device |
CN102435265A (en) * | 2011-09-19 | 2012-05-02 | 苏州聚元微电子有限公司 | Method for correcting precision of ultrasonic flowmeter by time difference method |
CN105181040A (en) * | 2015-09-25 | 2015-12-23 | 辽宁聚焦科技有限公司 | Method for digitized calibration and optimization of difference pressure flow meter |
CN107270983A (en) * | 2017-07-05 | 2017-10-20 | 青岛积成电子股份有限公司 | The method that data based on instantaneous delivery build ultrasonic flow model |
CN109724657A (en) * | 2018-12-29 | 2019-05-07 | 杭州莱宸科技有限公司 | Watermeter flowing rate metering method and system based on modified Delphi approach |
CN113033093A (en) * | 2021-03-24 | 2021-06-25 | 南京航空航天大学 | Simulation model-based system design parameter multi-objective optimization method |
Non-Patent Citations (4)
Title |
---|
A Novel Mathematical Model for Transit-time Ultrasonic Flow Measurement;Lei Kang;《2019 IEEE International Ultrasonics Symposium (IUS)》;20191209;全文 * |
Neural-network-based error reduction in calibrating utility ultrasonic flow meters;B. Yazdanshenasshad;《Flow Measurement and Instrumentation》;20181011;全文 * |
Ultrasonic flow detection and research on regression analysis calibration method;Ming-liang Liu;《2012 International Conference on Systems and Informatics (ICSAI2012)》;20120625;全文 * |
基于回波峰值拟合的气体超声流量计信号处理;田雷;《电子测量与仪器学报》;20170731;第31卷(第7期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN114235111A (en) | 2022-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114235111B (en) | Ultrasonic water meter flow calibration method based on model optimization | |
Kirkpatrick et al. | Estimating the covariance structure of traits during growth and ageing, illustrated with lactation in dairy cattle | |
CN114964429A (en) | Ultrasonic water meter calibration method | |
CN106895890A (en) | A kind of multichannel ultrasonic gas flowmeter sound channel weight coefficient computational methods | |
CN116698141B (en) | Speed measurement error correction method and system for ultrasonic flowmeter under different working conditions | |
CN116147724B (en) | Metering method suitable for ultrasonic water meter | |
CN111125964A (en) | Sewage treatment process proxy model construction method based on kriging interpolation method | |
CN112818495B (en) | Dynamic correction method for novel pipeline pressure drop calculation algorithm parameters | |
CN116304968B (en) | Ultrasonic water meter flow data fusion method and device based on BP neural network | |
CN107152958A (en) | Mass flowmeter calibration detecting system and method based on multinomial algorithm | |
CN116187189A (en) | A physical model calibration method and system based on deep reinforcement learning | |
CN117109709B (en) | Ultrasonic water meter calibration method | |
CN103106332A (en) | Analysis method of measurement uncertainty degree | |
CN114485865B (en) | A flow calibration method for ultrasonic water meters based on Shannon entropy | |
CN114136387B (en) | Error Compensation Method of Multi-channel Ultrasonic Flowmeter Based on Support Vector Machine Model SVM Algorithm | |
CN110081943B (en) | Temperature compensation method for Coriolis mass flowmeter | |
CN114485863A (en) | Flow error correction method, system, computer and medium for ultrasonic water meter | |
CN116628396A (en) | Underwater equipment sound ray bending correction method based on smooth interpolation | |
US20220196008A1 (en) | Method for correcting pump model | |
CN213874575U (en) | Differential type standard meter method flow calibrating device | |
CN114924489A (en) | Model autonomous learning method suitable for process industry prediction control | |
CN115468633A (en) | Multi-point flowmeter correction method and device based on RBF neural network | |
CN114548417A (en) | Machine learning model training method and system based on data correction | |
CN113569467A (en) | Blast furnace tuyere raceway temperature soft measurement modeling method based on width learning | |
CN113340360B (en) | Secondary network system balance flow measurement 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: 266000 12 / F, 4b building, Dingxin science and Technology Industrial Park, No. 858, Huaguan Road, high tech Zone, Qingdao, Shandong Patentee after: QINGDAO TOPSCOMM COMMUNICATION Co.,Ltd. Country or region after: China Patentee after: Qingdao Zhidian New Energy Technology Co.,Ltd. Address before: 266000 12 / F, 4b building, Dingxin science and Technology Industrial Park, No. 858, Huaguan Road, high tech Zone, Qingdao, Shandong Patentee before: QINGDAO TOPSCOMM COMMUNICATION Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |