## Verifying primary and secondary flow measurement performance

It is a common industry practice to use a secondary flow measurement (verification meter) to verify the performance of a primary flow measurement (custody transfer meter) when the primary flow measurement is used to bill a transacted product. It also is common industry practice to use highly accurate and repeatable instruments for the primary flow measurement and use less accurate, but repeatable, instruments for the secondary flow measurement.

This article discusses a novel method to analyze the performance of the primary and secondary flow measurements by separating repeatability and accuracy (bias shift). This novel method is designed to help understand the performance of the primary flow measurement (PM) and the secondary flow measurement (SM) without having to assume the PM is always accurate and repeatable and identifies whether the issue is with the PM or with the SM. It eliminates the need to calibrate the SM whenever a difference is noted between the PM and the SM.

**Background**

For primary flow measurement, industries use accurate and repeatable flowmeters, which are compensated by pressure, temperature, density/gas chromatograph, etc., to obtain the flow measurement in standard units. Most primary flow measurements undergo periodic proving of the flowmeter and calibration of other instruments used to compensate the flowmeter readings to obtain the flow measurement in standard units.

For the secondary flow measurement, industries use less accurate but repeatable flowmeters, which may be compensated by pressure, temperature, density/gas chromatographs, etc., to obtain flow measurement in standard units. The purpose of the secondary flow measurement is not to have a highly accurate flowmeter. Therefore, secondary flow measurements typically do not have periodic flowmeter proving and the instruments used to compensate the secondary flowmeter are calibrated less frequently.

It should be noted an instrument’s accuracy depends on the measurement principle, design, installation, and maintenance of the instrument. Repeatability, however, of an instrument is an inherent feature of the measurement technology used. Repeatability is defined for an absolute constant flow. However, in process industries, variable flow is common.

If accuracy (bias shift) changes for a secondary flow measurement, there is no need to replace, recalibrate, or reprove the secondary flow measurement as a multiplier can bring the SM reading closer to the true value. However, if repeatability has changed, the secondary flow measurement needs to be replaced, as this indicates a degradation of the SM instrument.

It is common industry practice to accept 1% repeatability for secondary flow measurements for liquids and 2% repeatability for secondary flow measurements for gases.

**Current flow measurement methodologies**

Process industries often use two methodologies to verify flow measurements performance: time-stamped comparison and selected constant flow samples. In both methodologies, it is assumed the primary flow measurement is accurate and repeatable and the secondary flow measurement accuracy and repeatability are being verified. This goes against the original intent of installing a secondary flow measurement, which is installed to verify the primary flow measurement and not the other way around.

The verification process using the current methodologies is described below:

**Time-stamped comparison:**

**Time-stamped comparison:**

- The difference between the PM and SM is calculated from the time stamped measured values.
- Repeatability of SM is calculated as the standard deviation from the difference between the PM and the SM divided by the SM average.

This method works well when the flow is maintained at an absolute constant or the flow variation is negligible. However, as flows in the process industries can have moderate to significant variation, this methodology often points to the SM not performing well. This methodology will not identify PM failures and any failures are erroneously identified as SM failures.

**Selected constant flow samples:**

**Selected constant flow samples:**

- Minimum and maximum flows are obtained from the PM time-stamped values.
- The PM minimum to maximum flow data is further subdivided into smaller flow ranges (bins). The number of bins chosen should be high enough so selected bins contain data that represent fairly constant flow. In examples shown in this article, the PM minimum to maximum flow data was divided into 200 bins. The smaller flow range size (bin size) is calculated as the difference between maximum flow and minimum flow divided by bin size.
- Determine the number of counts in each bin.
- The bin with the maximum count is selected as this bin represents a constant flow period. Hourly data for a monthly billing cycle—a total of 720 samples (24 hours x 30 calendar days)—is available.
- The SM values are extracted for this bin for the same time stamps.
- The SM average and standard deviation is calculated for this bin.
- The repeatability of the SM is the standard deviation divided by the SM average.

The pitfall with this method is the repeatability verification may be done using a much smaller sample size and may not reflect the repeatability of the secondary flow measurement for the whole billing cycle. This methodology will not identify the failures in the PM and any failures are identified as SM failures as minimum flow, maximum flow, smaller flow range, maximum count, are all based on PM values.

The following sections demonstrate how these two current methodologies report the flow measurement performances for constant flow, moderate flow variation, and significant flow variation billing cycles. It should be noted both methodologies can provide the same result for constant flow, but the selected constant flow samples methodology will have a smaller sample size. For moderate flow variation and significant flow variation, the results arrived from the two methodologies could be conflicting to each other. The selected constant flow samples methodology may use very small sample sizes out of 720 samples available in a month.

**Constant flow**

Figure 1 shows the primary and secondary flow measurements for a typical monthly billing cycle. After adjusting the display ranges (to account for different engineering units), the following could be observed:

- Fairly constant flow.
- Difference between the primary and secondary flow measurements is consistent most of the time.
- Excluding the bias differences, the primary and secondary flow measurements are tracking each other.

Table 1 shows the measurement verification using the time stamped comparison method for the same period shown in Figure 1. Measurement verification using the time-stamped comparison method indicates that the repeatability of the secondary flow measurement is 1.28%. Based on this result, it could be concluded the repeatability of the secondary flow measurement is within the industry-accepted repeatability of 2% for gas measurement.

**Table 1: Time stamped comparison for fairly constant flow**

Table 2 shows the measurement verification using the selected constant flow samples method for the same period shown in Figure 1. Measurement verification using the selected constant flow samples method indicates the repeatability of the secondary flow measurement is 0.64%. Based on this result it could be concluded the repeatability of the secondary flow measurement is within the industry-accepted repeatability of 2% for gas measurement.

**Table 2: Selected constant flow samples for fairly constant flow**

The selected constant flow samples methodology used 28 out of 720 samples.The time-stamped comparison methodology works for constant flows or for flows with negligible variation. This demonstrates the following:

- It is assumed the PM is performing well.

**Moderate flow variation**

Figure 2 shows the primary and secondary flow measurements for a typical monthly billing cycle. After adjusting the display ranges (to account for different engineering units), the following could be observed:

- Moderate flow variation.
- The difference between the primary and secondary flow measurements was consistent most of the time.
- Excluding the bias differences, the primary and secondary flow measurements are closely tracking each other.

Table 3 shows the measurement verification using time-stamped comparison method for the same period shown in Figure 2. Measurement verification using the time-stamped comparison method indicates the repeatability of the secondary flow measurement is 2.91%. Based on this result, some companies may initiate maintenance to the secondary flow measurement as the repeatability is greater than the industry-accepted repeatability of 2% for gas measurement.

**Table 3: Time-stamped comparison (moderate flow variation)**

Table 4 shows the measurement verification using the selected constant flow samples method for the same period shown in Figure 2. Measurement verification using the selected constant flow samples method indicates the repeatability of the secondary flow measurement is 1.11%. Based on this result, it could be concluded the repeatability of the secondary flow measurement is within the industry-accepted repeatability of 2% for gas measurement.

**Table 4: Selected constant flow samples method results**

The two methods had conflicting results. The time-stamped comparison methodology indicated that the performance of the SM is not within the industry accepted 2%, while the selected constant flow samples methodology indicated that the performance of the SM is within the industry accepted 2%, based on 18 out of 720 samples.This demonstrates the following:

- It is assumed the PM is performing well.

**Significant flow variation**

Figure 3 shows the primary and secondary flow measurements for a typical monthly billing cycle. After adjusting the display ranges (to account for different engineering units), the following could be observed:

- Significant flow variation.
- Difference between the primary and secondary flow measurements is consistent most of the time.
- Excluding the bias differences, the primary and secondary flow measurements are tracking each other most of the time.

Table 5 shows the measurement verification using the time-stamped comparison method for the same period shown in Figure 3. Measurement verification using the time-stamped comparison method indicates the repeatability of the secondary flow measurement is 6.65%. Based on this result, some companies may initiate maintenance to the secondary flow measurement since the repeatability is greater than the industry-accepted repeatability of 2% for gas measurement.

**Table 5: Time-stamped comparison for significant flow variation**

Table 6 shows the measurement verification using the selected constant flow samples method for the same period shown in Figure 3. Measurement verification using the selected constant flow samples method indicates the repeatability of the secondary flow measurement is 4.55%. Based on this result some companies may initiate maintenance to the secondary flow measurement since the repeatability is greater than the industry-accepted repeatability of 2% for gas measurement.

**Table 6: Selected constant flow samples for significant flow variation**

Though the PM and SM are tracking each other, the time-stamped comparison methodology indicated that the performance of the SM is not within the industry-accepted 2%. In addition, the selected constant flow samples methodology, using 15 out of 720 samples, concluded that the SM repeatability is not within the industry-accepted 2%.This demonstrates the following:

- Two methodologies are not robust enough for applications where flow significantly varies.
- It is assumed the PM is performing well.

Assuming the PM is performing well and verifying only the SM is contrary to the original intent of secondary flow measurement being used to verify the primary flow measurement. There is a perception that since the primary flow measurement is more accurate because it undergoes periodic flowmeter proving and calibration of other compensating instruments. As such, we end up verifying the secondary flow measurement.

**The challenge**

In addition to significant flow variation application, the challenges are:

- The primary and the secondary flow measurements may use different technologies to measure the product.
- The primary and the secondary flow measurements are managed by different companies.
- The primary and the secondary flow measurements could be located at considerable distance from each other.
- Methodology commonly used in the industry to verify the performance for consistence over the eyeballing of the trends necessitated frequent maintenance of the secondary flow measurement.
- Time and resources were spent on analyzing the data of the primary and secondary flow measurements, defending that the secondary flow measurement was as good as the primary flow measurement and/or the actual issue is with the primary flow measurement.

**Verifying PM and SM using the novel method**

For argument’s sake, assume the secondary flow measurement exactly duplicates the primary flow measurement. That is:

- The secondary flow measurement uses the same type/make of primary flow measurement.
- The secondary flow measurement has all the instruments the primary flow measurement uses to compensate/correct the flow measurement.
- The secondary flow measurement uses the same type/make meter prover of primary flow measurement.
- The secondary flow measurement has the same proving frequency of proving the primary flow measurement.

In this ideal situation, one can derive that for a given billing cycle, the average of the primary flow measurement will be equal to the average of the secondary flow measurement and the standard deviation of the primary flow measurement will be equal to the standard deviation of the secondary flow measurement.

For absolute constant flow, the average of the primary flow measurement and the secondary flow measurement will be the flow itself and the standard deviation of the primary flow measurement and the secondary flow measurement will be equal to zero.

However, for a varying flow during the billing cycle the average (µ) of the primary flow measurement will be equal to the average of the secondary flow measurement and the standard deviation (σ) of the primary flow measurement will be equal to the standard deviation of the secondary flow measurement.

That is,

σPM = σSM (Equation 1)

and

µPM = µSM (Equation 2)

Combining equation 1 and equation 2 we get,

(σPM / µPM)% = (σSM / µSM)% (Equation 3)

i.e.,

(σPM / µPM)% – (σSM / µSM)% = 0 (Equation 4)

In real process plant scenarios, the secondary flow measurement is not duplicating the primary flow measurement.

Hence, it is safe to modify Equation 4, as:

(σPM / µPM)% – (σSM / µSM)% __<__ X, (Equation 5: novel method equation)

Where X could be = __+__1% or __+__2% (depending on measured fluid is liquid or gas)

The primary flow measurements have very high repeatability mostly 0.1 to 0.2%. Hence, having a __+__1% or __+__2% (depending on whether the measured fluid is liquid or gas) in equation 5 should be acceptable for industries.

The result of equation 5 is known as the “novel method difference.” This difference helps to better analyze the performance of the primary and secondary flow measurements.

The current methodology takes the difference of the time-stamped primary flow measurement and secondary flow measurement values and then computes the standard deviation and the average based on the differences. The novel method calculates the standard deviation and the average separately for the primary flow measurement and the secondary flow measurement. The novel method difference is calculated to analyze the performance of the primary flow measurement and the secondary flow measurement for the billing cycle.

**Novel method advantages**

In the novel method, we are comparing the separately calculated values of the primary and secondary flow measurements.

Advantages of this method are:

- Full data sample available for the whole billing period is used.
- No bias in the assumption that the primary flow measurement is absolutely accurate and repeatable.
- Testing is performed whether the primary flow measurement is close to the secondary flow measurement within the accepted tolerance (
__+__1% or__+__2% depending on whether the measured fluid is liquid or gas). - Engineering units for flow measurement for primary and secondary flow measurements need not be the same.

**Proof of concept**

1. The measurement verification using the novel method difference (equation 5) for the same period shown in Figure 3 is shown in Table 7. The novel method difference is -0.21%. Since the flow has significant variation, the PM and SM are coping to capture the true value of the process. This methodology eliminates the bias that the PM is accurate and repeatable. Based on this methodology, there is no need to maintain the secondary flow measurement. This example illustrates how by using the novel method difference for the entire billing cycle, it was concluded there is no need to maintain the secondary flow measurement while the current industry methodologies concluded to maintain the secondary flow measurement.

**Table 7: Novel method difference – significant flow variation**

2. Another example was chosen where the current selected constant flow samples methodology had a secondary flow measurement repeatability of 13.05%. The novel method difference is 8.24%, which is very much greater than the accepted __+__2%. The novel method result is shown in Table 8A.

**Table 8A: Novel method difference > + 2% – PM measurement bad data**

The very high %SD/Avg (typically greater than 35%) for the PM and SM indicated there is a problem with either the primary or secondary flow measurement. Upon reviewing the process trend (Figure 4) it was noted that the primary flow measurement signal was lost for some periods. Further investigation with the primary flow measurement company indicated they had issues with one of their instruments, which is used to compensate their flow measurement.

Figure 4: The process trend indicates a primary flow measurement failure. Courtesy: Syncrude Canada Ltd.

It was decided to recalculate the results using the novel method difference after eliminating the duration where the primary flow measurement data was not good. After eliminating the bad data, the novel method difference indicated the difference between the primary and secondary flow measurements is -0.25%, which is much less than the accepted __+__2%. The novel method result is shown in Table 8B.

**Table 8B: Novel method difference after eliminating the primary flow measurement bad data**

Based on the novel methodology, there is no need to maintain the secondary flow measurement. In addition, the novel method revealed the issue is either with the PM and or with the SM and further analysis is required to determine which measurement is deviating from the true valve. Further review of the trend concluded the issue is with the PM and not with the SM.

3. Another billing cycle period was chosen where the current selected constant flow samples methodology had a secondary flow measurement repeatability of 4.94%. It should be noted this facility had a history of very good repeatability (< __+__2%) as the flow in this facility is fairly constant. The novel method difference is 33.99%, which is much greater than the current selected constant flow samples method repeatability of 4.94%. The novel method result is shown in Table 9A.

**Table 9A: Novel method difference – primary flow measurement zero flow**

**Table 9B: Novel method after eliminating the primary flow measurement zero flow**

The large novel method difference indicated that there is a problem with either the primary or secondary flow measurement. On reviewing the process trend, it was noted the primary flow measurement showed zero flow for a considerable duration and the primary flow measurement had significant oscillations for some days within the billing cycle period (see Figure 5).

It was decided to recalculate the results using the novel method after eliminating the durations where the primary flow measurement was reading zero flow and where the primary flow measurement had oscillations. The novel method difference result is shown in Table 9B.

Eliminating the durations wherein the primary flow measurement reading was zero and eliminating the durations wherein the primary flow measurement had significant oscillations, the novel method indicated that the difference between the primary and secondary flow measurements is 0.79%, which is much less than the accepted __+__2%. Based on this methodology, there is no need to maintain the secondary flow measurement. Moreover, the novel method revealed the issue is either with the PM or with the SM. Further review of the trend concluded the issue is with the PM and not with the SM.** **

**Application based on novel method difference**

Based on the manual calculations done on the historical month’s data, it was decided to build an application to include the novel method difference between the primary flow measurement and the secondary flow measurement computations for checking the individual performance of the measurements. A rolling period of 3 days for the novel method difference was chosen instead of the whole billing cycle period of a month for corrective actions, such as:

- Verifying the calibration/configuration parameters of the secondary flow measurement
- Checking with the primary flow measurement in charge to verify the performance of all the instruments used to compensate the flow.

**Software implementation**

A software application was developed for the primary and secondary flow measurement calculations. The real-time flowmeter data is captured and stored in a real-time data historian. The scheduling component of the software runs the calculation every 5 minutes to update the flow measurement values. The logic to calculate the aggregates is exactly the same. Therefore, a single piece of code was written for all locations, which runs a single process on multiple contexts as separate threads with input and output tags.

Figure 6 shows the calculation framework, which runs after a specific period defined as part of the properties of the framework. The calculation outputs are written to output tags with aggregate values such as averages, standard deviation, percent standard deviation, and difference of percent standard deviation for each location and are stored in a data historian.** **

However, the 3-day rolling period for the novel method difference was giving false alarms whenever the flow variation was significant within the 3-day rolling period. The flow variation was further analyzed and a 7-day rolling period was introduced in lieu of a 3-day rolling period, which eliminated the false alarms.

**Industry usage**

An example of a month with minimal fluctuations and no loss of data is shown in Figure 7. The novel method difference is well within __+__2% and ignores the bias shifts between primary and secondary flow measurements. As the novel method difference did not go beyond __+__2%, no alarm was received and it was concluded the PM and SM are tracking close to each other. No further review was carried out.

Figure 8 below shows an example where the novel method difference went out of the accepted range __+__2% and the application gave a warning. The novel method difference indicated that either PM or SM is drifting. It increased and remained high for a period of around 7 days.

Upon review of the trend, the following was noted:

- The PM drifted from the SM by 25% for a day and the PM drifted from SM by 25% for another day.
- In addition, there were three periods with significant PM oscillations (right three circles).
- When the PM drift and oscillations disappeared, the novel method difference came back within the accepted range
__+__2%.

It was determined the SM values matched other downstream measurements, confirming the issue was with the PM.

Figure 9 shows another example where the novel method difference went out of the accepted range __+__2% and the application gave a warning. The novel method difference indicated the PM or SM was drifting.

Upon review of the trend, the following was noted:

- There were three different periods where the PM drifted from SM by around 25% for more than 2 days each.
- Though PM and SM started tracking close to each other immediately after the first spike, the novel method difference remained high due to the two subsequent spikes.
- A third PM drift from SM was also noted after 1.5 days from the second spike, which continued for 1.5 days.
- When PM drift disappeared, the novel method difference came back within the accepted range of
__+__2%.

It was determined the SM values matched other downstream measurements confirming the issue was with the PM.

**Final thoughts**

The novel method difference application helped to:

- Use the full billing cycle data for verification regardless of the flow variation.
- Efficiently determine periods where the PM or SM had a drift based on warning received from the application. This enabled limited resources to focus their review on the specific drift durations (instead of the entire billing cycle).
- Understand the performance of the primary flow measurement and the secondary flow measurement without any assumption the primary flow measurement is performing accurately and repeating.
- Ensure the secondary flow measurement maintenance is done when absolutely needed.
- Follow up with the primary flow measurement provider with confidence after internally verifying the performance of the secondary flow measurement.

**Joseph Amalraj** is a senior technical specialist, and **Babar Shehzad** is a systems advisor. Both work for Syncrude Canada Ltd. Edited by Jack Smith, content manager, *Control Engineering*, CFE Media, jsmith@cfemedia.com.

**MORE ANSWERS**

**KEYWORDS: flow measurement, flowmeter**

**Key concepts**

**For the primary** flow measurement, industries use highly accurate and repeatable flowmeters, which are typically compensated by pressure, temperature, and density/gas chromatograph.

**For the secondary** flow measurement, industries use less accurate but repeatable flowmeters.

**Accuracy of an instrument** depends on the measurement principle, design, installation, and maintenance of the instrument, whereas, repeatability of an instrument is an inherent feature of the measurement technology used.

**CONSIDER THIS**

**How are** flow measurements in your plant verified?