Open access peer-reviewed chapter

A Case Study of Applying Weighted Least Squares to Calibrate a Digital Maximum Respiratory Pressures Measuring System

By José L. Ferreira, Flávio H. Vasconcelos and Carlos J. Tierra-Criollo

Submitted: October 31st 2010Reviewed: May 13th 2011Published: August 23rd 2011

DOI: 10.5772/19006

Downloaded: 1712

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 Xjs measured by the equipment under calibration are compared to reference values Yjs applied on its input. In other words, a mathematical model with N parameters an is proposed in order to represent J calibration points (Yj, Xj) as accurate as possible. To determine the values of an, the maximum likelihood estimator for the model parameters is calculated by minimizing the differences between measured and estimated data (Press et al., 1996):

j=1J[Yjy(Xj;a,1a2,...aN)]2E1

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 (Yj, Xj), there are also standard deviations (or measurement uncertainties uj) 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):

χ2=j=1J[Yjy(Xj;a,1a2,...aN)]uj22E2

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:

y(X)=aX+bE3

where a is the slope and b is its intercept. Thus, considering this linear fitting of equation (3) the chi-squared function χ2 becomes:

χ2(a,b)=j=1J(YjbaXj)uy,j2+a2ux,j22E4

Minimization of (4) over a and b 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 yjs so as to have variance equal to the xj then to do a conventional linear fitting with weights derived from the (scaled) sum uy,j2+ux,j2”. Such a procedure is repeated until a determined limit for iterations can be reached.

To estimate the slope a, and the intercept b of (3) and the associated uncertainties, ua e ub, Mathioulakis & Belessiotis (2000) indicate the following equation:

(KTK)C=KTLE5

where C is a vector whose elements are the fitted coefficients a and b; and Q = (KT. K)-1 is a matrix whose diagonal elements are the variances of a (q2,2) and b (q1,1). The off-diagonal elements q1,2=q2,1 are the covariances between these parameters. K is the matrix with J x 2 components:

K=[k1,1k1,2kJ,1kJ,2]E6
,

with kj,1=1wjand kj,2=Xiwj.

L is the vector:

L=[Y1w1YJwJ]E7

As can be seen from (6) and (7), K and L are weighted inversely by the pounds wj. 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.

Figure 1.

The digital manovacuometer designed in our lab (NEPEB) and its operating modules. Adapted from Ferreira et al. (2010).

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.

Table 1.

Operating characteristics of the sensor MPX5050. Adapted from Freescale (2004).

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, Vm, 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. Pr corresponds to the pressure values applied on the input of the sensors.

Table 2.

Reference pressure, output voltage values and associated uncertainties – sensor 2 (rising curve – first group of collected data). Adapted from Ferreira et al. (2010).

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

Figure 2.

Schematic implementation for prototype calibration (Adapted from Ferreira et. al., 2010).

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 (Reference Instrumentfigure 2) during the calibration of the prototype was with 0.03% reported expanded uncertainty, for a coverage factor k = 2 and coverage probability of 95.45%.

5. Estimation of the calibration curves

Figures 3 and 4 depict the calibration points (Vm, Pr) and the associated mean transfer functions (increasing input pressure and decreasing input pressure – rising and fall) for both

Figure 3.

Mean transfer functions for sensor 1 (first group of collected data) showing the calibration points (adapted from Ferreira et. al., 2008).

Figure 4.

Mean transfer functions for sensor 2 (first group of collected data) showing the calibration points (adapted from Ferreira et. al., 2008).

sensors (first group of collected data) of the NEPEB manovacuometer. Regarding these figures, it can be noticed that linearity is present up to Pr = 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 uPr, it was evaluated using the related standard expanded uncertainty and the resolution of the display device of the reference manovacuometer as follows:

uPr=(0.03%2)PrE8
.

In turn, the uncertainty uVm 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, uV (type A uncertainty), that is:

uVm=sVnE9
.

where sV corresponds to standard deviation of the voltage values for the four rising (falling) curves and n is the number of points (n = 4, in that case).

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 b, application of a reference pressure value on the input of the sensor results to a determined voltage Vm on its output, which, in turn, has to correspond to the pressure Prc, measured by the prototype, i.e.:

Prc=b+aVmE10
.

where Prc is the pressure in kiloPascal that corresponds to the voltage Vm, 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.

Table 3.

Values for the parameters a and b, their uncertainties ua and ub and Cov(a,b).

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 χmin2can be represented by a chi-squared distribution with = p – q degrees of freedom in such a way that χmin2is close to p – q, where p is the number of calibration points and q is the number of model outputs. In other words, the Birge ratio represented in (11),

Bi=(χmin2pq)12E11
,

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 Bi for the adjusted models and both set of experimental data of the prototype manovacuometer are presented in table 4.

Table 4.

Birge ratio for sensor 1 and sensor 2 curves and both groups of collect data with p = 10 points and q = 1 output.

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:

uc2(y)=i=1N(fxi)2u2(xi)+2i=1N1j=i+1Nfxifxju(xi,xj)E12

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

uPc2=(PrcVm)2u2(Vm)+(Prcb)2u2(b)+(Prca)2u2(a)+2PrcbPrcxau(a,b)E13

which results (Ferreira et al., 2008):

uPc=(a2uVm2+ub2+Vm2ua2+2VmCov(b,a))1/2E14

where the uncertainty uVm is estimated considering the type A uncertainty, uV, and the resolution of NEPEB manovacuometer, uR. As example of estimation of the measurement uncertainty for the prototype, it was chosen the calibration point of the table 2 whose value of Pr = 26.6 kPa. Thereby:

uV=sVn=0.0104=0.005VE15
,
uR=0.0013=0.0006VE16
,
uVm2=uV2+uR2uVm=0.005VE17
.

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 uPc = 0.0654 kPa.

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

uc2=uPc2+uPr2E18
,

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

uc=(0.03%2×26.7)2+0.06542=0.1kPaE19
.

Therefore, this is the calculated value for the standard combined uncertainty uc.

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).

Figure 5.

a) Calibration points and estimated curve by the model based on WLS and associated uncertainties for sensor 2 (rising) – considering the first group of collected data. (b) Zoom nearby Pe = 26 kPa: calibration points (+), estimated curve (Pe) resulting from linear adjustment and estimated curve associated to expanded uncertainty (Pe+Up and Pe-Up). Adapted from Ferreira et. al., 2010.

Figure 6.

a) Calibration points and estimated curve by the model based on WLS and associated uncertainties for sensor 2 (rising) – considering the second group of collected data. (b) Zoom nearby Pe = 26 kPa: calibration points (+), estimated curve (Pe) resulting from linear adjustment and estimated curve associated to expanded uncertainty (Pe+Up and Pe-Up). Adapted from Ferreira et. al., 2010.

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 (Pr) 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.

How to cite and reference

Link to this chapter Copy to clipboard

Cite this chapter Copy to clipboard

José L. Ferreira, Flávio H. Vasconcelos and Carlos J. Tierra-Criollo (August 23rd 2011). A Case Study of Applying Weighted Least Squares to Calibrate a Digital Maximum Respiratory Pressures Measuring System, Applied Biomedical Engineering, Gaetano D. Gargiulo and Alistair McEwan, IntechOpen, DOI: 10.5772/19006. Available from:

chapter statistics

1712total chapter downloads

More statistics for editors and authors

Login to your personal dashboard for more detailed statistics on your publications.

Access personal reporting

Related Content

This Book

Next chapter

Biomedical Image Volumes Denoising via the Wavelet Transform

By Eva Jerhotová, Jan Švihlík and Aleš Procházka

Related Book

First chapter

Spatial Unmasking of Speech Based on Near-Field Distance Cues

By Craig Jin, Virginia Best, Gaven Lin and Simon Carlile

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

More about us