Logo of the Physikalisch-Technische Bundesanstalt

Measurement uncertainty calculations with free software

22.06.2014

Depending on the underlying model, measurement uncertainty calculations can entail the most diverse requirements. A number of commercial – but also of several free – software packages are available for this. By means of free mathematics packages (in this case, the program package "Maxima" will be used as an example) and some programming work, their functionality can be combined with the best possible flexibility.

With a given model function

the combined measurement uncertainty can be calculated as follows in accordance with [1]:

.

Herein,

are the partial derivatives of the model function in accordance with the output quantities. In the case of simple model functions, these can easily be found analytically very easily, so that the further calculation can be carried out, for example, by means of a table calculation. In more complex cases, the partial derivatives of the model function are not trivial, or they are – due to a lack of mathematical preconditions – not available to the user. Irrespective of this, it can be of advantage – in the case of variable models – to transfer the calculation of the partial derivatives as well as the further calculations to the software. Thus, we were looking for a software package which is freely available for commercial and non-commercial use and provides the necessary mathematical operations. Maxima [2] was selected. As a command line program, it can be operated by users who are familiar with graphic surfaces, via the addition wxMaxima. However, if someone uses it only sporadically, he/she will have a problem coping with this. From GUM's perspective, the user has to provide only a few activities to calculate the combined measurement uncertainty: only

  • the model function and
  • the estimates of the input quantities including
  • the associated measurement uncertainties

must be entered. By means of the scripting language AutoIt [3] which is also freely available, a respective programme with a graphic surface was generated which is doing exactly this job. The Figures 1 and 2 show the input masks for the model and the input quantities including their measurement uncertainties using the example of the measurement uncertainty model of a torque standard machine.

Figure 1: Input mask for the model

Figure 2: Input mask for the input quantities including their measurement uncertainties

After the user has launched the calculation, the program generates an input file for Maxima and calls it up. The calculations are carried out automatically by Maxima in the background. At the end, the results are made available in a Maxima file, and even a nearly publication-ready diagram will be generated. Further adaptations can be made with relatively little effort, and it should therefore be possible to carry out measurement uncertainty calculations more effectively. There is hope that this tool will help to make this kind of calculations available also to the user who is not very familiar with the tool.

The entire work was presented within the scope of an international conference (22nd IMEKO TC3 Conference [4]) at the beginning of 2014. For source codes, please check with the author.

References:

[1] Evaluation of measurement data – Guide to the expression of uncertainty in measurement, JCGM 100:2008, http://www.bipm.org/utils/common/documents/jcgm/JCGM_100_2008_E.pdf
[2] Maxima, a Computer Algebra System, http://maxima.sourceforge.net/
[3] AutoIt, a freeware BASIC-like automation and scripting language, http://www.autoitscript.com/site/
[4] D. Röske, Uncertainty Calculations Using Free CAS Software Maxima, Proc. of the 22nd IMEKO TC3 Conference, 3 to 5 February, 2014, Cape Town, South Africa
http://www.imeko.org/publications/tc3-2014/IMEKO-TC3-2014-016.pdf

Contact person:

Dirk Röske, Dept. 1.2, WG 1.22, e-mail: dirk.roeske@ptb.de