Embedded calibration control method and system for flow meters

CN122384953BActive Publication Date: 2026-08-14HANGZHOU WANDESI ENVIRONMENTAL PROTECTION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-16
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

而实际切换阀的机械动作与流路有效切换存在等效延迟,旁路管内容积导致介质到达延迟,流量计自身的阻尼/等效滤波使测量滞后,多设备轮询通信往返时延抖动、采样缓存延迟、设备侧时钟漂移等,会进一步打破多源数据在统一时间轴上的一致性,致使事件时间窗与介质等效时间窗不一致,导致误差对比结果随会话条件变化不可复现的问题

Benefits of technology

[0026]本发明以校准会话为基本单元,建立唯一的会话标识并以嵌入式校准控制器本地时钟作为统一时间基准,对被校流量计、称重装置、切换阀与旁路压力传感器的有效数据在入缓存时统一加盖本地时间戳,同时统计通讯往返时延抖动、时钟漂移与数据完整性等时标质量证据并与会话绑定存储。配合切换指令、阀位到位回执及压力可观测响应起始时刻的边沿证据固化,以及稳态建立与候选稳态区间筛选,使后续误差对比不再依赖单一事件时间戳或固定延时补偿,能够在多设备轮询抖动、缓存延迟与设备侧时钟不一致的条件下保持更稳定的对齐基础与复核依据。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122384953B_ABST
    Figure CN122384953B_ABST
Patent Text Reader

Abstract

This invention discloses an embedded calibration control method and system for flow meters, specifically relating to the field of calibration control technology. The method involves establishing a calibration session and generating a session identifier; timestamping data from the flow meter, weighing device, switching valve, and bypass pressure sensor to form a multi-source sampling sequence; and statistically analyzing communication round-trip delay jitter, clock drift, and data integrity metrics, binding and storing these metrics with the session identifier. When interlocking conditions are met, the system enters calibration mode, solidifies the edge evidence set, and obtains candidate steady-state intervals. It identifies the alignment parameter set online and calculates the alignment confidence synthesis; when the alignment threshold is reached, it extracts the effective weighing window and constructs a medium equivalent time window; within the medium equivalent time window, it forms an error sample set, generates candidate calibration coefficient versions, calculates the coefficient validity confidence synthesis, and when the submission threshold is reached, writes it to non-volatile storage and solidifies the evidence chain, enabling atomic switching and rolling back within the acceptance window.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of calibration control technology, and more specifically, to an embedded calibration control method and system for flow meters. Background Technology

[0002] Flow meters, as key instruments for metering and control in industrial processes, are widely used in chemical, water treatment, energy, and manufacturing industries. Flow meters operate online for extended periods, and deviations can gradually develop due to changes in medium conditions, sensor aging, installation, and pipeline conditions. On-site calibration or periodic verification is typically employed to ensure traceability of measurement results. Existing projects often use switching valves to switch the fluid from the operating path to the calibration path, adding reference devices such as weighing devices to measure the passing medium, and collecting auxiliary signals such as bypass pressure to ensure calibration is performed without altering the on-site process flow path.

[0003] However, existing online calibration processes still exhibit some uncertainty in the timing correspondence between reference and calibrated data. Most solutions use event timestamps such as the switching command time and valve position confirmation time to extract the comparison window, or employ fixed delay compensation to complete the data sequences from different devices. However, the actual mechanical action of the switching valve and the effective switching of the flow path have equivalent delays; the bypass pipe volume causes media arrival delays; the flow meter's own damping / equivalent filtering causes measurement lags; and jitter from round-trip communication via multi-device polling, sampling buffer delays, and device-side clock drift further disrupt the consistency of multi-source data on a unified time axis. This leads to inconsistencies between the event time window and the media's equivalent time window, resulting in unreproducible error comparison results that change with session conditions.

[0004] In addition, online calibration generally involves multi-source sampling sequences, evidence at the edge of the switching process, selection of steady-state intervals, construction of error samples, writing of coefficients and rollback, etc. If there is a lack of session-level indexing and evidence solidification mechanism, it is easy to cause problems such as mixing of different session samples, difficulty in verifying the basis for window selection, and difficulty in tracing the reasons for coefficient changes. Summary of the Invention

[0005] In order to overcome the above-mentioned defects of the prior art, embodiments of the present invention provide an embedded calibration control method and system for flow meters to solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] An embedded calibration control method for flow meters includes the following steps:

[0008] Step 1: Establish a calibration session and generate a unique session identifier. Using the local clock of the embedded calibration controller as a unified time reference, all valid data from the flow meter, weighing device, switching valve and bypass pressure sensor under calibration are uniformly stamped with local timestamps to form a multi-source sampling sequence under a unified time axis. The communication round-trip delay jitter index, clock drift index and data integrity index set are statistically analyzed and bound to the session identifier for storage.

[0009] Step 2: After the interlock condition is met, a switching command is sent to the switching valve to switch the fluid from normal operating condition to calibration flow path to enter calibration condition. The switching command time, the switching valve arrival confirmation time, and the start time of observable response of pressure or flow signal are recorded and solidified into edge evidence set. After the flow path enters calibration condition, steady state establishment and steady state determination are performed, and candidate steady state intervals are output.

[0010] Step 3: Based on the multi-source sampling sequence under a unified time axis, the alignment parameter set is identified online by combining the edge evidence set and the candidate steady-state interval, and the alignment confidence comprehensive quantity is calculated as the gating condition; when the alignment confidence comprehensive quantity reaches the alignment threshold, the effective weighing window is extracted by the symmetrical resampling sequence, and the effective weighing window is mapped onto the flow meter sequence under calibration according to the alignment parameter set to construct the medium equivalent time window;

[0011] Step 4: Construct error samples and calculate relative errors within the media equivalent time window to form an error sample set; generate candidate calibration coefficient versions based on the error sample set, and calculate the coefficient effective confidence comprehensive quantity as the basis for the effective decision; when the coefficient effective confidence comprehensive quantity reaches the submission threshold, write the candidate calibration coefficient version into non-volatile storage and solidify the evidence chain, and use an atomic switching method to make the candidate calibration coefficient version effective.

[0012] In a preferred embodiment, in step one, the communication round-trip delay jitter index is used to characterize the fluctuation amplitude of the communication round-trip delay within the session, the clock drift index is used to characterize the drift speed of the device-side time relative to the local time of the embedded calibration controller, and the data integrity index set includes at least packet loss rate, sequence number breakage rate and resampling interpolation ratio. The above indicators are bound and stored with the session identifier and used for subsequent calculation of the alignment confidence synthesis quantity.

[0013] In a preferred embodiment, in step two, the edge evidence set includes at least the switching command time, the switching valve arrival confirmation time, and the start time of the observable response of the pressure or flow signal, and the original sampling segments corresponding to the above times are solidified; the steady-state determination considers both short-term fluctuation amplitude and trend term. When the fluctuation scale of the flow sequence is less than the first threshold and the trend scale is less than the second threshold, and the fluctuation scale of the bypass pressure sequence is also less than the corresponding threshold, the interval is determined to meet the steady-state condition and a candidate steady-state interval is output.

[0014] In a preferred embodiment, in step three, the alignment parameter set includes at least the equivalent delay from the switching valve action to the effective switching of the flow path, the measurement lag caused by the damping or equivalent filtering of the flowmeter being calibrated, and the medium arrival delay caused by the volume of the bypass pipe; the alignment confidence composite quantity is obtained by weighted fusion of multiple evidence components, which include at least the communication jitter component, clock drift component, data integrity component, edge identifiability component, delay stability component, and the interpretability component of the aligned residual.

[0015] In a preferred embodiment, the edge identifiability component is obtained by mapping the difference between the maximum peak amplitude and the second largest peak amplitude of the cross-correlation, and the delay stability component is obtained by mapping the dispersion of the hysteresis estimates under multiple edge windows; when the alignment confidence synthesis is lower than the alignment threshold, the construction of the medium equivalent time window is terminated and the calibration session is marked as alignment unreliable.

[0016] In a preferred embodiment, in step three, the effective weighing window is extracted as follows: the short-time slope of the mass increment sequence obtained by the symmetric resampling sequence is calculated, segments with significant slope jumps or high-frequency oscillation energy exceeding the limit are identified and eliminated, and the interval in the remaining segments where the mass increases linearly with time is selected as the effective weighing window, and the linear fitting determination coefficient and the proportion of linear segments of the window are calculated.

[0017] In a preferred embodiment, the mass increment within the effective weighing window is converted into the reference volume increment, and the cumulative increment of the flowmeter under calibration or the instantaneous flow integral within the media equivalent time window is used as the volume increment under calibration, and the relative error between the two is calculated; when there are multiple target flow points in the same calibration session, corresponding error samples are obtained respectively.

[0018] In a preferred embodiment, in step four, the calculation of the coefficient effective confidence synthesis depends on the alignment confidence synthesis: when the alignment confidence synthesis is lower than the alignment threshold, the coefficient effective confidence synthesis is set to zero; when the alignment confidence synthesis reaches the alignment threshold, the coefficient effective confidence synthesis is obtained by weighting the alignment confidence synthesis with multiple submission confidence components, and the submission confidence components include at least the weighing effective window quality component, the error convergence improvement component, the multi-point consistency component, and the coefficient change risk component.

[0019] In a preferred embodiment, the effective weighing window mass component is obtained by fusing the linear fitting determination coefficient, the proportion of linear segments, and the proportion of oscillation contamination of the effective weighing window; the error convergence improvement component is determined by the relative improvement rate of the back-substitution residual of the current effective calibration coefficient version relative to the back-substitution residual of the candidate calibration coefficient version; the multi-point consistency component is obtained by mapping the dispersion of error samples at multiple flow points within the same calibration session; the coefficient change risk component is determined by the ratio of the maximum change between the candidate calibration coefficient version and the current effective calibration coefficient version to the allowable change range; and, after the candidate calibration coefficient version takes effect using an atomic switching method, an acceptance window is set, and within the acceptance window, it is determined whether to trigger a rollback based on the error improvement situation. During rollback, the current effective calibration coefficient version is switched back to the previous effective calibration coefficient version, and the rollback reason and acceptance data are written into the evidence chain.

[0020] In a preferred embodiment, the following modules are included:

[0021] The session acquisition module is used to establish a calibration session and generate a unique session identifier. Using the local clock as a unified time reference, it adds a local timestamp to the valid data from the flow meter, weighing device, switching valve and bypass pressure sensor to form a multi-source sampling sequence. It also counts the communication round-trip delay jitter index, clock drift index and data integrity index set and binds and stores them with the session identifier.

[0022] The working condition solidification module is used to send a switching command to the switching valve after the interlocking conditions are met, so that the fluid switches to the calibration flow path to enter the calibration working condition, records and solidifies the edge evidence set, and performs steady state establishment and steady state determination to output candidate steady state intervals.

[0023] The alignment windowing module is used to identify the alignment parameter set online and calculate the alignment confidence composite quantity as a gate condition. When the alignment confidence composite quantity reaches the alignment threshold, the effective weighing window is extracted and the medium equivalent time window is constructed.

[0024] The coefficient activation module is used to construct error samples and calculate relative errors within the media equivalent time window to form an error sample set, generate candidate calibration coefficient versions and calculate the coefficient activation confidence comprehensive quantity. When the coefficient activation confidence comprehensive quantity reaches the submission threshold, the candidate calibration coefficient version is written to non-volatile storage and the evidence chain is solidified. It takes effect in an atomic switching manner and automatically performs rollback according to the error improvement situation within the acceptance window.

[0025] The technical effects and advantages of this invention are as follows:

[0026] This invention uses a calibration session as the basic unit, establishing a unique session identifier and using the local clock of the embedded calibration controller as a unified time reference. Valid data from the flow meter, weighing device, switching valve, and bypass pressure sensor being calibrated are uniformly timestamped when buffered. Simultaneously, it statistically analyzes time-stamped quality evidence such as communication round-trip delay jitter, clock drift, and data integrity, and stores this evidence in conjunction with the session. Combined with the solidification of edge evidence from switching commands, valve position confirmation, and the start of observable pressure responses, as well as steady-state establishment and candidate steady-state interval screening, subsequent error comparisons no longer rely on single-event timestamps or fixed delay compensation. This allows for a more stable alignment basis and verification standard even under conditions of multi-device polling jitter, buffer delay, and inconsistencies between device-side clocks.

[0027] Based on this, the present invention identifies online alignment parameter sets such as the equivalent delay of switching valves, the damping or equivalent filtering hysteresis of flow meters, and the arrival delay of bypass media. It then uses a weighted average of multiple evidence components to form a reliable alignment composite as a gating condition. Only when the gating passes is the effective weighing window extracted and the equivalent time window of the medium mapped, physically ensuring that the reference end and the calibrated end correspond to the same medium segment. Furthermore, candidate calibration coefficient versions are generated based on the error sample set, and the coefficient effectiveness reliability composite constrains the writing and effectiveness process. Combined with evidence chain solidification, non-volatile storage atomic switching, and an acceptance window rollback mechanism, submission is automatically blocked in unreliable sessions, and rapid rollback is possible after abnormal effectiveness, thereby reducing the risk of calibration failure and improving calibration quality auditing and traceability capabilities. Attached Figure Description

[0028] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings;

[0029] Figure 1 This is a flowchart illustrating the embedded calibration control method for flow meters according to the present invention.

[0030] Figure 2 This is a timing diagram of the embedded calibration control method for flow meters according to the present invention;

[0031] Figure 3 This is a schematic diagram of the embedded calibration control system for flow meters according to the present invention. Detailed Implementation

[0032] 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.

[0033] Example 1: The embedded calibration control method of the present invention for flow meters, such as... Figure 1 As shown, it includes the following steps:

[0034] like Figure 2 As shown, after receiving the online calibration trigger command, the embedded calibration controller establishes a calibration session and generates a session identifier, and then completes multi-source sampling, interlock determination, alignment windowing, and coefficient activation closed loop.

[0035] Step one: Upon receiving the online calibration command, the embedded calibration controller first establishes a calibration session and generates a session identifier. This session identifier serves as the identifier for subsequent data acquisition, alignment calculations, coefficient writing, and auditing. It binds the raw data, statistics, and output results generated in the same online calibration session, preventing sample mixing in different sessions that could lead to traceability difficulties or unclear error attribution. After establishing the session, the embedded calibration controller reads the operating status and parameters of the flowmeter being calibrated, including at least whether the measurement output is valid, whether the range and unit meet the set specifications, and whether the damping parameters or equivalent filter parameters are within the allowable range. It also reads the zero point and sampling channel status of the weighing device and verifies whether the switching valve position feedback and position confirmation are consistent, and whether the bypass pressure sensor can output continuously and stably. This ensures session-level confirmation is completed without altering the on-site process flow path.

[0036] After completing the status confirmation, the embedded calibration controller uses its local clock as the unified time reference within the calibration session. It uniformly adds a local timestamp to each valid data point from the flow meter, weighing device, switching valve, and bypass pressure sensor upon entering the buffer, and simultaneously records the corresponding device-side serial number, register read cycle, and communication round-trip latency information to form a multi-source sampling sequence under a unified timeline. By unifying the timestamp when data enters the session buffer, rather than performing coarse alignment in the post-processing stage, it can significantly reduce timestamp drift caused by bus polling jitter, sampling buffer latency, and inconsistencies in the device-side internal clocks, thus providing a basis for subsequent alignment parameter sets. The identification provides a consistent temporal basis.

[0037] To ensure subsequent alignment of the confidence synthesis quantity The calculations have auditable input evidence. Within a preset observation period after session establishment, the embedded calibration controller statistically analyzes the communication and sampling quality of each channel, obtaining at least the communication round-trip delay jitter index. Clock drift index With data integrity metrics set The aforementioned statistics are then bound and stored along with the session identifier. The fluctuation range of round-trip latency in intra-session communication can be represented by the quantile difference of round-trip latency from multiple polling iterations, for example... ,in For the round-trip time of a single polling, and These are the 95th percentile and the 5th percentile, respectively; The drift rate of the device-side time relative to the local time of the embedded calibration controller can be obtained from the trend of the time-varying sequence of the difference between the device-side timestamp and the local timestamp, for example, the slope obtained by linear fitting of the difference sequence. The packet loss rate is used to reflect the proportion of missing points among the expected sampling points within the preset observation period. The serial number breakage rate is used to reflect the frequency of serial number discontinuities on the equipment side. The resampling interpolation ratio reflects the proportion of data that needs to be interpolated during the unified timeline reconstruction process. The higher the interpolation ratio, the more unstable the original sampling beat or the sparser the effective data.

[0038] Furthermore, to clarify the input and output boundaries of step one, the inputs of the embedded calibration controller in this step include at least the output sequence of the flowmeter being calibrated, the weighing sampling sequence, the switching valve position feedback sequence, the bypass pressure sequence, the device-side serial number, the register read cycle, and the communication round-trip delay information corresponding to each polling cycle; the outputs of this step include at least the multi-source sampling sequence under a unified time axis, the communication round-trip delay jitter index, the clock drift index, the data integrity index set, and the session-level cache index corresponding to the multi-source sampling sequence. By explicitly associating the input source, the unified time-scale process, and the output results in step one, it can be ensured that the subsequent alignment parameter set identification, weighing effective window extraction, and media equivalent time window construction are all performed based on traceable data within the same session.

[0039] As an implementable approach, the preset observation duration can be set to 30 to 120 seconds, preferably 60 seconds, based on the on-site sampling rhythm and polling cycle. Within this preset observation duration, if the number of effective sampling points for the flow meter, weighing device, switching valve, and bypass pressure sensor all reach the preset minimum number of sampling points, then the session is considered to have the basic conditions to enter the subsequent alignment calculation. If the number of effective sampling points for any channel is lower than the preset minimum number of sampling points, or if the sequence breakage rate, packet loss rate, or resampling interpolation ratio exceeds the preset limit, then only the original sampling sequence and time-stamped quality statistics of the current session are retained, and the session is not included in the subsequent alignment parameter set identification.

[0040] In a numerical example, when the sampling period of each channel is 100 milliseconds and the preset observation duration is 60 seconds, the theoretical number of sampling points for each channel is 600. When the number of effective sampling points in any channel is less than 540, or the resampling interpolation ratio exceeds 10%, the session can be marked as having insufficient basic sampling quality and retained only as a diagnostic record, without participating in the actual calibration calculations in steps three and four.

[0041] After obtaining the aforementioned time-scaled quality statistics, the embedded calibration controller resamples and aligns the multi-source sampling sequences with the time reference to ensure that the output sequence of the flowmeter under calibration, the weighing sampling sequence, the switching valve position sequence, and the bypass pressure sequence have corresponding relationships on the same time axis. The resampled sequence is used as the basic data set for this calibration session, and subsequent calibration session establishment and unified acquisition of multi-source data are performed. Through the above steps, evidence such as communication jitter, clock drift, and data integrity can be solidified within the session range, enabling subsequent alignment of the parameter set. The estimated and aligned confidence composite quantity The solutions all have repeatable and interpretable input conditions, thus solving the alignment error problem where the online calibration event time window is not equal to the medium equivalent time window.

[0042] Step two: After completing the calibration session establishment and multi-source timescale unified acquisition in step one, the embedded calibration controller enters the calibration condition construction stage to ensure the subsequent alignment parameter set. The identification process involves a identifiable stimulus response and forms verifiable edge evidence. The embedded calibration controller first reads the current flow path status, confirming that the flow meter under calibration is in normal measurement output mode, the weighing device is in measurable mode, and the bypass pressure sensor output is continuous and stable. After meeting the preset interlock conditions, it issues a switching command to the switching valve, switching the fluid from normal operating conditions to the calibration flow path. The calibration flow path can be a bypass diversion flow into the weighing device and then back to the return water tank, or a bypass closed loop structure, depending on the on-site pipeline network structure. Regardless of the structure used, the embedded calibration controller continuously acquires the instantaneous flow sequence of the flow meter under calibration, the bypass pressure sequence, the weighing sampling sequence, and the valve position feedback sequence of the switching valve through continuous acquisition from before the switching action to during the switching action to after the switching action, and binds and stores the above sequences with the calibration session identifier.

[0043] To ensure the switching process is time-traceable and data-driven for delay estimation, the embedded calibration controller records the first event timestamp at the start of the switching valve's action. Record the second event timestamp when the valve position feedback is valid and the valve position feedback enters the target range. It continuously monitors the response changes of bypass pressure and the output of the calibrated flow meter. When the bypass pressure or the output of the calibrated flow meter shows a step response or inflection point response exceeding a preset threshold within a short time window, the start time of the response is recorded as a third event timestamp. .in, Characterizes the moment when the embedded calibration controller issues a switching command. Characterizes the moment when the switching valve mechanically reaches its position and establishes stable valve position feedback. This characterizes the moment when a flow path switch produces an observable response to the pressure or flow signal. By embedding the above event timestamps together with the corresponding original sampling segments, the embedded calibration controller forms an edge evidence set. This edge evidence set is not only used for selecting candidate windows for subsequent cross-correlation estimation, but also for evaluating whether valve actions truly affect the flow path and whether there are any anomalies where the valve position feedback is inconsistent with the actual flow path, thereby avoiding entering the subsequent calibration process when the switch has not occurred effectively.

[0044] After the switching valve is in place and the flow path is confirmed to be in calibration condition, the embedded calibration controller further performs steady-state establishment to form a sustainable target flow point under the calibration flow path. Steady-state establishment can be achieved through a regulating valve or a variable frequency pump. The embedded calibration controller uses the instantaneous flow rate of the flow meter being calibrated as the primary feedback quantity and the bypass pressure as an auxiliary constraint quantity, gradually adjusting the control quantity according to the preset target flow rate value, so that the output of the flow meter being calibrated converges near the target value. To avoid pseudo-steady-states that appear stable but are actually slowly drifting due to factors such as valve hysteresis and pump pressure fluctuations, this embodiment considers both short-term fluctuation amplitude and trend term when determining steady state: the embedded calibration controller calculates the fluctuation scale of the flow sequence within the candidate steady-state interval. With trend scale ,in The standard deviation or peak-to-peak value of the flow rate sequence within the specified interval can be taken. The absolute value of the slope of the first-order linear fit of the flow sequence within the interval can be taken; when Less than the first threshold and If the flow rate is less than the second threshold, and the fluctuation scale of the bypass pressure sequence is also less than the corresponding threshold, the interval is determined to meet the steady-state condition and a candidate steady-state interval is output. The first threshold is used to constrain short-term noise and disturbances, and the second threshold is used to constrain slow drift. Both can be set as configurable parameters according to the damping parameters of the flowmeter being calibrated, the bypass pipe diameter, and the target flow point to adapt to the dynamic characteristics of different sites.

[0045] To ensure that steady-state determination has a directly implementable parameter basis, the first threshold, the second threshold, and the threshold corresponding to the bypass pressure sequence can be set using a "default value plus on-site fine-tuning" method. Specifically, the first threshold is used to constrain the short-term fluctuation amplitude within the candidate steady-state interval and can be determined according to a certain proportion of the target flow rate value; the second threshold is used to constrain the slow drift within the candidate steady-state interval and can be determined according to the allowable change proportion of the target flow rate value per unit time; the threshold corresponding to the bypass pressure sequence is used to constrain the stability of the bypass pressure after flow path switching and can be determined based on the bypass pipe diameter, valve adjustment sensitivity, and on-site pump control fluctuation range.

[0046] In a preferred embodiment, when the medium being calibrated is a room temperature liquid, the target flow rate is 5 cubic meters per hour, and the sampling period is 100 milliseconds, the fluctuation scale threshold of the flow rate sequence can be 0.8% of the target flow rate value, the trend scale threshold can be 0.15% of the target flow rate value per second, and the fluctuation scale threshold of the bypass pressure sequence can be 1.2 kPa. When the target flow rate increases to 8 cubic meters per hour, the fluctuation scale threshold of the flow rate sequence can be widened proportionally with the target flow rate value, while the trend scale threshold remains no higher than 0.2% of the target flow rate value per second.

[0047] Furthermore, if the damping parameter of the flow meter being calibrated increases or the equivalent filter time constant increases, the steady-state establishment waiting time can be appropriately extended, and the short-time fluctuation scale threshold can be relaxed accordingly. If the bypass pipe diameter decreases, the valve hysteresis increases, or the pressure fluctuation caused by pump regulation increases, it is preferable to increase the threshold corresponding to the bypass pressure sequence and extend the minimum length of the candidate steady-state interval to avoid misjudging the transient tail as the steady-state interval.

[0048] Step three: After obtaining the candidate steady-state intervals and edge evidence sets output in step two, the embedded calibration controller enters the alignment and window construction stage to address the critical issue of unreproducible errors caused by event time window comparisons in online calibration. This step uses multi-source sampling sequences under a unified time axis as the processing object to identify the alignment parameter set online within the calibration session. Based on this, a medium-equivalent time window is constructed, and the aligned confidence synthesis quantity is calculated. As a gating condition.

[0049] In this embodiment, the alignment parameter set Recorded as ,in Characterizes the equivalent delay from the action of the switching valve to the effective switching of the flow path. Characterize the measurement hysteresis caused by the damping or equivalent filtering of the flowmeter being calibrated. The delay in medium arrival is characterized by the volume of the bypass pipe from the branch point to the weighing device inlet. The embedded calibration controller first uses the edge evidence set solidified in step two to select several edge windows near the candidate steady-state interval. It then performs cross-correlation or edge matching between the instantaneous flow sequence of the flowmeter under calibration and the bypass pressure sequence, and between the bypass pressure sequence and the weighing sampling sequence, respectively, to obtain the candidate hysteresis between each pair of signals. To avoid false correlation peaks caused by noise or periodic disturbances, the embedded calibration controller calculates the maximum peak amplitude of the cross-correlation within each edge window. and the second largest peak amplitude The difference between the two is used as a measure of edge identifiability; at the same time, multiple edge windows are selected within the same calibration session to repeatedly estimate the hysteresis, and the variance of the hysteresis set is obtained. This is used to measure the stability of lag estimation. The maximum peak amplitude of the cross-correlation function is represented by the following. The second-largest peak amplitude of the cross-correlation function is represented by the following. This indicates the degree of dispersion of the hysteresis estimates obtained under multiple edge windows. The embedded calibration controller uses this to filter out candidate hysteresis results with non-sharp peaks or excessively large dispersion, forming a session-level aligned delay estimate. Combined with the damping parameters of the flowmeter being calibrated or the filtered equivalent time constant recorded in step one, the session-level delay is further decomposed into... , and The combination relationship. For This embodiment allows the initial value calculated from the bypass geometric parameters to be used as a priori. For example, the equivalent volume can be obtained from the bypass pipe section length and pipe diameter, and the initial arrival delay can be obtained by converting the target flow point. Within the same session, the delay should be automatically updated according to the rule that the delay should change when the flow point changes, thereby avoiding the failure of fixed delay compensation when the valve ages, the damping parameter is adjusted, or the flow point is switched.

[0050] Furthermore, to facilitate the identification process of the alignment parameter set, the embedded calibration controller performs a discrete search for candidate hysteresis quantities within each edge window. As one possible implementation, the instantaneous flow sequence, bypass pressure sequence, or weighing sampling sequence of the flowmeter under calibration can be shifted point-by-point within a preset search range at a fixed time step, and the corresponding cross-correlation value or edge matching score can be calculated at each candidate hysteresis position. The candidate hysteresis position with the largest cross-correlation value or edge matching score is taken as the candidate hysteresis quantity under that edge window. The preset search range can be set to 0 to 3 seconds, preferably 0 to 2 seconds, based on the switching valve response speed, bypass length, and target flow point; the time step can be set to 10 to 50 milliseconds based on the resampling interval of a unified time axis.

[0051] To avoid distortion of candidate hysteresis due to periodic disturbances, local noise, or single anomalous sampling, the embedded calibration controller also performs consistency screening on candidate hysteresis obtained from multiple edge windows: when the difference between the maximum peak amplitude and the second largest peak amplitude of the cross-correlation corresponding to a certain edge window is lower than a preset difference threshold, the identification result of that edge window is marked as insufficiently identifiable; when the dispersion of candidate hysteresis obtained from multiple edge windows exceeds the maximum allowable variance, outlier window results are removed and then statistical fusion is performed on the remaining results. The statistical fusion can be achieved by using the median, the average value after removing extreme values, or a weighted average based on the identifiability of the edge.

[0052] In a numerical example, when the resampling interval of the unified time axis is 10 milliseconds and the preset search range is 0 to 2 seconds, each edge window needs to compare 201 candidate lag positions. If the candidate lag values ​​of four out of five consecutive edge windows are concentrated between 0.38 seconds and 0.44 seconds, while the candidate lag value of another window is 1.1 seconds, and the difference between the maximum peak amplitude and the second largest peak amplitude of the cross-correlation of that window is significantly lower, then the result of 1.1 seconds can be removed as an abnormal window result, and the median of the remaining window results can be used as the basis for the effective lag estimation of that session.

[0053] After obtaining the candidate alignment parameter set Afterwards, the embedded calibration controller does not immediately proceed to error calculation, but first calculates the alignment confidence synthesis. This is used to determine whether the alignment result of this session is reliable. The definition adopts a weighted fusion method of multiple evidence components:

[0054] ;

[0055] in, The weighting coefficients are the weighting factors. Based on field application experience, a set of default weights can be set, for example... , , , , , It also allows users to make minor adjustments based on actual working conditions during initial use; The evidentiary components associated with the alignment confidence synthesis include at least the communication jitter component, clock drift component, data integrity component, edge identifiability component, delay stability component, and post-alignment residual interpretability component.

[0056] As a feasible way of obtaining values, The evidentiary components associated with the alignment confidence synthesis include at least:

[0057] Communication jitter component The communication round-trip delay jitter index obtained from step one Mapped to obtain;

[0058] Clock drift component The clock drift index obtained from step one Mapped to obtain;

[0059] Data integrity components The set of data integrity indicators obtained from step one The result of fusion;

[0060] Edge discernibility components The peak amplitude of the cross-correlation obtained from step two and the second largest peak The difference mapping is obtained;

[0061] Delay stability components The lag estimate variance obtained from step two Mapped to obtain;

[0062] Aligned residual interpretability components : Residual energy after applying candidate alignment parameters The mapping is obtained.

[0063] All six components mentioned above need to be normalized to the [0,1] interval. The specific mapping method is as follows, taking linear normalization as an example:

[0064] ;in The preset maximum allowable jitter threshold (e.g., 50ms) is used when The jitter component is 0;

[0065] ;

[0066] in The maximum allowable drift rate (e.g., 0.1%).

[0067] ;

[0068] like Then take 0;

[0069] ;

[0070] in To allow for the maximum variance;

[0071] ;in To allow the maximum residual energy.

[0072] The above threshold (e.g.) It can be set according to the actual site conditions or measurement requirements.

[0073] Furthermore, to ensure a unified parameter source for the mapping process of communication jitter components, clock drift components, data integrity components, edge identifiability components, delay stability components, and post-alignment residual interpretability components, the maximum permissible jitter threshold, maximum permissible drift rate, maximum permissible variance, and maximum permissible residual energy can all be set using a combination of historical successful session statistics and metrological accuracy requirements. Specifically, the maximum permissible jitter threshold can be determined based on the upper quantile of the communication round-trip delay jitter index in recent successful sessions; the maximum permissible drift rate can be determined based on the upper bound of the drift from a long-term comparison between the device-side time and the local time; the maximum permissible variance can be set based on the stability requirements of candidate hysteresis under multiple edge windows; and the maximum permissible residual energy can be set based on the post-alignment residual statistics between the reference sequence and the aligned sequence after applying candidate alignment parameters.

[0074] The alignment residual energy can be determined by the normalized mean square residual of the corresponding sequence of the flowmeter being calibrated and the corresponding sequence of the reference end within the same edge window or the same candidate steady-state interval after applying the candidate alignment parameter set. When the alignment residual energy is small and consistent across multiple edge windows, it indicates that the alignment parameter set matches the actual physical process better. When the alignment residual energy is large, even if the cross-correlation peak is high, the alignment confidence synthesis should be reduced to avoid mistakenly passing the incorrect alignment result through the gating based solely on local peak values.

[0075] In a numerical example, the maximum permissible jitter threshold can be 50 milliseconds, the maximum permissible drift rate can be 0.1 percent, the maximum permissible variance can be the square of 0.04 seconds, and the maximum permissible residual energy can be set according to the 95th percentile value obtained from the statistics of historical successful sessions. When the communication round-trip delay jitter index is 20 milliseconds, the clock drift index is 0.03 percent, the hysteresis estimation variance is the square of 0.01 seconds, and the residual energy after alignment is lower than the maximum permissible residual energy, the corresponding components can all maintain a high value, thus making it easier for the session to pass the alignment gate.

[0076] Embedded calibration controller will With alignment threshold Comparison, for example ,when When this occurs, the session is marked as unreliable for alignment and the construction of the medium equivalent time window is terminated. Only alignment evidence and the reason for failure are retained and written into the calibration session record, thereby avoiding misjudging alignment errors as flowmeter drift and introducing incorrect calibration. At that time, the embedded calibration controller enters the weighing effective window extraction and the medium equivalent time window construction.

[0077] In the effective weighing window extraction stage, the embedded calibration controller uses the weighing sampling sequence as the object and performs piecewise fitting processing on the weighing curve to address the influence of liquid inlet impact and liquid surface oscillation on the weighing slope after the switching valve operation. Specifically, the controller calculates the short-time slope sequence of the weighing mass increment sequence under a unified time axis and identifies segments with significant slope jumps or high-frequency oscillation energy exceeding limits, classifying them as nonlinear segments and removing them. Subsequently, from the remaining segments, the interval where the mass increases stably and linearly with time is selected as the effective weighing window, and the linear fitting determination coefficient is calculated for this effective window. proportion of linear segments ,in Used to characterize the linearity of the effective weighing window. This represents the proportion of the effective weighing window duration to the total duration of the current weighing segment. After obtaining the effective weighing window, the embedded calibration controller uses the alignment parameter set... The effective weighing window is mapped onto the sequence of flowmeters under calibration, constructing a corresponding media equivalent time window. This ensures that the cumulative or instantaneous integral of the flowmeters under calibration within this time window physically corresponds to the throughput of the same segment of media as the increase in weighing mass. Therefore, the media equivalent time window output in this step no longer relies on simple event start and end timestamps, but achieves equivalent alignment through in-session alignment parameter identification and effective window filtering. This provides a verifiable and traceable input basis for error calculation and coefficient updates in step four.

[0078] At the end of this step, the embedded calibration controller will align the parameter set. Alignment confidence composite The effective weighing window and its fingerprint information, the media equivalent time window, and the associated edge evidence set are bound and stored together with the calibration session identifier, so that subsequent coefficient version updates can refer to a clear alignment evidence chain, and support retrospective verification of whether the alignment is valid and whether the window is valid in the event of a calibration dispute.

[0079] Step four: The embedded calibration controller has obtained the media equivalent time window and aligned the confident synthesis quantity in step three. Provided the threshold conditions are met, the process proceeds to the error calculation and coefficient activation control stage. This step is based on the premise that the reference quantity and the calibrated quantity within the media equivalent time window share the same physical object. First, verifiable error samples are generated within the window. Then, candidate calibration coefficient versions are generated at the session level, and the coefficient activation confidence comprehensive quantity is used. Achieve closed-loop control for coefficient writing, activation, acceptance, and rollback.

[0080] During the error sample construction process, the embedded calibration controller uses the effective weighing window output in step three as the reference data source, and uses the medium equivalent time window mapped from this effective weighing window as the value range of the calibrated end. For the calculation of the reference quantity, this embodiment uses the mass increment of the weighing device within the effective weighing window. The basic quantity, of which The mass increment is calculated by subtracting the starting mass value from the ending mass value within the effective weighing window. When the output of the flow meter being calibrated is a volumetric flow rate or a cumulative volume, the embedded calibration controller converts the mass increment into a reference volume increment. It can be determined by the following formula:

[0081] ;

[0082] in, Let T be the density of the medium, and T be the temperature of the medium, which is provided by a bypass temperature sensor or a process temperature signal; when temperature measurement conditions are not available on-site. A fixed density approximation can be used, and the density source used can be noted in the session log. For the calculation of the quantity being calibrated, the embedded calibration controller reads the window increment of the cumulative quantity sequence of the flowmeter being calibrated within the media equivalent time window. That is, take the cumulative value at the end of the window minus the cumulative value at the beginning; if the flow meter being calibrated only provides an instantaneous flow sequence, then integrate the instantaneous flow within the medium equivalent time window under a unified time axis to obtain the result. Based on this, the embedded calibration controller calculates the relative error e corresponding to this flow point, which can be defined, for example, by the following formula:

[0083] ;

[0084] in, For reference volume increment, This represents the volume increment being calibrated. To improve repeatability, this embodiment allows setting multiple target flow points within the same calibration session to repeatedly execute steps two and three, obtaining corresponding error samples for each. , where M is the number of effective flow points; when a flow point passes the alignment gate in step three but the effective weighing window is too short or the linearity is insufficient, the error sample of that point is marked as low confidence and does not participate in the subsequent coefficient fitting, but is only retained as a diagnostic record.

[0085] During the generation of candidate calibration coefficient versions, the embedded calibration controller uses the set of error samples as input to form candidate calibration coefficient versions. and compare it with the currently effective version. Conduct comparative management. The aforementioned... It can be a combination of zero-point correction coefficient and slope coefficient, or a lookup table coefficient set segmented by flow range. The specific form can be consistent with the coefficient structure of the flowmeter being calibrated, so that it can be written to the end side and read by the upper-level system. (In generating...) Subsequently, the embedded calibration controller does not take effect directly, but instead calculates the coefficient effective reliability comprehensive quantity. As the basis for effective decision-making, and in conjunction with the results obtained in step three. Establishing strong dependencies, such that prohibiting commits if alignment is untrusted, is solidified in the control logic. It can be determined as follows:

[0086] ;

[0087] in, Alignment threshold; The weighting coefficients are satisfied. ,For example ; To submit the credibility component, the value range is [0,1]. As defined above, when... When the threshold is not reached The coefficients are directly set to zero, thus ensuring that no coefficient writing or activation occurs if the media equivalence time window cannot be proven to be valid, avoiding misjudging alignment errors as drift and damaging the flow meter being calibrated.

[0088] Furthermore, the generation of the candidate calibration coefficient versions can be performed according to the coefficient structure currently used by the flowmeter being calibrated. If the flowmeter being calibrated uses a combination of zero-point correction coefficient and slope coefficient, the embedded calibration controller uses error samples corresponding to multiple target flow points within the same calibration session as input to construct the correction relationship between the calibrated volume increment and the reference volume increment, and obtains new zero-point correction coefficient and slope coefficient with the goal of minimizing the overall residual of the error samples. If the flowmeter being calibrated uses a lookup table coefficient set segmented by flow interval, the embedded calibration controller calculates the corresponding correction ratio for each flow interval separately, and adds a smoothing constraint on the change of adjacent intervals when generating the candidate lookup table coefficient set to avoid discontinuous jumps in the segmented coefficients.

[0089] In a preferred approach, the contribution of error samples to the candidate calibration coefficient versions can be weighted according to the mass component of the effective weighing window corresponding to the error sample. That is, flow points with higher quality effective weighing windows have higher weight in the generation of candidate calibration coefficient versions, while flow points with excessively short effective weighing windows, low linear fitting coefficients of determination, or high proportions of oscillation contamination are only retained as auxiliary diagnostic samples and do not participate in the solution of the main coefficients. This allows the candidate calibration coefficient versions to be closer to high-confidence data, rather than being driven by low-quality samples.

[0090] In a numerical example, when error samples are obtained at three target flow points of 2 cubic meters per hour, 5 cubic meters per hour, and 8 cubic meters per hour within the same calibration session, and the relative errors of the three flow points under the current effective version are positive 0.45%, positive 0.30%, and positive 0.18%, respectively, the embedded calibration controller can obtain a new candidate calibration coefficient version based on the above three flow points. The basic acceptance condition is that the absolute value of the relative error of the three flow points decreases after the candidate calibration coefficient version is substituted back. For example, if the relative errors of the above three flow points decrease to positive 0.12%, positive 0.08%, and negative 0.05% after substitution, it indicates that the candidate calibration coefficient version has an overall improvement effect on the error samples of the entire session.

[0091] Furthermore, to prevent excessive changes in candidate calibration coefficient versions caused by a single session, the embedded calibration controller can also add a single change limit constraint when generating candidate calibration coefficient versions, so that the change of any coefficient component between the candidate calibration coefficient version and the currently effective version does not exceed the allowable change range; when the change of coefficients directly obtained from error samples exceeds the allowable change range, the excess part can be truncated to the allowable boundary, or the current session can be written as a candidate partition without immediately switching to effective.

[0092] In this embodiment, It should include at least the weighing effective window quality component, the error convergence improvement component, the multi-point consistency component, and the coefficient change risk component, so as to ensure that the submitted decision takes into account the quality of the reference end, whether the correction has truly improved the situation, and whether the change boundary is safe.

[0093] effective weighing window mass components Depend on , and the proportion of oscillation pollution The result was obtained through weighted average fusion:

[0094] ;

[0095] Among them, the weighting coefficient , , satisfy + + =1, which can be set to 1 / 3 by default, or adjusted based on on-site experience. Characterizes the linearity of the fit between mass and time within the effective weighing window. Characterizes the proportion of the effective linear segment time to the total weighing segment time. This characterizes the proportion of segments identified as oscillating or exceeding high-frequency energy limits. This fusion method ensures that all sub-indices are within the [0,1] range, and the overall... The closer to 1, the higher the quality of the weighing window.

[0096] Error convergence improvement component To verify that the improvement brought about by the new coefficients is not an illusion, it is defined as the residuals obtained by substituting the old coefficients back into the old coefficients. Relative to the new coefficients Relative improvement rate:

[0097] ;

[0098] And truncate to the interval [0,1], that is, if but =0 indicates no improvement or worsening; if the improvement rate exceeds 1, then 1 is used. The residual energy... and It can be calculated based on the sum of the mean square value or weighted absolute value of the error samples.

[0099] Multi-point consistent components Used to suppress the influence of single outlier samples on the fitting results, defined as:

[0100] ;

[0101] in The variance (or robust dispersion index) of multiple traffic point error samples within the same session. This represents the maximum permissible discrete scale. It can be preset according to the measurement accuracy requirements. For example, if the error repeatability is required to be better than 0.2%, then take... Alternatively, it can be obtained from historical calibration data, such as taking 1.5 times the mean variance of the past 10 successful calibrations. hour, =0 indicates poor consistency across multiple points.

[0102] Coefficient change risk component Used to limit the magnitude of coefficient changes within a single session, preventing drastic jumps caused by abnormal sessions, it is defined as:

[0103] ;

[0104] in It is the infinite norm, representing the maximum absolute change of each coefficient component; The maximum permissible variation range can be set according to the metering class and range of the flow meter being calibrated, for example, 1% of the range or 0.5% of the zero-point full-scale range. When the variation exceeds the permissible value, =0 indicates that the change is too risky and should not take effect.

[0105] By introducing the above and with As a multiplier, this embodiment makes the alignment confidence synthesis quantity a prerequisite for coefficient submission, so that the validity of the coefficients depends not only on the fitting result itself, but also on the alignment evidence chain and the quality of the reference end, thereby establishing a suppression mechanism for alignment error problems at the root.

[0106] During the coefficient writing and activation control process, the embedded calibration controller will With submission threshold Comparison, for example ,when At that time, first select the candidate calibration coefficient version Write to the candidate partition of non-volatile storage and solidify the evidence chain related to this session, including the calibration session identifier and the alignment parameter set. Alignment confidence composite , coefficient effective reliable comprehensive quantity The effective window fingerprint and the time-scaled quality statistics obtained in step one are weighed; then, an atomic switching method is used to switch the candidate partition to the effective partition, so that... This becomes the currently effective version. To ensure controllability after implementation, this embodiment sets a short-term acceptance window after the atomic switch. Within the acceptance window, error and steady-state indicators are recalculated according to the media equivalent time window or rapid sampling window. If the error is not improved or abnormal fluctuations occur, it automatically rolls back to the previous effective version. And write the rollback reason and acceptance data to the calibration session log. but At that time, the embedded calibration controller can only... Write to the candidate partition without switching the effective date, or adopt a delayed effective date strategy to wait for subsequent sessions to review, thereby avoiding rash updates when there is insufficient evidence.

[0107] Furthermore, the acceptance window can be set to 30 to 180 seconds, preferably 60 seconds, based on the on-site production cycle time, the target flow point stabilization time, and safety control requirements. Within the acceptance window, the embedded calibration controller can either re-execute a complete error calculation according to the media equivalent time window or perform at least three rapid error sampling checks according to the rapid sampling window. The rapid sampling window is preferably selected within the period after the flow path has returned to a steady state after the atomic switching takes effect, to avoid misjudging short-term transient fluctuations after the switch takes effect as coefficient deterioration.

[0108] As an feasible rollback determination method, automatic rollback can be triggered when the absolute value of the average relative error within the acceptance window does not decrease compared to before the current effective version switch, or when the absolute value of the relative error obtained from any rapid sampling inspection increases by more than a preset difference compared to the corresponding value before the switch, or when the steady-state index exceeds the steady-state threshold in step two consecutively, or when abnormal fluctuations occur in the bypass pressure sequence, causing the effective weighing window to be unavailable. The preset difference can be set according to the metrological level requirements, for example, 0.2%.

[0109] In a numerical example, when the acceptance window is 60 seconds and three rapid sampling checks are performed within that window, if the absolute values ​​of the relative errors of the three checks are 0.11%, 0.14%, and 0.13%, respectively, and all are lower than the corresponding values ​​before the switch, then the candidate calibration coefficient version will remain in effect. If the absolute value of the relative error in any of the three checks rises to 0.35%, or if the bypass pressure sequence shows fluctuations exceeding the steady-state threshold twice consecutively, then the currently effective calibration coefficient version will be immediately switched back to the previous effective calibration coefficient version. The trigger time, sampling results, steady-state indicators, rollback reason, and corresponding session identifier will be written into the calibration session record to ensure subsequent auditing and traceability.

[0110] Example 2: The design of the embedded calibration control system for the flow meter according to the present invention is based on the method in Example 1, specifically as follows... Figure 3 The following modules are shown:

[0111] The session acquisition module is used to establish a calibration session and generate a unique calibration session identifier after receiving an online calibration trigger command. It performs session-level status verification, at least reading the measurement output, range and unit, damping parameters or equivalent filter parameters of the flow meter being calibrated, and reading the zero-point status and sampling channel status of the weighing device. At the same time, it verifies the valve position feedback and position confirmation of the switching valve, and the continuous and stable output capability of the bypass pressure sensor. After completing the status verification, using the local clock of the embedded calibration controller as a unified time reference, it uniformly stamps the valid data of the flow meter, weighing device, switching valve and bypass pressure sensor with local timestamps when entering the buffer and records information such as communication round-trip delay, forming a multi-source sampling sequence under a unified time axis. Within a preset observation period, it statistically obtains the communication round-trip delay jitter index, clock drift index and data integrity index set, and binds and stores them with the session identifier, providing auditable input evidence for subsequent alignment of credible comprehensive quantities.

[0112] Operating Condition Solidification Module: This module is used to construct calibration operating conditions based on the calibration session and multi-source sampling sequence output in step one. After meeting the preset interlock conditions, it issues a switching command to the switching valve, switching the fluid from normal operating conditions to the calibration flow path. It continuously acquires the instantaneous flow sequence of the flowmeter under calibration, the bypass pressure sequence, the weighing sampling sequence, and the valve position feedback sequence of the switching valve in a continuous acquisition mode before, during, and after the switching action, and binds and stores them with the calibration session identifier. At the same time, it records the switching command time, the switching valve position confirmation time, and the time when the pressure or flow signal generates an observable response, and solidifies the corresponding original sampling segments into an edge evidence set. After the flow path enters the calibration operating condition, it performs steady-state establishment and steady-state determination, outputs candidate steady-state intervals, and writes the candidate steady-state intervals and edge evidence sets into the calibration session record as inputs for subsequent alignment parameter set identification and medium equivalent time window construction.

[0113] The alignment windowing module is used to process multi-source sampling sequences under a unified time axis. It combines edge evidence sets with candidate steady-state intervals to online identify alignment parameter sets (including at least the equivalent delay from valve action to effective flow path switching, measurement hysteresis caused by damping or equivalent filtering of the calibrated flowmeter, and medium arrival delay caused by the bypass pipe volume). Within multiple edge windows, it obtains candidate hysteresis quantities through cross-correlation or edge matching, suppresses spurious correlations, and forms a session-level alignment delay estimate. After obtaining the candidate alignment parameter set, it calculates the alignment confidence composite as a gating condition, whose evidence components must be at least... This includes communication jitter components, clock drift components, data integrity components, edge identifiability components, delay stability components, and post-alignment residual interpretability components. The construction of the media equivalent time window is terminated if the alignment threshold is not reached. After gating, the weighing effective window is extracted from the symmetrical resampled sequence, and the weighing effective window is mapped onto the flowmeter sequence being calibrated based on the alignment parameter set to construct the media equivalent time window. Finally, the alignment parameter set, the alignment confidence composite, the weighing effective window and its fingerprint information, the media equivalent time window and the edge evidence set are bound and stored together with the calibration session identifier.

[0114] The coefficient activation module is used to construct error samples and calculate relative errors based on the effective weighing window and the equivalent time window of the medium, provided that the alignment confidence comprehensive quantity meets the threshold and the media equivalent time window has been obtained. It generates candidate calibration coefficient versions from the error sample set and manages them by comparing them with the currently effective version. Candidate calibration coefficient versions can be a combination of zero-point correction coefficients and slope coefficients or a set of segmented lookup table coefficients. It calculates the coefficient activation confidence comprehensive quantity as the basis for submission and activation decisions, and establishes a strong dependency between it and the alignment confidence comprehensive quantity to solidify the control logic that prohibits submission if the alignment is not reliable. When the submission conditions are met, the candidate calibration coefficient version is written to the candidate partition of non-volatile storage and the evidence chain is solidified (including at least the calibration session identifier, alignment parameter set, alignment confidence comprehensive quantity, coefficient activation confidence comprehensive quantity, effective weighing window fingerprint, and time-scale mass statistics). Then, the candidate partition is switched to the effective partition using an atomic switching method. A short-term acceptance window is set; if the error is not improved or abnormal fluctuations occur, it automatically rolls back to the previous effective version and writes the rollback reason and acceptance data to the calibration session record.

[0115] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0116] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0117] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An embedded calibration control method for a flow meter, characterized in that, Includes the following steps: Step 1: Establish a calibration session and generate a unique session identifier. Using the local clock of the embedded calibration controller as a unified time reference, all valid data from the flow meter, weighing device, switching valve and bypass pressure sensor under calibration are uniformly stamped with local timestamps to form a multi-source sampling sequence under a unified time axis. The communication round-trip delay jitter index, clock drift index and data integrity index set are statistically analyzed and bound to the session identifier for storage. Step 2: After the interlock condition is met, a switching command is sent to the switching valve to switch the fluid from normal operating condition to calibration flow path to enter calibration condition. The switching command time, the switching valve arrival confirmation time, and the start time of observable response of pressure or flow signal are recorded and solidified into edge evidence set. After the flow path enters calibration condition, steady state establishment and steady state determination are performed, and candidate steady state intervals are output. Step 3: Based on the multi-source sampling sequence under a unified time axis, combine the edge evidence set with the candidate steady-state interval to identify the alignment parameter set online, and calculate the alignment confidence comprehensive quantity as the gating condition; When the alignment confidence composite reaches the alignment threshold, the symmetric resampling sequence extracts the effective weighing window, and the effective weighing window is mapped onto the flow meter sequence under calibration to construct the medium equivalent time window based on the alignment parameter set. Step 4: Construct error samples and calculate relative errors within the media equivalent time window to form an error sample set; generate candidate calibration coefficient versions based on the error sample set, and calculate the coefficient activation confidence comprehensive quantity as the basis for activation decision; When the total number of coefficients that have become effective reaches the submission threshold, the candidate calibration coefficient version is written to non-volatile storage and the evidence chain is solidified. The candidate calibration coefficient version is then made effective using an atomic switching method.

2. The embedded calibration control method for a flow meter according to claim 1, characterized in that: In step one, the communication round-trip delay jitter metric is used to characterize the fluctuation range of the communication round-trip delay within the session, the clock drift metric is used to characterize the drift speed of the device-side time relative to the local time of the embedded calibration controller, and the data integrity metric set includes at least packet loss rate, sequence number breakage rate and resampling interpolation ratio. The above metrics are bound and stored with the session identifier and used for subsequent calculation of the alignment confidence synthesis quantity.

3. The embedded calibration control method for a flow meter according to claim 1, characterized in that: In step two, the edge evidence set includes at least the switching command time, the switching valve arrival confirmation time, and the start time of the observable response of the pressure or flow signal, and the original sampling segments corresponding to the above times are solidified; The steady-state determination considers both short-term fluctuation amplitude and trend term. When the fluctuation scale of the flow series is less than the first threshold and the trend scale is less than the second threshold, and the fluctuation scale of the bypass pressure series is also less than the corresponding threshold, the interval is determined to meet the steady-state condition and a candidate steady-state interval is output.

4. The embedded calibration control method for a flow meter according to claim 1, characterized in that: In step three, the alignment parameter set includes at least the equivalent delay from the switching valve action to the effective switching of the flow path, the measurement lag caused by the damping or equivalent filtering of the flowmeter being calibrated, and the medium arrival delay caused by the volume of the bypass pipe; the alignment confidence synthesis is obtained by weighted fusion of multiple evidence components, which include at least the communication jitter component, clock drift component, data integrity component, edge identifiability component, delay stability component, and the interpretability component of the aligned residual.

5. The embedded calibration control method for a flow meter according to claim 4, characterized in that: The edge identifiability component is obtained by mapping the difference between the maximum peak amplitude and the second largest peak amplitude of the cross-correlation, and the delay stability component is obtained by mapping the degree of dispersion of the hysteresis estimates under multiple edge windows. When the alignment confidence synthesis is below the alignment threshold, terminate the construction of the media equivalent time window and mark the calibration session as alignment unreliable.

6. The embedded calibration control method for a flow meter according to claim 1, characterized in that: In step three, the effective weighing window is extracted as follows: the short-term slope of the mass increment sequence obtained by the symmetric resampling sequence is calculated, segments with significant slope jumps or high-frequency oscillation energy exceeding the limit are identified and removed, and the interval in the remaining segments where the mass increases linearly with time is selected as the effective weighing window. The linear fitting determination coefficient and the proportion of linear segments of the window are then calculated.

7. The embedded calibration control method for a flow meter according to claim 1, characterized in that: The mass increment within the effective weighing window is converted into the reference volume increment, and the cumulative volume increment or instantaneous flow integral of the flowmeter under calibration within the media equivalent time window is used as the volume increment under calibration. The relative error between the two is calculated. When there are multiple target flow points in the same calibration session, the corresponding error samples are obtained respectively.

8. The embedded calibration control method for a flow meter according to claim 1, characterized in that: In step four, the calculation of the coefficient effective confidence synthesis depends on the alignment confidence synthesis: when the alignment confidence synthesis is lower than the alignment threshold, the coefficient effective confidence synthesis is set to zero. When the alignment confidence synthesis reaches the alignment threshold, the coefficient effective confidence synthesis is obtained by weighting the alignment confidence synthesis with multiple submission confidence components. The submission confidence components include at least the weighing effective window quality component, the error convergence improvement component, the multi-point consistency component, and the coefficient change risk component.

9. The embedded calibration control method for a flow meter according to claim 8, characterized in that: The mass component of the effective weighing window is obtained by fusing the linear fitting determination coefficient, the proportion of the linear segment, and the proportion of oscillation contamination of the effective weighing window; The error convergence improvement component is determined by the relative improvement rate of the back-substitution residual of the currently effective calibration coefficient version relative to the back-substitution residual of the candidate calibration coefficient versions; The multi-point consistency component is obtained by mapping the degree of dispersion of multiple flow point error samples within the same calibration session; The risk component of coefficient change is determined by the ratio of the maximum change between the candidate calibration coefficient version and the currently effective calibration coefficient version to the allowable change range. Furthermore, after the candidate calibration coefficient version takes effect using an atomic switching method, an acceptance window is set up. Within the acceptance window, it is determined whether to trigger a rollback based on the error improvement situation. During rollback, the currently effective calibration coefficient version is switched back to the previous effective calibration coefficient version, and the rollback reason and acceptance data are written into the evidence chain.

10. An embedded calibration control system for a flow meter, characterized in that, The control system is used to implement the method according to any one of claims 1-9, and includes the following modules: The session acquisition module is used to establish a calibration session and generate a unique session identifier. Using the local clock as a unified time reference, it adds a local timestamp to the valid data from the flow meter, weighing device, switching valve and bypass pressure sensor to form a multi-source sampling sequence. It also counts the communication round-trip delay jitter index, clock drift index and data integrity index set and binds and stores them with the session identifier. The working condition solidification module is used to send a switching command to the switching valve after the interlocking conditions are met, so that the fluid switches to the calibration flow path to enter the calibration working condition, records and solidifies the edge evidence set, and performs steady state establishment and steady state determination to output candidate steady state intervals. The alignment windowing module is used to identify the alignment parameter set online and calculate the alignment confidence composite quantity as a gate condition. When the alignment confidence composite quantity reaches the alignment threshold, the effective weighing window is extracted and the medium equivalent time window is constructed. The coefficient activation module is used to construct error samples and calculate relative errors within the media equivalent time window to form an error sample set, generate candidate calibration coefficient versions and calculate the coefficient activation confidence comprehensive quantity. When the coefficient activation confidence comprehensive quantity reaches the submission threshold, the candidate calibration coefficient version is written to non-volatile storage and the evidence chain is solidified. It takes effect in an atomic switching manner and automatically performs rollback according to the error improvement situation within the acceptance window.

Citation Information

Patent Citations

  • Flowmeter calibration method and device

    CN119043466A

  • Dynamic calibration compensation for flow meter

    US20170108367A1