Learning Content and Theses

Platform for digital learning at HSHL

Optimizing the Uncertainty of the Result

Now we transfer this mathematics with x, y and z to the world of P, UOS and R. We form the partial derivative of the formula for calculating the number at the ADC with respect to all parameters that are subject to uncertainties. The parameters in this example are:

Sensor voltage US

Offset voltage of the op-amp UOS

Resistor R1

Resistor R2

Reference voltage of the ADC URef

So we form the expressions:

\[ \begin{gathered} \text{Zahl} = \frac{4095}{U_{\mathrm{Ref}}'} \cdot \left(1 + \frac{R_2'}{R_1'}\right) \cdot (U_S \pm U_{OS}) \\[10pt] \frac{\partial\,\text{Zahl}}{\partial U_S},\; \frac{\partial\,\text{Zahl}}{\partial U_{OS}},\; \frac{\partial\,\text{Zahl}}{\partial R_1},\; \frac{\partial\,\text{Zahl}}{\partial R_2} \text{ and } \frac{\partial\,\text{Zahl}}{\partial U_{\mathrm{Ref}}} \end{gathered} \]

Then we determine the uncertainty of the parameters. We have already calculated these in the previous chapter:

\[ \Delta U_S = \pm 1.3\,\mathrm{mV},\; \Delta U_{OS} = \pm 10\,\mathrm{\mu V},\; \Delta R_1 = \pm 3\,\Omega,\; \Delta R_2 = \pm 87\,\Omega,\; \Delta U_{\mathrm{Ref}} = \pm 2.1\,\mathrm{mV} \]

With these results we can calculate the uncertainty of the number at the output of the ADC. According to Gaussian error propagation, the uncertainty is calculated with this formula:

\[ \Delta\text{Zahl} = \sqrt{\left(\frac{\partial\,\text{Zahl}}{\partial U_S} \cdot \Delta U_S\right)^2 + \left(\frac{\partial\,\text{Zahl}}{\partial U_{OS}} \cdot \Delta U_{OS}\right)^2 + \left(\frac{\partial\,\text{Zahl}}{\partial R_1} \cdot \Delta R_1\right)^2 + \left(\frac{\partial\,\text{Zahl}}{\partial R_2} \cdot \Delta R_2\right)^2 + \left(\frac{\partial\,\text{Zahl}}{\partial U_{\mathrm{Ref}}} \cdot \Delta U_{\mathrm{Ref}}\right)^2} \]

Sensor voltage

Let us start with the sensor voltage US. All other parameters become constants. For this calculation we set the uncertainties of the other parameters to 0. We set the values of the other constant parameters to suit the chosen operating point P = 3 bar, e.g. US = 30 mV for the sensor voltage. The following applies

\[ \begin{gathered} \frac{\partial\,\text{Zahl}}{\partial U_S} = \frac{\partial\left(\frac{4095}{U_{\mathrm{Ref}}'} \cdot \left(1 + \frac{R_2'}{R_1'}\right) \cdot (U_S \pm U_{OS})\right)}{\partial U_S} = \frac{4095}{U_{\mathrm{Ref}}'} \cdot \left(1 + \frac{R_2'}{R_1'}\right) = \frac{4095}{3\,\mathrm{V}} \cdot 30 = 40950\,\frac{1}{\mathrm{V}} \\[6pt] \Delta U_S = \pm 1.3\,\mathrm{mV} \\[6pt] \left(\frac{\partial\,\text{Zahl}}{\partial U_S} \cdot \Delta U_S\right)^2 = \left(40950\,\frac{1}{\mathrm{V}} \cdot 1.3\,\mathrm{mV}\right)^2 = 2834 \end{gathered} \]

The influence of the uncertainty of the sensor voltage on the number at the output of the ADC is therefore weighted with 2834. Next, let us look at the offset voltage of the op-amp:

Offset voltage of the op-amp

\[ \begin{gathered} \frac{\partial\,\text{Zahl}}{\partial U_{OS}} = \frac{\partial\left(\frac{4095}{U_{\mathrm{Ref}}'} \cdot \left(1 + \frac{R_2'}{R_1'}\right) \cdot (U_S \pm U_{OS})\right)}{\partial U_{OS}} = \frac{4095}{U_{\mathrm{Ref}}'} \cdot \left(1 + \frac{R_2'}{R_1'}\right) = \frac{4095}{3\,\mathrm{V}} \cdot 30 = 40950\,\frac{1}{\mathrm{V}} \\[6pt] \Delta U_{OS} = \pm 10\,\mathrm{\mu V} \\[6pt] \left(\frac{\partial\,\text{Zahl}}{\partial U_{OS}} \cdot \Delta U_{OS}\right)^2 = \left(40950\,\frac{1}{\mathrm{V}} \cdot 10\,\mathrm{\mu V}\right)^2 = 0.17 \end{gathered} \]

The offset voltage of the op-amp is weighted with 0.17. So it acts much less strongly on the number at the output of the ADC than the uncertainty of the sensor voltage. This is because the offset is much smaller than the uncertainty of the sensor voltage. Next we look at the reference voltage at the ADC:

Reference voltage of the ADC

\[ \begin{gathered} \frac{\partial\,\text{Zahl}}{\partial U_{\mathrm{Ref}}} = \frac{\partial\left(\frac{4095}{U_{\mathrm{Ref}}'} \cdot \left(1 + \frac{R_2'}{R_1'}\right) \cdot (U_S \pm U_{OS})\right)}{\partial U_{\mathrm{Ref}}} = -\frac{4095}{\left(U_{\mathrm{Ref}}'\right)^2} \cdot \left(1 + \frac{R_2'}{R_1'}\right) \cdot (U_S \pm U_{OS}) \\[6pt] = -\frac{4095 \cdot 30 \cdot 30\,\mathrm{mV}}{(3\,\mathrm{V})^2} = -409.5\,\frac{1}{\mathrm{V}} \\[6pt] \Delta U_{\mathrm{Ref}} = \pm 2.1\,\mathrm{mV} \\[6pt] \left(\frac{\partial\,\text{Zahl}}{\partial U_{\mathrm{Ref}}} \cdot \Delta U_{\mathrm{Ref}}\right)^2 = \left(-409.5\,\frac{1}{\mathrm{V}} \cdot 2.1\,\mathrm{mV}\right)^2 = 0.74 \end{gathered} \]

The reference voltage of the ADC is weighted with a factor of 0.74. That is insignificantly more than the offset voltage of the op-amp, and many orders of magnitude less than the sensor voltage.

Resistors

Exercise: Calculate the weighting factors for the resistors R1 and R2 yourself. For checking: the results are 12.7 for R1 and for R2.

Result

Finally, we take the square root over all the weighting terms:

\[ \begin{gathered} \Delta\text{Zahl} = \sqrt{\left(\frac{\partial\,\text{Zahl}}{\partial U_S} \cdot \Delta U_S\right)^2 + \left(\frac{\partial\,\text{Zahl}}{\partial U_{OS}} \cdot \Delta U_{OS}\right)^2 + \left(\frac{\partial\,\text{Zahl}}{\partial R_1} \cdot \Delta R_1\right)^2 + \left(\frac{\partial\,\text{Zahl}}{\partial R_2} \cdot \Delta R_2\right)^2 + \left(\frac{\partial\,\text{Zahl}}{\partial U_{\mathrm{Ref}}} \cdot \Delta U_{\mathrm{Ref}}\right)^2} \\[8pt] \left(\frac{\partial\,\text{Zahl}}{\partial U_S} \cdot \Delta U_S\right)^2 = 2834 \\[4pt] \left(\frac{\partial\,\text{Zahl}}{\partial U_{OS}} \cdot \Delta U_{OS}\right)^2 = 0.17 \\[4pt] \left(\frac{\partial\,\text{Zahl}}{\partial R_1} \cdot \Delta R_1\right)^2 = 12.7 \\[4pt] \left(\frac{\partial\,\text{Zahl}}{\partial R_2} \cdot \Delta R_2\right)^2 = 12.7 \\[4pt] \left(\frac{\partial\,\text{Zahl}}{\partial U_{\mathrm{Ref}}} \cdot \Delta U_{\mathrm{Ref}}\right)^2 = 0.74 \\[6pt] \Delta\text{Zahl} = \sqrt{2834 + 0.17 + 12.7 + 12.7 + 0.74} = \sqrt{2860} = 53.48 \end{gathered} \]

For comparison: if we consider only the sensor voltage as an uncertainty and set all other uncertainties to 0, the result is Δ Zahl = 53.23. Obviously the influence of the sensor voltage on the result is dominant. In comparison, all other effects play no role.

Interpretation

It does not matter which op-amp I use or how accurate the resistors are, because the sensor is so poor in comparison that it alone dominates the uncertainty of the system. So if we optimise this system, we improve the sensor and use worse components elsewhere to save the extra costs again. And then we calculate again where to optimise next.

In general: uncertainties that occur before an amplifier are particularly annoying. The uncertainty is multiplied by the gain and therefore acts on the output in amplified form. That is why it often makes sense to optimise all components before an amplifier first, before tackling the components after the amplifier. With high gain, the uncertainty at the ADC often no longer plays any role at all.

In this method, the result of the partial derivative is squared. Then the square root is taken to undo the effect of squaring. This takes into account mathematically that we have normal distributions in the uncertainty ranges and not uniform distributions. But the effect is drastic: large weighting factors become even larger and small ones even smaller.

If we only compare the individual uncertainties without the Gaussian method, the difference is nowhere near as large as in the mathematically correct result according to Gauss. We must look at the effect of the uncertainties on the result, not just the size of the uncertainties. Some uncertainties, for example, are amplified, others are not.

Download course as PDF

The PDF contains all pages of the course. Interactive content is only available on the website.