1
$\begingroup$

I've got a system used to measure the density and static head of a liquid by using two pressure sensors, with one of them being a known fixed distance vertically above the other. By measuring the pressure difference between the two sensors, the liquid density can be calculated by using (reference):

$$\rho = \frac{P_b - P_t}{g \Delta h}$$

Where $\rho$ is the density, $P_t$ and $P_b$ are the top and bottom pressure sensors respectively, $g$ is gravity and $\Delta h$ is the fixed height between the two sensors.

The static head of the fluid can then be calculated by using:

$$h = \frac{P_b}{\rho g}$$

By substituting the first equation into the second, this can be simplified to:

$$h = \frac{P_b \Delta h}{P_b - P_t}$$

Regarding units, as long as the pressure units are consistent, the output height will have the same units as $\Delta h$.

I'm using this last equation to try and work out the error in my final height measurement based on the errors in the sensors. I'm using this website for reference. The pressure sensors that I have have an accuracy of 1.5% of the full scale span (20kPa), giving an error of $\pm0.3kPa$. If we consider the bottom half of the fraction, the two values are added together, so the propagated error would be $\delta_1=\sqrt{0.3^2 + 0.3^2} = \pm0.4243kPa$. For the top half of the fraction, the sensor value is multiplied by a known constant (0.2m), so the propagated error would be $\delta_2 = 0.3 \times 0.2 = \pm0.06kPa$.

Now, in order to calculate the final error of the two parts of the fraction divided by each other, I need some actual measured values. For the purposes of this question, we'll use the following values: $P_b=20kPa$, $P_t=18kPa$, $\Delta h=0.2m$. The calculated height value is therefore:

$$h=\frac{20\times0.2}{20-18} = \frac{4\pm0.06}{2\pm0.4243} = 2\pm?$$

The total error would therefore be:

$$\delta_{total}=h\sqrt{\left(\frac{\delta_1}{4}\right)^2 + \left(\frac{\delta_2}{2}\right)^2} = 2\sqrt{\left(\frac{0.06}{4}\right)^2 + \left(\frac{0.4243}{2}\right)^2} = \pm0.4254m$$

This results in a measured height of $2\pm0.4254m$, which is a massive error, almost 25%, which seems way to big considering the sensors are only 1.5%. Is there anything wrong with the way I'm propagating the error through my equation?

$\endgroup$
  • 2
    $\begingroup$ Well, you devide by $2 \pm 0.4255$, which is basically 25%, so the final reults should not have less. $\endgroup$ – mikuszefski Aug 26 '16 at 11:28
  • $\begingroup$ @mikuszefski You're right - looks like because I'm measuring a relatively small value when looking at the difference between the two sensors, the error is a large proportion of that value, which propagates through. $\endgroup$ – Amr Bekhit Aug 26 '16 at 11:35
  • 1
    $\begingroup$ Exactly, if it was a relative error, it would be ok, but as it is a constant error on a difference, it can even become larger than the value itself and the errror of your fraction "explodes". $\endgroup$ – mikuszefski Aug 26 '16 at 11:38
3
$\begingroup$

Your answer is close to right, but not quite. So first I'll show what's wrong with it, then I'll show what the right answer is, and finally I'll just point out why that's reasonable. (The short version is: mikuszefski's comment is right.)

You've separated the calculation into numerator and denominator, computed the uncertainty in each separately, and then combined them to obtain $\delta_{\mathrm{total}}$. But there's a problem in this approach. Namely, you can combine uncertainties in two quantities like that only if you assume the error in each is independent of error in the other. But $P_b$ appears in both the numerator and denominator, so they're not independent — they're correlated, which means that you can't just add the error terms together like that. On the other hand, your error is dominated by the denominator; you could have basically ignored the $\delta_2$ term. So the mistake isn't a very big one as we'll see.

Here, I'll use a little calculus, but if you're unfamiliar you can just trust me. The real formula for the total error is \begin{equation} \delta_h^2 = \left( \frac{\partial h}{\partial P_b} \right)^2\, \delta_{P_b}^2 + \left( \frac{\partial h}{\partial P_t} \right)^2\, \delta_{P_t}^2 + \left( \frac{\partial h}{\partial \Delta h} \right)^2\, \delta_{\Delta h}^2. \end{equation} This still assumes that the errors in $P_b$ and $P_t$ are independent, but that's much more reasonable than assuming that the errors in $P_b$ and $P_b-P_t$ are independent. Now, you've implicitly told us that $\delta_{\Delta h} = 0$, so the last term drops out, and we get \begin{align} \delta_h^2 &= \left( \frac{h}{P_b} - \frac{h}{P_b-P_t} \right)^2\, \delta_{P_b}^2 + \left( \frac{h}{P_b-P_t} \right)^2\, \delta_{P_t}^2 \\ &= h^2\, \delta_{P}^2 \left[ \left( -\frac{P_t}{P_b(P_b-P_t)} \right)^2 + \left( \frac{1}{P_b-P_t} \right)^2 \right] \\ &= h^2\, \delta_{P}^2\frac{1 + P_t^2 / P_b^2} {(P_b-P_t)^2}, \end{align} using $\delta_{P_t}=\delta_{P_b}=\delta_{P}$. Plugging in your numbers, I get $\delta_h = 0.40\, \mathrm{m}$. As I said, you got very close to the right answer, because the error in the numerator is pretty small.

In either case, we got a pretty large uncertainty. To see why this makes sense, let's look at your measurement of $h$ if the true values of $P_b$ and $P_t$ are off by the uncertainty. Let's say $P_b = 20.3\, \mathrm{kPa}$ and $P_t = 17.7\, \mathrm{kPa}$. Now, each of these numbers is within $0.3\, \mathrm{kPa}$ of the measured value, so they're reasonable. But you get $h = 1.56\, \mathrm{m}$, which is $0.44\, \mathrm{m}$ away from your measured value — right in line with our expectations from $\delta_h = 0.40\, \mathrm{m}$. This is a reflection of a pretty general rule in error analysis: whenever you subtract two numbers that are pretty close to each other (as you do in the denominator), the fractional error in the result will be much larger than the fractional error in either of the things you're subtracting.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.