## 1. Introduction

In recent years, technological advances in the area of medical equipments have allowed the use of these devices for different types of illness diagnosis and treatment of patients. Thereby, nowadays a lot of quantities and parameters related to the health state of the patient can be measured and used by clinicians to take a decision about the correct conduct to be adopted during the treatment.

However, despite the huge advances in the area, a question always must be arisen related to the use of medical equipments: the measurements are reliable? According to Lira (2002) and Parvis & Vallan (2002), such reliability is fundamental and a wrong evaluated value by the medical equipment can affect any decision and even compromise the condition of a patient at all. Therefore, the use of medical equipments requires periodical calibration and evaluation of measurement uncertainty.

All measuring instruments must be calibrated, to be considered adequate for use (Ferreira et al. 2010). VIM (2008) defines calibration as an operation that, under specified conditions, in a first step, establishes a relation between the quantity values with measurement uncertainties provided by measurement standards and corresponding indications with associated measurement uncertainties and in second step, uses this information to establish a relation for obtaining a measurement result from an indication.

This fact drew the attention of metrology and health organisms all around the world that have written a number of guides and technical recommendation for instrument calibration and determination of uncertainty for medical instrumentation before use in order to ensure high quality of the measurements. The Guide (GUM, 2003) is the result of a joint international committee whose aim was to publish a guide for uncertainty evaluation to be used as conventional guidelines in several different countries. That is the case of Brazil whose local NMI (National Measurement Institute), the INMETRO (Brazilian National Institute of Metrology, Standardization and Industrial Quality) has adopted the Guide to rule device calibration and its measurement uncertainty evaluation in the country.

In the Guide, the idea that the result of a measurement is only complete if the measured quantity value and the measured uncertainty are evaluated is reinforced. The Guide also presents the procedures that must be followed during this process, and indicates the weight least squares (WLS) method as a way to perform it.

The goals of this chapter is to present a case study of the application of weighted least squares to carry out the calibration and uncertainty evaluation of a digital maximum respiratory pressures measuring system: a prototype of manovacuometer developed at the * Biomedical Engineering Laboratory*(NEPEB) of Universidade Federal de Minas Gerais (UFMG).

In section 2, a description of the mathematical basis of the use of WLS for calibration is summarized. The measuring procedure employed in this work and the main features of the prototype are described in sections 3 and 4, where the calibration method is discussed as well. In sections 5, 6 and 7 the obtained results are presented, followed by the sections 8 and 9 in which presentation of discussion, conclusion and suggestion for future works is done.

## 2. The use of WLS for calibration

As aforementioned, the method of weighted least squares (Lira, 2002; GUM, 2003; Mathioulakis & Belessiotis, 2000; Press et al., 1996) can be used for implementing calibration and uncertainty evaluation.

According to Mathioulakis & Belessiotis (2000), during the calibration process the * J*output values

X

_{j}s measured by the equipment under calibration are compared to reference values

Y

_{j}s applied on its input. In other words, a mathematical model with

*parameters*N

a

_{n}is proposed in order to represent

*calibration points (*J

Y

_{j},

X

_{j}) as accurate as possible. To determine the values of

a

_{n}, the maximum likelihood estimator for the model parameters is calculated by minimizing the differences between measured and estimated data (Press et al., 1996):

Equation (1) refers to the maximum likelihood estimator used for the least squares (LS) fitting whose name is derived from the fact that minimization is done taking into account the squares of the differences between measured and estimated data. In the case of the calibration points (_{j}, _{j}), there are also standard deviations (or measurement uncertainties _{j}) associated to the raw data that are not considered in (1). Because of this fact, an alternative maximum likelihood estimator, the chi-square function χ^{2}, is suggested by Mathioulakis & Belessiotis (2000), and this new approch is also known as * weighted least squares method*(WLS):

Therefore, by the WLS method, adjust uncertainties of the raw data are taken into account, situation that better describes the existing conditions at this work. Also as regarding as the case on focus, the proposed fit model is the bi-parametric curve:

where * a*is the slope and

*is its intercept. Thus, considering this linear fitting of equation (3) the chi-squared function χ*b

^{2}becomes:

Minimization of (4) over * a*and

*is not trivial and requires the use of numerical techniques. As suggested by Press et al. (1996) and implemented at this work, the solution for (4) is obtained by scaling “the*b

y

_{j}s so as to have variance equal to the

x

_{j}then to do a conventional linear fitting with weights derived from the (scaled) sum

To estimate the slope * a*, and the intercept

*of (3) and the associated uncertainties,*b

u

_{a}e

u

_{b}, Mathioulakis & Belessiotis (2000) indicate the following equation:

where C is a vector whose elements are the fitted coefficients * a*and

*; and Q = (K*b

^{T}. K)

^{-1}is a matrix whose diagonal elements are the variances of

*(*a

q

_{2,2}) and

*(*b

q

_{1,1}). The off-diagonal elements

q

_{1,2}=

q

_{2,1}are the covariances between these parameters. K is the matrix with

*x 2 components:*J

with

L is the vector:

As can be seen from (6) and (7), K and L are weighted inversely by the pounds _{j}. This fact suggests the name of the WLS calibration method.

## 3. The developed measuring system

Knowledge of maximum respiratory pressures, i.e., maximum inspiratory pressure (PImax) and maximum expiratory pressure (PEmax) exerted by muscles of respiratory system, can be used to a number of purposes, such as diagnosing of respiratory system diseases, convalescence of muscle strength during aging, the need to release mechanical ventilation and to evaluate the efficiency of a physiotherapeutic treatment. Furthermore, it is a simple, non-invasive way and reproducible for strength quantification of the respiratory system muscles (Black & Hyatt, 1969).

Maximum respiratory pressures can be measured with equipments so-called manovacuometers, designed for measuring supra-atmospheric (manometer) and sub-atmospheric pressures (vacuometer), and can be either analog or digital (Ferreira et al., 2010). During the daily clinical and research practice, some problems are reported for those types of equipments. For instance, the former has complex calibration and is prone to reading errors. Both types of instruments have limitations associated to perform single reading and to allow tracing measurement curves. Due to these limits encountered for commercial manovacuometers, a digital manuovacuometer (DM) was designed at the NEPEB (Oliveira Júnior et al., 2008) with some features whereby the drawbacks presented by the others existing manovacuometers could be overcome.

The prototype of digital measuring system includes two operating modules: a module for acquiring the analog pressure signal and a second one, responsible for A/D conversion that can be connected to a computer through a USB interface, as can be regarded in figure 1.

The analog pressure signals are collected by the acquisition module, within two piezoresistive differential sensors are employed (figure 2 ), one for measuring PImax and other for PEmax. The main operating characteristics of the sensor can be found in table 1 (Freescale, 2004). Another characteristic of this sensor which is important to be emphasized is that pressure on side P1 must be always higher than on P2. Thus, sensor 1 measures PEmax (PE applied on P1) and sensor 2 measures PImax (PI applied on P2). The sensors have a pressure range from 0 up to 50 kPa.

According to Oliveira Júnior et al. (2008), the analog to digital conversion module has a built-in microcontroller that includes 13 channels, 10 bits A/D converter, and emulates the RS232 communication protocol that allows transferring data to a computer through an USB interface. The signal frequency of respiratory flow ranges from 0 to 40 Hz (Olson, 2010). Thus, a Butterworth low-pass, anti-aliasing filter, 40 Hz cutoff frequency (order 2) was used for a sampling frequency of 1 kHz (Oliveira Júnior et al., 2008).

## 4. Protocols for collecting calibration points and uncertainty evaluation

For collecting the calibration points, the adopted procedures were in compliance with protocols described by INMETRO (INMETRO, 2008; INMETRO, 1997). According to such procedures, at first the pressure applied on the sensors is increased up to superior pressure range value and then decreased to 0 kPa. Each pressure value has to be applied during approximately five seconds and, after that, the average voltage is measured at the output of the manovacuometer.

The above procedure was performed four times for each sensor, and the average voltage, _{m}, for both rising and fall curves were obtained for each sensor (table 2). Two extra points, whose pressure value is higher than superior range value (50 kPa), were inserted into the set of calibration points to check the starting region of non-linearity on the curve. In order to check for drifting two groups of data were collected in a time interval of six months from each other.

The calibration points for the sensor 2 (rising curve – first group of collected data) and its uncertainties are showed in table 2. _{r}corresponds to the pressure values applied on the input of the sensors.

To perform the measurements, the schematic implementation depicted in figure 2 was used as well.

The methodology for prototype calibration employed the linear fitting using weighted least squares abovementioned. It was chosen to obtain curve fitting for the average rising and for the average fall curves for each sensor (Ferreira et al., 2008). Concerning the measurement uncertainty for that prototype, it was determined according to the Guide (GUM, 2003).

The instrument used as standard (* Instrument*– figure 2) during the calibration of the prototype was with 0.03% reported expanded uncertainty, for a coverage factor

*= 2 and coverage probability of 95.45%.*k

## 5. Estimation of the calibration curves

Figures 3 and 4 depict the calibration points (_{m}, _{r}) and the associated mean transfer functions (increasing input pressure and decreasing input pressure – rising and fall) for both

sensors (first group of collected data) of the NEPEB manovacuometer. Regarding these figures, it can be noticed that linearity is present up to _{r}= 53.3kPa. Thus, calculations were carried out also considering the calibration point with this pressure value and the calibration point with pressure equal to 60 kPa was discarded.

As mentioned in secction 4, table 2 contains the calibration points for sensor 2 (rising curve – first group of collected data) and associated uncertaintes. Estimation of these uncertainties is in accordance with guidelines indicated in the Guide (2003). In the case of the uncertainty _{Pr}, it was evaluated using the related standard expanded uncertainty and the resolution of the display device of the reference manovacuometer as follows:

In turn, the uncertainty _{Vm}was estimated based on fluctuation of the repeated readings (prototype output voltage) around each calibration point (Mathioulakis & Belessiotis, 2000) correspondent to the standard deviation of the mean, _{V}(type A uncertainty), that is:

where _{V}corresponds to standard deviation of the voltage values for the four rising (falling) curves and * n*is the number of points (

*= 4, in that case).*n

As discussed in section 2, the proposed model used for fitting the calibration points is described by equation (3). Thereby, considering the slope * a*and the intercept

*, application of a reference pressure value on the input of the sensor results to a determined voltage*b

V

_{m}on its output, which, in turn, has to correspond to the pressure

P

_{rc}, measured by the prototype, i.e.:

where _{rc}is the pressure in kiloPascal that corresponds to the voltage _{m}, indicated at the display of the prototype (Ferreira et al., 2008a).

Solution of the expression (5) provides the values of the parameters of (10), their uncertainties and the covariance between the parameters, * Cov(a,b)*. In table 3, results calculated for both groups of experimental data (collected in between six month apart, as mentioned earlier) can be regarded.

## 6. Consistency analysis

The importance for verifying the consistency analysis between the fitted model and experimental data which is implemented by using the so-called chi-squared test is highlighted by Lira (2002) and Cox & Harris (2006).

Lira (2002) mentions that the minimum value of the chi-squared function * χ2*, indicated by the expression (4) and denoted as

*degrees of freedom in such a way that*= p – q

should be approximately equal to one. Hence, the closer to unity is the value of Bi, the better the model is adjusted to data.

Lira (2002) adds that a value for the Birge ratio close to the unity is not a proof that the model is correct. However, when Bi is significantly different from 1, it can be interpreted that something within the model is wrong.

The values of B_{i}for the adjusted models and both set of experimental data of the prototype manovacuometer are presented in table 4.

## 7. Evaluation of measurement uncertainty

As mentioned earlier, the Guide (2003) mentions that any measurement result is composed by a numeric value indicating the quantity estimated value and by the measurement uncertainty. Frequently, the measurement uncertainty is estimated by using a mathematical measurement model which is a function which contains every quantity, including all corrections and correction factors that can contribute with a significant component of uncertainty to the measurement result (Ferreira et al., 2010).

The Guide also indicates the application of the the law of propagation of uncertainties to the mathematical measurement model mentioned above for estimation of the measurement uncertainty:

According to Mathioulakis & Belessiotis (2000), the proposed model to estimate uncertainty, u_{Pc}, is derived from applying (12) to equation (10):

which results (Ferreira et al., 2008):

where the uncertainty u_{Vm}is estimated considering the type A uncertainty, u_{V}, and the resolution of NEPEB manovacuometer, u_{R}. As example of estimation of the measurement uncertainty for the prototype, it was chosen the calibration point of the table 2 whose value of P_{r}= 26.6 kPa. Thereby:

Taking account the values calculated by (15), (16) and (17) as well as those of the parameters, their uncertainties and covariance (table 3) and substituting in (14), results u_{Pc}= 0.0654 kPa.

The standard combined uncertainty, in turn, was obtained by:

where, again, u_{Pr}= 0.1 kPa is the uncertainty associated to reference instrument and is obtained from (8), resulting:

Therefore, this is the calculated value for the standard combined uncertainty u_{c}.

Considering the coverage probability of 95.45% (Ferrero & Salicone, 2006), the effective number of degrees of freedom is ν_{eff}→ ∞, indicating k = 2. Thus, the standard expanded uncertainty is estimated as Up = 0.2 kPa.

Calculated expanded uncertainty for the others calibrations points of the rising curve of the sensor 2 and remainder curves was estimated to range from 0.2 to 0.3 kPa for the first group of collected data. In figure 5, the obtained experimental data (calibration points) and estimated pressure curve for sensor 2 (rising), considering the first collected data set can be regarded.

The analysis implemented for calculating the measurement uncertainty of the data collected six month after the first group followed the same procedure carried out earlier, showed above. Great similarity to the first set of collected data was observed for the values concerning the evaluated uncertaity of the second group. In this case, calculated expanded uncertainty using WLS modeling was estimated to be around 0.3 to 0.5 kPa. Figure 6 depicts experimental data and estimated calibration curve for sensor 2 – rising curve (second group of collected).

## 8. Discussion

The linear model (3) showed itself a good approach for the available data since the mean transfer curves for the collected calibration data points for sensor 1 and 2 have a linear behavior (figure 3). This fact has already been indicated in Freescale (2004).

As mentioned by Mathioulakis & Belessiotis (2000), the use of weight least squared (WLS) has the advantage not only to allow estimation of model parameters, but for also allowing calculation of the parameters uncertainties and covariance (table 3). Also as appointed by the Guide (GUM, 2003) and employed in this work for the digital manovacuometer (DM), such uncertainties and convariance can be just used for evalutation of measurement uncertainty of the prototype by the application of the law of propagation of uncertainties.

Considering the calibration points and estimated calibration fitted curves presented in table 3, according to the consistency analysis indicated by Lira (2002) and Cox & Harris (2006), non-conformities between data and models were not observed: calculated values for the Birge ratio is near to unity (table 4).

As aforementioned, application of the law of progation of uncertainties on the linear model fitted to the calibration points (10) was employed for evaluating of measurement uncertaity for the prototype. The values for expanded uncertainty were estimated to range from 0.2 up to 0.5 kPa, considering all calibration points of the both groups of collected data by DM.

Comparison between pressure estimated using fitted calibration models and pressure values of calibration points (P_{r}) for both sensors and both group of data showed to have a rasonable coincidence as is depicted in figures 5 e 6. Noneless, as observed for the Birge ratio, a small difference is noticed when data collected six months apart are considered, which could appoints the need for verifying the periodicity of calibration for the prototype as well.

## 9. Conclusion and suggestions for future works

The calibration procedure has allowed to know about the reliability of the DM to measure maximum respiratory pressure. Calibration model using WLS proposed in this work was employed to obtain the calibration curves and to evaluate the measurement uncertainties for a digital manovacuometer prototype (developed at the NEPEB). The use of WLS for calibration showed itself to be appropriate for the avaiable data as well as a pratical way to evaluate the uncertainty since the proposed model itself can be used for evaluation of the measurement uncertainty by application of the law of propagation of uncertainties.

According to the model for evaluation of uncertainty, designed using weighted least squares adjustment (WLS) at the laboratory, the values for expanded uncertainty ranges from 0.2 up to 0.5 kPa. The small variation observed when comparing the two set of data acquired months apart for the values of ucertainty calculated by WLS modeling shows, clearly, the demand to perform periodic cheking. Such periodicity between calibrations has been checked, as mentioned by Fernandes et al. (2010).

The digital manovacuometer is already being used in clinical research application According to Montemezzo et al. (2010), it was checked that the results showed above are not influenced whether the used interface (mouthpiece and tube for respiratory pressure application on DM) is changed. As suggestions for future works, others uncertainty sources could be evaluated in the models to assess the impact on the results like those related to the low-pass filter, A/D converter and temperature variation.

## Acknowledgments

To Fundação de Amparo à Pesquisa do Estado de Minas Gerais (FAPEMIG) for financial support.