16.05.2013 Views

Documentación en PDF - LIEC

Documentación en PDF - LIEC

Documentación en PDF - LIEC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

UNIVERSIDAD DE CÓRDOBA<br />

Departam<strong>en</strong>to de Química Analítica<br />

Departam<strong>en</strong>to de Informática y Análisis Numérico<br />

DESARROLLO DE UN LIMS Y UNA<br />

PLATAFORMA PARA LA AUTOMATIZACIÓN<br />

DE PROCESOS ANALÍTICOS CONTINUOS<br />

BASADOS EN LA TECNOLOGÍA ORIENTADA A<br />

OBJETOS. DESARROLLO Y USO DE MÉTODOS<br />

QUIMIOMÉTRICOS PARA EL TRATAMIENTO<br />

DE DATOS ESPECTROSCÓPICOS<br />

Manuel Urbano Cuadrado<br />

Córdoba, Febrero de 2005


DESARROLLO DE UN LIMS Y UNA PLATAFORMA PARA LA<br />

AUTOMATIZACIÓN DE PROCESOS ANALÍTICOS CONTINUOS<br />

BASADOS EN LA TECNOLOGÍA ORIENTADA A OBJETOS.<br />

DESARROLLO Y USO DE MÉTODOS QUIMIOMÉTRICOS PARA EL<br />

TRATAMIENTO DE DATOS ESPECTROSCÓPICOS<br />

Fdo. María Dolores Luque de<br />

Castro,<br />

Catedrática del Departam<strong>en</strong>to de<br />

Química Analítica, Universidad de<br />

Córdoba<br />

Fdo. Pedro Pérez Juan,<br />

Doctor <strong>en</strong> Ci<strong>en</strong>cias, Sección Químicas<br />

Por<br />

Manuel Urbano Cuadrado<br />

Los Directores,<br />

Fdo. Miguel Ángel Gómez-Nieto,<br />

Catedrático del Departam<strong>en</strong>to de<br />

Informática y Análisis Numérico,<br />

Universidad de Córdoba<br />

Trabajo pres<strong>en</strong>tado para optar al grado de Doctor <strong>en</strong> Ci<strong>en</strong>cias,<br />

Sección Químicas


María Dolores Luque de Castro, Catedrática del Departam<strong>en</strong>to de Química<br />

Analítica de la Universidad de Córdoba, Miguel Ángel Gómez-Nieto,<br />

Catedrático del Departam<strong>en</strong>to de Informática y Análisis Numérico, y Pedro<br />

Pérez Juan, Doctor <strong>en</strong> Ci<strong>en</strong>cias, Sección Químicas, <strong>en</strong> calidad de Directores de<br />

la Tesis Doctoral pres<strong>en</strong>tada por el Lic<strong>en</strong>ciado <strong>en</strong> Ci<strong>en</strong>cias Químicas, con el<br />

título “Desarrollo de un LIMS y una plataforma para la automatización de<br />

procesos analíticos continuos. Desarrollo y uso de métodos quimiométricos<br />

para el tratami<strong>en</strong>to de datos espectroscópicos”,<br />

CERTIFICAN: Que la citada Tesis Doctoral se ha realizado <strong>en</strong> los<br />

laboratorios del Departam<strong>en</strong>to de Química Analítica y<br />

del Departam<strong>en</strong>to de Informática y Análisis Numérico<br />

de la Universidad de Córdoba y que, a su juicio, reúne<br />

los requisitos necesarios exigidos <strong>en</strong> este tipo de<br />

trabajos.<br />

Y para que conste y surta los efectos pertin<strong>en</strong>tes,<br />

expid<strong>en</strong> el pres<strong>en</strong>te certificado <strong>en</strong> Córdoba a 21 de Enero<br />

de 2005.<br />

Fdo. María Dolores Luque de Castro Fdo. Miguel Ángel Gómez-Nieto<br />

Fdo. Pedro Pérez Juan


Agradecimi<strong>en</strong>tos<br />

A María Dolores Luque de Castro, Miguel Ángel Gómez-Nieto y Pedro Manuel<br />

Pérez-Juan, directores de este trabajo, por su constante labor y por haber puesto a<br />

mi alcance su conocimi<strong>en</strong>to y experi<strong>en</strong>cia. Especialm<strong>en</strong>te a María Dolores Luque<br />

de Castro por haberme ofrecido la oportunidad de realizar esta tesis doctoral.<br />

A los muchísimos amigos y compañeros del Departam<strong>en</strong>to de Química<br />

Analítica y del Departam<strong>en</strong>to de Informática y Análisis Numérico de la<br />

Universidad de Córdoba, que me brindaron siempre su más sincera ayuda y sin<br />

los cuales todo se habría retrasado mucho.<br />

A toda mi g<strong>en</strong>te de Elche (Alicante) por el interés y cariño que siempre<br />

me han mostrado.<br />

A mis amigos Manolo y Antonio por haberme hecho llorar tantas veces<br />

de risa; sois “especies <strong>en</strong> extinción”, y gracias por soportar mis aus<strong>en</strong>cias y<br />

excusas.<br />

A mis hermanos Rafa y Paqui, por estar ahí, por todo. A mi abuela<br />

Araceli, por todos sus cuidados.<br />

A mis padres por ser los responsables de que esté hoy donde estoy a<br />

través de su ejemplo y trabajo, por haber <strong>en</strong>tregado siempre toda su vida por mí y<br />

mis hermanos. Estoy orgulloso de vosotros.<br />

A toda mi familia <strong>en</strong> g<strong>en</strong>eral por tantas y tantas cosas.<br />

A Noelia, mi “rocheta”, por todo su amor.


Índice


XI<br />

Índice<br />

Objetivos _______________________________________________________ 1<br />

Introducción ____________________________________________________ 7<br />

1.- Introducción __________________________________________________ 9<br />

2.- Ing<strong>en</strong>iería del Software. Modelado ori<strong>en</strong>tado a objetos: el significado<br />

de UML y el Proceso de Desarrollo Unificado _________________________ 22<br />

3.- El l<strong>en</strong>guaje de programación Java ________________________________ 39<br />

4.- La información como recurso. Oracle. SGBD basados <strong>en</strong> el modelo de<br />

datos objeto-relacional ____________________________________________ 44<br />

5.- Quimiometría: modelos clásicos para diseñar experim<strong>en</strong>tos, clasificar<br />

productos y predecir parámetros ____________________________________ 61<br />

6.- Química computacional: índices de similitud y huellas digitales ________ 80<br />

7.- Refer<strong>en</strong>cias __________________________________________________85<br />

Parte experim<strong>en</strong>tal _____________________________________________ 103<br />

Parte I: Informatización del proceso analítico y de la gestión y<br />

análisis de los datos producidos mediante el uso del paradigma<br />

ori<strong>en</strong>tado a objetos _____________________________________________ 105<br />

Capítulo 1. Use of object-ori<strong>en</strong>ted techniques for the design and<br />

developm<strong>en</strong>t of standard software solutions in automation and data<br />

managem<strong>en</strong>t in analytical chemistry ________________________________ 107<br />

Capítulo 2. An op<strong>en</strong> solution for computer control of flow injection<br />

analyses in wine production monitoring _____________________________ 131<br />

Capítulo 3. Trigger-bassed concurr<strong>en</strong>t control system for automating<br />

analytical processes _____________________________________________ 151


Manuel Urbano Cuadrado Tesis Doctoral<br />

Capítulo 4. Fully automated flow injection analyser for the<br />

determination of volatile acidity in wines ____________________________ 185<br />

Capítulo 5. A fully automated method for in real time determination<br />

of lacasse activity in wines _______________________________________ 201<br />

Capítulo 6. JWisWine: a Java web information system for quality<br />

control in wineries ______________________________________________ 217<br />

Parte II: Desarrollo de métodos quimiométricos y algoritmos<br />

para el desarrollo de modelos cualitativos y cuantitativos <strong>en</strong><br />

química analítica ______________________________________________ 237<br />

Capítulo 7. Ultraviolet-visible spectroscopy and pattern recognition<br />

methods for differ<strong>en</strong>tiation and classification of wines __________________ 239<br />

Capítulo 8. Study of spectral analytical data using fingerprints<br />

and scaled similarity measurem<strong>en</strong>ts ________________________________ 265<br />

Capítulo 9. Near infrared reflectance spectroscopy and<br />

multivariate analysis in <strong>en</strong>ology: determination or scre<strong>en</strong>ing<br />

of fifte<strong>en</strong> parameters in differ<strong>en</strong>t types of wines _______________________ 295<br />

Capítulo 10. Comparison and joint use of near infrared<br />

spectroscopy and fourier transform mid infrared<br />

spectroscopy for the determination of wine parameters _________________ 315<br />

Discusión de los resultados ______________________________________ 333<br />

Conclusiones __________________________________________________ 345<br />

XII


XIII<br />

Índice<br />

Anexo: comunicaciones a congresos _______________________________ 351


Objetivos


Objetivos<br />

Las últimas t<strong>en</strong>d<strong>en</strong>cias <strong>en</strong> metodología y tecnología informáticas pose<strong>en</strong> las<br />

características idóneas para la construcción de software que supere su tradicional<br />

dep<strong>en</strong>d<strong>en</strong>cia de la variabilidad de la información que exhibe y requiere su<br />

<strong>en</strong>torno, de la diversidad de configuraciones hardware y sistemas operativos<br />

disponibles, y de la forma aleatoria de desarrollar productos software. Uno de los<br />

grupos de investigación (Ing<strong>en</strong>iería del Software, Conocimi<strong>en</strong>to y Bases de<br />

Datos) <strong>en</strong> los que se ha desarrollado el trabajo recogido <strong>en</strong> esta Memoria ha<br />

empleado metodologías como la ing<strong>en</strong>iería de sistemas y los paradigmas<br />

evolutivo y ori<strong>en</strong>tado a objetos, junto con herrami<strong>en</strong>tas como Oracle, Java, XML,<br />

etc., para el desarrollo de soluciones software <strong>en</strong> diversas áreas. Este grupo de<br />

investigación también ha desarrollado <strong>en</strong> los últimos años algoritmos basados <strong>en</strong><br />

cálculo de similitudes para el estudio de compuestos químicos y su recuperación<br />

de bases de datos.<br />

El otro grupo (Innovaciones <strong>en</strong> Sistemas Continuos y Discontinuos para<br />

la Automatización de Procesos Analíticos) donde se ha desarrollado parte de la<br />

investigación aquí pres<strong>en</strong>tada ha puesto a punto un gran número de métodos<br />

continuos de análisis. Estos métodos han supuesto la simplificación, reducción y<br />

automatización de las etapas previas a la medida <strong>en</strong> el conjunto del proceso<br />

analítico, aportando las v<strong>en</strong>tajas de eliminación de errores, reducción del tiempo<br />

de análisis y del consumo de reactivos, etc. El grupo también ha usado los<br />

métodos quimiométricos clásicos para la determinación multiparamétrica y para<br />

la clasificación de muestras a partir de la información espectral.<br />

La Memoria de tesis aquí pres<strong>en</strong>tada ha t<strong>en</strong>ido dos objetivos g<strong>en</strong>éricos<br />

principales, a saber: (1) <strong>en</strong>samblar parte de los logros alcanzados por ambos<br />

3


Manuel Urbano Cuadrado Tesis Doctoral<br />

grupos de investigación para llevar a cabo la informatización del proceso<br />

analítico y la gestión de la información que proporciona utilizando las últimas<br />

t<strong>en</strong>d<strong>en</strong>cias computacionales y, (2) usar y comparar los métodos quimiométricos<br />

conv<strong>en</strong>cionales con otros basados <strong>en</strong> el cálculo de similitudes a partir de la<br />

información espectral. Estos objetivos g<strong>en</strong>éricos se han concretado <strong>en</strong> los<br />

sigui<strong>en</strong>tes objetivos específicos:<br />

1) Diseño y desarrollo de un sistema de automatización del proceso analítico<br />

dotado de las sigui<strong>en</strong>tes características:<br />

4<br />

• Abierto a cualquier tipo de análisis, con indep<strong>en</strong>d<strong>en</strong>cia de la<br />

instrum<strong>en</strong>tación y método analítico utilizado.<br />

• Ori<strong>en</strong>tado al usuario (“el químico”) que lo utilizará, de forma que la<br />

traducción del procedimi<strong>en</strong>to analítico a “órd<strong>en</strong>es computacionales” no<br />

requiera un apr<strong>en</strong>dizaje especial.<br />

• Operativo <strong>en</strong> cualquier <strong>en</strong>torno hardware, de forma que pueda<br />

utilizarse con los difer<strong>en</strong>tes recursos computacionales que existan <strong>en</strong><br />

los laboratorios analíticos.<br />

• Seguro <strong>en</strong> la adquisición de los datos relacionados con el proceso de<br />

análisis, de forma que esta información pueda comprobarse, validarse,<br />

analizarse y almac<strong>en</strong>arse para su posterior tratami<strong>en</strong>to.<br />

2) Diseño y desarrollo de un sistema de información para la gestión y análisis<br />

de la información analítica g<strong>en</strong>erada <strong>en</strong> procesos de producción o<br />

elaboración. El sistema de gestión deberá considerar otros aspectos<br />

relevantes <strong>en</strong> el proceso analítico, tales como el instrum<strong>en</strong>tal con el que se<br />

realiza el análisis, las personas implicadas, la validación de los resultados,<br />

etc. Las características más destacables que deberá satisfacer el sistema son<br />

las sigui<strong>en</strong>tes:


Objetivos<br />

• Escalable, de forma que esté abierto a la gestión y análisis de la<br />

información analítica de cualquier proceso de producción y a los<br />

cambios que pueda sufrir la información a monitorizar.<br />

• Operativo <strong>en</strong> cualquier <strong>en</strong>torno hardware y sistema operativo<br />

disponibles <strong>en</strong> la empresa.<br />

• Integrado con el sistema de automatización desarrollado, de forma que<br />

“<strong>en</strong>ti<strong>en</strong>da” la información suministrada por este sistema para su<br />

posterior tratami<strong>en</strong>to.<br />

• Ori<strong>en</strong>tado al usuario no especializado que lo utilizará, de forma que la<br />

interacción con el sistema sea similar al proceso manual que se lleva a<br />

cabo <strong>en</strong> la empresa.<br />

• Seguro y robusto <strong>en</strong> el manejo de la información, de forma que la<br />

información almac<strong>en</strong>ada no esté sujeta a pérdidas, robos o<br />

manipulaciones malint<strong>en</strong>cionadas.<br />

• R<strong>en</strong>table para la empresa, de forma que las utilidades integradas <strong>en</strong> el<br />

sistema aport<strong>en</strong> a los usuarios la reducción del tiempo invertido <strong>en</strong> las<br />

tareas diarias de gestión de la información analítica. Por otro lado, el<br />

sistema también debe poseer un conjunto de utilidades de análisis de la<br />

información almac<strong>en</strong>ada para facilitar a los responsables el<br />

conocimi<strong>en</strong>to sufici<strong>en</strong>te para la correcta toma de decisiones.<br />

3) Diseño de nuevos modelos y algoritmos ori<strong>en</strong>tados a <strong>en</strong>contrar nuevas<br />

soluciones quimiométricas que puedan utilizarse <strong>en</strong> el análisis de la<br />

información espectral. Estas soluciones se compararán con los métodos<br />

quimiométricos conv<strong>en</strong>cionales. La información espectral que se usará será<br />

la correspondi<strong>en</strong>te a las zonas ultravioleta, visible, infrarrojo cercano e<br />

infrarrojo medio y se aplicará <strong>en</strong> el campo <strong>en</strong>ológico. La validación de los<br />

métodos y algoritmos desarrollados será difer<strong>en</strong>te si el objetivo es<br />

cuantitativo o cualitativo. Para métodos cuantitativos se emplearán<br />

parámetros tales como el coefici<strong>en</strong>te de determinación, el error <strong>en</strong> la<br />

5


Manuel Urbano Cuadrado Tesis Doctoral<br />

6<br />

calibración y <strong>en</strong> la validación, la correlación con el método de refer<strong>en</strong>cia<br />

usado, etc. Para métodos cualitativos, la bondad de los algoritmos será<br />

función del grado de agrupación de muestras y del porc<strong>en</strong>taje de clasificación<br />

<strong>en</strong> la validación.


Introducción


1. Introducción<br />

Introducción<br />

Uno de los pilares básicos de la sociedad actual es la información. La dim<strong>en</strong>sión<br />

que adquier<strong>en</strong> los avances económicos, sociales y culturales deriva, <strong>en</strong> gran<br />

parte, de las cualidades de la información y de su accesibilidad. El diccionario de<br />

la Real Academia Española de la l<strong>en</strong>gua define información, <strong>en</strong>tre otras<br />

acepciones, como “comunicación o adquisición de conocimi<strong>en</strong>tos que permit<strong>en</strong><br />

ampliar o precisar los que se pose<strong>en</strong> sobre una materia determinada”. Desde un<br />

punto de vista práctico, la información puede ser considerada como el resultado<br />

de un proceso de gestión y análisis de datos. Los datos son registros de hechos,<br />

observaciones, valores, etc. y constituy<strong>en</strong> la <strong>en</strong>trada al proceso. La Fig. 1<br />

visualiza el dinamismo implícito <strong>en</strong> el concepto de información. La importancia<br />

de la disponibilidad de una información de calidad es cada vez más explícita<br />

debido al reconocimi<strong>en</strong>to de que la planificación y toma de decisiones <strong>en</strong> un <strong>en</strong>te<br />

dado está basada <strong>en</strong> la información a la que ti<strong>en</strong>e acceso o la que ha sido capaz<br />

de elaborar.<br />

Gestión Análisis<br />

Datos Proceso<br />

Información<br />

Fig. 1. Proceso dinámico de síntesis de información.<br />

9


Manuel Urbano Cuadrado Tesis Doctoral<br />

Diversos autores elevan a revolución el proceso experim<strong>en</strong>tado por la<br />

sociedad como consecu<strong>en</strong>cia del adv<strong>en</strong>imi<strong>en</strong>to de la “era de la información”.<br />

Así, se considera que esta revolución no sólo ha acelerado el flujo de<br />

información, sino que ha transformado la estructura profunda de la decisión de la<br />

que dep<strong>en</strong>d<strong>en</strong> nuestras acciones [1,2].<br />

Cuando se habla de cualidad y calidad de la información se hace<br />

refer<strong>en</strong>cia a características muy g<strong>en</strong>éricas y, normalm<strong>en</strong>te, difíciles de<br />

cuantificar. Adjetivos como “relevante”, “precisa”, “completa”, y frases como<br />

“destinada al receptor adecuado”, “disponible <strong>en</strong> un tiempo adecuado”,<br />

“detallada a un nivel <strong>en</strong>t<strong>en</strong>dible por el usuario”, etc. [3,4], son algunos ejemplos<br />

del l<strong>en</strong>guaje impreciso <strong>en</strong> este ámbito. Cada área de conocimi<strong>en</strong>to emplea una<br />

definición distinta de las cualidades de la información que, normalm<strong>en</strong>te,<br />

consiste <strong>en</strong> un refinami<strong>en</strong>to de la g<strong>en</strong>érica. Además, utiliza una serie de patrones<br />

de medida o evaluación para adaptar el concepto de información a su <strong>en</strong>torno y<br />

aplicación. La especialización de este concepto <strong>en</strong> la química analítica se expone<br />

a continuación.<br />

1.1 Información y química analítica<br />

Obt<strong>en</strong>er información analítica apropiada es de suma importancia para la<br />

caracterización de materiales, seguimi<strong>en</strong>to de procesos de producción, detección<br />

de fraudes, etc. La química analítica es una disciplina que ti<strong>en</strong>e como objetivo la<br />

síntesis de información (bio)química de interés mediante la aplicación de<br />

métodos de análisis a un objeto o sistema. Malissa definió la química analítica<br />

como “la ci<strong>en</strong>cia que hace evid<strong>en</strong>te, asequible, verdadera y útil la información<br />

(bio)química lat<strong>en</strong>te, intrínseca de un objeto o sistema”. Cuando la calidad de la<br />

información suministrada por el proceso analítico es mala, las decisiones<br />

tomadas pued<strong>en</strong> g<strong>en</strong>erar problemas económicos-sociales. Tölg estimó, <strong>en</strong> 1984,<br />

que las pérdidas económicas <strong>en</strong> Alemania derivadas de la mala calidad de la<br />

información analítica asc<strong>en</strong>dían a 6000 millones de marcos.<br />

10


Introducción<br />

La calidad de la información analítica puede considerarse desde<br />

difer<strong>en</strong>tes puntos de vista. Teóricam<strong>en</strong>te, la calidad es la conjunción de unas<br />

propiedades que permit<strong>en</strong> clasificar cierta información como peor, mejor o igual<br />

que otra. Al ser los datos los pilares que sust<strong>en</strong>tan la información, la exactitud y<br />

repres<strong>en</strong>tatividad de aquéllos son los dos indicadores más importantes <strong>en</strong> la<br />

caracterización teórica de la calidad analítica. Los indicadores se correspond<strong>en</strong><br />

con las propiedades analíticas supremas (caracterizan un resultado analítico), que<br />

están a su vez soportadas <strong>en</strong> las propiedades básicas precisión, s<strong>en</strong>sibilidad y<br />

selectividad (que caracterizan el proceso analítico). En el cálculo de la<br />

incertidumbre (la reducción de ésta) <strong>en</strong> química analítica, como <strong>en</strong> cualquier<br />

ci<strong>en</strong>cia informativa, se usan los indicadores exactitud y precisión.<br />

Desde un punto de vista práctico, la calidad debe estar ori<strong>en</strong>tada a la<br />

satisfacción del usuario o cli<strong>en</strong>te, adquiri<strong>en</strong>do importancia propiedades analíticas<br />

llamadas productivas, como la rapidez y los costes. De igual forma que el primer<br />

<strong>en</strong>foque de la calidad analítica, la veracidad de la información sigue t<strong>en</strong>i<strong>en</strong>do una<br />

importancia clave <strong>en</strong> la calidad, sólo que el grado requerido vi<strong>en</strong>e impuesto por<br />

el cli<strong>en</strong>te. Así surg<strong>en</strong> los conceptos de calidad externa y calidad interna.<br />

El cli<strong>en</strong>te y el laboratorio analítico participan de difer<strong>en</strong>te forma <strong>en</strong> estos<br />

dos tipos de calidad. La calidad externa está asociada a la exig<strong>en</strong>cia y a la<br />

percepción de las características de la información analítica por parte del cli<strong>en</strong>te<br />

(así, se habla de calidad requerida y calidad percibida). Por otro lado, la calidad<br />

interna siempre es el producto que la política y la gestión de la calidad ofrec<strong>en</strong> a<br />

través del laboratorio o la organización de la que dep<strong>en</strong>d<strong>en</strong>. Se suele llamar<br />

calidad alcanzada.<br />

El resultado de un análisis es la consecu<strong>en</strong>cia del proceso analítico,<br />

también llamado proceso de medida químico (PMQ), que se define como “el<br />

conjunto de operaciones que separa el sistema <strong>en</strong> estudio (sin muestrear, sin<br />

medir y sin tratar) de los resultados g<strong>en</strong>erados y expresados según los<br />

requerimi<strong>en</strong>tos del problema analítico planteado”. Esta definición, dada por<br />

11


Manuel Urbano Cuadrado Tesis Doctoral<br />

Chalmers y Bailescu [5], es de carácter g<strong>en</strong>érico y repres<strong>en</strong>ta el proceso analítico<br />

como una caja negra.<br />

Si se analiza esta caja negra con mayor detalle se pued<strong>en</strong> distinguir<br />

difer<strong>en</strong>tes etapas que compon<strong>en</strong> el proceso analítico y el aum<strong>en</strong>to del número de<br />

<strong>en</strong>tradas a la caja, no si<strong>en</strong>do considerada la muestra como única <strong>en</strong>trada. Este<br />

análisis se plasma <strong>en</strong> la Fig. 2.<br />

Sistema <strong>en</strong><br />

Estudio<br />

12<br />

Operaciones<br />

previas<br />

Proceso Analítico<br />

Detección<br />

Adquisición y<br />

tratami<strong>en</strong>to<br />

de datos<br />

Información requerida Metodología de medida Herrami<strong>en</strong>tas<br />

Fig. 2. Esquema del proceso analítico.<br />

Resultado<br />

Instrum<strong>en</strong>tación<br />

Reactivos<br />

Normas y guías<br />

INFORMÁTICA<br />

La primera etapa del proceso la compon<strong>en</strong> las operaciones previas<br />

<strong>en</strong>caminadas a la preparación de la muestra para la medición. La etapa<br />

intermedia es la detección, <strong>en</strong> la que se pon<strong>en</strong> de manifiesto las características<br />

físico-químicas de los analitos. Por último, la adquisición y el tratami<strong>en</strong>to de<br />

datos para la g<strong>en</strong>eración del resultado analítico completan el proceso analítico.<br />

En cuanto a las difer<strong>en</strong>tes <strong>en</strong>tradas al proceso analítico, la información<br />

requerida, la metodología de medida y las herrami<strong>en</strong>tas también han de t<strong>en</strong>erse<br />

<strong>en</strong> cu<strong>en</strong>ta, además del sistema a estudiar, que proporcionará la muestra, tal como<br />

aparece <strong>en</strong> la Fig. 2. Estas <strong>en</strong>tradas actúan a modo de condicionantes del proceso<br />

analítico, afectando por tanto a sus propiedades analíticas.


Introducción<br />

La importancia de la información requerida ya ha sido com<strong>en</strong>tada<br />

anteriorm<strong>en</strong>te al hablar de la calidad analítica. Vi<strong>en</strong>e impuesta por las personas u<br />

organizaciones que van a utilizarla con diversos fines. El papel de la metodología<br />

de medida también es de suma relevancia debido a que su desarrollo ti<strong>en</strong>e como<br />

fin extraer del sistema <strong>en</strong> estudio la información con unas propiedades idóneas.<br />

Por último, los difer<strong>en</strong>tes tipos de herrami<strong>en</strong>tas constituy<strong>en</strong> los pilares técnicos y<br />

materiales que sust<strong>en</strong>tan el proceso, haci<strong>en</strong>do posible que se pueda llevar a cabo.<br />

Las herrami<strong>en</strong>tas son los aparatos e instrum<strong>en</strong>tos empleados para la<br />

preparación de la muestra y para la medición de la señal de interés,<br />

respectivam<strong>en</strong>te, además de los reactivos, las normas de calidad de los<br />

laboratorios analíticos, y las aplicaciones informáticas. Este último tipo de<br />

herrami<strong>en</strong>tas es el utilizado <strong>en</strong> esta Tesis, ya que la investigación desarrollada es<br />

un int<strong>en</strong>to tanto de introducir la tecnología informática más reci<strong>en</strong>te <strong>en</strong> las<br />

difer<strong>en</strong>tes partes del proceso analítico, como de evaluar los efectos de estas<br />

últimas t<strong>en</strong>d<strong>en</strong>cias <strong>en</strong> la química analítica.<br />

1.2 La informática y sus usos <strong>en</strong> química analítica<br />

La Real Academia Española de la L<strong>en</strong>gua define la informática como “el<br />

conjunto de conocimi<strong>en</strong>tos ci<strong>en</strong>tíficos y técnicas que hac<strong>en</strong> posible el tratami<strong>en</strong>to<br />

automático de la información por medio de ord<strong>en</strong>adores”.<br />

A pesar de que el hombre siempre ha buscado la forma de sustituir su<br />

participación <strong>en</strong> tareas de rutina (el desarrollo de las máquinas ha seguido un<br />

curso paralelo a la historia del ser humano), la implantación de sistemas<br />

efici<strong>en</strong>tes para la automatización de la capacidad de razonar y tratar la<br />

información empezó a ver la luz a mediados del siglo pasado con el<br />

adv<strong>en</strong>imi<strong>en</strong>to de la primera g<strong>en</strong>eración de computadoras [6]. La car<strong>en</strong>cia de la<br />

tecnología apropiada impidió hasta <strong>en</strong>tonces materializar modelos formales de<br />

cálculo, que ya surgieron <strong>en</strong> la Grecia del siglo IV a. C. y que continuaron hasta<br />

13


Manuel Urbano Cuadrado Tesis Doctoral<br />

la descripción de la máquina teórica por el matemático británico Alan Turing <strong>en</strong><br />

1936 [7].<br />

A partir de la primera g<strong>en</strong>eración de ord<strong>en</strong>adores, su evolución ha<br />

seguido un ritmo vertiginoso hasta el punto de que se habla de hasta cuatro<br />

g<strong>en</strong>eraciones de ord<strong>en</strong>adores [8]. En estas cuatro etapas la caducidad y aparición<br />

de conceptos relacionados con la tecnología, estructura, sistema operativo,<br />

l<strong>en</strong>guaje de programación, base de datos, etc., ha sido una constante, de forma<br />

que términos como “trabajos por lote”, “acceso secu<strong>en</strong>cial a registros”, “tarjetas<br />

perforadas”, etc., resultan ya lejanos <strong>en</strong> el desarrollo de la computación; mi<strong>en</strong>tras<br />

que conceptos como “multiprogramación”, “base de datos relacional”, “clusters”,<br />

“Java”, “Internet”, etc., ti<strong>en</strong><strong>en</strong> un difer<strong>en</strong>te grado de cercanía a la informática de<br />

nuestros días.<br />

Los programas informáticos, formados por un conjunto de datos,<br />

instrucciones y operaciones aritméticas y lógicas, han <strong>en</strong>contrado un uso ext<strong>en</strong>so<br />

<strong>en</strong> todas las áreas sociales. Así, no es posible el <strong>en</strong>t<strong>en</strong>dimi<strong>en</strong>to del estado actual<br />

de muchas áreas de conocimi<strong>en</strong>to sin el uso de estas herrami<strong>en</strong>tas, que, por otra<br />

parte, sigu<strong>en</strong> un proceso constante de desarrollo e investigación de nuevas<br />

utilidades. La química analítica no se ha sustraído a la adopción de las v<strong>en</strong>tajas<br />

que ofrece la computación. La aplicación de los métodos analíticos hace que la<br />

información química de los sistemas <strong>en</strong> estudio se ponga de manifiesto.<br />

Como se ha com<strong>en</strong>tado anteriorm<strong>en</strong>te, el proceso analítico ofrece un<br />

resultado tras una serie de operaciones <strong>en</strong> la muestra empleando diversas<br />

herrami<strong>en</strong>tas, <strong>en</strong>tre las que se <strong>en</strong>cu<strong>en</strong>tra la informática. Pero la química analítica<br />

moderna ha traspasado los límites del laboratorio para <strong>en</strong>trar <strong>en</strong> contacto con los<br />

problemas económicos-sociales que la rodean, requiriéndose un nuevo papel de<br />

la información analítica difer<strong>en</strong>te a la concepción clásica de la <strong>en</strong>trega de<br />

resultados.<br />

Con este fin, el proceso analítico necesita una continuación a partir de la<br />

salida de resultados, resolviéndose con un <strong>en</strong>lace a un proceso de información,<br />

d<strong>en</strong>ominado “Proceso de Información Automatizado”, si <strong>en</strong> él intervi<strong>en</strong><strong>en</strong> los<br />

14


Introducción<br />

ord<strong>en</strong>adores. La Fig. 3 muestra el nuevo proceso de información analítica<br />

(resultante de la unión del proceso de información automatizado al proceso<br />

analítico clásico) y la reubicación de las herrami<strong>en</strong>tas informáticas <strong>en</strong> este nuevo<br />

esc<strong>en</strong>ario.<br />

INFORMÁTICA<br />

Control<br />

Control<br />

Adquisición<br />

Introducción y<br />

manipulación<br />

Consultas<br />

Estructuradas<br />

Obt<strong>en</strong>ción de datos<br />

no estructurados<br />

Muestra<br />

Operaciones<br />

previas<br />

Detección<br />

Adquisición y<br />

tratami<strong>en</strong>to de<br />

datos<br />

Resultado<br />

Gestión de<br />

datos<br />

Extracción<br />

de datos<br />

Análisis de<br />

datos<br />

Información<br />

Proceso<br />

analítico<br />

clásico<br />

Fig. 3. La informática <strong>en</strong> el proceso de información analítica.<br />

Proceso de<br />

información<br />

automático<br />

15


Manuel Urbano Cuadrado Tesis Doctoral<br />

1.2.1 La informática <strong>en</strong> el proceso analítico clásico<br />

La informática participa, aunque con un distinto grado de ext<strong>en</strong>sión, <strong>en</strong> todas las<br />

etapas del proceso analítico clásico. El manejo automático de los muestreadores y<br />

aparatos utilizados <strong>en</strong> las operaciones previas se realiza a través del software<br />

adecuado [9-17]. El flujo de información de estos programas es unidireccional<br />

desde el ord<strong>en</strong>ador hasta los aparatos debido a que éstos no proporcionan<br />

información de interés para la resolución del problema analítico. Existe <strong>en</strong> la<br />

bibliografía un escaso número de estos programas a causa de que esta etapa es la<br />

más difícil de automatizar, si<strong>en</strong>do hoy <strong>en</strong> día uno de los fr<strong>en</strong>tes de investigación<br />

<strong>en</strong> química analítica. Su interés radica <strong>en</strong> el aum<strong>en</strong>to de la calidad analítica que<br />

supone la eliminación de la participación humana <strong>en</strong> esta etapa, que es una de las<br />

que introduc<strong>en</strong> mayor error <strong>en</strong> el resultado final.<br />

El uso del ord<strong>en</strong>ador <strong>en</strong> la etapa de detección ya conlleva un flujo<br />

bidireccional de información. Por un lado, los programas permit<strong>en</strong> el control de<br />

instrum<strong>en</strong>tos mediante la selección y ajuste de parámetros de medida, como<br />

pued<strong>en</strong> ser la longitud de onda <strong>en</strong> un espectrofotómetro, el voltaje <strong>en</strong> un equipo<br />

de electroforesis capilar o <strong>en</strong> un pot<strong>en</strong>ciostato, etc. Por otra parte, y a<br />

consecu<strong>en</strong>cia de la difer<strong>en</strong>cia <strong>en</strong>tre aparatos e instrum<strong>en</strong>tos, para la recogida de<br />

los datos proporcionados por el instrum<strong>en</strong>to se hace uso, casi <strong>en</strong> todos los casos,<br />

de la informática.<br />

Aunque la adquisición de datos ya <strong>en</strong>traría d<strong>en</strong>tro de la tercera etapa del<br />

proceso analítico clásico, desde el punto de vista informático existe una simbiosis<br />

con la de detección. Así pues, aunque a nivel conceptual constituyan distintas<br />

etapas, a nivel de funcionalidad pued<strong>en</strong> ser tratadas como una única solución<br />

software [18-28]. Incluso exist<strong>en</strong> trabajos donde las etapas de tratami<strong>en</strong>to de<br />

muestra y las de detección y adquisición de datos se controlan por ord<strong>en</strong>ador<br />

[29,30].<br />

Para la tercera etapa, correspondi<strong>en</strong>te al tratami<strong>en</strong>to de datos, se hace uso<br />

de la informática <strong>en</strong> toda la acepción de su definición, pues se usan unos datos<br />

16


Introducción<br />

como <strong>en</strong>trada a una aplicación software para, a través de un algoritmo, g<strong>en</strong>erar<br />

un resultado [31-39]. Los programas <strong>en</strong>cargados de la detección y de la<br />

adquisición de la señal <strong>en</strong> los instrum<strong>en</strong>tos pued<strong>en</strong> llevar incorporados un<br />

módulo para el tratami<strong>en</strong>to de los datos [40]. Una aplicación software para el<br />

tratami<strong>en</strong>to de datos indep<strong>en</strong>di<strong>en</strong>te de la adquisición sería otra modalidad<br />

[41,42].<br />

Son de destacar algunas v<strong>en</strong>tajas de la primera opción. La más<br />

importante de todas es la compatibilidad del formato para los datos <strong>en</strong>tre la<br />

adquisición y el tratami<strong>en</strong>to, evitando el problema de tiempo que conlleva la<br />

conversión de un formato a otro, cuando no la imposibilidad de hacerlo. Otras<br />

v<strong>en</strong>tajas pued<strong>en</strong> ser la compatibilidad con las propias configuraciones de<br />

hardware y sistema operativo que ofrece la opción continua, la parecida<br />

estructura de las interfaces gráficas de usuario, etc.<br />

Las aplicaciones de tratami<strong>en</strong>to de datos indep<strong>en</strong>di<strong>en</strong>tes de la<br />

adquisición de la señal ofrec<strong>en</strong> un mayor espectro de métodos de tratami<strong>en</strong>to, ya<br />

que los programas están construidos a partir de unos requerimi<strong>en</strong>tos g<strong>en</strong>erales<br />

sobre procesami<strong>en</strong>to de datos, a difer<strong>en</strong>cia de la aplicabilidad de programas para<br />

el control, adquisición de la señal y tratami<strong>en</strong>to de datos de un determinado tipo<br />

de instrum<strong>en</strong>to.<br />

El tratami<strong>en</strong>to de los datos puede dividirse <strong>en</strong> dos grupos at<strong>en</strong>di<strong>en</strong>do al<br />

fin perseguido por los difer<strong>en</strong>tes métodos de procesami<strong>en</strong>to: filtrado y reducción<br />

del ruido de la señal analítica por un lado, y análisis de los datos para la<br />

obt<strong>en</strong>ción de un resultado por otro. En lo que respecta al primer grupo, un<br />

ejemplo repres<strong>en</strong>tativo es el filtrado de la señal digital, para el que es<br />

imprescindible el uso del ord<strong>en</strong>ador. Los filtros analógicos, que también juegan<br />

un papel importante <strong>en</strong> el tratami<strong>en</strong>to de la señal y suel<strong>en</strong> ser usados <strong>en</strong><br />

combinación con los filtros digitales, no van a considerarse.<br />

Los filtros digitales son algoritmos desarrollados para la eliminación del<br />

ruido, que han <strong>en</strong>contrado aplicabilidad <strong>en</strong> la resolución de muchos y variados<br />

problemas analíticos. La señal analítica está compuesta por dos partes: una parte<br />

17


Manuel Urbano Cuadrado Tesis Doctoral<br />

de interés que conti<strong>en</strong>e la información química, y una parte aleatoria causada por<br />

defici<strong>en</strong>cias <strong>en</strong> la detección, que no sólo no ti<strong>en</strong>e información de interés, sino<br />

que, además, <strong>en</strong>mascara la información analítica. La parte aleatoria se conoce<br />

como ruido.<br />

Se distingu<strong>en</strong> dos tipos de técnicas para eliminar el ruido: de dominio del<br />

tiempo y de dominio de la frecu<strong>en</strong>cia. Las primeras aprovechan el carácter<br />

aleatorio del ruido y están soportadas <strong>en</strong> algoritmos que, de una manera u otra,<br />

realizan un promediado de puntos consecutivos o un ajuste por mínimos<br />

cuadrados [43-45]. Suele distinguirse <strong>en</strong>tre filtros de v<strong>en</strong>tana fija y filtros de<br />

v<strong>en</strong>tana móvil.<br />

Las técnicas de dominio de la frecu<strong>en</strong>cia están basadas <strong>en</strong> la difer<strong>en</strong>cia<br />

que ésta exhibe para la señal de interés y el ruido. Las difer<strong>en</strong>tes modalidades de<br />

la transformada de Fourier se <strong>en</strong>cuadran <strong>en</strong> este tipo [46-49].<br />

Las técnicas basadas <strong>en</strong> el filtrado de Kalman [50], normalm<strong>en</strong>te usadas<br />

para la multideterminación de compon<strong>en</strong>tes mediante el empleo de técnicas<br />

cinéticas, también se han usado para la eliminación del ruido [51,52].<br />

El otro gran grupo de tratami<strong>en</strong>to de datos <strong>en</strong>globa los procesami<strong>en</strong>tos de<br />

alto nivel, y ti<strong>en</strong><strong>en</strong> la finalidad de producir un resultado analítico tras el<br />

procesami<strong>en</strong>to y análisis de datos. Las herrami<strong>en</strong>tas informáticas desarrolladas<br />

están soportadas <strong>en</strong> los numerosos métodos estadísticos usados por el químico<br />

analítico para cuantificar, clasificar, e incluso dilucidar aspectos estructurales de<br />

los analitos.<br />

Wold, <strong>en</strong> 1972, fue el primer investigador que d<strong>en</strong>ominó Quimiometría<br />

al “uso de métodos estadísticos, matemáticos y otros de lógica formal para el<br />

diseño y selección de experim<strong>en</strong>tos químicos y/o para la obt<strong>en</strong>ción de la máxima<br />

información química relevante a partir de datos químicos” [53]. Hoy <strong>en</strong> día,<br />

muchos autores, no sólo <strong>en</strong> química analítica, sino <strong>en</strong> química farmacéutica,<br />

química de los alim<strong>en</strong>tos, etc., la consideran como una ci<strong>en</strong>cia es<strong>en</strong>cial para<br />

soportar los métodos analíticos [54-56].<br />

18


Introducción<br />

1.2.2 La informática <strong>en</strong> el proceso analítico actual. El nuevo papel de la<br />

información analítica<br />

Como se ha com<strong>en</strong>tado anteriorm<strong>en</strong>te, la labor de la química analítica hoy <strong>en</strong> día<br />

no se circunscribe a la <strong>en</strong>trega de resultados. En la Fig. 3 se puede observar que<br />

éstos son la <strong>en</strong>trada al sistema de procesami<strong>en</strong>to de la información, que es la<br />

segunda parte de lo que <strong>en</strong> la investigación realizada se ha d<strong>en</strong>ominado proceso<br />

de información analítica. Por lo tanto, los resultados de los análisis son la materia<br />

prima para la síntesis de información.<br />

Toda la aplicabilidad de los programas informáticos a las operaciones<br />

previas, a la detección de la señal, y a la adquisición y tratami<strong>en</strong>to de datos sigue<br />

estando vig<strong>en</strong>te <strong>en</strong> la reubicación de la informática <strong>en</strong> el nuevo proceso de<br />

información analítica.<br />

En los últimos años ha surgido el concepto de LIMS (las iniciales de la<br />

expresión anglosajona “Laboratory Information Managem<strong>en</strong>t System”) que<br />

abarca los sistemas informáticos para la gestión y el análisis de datos analíticos.<br />

Su definición puede ser derivada de las muchas usadas para “Sistema de<br />

Información”.<br />

Andreu et al. [57] definieron Sistema de Información como: “Un<br />

conjunto formal de procesos que, operando <strong>en</strong> una colección de datos<br />

estructurada según las necesidades de la empresa, recopilan, elaboran y<br />

distribuy<strong>en</strong> la información (o parte de ella) necesaria para las operaciones de<br />

dicha empresa y para las actividades de dirección y control correspondi<strong>en</strong>tes, es<br />

decir, las decisiones para desempeñar su actividad de acuerdo a su estrategia de<br />

negocio”.<br />

Para definir LIMS, lo vamos a hacer añadi<strong>en</strong>do una serie de matices que<br />

particularic<strong>en</strong> la definición dada de un sistema de información a la de LIMS. Así,<br />

cuando se habla de empresa, ésta se corresponde con un laboratorio de análisis<br />

químico, y por tanto, la colección de datos estructurados será de resultados<br />

analíticos, equipos del laboratorio, analistas, etc. En segundo lugar, las<br />

19


Manuel Urbano Cuadrado Tesis Doctoral<br />

operaciones de la empresa ti<strong>en</strong><strong>en</strong> que matizarse de difer<strong>en</strong>te forma según que el<br />

laboratorio sea indep<strong>en</strong>di<strong>en</strong>te o pert<strong>en</strong>ezca a una organización de mayor<br />

dim<strong>en</strong>sión, de la que el laboratorio es un departam<strong>en</strong>to más. Incluso cuando el<br />

laboratorio es indep<strong>en</strong>di<strong>en</strong>te, podría ser un laboratorio de refer<strong>en</strong>cia o control<br />

pert<strong>en</strong>eci<strong>en</strong>te al <strong>en</strong>te público o un laboratorio privado que ofrece un servicio de<br />

análisis, que g<strong>en</strong>eralm<strong>en</strong>te suele cubrir las necesidades analíticas de un<br />

determinado campo, ya sea clínico, agrario, ambi<strong>en</strong>tal, etc. Así, las operaciones<br />

para las que será necesaria la información y el flujo de ésta son dep<strong>en</strong>di<strong>en</strong>tes del<br />

tipo de laboratorio.<br />

Cuando un laboratorio es una parte de un <strong>en</strong>te de mayores dim<strong>en</strong>siones,<br />

la información g<strong>en</strong>erada sigue un camino vertical. Cuando es asc<strong>en</strong>d<strong>en</strong>te empieza<br />

<strong>en</strong> el laboratorio y termina <strong>en</strong> la dirección técnica del <strong>en</strong>te global, incluso<br />

llegando a la dirección g<strong>en</strong>eral, pero con un nivel elevado de transformación y<br />

siempre con características indicativas para su uso táctico y estratégico. Por<br />

tanto, suele ser un paso desde los datos (con el calificativo “producidos”) a la<br />

información (con el calificativo “elaborada”).<br />

Por otro lado, cuando la información es desc<strong>en</strong>d<strong>en</strong>te adquiere matices<br />

imperativos para la síntesis de nuevos datos requeridos por la organización de la<br />

empresa. Entonces, el proceso es el contrario y se pasa de la información (con el<br />

calificativo “requerida”) a los datos (con el calificativo “necesarios”). Es obvio<br />

que éste es el flujo de información <strong>en</strong>tre el laboratorio y la dirección, habi<strong>en</strong>do<br />

otros, por ejemplo, <strong>en</strong>tre la dirección y el departam<strong>en</strong>to de producción, con una<br />

dirección desc<strong>en</strong>d<strong>en</strong>te y con un cont<strong>en</strong>ido dep<strong>en</strong>di<strong>en</strong>te del ya explicado.<br />

Cuando el laboratorio es indep<strong>en</strong>di<strong>en</strong>te y estatal o regional, el flujo suele<br />

ser también vertical, pero cambia el destino de la información, apareci<strong>en</strong>do la<br />

administración <strong>en</strong> el lugar de la dirección de la empresa. Por el contrario, cuando<br />

el laboratorio es indep<strong>en</strong>di<strong>en</strong>te y privado el camino que sigue la información es<br />

horizontal <strong>en</strong>tre el laboratorio y el cli<strong>en</strong>te. Éste requiere una información que<br />

g<strong>en</strong>eralm<strong>en</strong>te necesita un m<strong>en</strong>or grado transformación después de la salida del<br />

proceso analítico clásico, es decir, después de la g<strong>en</strong>eración del resultado.<br />

20


Introducción<br />

Cuando la información requerida es cualitativa (no implicando este término la<br />

respuesta binaria “si/no, referida a la pres<strong>en</strong>cia de un compuesto”) se alcanza el<br />

mayor grado de elaboración necesaria. Esto es debido a que el cli<strong>en</strong>te solicita<br />

respuestas sobre la pert<strong>en</strong><strong>en</strong>cia o no del material <strong>en</strong> estudio a una determinada<br />

clase (por ejemplo, material adulterado, con un estándar de calidad establecido<br />

por la ley, etc.) cuyo criterio se basa <strong>en</strong> la evaluación de una serie de parámetros<br />

analíticos.<br />

Aunque la definición que se ha dado de Sistema de Información no<br />

incluye ninguna refer<strong>en</strong>cia a los medios informáticos, es difícil no relacionarlos.<br />

Normalm<strong>en</strong>te, se difer<strong>en</strong>cia el “Sistema de Información Total” del “Sistema de<br />

Información Automatizado” porque, <strong>en</strong> el último, la informática sí está<br />

considerada como la herrami<strong>en</strong>ta principal.<br />

1.2.3 Tipos de aplicaciones informáticas para el sistema de procesami<strong>en</strong>to<br />

Se van a distinguir dos tipos de aplicaciones: la conocida como MIS (de las siglas<br />

Managem<strong>en</strong>t Information System) y los sistemas de ayuda a la decisión,<br />

conocidos como DSS (de las siglas Decission Support System). Estos sistemas<br />

repres<strong>en</strong>tan difer<strong>en</strong>tes niveles <strong>en</strong> la funcionalidad de los programas informáticos<br />

empleados (ver el proceso de información <strong>en</strong> la Fig. 3). También suele<br />

considerarse un nivel más bajo que el de los MISs, que abarca las aplicaciones<br />

software para la realización de tareas repetitivas, operativas y transaccionales con<br />

un número grande de datos.<br />

Los MISs <strong>en</strong> química analítica ayudan a los usuarios <strong>en</strong> la gestión de la<br />

información química, incluy<strong>en</strong>do introducción de resultados, codificación de<br />

muestras, control de equipos, inv<strong>en</strong>tario de reactivos, etc. [58-66]. Aunque ti<strong>en</strong><strong>en</strong><br />

cierta hibridación con los sistemas de nivel más bajo (ya que muchas de estas<br />

tareas son repetitivas), son programas que ayudan a la toma de decisiones <strong>en</strong><br />

tareas de gestión al proporcionar informes sobre la carga de trabajo del<br />

laboratorio, el uso de un instrum<strong>en</strong>to, los análisis realizados por un determinado<br />

analista, etc. Se basan <strong>en</strong> consultas estructuradas a la base de datos.<br />

21


Manuel Urbano Cuadrado Tesis Doctoral<br />

En cuanto a los DSSs, su uso <strong>en</strong> química analítica ayuda a la toma de<br />

decisiones que, estratégicam<strong>en</strong>te, realiza la dirección de una empresa a raíz de la<br />

información química cont<strong>en</strong>ida <strong>en</strong> su base de datos. Esta ayuda a la decisión se<br />

basa <strong>en</strong> el análisis de los datos proporcionados por consultas que no sigu<strong>en</strong><br />

criterios preestablecidos [67-74]. Por ejemplo, conocer la semana, <strong>en</strong> un año<br />

cualquiera, <strong>en</strong> la que un determinado parámetro mostró los valores máximos,<br />

saber qué zona d<strong>en</strong>tro de una d<strong>en</strong>ominación de orig<strong>en</strong> de vinos es la que<br />

proporciona la uva con mayores conc<strong>en</strong>traciones de ácido glucónico, etc. Estos<br />

sistemas son clave para el objetivo de la química analítica moderna de no<br />

limitarse sólo a la <strong>en</strong>trega de datos.<br />

2. Ing<strong>en</strong>iería del software. Modelado ori<strong>en</strong>tado a objetos: el<br />

22<br />

significado de UML y el Proceso de Desarrollo Unificado<br />

La participación de la informática <strong>en</strong> el proceso analítico se materializa <strong>en</strong> el uso<br />

de aplicaciones informáticas para la automatización (control de instrum<strong>en</strong>tos y<br />

aparatos) y para el procesami<strong>en</strong>to y análisis de datos (adquisición y filtrado de la<br />

señal, tratami<strong>en</strong>to de datos, y gestión y análisis de la información analítica).<br />

Los programas informáticos, que anteriorm<strong>en</strong>te se han definido de una<br />

forma trivial como un conjunto de datos, instrucciones y operaciones aritméticas<br />

y lógicas, son productos que, <strong>en</strong> la mayoría de los casos, surg<strong>en</strong> después de una<br />

fase de desarrollo compleja. Existe una serie de condicionantes que difer<strong>en</strong>cian<br />

de modo cualitativo y cuantitativo el producto software de otros derivados de un<br />

proceso de producción clásico o de un producto de servicios. Se van a com<strong>en</strong>tar<br />

de manera breve algunos de ellos.<br />

En primer lugar, la variabilidad constante del <strong>en</strong>torno con el que<br />

interactúan los programas afecta considerablem<strong>en</strong>te a la forma de construir<br />

aplicaciones informáticas. Los datos y la información a elaborar con éstos están<br />

influ<strong>en</strong>ciados, <strong>en</strong> un mayor o m<strong>en</strong>or grado, por cambios <strong>en</strong> los requisitos<br />

funcionales. Por tanto, el desarrollo de un programa siempre ti<strong>en</strong>e que estar


Introducción<br />

soportado <strong>en</strong> un diseño que haga a las estructuras de datos y a los procesos<br />

indep<strong>en</strong>di<strong>en</strong>tes (<strong>en</strong> la mayor dim<strong>en</strong>sión posible) de la variabilidad intrínseca de<br />

los requisitos funcionales de la información.<br />

En segundo lugar, el soporte físico y tecnológico para las soluciones<br />

software está caracterizado, de igual forma que los requisitos funcionales, por<br />

una estructura dinámica. La compatibilidad <strong>en</strong>tre el triángulo formado por el<br />

software, el hardware y el sistema operativo, indisp<strong>en</strong>sable para el uso de la<br />

computación, suele ser breve <strong>en</strong> el tiempo debido a la asimetría <strong>en</strong> el desarrollo y<br />

evolución de estos tres compon<strong>en</strong>tes. De nuevo el desarrollo de sistemas<br />

informáticos busca el concepto de indep<strong>en</strong>d<strong>en</strong>cia, esta vez relacionado con el<br />

triángulo anteriorm<strong>en</strong>te citado.<br />

Por último, la complejidad intrínseca <strong>en</strong> el mant<strong>en</strong>imi<strong>en</strong>to de un<br />

programa informático también hace que su desarrollo sea especial. Los fallos del<br />

software no se pued<strong>en</strong> solucionar con un simple “recambio de piezas”, sino que<br />

son derivados del diseño del programa y se materializan <strong>en</strong> el código ejecutable,<br />

debi<strong>en</strong>do analizarse para su solución la estructura y el comportami<strong>en</strong>to del<br />

sistema, tanto a nivel de diseño como de implantación. Una aproximación para<br />

paliar este inconv<strong>en</strong>i<strong>en</strong>te es el diseño y desarrollo del sistema con un <strong>en</strong>foque<br />

modular <strong>en</strong>caminado a construir compon<strong>en</strong>tes con una interfaz para la unión<br />

<strong>en</strong>tre ellos. Además de la facilidad que este <strong>en</strong>foque ofrece para la localización<br />

de los fallos, la reusabilidad del código aum<strong>en</strong>ta debido a la consideración de<br />

difer<strong>en</strong>tes compon<strong>en</strong>tes.<br />

Los condicionantes com<strong>en</strong>tados hac<strong>en</strong> necesario que la forma de<br />

desarrollar programas no sea aleatoria, ni específica para una determinada<br />

aplicación. De esta necesidad surge el concepto de ing<strong>en</strong>iería del software que,<br />

como cualquier otra ing<strong>en</strong>iería, utiliza el conocimi<strong>en</strong>to ci<strong>en</strong>tífico para la<br />

construcción de productos o servicios de interés para la sociedad. En el caso de la<br />

ing<strong>en</strong>iería del software, el conocimi<strong>en</strong>to utilizado es sobre computación y hace<br />

hincapié <strong>en</strong> la forma disciplinada de desarrollar productos software que super<strong>en</strong><br />

23


Manuel Urbano Cuadrado Tesis Doctoral<br />

los inconv<strong>en</strong>i<strong>en</strong>tes citados, alcanzando el grado de provecho adecuado para el<br />

hombre.<br />

2.1 Ing<strong>en</strong>iería del software. Proceso de desarrollo de productos software<br />

Muchas son las definiciones dadas del concepto de Ing<strong>en</strong>iería del Software. Se<br />

recoge la dada por Boehm <strong>en</strong> 1976 [75]: “Es la aplicación práctica del<br />

conocimi<strong>en</strong>to ci<strong>en</strong>tífico <strong>en</strong> el diseño y construcción de programas de<br />

computadora y la docum<strong>en</strong>tación asociada requerida para desarrollarlos,<br />

operarlos y mant<strong>en</strong>erlos. Se conoce también como desarrollo de software o<br />

producción de software”.<br />

Analizando <strong>en</strong> detalle la definición se pued<strong>en</strong> observar dos conceptos<br />

difer<strong>en</strong>tes: el producto y el proceso. Sobre el producto, la solución software, cabe<br />

destacar que los programas informáticos son muy reci<strong>en</strong>tes <strong>en</strong> la historia (se<br />

empezaron a desarrollar y a usar a partir de los años 50 del siglo pasado); de lo<br />

que deriva el hecho de que la ing<strong>en</strong>iería del software sea una disciplina que está<br />

por desarrollar <strong>en</strong> una gran parte [76]. Los sigui<strong>en</strong>tes pasos a dar <strong>en</strong> este<br />

desarrollo están <strong>en</strong>caminados a la reducción de las muchas diversificaciones que<br />

exist<strong>en</strong> todavía <strong>en</strong> esta área, unificando los criterios sobre el proceso para llegar a<br />

conseguir un producto software de calidad.<br />

El proceso se refiere a la metodología usada para conseguir el producto.<br />

No se debe confundir proceso con ing<strong>en</strong>iería del software, pues ésta, además de<br />

la metodología, emplea la tecnología y herrami<strong>en</strong>tas automáticas disponibles. Por<br />

tanto, los métodos sust<strong>en</strong>tan el desarrollo de software al definir técnicam<strong>en</strong>te los<br />

pasos a seguir, que normalm<strong>en</strong>te suel<strong>en</strong> ser: el análisis de requisitos, el diseño, la<br />

codificación, la implantación y pruebas y, por último, el mant<strong>en</strong>imi<strong>en</strong>to.<br />

A la hora de estudiar el proceso suele hacerse desde dos puntos de vista<br />

comunes <strong>en</strong> muchos libros de ing<strong>en</strong>iería del software. Éstos son, <strong>en</strong> primer lugar,<br />

un acercami<strong>en</strong>to a los difer<strong>en</strong>tes tipos de procesos (también llamados modelos o<br />

paradigmas), para continuar con una descripción de las fases comunes que<br />

24


Introducción<br />

compon<strong>en</strong> el proceso de desarrollo, indep<strong>en</strong>di<strong>en</strong>tem<strong>en</strong>te de su tipo [77,78]. De<br />

forma no detallada se van a exponer tanto los modelos como las fases del proceso<br />

para, después, poder describir el modelado ori<strong>en</strong>tado a objetos y sus cualidades,<br />

que lo han hecho idóneo para la utilización <strong>en</strong> la investigación recogida <strong>en</strong> esta<br />

Memoria.<br />

2.1.1 Tipos de procesos (paradigmas de ing<strong>en</strong>iería del software)<br />

El proceso de desarrollo puede verse de una forma simple como la separación<br />

<strong>en</strong>tre una funcionalidad requerida y basada <strong>en</strong> el ord<strong>en</strong>ador (<strong>en</strong> el caso de la<br />

química analítica versará sobre control de instrum<strong>en</strong>tación, gestión y análisis de<br />

datos) y un producto aportado para cumplir esos requisitos funcionales. Existe<br />

cierta hibridación <strong>en</strong>tre el proceso y el producto <strong>en</strong>tregado debido a que la fase de<br />

mant<strong>en</strong>imi<strong>en</strong>to se realiza <strong>en</strong> este último, tal como puede verse <strong>en</strong> la Fig. 1.4,<br />

donde se describe de forma gráfica el proceso de desarrollo de software y su<br />

<strong>en</strong>torno. En ella se observa cómo <strong>en</strong> el proceso participan la metodología, las<br />

herrami<strong>en</strong>tas y el conocimi<strong>en</strong>to sobre informática.<br />

Exist<strong>en</strong> difer<strong>en</strong>tes tipos de procesos que exhib<strong>en</strong> una estructura interna<br />

particular, si<strong>en</strong>do los puntos inicial y final siempre los mismos: los requisitos y el<br />

producto. Se van a com<strong>en</strong>tar a continuación los más importantes.<br />

Requisitos funcionales<br />

basados <strong>en</strong> ord<strong>en</strong>ador<br />

Herrami<strong>en</strong>tas<br />

Metodología<br />

PROCESO DE<br />

DESARROLLO<br />

Conocimi<strong>en</strong>to<br />

ord<strong>en</strong>adores<br />

Análisis del sistema<br />

Análisis de requisitos<br />

Diseño<br />

Codificación<br />

Implantación y pruebas<br />

Mant<strong>en</strong>imi<strong>en</strong>to<br />

Fig. 4. El proceso de desarrollo de software.<br />

Producto<br />

software<br />

25


Manuel Urbano Cuadrado Tesis Doctoral<br />

El primer tipo es el Modelo Lineal Secu<strong>en</strong>cial [79], <strong>en</strong> el que se<br />

considera el proceso como una <strong>en</strong>cad<strong>en</strong>ación lineal de las difer<strong>en</strong>tes fases del<br />

proceso: análisis del sistema donde se va <strong>en</strong>cuadrar el producto, análisis y<br />

especificación de los requisitos, diseño, codificación, implantación y pruebas, y<br />

mant<strong>en</strong>imi<strong>en</strong>to. Este modelo ha recibido muchas críticas que pon<strong>en</strong> <strong>en</strong> duda su<br />

eficacia debido a una serie de puntos débiles [80,81]. Entre ellos se pued<strong>en</strong><br />

destacar la imposibilidad de una estricta especificación de requisitos <strong>en</strong> una fase<br />

temprana del desarrollo, la posible desconexión <strong>en</strong>tre las tareas llevadas a cabo<br />

por difer<strong>en</strong>tes miembros y la dificultad de seguir un camino lineal <strong>en</strong> el<br />

desarrollo del producto.<br />

El modelo conocido como Desarrollo Rápido de Aplicaciones (DRA)<br />

[82,83] es una variante del Modelo Lineal Secu<strong>en</strong>cial que ti<strong>en</strong>e el objetivo de<br />

recoger los procesos que, sigui<strong>en</strong>do un camino lineal, están ori<strong>en</strong>tados al<br />

desarrollo de un producto <strong>en</strong> condiciones extremas de tiempo. El DRA se basa <strong>en</strong><br />

la construcción de software por medio de compon<strong>en</strong>tes. Además, se utilizan<br />

herrami<strong>en</strong>tas de cuarta g<strong>en</strong>eración que proporcionan automáticam<strong>en</strong>te el código a<br />

partir de las especificaciones.<br />

El sigui<strong>en</strong>te paradigma a considerar es el Modelo del Prototipo [84],<br />

basado <strong>en</strong> unas fases rápidas de análisis de requisitos (se id<strong>en</strong>tifican los más<br />

claros), y diseño (c<strong>en</strong>trado <strong>en</strong> aspectos visibles para el usuario o cli<strong>en</strong>te final).<br />

Estas dos etapas llevan a la construcción de un prototipo <strong>en</strong>caminado a poner de<br />

manifiesto nuevos requisitos funcionales que no estaban asequibles <strong>en</strong> un primer<br />

análisis g<strong>en</strong>eral y que serán <strong>en</strong>t<strong>en</strong>didos por el desarrollador de una forma más<br />

clara. Uno de los inconv<strong>en</strong>i<strong>en</strong>tes de este modelo es que el usuario quiere empezar<br />

a trabajar con el prototipo y no <strong>en</strong>ti<strong>en</strong>de la falta de efici<strong>en</strong>cia que éste suele<br />

exhibir. Además, el desarrollador puede emplear <strong>en</strong> la elaboración del prototipo<br />

herrami<strong>en</strong>tas (tecnología, estructuras de datos, etc.) que, aunque no eran las más<br />

idóneas, sí eran las que estaban más accesibles o permitían el desarrollo <strong>en</strong> un<br />

m<strong>en</strong>or tiempo. El ing<strong>en</strong>iero del software debe usar el criterio riguroso para la<br />

selección de los recursos adecuados.<br />

26


Introducción<br />

Un tercer paradigma de procesos es el d<strong>en</strong>ominado Modelo Increm<strong>en</strong>tal<br />

[85]. Éste, al igual que el modelo del prototipo y otros modelos evolutivos,<br />

cu<strong>en</strong>ta con la v<strong>en</strong>taja de una implicación activa del cli<strong>en</strong>te. Esto es debido a su<br />

estructura basada <strong>en</strong> iteraciones, las cuales se correspond<strong>en</strong> con subprocesos de<br />

desarrollo lineal que produc<strong>en</strong> “increm<strong>en</strong>tos de software” usados para el<br />

refinami<strong>en</strong>to de los requisitos. A difer<strong>en</strong>cia del modelo del prototipo, el<br />

increm<strong>en</strong>tal <strong>en</strong>trega <strong>en</strong> cada iteración un producto que está preparado para ser<br />

operacional. Además de ser útil <strong>en</strong> la evaluación de riesgos, aporta una bu<strong>en</strong>a<br />

adaptación al hecho de no disponer del número adecuado de desarrolladores.<br />

El Modelo <strong>en</strong> Espiral [86] también es un proceso interactivo con el<br />

cli<strong>en</strong>te. Está basado <strong>en</strong> increm<strong>en</strong>tos que adquier<strong>en</strong> cada vez mayor dim<strong>en</strong>sión,<br />

empezando incluso por un esquema <strong>en</strong> papel <strong>en</strong> la primera iteración, para llegar a<br />

sistemas de gran escala <strong>en</strong> las últimas versiones. Este modelo se divide <strong>en</strong><br />

regiones de tareas (se distingu<strong>en</strong> <strong>en</strong>tre 3 y 6 regiones de tareas), las cuales<br />

forman parte de cada versión. El modelo <strong>en</strong> espiral se aplica no sólo a la fase de<br />

desarrollo, sino que puede considerarse un procedimi<strong>en</strong>to de trabajo que sust<strong>en</strong>ta<br />

el ciclo de vida del software (es el tipo que da más importancia a la fase de<br />

mant<strong>en</strong>imi<strong>en</strong>to). Además, usa la construcción de prototipos como un modo de<br />

evaluación de riesgos. Pero este paradigma también pres<strong>en</strong>ta inconv<strong>en</strong>i<strong>en</strong>tes,<br />

<strong>en</strong>tre los que se citan la dificultad para conv<strong>en</strong>cer a los cli<strong>en</strong>tes de que se puede<br />

controlar el proceso y la habilidad requerida para la evaluación del riesgo.<br />

2.1.2 Fases comunes <strong>en</strong> el proceso de desarrollo de software<br />

Existe una serie de etapas comunes <strong>en</strong> todos los modelos com<strong>en</strong>tados<br />

anteriorm<strong>en</strong>te. Estas etapas son: análisis y especificación de requisitos, diseño del<br />

sistema, codificación e implantación de la solución construida, pruebas, y, por<br />

último, mant<strong>en</strong>imi<strong>en</strong>to del producto software. Se van a com<strong>en</strong>tar las más<br />

relevantes.<br />

El Análisis y Especificación de Requisitos permite conocer las<br />

necesidades a cumplir respecto a la funcionalidad del software, su r<strong>en</strong>dimi<strong>en</strong>to,<br />

27


Manuel Urbano Cuadrado Tesis Doctoral<br />

las interfaces con el <strong>en</strong>torno, y sus restricciones [87]. Aunque se puede p<strong>en</strong>sar<br />

que es una tarea que no reviste dificultad, es de importancia crítica <strong>en</strong> el proceso<br />

de desarrollo. Al hablar de la calidad de la información analítica se com<strong>en</strong>tó que<br />

el cumplimi<strong>en</strong>to de los requerimi<strong>en</strong>tos del cli<strong>en</strong>te es el único camino para<br />

conseguirla. Un símil con este concepto se puede establecer con la calidad de un<br />

producto software, pues, aunque las demás fases del proceso se hayan hecho de<br />

una forma correcta, si el análisis de requisitos no recoge las necesidades del<br />

cli<strong>en</strong>te la calidad del producto es mala [88,89].<br />

Suel<strong>en</strong> distinguirse cinco actividades implicadas normalm<strong>en</strong>te <strong>en</strong> el<br />

análisis de requisitos: reconocimi<strong>en</strong>to del problema, evaluación y síntesis,<br />

modelado, especificación y, por último, revisión. La fase de modelado es de<br />

suma importancia, pues <strong>en</strong> ella se construye una serie de modelos para describir<br />

los requerimi<strong>en</strong>tos del cli<strong>en</strong>te, establecer la base del diseño y, finalm<strong>en</strong>te, definir<br />

un conjunto de requisitos que se puedan validar una vez que se ha construido el<br />

software.<br />

Dos tipos de modelado del análisis se han impuesto sobre otros <strong>en</strong> los<br />

últimos tiempos: el análisis estructurado [90,91] y el análisis ori<strong>en</strong>tado a objetos<br />

[92-94]. En este apartado se van a com<strong>en</strong>tar las características más relevantes del<br />

primero, para más adelante introducir el análisis ori<strong>en</strong>tado a objetos.<br />

Son cuatro los principales elem<strong>en</strong>tos del análisis estructurado: el<br />

diccionario de datos, el diagrama <strong>en</strong>tidad-interrelación, el diagrama de flujo de<br />

datos, y el diagrama de transición de estados. Los dos primeros elem<strong>en</strong>tos<br />

pert<strong>en</strong>ec<strong>en</strong> al modelado de los datos, el tercero al modelado de la función, y el<br />

último al modelado del comportami<strong>en</strong>to del sistema. El diccionario de datos es<br />

un término introducido por DeMarco [90] y recoge las definiciones de las<br />

estructuras de datos de <strong>en</strong>trada al sistema, las que se van a g<strong>en</strong>erar o consumir <strong>en</strong><br />

el procesami<strong>en</strong>to de la información, y las que forman la salida del programa.<br />

El modelado de los datos describe las agrupaciones de datos pres<strong>en</strong>tes <strong>en</strong><br />

el dominio de información del sistema y la relación <strong>en</strong>tre ellas. Los diagramas<br />

<strong>en</strong>tidad-interrelación, propuestos por primera vez por Ch<strong>en</strong> <strong>en</strong> el año 1977 [95],<br />

28


Introducción<br />

son la principal herrami<strong>en</strong>ta <strong>en</strong> el modelado de datos. La int<strong>en</strong>ción de este autor<br />

era repres<strong>en</strong>tar el nivel conceptual de una base de datos<br />

El flujo de información por el sistema se repres<strong>en</strong>ta por el diagrama de<br />

flujo de datos. En él se describ<strong>en</strong>, con un nivel de detalle dado, el camino de los<br />

datos, las <strong>en</strong>tidades que operan con ellos, las transformaciones a que son<br />

sometidos y los lugares donde se almac<strong>en</strong>an. El refinami<strong>en</strong>to de los diagramas de<br />

flujo se utiliza para mostrar un mayor nivel de detalle.<br />

La creación de los diagramas de flujo de datos estuvo p<strong>en</strong>sada para<br />

sistemas de procesami<strong>en</strong>to de la información discretos. Pero las demandas<br />

impuestas por los sistemas de tiempo real (<strong>en</strong> química analítica todos los sistemas<br />

de automatización y control de los instrum<strong>en</strong>tos) hizo necesaria la ext<strong>en</strong>sión de<br />

los diagramas de flujo de datos [96,97]. Las nuevas aportaciones ti<strong>en</strong><strong>en</strong> <strong>en</strong> cu<strong>en</strong>ta<br />

la recogida o producción de la información de una forma continua, el flujo de<br />

control necesario y el paralelismo de tareas.<br />

Para modelar uno de los requisitos más importantes de un sistema, su<br />

comportami<strong>en</strong>to, se introdujeron nuevas ampliaciones del análisis estructurado<br />

[96,97]. Este modelado se plasma <strong>en</strong> un diagrama de transición de estados que<br />

muestra los estados y las ocurr<strong>en</strong>cias que hac<strong>en</strong> que un sistema cambie de un<br />

estado a otro.<br />

La sigui<strong>en</strong>te fase del proceso es la fase de Diseño. En 1959, Taylor lo<br />

definió como “el proceso de aplicar distintas técnicas y principios con el<br />

propósito de definir un dispositivo, un proceso o un sistema con sufici<strong>en</strong>te detalle<br />

como para permitir su realización física” [98]. El diseño constituye, junto con las<br />

fases de codificación y prueba, la fase técnica del proceso de desarrollo de<br />

software.<br />

Desde un punto de vista más práctico la fase de diseño puede visualizarse<br />

como el conjunto de actividades que transforman los modelos de análisis <strong>en</strong><br />

modelos de diseño. Las t<strong>en</strong>d<strong>en</strong>cias del diseño están marcadas, por tanto, por las<br />

del análisis: un diseño estructurado [99-101] y un diseño ori<strong>en</strong>tado a objetos<br />

[102,103]. Se va a hacer un com<strong>en</strong>tario sucinto del diseño estructural para<br />

29


Manuel Urbano Cuadrado Tesis Doctoral<br />

después introducir, junto al análisis, el diseño ori<strong>en</strong>tado a objetos y sus<br />

aportaciones.<br />

El diseño se afronta con un <strong>en</strong>foque sistemático, por lo que juegan una<br />

baza importantísima conceptos como abstracción, refinami<strong>en</strong>to, modularidad,<br />

partición estructural, etc. La modularidad se puede considerar como una<br />

actividad admitida <strong>en</strong> todas las ing<strong>en</strong>ierías que hace más fácil la adaptación del<br />

sistema a los cambios y permite el desarrollo <strong>en</strong> paralelo. Está basada <strong>en</strong> la<br />

indep<strong>en</strong>d<strong>en</strong>cia respecto a otros módulos, si<strong>en</strong>do el subsigui<strong>en</strong>te acoplami<strong>en</strong>to de<br />

vital importancia para la estructura del programa.<br />

El diseño se divide <strong>en</strong> 4 partes: diseño de datos (su resultado son las<br />

estructuras de datos necesarias para implantar el software); diseño arquitectónico<br />

(se defin<strong>en</strong> las partes estructurales del software); diseño de interfaz (se describe<br />

la comunicación de las difer<strong>en</strong>tes partes estructurales <strong>en</strong>tre sí, además del<br />

<strong>en</strong>torno) y diseño procedim<strong>en</strong>tal (los elem<strong>en</strong>tos estructurales del programa se<br />

describ<strong>en</strong> de forma procedim<strong>en</strong>tal) [76]. Son numerosos los métodos de diseño<br />

descritos para cada actividad, estando fuera del alcance de esta introducción<br />

<strong>en</strong>trar <strong>en</strong> ellos, ni siquiera con un mínimo detalle.<br />

La fase de Codificación e Implantación supone la traducción física de los<br />

modelos de diseño al programa o prototipo, según el paradigma y el estado del<br />

proceso de desarrollo. Se pued<strong>en</strong> usar <strong>en</strong> estas etapas numerosos l<strong>en</strong>guajes de<br />

programación y, al igual que <strong>en</strong> las anteriores, se pued<strong>en</strong> distinguir l<strong>en</strong>guajes<br />

estructurados [104,105] y l<strong>en</strong>guajes ori<strong>en</strong>tados a objetos [106,107].<br />

Las Pruebas del producto software, sigui<strong>en</strong>do con el paralelismo de los<br />

programas de calidad de las empresas, son las acciones correspondi<strong>en</strong>tes a la<br />

garantía de la calidad, es decir, el control de calidad y las subsigui<strong>en</strong>tes acciones<br />

correctoras. Constituy<strong>en</strong> la evaluación final de las etapas de análisis, diseño,<br />

codificación e implantación. Numerosos autores han abordado la fase de pruebas<br />

del software [108-112], tratando los principios de éstas, el diseño de los casos de<br />

prueba, etc.<br />

30


2.2 Modelado ori<strong>en</strong>tado a objetos<br />

Introducción<br />

El término ori<strong>en</strong>tado a objetos fue introducido a finales de los años ses<strong>en</strong>ta y<br />

comi<strong>en</strong>zos de los set<strong>en</strong>ta, aunque hasta la primera mitad de la década de los<br />

nov<strong>en</strong>ta no se empezó a utilizar el paradigma ori<strong>en</strong>tado a objetos de forma<br />

considerable <strong>en</strong> ing<strong>en</strong>iería del software [103,113-116]. El concepto apareció con<br />

el uso de l<strong>en</strong>guajes ori<strong>en</strong>tados a objetos (el primer l<strong>en</strong>guaje fue Smalltalk [106]),<br />

dejando fuera la implicación del término <strong>en</strong> el proceso de desarrollo de<br />

aplicaciones.<br />

2.2.1 Conceptos básicos del modelado y de los l<strong>en</strong>guajes de programación<br />

ori<strong>en</strong>tados a objetos<br />

El mundo real puede ser visto como un espacio ll<strong>en</strong>o de objetos. Cualquier objeto<br />

ti<strong>en</strong>e un conjunto de propiedades o atributos (atributo es el término más usado)<br />

que lo caracteriza y difer<strong>en</strong>cia del resto. Apoyándonos <strong>en</strong> el área de<br />

automatización <strong>en</strong> química analítica, un instrum<strong>en</strong>to es un objeto que ti<strong>en</strong>e unas<br />

propiedades determinadas, como son: marca, modelo, puerto de comunicación,<br />

etc. Además, un instrum<strong>en</strong>to se puede conectar y desconectar al ord<strong>en</strong>ador, fijar<br />

una serie de parámetros para su funcionami<strong>en</strong>to, etc. Es decir, un objeto realiza<br />

una serie de operaciones (métodos es el término empleado).<br />

Una Clase es una abstracción de un conjunto de objetos que ti<strong>en</strong><strong>en</strong> la<br />

misma estructura (atributos) y el mismo comportami<strong>en</strong>to (métodos). Es decir, la<br />

clase Instrum<strong>en</strong>to abarcaría objetos como un espectrofotómetro, un<br />

espectrofluorímetro, un medidor de pH, etc. También se suele emplear el término<br />

instancia (de la clase) <strong>en</strong> lugar de objeto.<br />

El hecho de que una clase pueda heredar los atributos y métodos de otra<br />

es conocido con el término Her<strong>en</strong>cia, si<strong>en</strong>do ésta una de las características clave<br />

del paradigma de ori<strong>en</strong>tación a objetos. Se establece una jerarquía <strong>en</strong> la que la<br />

clase que hereda se d<strong>en</strong>omina clase hija o subclase de la clase padre o superclase.<br />

Una clase, además de heredar las propiedades y el comportami<strong>en</strong>to de otra, puede<br />

31


Manuel Urbano Cuadrado Tesis Doctoral<br />

añadir nuevos atributos y métodos, conociéndose esto como Especialización, lo<br />

que permite difer<strong>en</strong>ciar las clases del mismo nivel <strong>en</strong> una determinada jerarquía.<br />

Así, una clase d<strong>en</strong>ominada Instrum<strong>en</strong>toOptico hereda los atributos y<br />

métodos de la clase Instrum<strong>en</strong>to, pero para especializar su funcionalidad debe<br />

incorporar nuevas propiedades como el tipo de instrum<strong>en</strong>to óptico (para saber si<br />

se corresponde con una técnica molecular o atómica, si es de absorción o<br />

emisión, etc.) y nuevos métodos, como, por ejemplo, el empleado para fijar la<br />

longitud de onda.<br />

Para obt<strong>en</strong>er las propiedades de un determinado objeto que se requier<strong>en</strong><br />

para la funcionalidad de otro, este último ti<strong>en</strong>e que utilizar los m<strong>en</strong>sajes como<br />

medio de comunicación con el primero. Los M<strong>en</strong>sajes estimulan el<br />

comportami<strong>en</strong>to del objeto receptor, necesitándose que <strong>en</strong> el m<strong>en</strong>saje se indiqu<strong>en</strong><br />

el método solicitado y los parámetros requeridos para que la operación se realice<br />

de forma correcta. De esta forma, un objeto oculta sus datos y sus métodos, y<br />

sólo los objetos que t<strong>en</strong>gan permiso podrán llegar a la información que el objeto<br />

posee por medio de la comunicación anteriorm<strong>en</strong>te descrita. Esta característica es<br />

conocida como Encapsulami<strong>en</strong>to.<br />

El Polimorfismo es otra de las características del paradigma de<br />

ori<strong>en</strong>tación a objetos. Puede definirse como la difer<strong>en</strong>te funcionalidad que<br />

exhib<strong>en</strong> los mismos métodos <strong>en</strong> difer<strong>en</strong>tes objetos pert<strong>en</strong>eci<strong>en</strong>tes a la misma<br />

clase, o incluso <strong>en</strong> un mismo objeto (llamándose <strong>en</strong> este caso sobrecarga de<br />

métodos). La primera modalidad se puede llevar a cabo mediante el proceso de<br />

her<strong>en</strong>cia. Así, una clase define unos determinados métodos, pero no los implanta<br />

ella, sino las clases hijas, adaptándolos a sus propias características. Estos<br />

métodos son conocidos <strong>en</strong> algunos l<strong>en</strong>guajes de programación como métodos<br />

abstractos (por ejemplo, el l<strong>en</strong>guaje Java [107]).<br />

La otra posibilidad, la sobrecarga de métodos, se lleva a cabo mediante la<br />

difer<strong>en</strong>cia <strong>en</strong> los parámetros del m<strong>en</strong>saje al objeto receptor, ya sea por el tipo o<br />

números de datos. Éste utiliza el método apropiado para la finalidad requerida.<br />

32


2.2.2 V<strong>en</strong>tajas inmediatas de los sistemas ori<strong>en</strong>tados a objetos<br />

Introducción<br />

Aunque el concepto de objeto fue utilizado primeram<strong>en</strong>te <strong>en</strong> el mundo de los<br />

l<strong>en</strong>guajes de programación (Smalltalk), la filosofía y las características implícitas<br />

<strong>en</strong> el concepto hicieron conv<strong>en</strong>i<strong>en</strong>te su introducción <strong>en</strong> el proceso de desarrollo<br />

de software. Se van a com<strong>en</strong>tar las características más destacadas.<br />

El modelado ori<strong>en</strong>tado a objetos se adapta de una forma más efici<strong>en</strong>te<br />

que el modelado estructurado a los paradigmas evolutivos, que son los que se<br />

están imponi<strong>en</strong>do <strong>en</strong> el desarrollo de productos software. Incluso hay autores que<br />

defin<strong>en</strong> un nuevo paradigma de desarrollo llamado Modelo de Ensamblaje de<br />

Compon<strong>en</strong>tes [117], basado <strong>en</strong> el modelado ori<strong>en</strong>tado a objetos. En una primera<br />

iteración del proceso evolutivo, <strong>en</strong> el análisis y diseño ori<strong>en</strong>tados a objetos se<br />

buscan las clases necesarias <strong>en</strong> bibliotecas de clases, y, si no están, se construy<strong>en</strong><br />

las nuevas. Una nueva iteración partiría ya de estos compon<strong>en</strong>tes, que se adaptan,<br />

como se verá a continuación, de una forma más efici<strong>en</strong>te a los cambios y<br />

ampliaciones necesarios <strong>en</strong> las nuevas iteraciones.<br />

Por tanto, el modelado ori<strong>en</strong>tado a objetos permite la reutilización de<br />

software, proporcionando los sigui<strong>en</strong>tes datos según Yourdon [118]: reducción<br />

del 70 % de tiempo <strong>en</strong> el ciclo de desarrollo del software, reducción del 84 % <strong>en</strong><br />

el coste del proyecto, y un índice de productividad del 26.2, comparado con la<br />

norma de industria 16.9.<br />

Las propiedades del diseño de un sistema software son las mismas para<br />

los métodos clásicos (estructurados) que para los ori<strong>en</strong>tados a objetos. Una de<br />

ellas es la efici<strong>en</strong>cia alcanzada <strong>en</strong> la modularidad de los programas. Se ha visto<br />

que el concepto de clase no sólo repres<strong>en</strong>ta los objetos del mundo real, sino que<br />

<strong>en</strong>capsula los atributos y los métodos d<strong>en</strong>tro de la clase. Se puede considerar que<br />

es una forma eficaz de abstracción de los datos y los métodos d<strong>en</strong>tro del concepto<br />

de clase, que va a ocultar toda la estructura de datos y la implantación de los<br />

métodos.<br />

33


Manuel Urbano Cuadrado Tesis Doctoral<br />

Una gran v<strong>en</strong>taja salta a la vista con este <strong>en</strong>foque. Las clases<br />

proporcionan los datos necesarios para otros compon<strong>en</strong>tes (otras clases) a través<br />

de los métodos que ti<strong>en</strong><strong>en</strong> permiso (se habla de métodos privados y métodos<br />

públicos), actuando éstos a modo de interfaz. La posibilidad de efectos<br />

colaterales disminuye drásticam<strong>en</strong>te. Los errores se localizan de forma rápida y<br />

están circunscritos a una determinada clase, por lo que una vez modificada la<br />

clase y eliminado el problema, la arquitectura del programa no se afecta. El<br />

acoplami<strong>en</strong>to, otra de las características buscadas, es máximo con un sistema de<br />

clases bi<strong>en</strong> diseñado y construido. La cohesión también está asegurada si el<br />

número de datos a manejar por cada método es pequeño, que es la situación<br />

usual.<br />

La versatilidad de los sistemas ori<strong>en</strong>tados a objetos también es mayor<br />

que la conseguida por métodos conv<strong>en</strong>cionales. Este aspecto deriva del<br />

<strong>en</strong>capsulami<strong>en</strong>to de los métodos, que pued<strong>en</strong> considerarse como módulos <strong>en</strong> el<br />

s<strong>en</strong>tido conv<strong>en</strong>cional, y que ofrec<strong>en</strong> una repres<strong>en</strong>tación específica del<br />

comportami<strong>en</strong>to de un objeto, t<strong>en</strong>i<strong>en</strong>do <strong>en</strong> otros métodos otros comportami<strong>en</strong>tos<br />

para funciones distintas. La v<strong>en</strong>taja radica <strong>en</strong> que toda esta funcionalidad reside<br />

<strong>en</strong> una única y simple unidad llamada clase.<br />

La reusabilidad de los sistemas ori<strong>en</strong>tados a objetos se ha visto desde un<br />

punto de vista arquitectónico, con la utilización de clases ya diseñadas y<br />

construidas. Desde el punto de vista de la codificación, el concepto de her<strong>en</strong>cia<br />

permite también aprovechar el concepto de reusabilidad, al no t<strong>en</strong>er que<br />

reescribir el código de la implantación de los atributos y métodos heredados.<br />

Además, la introducción de modificaciones es una tarea más fácil debido a la<br />

propagación automática de las correcciones realizadas <strong>en</strong> las clases padre de la<br />

jerarquía.<br />

El polimorfismo facilita la expansión de los programas sin la<br />

modificación de las estructuras de control, lo que supone una v<strong>en</strong>taja<br />

considerable fr<strong>en</strong>te al modelado estructurado. Lo vamos a ver con un ejemplo.<br />

Supongamos una estructura de control utilizada <strong>en</strong> un programa de<br />

34


Introducción<br />

automatización <strong>en</strong> química, <strong>en</strong> la que, si se cumple una premisa de tiempo (el<br />

tiempo <strong>en</strong> el cual el instrum<strong>en</strong>to debe realizar una determinada operación), la<br />

clase Instrum<strong>en</strong>to recibe un m<strong>en</strong>saje para llevar a cabo el método ejecutar de la<br />

clase Accion. La estructura es la sigui<strong>en</strong>te:<br />

/* Se recorre la lista de instrum<strong>en</strong>tos que forman un<br />

autoanalizador */<br />

for (int i=0; i


Manuel Urbano Cuadrado Tesis Doctoral<br />

<strong>en</strong> 1994, y conllevaba la falta de estandarización para el desarrollo de los<br />

programas. Además, estos métodos sólo cubrían áreas parciales, por lo que el<br />

ing<strong>en</strong>iero del software rara vez obt<strong>en</strong>ía un método que le permitiese modelar<br />

todos los aspectos de una aplicación.<br />

Surgió <strong>en</strong>tonces una serie de métodos con el objetivo de <strong>en</strong>sanchar el<br />

campo de aplicación de sus respectivos l<strong>en</strong>guajes de modelado, no<br />

restringiéndolo a necesidades específicas. De estos métodos destacaron el método<br />

OOSE (Object-Ori<strong>en</strong>ted Software Engineering) propuesto por Jacobson [103], el<br />

método OMT (Object Modeling Technique) propuesto por Rumbaugh [119], y el<br />

método de Booch [92]. Aunque eran considerados métodos completos,<br />

pres<strong>en</strong>taban una serie de puntos fuertes y puntos débiles.<br />

La evolución de cada uno de los tres métodos de modelado principales<br />

fue el adoptar ideas y conceptos de los otros dos, por lo que cada vez fue más<br />

necesario el esfuerzo de sintetizar un l<strong>en</strong>guaje unificado. Además, la<br />

colaboración <strong>en</strong>tre los creadores de los tres métodos dio como resultado una<br />

mejora global del modelado ori<strong>en</strong>tado a objetos. De esta forma, desde 1994 se<br />

desarrolló un trabajo <strong>en</strong> la compañía Rational Software que culminó <strong>en</strong> 1997 con<br />

la publicación de la versión 1.0 de UML [120-122], que se ofreció para su<br />

estudio al grupo OMG (Object Managem<strong>en</strong>t Group). En esta versión y <strong>en</strong> el<br />

estudio posterior los autores recibieron la colaboración de muchas organizaciones<br />

del área informática, <strong>en</strong>tre las que se citan IBM, Hewlett-Packard, Microsoft,<br />

Oracle, etc.<br />

2.3.2 Elem<strong>en</strong>tos del l<strong>en</strong>guaje UML<br />

Se consideran cuatro tipos de elem<strong>en</strong>tos UML: estructurales, de comportami<strong>en</strong>to,<br />

de agrupación y, por último, de anotación.<br />

El primer elem<strong>en</strong>to estructural que se cita es la clase, que describe un<br />

conjunto de objetos que ti<strong>en</strong><strong>en</strong> los mismos atributos, operaciones y relaciones <strong>en</strong><br />

el modelo a desarrollar. Otro elem<strong>en</strong>to estructural es la interfaz, que describe un<br />

conjunto (total o parcial) de operaciones de una clase o compon<strong>en</strong>te desde el<br />

36


Introducción<br />

punto de vista de la funcionalidad externa y no de la implantación de ésta. Una<br />

colaboración es un elem<strong>en</strong>to estructural que define una interacción de elem<strong>en</strong>tos<br />

que participan de forma conjunta para conseguir un comportami<strong>en</strong>to no<br />

alcanzable por un elem<strong>en</strong>to individual. Un caso de uso describe un conjunto de<br />

secu<strong>en</strong>cias de acciones que el sistema ejecuta y que produce un resultado<br />

observable de interés para un actor particular. Se dice que un caso de uso se lleva<br />

a cabo por una colaboración. Otros tres elem<strong>en</strong>tos estructurales de UML son la<br />

clase activa, el compon<strong>en</strong>te, y el nodo. Son similares al concepto de clase, pero<br />

introduc<strong>en</strong> particularidades que hac<strong>en</strong> necesario su empleo.<br />

Los elem<strong>en</strong>tos de comportami<strong>en</strong>to describ<strong>en</strong> la parte dinámica de los<br />

modelos desarrollados con UML, por lo que son considerados los verbos de este<br />

l<strong>en</strong>guaje. Se distingue la interacción, que describe un conjunto de m<strong>en</strong>sajes<br />

intercambiados <strong>en</strong>tre un grupo de objetos para conseguir un objetivo específico, y<br />

la máquina de estados, que recoge la secu<strong>en</strong>cia de estados por la que pasa un<br />

objeto o una interacción <strong>en</strong> respuesta a un ev<strong>en</strong>to.<br />

Los elem<strong>en</strong>tos de agrupación son las partes organizativas de los modelos.<br />

En UML sólo se utiliza el paquete, que puede ser considerado como un elem<strong>en</strong>to<br />

que <strong>en</strong>globa elem<strong>en</strong>tos estructurales, de comportami<strong>en</strong>to, e incluso propios<br />

elem<strong>en</strong>tos de agrupación.<br />

Por último, los elem<strong>en</strong>tos de anotación son com<strong>en</strong>tarios que se añad<strong>en</strong> al<br />

modelo para un mejor <strong>en</strong>t<strong>en</strong>dimi<strong>en</strong>to de éste. La nota es el objeto de anotación<br />

básico para describir explicaciones y restricciones.<br />

2.3.3 Relaciones <strong>en</strong> el l<strong>en</strong>guaje UML<br />

Para construir modelos se utilizan cuatro tipos de relaciones <strong>en</strong> UML, que ti<strong>en</strong><strong>en</strong><br />

el objetivo de unir los elem<strong>en</strong>tos <strong>en</strong>tre sí: la dep<strong>en</strong>d<strong>en</strong>cia, la asociación, la<br />

g<strong>en</strong>eralización y la realización.<br />

La dep<strong>en</strong>d<strong>en</strong>cia es una relación <strong>en</strong>tre dos elem<strong>en</strong>tos, <strong>en</strong> la que un cambio<br />

a un elem<strong>en</strong>to (d<strong>en</strong>ominado indep<strong>en</strong>di<strong>en</strong>te) afecta a la semántica del otro<br />

(d<strong>en</strong>ominado dep<strong>en</strong>di<strong>en</strong>te). La asociación es una relación estructural que<br />

37


Manuel Urbano Cuadrado Tesis Doctoral<br />

describe las conexiones <strong>en</strong>tre objetos. La agregación es un tipo especial de<br />

asociación que repres<strong>en</strong>ta la relación <strong>en</strong>tre un todo y sus partes. La<br />

g<strong>en</strong>eralización (la forma de repres<strong>en</strong>tar la her<strong>en</strong>cia <strong>en</strong> UML) describe la relación<br />

de sustitución de un elem<strong>en</strong>to g<strong>en</strong>eral (padre) por un objeto especializado (hijo).<br />

Por último, la realización es una relación semántica donde un elem<strong>en</strong>to<br />

especifica un contrato que otro elem<strong>en</strong>to garantiza que cumplirá.<br />

2.3.4 Diagramas <strong>en</strong> el l<strong>en</strong>guaje UML<br />

Un diagrama es la repres<strong>en</strong>tación gráfica de un conjunto de elem<strong>en</strong>tos y<br />

relaciones que recog<strong>en</strong> una parte de la estructura, comportami<strong>en</strong>to y arquitectura<br />

del sistema. Los aspectos estructurales se recog<strong>en</strong> <strong>en</strong> el diagrama de clases y <strong>en</strong><br />

el diagrama de objetos. El primero es una descripción de las clases, las<br />

interfaces, las colaboraciones y las relaciones <strong>en</strong>tre los tres elem<strong>en</strong>tos anteriores.<br />

El segundo repres<strong>en</strong>ta una vista instantánea de los elem<strong>en</strong>tos y relaciones<br />

<strong>en</strong>contrados <strong>en</strong> el diagrama de clases.<br />

El comportami<strong>en</strong>to del sistema se modela con la construcción de varios<br />

tipos de diagramas. El diagrama de casos de uso repres<strong>en</strong>ta las relaciones <strong>en</strong>tre<br />

las acciones del sistema y los actores implicados. El diagrama de secu<strong>en</strong>cia y el<br />

diagrama de colaboración se emplean para el modelado de las interacciones<br />

<strong>en</strong>tre un grupo de objetos que intercambian una serie de m<strong>en</strong>sajes, por eso se les<br />

d<strong>en</strong>ominan también diagramas de interacción. Los de secu<strong>en</strong>cia resaltan la<br />

ord<strong>en</strong>ación temporal de los m<strong>en</strong>sajes y los de colaboración señalan los aspectos<br />

estructurales de los objetos que <strong>en</strong>vían y recib<strong>en</strong> m<strong>en</strong>sajes.<br />

Otros diagramas se <strong>en</strong>cargan de modelar la dinámica del sistema desde el<br />

punto de vista del flujo de control. Estos son el diagrama de estados y el<br />

diagrama de actividades. En ambos se muestran los estados por los que puede<br />

pasar un sistema, y, por otro lado, las actividades y ev<strong>en</strong>tos que provocan la<br />

transición de un estado a otro.<br />

La arquitectura del sistema se modela mediante el diagrama de<br />

compon<strong>en</strong>tes y el diagrama de despliegue. El primero se <strong>en</strong>carga de repres<strong>en</strong>tar<br />

38


Introducción<br />

la organización y dep<strong>en</strong>d<strong>en</strong>cias <strong>en</strong>tre un conjunto de compon<strong>en</strong>tes, y se relaciona<br />

con los diagramas de clases <strong>en</strong> que un compon<strong>en</strong>te incluye una o más clases,<br />

interfaces o colaboraciones. El diagrama de despliegue muestra la configuración<br />

de los nodos de procesami<strong>en</strong>to <strong>en</strong> tiempo de ejecución y los compon<strong>en</strong>tes que<br />

resid<strong>en</strong> <strong>en</strong> ellos.<br />

3. El l<strong>en</strong>guaje de programación Java<br />

3.1 Desarrollo del l<strong>en</strong>guaje de programación Java<br />

Java es un l<strong>en</strong>guaje de programación de alto nivel como lo son Pascal, Basic,<br />

C++, etc., o sus <strong>en</strong>tornos gráficos de programación, Visual Basic, Delphi, Visual<br />

C++, etc. La primera versión de Java apareció <strong>en</strong> el verano de 1995 [123,124] <strong>en</strong><br />

un int<strong>en</strong>to de paliar los inconv<strong>en</strong>i<strong>en</strong>tes que pres<strong>en</strong>taba la dep<strong>en</strong>d<strong>en</strong>cia del código<br />

desarrollado respecto al microprocesador y sistema operativo del ord<strong>en</strong>ador<br />

donde iba a utilizarse. El software de reducidas prestaciones que se empotra <strong>en</strong><br />

dispositivos electrónicos de bajo precio, como electrodomésticos, calculadoras,<br />

s<strong>en</strong>sores, etc., t<strong>en</strong>ía que ser actualizado constantem<strong>en</strong>te al modificar el<br />

microprocesador de estos dispositivos. Esto ocurre incluso con los l<strong>en</strong>guajes de<br />

alto nivel como C.<br />

La empresa Sun Microsystem [125] se marcó como objetivo, a principios<br />

de los años nov<strong>en</strong>ta, el desarrollo de un nuevo l<strong>en</strong>guaje de programación que se<br />

adecuara al <strong>en</strong>torno de ejecución sin la necesidad de realizar ningún cambio <strong>en</strong> el<br />

código. Es decir, el objetivo fue buscar la portabilidad total del l<strong>en</strong>guaje a<br />

construir. Éste fue el inicio de un proceso de desarrollo de un nuevo l<strong>en</strong>guaje que<br />

seguram<strong>en</strong>te, y a pesar de importancia de la portabilidad del código hoy <strong>en</strong> día,<br />

no hubiese alcanzado las cotas de popularidad de las que goza si no hubiese<br />

nacido <strong>en</strong> la que ya se ha d<strong>en</strong>ominado “era de la información”. Así, fue<br />

determinante el “<strong>en</strong>cu<strong>en</strong>tro” <strong>en</strong>tre el principal símbolo, herrami<strong>en</strong>ta, etc., de esta<br />

era, Internet, y el l<strong>en</strong>guaje Java.<br />

39


Manuel Urbano Cuadrado Tesis Doctoral<br />

Gosling, al fr<strong>en</strong>te del equipo de Sun inmerso <strong>en</strong> la síntesis del nuevo<br />

l<strong>en</strong>guaje, vio la posibilidad de mostrar la total portabilidad del l<strong>en</strong>guaje<br />

ejecutando un programa d<strong>en</strong>tro de una página Web, es decir, ejecutar un<br />

programa desde cualquier punto de la red. Para este fin necesitó un navegador<br />

que integrara la posibilidad de ejecutar Java <strong>en</strong> Internet, creando <strong>en</strong>tonces el<br />

navegador HotJava.<br />

A partir de aquí surgieron las características que consagraron a Java<br />

como el l<strong>en</strong>guaje estándar de la red.<br />

3.2 Características g<strong>en</strong>erales de Java<br />

3.2.1 Simplicidad<br />

Java, sin lugar a dudas, es un l<strong>en</strong>guaje simple. De l<strong>en</strong>guajes como C y C++ ha<br />

tomado las características de sintaxis, de diseño y de seguridad que han hecho<br />

que estos l<strong>en</strong>guajes sean de los más utilizados <strong>en</strong> la programación actual. Java ha<br />

avanzado respecto a estos l<strong>en</strong>guajes al eliminar las características que implican<br />

para el programador un mayor grado de dificultad, reduci<strong>en</strong>do considerablem<strong>en</strong>te<br />

el número de errores. Así, los tipos de estructuras (struct), y su definición<br />

(typedef), no están pres<strong>en</strong>tes <strong>en</strong> el l<strong>en</strong>guaje Java.<br />

Como punto más importante, Java ha eliminado el concepto de puntero<br />

pres<strong>en</strong>te <strong>en</strong> el l<strong>en</strong>guaje C y C++ y, por tanto, la aritmética de punteros, uno de los<br />

aspectos más <strong>en</strong>gorrosos de estos l<strong>en</strong>guajes. Java posee una gestión automática<br />

de la memoria que permite liberarla a través del d<strong>en</strong>ominado recolector de basura<br />

(garbage collector) [126, 127].<br />

3.2.2 Robustez<br />

Java incorpora una serie de medidas y comprobaciones que evitan errores<br />

inesperados, por lo que se considera un l<strong>en</strong>guaje robusto (de hecho, se p<strong>en</strong>só<br />

llamarlo Oak, roble <strong>en</strong> inglés, haci<strong>en</strong>do alusión a su robustez). Tanto <strong>en</strong> tiempo<br />

40


Introducción<br />

de compilación como de ejecución se realizan chequeos para <strong>en</strong>contrar posibles<br />

problemas.<br />

También se realiza una comprobación de los bytecodes, que son el<br />

código resultante tras la compilación de un programa Java, es decir, no se trata de<br />

un código máquina directam<strong>en</strong>te <strong>en</strong>t<strong>en</strong>dible por el hardware. Los bytecodes son<br />

la <strong>en</strong>trada a la Máquina Virtual de Java (JVM), que se tratará más adelante.<br />

El control automático de la memoria, eliminando los errores por<br />

desbordami<strong>en</strong>to (overflow), también aporta robustez al l<strong>en</strong>guaje.<br />

3.2.3 Portabilidad e indep<strong>en</strong>d<strong>en</strong>cia<br />

Características como la portabilidad y la indep<strong>en</strong>d<strong>en</strong>cia de Java y su arquitectura<br />

derivan del hecho de que este l<strong>en</strong>guaje es compilado e interpretado, es decir,<br />

están pres<strong>en</strong>tes las dos formas de traducción de un código fu<strong>en</strong>te (l<strong>en</strong>guaje de<br />

alto nivel a código máquina).<br />

Tras el proceso de compilación del programa Java, se obti<strong>en</strong>e el código<br />

objeto formado por bytecodes, que conti<strong>en</strong>e el 80% de las instrucciones del<br />

programa <strong>en</strong> código máquina. Este código es g<strong>en</strong>érico y, para adaptarlo a una<br />

determinada plataforma (el concepto de plataforma se refiere a la combinación de<br />

un procesador y un sistema operativo), se interpreta por la JVM para añadir el<br />

20% de las instrucciones del programa.<br />

La JVM, que es la <strong>en</strong>cargada de interpretar los bytecodes al l<strong>en</strong>guaje<br />

máquina, hace que la ejecución de una determinada aplicación se adapte al<br />

hardware de la plataforma dada. Por lo tanto, la JVM es dep<strong>en</strong>di<strong>en</strong>te de la<br />

plataforma, si<strong>en</strong>do el único elem<strong>en</strong>to específico que se necesita para ejecutar un<br />

programa Java, indep<strong>en</strong>di<strong>en</strong>tem<strong>en</strong>te de que éste haya sido compilado <strong>en</strong><br />

cualquier otra máquina con difer<strong>en</strong>te sistema operativo o distinto<br />

microprocesador [128].<br />

La JVM está disponible <strong>en</strong> la arquitectura Java (Java 2 Platform<br />

Standard) para Solaris 2.x, SunOS 4.1.x, Microsoft Windows (95, 98, 2000, NT,<br />

Server y XP), Linux, Iris, Aix, Aple, etc. Además, ha sido incorporada a los<br />

41


Manuel Urbano Cuadrado Tesis Doctoral<br />

distintos navegadores (Microsoft la incorpora <strong>en</strong> la versión 5.0 de Internet<br />

Explorer), a los sistemas de gestión de bases de datos, servidores virtuales, etc.<br />

3.2.4 L<strong>en</strong>guaje distribuido y capacidad para la programación multihilo<br />

Java está concebido para el desarrollo de aplicaciones ejecutables <strong>en</strong> distintas<br />

máquinas <strong>en</strong> red. Por eso posee una serie de librerías para facilitar la<br />

interconexión vía protocolo TCP/IP. Por lo tanto, se pued<strong>en</strong> desarrollar<br />

aplicaciones para acceder a la información <strong>en</strong> la red de igual forma que se accede<br />

a la memoria secundaria de una máquina local [129].<br />

Una aplicación construida <strong>en</strong> Java puede ejecutar varias actividades de<br />

forma simultánea d<strong>en</strong>tro de una aplicación. Esta propiedad aporta un mejor<br />

r<strong>en</strong>dimi<strong>en</strong>to interactivo y facilita el desarrollo de aplicaciones para control de<br />

dispositivos <strong>en</strong> tiempo real [130].<br />

3.2.5 L<strong>en</strong>guaje ori<strong>en</strong>tado a objetos y gratuito<br />

En primer lugar, es un l<strong>en</strong>guaje ori<strong>en</strong>tado a objetos, tanto a nivel arquitectónico,<br />

al aportar las propiedades más importantes de los sistemas de objetos (her<strong>en</strong>cia,<br />

<strong>en</strong>capsulación y polimorfismo), como a nivel funcional, al ser los datos tratados<br />

como objetos <strong>en</strong> todo mom<strong>en</strong>to.<br />

Por otro lado, las difer<strong>en</strong>tes herrami<strong>en</strong>tas para el desarrollo de<br />

aplicaciones Java son gratuitas. Todas las plataformas están disponibles <strong>en</strong><br />

http://java.sun.com.<br />

3.3 Aplicaciones Java<br />

Las difer<strong>en</strong>tes plataformas e interfaces para la programación de aplicaciones<br />

(d<strong>en</strong>ominadas APIs del inglés Application Programming Interfaces) de Java<br />

proporcionan un amplio abanico de posibilidades <strong>en</strong> la construcción de<br />

programas de distinto tipo. Así, se pued<strong>en</strong> desarrollar soluciones “standalone”,<br />

que son aplicaciones sin características especiales (no acced<strong>en</strong> a un servidor, no<br />

utilizan recursos <strong>en</strong> máquinas remotas, etc.) para ejecutar <strong>en</strong> un único ord<strong>en</strong>ador.<br />

42


Introducción<br />

Para su desarrollo son sufici<strong>en</strong>tes las librerías y utilidades incluidas <strong>en</strong> la<br />

plataforma estándar de Java (Java 2 Platform, Standard Edition, J2SE).<br />

Aplicaciones más complejas son las que están basadas <strong>en</strong> una<br />

arquitectura multicapa. Por ejemplo, los sistemas de información de tres capas,<br />

d<strong>en</strong>ominados <strong>en</strong> inglés three tiered Enterprise Information Systems y<br />

desarrollados con tecnología Java usan la plataforma Java 2 Entreprise Edition<br />

(J2EE). Por este motivo, también se d<strong>en</strong>ominan aplicaciones J2EE [131,132].<br />

La primera capa se d<strong>en</strong>omina capa cli<strong>en</strong>te, formada por difer<strong>en</strong>tes<br />

compon<strong>en</strong>tes que se ejecutan <strong>en</strong> las máquinas que acced<strong>en</strong> de forma remota a un<br />

servidor Web. Un compon<strong>en</strong>te J2EE es una unidad software con una determinada<br />

funcionalidad y que se acopla a los demás compon<strong>en</strong>tes de la aplicación J2EE a<br />

través de sus respectivas clases.<br />

Los difer<strong>en</strong>tes compon<strong>en</strong>tes de la capa cli<strong>en</strong>te se pued<strong>en</strong> agrupar <strong>en</strong> tres<br />

bloques: los cli<strong>en</strong>tes Web, los applets y las aplicaciones cli<strong>en</strong>te. Los cli<strong>en</strong>tes Web<br />

están formados por las páginas Web dinámicas, escritas con los l<strong>en</strong>guajes de<br />

marcas HTML o XML (eXt<strong>en</strong>sible Markup Language), y los navegadores Web,<br />

que permit<strong>en</strong> la búsqueda y visualización de la información. Por su parte, los<br />

applets son pequeñas aplicaciones cli<strong>en</strong>te escritas <strong>en</strong> Java y que ejecutan la JVM<br />

pert<strong>en</strong>eci<strong>en</strong>te al navegador. Por último, las aplicaciones cli<strong>en</strong>te son interfaces<br />

normalm<strong>en</strong>te realizadas con los paquetes Swing o Awt de Java para aportar una<br />

mayor riqueza gráfica.<br />

La segunda capa es el servidor Web, que está formada por Servlets y las<br />

páginas JSP (Java Server Page). Los servlets son clases Java que, de forma<br />

dinámica, procesan las peticiones al servidor y construy<strong>en</strong> las respuestas a los<br />

cli<strong>en</strong>tes. Las páginas JSP pres<strong>en</strong>tan la misma funcionalidad que los servlets,<br />

difer<strong>en</strong>ciándose de éstos <strong>en</strong> la estructura basada <strong>en</strong> página Web que pose<strong>en</strong>.<br />

La arquitectura de tres capas es considerada por algunos autores, que<br />

desde una óptica del dominio de la información a tratar por la aplicación J2EE,<br />

establec<strong>en</strong> cuatro capas, y argum<strong>en</strong>tan que la arquitectura de tres capas sólo hace<br />

refer<strong>en</strong>cia a la localización de los compon<strong>en</strong>tes. Por tanto, <strong>en</strong> la nueva estructura<br />

43


Manuel Urbano Cuadrado Tesis Doctoral<br />

propuesta para las aplicaciones J2EE, la capa servidor se divide <strong>en</strong> la capa Web y<br />

la capa de negocio.<br />

La capa Web está formada por los compon<strong>en</strong>tes que formaban la antigua<br />

capa servidor, es decir, los servlets y las páginas JSP. Por otro lado, la capa de<br />

negocio está formada por los Enterprise Java Beans (EJB), que son la interfaz<br />

<strong>en</strong>tre la capa Web (peticiones y respuestas <strong>en</strong>tre el cli<strong>en</strong>te y el servidor) y la<br />

última capa, d<strong>en</strong>ominada capa del sistema de información. Se distingu<strong>en</strong> tres<br />

tipos de EJB: los de sesión, los de <strong>en</strong>tidad y, por último, los de m<strong>en</strong>saje.<br />

La capa del sistema de información incluye todas las estructuras que<br />

facilitan el almac<strong>en</strong>ami<strong>en</strong>to de la información de la empresa. Por tanto, su núcleo<br />

es la base de datos. Los compon<strong>en</strong>tes J2EE de esta capa son aquéllos que<br />

permit<strong>en</strong> la conexión <strong>en</strong>tre la capa Web y la de negocio, y la base de datos.<br />

Para terminar, se van a citar otras plataformas que ofrece la arquitectura<br />

Java para el desarrollo de aplicaciones informáticas <strong>en</strong> otros campos. J2ME (Java<br />

2 Platform Micro Edition) proporciona las utilidades necesarias para el desarrollo<br />

de software para dispositivos electrónicos como móviles, calculadoras, etc.<br />

También están disponibles difer<strong>en</strong>tes APIs para el desarrollo de servicios Web,<br />

que son aplicaciones para el uso de datos con Java y XML. Para el <strong>en</strong>samblaje de<br />

compon<strong>en</strong>tes Java y compon<strong>en</strong>tes XML son útiles las interfaces JAXB, SAX y<br />

JDOM [133,134].<br />

4. La información como recurso. Oracle. SGBD basados <strong>en</strong> el<br />

44<br />

modelo de datos objeto relacional<br />

Los correctos procesos de almac<strong>en</strong>ami<strong>en</strong>to, mant<strong>en</strong>imi<strong>en</strong>to y consulta de la<br />

información analítica hac<strong>en</strong> uso de las bases de datos. La gestión automática de<br />

los datos siempre se ha apoyado <strong>en</strong> las características de la memoria secundaria<br />

(memoria no volátil) y <strong>en</strong> una tecnología que ha avanzado desde los sistemas de<br />

ficheros hasta los sistemas de gestión de bases datos, basados estos últimos <strong>en</strong><br />

modelos avanzados de repres<strong>en</strong>tación de la información. En este apartado se van


Introducción<br />

a considerar las v<strong>en</strong>tajas aportadas por el sistema de gestión de bases de datos<br />

Oracle, que es la herrami<strong>en</strong>ta de gestión de la información utilizada <strong>en</strong> el<br />

desarrollo y uso del sistema de información que se ha diseñado y construido y<br />

que se recoge <strong>en</strong> esta Memoria.<br />

4.1 De los sistemas de ficheros planos a los de bases de datos<br />

4.1.1 Evolución<br />

Las demandas funcionales requeridas para las aplicaciones de procesami<strong>en</strong>to de<br />

la información han marcado el camino a seguir <strong>en</strong> la tecnología de acceso a los<br />

datos. Así, los primeros sistemas t<strong>en</strong>ían el objetivo de cumplir unos requisitos<br />

normalm<strong>en</strong>te relacionados con las tareas repetitivas de administración, buscando<br />

una reducción del tiempo y el espacio que requerían la gestión <strong>en</strong> papel de los<br />

datos. Cuando las empresas llegaron a considerar que la información es el<br />

recurso más importante para la vista de negocio, la tecnología evolucionó hacia<br />

el desarrollo de las bases de datos. Hoy <strong>en</strong> día, las bases de datos son el pilar de<br />

los sistemas de información.<br />

Los sistemas de almac<strong>en</strong>ami<strong>en</strong>to basados <strong>en</strong> ficheros manti<strong>en</strong><strong>en</strong> la<br />

información por medio de archivos que conti<strong>en</strong><strong>en</strong> una colección de registros con<br />

diversos campos de datos. La principal limitación de estos sistemas para<br />

sintetizar información es la imposibilidad de relacionar difer<strong>en</strong>tes registros sin<br />

aplicaciones externas complejas. Además, como se verá más adelante, pres<strong>en</strong>tan<br />

también una serie de inconv<strong>en</strong>i<strong>en</strong>tes que hac<strong>en</strong> inapropiado su uso <strong>en</strong> el <strong>en</strong>torno<br />

computacional de la sociedad actual.<br />

Los sistemas clásicos de almac<strong>en</strong>ami<strong>en</strong>to, como se conoc<strong>en</strong> a las<br />

estructuras de ficheros, también experim<strong>en</strong>taron una evolución interna. El hito<br />

más importante que la marcó fue el cambio del acceso secu<strong>en</strong>cial al acceso<br />

directo de los datos. Así, para consultar o proporcionar los datos de un<br />

determinado registro <strong>en</strong> un fichero ya no fue necesario leer ni ord<strong>en</strong>ar los<br />

archivos de uno <strong>en</strong> uno, llevando este hecho a un ahorro de tiempo significativo.<br />

45


Manuel Urbano Cuadrado Tesis Doctoral<br />

El acceso aleatorio de los datos estaba asegurado con ficheros con estructura<br />

indexada, soportados <strong>en</strong> el método ISAM (de las siglas <strong>en</strong> inglés de Indexed<br />

Sequ<strong>en</strong>tial Access Method) [135].<br />

En la primera g<strong>en</strong>eración de ord<strong>en</strong>adores (años cincu<strong>en</strong>ta y comi<strong>en</strong>zos de<br />

los ses<strong>en</strong>ta) se utilizaron ampliam<strong>en</strong>te los sistemas de almac<strong>en</strong>ami<strong>en</strong>to clásicos.<br />

Estos sistemas sólo proporcionaron una solución parcial (por los motivos<br />

anteriorm<strong>en</strong>te com<strong>en</strong>tados y los inconv<strong>en</strong>i<strong>en</strong>tes que se citarán <strong>en</strong> el sigui<strong>en</strong>te<br />

apartado) por lo que a mediados de los ses<strong>en</strong>ta apareció el concepto de bases de<br />

datos [136]. Se cita una definición del concepto de bases de datos de las muchas<br />

que aparec<strong>en</strong> <strong>en</strong> la literatura: “Colección de archivos relacionados que<br />

almac<strong>en</strong>an tanto una repres<strong>en</strong>tación abstracta del dominio de un problema del<br />

mundo real cuyo manejo resulta de interés para una organización, como los<br />

datos correspondi<strong>en</strong>tes a la información acerca del mismo. Tanto la<br />

repres<strong>en</strong>tación como los datos están sujetos a una serie de restricciones, las<br />

cuales forman parte del dominio del problema y cuya descripción está también<br />

almac<strong>en</strong>ada es esos ficheros” [137].<br />

La tecnología de las bases de datos también ha seguido una evolución,<br />

esta vez marcada por los difer<strong>en</strong>tes modelos que repres<strong>en</strong>tan la estructura de la<br />

base de datos a difer<strong>en</strong>tes niveles, desde un nivel físico hasta el externo, pasando<br />

por los niveles conceptual y lógico [138]. Así, aparec<strong>en</strong> las bases de datos<br />

jerárquicas, <strong>en</strong> red, relacionales, objeto-relacional, ori<strong>en</strong>tadas a objetos y las<br />

bases de datos soportadas <strong>en</strong> el conocimi<strong>en</strong>to. Los dos primeros modelos,<br />

apoyados <strong>en</strong> el concepto de puntero, t<strong>en</strong>ían una alta dep<strong>en</strong>d<strong>en</strong>cia de los niveles<br />

físicos, lo que seguía si<strong>en</strong>do un inconv<strong>en</strong>i<strong>en</strong>te y provocó la búsqueda de nuevos<br />

modelos y la evolución de la tecnología.<br />

4.1.2 V<strong>en</strong>tajas e inconv<strong>en</strong>i<strong>en</strong>tes de los sistemas de bases de datos fr<strong>en</strong>te a los<br />

sistemas basados <strong>en</strong> ficheros<br />

Como ya se ha com<strong>en</strong>tado anteriorm<strong>en</strong>te, la dificultad de repres<strong>en</strong>tar la relación<br />

<strong>en</strong>tre los datos es el inconv<strong>en</strong>i<strong>en</strong>te más destacado de los ficheros clásicos. Las<br />

46


Introducción<br />

bases de datos surg<strong>en</strong> del concepto de Sistema Ori<strong>en</strong>tado a los Datos, dejando<br />

atrás los Sistemas Ori<strong>en</strong>tados a los Procesos. El primero busca la relación de los<br />

datos <strong>en</strong> la definición de la estructura y <strong>en</strong> el comportami<strong>en</strong>to, y no <strong>en</strong> las<br />

aplicaciones externas de manejo de datos.<br />

La indep<strong>en</strong>d<strong>en</strong>cia <strong>en</strong>tre los datos y los tratami<strong>en</strong>tos es de vital<br />

importancia para que el dinamismo implícito del <strong>en</strong>torno que los rodea no les<br />

afecte. Las bases de datos aseguran que la inclusión de nueva información no<br />

modifica los tratami<strong>en</strong>tos de la información y, <strong>en</strong> dirección contraria, que los<br />

cambios de los procesami<strong>en</strong>tos no influy<strong>en</strong> <strong>en</strong> el diseño de los datos. Aunque esta<br />

indep<strong>en</strong>d<strong>en</strong>cia no es absoluta, las bases de datos se acercan a este objetivo.<br />

La integridad de la información, básica para su uso, se consigue<br />

mediante las bases de datos, que permit<strong>en</strong> que se almac<strong>en</strong>e una única copia de la<br />

información que repres<strong>en</strong>ta un determinado dato. Esta propiedad se sust<strong>en</strong>ta <strong>en</strong><br />

otra característica de los sistemas de bases de datos, la mínima redundancia que<br />

pres<strong>en</strong>ta, si<strong>en</strong>do ésta a nivel físico la totalidad de las veces. En el mant<strong>en</strong>imi<strong>en</strong>to<br />

de los sistemas clásicos, la introducción o modificación de un dato obligaba al<br />

acceso a varios ficheros, lo que conllevaba la posible inconsist<strong>en</strong>cia de la<br />

información almac<strong>en</strong>ada.<br />

La disponibilidad de la información es más apropiada debido a que<br />

ningún fichero de datos es para el uso exclusivo de un tratami<strong>en</strong>to, sino que los<br />

datos pued<strong>en</strong> consultarse por todas las aplicaciones.<br />

El espacio de almac<strong>en</strong>ami<strong>en</strong>to, debido al m<strong>en</strong>or número de redundancias<br />

exist<strong>en</strong>tes, se reduce <strong>en</strong> los sistemas de bases de datos. Este m<strong>en</strong>or espacio de<br />

memoria secundaria utilizada se pone de manifiesto <strong>en</strong> los sistemas de gran<br />

volum<strong>en</strong> de datos. Esto es debido a que un sistema de bases de datos utiliza un<br />

diccionario de datos, punteros, índices, etc., que, g<strong>en</strong>eralm<strong>en</strong>te, ocupan un<br />

espacio considerable.<br />

Las bases de datos pres<strong>en</strong>tan un alto desempeño <strong>en</strong> la interacción<br />

hombre-máquina porque los datos se recog<strong>en</strong> y se consultan una sola vez. Por lo<br />

47


Manuel Urbano Cuadrado Tesis Doctoral<br />

tanto, el r<strong>en</strong>dimi<strong>en</strong>to de la consulta y la actualización <strong>en</strong> una base de datos va a<br />

ser siempre mayor que <strong>en</strong> los sistemas de ficheros planos.<br />

Los sistemas de gestión de bases de datos (que se verán más adelante)<br />

garantizan la seguridad y la privacidad de la información. Una de las<br />

características más importantes de Oracle (uno de los más conocidos sistemas de<br />

gestión de bases de datos) es la extrema protección que su arquitectura<br />

proporciona [139].<br />

A pesar de esta serie de v<strong>en</strong>tajas, exist<strong>en</strong> algunos inconv<strong>en</strong>i<strong>en</strong>tes <strong>en</strong> los<br />

sistemas de bases de datos, normalm<strong>en</strong>te pot<strong>en</strong>ciados por el desconocimi<strong>en</strong>to por<br />

parte de las empresas de las características de los sistemas de gestión de bases de<br />

datos. Uno de estos inconv<strong>en</strong>i<strong>en</strong>tes es la implantación larga y costosa, y como<br />

consecu<strong>en</strong>cia, una r<strong>en</strong>tabilidad no visible a corto plazo. Otros problemas están<br />

relacionados con la falta de estandarización (aunque ya se dispone de<br />

herrami<strong>en</strong>tas estándares, sobre todo para las bases de datos relacionales), y el<br />

desfase <strong>en</strong>tre una teoría adelantada y una práctica a la zaga.<br />

4.2 El Sistema de Gestión de Bases de Datos (SGBD)<br />

El SGBD es el sistema computacional que facilita la gestión de las bases de<br />

datos. Por tanto, el SGBD <strong>en</strong>globa el conjunto de programas, procedimi<strong>en</strong>tos,<br />

l<strong>en</strong>guajes, interfaces, etc., que suministra a los usuarios de la base de datos las<br />

utilidades necesarias para describir y manejar los datos almac<strong>en</strong>ados. Además,<br />

garantiza la seguridad y privacidad de la información cont<strong>en</strong>ida <strong>en</strong> la base de<br />

datos. Por lo tanto, se puede considerar que es la interfaz <strong>en</strong>tre la base de datos y<br />

los difer<strong>en</strong>tes usuarios y aplicaciones del sistema de información.<br />

Cuando se habla de usuarios de las bases de datos, se refiere a dos<br />

niveles o dos grupos, que a su vez se pued<strong>en</strong> subdividir. El primer grupo lo<br />

compon<strong>en</strong> los usuarios que crean y manti<strong>en</strong><strong>en</strong> la base de datos, además de<br />

desarrollar los programas que acced<strong>en</strong> a los datos. El segundo grupo de usuarios<br />

son aquellos que emplean los datos para sus actividades d<strong>en</strong>tro de la empresa.<br />

48


4.2.1 Funciones y l<strong>en</strong>guajes de los SGBD<br />

Introducción<br />

Suel<strong>en</strong> distinguirse tres funciones principales de los SGBD: la función de<br />

definición, la de manipulación y la de control de los datos. La función de<br />

definición permite especificar los elem<strong>en</strong>tos de datos, su relación y las<br />

restricciones impuestas tanto por el dominio de la información, como por las<br />

estructuras físicas de almac<strong>en</strong>ami<strong>en</strong>to. El l<strong>en</strong>guaje <strong>en</strong>cargado de esta función es<br />

el L<strong>en</strong>guaje de Descripción de Datos (Data Definition Language, DDL), que es<br />

dep<strong>en</strong>di<strong>en</strong>te del SGBD. Este l<strong>en</strong>guaje suele <strong>en</strong>cargarse también de indicar el<br />

espacio reservado para la ext<strong>en</strong>sión de los campos, las estructuras de datos y sus<br />

relaciones, y las restricciones. Ésta es la definición física y, <strong>en</strong> algunos SGBD, su<br />

especificación se hace separadam<strong>en</strong>te con otro l<strong>en</strong>guaje d<strong>en</strong>ominado L<strong>en</strong>guaje de<br />

Definición del Almac<strong>en</strong>ami<strong>en</strong>to de los Datos (Data Storage Definition Language,<br />

DSDL).<br />

La función de manipulación se lleva a cabo con el L<strong>en</strong>guaje de<br />

Manipulación de Datos (Data Manipulation Language, DML), que permite la<br />

definición externa de los datos, su consulta y la actualización de éstos, es decir,<br />

su inserción, modificación y borrado. EL DML es un l<strong>en</strong>guaje dep<strong>en</strong>di<strong>en</strong>te del<br />

modelo que emplea el SGBD, y puede ser una serie de mandatos d<strong>en</strong>tro de un<br />

l<strong>en</strong>guaje de programación, llamado huésped o, por el contrario, un l<strong>en</strong>guaje que<br />

no necesita apoyarse <strong>en</strong> ningún otro.<br />

Por último, la función de control se lleva a cabo por medio de una serie<br />

de interfaces que proporcionan el correcto acceso de los usuarios a la base de<br />

datos. Esta función reside <strong>en</strong> el L<strong>en</strong>guaje de Control de Datos (Data Control<br />

Language, DCL).<br />

4.2.2 Otros compon<strong>en</strong>tes del SGBD<br />

Se ha com<strong>en</strong>tado anteriorm<strong>en</strong>te que el SGBD está formado no sólo por los<br />

l<strong>en</strong>guajes citados, sino que también cu<strong>en</strong>ta con una serie de programas,<br />

estructuras de datos, etc., que permit<strong>en</strong> la correcta gestión de los datos. El<br />

49


Manuel Urbano Cuadrado Tesis Doctoral<br />

Diccionario de Datos es un conjunto de archivos que conti<strong>en</strong><strong>en</strong> la información de<br />

los datos que pued<strong>en</strong> ser almac<strong>en</strong>ados (es una Metabase de Datos). En este<br />

diccionario se almac<strong>en</strong>an los esquemas lógico y físico de la base de datos, al<br />

igual que los subesquemas de ésta.<br />

Más adelante se verá que hay 3 niveles o modelos de abstracción <strong>en</strong> los<br />

que se repres<strong>en</strong>ta una base de datos: físico, lógico y externo. Por lo tanto, el<br />

diccionario de datos recoge la definición de estos tres niveles. Los<br />

procedimi<strong>en</strong>tos de acceso necesitarán <strong>en</strong> algún mom<strong>en</strong>to de cómputo vincular las<br />

tres definiciones, basándose <strong>en</strong> lo que se conoce como Mapa de Reglas, también<br />

almac<strong>en</strong>adas <strong>en</strong> el diccionario de datos.<br />

Otro compon<strong>en</strong>te a destacar del SGBD es el Gestor de la Base de Datos,<br />

que es un compon<strong>en</strong>te software que actúa de interfaz <strong>en</strong>tre los datos almac<strong>en</strong>ados<br />

y las aplicaciones que acced<strong>en</strong> a ellos. Garantiza el correcto, seguro y efici<strong>en</strong>te<br />

almac<strong>en</strong>ami<strong>en</strong>to y consulta de los datos.<br />

4.2.3 Estandarización <strong>en</strong> los SGBD<br />

La estandarización y normalización de las bases de datos y de sus sistemas de<br />

gestión han sido tratadas por distintos organismos desde los años ses<strong>en</strong>ta, pero su<br />

avance ha sido y es l<strong>en</strong>to debido tanto a motivos técnicos, como burocráticos.<br />

Los objetivos de la estandarización están <strong>en</strong>caminados a que el cambio de un<br />

producto comercial SGBD a otro no implique la modificación del diseño de la<br />

base de datos <strong>en</strong> uso y de las aplicaciones que usan los datos. Es decir, el<br />

concepto de Sistema Abierto es el c<strong>en</strong>tro de los objetivos.<br />

Dos organismos como son la ISO (International Organisation for<br />

Standarisation) e IEC (International Electrochemical Commission) han<br />

establecido un comité conjunto d<strong>en</strong>ominado JTCI (Joint Technical Committee)<br />

para la estandarización <strong>en</strong> las tecnologías de la información. Uno de los muchos<br />

grupos de este comité, el d<strong>en</strong>ominado WG3, está dedicado a la búsqueda de<br />

sistemas abiertos de bases de datos. Actualm<strong>en</strong>te trabajan <strong>en</strong> cuatro proyectos:<br />

50


Introducción<br />

l<strong>en</strong>guajes de bases de datos, modelos de refer<strong>en</strong>cia, acceso remoto a datos y<br />

sistemas de diccionarios de recursos de información [138].<br />

Codasyl (Confer<strong>en</strong>ce on Data System Languages) es un grupo que<br />

investigó la normalización <strong>en</strong> los modelos de datos y sus difer<strong>en</strong>tes l<strong>en</strong>guajes y<br />

propuso un modelo de datos <strong>en</strong> red, llamado también Codasyl, con sus l<strong>en</strong>guajes<br />

de descripción y manipulación.<br />

El grupo ANSI/X3/SPARC es el grupo de estudio de la organización<br />

Standard Planning and Requirem<strong>en</strong>ts Committee (SPARC), pert<strong>en</strong>eci<strong>en</strong>te al<br />

American National Standards Institute (ANSI). El comité X3 es el que trata los<br />

temas informáticos. En el año de 1972 estos grupos empezaron a aunar esfuerzos<br />

<strong>en</strong>caminados a una pot<strong>en</strong>cial normalización de los SGBD. Como <strong>en</strong> anteriores<br />

int<strong>en</strong>tos por parte de otros grupos, el principal inconv<strong>en</strong>i<strong>en</strong>te era el temor a hacer<br />

una estandarización <strong>en</strong> un mom<strong>en</strong>to no apropiado que fr<strong>en</strong>ase los avances del<br />

área. Por este motivo, sus primeras actividades fueron estudios sobre los<br />

compon<strong>en</strong>tes o aspectos de los SGBD que requerían un mayor grado de<br />

normalización. En el año 1977 se elaboró un informe <strong>en</strong> el que se analizó la<br />

arquitectura de un SGBD y las 42 interfaces id<strong>en</strong>tificadas.<br />

Los trabajos continuaron durante años, creándose grupos d<strong>en</strong>tro del<br />

ANSI/SPARC específicos del área de las bases de datos, para, <strong>en</strong> 1986, proponer<br />

un Modelo de Refer<strong>en</strong>cia para la estandarización de los SGBD [140]. Tanto el<br />

informe final como los intermedios introduc<strong>en</strong> una difer<strong>en</strong>cia <strong>en</strong> la arquitectura<br />

de los SGBD respecto a los trabajos de otros organismos, que sólo distinguían<br />

<strong>en</strong>tre la estructura o nivel lógico y la estructura o nivel físico. La arquitectura<br />

ANSI/X3/SPARC introduce un tercer nivel <strong>en</strong>tre las estructuras física y lógica.<br />

Es el llamado nivel conceptual. Aunque empleando terminología distinta, otros<br />

grupos (el grupo GUIDE/SHARE de usuarios de IBM, el Club de Banco de<br />

Datos del INRIA, etc.) han introducido arquitecturas similares de tres niveles.<br />

51


Manuel Urbano Cuadrado Tesis Doctoral<br />

4.2.4 La arquitectura ANSI/X3/SPARC<br />

La arquitectura ANSI/X3/SPARC propone tres niveles de abstracción de datos.<br />

En ella el nivel clave es el d<strong>en</strong>ominado esquema conceptual, del cual derivan una<br />

serie de esquemas externos que son la imag<strong>en</strong> de los datos que ti<strong>en</strong><strong>en</strong> los usuarios<br />

y aplicaciones que hac<strong>en</strong> uso de ellos. Del esquema conceptual también deriva el<br />

interno, que describe los datos desde un punto de vista físico. La conversión de<br />

un nivel a otro se efectúa por medio de funciones de correspond<strong>en</strong>cia.<br />

La arquitectura, propuesta <strong>en</strong> el informe de 1978, está dividida <strong>en</strong> dos<br />

partes: una para la definición de los datos y otra para su manipulación. Se<br />

distingue una serie de funciones tanto humanas como de programas, un conjunto<br />

de interfaces lógicas o físicas, y un diccionario de datos, también d<strong>en</strong>ominado<br />

metadatos, clave <strong>en</strong> esta arquitectura. Los requisitos de indep<strong>en</strong>d<strong>en</strong>cia y<br />

escalabilidad <strong>en</strong>tre los tres niveles se cumpl<strong>en</strong> por la arquitectura ANSI/SPARC,<br />

por lo que los cambios <strong>en</strong> los esquemas interno, conceptual y externo no se<br />

afectan recíprocam<strong>en</strong>te.<br />

El impacto de la estructura de tres niveles <strong>en</strong> los SGBD actuales es<br />

elevado, pero el informe que la propuso fue criticado debido al número tan<br />

elevado de interfaces y la vaguedad del concepto del diccionario de datos. Como<br />

se ha com<strong>en</strong>tado anteriorm<strong>en</strong>te, los trabajos prosiguieron hasta el Modelo de<br />

Refer<strong>en</strong>cia (MR), publicado <strong>en</strong> 1986 [140].<br />

El MR está basado <strong>en</strong> la arquitectura ANSI, pero supera los<br />

inconv<strong>en</strong>i<strong>en</strong>tes del elevado número de interfaces y del concepto del diccionario<br />

de datos (se contesta a las numerosas preguntas sobre su concepto que surgieron<br />

<strong>en</strong> el primer informe). Su objetivo es explicar la relación <strong>en</strong>tre los difer<strong>en</strong>tes<br />

compon<strong>en</strong>tes y niveles del SGBD, lo que supone un int<strong>en</strong>to de marcar las bases<br />

para futuras estandarizaciones.<br />

52


4.3 Modelos de datos<br />

Introducción<br />

Un modelo es una repres<strong>en</strong>tación de un sistema a un nivel de detalle dado para<br />

considerar sus aspectos más importantes. Desde el punto de vista de las bases de<br />

datos, el concepto a t<strong>en</strong>er <strong>en</strong> cu<strong>en</strong>ta es Modelo de Datos, que puede definirse<br />

como el conjunto de elem<strong>en</strong>tos semánticos que permit<strong>en</strong> la descripción de la base<br />

de datos a difer<strong>en</strong>tes niveles de abstracción. T<strong>en</strong>i<strong>en</strong>do <strong>en</strong> cu<strong>en</strong>ta la arquitectura<br />

ANSI, exist<strong>en</strong> modelos internos, conceptuales y externos. Por tanto, se pued<strong>en</strong><br />

considerar los modelos como herrami<strong>en</strong>tas que ayudan a la implantación,<br />

compr<strong>en</strong>sión y uso de las bases de datos.<br />

En este apartado se va a hacer hincapié <strong>en</strong> los modelos conceptuales,<br />

pues los modelos externos suel<strong>en</strong> estar basados <strong>en</strong> los conceptuales y, por otra<br />

parte, los modelos internos no están estandarizados y son dep<strong>en</strong>di<strong>en</strong>tes del<br />

fabricante. Los modelos conceptuales se divid<strong>en</strong> <strong>en</strong> modelos conceptuales<br />

propiam<strong>en</strong>te dichos y modelos lógicos. Los primeros se c<strong>en</strong>tran <strong>en</strong> la descripción<br />

del conjunto de la información a tratar por cada aplicación desde un <strong>en</strong>foque<br />

totalm<strong>en</strong>te indep<strong>en</strong>di<strong>en</strong>te de la máquina. Los modelos lógicos, a difer<strong>en</strong>cia de los<br />

conceptuales, describ<strong>en</strong> el dominio de la información, pero desde un punto de<br />

vista dep<strong>en</strong>di<strong>en</strong>te del SGBD, utilizando elem<strong>en</strong>tos que se soportan <strong>en</strong> éste y que<br />

limitan la repres<strong>en</strong>tación semántica del problema.<br />

Un modelo de datos debe estar compuesto por dos submodelos: el<br />

estructural y el dinámico. El submodelo estructural describe la parte estática de<br />

los datos (<strong>en</strong>tidades u objetos, sus atributos, sus asociaciones, y sus<br />

restricciones), mi<strong>en</strong>tras que el dinámico describe las operaciones que hac<strong>en</strong> que<br />

la base de datos varíe de un estado a otro.<br />

4.3.1 Modelos conceptuales. Análisis semántico de la base de datos<br />

Los modelos conceptuales permit<strong>en</strong> capturar la semántica del problema a tratar<br />

sin las restricciones impuestas por el SGBD. Por lo tanto, son modelos más<br />

flexibles y proporcionan un mayor grado de abstracción. La interacción que este<br />

53


Manuel Urbano Cuadrado Tesis Doctoral<br />

tipo de modelos permite es la que ti<strong>en</strong>e lugar <strong>en</strong>tre la información del mundo real<br />

a repres<strong>en</strong>tar y el diseñador de la base de datos.<br />

Son varios los modelos conceptuales recogidos <strong>en</strong> la bibliografía, <strong>en</strong>tre<br />

los que se citan los modelos Entidad/Interrelación (E/R), Infológico, Modelo<br />

Semántico de Datos (SDM), etc., [141,142]. Por su versatilidad, el primero es el<br />

que más se usa hoy <strong>en</strong> día <strong>en</strong> el diseño de las bases de datos. No suele estar<br />

implantado <strong>en</strong> los SGBD, aunque algunos de éstos pued<strong>en</strong> llevar una herrami<strong>en</strong>ta<br />

CASE incorporada para realizar el diseño conceptual y luego la traducción<br />

automática a un modelo lógico.<br />

Se suele elegir <strong>en</strong>tre un modelo conceptual u otro, al igual que <strong>en</strong>tre<br />

difer<strong>en</strong>tes modelos lógicos, pero no <strong>en</strong>tre un modelo conceptual y un modelo<br />

lógico, ya que ti<strong>en</strong><strong>en</strong> difer<strong>en</strong>tes ámbitos de funcionalidad. La metodología a<br />

seguir <strong>en</strong> el diseño de las bases de datos es utilizar primero un modelo conceptual<br />

para recoger la mayor dim<strong>en</strong>sión semántica del problema y, luego, diseñar la<br />

base de datos con el modelo lógico que soporta el SGBD. Además, suel<strong>en</strong> existir<br />

reglas para pasar de un modelo conceptual a un modelo lógico de forma<br />

sistemática garantizando la m<strong>en</strong>or pérdida de información posible.<br />

El modelo E/R fue propuesto por Ch<strong>en</strong> <strong>en</strong> los años 1976 y 1977 [143-<br />

145], y son varios los investigadores que han contribuido a su expansión [146-<br />

148]. El concepto clave <strong>en</strong> torno al que giran los demás elem<strong>en</strong>tos semánticos es<br />

Entidad, que es cualquier objeto de interés para el dominio del problema. Las<br />

<strong>en</strong>tidades ti<strong>en</strong><strong>en</strong> unos atributos con sus respectivos dominios y se asocian a otras<br />

a través de lo que se d<strong>en</strong>ominan Interrelaciones, que también pued<strong>en</strong> pres<strong>en</strong>tar<br />

atributos. Aunque una descripción del modelo E/R queda fuera del alcance de<br />

esta introducción, se van a citar los términos más importantes de este modelo,<br />

como son: <strong>en</strong>tidades o interrelaciones débiles o fuertes, cardinalidad de las<br />

interrelaciones, debilidad por exist<strong>en</strong>cia o por id<strong>en</strong>tificación, interrelaciones<br />

jerárquicas, etc.<br />

El modelo E/R, tal como lo propuso su creador, es únicam<strong>en</strong>te un<br />

modelo estructural de la información. Ampliaciones aportadas por Poon<strong>en</strong> [149]<br />

54


Introducción<br />

y Shoshani [150] incorporan l<strong>en</strong>guajes para la recuperación y actualización de los<br />

datos almac<strong>en</strong>ados <strong>en</strong> sus estructuras. Muchos investigadores dudan de la<br />

aplicabilidad de la parte dinámica añadida al modelo debido al uso que se le da,<br />

pues se emplea el diseño de la base de datos desde la óptica conceptual y no<br />

desde la visión lógica del SGBD, que opera sobre los datos.<br />

4.3.2 Modelos lógicos. Diseño de la base de datos <strong>en</strong> función del SGBD<br />

Un modelo lógico permite un diseño de la base de datos que cubre una<br />

información parcial del problema, debido a que la estructura y el comportami<strong>en</strong>to<br />

de los datos <strong>en</strong> el SGBD impon<strong>en</strong> unas restricciones al dominio de información a<br />

tratar.<br />

Muchos son los modelos de este tipo propuestos <strong>en</strong> la literatura de bases<br />

de datos, aunque el más ext<strong>en</strong>dido actualm<strong>en</strong>te es el Modelo Relacional debido a<br />

que la mayoría de los SGBD comerciales están basados <strong>en</strong> él. Otros modelos<br />

lógicos que han sido usados <strong>en</strong> gran medida son el modelo <strong>en</strong> red o Modelo<br />

Codasyl, y el Modelo Jerárquico.<br />

La s<strong>en</strong>cillez que el usuario <strong>en</strong>cu<strong>en</strong>tra <strong>en</strong> la parte estática (relaciones o<br />

tablas) y <strong>en</strong> la parte dinámica (l<strong>en</strong>guajes de consulta y modificación) del modelo<br />

relacional es una de las causas que hace que sea el más usado. Además, este<br />

modelo no pres<strong>en</strong>ta dep<strong>en</strong>d<strong>en</strong>cia respecto al nivel físico, que sí la ti<strong>en</strong><strong>en</strong> los<br />

modelos jerárquico y <strong>en</strong> red, que utilizan el concepto de puntero (con la<br />

implicación física del término) para repres<strong>en</strong>tar la relación <strong>en</strong>tre objetos.<br />

Por otra parte, el modelo relacional ha recibido críticas refer<strong>en</strong>tes a la<br />

debilidad semántica que posee respecto a los modelos jerárquicos y Codasyl al no<br />

permitir, principalm<strong>en</strong>te, la distinción <strong>en</strong>tre los objetos y las asociaciones, ambos<br />

repres<strong>en</strong>tados mediante tablas. Otras críticas se le hicieron cuando los primeros<br />

prototipos que implantaban el modelo relacional salieron al mercado y dieron<br />

problemas relacionados con la efici<strong>en</strong>cia de los sistemas. Ya se ha com<strong>en</strong>tado <strong>en</strong><br />

esta introducción que la teoría y la práctica de las bases de datos ha pres<strong>en</strong>tado<br />

siempre un desfase a favor de la primera, y éste no fue m<strong>en</strong>os para los sistemas<br />

55


Manuel Urbano Cuadrado Tesis Doctoral<br />

relacionales. Hoy <strong>en</strong> día, uno de los más conocidos SGBD, Oracle, soporta el<br />

modelo relacional (desde 1980).<br />

En los años 90, con el auge del paradigma ori<strong>en</strong>tado a objetos <strong>en</strong> las<br />

áreas de ing<strong>en</strong>iería del software y programación, se desarrolló un nuevo modelo<br />

de datos, el Modelo Ori<strong>en</strong>tado a Objetos, aunque no se prevé ni a medio ni a<br />

corto plazo que sustituya la base relacional de los SGBD actuales. A<br />

continuación se expon<strong>en</strong> brevem<strong>en</strong>te los aspectos clave del modelo relacional y<br />

su expansión para soportar la programación ori<strong>en</strong>tada a objetos.<br />

4.3.3 Estática y dinámica del modelo relacional<br />

Codd es el creador del modelo relacional, que introdujo a través de una serie de<br />

publicaciones donde pres<strong>en</strong>tó tanto sus aspectos estructurales como dinámicos<br />

[151,152]. El modelo relacional está basado <strong>en</strong> la teoría matemática de la<br />

relaciones, si<strong>en</strong>do la tabla o relación la estructura básica de almac<strong>en</strong>ami<strong>en</strong>to,<br />

compuesta por filas o tuplas cuyo número varía con el tiempo.<br />

La relación, desde el punto de vista de las bases de datos y no<br />

matemático, se define como una tabla, id<strong>en</strong>tificada normalm<strong>en</strong>te por un nombre<br />

que suele ser único <strong>en</strong> el modelo. Esta tabla posee un conjunto de filas donde la<br />

primera se d<strong>en</strong>omina int<strong>en</strong>ción de la relación, que está formada por los m pares<br />

atributo-dominio. El resto de filas (d<strong>en</strong>ominándose al conjunto ext<strong>en</strong>sión de la<br />

relación) están formadas por los m pares atributo-valor, si<strong>en</strong>do el ord<strong>en</strong> de estos<br />

m pares igual al de los m pares de la int<strong>en</strong>ción. La int<strong>en</strong>ción es invariable con el<br />

tiempo (estática), al contrario de la ext<strong>en</strong>sión, que es variable (dinámica). Una<br />

base de datos relacional es simplem<strong>en</strong>te un conjunto de relaciones cuya ext<strong>en</strong>sión<br />

varía con el tiempo.<br />

Una fila o tupla no puede repetirse <strong>en</strong> una relación <strong>en</strong> un instante t, por lo<br />

que debe haber un atributo o un conjunto de ellos que id<strong>en</strong>tifiqu<strong>en</strong> únicam<strong>en</strong>te a<br />

una determinada tupla.<br />

La normalización de las relaciones fue propuesta por Codd [153] con el<br />

objetivo de eliminar las inconsist<strong>en</strong>cias y redundancias de un sistema relacional.<br />

56


Introducción<br />

Para ello se emplea un conjunto de operaciones <strong>en</strong>caminadas a eliminar una serie<br />

de dep<strong>en</strong>d<strong>en</strong>cias <strong>en</strong>tre los atributos de una relación. Además, es posible la<br />

construcción de las relaciones <strong>en</strong> una base de datos relacional a través de una<br />

serie de reglas de traducción de modelos E/R a modelos relacionales [137].<br />

La dinámica del modelo relacional es el conjunto de operaciones que<br />

transforman el estado de una relación, y por lo tanto de una base de datos. Las<br />

operaciones son las sigui<strong>en</strong>tes: inserción de tuplas, borrado, modificación y<br />

consultas. La dinámica del modelo se expresa mediante l<strong>en</strong>guajes de<br />

manipulación relacionales, si<strong>en</strong>do éstos de dos tipos: algebráicos y predicativos<br />

[154,155]. Los primeros dan lugar a lo que se conoce como Álgebra Relacional,<br />

que se caracteriza porque modifica el estado de la base de datos mediante<br />

operaciones donde los operandos y el resultado son relaciones. Los l<strong>en</strong>guajes<br />

predicativos constituy<strong>en</strong> el Cálculo Relacional, donde los cambios de estado se<br />

especifican por predicados que defin<strong>en</strong> el estado final de la relación sin indicar<br />

las operaciones. Se divid<strong>en</strong> <strong>en</strong> dos tipos: los que están ori<strong>en</strong>tados a tuplas y los<br />

que están ori<strong>en</strong>tados a dominios.<br />

El l<strong>en</strong>guaje de manipulación que se ha impuesto con difer<strong>en</strong>cia <strong>en</strong> los<br />

SGBD relacionales es el l<strong>en</strong>guaje estándar SQL (Structured Query Language),<br />

que es del tipo algebráico.<br />

4.3.4 El modelo de datos ori<strong>en</strong>tado a objetos<br />

El modelo de datos ori<strong>en</strong>tado a objetos ti<strong>en</strong>de a eliminar la separación <strong>en</strong>tre los<br />

datos y los procesos, que siempre ha existido <strong>en</strong> la tecnología de bases de datos.<br />

Los SGBD Ori<strong>en</strong>tados a Objetos (SGBDO) gestionan <strong>en</strong>tidades donde se<br />

<strong>en</strong>cu<strong>en</strong>tran <strong>en</strong>capsulados tanto los datos como las operaciones a realizar con<br />

ellos. Así, parte del código que se <strong>en</strong>contraba <strong>en</strong> el lado de las aplicaciones <strong>en</strong> los<br />

sistemas conv<strong>en</strong>cionales con este modelo se almac<strong>en</strong>a <strong>en</strong> la base de datos.<br />

El modelo de objetos también elimina la frontera <strong>en</strong>tre el nivel<br />

conceptual y el nivel lógico, ya que la captura semántica del problema se hace a<br />

través del modelo que va a ser implantado por el SGBD. El SGBDO emplea y<br />

57


Manuel Urbano Cuadrado Tesis Doctoral<br />

aprovecha las características del paradigma de ori<strong>en</strong>tación a objetos. Por ejemplo,<br />

el <strong>en</strong>capsulami<strong>en</strong>to y el ocultami<strong>en</strong>to de la información, que aportan la v<strong>en</strong>taja de<br />

que el usuario no ve los aspectos de implantación. Además, la modificación de<br />

un objeto no afecta a los objetos que interaccionan con él.<br />

Las interacciones <strong>en</strong>tre los objetos pued<strong>en</strong> ser de dos tipos: estáticas y<br />

dinámicas. Las primeras se basan <strong>en</strong> la her<strong>en</strong>cia de objetos (<strong>en</strong> la tecnología de<br />

bases de datos d<strong>en</strong>ominada g<strong>en</strong>eralización) y <strong>en</strong> la agregación de objetos para<br />

crear objetos complejos. Por otro lado, las interacciones dinámicas ti<strong>en</strong><strong>en</strong> lugar a<br />

través de los m<strong>en</strong>sajes que solicitan servicios y proporcionan resultados.<br />

Los SGBDO pose<strong>en</strong> una serie de características que son propias del<br />

paradigma de ori<strong>en</strong>tación a objetos, y otras que han t<strong>en</strong>ido que incorporar de los<br />

SGBD. Entre las primeras se <strong>en</strong>cu<strong>en</strong>tran la ext<strong>en</strong>sibilidad y la disponibilidad de<br />

bibliotecas. Entre las g<strong>en</strong>erales de los SGBD están la persist<strong>en</strong>cia, el<br />

cumplimi<strong>en</strong>to de la arquitectura ANSI, la seguridad, etc.<br />

Hay dos t<strong>en</strong>d<strong>en</strong>cias a la hora de aplicar la metodología de objetos a las<br />

bases de datos (se d<strong>en</strong>omina tercera g<strong>en</strong>eración de bases de datos) que se<br />

difer<strong>en</strong>cian <strong>en</strong> la distancia que establec<strong>en</strong> con el modelo relacional. Así, se<br />

distingue <strong>en</strong>tre SGBDO puros (romp<strong>en</strong> por completo con el modelo relacional) y<br />

SGBD relacionales ext<strong>en</strong>didos (aprovechan el modelo relacional y la tecnología<br />

basada <strong>en</strong> éste). La comunidad ci<strong>en</strong>tífica está dividida <strong>en</strong> dos corri<strong>en</strong>tes, una a<br />

favor del <strong>en</strong>foque evolutivo [156-158] y otra que defi<strong>en</strong>de el <strong>en</strong>foque<br />

revolucionario [159]. Pero el debate también se está dando <strong>en</strong> el ámbito<br />

económico, decantándose la mayoría de las empresas de SGBD por el <strong>en</strong>foque<br />

evolutivo para no desaprovechar la base tecnológica <strong>en</strong> la que se asi<strong>en</strong>tan las<br />

bases de datos relacionales.<br />

58


4.4 Oracle<br />

4.4.1 Evolución reci<strong>en</strong>te del sistema de gestión de bases de datos Oracle<br />

Introducción<br />

Oracle Data Server, comercializado por la compañía Oracle Corporation, y más<br />

comúnm<strong>en</strong>te conocido como Oracle, es el líder <strong>en</strong> el mercado de los SGBD<br />

[139]. A partir de la versión Oracle7 se incorporaron las características que<br />

hicieron que este producto fuese útil para muchos tipos de aplicaciones: sistemas<br />

de almac<strong>en</strong>ami<strong>en</strong>to de datos, sistemas de ayuda a la decisión, sistemas para el<br />

procesami<strong>en</strong>to de datos operacionales y transaccionales, etc. A partir de la<br />

versión Oracle8 soporta tanto el modelo relacional, como el ori<strong>en</strong>tado a objetos<br />

(<strong>en</strong>foque evolutivo) [160].<br />

El lanzami<strong>en</strong>to de la versión Oracle8 [161,162], verano de 1997, supuso<br />

la inclusión de una serie de nuevas características para adaptar el producto a las<br />

exig<strong>en</strong>cias de los nuevos <strong>en</strong>tornos computacionales. Así, se incluyeron la<br />

partición de datos, los tipos de objetos y sus métodos, los tipos de objetos<br />

grandes (LOB, large object), la adjudicación de contraseñas, etc.<br />

En 1999, se inició la distribución de Oracle8i, que aportó una serie de<br />

mejoras para las aplicaciones de almac<strong>en</strong>ami<strong>en</strong>to masivo de datos y para las<br />

aplicaciones Web. Respecto al primer tipo, Oracle8i incluye características para<br />

el increm<strong>en</strong>to del r<strong>en</strong>dimi<strong>en</strong>to del procesami<strong>en</strong>to de peticiones complejas, como<br />

son las vistas materializadas, reescritura de peticiones automáticas e índices<br />

basados <strong>en</strong> funciones. Respecto a las aplicaciones Web, la nueva versión incluye<br />

la máquina virtual de Java, com<strong>en</strong>tada anteriorm<strong>en</strong>te, lo que permite construir<br />

tanto aplicaciones de acceso a los datos, como compon<strong>en</strong>tes del SGBD usando el<br />

nuevo l<strong>en</strong>guaje de programación. También se ha incluido el Sistema de Archivos<br />

de Internet (conocido por sus siglas iniciales, IFS del Internet File System).<br />

4.4.2. Arquitecturas de procesami<strong>en</strong>to de Oracle<br />

Oracle distingue <strong>en</strong>tre la base de datos y la instancia de la base de datos. La<br />

definición del primer término ya se ha dado anteriorm<strong>en</strong>te. La instancia de la<br />

59


Manuel Urbano Cuadrado Tesis Doctoral<br />

base de datos es el conjunto de los procesos de sistema operativo y de memoria<br />

que el SGBD usa para administrar el acceso a la base de datos. Es decir, para<br />

poder acceder a la base de datos es necesario que la instancia de base de datos<br />

esté <strong>en</strong> ejecución [162].<br />

Una instancia de Oracle usa un conjunto indep<strong>en</strong>di<strong>en</strong>te de hilos o<br />

procesos para soportar las conexiones de usuario (a través del SGBD o de una<br />

aplicación externa). Oracle soporta un número de sesiones conectadas a la<br />

instancia <strong>en</strong> varios tipos de <strong>en</strong>torno computacional.<br />

Las aplicaciones cli<strong>en</strong>te/servidor, también d<strong>en</strong>ominadas de<br />

procesami<strong>en</strong>to distribuido, realizan varias tareas a través de dos o más<br />

compon<strong>en</strong>tes. Por ejemplo los tres compon<strong>en</strong>tes de los sistemas cli<strong>en</strong>te/servidor:<br />

el cli<strong>en</strong>te, el servidor y la red.<br />

Para soportar las conexiones distribuidas, Oracle emplea varias<br />

arquitecturas: la de servidor dedicado y la de servidor multihilo. En el primer tipo<br />

de servidor se crea lo que se d<strong>en</strong>omina un servidor de segundo plano para cada<br />

cli<strong>en</strong>te que se conecta al sistema. En el segundo tipo se crea un conjunto de hilos<br />

de servidor que de manera eficaz soportan la conexión de gran cantidad de<br />

usuarios.<br />

4.4.3 Java y el acceso a bases de datos Oracle: JDBC y SQLJ<br />

La relevancia que ti<strong>en</strong>e actualm<strong>en</strong>te el l<strong>en</strong>guaje de programación Java ha hecho<br />

que Oracle desarrolle una serie de características para la adecuación de las<br />

aplicaciones construidas con este l<strong>en</strong>guaje.<br />

En primer lugar, Oracle incorpora la máquina virtual de Java necesaria<br />

para la interpretación de los programas. En segundo lugar, Oracle permite usar<br />

los estándares industriales JDBC (del inglés Java DataBase Connectivity) y<br />

SQLJ (hace refer<strong>en</strong>cia al l<strong>en</strong>guaje de consulta SQL y al l<strong>en</strong>guaje Java).<br />

Por último, las clases Java se pued<strong>en</strong> almac<strong>en</strong>ar <strong>en</strong> la base de datos, es<br />

decir, no sólo se pued<strong>en</strong> almac<strong>en</strong>ar los datos, sino también la funcionalidad<br />

60


Introducción<br />

requerida mediante módulos Java. Además, ya se ha com<strong>en</strong>tado la inclusión del<br />

modelo de bases de datos objeto-relacionales <strong>en</strong> Oracle.<br />

5. Quimiometría: modelos clásicos para diseñar experim<strong>en</strong>tos,<br />

clasificar productos y predecir parámetros<br />

El empleo de la estadística y las matemáticas <strong>en</strong> química analítica, conocido este<br />

uso con el nombre de Quimiometría, ti<strong>en</strong>e dos objetivos básicos. El primero de<br />

ellos es usar la parte deductiva del método ci<strong>en</strong>tífico (a partir del conocimi<strong>en</strong>to se<br />

llega a los datos) para el diseño de experim<strong>en</strong>tos [163-167]; el segundo objetivo<br />

es extraer la máxima información (bio)química, a priori oculta, de los sistemas <strong>en</strong><br />

estudio. Esta información puede ser cuantitativa (sistemas de regresión<br />

multivariante [168-172]) o cualitativa (difer<strong>en</strong>ciación y desarrollo de modelos de<br />

clasificación de objetos [173-176]). Este segundo objetivo usa la parte inductiva<br />

del método ci<strong>en</strong>tífico (desde los datos se llega al conocimi<strong>en</strong>to).<br />

El diseño de experim<strong>en</strong>tos está <strong>en</strong>caminado, por una parte, a la selección<br />

del conjunto de <strong>en</strong>sayos necesarios para desarrollar un determinado modelo. Por<br />

otro lado, el diseño de experim<strong>en</strong>tos está dedicado al estudio de las variables que<br />

influy<strong>en</strong> <strong>en</strong> un proceso analítico o <strong>en</strong> la síntesis de un producto.<br />

Los procesos analíticos están afectados por una serie de variables como<br />

pued<strong>en</strong> ser el pH, la temperatura, el caudal <strong>en</strong> un sistema dinámico, etc. La<br />

puesta a punto de un nuevo método analítico debe implicar la mejora de las<br />

características analíticas de los métodos oficiales, de refer<strong>en</strong>cia o conv<strong>en</strong>cionales.<br />

Una de estas características es la s<strong>en</strong>sibilidad, con el fin de llegar a discernir<br />

<strong>en</strong>tre conc<strong>en</strong>traciones de analito lo más pequeñas posible. Por lo tanto, hay que<br />

optimizar el método para ver qué variables afectan a la señal analítica y la<br />

dim<strong>en</strong>sión o peso de esta influ<strong>en</strong>cia.<br />

Además, algunas de las variables a optimizar pued<strong>en</strong> estar relacionadas<br />

con la propiedades analíticas productivas (rapidez, coste, etc.) y afectar<br />

61


Manuel Urbano Cuadrado Tesis Doctoral<br />

negativam<strong>en</strong>te a la señal, por lo que el cálculo de cómo influy<strong>en</strong> es de vital<br />

importancia para el desarrollo del método.<br />

Las técnicas de análisis actuales se caracterizan por proporcionar mucha<br />

información. Por ejemplo, los equipos espectroscópicos multicanal permit<strong>en</strong> la<br />

obt<strong>en</strong>ción de datos correspondi<strong>en</strong>tes a ci<strong>en</strong>tos e incluso miles de variables <strong>en</strong><br />

unos minutos. Esta información no sería útil sin el uso de los difer<strong>en</strong>tes métodos<br />

multivariantes propuestos <strong>en</strong> la bibliografía. Así, observar las posibles t<strong>en</strong>d<strong>en</strong>cias<br />

de los datos o utilizarlos para determinar un parámetro dado requiere el uso de las<br />

herrami<strong>en</strong>tas multivariantes para clasificar o para cuantificar, respectivam<strong>en</strong>te.<br />

5.1 Diseño experim<strong>en</strong>tal para la optimización de procesos analíticos<br />

5.1.1 Factores experim<strong>en</strong>tales y respuesta<br />

Las variables o condiciones experim<strong>en</strong>tales que afectan a un determinado<br />

proceso o producto recib<strong>en</strong> el nombre de factores <strong>en</strong> la terminología del diseño<br />

de experim<strong>en</strong>tos. Los factores se clasifican <strong>en</strong> cualitativos (por ejemplo, el uso de<br />

un determinado reactivo) y cuantitativos (por ejemplo, la presión <strong>en</strong> un proceso<br />

de extracción con un fluido supercrítico). Los difer<strong>en</strong>tes valores que pued<strong>en</strong><br />

tomar los factores se d<strong>en</strong>ominan niveles.<br />

Las características del producto o proceso que queremos optimizar se<br />

llaman respuestas. G<strong>en</strong>eralm<strong>en</strong>te, cada respuesta se modela separadam<strong>en</strong>te,<br />

aunque muchas veces los valores óptimos para las respuestas están <strong>en</strong> conflicto.<br />

Exist<strong>en</strong> métodos de múltiple criterio para resolver estos conflictos [177-179].<br />

5.1.2 Diseño de experim<strong>en</strong>tos y análisis multivariante<br />

En el diseño de experim<strong>en</strong>tos se utiliza el análisis multivariante debido a que una<br />

aproximación univariante puede conducir a errores. Se va a suponer un proceso<br />

analítico <strong>en</strong> el que influy<strong>en</strong> dos factores, x1 y x2. Con un <strong>en</strong>foque univariante se<br />

dejaría un factor fijo, por ejemplo, x2, y se irían variando los valores para x1 hasta<br />

<strong>en</strong>contrar el óptimo de este factor. Se estudiaría después el factor x2 dejando fijo<br />

62


Introducción<br />

x1 <strong>en</strong> el valor óptimo. Cuando se obtuviera el valor óptimo para x2 la<br />

optimización habría finalizado. Este método sólo es correcto cuando los factores<br />

no interaccionan <strong>en</strong>tre sí. Además, si el número de factores es muy elevado, el<br />

proceso es largo y <strong>en</strong>gorroso. Por tanto, el procedimi<strong>en</strong>to más correcto es recurrir<br />

a métodos secu<strong>en</strong>ciales o simultáneos, que se com<strong>en</strong>tan más adelante.<br />

5.1.3 Estrategias <strong>en</strong> el diseño de experim<strong>en</strong>tos<br />

Los primeros pasos a seguir <strong>en</strong> el diseño de experim<strong>en</strong>tos son la selección de los<br />

factores y las respuestas. Aunque se pued<strong>en</strong> conocer de antemano los factores<br />

que influy<strong>en</strong> <strong>en</strong> la respuesta, no es una información con la que se cu<strong>en</strong>te<br />

normalm<strong>en</strong>te como punto de partida. Por lo tanto, hay que t<strong>en</strong>er <strong>en</strong> cu<strong>en</strong>ta todos<br />

los posibles factores y hacer un scre<strong>en</strong>ing con el objetivo de descartar los<br />

factores no influy<strong>en</strong>tes.<br />

Antes del scre<strong>en</strong>ing se define el dominio experim<strong>en</strong>tal, <strong>en</strong> el que se<br />

establec<strong>en</strong> los valores extremos para cada factor. Normalm<strong>en</strong>te se emplea el<br />

diseño de dos niveles, aunque exist<strong>en</strong> otras aproximaciones; por ejemplo, el<br />

diseño de Doehlert [180].<br />

Tras el scre<strong>en</strong>ing, y una vez elegidos los factores, las respuestas y los<br />

niveles, el sigui<strong>en</strong>te paso es la selección de la metodología de diseño a utilizar<br />

<strong>en</strong>tre dos grandes grupos: el secu<strong>en</strong>cial o el simultáneo.<br />

5.1.4 Método secu<strong>en</strong>cial Simplex<br />

El diseño secu<strong>en</strong>cial está basado <strong>en</strong> la realización de pocos experim<strong>en</strong>tos que se<br />

usan para determinar las condiciones del próximo experim<strong>en</strong>to. El diseño más<br />

empleado de este tipo es el método Simplex [181,182]. Para explicar brevem<strong>en</strong>te<br />

<strong>en</strong> qué consiste, se supon<strong>en</strong> de nuevo dos factores, x1 y x2. Se empieza con la<br />

realización de tres experim<strong>en</strong>tos situados <strong>en</strong> un triángulo <strong>en</strong> el plano formado por<br />

x1 y x2. El experim<strong>en</strong>to que dé peor respuesta indica que la dirección ti<strong>en</strong>e que ser<br />

la contraria a la que lleva a este vértice del triángulo. Por tanto, se construye un<br />

63


Manuel Urbano Cuadrado Tesis Doctoral<br />

nuevo triángulo formado por los dos vértices anteriores que dieron las mejores<br />

respuestas y el vértice opuesto al que proporcionó el peor resultado.<br />

El proceso se continúa hasta que la inclusión de un nuevo experim<strong>en</strong>to<br />

no mejora los resultados obt<strong>en</strong>idos. El principal inconv<strong>en</strong>i<strong>en</strong>te de este método<br />

radica <strong>en</strong> la dep<strong>en</strong>d<strong>en</strong>cia de la calidad del diseño (superficie de respuesta) de la<br />

ruta escogida para alcanzar el máximo, por lo que pres<strong>en</strong>ta connotaciones<br />

azarosas.<br />

5.1.5 Métodos simultáneos<br />

Entre los diseños simultáneos, también llamados diseños factoriales, se pued<strong>en</strong><br />

distinguir dos tipos con distinta filosofía de trabajo:<br />

a) Diseños <strong>en</strong> los que los objetivos son establecer/conocer qué factores influy<strong>en</strong><br />

y <strong>en</strong> qué magnitud lo hac<strong>en</strong>. El diseño más usado d<strong>en</strong>tro de este tipo es el<br />

d<strong>en</strong>ominado diseño factorial completo de dos niveles, <strong>en</strong> el que para cada<br />

factor se consideran dos niveles. Este método permite calcular el efecto de<br />

los factores y sus interacciones. El número de experim<strong>en</strong>tos a llevar a cabo es<br />

2 n , donde n es el número de factores.<br />

Una modalidad de este tipo de diseños son los d<strong>en</strong>ominados diseños<br />

factoriales fraccionarios, <strong>en</strong> los que sólo se lleva a cabo una fracción de los<br />

experim<strong>en</strong>tos (1/2, 1/4, 1/8, etc.). Aunque la información obt<strong>en</strong>ida es m<strong>en</strong>or,<br />

su uso es práctico cuando el número de factores es muy alto.<br />

En los casos <strong>en</strong> los que las interacciones <strong>en</strong>tre factores no influy<strong>en</strong> y<br />

sólo se quiere conocer qué factores son relevantes, se emplean los diseños<br />

factoriales fraccionarios saturados [183] o los de Plackett-Burman [184].<br />

Son útiles para procesos de scre<strong>en</strong>ing de factores. También se han empleado<br />

<strong>en</strong> el estudio de la robustez de métodos analíticos [185].<br />

b) Diseños <strong>en</strong> los que la importancia radica <strong>en</strong> la obt<strong>en</strong>ción de la función de<br />

respuesta <strong>en</strong> el punto óptimo. Las funciones de respuesta para dos factores y<br />

una única respuesta vi<strong>en</strong><strong>en</strong> dadas por las sigui<strong>en</strong>tes expresiones:<br />

64


y = b0 + b1x1 + b2x2 + b12x1x2 (1)<br />

y = b0 + b1x1 + b2x2 + b11x1 2 + b22x2 2 + b12x1x2 (2)<br />

En estas ecuaciones se pued<strong>en</strong> observar:<br />

Introducción<br />

• Un término indep<strong>en</strong>di<strong>en</strong>te b0, que será igual al valor de y cuando x1 y<br />

x2 son cero. La mayoría de las veces se suele trabajar con valores<br />

codificados donde se le dan los valores -1 y +1 a los extremos elegidos<br />

para cada factor, por lo que 0 corresponde al valor intermedio del<br />

rango <strong>en</strong>tre -1 y +1. En estos casos, b0 es el valor de y <strong>en</strong> el c<strong>en</strong>troide.<br />

• Términos de primer ord<strong>en</strong> <strong>en</strong> la ecuación (1) y (2), y de segundo ord<strong>en</strong><br />

<strong>en</strong> la ecuación (2) para x1 y x2.<br />

• Los términos de la interacción <strong>en</strong>te x1 y x2 (último sumando de las<br />

ecuaciones (1) y (2)).<br />

Cuando se usa la ecuación (2) se consideran tres niveles para cada factor con<br />

el fin de t<strong>en</strong>er <strong>en</strong> cu<strong>en</strong>ta los términos cuadráticos de esta ecuación. El modelo<br />

más empleado de este tipo es el diseño c<strong>en</strong>tral compuesto, que ti<strong>en</strong>e <strong>en</strong><br />

cu<strong>en</strong>ta dos niveles y varias réplicas de los puntos c<strong>en</strong>trales.<br />

5.2 La quimiometría <strong>en</strong> el tratami<strong>en</strong>to de la información espectroscópica<br />

5.2.1 La necesidad del análisis multivariante <strong>en</strong> espectroscopía<br />

Las técnicas espectroscópicas han experim<strong>en</strong>tado un gran avance <strong>en</strong> los últimos<br />

años que ha dado lugar a nuevos métodos analíticos. Una de las zonas espectrales<br />

más utilizadas ha sido la del infrarrojo, surgi<strong>en</strong>do la tecnología NIRS (de las<br />

siglas <strong>en</strong> inglés Near InfraRed Spectroscopy), que ha sido incorporada <strong>en</strong> el<br />

control de calidad <strong>en</strong> muchos campos, especialm<strong>en</strong>te <strong>en</strong> las áreas<br />

agroalim<strong>en</strong>taria, farmacéutica, química, petroquímica y ambi<strong>en</strong>tal [186-188].<br />

Otra técnica también muy ext<strong>en</strong>dida por las mismas razones es la relacionada con<br />

65


Manuel Urbano Cuadrado Tesis Doctoral<br />

otras zonas del espectro IR, además de técnicas como la Resonancia Magnética<br />

Nuclear, la Espectroscopía Raman, la Espectrometría de Masas, etc. En una<br />

parte de la investigación recogida <strong>en</strong> esta Memoria se han utilizado los datos<br />

correspondi<strong>en</strong>tes a la absorción <strong>en</strong> las zonas ultravioleta, visible, infrarrojo<br />

cercano e infrarrojo medio.<br />

Puesto que la muestra se analiza ap<strong>en</strong>as sin tratar, los espectros recogidos<br />

son muy poco característicos y las bandas correspond<strong>en</strong> a la absorción de un<br />

variado número de compon<strong>en</strong>tes. La aplicación de la ley de Lambert-Beer a estos<br />

espectros es imposible debido a la gran cantidad de datos, la colinealidad de éstos<br />

y, por tanto, su redundancia. Una aproximación univariante carece de s<strong>en</strong>tido <strong>en</strong><br />

este tipo de espectros [189,190]. Además, los datos espectroscópicos están<br />

afectados por diversos tipos de error, <strong>en</strong>tre los que destacan el ruido intrínseco<br />

del instrum<strong>en</strong>to y los relacionados con la heterog<strong>en</strong>eidad, textura, estabilidad,<br />

etc., de las muestras a analizar.<br />

Por todo lo expuesto se hace necesario el uso de diversas herrami<strong>en</strong>tas<br />

quimiométricas basadas todas ellas <strong>en</strong> el Análisis Multivariante, que abarca los<br />

difer<strong>en</strong>tes métodos estadísticos, matemáticos, o gráficos para el análisis de datos<br />

que usan de forma simultánea varias variables [191,192]. En el caso de las<br />

técnicas espectroscópicas, el análisis multivariante ti<strong>en</strong>e dos objetivos: 1) la<br />

determinación de una o varias propiedades físico-químicas a partir de múltiples<br />

variables espectrales (valores de absorbancia a difer<strong>en</strong>tes longitudes de onda); 2)<br />

la difer<strong>en</strong>ciación o la clasificación de grupos de muestras con características<br />

comunes a partir de la información espectral.<br />

5.2.2 Preprocesami<strong>en</strong>to de los datos espectrales<br />

Uno de los aspectos que más interfiere <strong>en</strong> la información espectral es la<br />

dispersión de la radiación incid<strong>en</strong>te (conocida <strong>en</strong> la bibliografía espectroscópica<br />

como Efecto Scatter) [193-196]. Es un f<strong>en</strong>óm<strong>en</strong>o físico provocado por la<br />

interacción no relacionada con f<strong>en</strong>óm<strong>en</strong>os de absorción <strong>en</strong>tre la radiación y la<br />

muestra, sino con la dispersión causada por el tamaño y la geometría de las<br />

66


Introducción<br />

partículas que exist<strong>en</strong> <strong>en</strong> la muestra. También intervi<strong>en</strong><strong>en</strong> <strong>en</strong> su orig<strong>en</strong> los<br />

cambios <strong>en</strong> el índice de refracción.<br />

Con el fin de minimizar el efecto de dispersión scatter se ha desarrollado<br />

una serie de soluciones para el preprocesami<strong>en</strong>to de los datos espectroscópicos.<br />

Entre ellas se <strong>en</strong>cu<strong>en</strong>tran los tratami<strong>en</strong>tos MSC (de las siglas <strong>en</strong> inglés de<br />

Multiplicative Scatter Correction), SNV (Standard Normal Variate), DTR<br />

(Detr<strong>en</strong>ding) y OSC (Orthogonal Signal Correction) [197,193].<br />

Otro tipo de transformación de los datos espectroscópicos es el<br />

tratami<strong>en</strong>to de derivadas, que ti<strong>en</strong>e el objetivo de disminuir tanto la<br />

superposición de picos, como la variación de la línea de base del espectro (esto<br />

último aum<strong>en</strong>ta la relación señal/ruido). También son numerosos los métodos de<br />

derivadas, <strong>en</strong>tre los que se destacan el de Savitzky-Golay y el de las difer<strong>en</strong>cias<br />

finitas, y las transformadas de Fourier [198,199,190].<br />

La normalización y escalado de los datos también son métodos de<br />

preprocesami<strong>en</strong>to empleados <strong>en</strong> espectroscopía con el objetivo de igualar la<br />

influ<strong>en</strong>cia de todas las variables que compon<strong>en</strong> el espectro.<br />

5.3 Análisis cualitativo<br />

En análisis cualitativo los datos espectroscópicos, sometidos o no a un<br />

preprocesami<strong>en</strong>to, se utilizan con el fin de calcular una variable categórica, por<br />

ejemplo, orig<strong>en</strong>, variedad, tipo de proceso, etc. Es decir, la información espectral<br />

se emplea para la clasificación de muestras <strong>en</strong> difer<strong>en</strong>tes grupos at<strong>en</strong>di<strong>en</strong>do a la<br />

similitud de sus espectros respecto a otros de muestras conocidas. Estos métodos<br />

son conocidos con el nombre de Métodos de Reconocimi<strong>en</strong>to de Pautas o<br />

Patrones [54].<br />

Suel<strong>en</strong> distinguirse dos grupos de estos métodos: supervisados y no<br />

supervisados, <strong>en</strong> función de la información del agrupami<strong>en</strong>to de datos de que se<br />

dispone a priori. En los métodos no supervisados no se dispone de información<br />

de las muestras analizadas o, si se dispone, es escasa. El objetivo, por tanto, es<br />

67


Manuel Urbano Cuadrado Tesis Doctoral<br />

poner de manifiesto t<strong>en</strong>d<strong>en</strong>cias que están ocultas <strong>en</strong> la matriz de datos formada<br />

por los espectros de las muestras. Son métodos que se aplican <strong>en</strong> las primeras<br />

etapas de la investigación de la clasificación de muestras y, según la<br />

discriminación alcanzada por éstos, la posterior fase de clasificación conducirá a<br />

mejores o peores resultados. Los métodos más frecu<strong>en</strong>tes <strong>en</strong> la bibliografía son el<br />

Análisis de Cluster y el Análisis de Compon<strong>en</strong>tes Principales.<br />

Por el contrario, los métodos supervisados sí cu<strong>en</strong>tan con las categorías<br />

exist<strong>en</strong>tes <strong>en</strong> el colectivo de muestras, y el objetivo es la síntesis de reglas,<br />

empleando la información de partida de los tipos de muestras para la<br />

clasificación de muestras desconocidas.<br />

En los métodos supervisados se distingue <strong>en</strong>tre métodos discriminantes y<br />

métodos de modelado. El objetivo de los primeros es discriminar <strong>en</strong>tre las<br />

categorías exist<strong>en</strong>tes de forma que una determinada muestra se clasifica d<strong>en</strong>tro<br />

de alguno de los tipos exist<strong>en</strong>tes. Los métodos discriminantes que más se han<br />

empleado son el Análisis Discriminante Lineal (ADL) y su derivado Análisis<br />

Discriminante Cuadrático (ADC). También son importantes el método de los<br />

vecinos más cercanos, más conocido como KNN (de las siglas <strong>en</strong> inglés de knearest<br />

neighbour), los métodos de d<strong>en</strong>sidad y los basados <strong>en</strong> el análisis<br />

discriminante mediante regresión. Este último se basa <strong>en</strong> una calibración donde<br />

las variables de salida son discretas y toman el valor de la clase a la que<br />

correspond<strong>en</strong>.<br />

En los métodos de modelado, a difer<strong>en</strong>cia de los anteriores, se define un<br />

volum<strong>en</strong> de espacio para cada una de las clases, de tal forma que puede haber<br />

muestras que no pert<strong>en</strong>ezcan a ninguna clase. La filosofía de este tipo de métodos<br />

es clasificar según la similitud d<strong>en</strong>tro de una misma clase, y no por<br />

discriminación <strong>en</strong>tre clases. La clasificación de las muestras desconocidas se<br />

basa <strong>en</strong> los valores de distancia a una refer<strong>en</strong>cia distinta según el modelo usado.<br />

Se emplean difer<strong>en</strong>tes tipos de medida de distancia, <strong>en</strong>tre las que se <strong>en</strong>cu<strong>en</strong>tran la<br />

distancia euclidea y la de Mahalanobis [200,201]. El método de modelado más<br />

empleado para la clasificación de muestras según datos espectroscópicos es el<br />

68


Introducción<br />

método SIMCA (de las siglas <strong>en</strong> inglés de Soft Indep<strong>en</strong>d<strong>en</strong>t Modelling of Class<br />

Analogies).<br />

En análisis cualitativo exist<strong>en</strong> difer<strong>en</strong>tes métodos basados <strong>en</strong> la técnica<br />

de redes neuronales. Estos métodos pued<strong>en</strong> ser tanto no supervisados (por<br />

ejemplo, las Redes Kohon<strong>en</strong>), como supervisados (por ejemplo, la máquina de<br />

apr<strong>en</strong>dizaje lineal, más conocida por sus siglas <strong>en</strong> inglés, LLM, de Linear<br />

Learning Machine). Este último se considera uno de los primeros de clasificación<br />

supervisados.<br />

A continuación se expon<strong>en</strong> con mayor detalle los métodos que se han<br />

utilizado <strong>en</strong> la investigación pres<strong>en</strong>tada <strong>en</strong> esta Memoria.<br />

5.3.1 Análisis de clusters<br />

En este grupo se <strong>en</strong>cu<strong>en</strong>tra una serie de métodos que permit<strong>en</strong>, a partir del<br />

cálculo de distancias <strong>en</strong>tre objetos o muestras, agruparlos según la similitud o<br />

difer<strong>en</strong>cia <strong>en</strong>tre ellos. La salida más frecu<strong>en</strong>te de estos métodos suele ser un<br />

d<strong>en</strong>dograma que muestra los agrupami<strong>en</strong>tos de los objetos o muestras. El espacio<br />

multidim<strong>en</strong>sional <strong>en</strong> el que se calculan las distancias es el formado por las m<br />

longitudes de onda, es decir, no se lleva a cabo ninguna reducción de variables<br />

[202, 173].<br />

5.3.2 Análisis de compon<strong>en</strong>tes principales (ACP)<br />

El ACP se define <strong>en</strong> la norma ASTM (1990) [203] como el procedimi<strong>en</strong>to<br />

matemático que se emplea para transformar un conjunto de datos <strong>en</strong> nuevas<br />

variables ortogonales, d<strong>en</strong>ominadas compon<strong>en</strong>tes principales (CPs), si<strong>en</strong>do estas<br />

últimas una combinación lineal de las variables de partida (cada longitud de onda<br />

<strong>en</strong> el caso de las técnicas espectroscópicas). Es decir, <strong>en</strong> el ACP se realiza una<br />

síntesis de nuevas variables, int<strong>en</strong>tando explicar cada una de estas nuevas<br />

variables la máxima variación de los datos. El número de variables finales es<br />

m<strong>en</strong>or que el número de variables de partida, por lo que, junto con algunos<br />

métodos discriminantes, se les d<strong>en</strong>omina métodos de reducción de variables.<br />

69


Manuel Urbano Cuadrado Tesis Doctoral<br />

Exist<strong>en</strong> variados criterios para seleccionar el número de CP a partir del cual el<br />

modelo no aporta más información, es decir, la varianza explicada por dos<br />

compon<strong>en</strong>tes consecutivas es prácticam<strong>en</strong>te la misma.<br />

Tres causas justifican el uso del ACP <strong>en</strong> el tratami<strong>en</strong>to de la información<br />

espectroscópica. La primera es el alto grado de colinealidad pres<strong>en</strong>te <strong>en</strong> el<br />

espacio original de los datos, hecho éste que se elimina con una de las<br />

características de las nuevas variables construidas: son ortogonales, y por lo<br />

tanto, linealm<strong>en</strong>te indep<strong>en</strong>di<strong>en</strong>tes. En segundo lugar, cabe destacar el reducido<br />

número final de variables, si<strong>en</strong>do más fácil la visualización de t<strong>en</strong>d<strong>en</strong>cias de los<br />

datos <strong>en</strong> este espacio que <strong>en</strong> el de partida. En tercer lugar, y relacionado con la<br />

anterior característica, la reducción de variables es clave para el uso de las CP <strong>en</strong><br />

la construcción de modelos, tanto cuantitativos como cualitativos, usando<br />

métodos basados <strong>en</strong> el ACP. De nuevo, el número grande de variables iniciales<br />

supone prácticam<strong>en</strong>te la imposibilidad de llevar a cabo la etapa de calibración o<br />

apr<strong>en</strong>dizaje (<strong>en</strong> términos cuantitativos o cualitativos, respectivam<strong>en</strong>te) por el<br />

número de muestras que se necesitarían.<br />

Se ha com<strong>en</strong>tado que una CP es una combinación lineal de las m<br />

longitudes de onda iniciales, como se observa <strong>en</strong> la sigui<strong>en</strong>te expresión:<br />

70<br />

CPi = ai1 * λ1 + ai2 * λ2 +… + aim * λm (3)<br />

La primera CP es el resultado de la combinación lineal de las longitudes de onda<br />

de forma que ésta explique la máxima variación pres<strong>en</strong>te <strong>en</strong> los datos. La<br />

segunda CP se elige para que explique de nuevo la máxima variabilidad de los<br />

datos, una vez restada la variabilidad explicada por la primera, y con la condición<br />

de ser ortogonal con la primera. Así se procede hasta que no hay difer<strong>en</strong>cia <strong>en</strong>tre<br />

la varianza explicada por dos compon<strong>en</strong>tes consecutivas.<br />

Los coefici<strong>en</strong>tes de las longitudes de onda para cada compon<strong>en</strong>te<br />

principal se d<strong>en</strong>ominan loadings o pesos. Son interesantes los gráficos donde se<br />

repres<strong>en</strong>tan los pesos fr<strong>en</strong>te a las longitudes de onda, ya que se puede deducir a


Introducción<br />

partir de ellos las zonas espectrales que más interesan por su elevado peso <strong>en</strong> una<br />

determinada CP.<br />

Los scores o autovalores son las coord<strong>en</strong>adas de las muestras <strong>en</strong> los<br />

nuevos ejes formados por las CP. Cuando los objetos o muestras se sitúan <strong>en</strong> el<br />

nuevo espacio, d<strong>en</strong>ominado gráfico de scores, existe la posibilidad de distinguir<br />

agrupami<strong>en</strong>tos <strong>en</strong> los objetos, lo que resulta imposible <strong>en</strong> el anterior espacio.<br />

5.3.3 Análisis discriminante lineal (ADL) y análisis discriminante cuadrático<br />

(ADC)<br />

En este grupo, las categorías o clases exist<strong>en</strong>tes <strong>en</strong> el colectivo de apr<strong>en</strong>dizaje se<br />

separan a partir de una combinación lineal de variables que minimiza la<br />

variabilidad d<strong>en</strong>tro de las muestras de una misma clase y la maximiza cuando se<br />

trata de grupos difer<strong>en</strong>tes [204,205]. A partir de estas combinaciones lineales se<br />

g<strong>en</strong>era un número de funciones lineales una unidad m<strong>en</strong>or que el número de<br />

clases. Por lo tanto, y junto con el ACP, también es un método <strong>en</strong> el que se lleva<br />

a cabo una reducción de variables.<br />

Las nuevas funciones, también d<strong>en</strong>ominadas variables lat<strong>en</strong>tes, se<br />

seleccionan t<strong>en</strong>i<strong>en</strong>do <strong>en</strong> cu<strong>en</strong>ta las direcciones con las que se consigue la máxima<br />

separación <strong>en</strong>tre las clases. Ésta es la principal difer<strong>en</strong>cia del análisis<br />

discriminante respecto al ACP, pues <strong>en</strong> este último la obt<strong>en</strong>ción de las CP está<br />

basada <strong>en</strong> la búsqueda de direcciones que expliqu<strong>en</strong> la mayor variabilidad de los<br />

datos, lo que resulta del hecho de que un método es supervisado y el otro no.<br />

Se asume una distribución normal de las variables empleadas y la<br />

igualdad <strong>en</strong>tre las matrices de covarianza, empleando como criterio de<br />

clasificación la distancia de Mahalanobis. El hecho de asumir la igualdad de las<br />

matrices de covarianza puede conducir a errores, ya que no siempre se alcanza la<br />

igualdad, surgi<strong>en</strong>do una variante del ADL. En este tipo de métodos se g<strong>en</strong>eran<br />

funciones cuadráticas, de ahí el nombre de análisis discriminante cuadrático.<br />

71


Manuel Urbano Cuadrado Tesis Doctoral<br />

5.3.4 SIMCA (Soft Indep<strong>en</strong>d<strong>en</strong>t Modelling of Class Analogies)<br />

SIMCA es un método de modelado [206,207] <strong>en</strong> el que se realiza un ACP para<br />

cada una de las clases que se pret<strong>en</strong>de modelar. Exist<strong>en</strong> tres posibilidades a la<br />

hora de clasificar una muestra usando un modelo SIMCA: la muestra no<br />

pert<strong>en</strong>ece a ninguna de las clases que compon<strong>en</strong> el sistema de modelado,<br />

pert<strong>en</strong>ece a una de ellas o, puede pert<strong>en</strong>ecer a dos o más clases. La última opción<br />

se dará siempre que solap<strong>en</strong> dos clases y la muestra a clasificar se ubique <strong>en</strong> la<br />

zona de solapami<strong>en</strong>to.<br />

Hay dos criterios para ubicar una muestra <strong>en</strong> una determinada clase: la<br />

distancia de la muestra al c<strong>en</strong>tro del modelo y la distancia de la muestra al<br />

modelo. En el primer caso, la distancia informa sobre la varianza que queda<br />

explicada por el modelo de una determinada clase cuando la muestra se proyecta<br />

sobre el espacio de compon<strong>en</strong>tes principales de esta clase. En la segunda opción,<br />

informa sobre la varianza que no ha podido explicarse por el modelo,<br />

d<strong>en</strong>ominándose ésta residual.<br />

5.4 Análisis cuantitativo<br />

En esta verti<strong>en</strong>te del análisis multivariante el espectro correspondi<strong>en</strong>te a una<br />

muestra se utiliza para la determinación de sus propiedades físico-químicas. Es<br />

decir, pone de manifiesto la información que conti<strong>en</strong>e el espectro sobre<br />

composición química de la muestra.<br />

Para la determinación de un analito es necesario un proceso de<br />

calibración (la construcción de una función que relacione el espectro con la<br />

conc<strong>en</strong>tración del compuesto o propiedad a determinar). El hecho de emplear las<br />

técnicas multivariantes conlleva el cambio del concepto de calibración. Así, el<br />

proceso de calibración univariante a través del cual se determina un analito<br />

empleando una recta de calibrado que se construye cada cierto tiempo es<br />

difer<strong>en</strong>te al proceso empleado <strong>en</strong> los métodos multivariantes.<br />

72


Introducción<br />

La difer<strong>en</strong>cia más importante es la derivada de la definición de<br />

calibración multivariante, es decir, el desarrollo de un modelo cuantitativo para la<br />

determinación de un conjunto de propiedades (y1, y2, …, yq) a partir de un número<br />

de variables predictoras (x1, x2, …, xp). Desde un punto de vista práctico, esta<br />

difer<strong>en</strong>cia adquiere connotaciones triviales. Así, la principal difer<strong>en</strong>cia pasa a ser<br />

que el objetivo de la calibración <strong>en</strong> tecnologías como NIRS, RMN,<br />

espectroscopía Raman, etc., es la construcción de ecuaciones globales y robustas.<br />

El primero de estos términos hace refer<strong>en</strong>cia a la aplicabilidad de las ecuaciones<br />

a la práctica totalidad de las muestras, mi<strong>en</strong>tras que el segundo indica el<br />

mant<strong>en</strong>imi<strong>en</strong>to de la exactitud y precisión a lo largo del tiempo [208,209].<br />

5.4.1 Métodos de regresión multivariante lineales<br />

Estos métodos se emplean cuando existe una relación lineal <strong>en</strong>tre los datos<br />

espectrales (o su transformación a otro espacio de coord<strong>en</strong>adas, normalm<strong>en</strong>te<br />

reducido) y la conc<strong>en</strong>tración de los analitos <strong>en</strong> las muestras. Los métodos lineales<br />

más empleados son la regresión lineal múltiple, la regresión por compon<strong>en</strong>tes<br />

principales y la regresión mediante mínimos cuadrados parciales, más conocidos<br />

por sus iniciales del inglés MLR, PCR y PLSR, respectivam<strong>en</strong>te [54].<br />

En la MLR el espectro se considera una función de la composición<br />

química de la muestra. Esta consideración hace que la MLR pres<strong>en</strong>te una serie de<br />

inconv<strong>en</strong>i<strong>en</strong>tes que limitan su aplicabilidad al uso de los datos espectroscópicos.<br />

Destacan la dificultad de su aplicación a sistemas complejos como son las<br />

muestras reales (el modelo debe recoger también los interfer<strong>en</strong>tes o los analitos<br />

que no son de interés) y la limitación impuesta por el número de muestras<br />

necesarias para la construcción del modelo, que debe ser como mínimo igual al<br />

de variables.<br />

Por lo arriba expuesto la MLR se lleva a cabo empleando un número<br />

reducido de longitudes de onda seleccionadas mediante un test F, de forma que<br />

sólo se ti<strong>en</strong><strong>en</strong> <strong>en</strong> cu<strong>en</strong>ta aquellas longitudes de onda que pres<strong>en</strong>tan una alta<br />

correlación <strong>en</strong>tre el dato de absorbancia y el analito a determinar. Por estos<br />

73


Manuel Urbano Cuadrado Tesis Doctoral<br />

inconv<strong>en</strong>i<strong>en</strong>tes, además de la utilidad que supone el uso de un método de<br />

reducción de variables para la eliminación de la colinealidad de los datos<br />

espectroscópicos, se recurre a los métodos PCR y PLSR.<br />

Los dos métodos son parecidos <strong>en</strong> cuanto a que ambos construy<strong>en</strong> un<br />

nuevo espacio de variables reducido respecto al espacio inicial formado por todas<br />

las longitudes de onda que conforman el espectro. La difer<strong>en</strong>cia radica <strong>en</strong> la<br />

forma de construcción de las nuevas variables: <strong>en</strong> la PCR, basada <strong>en</strong> el ACP, se<br />

construy<strong>en</strong> de forma que explique la mayor variabilidad de los datos<br />

espectroscópicos; <strong>en</strong> la PLSR, junto a la variabilidad de los datos<br />

espectroscópicos, se ti<strong>en</strong>e <strong>en</strong> cu<strong>en</strong>ta también la variación de los datos químicos<br />

de las muestras usadas para la construcción del modelo. Tanto PCR como PLSR<br />

consideran la composición función del espectro, lo que elimina la limitación de<br />

que el número de muestras ti<strong>en</strong>e que ser mayor que el número de variables,<br />

aunque ya se haya reducido drásticam<strong>en</strong>te el número de estas últimas.<br />

5.4.2 Métodos de regresión multivariante no lineales<br />

Son numerosas las aplicaciones recogidas <strong>en</strong> la bibliografía analítica que versan<br />

sobre la determinación cuantitativa mediante el uso de redes neuronales. Su<br />

interés es capital para los sistemas <strong>en</strong> los que los datos del espectro no ti<strong>en</strong><strong>en</strong> una<br />

relación lineal con los datos químicos y, por tanto, los métodos expuestos<br />

anteriorm<strong>en</strong>te no son adecuados [210].<br />

Son varios los tipos de redes empleados, aunque <strong>en</strong> número de<br />

aplicaciones destaca el tipo MLF, del inglés Multilayer Feed Forward [211,212].<br />

Últimam<strong>en</strong>te está muy ext<strong>en</strong>dido también el uso de las redes RBF, del inglés<br />

Radial Basis Function [213,214]. Son múltiples las posibilidades de desarrollo de<br />

modelos de determinación basados <strong>en</strong> redes según el tipo empleado, el algoritmo<br />

de apr<strong>en</strong>dizaje usado, etc.<br />

74


5.5 Metodología g<strong>en</strong>eral <strong>en</strong> el desarrollo de métodos de determinación<br />

Introducción<br />

Son dos las etapas g<strong>en</strong>erales a considerar <strong>en</strong> el desarrollo de un método de<br />

determinación, ya sea cualitativo o cuantitativo: la etapa de calibración o<br />

apr<strong>en</strong>dizaje (el primer término se usa <strong>en</strong> análisis cuantitativo y el segundo <strong>en</strong><br />

cualitativo) y la etapa de validación [54,208,209]. En la primera se construy<strong>en</strong> las<br />

ecuaciones o modelos (nuevam<strong>en</strong>te la difer<strong>en</strong>te d<strong>en</strong>ominación distingue el tipo<br />

de análisis) y <strong>en</strong> la segunda se procede a la verificación de las propiedades<br />

requeridas para estas ecuaciones o modelos. La forma de llevar a cabo las dos<br />

etapas es difer<strong>en</strong>te, aunque ti<strong>en</strong><strong>en</strong> puntos comunes, según el análisis sea<br />

cuantitativo o cualitativo.<br />

5.5.1 Selección de los grupos de apr<strong>en</strong>dizaje o calibración y de validación<br />

En el análisis cuantitativo ti<strong>en</strong>e una importancia clave la selección del grupo de<br />

calibración, ya que el que se cumpla o no el objetivo de construir ecuaciones<br />

globales dep<strong>en</strong>de de la repres<strong>en</strong>tatividad (una de las dos propiedades analíticas<br />

supremas) de las muestras empleadas.<br />

El número de muestras <strong>en</strong> la calibración ti<strong>en</strong>e que ser elevado para<br />

aum<strong>en</strong>tar la capacidad de determinación de las ecuaciones. La obt<strong>en</strong>ción de los<br />

datos químicos de refer<strong>en</strong>cia conlleva la mayoría de las veces métodos l<strong>en</strong>tos y<br />

costosos (de ahí el interés de su sustitución por métodos rápidos basados <strong>en</strong> la<br />

espectroscopía y <strong>en</strong> el análisis multivariante). Este hecho limita el número de las<br />

muestras empleadas <strong>en</strong> la fase de calibración.<br />

Más importante incluso que un número elevado de muestras es la<br />

repres<strong>en</strong>tatividad de éstas. Así, es necesario recoger la variabilidad química<br />

exist<strong>en</strong>te <strong>en</strong> las muestras y todas las fu<strong>en</strong>tes de variación <strong>en</strong> el análisis de<br />

muestras futuras (variaciones <strong>en</strong> la forma y ciclos de producción, proced<strong>en</strong>cia de<br />

las muestras, etc.) [215-217]. Son numerosos los métodos propuestos para<br />

seleccionar el conjunto de calibración, estando la mayoría basados <strong>en</strong> un análisis<br />

75


Manuel Urbano Cuadrado Tesis Doctoral<br />

de compon<strong>en</strong>tes principales seguido del cálculo, g<strong>en</strong>eralm<strong>en</strong>te, de la distancia de<br />

Mahalanobis.<br />

En el análisis cualitativo los criterios de selección del conjunto de<br />

apr<strong>en</strong>dizaje varían ligeram<strong>en</strong>te, si<strong>en</strong>do la repres<strong>en</strong>tatividad de las muestras de<br />

nuevo la clave para la fiabilidad de los modelos a construir. Como existe una<br />

serie de categorías, las muestras de cada tipo deb<strong>en</strong> de estar <strong>en</strong> una proporción<br />

homogénea, cubri<strong>en</strong>do la máxima variabilidad d<strong>en</strong>tro de una misma clase.<br />

5.5.2 Detección de anómalos espectrales y anómalos químicos<br />

En el desarrollo de los modelos se suele observar la exist<strong>en</strong>cia de una serie de<br />

muestras que se difer<strong>en</strong>cian del resto debido a anomalías de la información tanto<br />

espectral como química. Estas anomalías reduc<strong>en</strong> la capacidad de los modelos,<br />

por lo que se procede a una etapa de estudio de los d<strong>en</strong>ominados outliers<br />

[218,219,189,191,192,198].<br />

Las anomalías espectrales se pued<strong>en</strong> dar a una determinada longitud de<br />

onda, a varias, o <strong>en</strong> todo el espectro. Para su detección existe, por un lado, una<br />

serie de métodos basados <strong>en</strong> el cálculo de distancias <strong>en</strong> espacios n-dim<strong>en</strong>sionales,<br />

como pued<strong>en</strong> ser la de Mahalanobis o el estadístico leverage. Por otra parte<br />

exist<strong>en</strong> métodos que se basan <strong>en</strong> el cálculo de residuales <strong>en</strong> los datos<br />

espectroscópicos, es decir, espectros que pres<strong>en</strong>tan una variabilidad significativa<br />

que no explica el modelo propuesto. El espacio n-dim<strong>en</strong>sional usado suele ser el<br />

derivado del ACP.<br />

Las anomalías químicas se dan cuando algunas muestras exhib<strong>en</strong><br />

difer<strong>en</strong>cias significativas <strong>en</strong> los datos de composición respecto al resto del<br />

conjunto de calibración. El dato difer<strong>en</strong>te puede ser el aportado por el método de<br />

refer<strong>en</strong>cia o bi<strong>en</strong> por la ecuación de calibración. Por tanto, es un tipo de<br />

anómalos que se da sólo <strong>en</strong> el análisis cuantitativo. La detección de los anómalos<br />

químicos se lleva a cabo, principalm<strong>en</strong>te, mediante el cálculo de residuales <strong>en</strong> los<br />

datos de composición. El test T, que está basado <strong>en</strong> la difer<strong>en</strong>cia <strong>en</strong>tre el valor de<br />

76


Introducción<br />

refer<strong>en</strong>cia y el valor estimado, además de la dispersión de los datos, es el más<br />

empleado para la detección de los outliers químicos.<br />

Una vez detectados los anómalos se procede a un estudio de las causas<br />

de la desviación que pres<strong>en</strong>tan, int<strong>en</strong>tando repetir el análisis de refer<strong>en</strong>cia o el<br />

espectral siempre que sea posible.<br />

5.5.3 La etapa de calibración o apr<strong>en</strong>dizaje<br />

Una vez eliminada la influ<strong>en</strong>cia de los outliers <strong>en</strong> el colectivo de calibración o<br />

apr<strong>en</strong>dizaje se realiza la etapa correspondi<strong>en</strong>te (calibración o apr<strong>en</strong>dizaje). Si el<br />

análisis es cuantitativo la calibración puede evaluarse internam<strong>en</strong>te mediante el<br />

coefici<strong>en</strong>te de determinación y el error estándar obt<strong>en</strong>ido <strong>en</strong> la calibración. Otros<br />

parámetros de la correlación <strong>en</strong>tre el método de refer<strong>en</strong>cia y el método<br />

espectroscópico son la p<strong>en</strong>di<strong>en</strong>te y la ord<strong>en</strong>ada <strong>en</strong> el orig<strong>en</strong>, pero se aplican más<br />

<strong>en</strong> la etapa posterior de validación.<br />

En análisis cualitativo se establec<strong>en</strong> las reglas de clasificación, no<br />

obt<strong>en</strong>iéndose <strong>en</strong> esta etapa estadísticos que indiqu<strong>en</strong> la fiabilidad de las reglas.<br />

La etapa posterior de validación sí proporcionará los parámetros apropiados para<br />

la evaluación de las reglas. De todas formas, el realizar un análisis exploratorio<br />

(ACP y análisis de clusters) antes de la construcción de las reglas da una idea<br />

g<strong>en</strong>eral sobre las características de los futuros modelos.<br />

5.5.4 La etapa de validación <strong>en</strong> análisis cuantitativo<br />

En la etapa de validación se mide la capacidad de predicción de los modelos<br />

construidos mediante difer<strong>en</strong>tes criterios estadísticos basados <strong>en</strong> la difer<strong>en</strong>cia<br />

<strong>en</strong>tre los valores de refer<strong>en</strong>cia y los valores estimados por los métodos<br />

espectroscópicos.<br />

Para ello se emplea un conjunto de muestras que, con la excepción de la<br />

validación cruzada, está formado por muestras que no han interv<strong>en</strong>ido <strong>en</strong> la<br />

anterior etapa de calibración, d<strong>en</strong>ominándose a éste, conjunto de validación.<br />

77


Manuel Urbano Cuadrado Tesis Doctoral<br />

La modalidad de validación cruzada fue descrita por Stone <strong>en</strong> 1974<br />

[220], y es de gran utilidad <strong>en</strong> los casos <strong>en</strong> que el número de muestras de las que<br />

se posee información química es reducido. Para paliar este inconv<strong>en</strong>i<strong>en</strong>te se<br />

forma un conjunto de calibrado del que se extrae un pequeño subconjunto de<br />

muestras que no van a interv<strong>en</strong>ir <strong>en</strong> la calibración y sí <strong>en</strong> la validación del<br />

modelo. Este proceso se repite hasta que todas las muestras que forman el<br />

conjunto global de calibración se han utilizado una vez para la validación. El<br />

modelo final es la media de los submodelos formados <strong>en</strong> cada iteración.<br />

Las propiedades analíticas exactitud y precisión son los indicadores<br />

empleados para la evaluación del error y la capacidad de determinación del<br />

nuevo método. En métodos cuantitativos, el coefici<strong>en</strong>te y el error de la<br />

determinación, y la p<strong>en</strong>di<strong>en</strong>te y la ord<strong>en</strong>ada <strong>en</strong> el orig<strong>en</strong> de la correlación <strong>en</strong>tre el<br />

método de refer<strong>en</strong>cia y el método espectroscópico son los parámetros estadísticos<br />

usados <strong>en</strong> el estudio de la exactitud y precisión del método.<br />

El Error Típico de la Calibración (ETC) es un estimador usado <strong>en</strong> la<br />

propia calibración, por lo que suele ser sobrestimado respecto al Error Típico de<br />

la Predicción (ETP), ya que éste ti<strong>en</strong>e <strong>en</strong> cu<strong>en</strong>ta muestras no usadas <strong>en</strong> la etapa<br />

de calibración, por lo que es mucho más útil que el ETC. Si se trabaja con<br />

validación cruzada, el parámetro se d<strong>en</strong>omina Error Típico de la Validación<br />

Cruzada (ETVC) [189,192,209,219].<br />

El ETP puede dividirse <strong>en</strong> dos partes: el error aleatorio o no explicado, y<br />

el error sistemático o sesgo [221,54]; lo que puede observarse <strong>en</strong> la conocida<br />

fórmula de partición de la varianza del error:<br />

78<br />

ETP 2 = sesgo 2 + ETP(C) 2 (4)<br />

Donde el ETP(C) informa sobre los errores aleatorios. Algunos autores afirman<br />

que el ETP repres<strong>en</strong>ta la exactitud de una ecuación, mi<strong>en</strong>tras que el ETP(C)<br />

evalúa la precisión [189]. En la literatura sobre calibración multivariante no hay<br />

un uso constante de la d<strong>en</strong>ominación de estos estadísticos, d<strong>en</strong>ominando algunos


Introducción<br />

autores y algunos programas informáticos (por ejemplo el Unscrambler) ETP(C)<br />

al ETP.<br />

Otros autores c<strong>en</strong>tran el interés del ETP <strong>en</strong> la influ<strong>en</strong>cia de la calidad del<br />

dato de refer<strong>en</strong>cia [222]. Así, el ETP se expresa de la sigui<strong>en</strong>te forma:<br />

ETP 2 = ETL 2 + ETEsp 2 + ETModelo 2 (5)<br />

Donde el ETL es el error típico del método de refer<strong>en</strong>cia, ETEsp es el error típico<br />

debido a la medida espectral, y ETModelo es el error introducido por el método<br />

quimiométrico. De los tres, y gracias a las mejoras alcanzadas <strong>en</strong> las técnicas<br />

espectrales y <strong>en</strong> los métodos quimiométricos, es el error asociado al método<br />

analítico de refer<strong>en</strong>cia el que ti<strong>en</strong>e un mayor peso <strong>en</strong> la fórmula anterior.<br />

Se propon<strong>en</strong> difer<strong>en</strong>tes formas de evaluar y comparar el coefici<strong>en</strong>te de<br />

determinación y el ETP <strong>en</strong> el desarrollo de una aplicación cuantitativa basada <strong>en</strong><br />

datos espectroscópicos, la mayoría de las veces datos NIR.<br />

La p<strong>en</strong>di<strong>en</strong>te y la ord<strong>en</strong>ada <strong>en</strong> el orig<strong>en</strong> de la recta de correlación <strong>en</strong>tre el<br />

método espectroscópico y el método de refer<strong>en</strong>cia también son dos parámetros<br />

importantes para la visualización de errores sistemáticos. La p<strong>en</strong>di<strong>en</strong>te ti<strong>en</strong>e que<br />

ser igual a uno y la ord<strong>en</strong>ada ti<strong>en</strong>e que ser igual a cero para una perfecta<br />

correlación <strong>en</strong>tre los métodos. Obviam<strong>en</strong>te éste es un caso ideal, si<strong>en</strong>do necesaria<br />

la realización de un test de hipótesis para ver si son estadísticam<strong>en</strong>te igual a uno<br />

y a cero. Algunas organizaciones han redactado un protocolo para la validación<br />

de nuevos métodos de análisis fr<strong>en</strong>te a los de refer<strong>en</strong>cia u oficiales. Estos<br />

protocolos suel<strong>en</strong> recoger la realización del test T para difer<strong>en</strong>tes intervalos de<br />

confianza y grados de libertad. En la investigación recogida <strong>en</strong> esta Memoria se<br />

ha utilizado el protocolo propuesto por la Oficina Internacional de la Viña y del<br />

Vino (OIV) [223], ya que los métodos desarrollados correspond<strong>en</strong> al campo<br />

<strong>en</strong>ológico.<br />

79


Manuel Urbano Cuadrado Tesis Doctoral<br />

5.5.5 La etapa de validación <strong>en</strong> el análisis cualitativo<br />

En la validación de una aplicación cualitativa el error es el principal indicador de<br />

la fiabilidad [224]. El error <strong>en</strong> este caso se calcula de una forma mucho más<br />

simple, ya que se atribuye al porc<strong>en</strong>taje de muestras clasificadas de forma<br />

incorrecta. El proceso de validación puede ser externo (con muestras que no han<br />

participado <strong>en</strong> el establecimi<strong>en</strong>to de las reglas de clasificación) o llevarse a cabo<br />

mediante validación cruzada.<br />

Cuando se trata de un método de modelado <strong>en</strong> el que las muestras no<br />

ti<strong>en</strong><strong>en</strong> forzosam<strong>en</strong>te por qué pert<strong>en</strong>ecer a una clase, este estadístico ti<strong>en</strong>e que ser<br />

modificado para adaptarlo al nuevo modelo. Surg<strong>en</strong> los conceptos de falsos<br />

positivos y falsos negativos. Los primeros correspond<strong>en</strong> a aquellas muestras que<br />

se clasifican d<strong>en</strong>tro de una clase sin pert<strong>en</strong>ecer a ella, mi<strong>en</strong>tras que los falsos<br />

negativos son las muestras que no se clasifican <strong>en</strong> sus respectivas clases.<br />

Varios autores propon<strong>en</strong> estrategias para el desarrollo y evaluación de<br />

modelos cualitativos [189,207].<br />

6. Química computacional: índices de similitud y huellas<br />

80<br />

digitales<br />

La química computacional <strong>en</strong>globa una serie de métodos matemáticos y<br />

estadísticos, implantados <strong>en</strong> el ord<strong>en</strong>ador mediante algoritmos, que se emplean<br />

<strong>en</strong> diversas áreas de la química, la mayoría de carácter teórico. Entre estas áreas<br />

destacan la mecánica cuántica, la determinación estructural, y el estudio de<br />

reacciones químicas [225,226].<br />

El campo de aplicación se ext<strong>en</strong>dió ya desde su creación, abarcando<br />

áreas de índole más práctica como pued<strong>en</strong> ser la espectroscopía, la química<br />

analítica (métodos de regresión y de reconocimi<strong>en</strong>to de patrones), y la química<br />

farmacéutica (QSAR, de las siglas Quantitative Structure-Activity Relationships,<br />

y química combinatoria) [227-232].


Introducción<br />

Los métodos y herrami<strong>en</strong>tas utilizados <strong>en</strong> la química computacional son<br />

de muy variada naturaleza. Por un lado se emplean las herrami<strong>en</strong>tas y métodos<br />

propiam<strong>en</strong>te informáticos, como son las bases de datos, la lógica difusa, la teoría<br />

de la información, el hardware, etc.; por otro lado es necesario el desarrollo de<br />

utilidades algorítmicas que implantan una serie de métodos matemáticos y<br />

estadísticos con varios fines. De éstos destacan el cálculo de descriptores<br />

moleculares, los métodos de regresión (esta parte es quimiométrica pues se<br />

suel<strong>en</strong> usar regresiones PLS), el cálculo de similitudes, etc.<br />

6.1 Aplicaciones de la química computacional<br />

Especial relevancia está adquiri<strong>en</strong>do hoy <strong>en</strong> día el diseño de fármacos por<br />

ord<strong>en</strong>ador, que ha convertido la química computacional <strong>en</strong> una de las<br />

herrami<strong>en</strong>tas clave <strong>en</strong> la industria farmacéutica [233-236]. Los métodos<br />

computacionales han elevado el papel de la informática <strong>en</strong> este sector, dejando de<br />

lado el concepto de almac<strong>en</strong>ami<strong>en</strong>to de los compuestos moleculares que poseían<br />

las bases de datos y b<strong>en</strong>eficiándose de las técnicas de minería de datos (data<br />

mining). Estas últimas permit<strong>en</strong> obt<strong>en</strong>er compuestos de una base de datos<br />

mediante consultas cuyo criterio se c<strong>en</strong>tra <strong>en</strong> la actividad biológica de un<br />

determinado tipo de fármacos. Así, se pued<strong>en</strong> obt<strong>en</strong>er los compuestos y sus<br />

propiedades sin el costoso proceso de su síntesis y purificación.<br />

Gran parte de los avances de la química computacional <strong>en</strong> farmacia son<br />

debidos al desarrollo de las bibliotecas de química combinatoria, que es una de<br />

las modalidades de construcción de bases de datos <strong>en</strong> química computacional. Se<br />

basa <strong>en</strong> el almac<strong>en</strong>ami<strong>en</strong>to de pequeños fragm<strong>en</strong>tos o subestructuras que se<br />

utilizan para hacer una síntesis de un compuesto de manera automática sigui<strong>en</strong>do<br />

una serie de reglas [237,238,232].<br />

La teoría de la información basada <strong>en</strong> el cálculo de probabilidades,<br />

incertidumbre y <strong>en</strong>tropía, también se ha usado con diversos fines <strong>en</strong> química.<br />

Así, se ha utilizado <strong>en</strong> la id<strong>en</strong>tificación de sustancias <strong>en</strong> cromatografía de capa<br />

81


Manuel Urbano Cuadrado Tesis Doctoral<br />

fina, <strong>en</strong> la obt<strong>en</strong>ción de la máxima información de procedimi<strong>en</strong>tos que combinan<br />

diversos métodos analíticos, elección de fases móviles <strong>en</strong> cromatografía de gases,<br />

análisis de datos, etc. [239-245].<br />

Los conjuntos difusos, más conocidos por su acepción inglesa fuzzy sets,<br />

permit<strong>en</strong> modelar situaciones analíticas imprecisas. La definición de los<br />

conjuntos difusos y las operaciones a las que se somet<strong>en</strong> fueron propuestas por<br />

Zadeh <strong>en</strong> 1965 [246]. Su utilidad radica <strong>en</strong> la resolución de problemas <strong>en</strong> los que<br />

un elem<strong>en</strong>to no se puede asignar a un determinado conjunto de forma discreta y<br />

clara. Han <strong>en</strong>contrado aplicaciones tanto <strong>en</strong> quimiometría (<strong>en</strong> la id<strong>en</strong>tificación de<br />

patrones y <strong>en</strong> los métodos de regresión) [247,248], como <strong>en</strong> el desarrollo de<br />

sistemas expertos [249].<br />

El cálculo de similitud estructural y espectral es una de las últimas<br />

t<strong>en</strong>d<strong>en</strong>cias <strong>en</strong> química computacional [250-256]. Se va a tratar <strong>en</strong> mayor<br />

ext<strong>en</strong>sión al ser una de las herrami<strong>en</strong>tas usadas por el doctorando.<br />

6.2 Índices de similitud y huellas digitales<br />

6.2.1 Cálculo de similitud estructural<br />

El cálculo de similitudes se ha utilizado <strong>en</strong> aspectos estructurales<br />

mayoritariam<strong>en</strong>te, aunque últimam<strong>en</strong>te también se ha aplicado <strong>en</strong> cálculos de<br />

similitud espectral. Se han propuesto numerosos parámetros para medir la<br />

similitud <strong>en</strong>tre dos objetos, destacando <strong>en</strong> química computacional los<br />

d<strong>en</strong>ominados índices de similitud [257]. El más utilizado es el Índice de<br />

Tanimoto (IT), que calcula la similitud <strong>en</strong>tre dos cad<strong>en</strong>as de bits de igual tamaño,<br />

A y B, mediante la sigui<strong>en</strong>te expresión:<br />

donde:<br />

82<br />

c<br />

=<br />

a + b − c<br />

TA, B<br />

(6)<br />

• a es el número de bits igual a 1 <strong>en</strong> la cad<strong>en</strong>a A.


• b es el número de bits iguales a 1<strong>en</strong> la cad<strong>en</strong>a B.<br />

Introducción<br />

• c es el número de bits iguales a 1 comunes <strong>en</strong> las cad<strong>en</strong>as A y B, es<br />

decir, que están <strong>en</strong> la misma posición.<br />

El IT varía <strong>en</strong>tre cero y uno, de forma que cuanto mayor sea el valor, más<br />

similitud exhib<strong>en</strong> las cad<strong>en</strong>as. La forma de construir las cad<strong>en</strong>as de bits es<br />

difer<strong>en</strong>te según el área donde se aplica el método de Tanimoto.<br />

En el cálculo de la similitud estructural <strong>en</strong>tre dos compuestos, las<br />

cad<strong>en</strong>as de bits son repres<strong>en</strong>tativas de un determinado compuesto, recibi<strong>en</strong>do el<br />

nombre de huellas digitales o, más comúnm<strong>en</strong>te, el de su traducción inglesa,<br />

fingerprints. Se construy<strong>en</strong> a partir de la tabla de conexión (teoría de grafos), que<br />

a su vez deriva de la estructura <strong>en</strong> dos dim<strong>en</strong>siones del compuesto químico.<br />

Posibilita la transformación de las complejas estructuras moleculares a cad<strong>en</strong>as<br />

de bits, que se pued<strong>en</strong> tratar fácilm<strong>en</strong>te por ord<strong>en</strong>ador. La principal aplicación<br />

radica <strong>en</strong> la búsqueda de compuestos químicos <strong>en</strong> las bases de datos. Se reduce el<br />

tiempo de consulta gracias a que la comparación se lleva a cabo sólo <strong>en</strong>tre la<br />

estructura problema y los compuestos que pres<strong>en</strong>tan un índice de similitud igual<br />

o mayor que un valor límite que introduce el usuario.<br />

6.2.2 Calculo de similitud espectral<br />

El cálculo de la similitud espectral se ha utilizado la mayoría de las veces con el<br />

fin de id<strong>en</strong>tificar compuestos a través de la interpretación del espectro o la<br />

comparación del espectro problema con los almac<strong>en</strong>ados <strong>en</strong> una base de datos de<br />

espectros. En la bibliografía aparec<strong>en</strong> descritos varios parámetros para medir la<br />

similitud espectral <strong>en</strong> la espectroscopía de infrarrojo y <strong>en</strong> la de masas [258].<br />

En otras aplicaciones se ha usado el cálculo de la similitud espectral<br />

junto con otras técnicas computacionales y quimiométricas para la siempre difícil<br />

tarea de interpretar el espectro [259-261] con el fin de elucidar una estructura<br />

molecular no almac<strong>en</strong>ada <strong>en</strong> la base de datos. Con este objetivo, algunos autores<br />

han utilizado los dos tipos de cálculo de similitud (el estructural y el espectral)<br />

83


Manuel Urbano Cuadrado Tesis Doctoral<br />

[255,256]. Sin embargo, no se ha <strong>en</strong>contrado una bu<strong>en</strong>a relación <strong>en</strong>tre ambos<br />

tipos de similitudes.<br />

6.2.3 Cálculo de similitud <strong>en</strong> química analítica<br />

El cálculo de similitudes es interesante <strong>en</strong> análisis cualitativo <strong>en</strong> química<br />

analítica al proporcionar un valor de semejanza <strong>en</strong>tre dos muestras. El cálculo de<br />

distancias (<strong>en</strong> difer<strong>en</strong>tes espacios multidim<strong>en</strong>sionales), como se vio <strong>en</strong> el<br />

apartado de quimiometría, es el usado <strong>en</strong> la casi totalidad de los casos. Aparte de<br />

las redes, no son usuales los métodos de cálculo de similitud basados <strong>en</strong><br />

parámetros distintos a la distancia.<br />

Sólo una aplicación [262] aparece <strong>en</strong> la bibliografía del uso del índice de<br />

Tanimoto para la clasificación de muestras a partir de los datos obt<strong>en</strong>idos por<br />

cromatografía de gases. Por tanto, es interesante el estudio de las formas de<br />

construcción de huellas digitales a partir de espectros para la clasificación de<br />

muestras, si<strong>en</strong>do éste un campo a desarrollar <strong>en</strong> los próximos años, además de la<br />

búsqueda de nuevos índices o parámetros de similitud.<br />

84


7. Refer<strong>en</strong>cias<br />

Refer<strong>en</strong>cias<br />

[1] A. Toffler, “La Tercera Ola”, Plaza & Janes S.A., Barcelona, 1980.<br />

[2] J. Naisbitt, “Megatr<strong>en</strong>ds, T<strong>en</strong> New Directions Transforming Our Lives”,<br />

Warners Books, Nueva York, 1982.<br />

[3] S. Gre<strong>en</strong>, “Information Systems Design”, Thomson Computer Press,<br />

Londres, 1996.<br />

[4] I. Luque Ruiz, M.A. Gómez-Nieto, “Ing<strong>en</strong>iería del Software: Fundam<strong>en</strong>tos<br />

para el Desarrollo de Sistemas Informáticos”, Servicio de Publicaciones de la<br />

Universidad de Córdoba, Córdoba, 1999.<br />

[5] G.E. Bailescu, R.A. Chalmers, “Education and Training in Analytical<br />

Chemistry”, Ellis Horwood, Chichester, 1982.<br />

[6] A. Prieto Espinosa, A. Lloris Ruiz, J.C. Torres Cantero, “Introducción a la<br />

Informática”, Tercera Edición, McGraw-Hill, Madrid, 2002.<br />

[7] J. Agar, “Turing and the Universal Machine: the Making of the Modern<br />

Computer”, Icon Books, Cambridge, 2001.<br />

[8] J.G. Brookshear, “Computer Sci<strong>en</strong>ce: an Overview”, Sixth Edition, Addison-<br />

Wesley, 2000.<br />

[9] F. Vogt, M. Karlowatz, M. Jakusch, B. Mizaikoff, Analyst 128(4) (2003)<br />

397.<br />

[10] D.L. Pfeil, A. Reed, Int. Lab. 32(2) (2002) 23.<br />

[11] J.Y.K. Hsieh, L. Lin, W. Fang, B.K. Matuszewski, J. Liq. Chromatogr.<br />

Relat. Technol. 26 (2003) 895.<br />

[12] L. W<strong>en</strong>dler, J. Miller, Am. Lab. (Shelton, Conn) 33(16) (2001) 18, 20,<br />

22, 24.<br />

[13] J.Y. Neira, N. Reyes, J.A. Nóbrega, Lab. Rob. Autom. 12(5) (2000) 246.<br />

[14] A. MacDonald, Am. Lab. (Shelton, Conn) 28(8) (1996) 29.<br />

[15] R. Raso, H.W. Fehlhaber, Rapid Commun. Mass Spectrom. 9 (1995)<br />

1400.<br />

[16] K. Dettmer, L. Stieglitz, Chemosphere 29 (1994) 1789.<br />

85


Manuel Urbano Cuadrado Tesis Doctoral<br />

[17] R.C. Luders, L.A. Brunner, J. Chromatogr. Sci. 25(5) (1987) 192.<br />

[18] A.M. Tabert, J. Griep-Raming, A.J. Guymon, R.G. Cooks, Anal. Chem.<br />

75 (2003) 5656.<br />

[19] Y.Q. Xia, J.D. Miller, R. Bakhtiar, R.B. Franklin, D.Q. Liu, Rapid<br />

Commun. Mass Spectrom. 17 (2003) 1137.<br />

[20] Z. Karpas, W. Chaim, R. Gdalevsky, B. Tilman, A. Lorber, Anal. Chim.<br />

Acta 474(1) (2002) 115.<br />

[21] T.L. Buxton, P. de B. Harrington, Appl. Spectrosc. 57(2) (2003) 223.<br />

[22] J.R. Johnson, F.Y. M<strong>en</strong>g, A.J. Forbes, B.J. Cargile, N.L. Kelleher,<br />

Electrophoresis 23 (2002) 3217.<br />

[23] C.E. L<strong>en</strong>ehan, N.W. Barnett, S.W. Lewis, J. Autom. Methods Manage.<br />

Chem. 24(4) (2002) 99.<br />

[24] T.R. McJunkin, P.L. Tremblay, J.R. Scott, J. Assoc. Lab. Automat. 7(3)<br />

(2002) 76.<br />

[25] H.T. Chueh, J.V. Hatfield, S<strong>en</strong>s. Actuators, B 83B(1-3) (2002) 262.<br />

[26] O.O. Soyemi, M.A. Busch, K.W. Busch, J. Chem. Inf. Comput. Sci. 40<br />

(2000) 1093.<br />

[27] E. Maire, E. Lelievre, D. Brau, A. Lyons, M. Woodward, V. Fafeur,<br />

Anal. Biochem. 280(1) (2000) 118.<br />

[28] A. Krauss, U. Weimar, W. Goepel, Tr<strong>en</strong>ds Anal. Chem. 18 (1999) 312.<br />

[29] M.M. Gónzalez-García, F. Sánchez-Rojas, C. Bosch-Ojeda, A. García de<br />

Torres, J.M. Cano Pavón, Anal. Bioanal. Chem. 375 (2003) 1229.<br />

[30] E. Becerra, A. Cladera, V. Cerdá, Lab. Rob. Autom. 11(3) (1999) 131.<br />

[31] G.K. Taylor, Y.B. Kim, A.J. Forbes, F.Y. M<strong>en</strong>g, R. McCarthy, N.L.<br />

Kelleher, Anal. Chem. 75 (2003) 4081.<br />

[32] D. Chelius, T. Zhang, G.H. Wang, R.F. Sh<strong>en</strong>, Anal. Chem. 75 (2003)<br />

6658.<br />

[33] J. Gallardo, S. Alegret, R. Muñoz, M. de Román, L. Leija, P.R.<br />

Hernández, M. del Valle, Anal. Bioanal. Chem. 377(2) (2003) 248.<br />

86


Refer<strong>en</strong>cias<br />

[34] F. Dieterle, B. Kieser, G. Gauglitz, Chemom. Intell. Lab. Syst. 65(1)<br />

(2003) 67.<br />

[35] P.S. Williams, M.C. Giddings, J.C. Giddings, Anal. Chem. 73 (2001)<br />

4202.<br />

[36] P. Courcoux, M.F. Devaux, B. Bouchet, Chemom. Intell. Lab. Syst.<br />

62(2) (2002) 103.<br />

[37] K.P. Hinz, M. Greweling, F. Drews, B. Sp<strong>en</strong>gler, J. Am. Soc. Mass<br />

Spectrom. 10 (1999) 648.<br />

[38] H. Masui, M. Yoshida, J. Chem. Inf. Comput. Sci. 36(2) (1996) 294.<br />

[39] J. Moore, P. Solanki, R.D. McDowall, Chemom. Intell. Lab. Syst. 31(1)<br />

(1995) 43.<br />

[40] WinISI software, Infrasoft International, Port Matilda, PA, EE.UU.<br />

[41] The Unscrambler, Camo Process AS, Oslo, Noruega.<br />

[42] Matlab: the Language of Thecnical Computing, The MathWorks,<br />

http://www.mathworks.com.<br />

[43] A. Savitzky, M.J.E. Golay, Anal. Chem. 36 (1964) 1627.<br />

[44] C.G. Enke, T.A. Nieman, Anal. Chem. 48 (1976) 705-A.<br />

[45] J. Wang, S. Bollo, J.L.L. Paz, E. Sahlin, B. Mukherjee, Anal. Chem. 71<br />

(1999) 1910.<br />

[46] R.N. Bracewell, “The Fourier Transform and its Applications”, McGraw-<br />

Hill, Nueva York, 1986.<br />

[47] G. Quintas, A. Morales Noe, S. Arm<strong>en</strong>ta, S. Garrigues, M. de la Guardia,<br />

Anal. Chim. Acta 502(2) (2004) 213.<br />

[48] W.D. Cao, X.Y. Ch<strong>en</strong>, X.R. Yang, E.K. Wang, Electrophoresis 24 (2003)<br />

3124.<br />

[49] J.A. McReynolds, P. Edirisinghe, S.A. Shippy, Anal. Chem. 74 (2002)<br />

5063.<br />

[50] D. Graupe, “Id<strong>en</strong>tification of Systems”, Krieger, Nueva York, 1976.<br />

[51] R. Ergon, K.H. Esb<strong>en</strong>s<strong>en</strong>, J. Chemom. 16 (2002) 401.<br />

[52] T.L. Cecil, R.B. Poe, S.C. Rutan, Anal. Chim. Acta 250(1) (1991) 37.<br />

87


Manuel Urbano Cuadrado Tesis Doctoral<br />

[53] S. Wold, Kemisk Tidskr. 3 (1972) 34.<br />

[54] D.L. Massart, B.G.M. Vandeginst<strong>en</strong>, S. Buyd<strong>en</strong>s, S. De Jong, P.J. Lewi,<br />

J. Smeyers-Verbeke, “Handbook of Chemometrics and Qualimetrics: Parts A<br />

and B”, Elsevier, Amsterdam, 1998.<br />

[55] K.H. Esb<strong>en</strong>s<strong>en</strong>, “Multivariate Data Analysis - in Practice”, Camo Process<br />

AS, Oslo, 2002.<br />

[56] J.N Miller, J.C. Miller, “Estadística y Quimiometría para Química<br />

Analítica”, Pr<strong>en</strong>tice Hall, Madrid, 2002.<br />

[57] R. Andreu, J.E. Ricart, J. Valor, “Estrategias y Sistemas de Información”,<br />

McGraw-Hill, Madrid, 1996.<br />

[58] M. Bitton, Spectra Anal. 31(229) (2002) 37.<br />

[59] T. Wessa, C. Wegner, Spectra Anal. 31(229) (2002) 34.<br />

[60] V. Kershner, Am. Lab. (Shelton, Conn) 34(17) (2002) 22.<br />

[61] J.A. Schibler, Am. Lab. (Shelton, Conn). 32(6) (2000) 52, 54-56.<br />

[62] H.M.J. Goldschmidt, M.J.T. Cox, R.J.E. Grouls, W.A.J.H. van de Laar,<br />

G.G. van Merode, Lab. Autom. Inf. Manage. 34(1) (1999) 1.<br />

[63] R. Pavlis, Int. Labmate. 22(4) (1997) 24.<br />

[64] M. Hinton, P.R. Hinton, S. Williams, Am. Lab. (Shelton, Conn) 28(2)<br />

(1996) 51.<br />

[65] M. Pradella, R. Dorizzi, A. Burlina, Chemom. Intell. Lab. Syst. 17(2)<br />

(1992) 187.<br />

[66] R. Megargle, Anal. Chem. 61 (1989) 612A-614A, 616A-618A, 620A.<br />

[67] T. Staab, T. Shiina, D. Miller, J. Assoc. Lab. Autom. 8(6) (2003) 107.<br />

[68] S. Cross, S. Ahmed, Lab. Update. Dec (2000) 16.<br />

[69] B.K. Alsberg, R. Goodacre, J.J. Rowland, D.B. Kell, Anal. Chim. Acta<br />

348(1-3) (1997) 389.<br />

[70] P. Vankeerbergh<strong>en</strong>, J. Smeyers-Verbeke, D.L. Massart, J. Anal. At.<br />

Spectrom. 11(2) (1996) 149.<br />

[71] M. Ivandic, W. Hofmann, W.G. Guder, Clin. Chem. (Washington, DC)<br />

42 (1996) 1214.<br />

88


Refer<strong>en</strong>cias<br />

[72] P. Hubert, P. Chiap, M. Moors, B. Bourguignon, D.L. Massart, J.<br />

Cromm<strong>en</strong>, J. Chromatogr. A 665 (1994) 87.<br />

[73] R. Wehr<strong>en</strong>s, P. Van-Hoof, L. Buyd<strong>en</strong>s, G. Kateman, M. Voss<strong>en</strong>, W.H.<br />

Mulder, T. Bakker, Anal. Chim. Acta 271(1) (1993) 11.<br />

[74] J. Klaess<strong>en</strong>s, B. Vandeginste, G. Kateman, Anal. Chim. Acta 223(1)<br />

(1989) 205.<br />

[75] B.W. Boehm, IEEE Trans. Comput. C-25 (1976) 1226.<br />

[76] R.S. Pressman, “Software Engineering: a Practitioner’s Approach”,<br />

McGraw-Hill, Nueva York, 1997.<br />

[77] D.C. Ince, “Ing<strong>en</strong>iería del Software”, Addison-Wesley Iberoamericana,<br />

Bu<strong>en</strong>os Aires, 1993.<br />

[78] I. Sommerville, “Software Engineering”, Addison-Wesley, Wokingham,<br />

1996.<br />

[79] W.W. Royce, “Managing the Developm<strong>en</strong>t of Large Software Systems:<br />

Concepts and Techniques”, Proc. WESCON, 1970.<br />

[80] M. Hanna, Software Magazine, Mayo (1995) 38.<br />

[81] M. Bradac, D. Perry, L. Votta, IEEE Trans. Softw. Engineer. 20 (1994)<br />

774.<br />

[82] J. Kerr, R. Hunter, “Inside RAD”, McGraw-Hill, Nueva York, 1994.<br />

[83] J. Martin, “Rapid Application Developm<strong>en</strong>t”, Macmillan International<br />

Editions, Nueva York, 1991.<br />

[84] F. Brooks, “The Mythical Man-Month”, Addison-Wesley, Reading,<br />

1995.<br />

[85] J. McDermid, P, Rook, “Software Developm<strong>en</strong>t Process Models”,<br />

Software Engineer’s Refer<strong>en</strong>ce Book, 15/26-15/28, CRC Press, 1993.<br />

[86] B. Boehm, Computer 21(5) (1988) 61.<br />

[87] A. Davis, “Software Requirem<strong>en</strong>ts: Objects, Functions and States”,<br />

Pr<strong>en</strong>tice Hall, Englewood Cliffs, 1993.<br />

[88] R. Zultner, Am. Programmer, Febrero (1992) 28.<br />

89


Manuel Urbano Cuadrado Tesis Doctoral<br />

[89] Y. Asao (ed.) “Quality Finction Deploym<strong>en</strong>t: Integrating Customer<br />

Requirem<strong>en</strong>ts in Product Design”, Productivity Press, Cambridge, 1990.<br />

[90] T. DeMarco, “Structured Analysis and System Specification”, Pr<strong>en</strong>tice<br />

Hall, Englewood Cliffs, 1979.<br />

[91] M. Page-Jones, “The Practical Guide to Structured Systems Design”,<br />

Yourdon Press, Nueva York, 1980.<br />

[92] G. Booch, “Object Ori<strong>en</strong>ted Analysis and Design with Applications”,<br />

B<strong>en</strong>jamin Cummings, Redwood City, 1994.<br />

[93] P. Coad, E. Yourdon, “Object Ori<strong>en</strong>ted Analysis”, Pr<strong>en</strong>tice Hall,<br />

Englewood Cliffs, 1991.<br />

[94] K.S. Rubin, A. Goldberg, Communic. ACM 35(9) (1992) 48.<br />

[95] P. Ch<strong>en</strong>, “The Entity-Relationship Approach to Logical Database<br />

Design”, QED Information Sci<strong>en</strong>ces, Wellesley, 1977.<br />

[96] D.J. Hatley, I.A. Pirbhai, “Strategies for Real-Time System<br />

Specification”, Dorset House, Nueva York, 1987.<br />

[97] P.T. Ward, S.J. Mellor, “Structured Developm<strong>en</strong>t for Real-Time<br />

Systems”, Yourdon Press, Nueva York, 1985.<br />

[98] E.S. Taylor, “An Interim Report on Engineering Design”, Massachusetts<br />

Institute of Technology, Cambridge, 1959.<br />

[99] J. Warnier, “Logical Construction of Programs”, Van Nostrand Reinhold,<br />

Nueva York, 1974.<br />

[100] W. Stev<strong>en</strong>s, G. Myers, L. Constantine, IBM Systems J. 13(2) (1974) 15.<br />

[101] O. Dahl, E. Dijkstra, C. Hoare, “Structured Programming”, Academic<br />

Press, Nueva York, 1972.<br />

[102] E. Gamma, R. Helm, R. Johnson, J. Vlissides, “Design Patterns”,<br />

Addison-Wesley, Reading, 1995.<br />

[103] I. Jacobson, “Object-Ori<strong>en</strong>ted Software Engineering”, Addison-Wesley,<br />

Reading, 1992.<br />

[104] C.H. Koebel, D.B. Loveman, R.S. Schreiber, G.L.S. Jr, M.E. Zosel, “The<br />

High Performance Fortran Handbook”, The Mit Press, Cambridge, 1994.<br />

90


Refer<strong>en</strong>cias<br />

[105] S.C. Herbert, “C: The Complete Refer<strong>en</strong>ce Fourth Edition”. McGraw-<br />

Hill, Nueva York, 2000.<br />

[106] A. Goldberg, D. Robson, “Smalltalk-80: the Language”, Addison<br />

Wesley, Reading, 1989.<br />

[107] M. Campione, “The Java Tutorial Third Edition”. McGraw-Hill, Nueva<br />

York, 2002.<br />

[108] IP.G. Frankl, S. Weiss, IEEE Trans. Softw. Engineer. 19 (1993) 770.<br />

[109] S.C. Ntafos, IEEE Trans. Softw. Engineer. 16 (1988) 868.<br />

[110] P.G. Frankl, E.J. Weyuker, IEEE Trans. Softw. Engineer. 14 (1988)<br />

1483.<br />

[111] G. Myers, “The Art of Software Testing”, Wiley, Nueva York, 1979.<br />

[112] T. McCabe, IEEE Trans. Softw. Engineer. 2 (1976) 308.<br />

[113] E.V. Berard, “Essays on Object-Ori<strong>en</strong>ted Software Engineering”,<br />

Addison-Wesley, Reading, 1993.<br />

[114] D. A. Taylor, “Object-Ori<strong>en</strong>ted Technology: A Manager’s Guide”,<br />

Addison-Wesley, Reading, 1990.<br />

[115] M. Cashman, CM Softw. Engineer. Notes 14(6) (1989) 67.<br />

[116] G. Booch, IEEE Trans. Softw. Engineer. SE-12 (1986) 211.<br />

[117] O. Nierstrasz, S. Gibbs, D. Tsichritzis, Communic. ACM, 20(1) (1992)<br />

160.<br />

[118] E. Yourdon, Applic. Develop. Strateg. VI(12) (1994) 1.<br />

[119] J. Rumbaugh, M. Blaha, W. Premerlani, F. Eddy, W. Lor<strong>en</strong>s<strong>en</strong>, “Object-<br />

Ori<strong>en</strong>ted Modeling and Design”, Pr<strong>en</strong>tice-Hall, Englewood Cliffs, NJ, 1991.<br />

[120] J. Rumbaugh, I. Jacobson, G. Booch, “The Unified Modeling Language.<br />

Refer<strong>en</strong>ce Manual”, Addison-Wesley, Reading, 1999.<br />

[121] G. Booch, J. Rumbaugh, I. Jacobson, “The Unified Modeling Language.<br />

User Manual”, Addison-Wesley, Reading, 1999.<br />

[122] I. Jacobson, G. Booch, J. Rumbaugh, “The Unified Software<br />

Developm<strong>en</strong>t Process”, Addison-Wesley, Reading, 1999.<br />

91


Manuel Urbano Cuadrado Tesis Doctoral<br />

[123] H. Schildt, P. Naughton, “Java. Manual de Refer<strong>en</strong>cia”, McGraw-Hill,<br />

Madrid, 1997.<br />

[124] J. Zukowski, “Java 2. J2SE 1.4”, Anaya-Multimedia, Madrid, 2003.<br />

[125] http://www.sun.com/<br />

[126] B. Eckel, “Thinking in Java Third Edition”, Pr<strong>en</strong>tice Hall, Englewood<br />

Cliffs, 2003.<br />

[127] F.J. Ceballos Sierra, “El L<strong>en</strong>guaje de Programación Java”, Ra-ma,<br />

Madrid, 2001.<br />

[128] P. Naughton, “The Java Handbook”, McGraw-Hill Osborne Media,<br />

1996.<br />

[129] “Java Network Programming, Second Edition”, O’ Reilly, Sebastopol,<br />

2001.<br />

[130] P.J. Perrone, S.R. Chaganti, T. Schw<strong>en</strong>k, “J2EE Developer’s Handbook”,<br />

Sams Publishing, 2003.<br />

[131] P. Wainwright, A. Ahmad, M. Link, P. Sarang, “Professional Apache<br />

2.0.” Wrox, 2001. (http://www.apache.org).<br />

[132] G. Reese, “Database Programming with JDBC and Java”, O’ Reilly,<br />

Sebastopol, 2001.<br />

[133] Jasnokwski, M. Java, XML, and Web Services Bible. Hungry<br />

92<br />

Minds, Wiley, Nueva York, 2002.<br />

[134] M. Akif, S. Bordead, A. Cioroianu, J. Hart, E. Jung, D. Writz, “Java y<br />

XML”, Anaya, Madrid, 2001.<br />

[135] G.H. Gonnet, R. Baeza-Yates, “Handbook of Algorithms and Data<br />

Structures”, Addison-Wesley, Reading, 1984.<br />

[136] C.J. Date, “An Introduction to Database Systems”, Sexta edición,<br />

Addison-Wesley, Reading, 1995.<br />

[137] I. Luque Ruiz, M.A. Gómez-Nieto, E. López Espinosa, G. Cerruela<br />

García, “Bases de Datos: Desde Ch<strong>en</strong> hasta Codd con Oracle”, Ra-Ma,<br />

Madrid, 2001.


Refer<strong>en</strong>cias<br />

[138] A. de Miguel, M. Piattini, “Fundam<strong>en</strong>tos y Modelos de Bases de Datos”,<br />

Ra-Ma, Madrid, 1997.<br />

[139] G. Koch, K. Loney, “Oracle8i: The Complete Refer<strong>en</strong>ce, 10th edition”,<br />

Oracles Press, Osborne-McGraw-Hill, 2000.<br />

[140] Informe del grupo de estudio de bases de datos del ANSI/X3/SPARC,<br />

“Refer<strong>en</strong>ce Model for DBMS Standarisation”, Sigmo Record 15(1) (1986).<br />

[141] G.W. Hans<strong>en</strong>, J.V. Hans<strong>en</strong>, “Database Managem<strong>en</strong>t and Design”, 2nd<br />

edition, Pr<strong>en</strong>tice-Hall, 1996.<br />

[142] C. Batini, S. Ceri, S. Navathe, “Diseño Conceptual de Bases de Datos”,<br />

Addison-Wesley Iberoamericana, Bu<strong>en</strong>os Aires, 1994.<br />

[143] P.P. Ch<strong>en</strong>, Assoc. Computing Machin. Transac. Database Syst. (ACM<br />

TODS) 1(1) (1976).<br />

[144] P.P. Ch<strong>en</strong>, “The Entity/Relationship Model: a Basis for the Enterprise<br />

View of Data”, Am. Fed. Inf. Process. Soc. Conf. Proc. Vol. 46, 1977.<br />

[145] P.P. ch<strong>en</strong> (Ed.), “Entity Relationship Approach to System Analysis and<br />

Design”, North Holland, Amsterdam, 1979.<br />

[146] R. Elsmari, S. Navathe, “Fundam<strong>en</strong>tals of Database Systems”, 2nd<br />

edition, B<strong>en</strong>jamin Cummings, Nueva York, 1994.<br />

[147] T.J. Teorey, “Database Modelling and Design. The Entity Relationship<br />

Approach”, Morgan Kaufmann Publishers, San Francisco, 1990.<br />

[148] S. Ferg, “Modelling the Time Dim<strong>en</strong>sion in an Entity-Relationship<br />

Diagram”, Proc. 4th Int. Conf. Entity/Relationship App., EE.UU., 1985.<br />

[149] G. Poon<strong>en</strong>, “CLEAR: a Conceptual Language for Entities and<br />

Relationships”, Proc. Int. Conf. Managem. Data, Italia, 1978.<br />

[150] A. Shoshani, “CABLE: a Language Based on Entity-Relationship<br />

Model”, Conf. Database Managem., Israel, 1978.<br />

[151] E.F. Codd, “Rec<strong>en</strong>t Investigations into Relational Data Base Systems”,<br />

Proc. Int. Fed. Inf. Process., Suecia, 1974.<br />

[152] E.F. Codd, Communic. Assoc. Computing Machin. (CACM) 13(6)<br />

(1970).<br />

93


Manuel Urbano Cuadrado Tesis Doctoral<br />

[153] E.F. Codd, “Further Normalisation of the Database Relational Model”,<br />

<strong>en</strong> Database Systems, Courant Computer Sci<strong>en</strong>ce Symposia Series 6,<br />

Pr<strong>en</strong>tice-Hall, Englewood Cliffs, 1972.<br />

[154] E.F. codd, “Relational Complet<strong>en</strong>ess of Data Base Sublanguages” <strong>en</strong><br />

Database Systems, Courant Computer Sci<strong>en</strong>ce Symposia Series 6, Pr<strong>en</strong>tice-<br />

Hall, Englewood Cliffs, 1972.<br />

[155] E.F. Codd, “A Data Base Sublanguage Founded on the Relational<br />

Calculus”, Proc. ACM SIGFIDET Workshop on Data Description, Access<br />

and Control, EE.UU., 1971.<br />

[156] M. Stonebraker, R. Agrawal, U. Dayal, E.J. Neuhold, A. Reuter, “DBMS<br />

Research at a Crossroads: the Vi<strong>en</strong>na Update”, Proc. 19th Int. Conf. Very<br />

Large Data Bases, Irlanda, 1993.<br />

[157] E.F. Codd, “The Relational Model for Database Managem<strong>en</strong>t”, Versión<br />

2, Addison Wesley, Reading, 1990.<br />

[158] H. Darw<strong>en</strong>, C.J. Date, Sigmod Record 24(1) (1995) 39.<br />

[159] Atkinson et al. “The Object-Ori<strong>en</strong>ted Database System Manifiesto”, <strong>en</strong><br />

Deductive and Object-Ori<strong>en</strong>ted Databases, Elsevier, Amsterdam, 1989.<br />

[160] P. Dorsey, J.R. Hudicka, “Oracle8. Design Using UML Object<br />

Modeling”, Oracles Press, Osborne-McGraw-Hill, 1999.<br />

[161] S. Bobrowski, “Oracle8i para Windows NT”, Oracles Press, Osborne-<br />

McGraw-Hill, 2000.<br />

[162] S. Urman, Oracle8. Programación PL/SQL Oracles Press, Osborne-<br />

McGraw-Hill, 1999.<br />

[163] G.E.P. box, W.G. Hunter, J.S. Hunter, “Statistics for Experim<strong>en</strong>ters, An<br />

Introduction to Design, Data Analysis and Model Building”, Wiley, Nueva<br />

York, 1978.<br />

[164] S.N. Deming, S.L. Morgan. “Experim<strong>en</strong>tal Design: a Chemometric<br />

Approach, 2nd edition”, Elsevier, Amsterdam, 1993.<br />

[165] J. Salafranca, C. Dom<strong>en</strong>o, C. Fernández, C. Nerín, Anal. Chim. Acta<br />

477(2) (2003) 257.<br />

94


Refer<strong>en</strong>cias<br />

[166] A. Cerrato, D. de Santis, M. Moresi, J. Sci. Food Agric. 82 (2002) 1189.<br />

[167] P.A. Martoglio-Smith, Vib. Spectrosc. 24(1) (2000) 47.<br />

[168] S. Van Huffel, J. Vandewalle, “The Total Least Squares Problem:<br />

Computational Aspects and Analysis”, SIAM, Philadelphia, 1991.<br />

[169] T. Næs, E. Risvik (Ed.), “Multivariate Analysis of Data in S<strong>en</strong>sory<br />

Sci<strong>en</strong>ce”, Data Handling in Sci<strong>en</strong>ce and Technology Series, Elsevier,<br />

Amsterdam, 1996.<br />

[170] M. Felipe Sotelo, J.M. Andrade, A. Carlos<strong>en</strong>a, D. Prada, Anal. Chem. 75<br />

(2003) 5254.<br />

[171] H.W. Tan, S.D. Brown, Anal. Chim. Acta 490(1-2) (2003) 291.<br />

[172] H.L. Yu, J.F. MacGregor, Chemom. Intell. Lab. Syst. 67 (2003) 125.<br />

[173] L. Kaufman, P.J. Rousseeuw, “Finding Groups in Data: an Introduction<br />

to Cluster Analysis”, Wiley, Nueva York, 1990.<br />

[174] R.G. Brereton (Ed.), “Multivariate Pattern Recognition in<br />

Chemometrics”, Elsevier, Amsterdam, 1992.<br />

[175] J.M. Andrade, M.P. Gómez-Carracedo, E. Fernández, A. Elbergali, M.<br />

Kubista, D. Prada, Analyst 128 (2003) 1193.<br />

[176] D. Coomans, I. Broeckaert, M. Jonckheer, D.L. Massart, Meth. Inform.<br />

Med. 22 (1983) 93.<br />

[177] R.J. Laub, J.H. Purnell, J. Chromatogr. 112 (1975) 71.<br />

[178] G.K. Bolhuis, C.A.A. Duineveld, J.H. de Boer, P.M.J. Co<strong>en</strong>egracht,<br />

“Simultaneous Optimization of Multiple Criteria in Tablet Formulation: Part<br />

I” Pharmaceutical Technology EUROPE, Junio (1995), 42-49.<br />

[179] A.K. Smilde, A. Knevelman, P.M.J. Co<strong>en</strong>egracht, J. Chromatogr. 369<br />

(1986) 1.<br />

[180] D.H. Doehlert, Appl. Statist. 19 (1970) 231.<br />

[181] D.E. Long, Anal. Chim. Acta 46 (1969) 193.<br />

[182] K.W.C. Burton, G. Nickless, Chemom. Intell. Lab. Syst. 1 (1987) 135.<br />

[183] D.K. Lin, Technometrics 37 (1995) 213.<br />

[184] R.L. Plackett, J.P. Burman, Biometrika 33 (1946) 305.<br />

95


Manuel Urbano Cuadrado Tesis Doctoral<br />

[185] M.M.W.B. H<strong>en</strong>driks, J.H. De Boer, A.K. Smilde, “Robustness of<br />

Analytical Chemical Methods and Pharmaceutical Technological Products”,<br />

Elsevier, Amsterdam, 1996.<br />

[186] A.M.C. Davies, R. Giangiacomo (Eds.), “Near Infrared Spectroscopy:<br />

Procedings of the 9th International Confer<strong>en</strong>ce”, NIR Publications,<br />

Chichester, 2000.<br />

[187] A.M.C. Davies, R.K. Cho, “Near Infrared Technology in the Agricultural<br />

and Food Industries”, NIR Publications, Chichester, 2001.<br />

[188] A.M.C. Davies, R.K. Cho (Eds.), “Near Infrared Spectroscopy:<br />

Procedings of the 10th International Confer<strong>en</strong>ce”, NIR Publications,<br />

Chichester, 2002.<br />

[189] T. Næs, T. Isakson, T. Davies, “A User-Fri<strong>en</strong>dly Guide to Multivariate<br />

Calibration and Classification”, NIR Publications, Chichester, 2002.<br />

[190] D.A. Burns, E.W. Ciurczak, “Handbook of Near Infrared Analysis”,<br />

Marcel Dekker, Nueva York, 1992.<br />

[191] H. Mart<strong>en</strong>s, M. Mart<strong>en</strong>s, “Multivariate Analysis of Quality: an<br />

Introduction”, Wiley, Nueva York, 2000.<br />

[192] H. Mart<strong>en</strong>s, T. Næs, “Multivariate Calibration”, Wiley, Nueva York,<br />

1989.<br />

[193] D. Bertrand, E. Dufour, “La Spectroscopie Infrarouge et ses Applications<br />

Analytiques”, Editions TEC & DOC, París, 2000.<br />

[194] B.G. Osborne, T. Fearn, “Practical NIR Spectroscopy with Applications<br />

in Food and Beverage Analysis”, Longman Sci<strong>en</strong>tific and Technical,<br />

Londres, 1993.<br />

[195] V. Fernández-Cabanás, A. Garrido-Varo, Química Analítica 18 (1999)<br />

113.<br />

[196] M.S. Dhanoa, S.J. Lister, R. Sanderson, R.J. Barnes, J. Near Infrared<br />

Spectrosc. 2 (1994) 43.<br />

96


Refer<strong>en</strong>cias<br />

[197] D. Bertrand, “Data Pre-treatm<strong>en</strong>t and Original Analysis in<br />

Spectroscopy”, <strong>en</strong> Advanced Comet Chemometrics School, Libramont,<br />

Bélgica, 1993.<br />

[198] J.S. Sh<strong>en</strong>k, M.O. Westerhaus, “Analysis of Agricultural and Foods<br />

Products by Near Infrared Reflectance Spectroscopy”, Monograph,<br />

NIRSystems Inc., Silver Spring, 1995.<br />

[199] P.C. Williams, K. Norris (Eds.), “Near Infrared Technology in the<br />

Agricultural and Food Industries”, American Association of Cereal Chemists<br />

Inc., St. Paul, 1987.<br />

[200] P.C. Mahalanobis, “On the G<strong>en</strong>eralised Distance in Statistics”, Proc.<br />

National Institue of Sci<strong>en</strong>ce of India, 12:49-55, 1936.<br />

[201] R. De Maesschalck, D. Jouan-Rimbaud, D.L. Massart, Chem. Intell. Lab.<br />

Syst. 50 (2000) 1.<br />

[202] D.L. Massart, L. Kaufman, “The Intepretation of Analytical Chemistry<br />

Data by the Use of Cluster Analysis”, Wiley, Chichester, 1983.<br />

[203] ASTM, “Standard Definitions of Terms and Symbols Relating to<br />

Molecular Spectroscopy”, American Society for Testing and Materials, vol.<br />

14.01, Standard E131-90, West Conshohck<strong>en</strong>, 1990.<br />

[204] Y. Mallet, D. Coomans, O. de Vel, Chemom. Intell. Lab. Syst. 35 (1996)<br />

157.<br />

[205] G. McLachlan, “Discriminant Analysis and Statistical Pattern<br />

Recognition”, Wiley, Nueva York, 1992.<br />

[206] S. Wold, Pattern Recogn. 8 (1976) 127.<br />

[207] D.L. Massart, B.G.M. Vandeginste, S.N. Deming, Y. Michotte, L.<br />

Kaufman, “Chemometrics: a Textbook”, Elsevier, Amsterdam, 1988.<br />

[208] J.S. Sh<strong>en</strong>k, M.O. Westerhaus, “Calibration the ISI Way”, <strong>en</strong> Near<br />

Infrared Spectroscopy: the Future Waves, A.M.C. Davis, P.C. Williams<br />

(Eds.) NIR Publications, Chichester, 1996.<br />

97


Manuel Urbano Cuadrado Tesis Doctoral<br />

[209] J.S. Sh<strong>en</strong>k, M.O. Westerhaus, “Routine Operation, Calibration,<br />

Developm<strong>en</strong>t and Network System Managem<strong>en</strong>t Manual”, NIRSystems Inc.,<br />

Silver Spring, 1995.<br />

[210] F. Despagne, D.L. Massart, Analyst 123 (1998) 157R.<br />

[211] B. Wythoff, Chemom. Intell. Lab. Syst. 18 (1993) 115.<br />

[212] J. Zupan, J. Gasteiger, “Neural Networks for Chemists. An Introduction”,<br />

VCH, Weinheim, 1993.<br />

[213] J. Park, I.W. Sandberg, Neural Computat. 3 (1991) 246.<br />

[214] B. Walczack, D.L. Massart, Anal. Chim. Acta 331 (1996) 187.<br />

[215] J.S. Sh<strong>en</strong>k, M.O. Westerhaus, Crop Sci. 31 (1991) 469.<br />

[216] T. Isaksson, T. Næs, Appl. Spectrosc. 44 (1990) 1152.<br />

[217] T. Næs, T. Isaksson, Appl. Spectrosc. 43 (1989) 328.<br />

[218] V. Barnett, T. Lewis, “Outliers in Statistical Data”, Wiley, Nueva York,<br />

1994.<br />

[219] H. Mark, Y. Workman, “Statistics in Spectroscopy”, Academic Press<br />

Inc., Nueva York, 1991.<br />

[220] M. Stone, J. R. Statist. Soc. B 39 (1974) 111.<br />

[221] W.R. Windham, P.C. Flinn, “Comparison of MLR and PLS Regression<br />

in NIR Analysis of Quality Compon<strong>en</strong>ts in Diverse Feedstuff Populations”,<br />

<strong>en</strong> Near Infrared Spectroscopy. Bridging the Gap betwe<strong>en</strong> Data Analysis and<br />

NIR Applications, K.I. Hildrum, T. Isaksson, T. Næs, A. Tandberg (Eds.),<br />

Ellis Horwood, Chichester, 1992.<br />

[222] T. Fearn, Anal. Proc. 23 (1986) 123.<br />

[223] Resolution OENO 6/99. Validation Protocol for a Typical Analytical<br />

Method Compared to the OIV Refer<strong>en</strong>ce Method. Office International de la<br />

Vigne te du Vin. http://www.oiv.int/Database/Images/Cli<strong>en</strong>t/o<strong>en</strong>o699uk.doc.<br />

[224] E. Trullols, I. Ruisánchez, F.X. Rius, Tr<strong>en</strong>ds Anal. Chem. 23 (2004) 137.<br />

[225] C.J. Cramer, “Ess<strong>en</strong>tials of Computational Chemistry: Theories and<br />

Models, Second Edition”, Wiley, 2004.<br />

98


Refer<strong>en</strong>cias<br />

[226] T. Clark, “A Handbook of Computational Chemistry: a Practical Guide<br />

to Chemical Structure and Energy Calculations”, Wiley, Nueva York, 1985.<br />

[227] J.W. Robinson (Ed.), “CRC Handbook of Specrtoscopy”, Vols. I-III,<br />

CRC Press, Ohio, 1974.<br />

[228] M.A. Sharaf, D.L. Illman, B.R. Kowalski, “Chemometrics”, Wiley,<br />

Nueva York, 1986.<br />

[229] P.C. Jurs, “Chemometrics and Multivariate Analysis in Analytical<br />

Chemistry”, <strong>en</strong> Reviews in Computational Chemistry, Vol. 1, Willey, Nueva<br />

York, 1990.<br />

[230] H. van de Waterbeemd (Ed.), “QSAR: Chemometric Methods in<br />

Molecular Design”, VCH, Weinheim, 1995.<br />

[231] H. Kubinyi, “QSAR: Hansch Analysis and Related Approaches”, VCH,<br />

Weinheim, 1993.<br />

[232] J.M. Bamard, G.M. Downs, Persp. Drug Discov. Des. 7-8 (1997) 13.<br />

[233] A. Hillisch, R. Hilg<strong>en</strong>feld, “Modern Methods of Drug Discovery”,<br />

Springer-Verlag, Nueva York, 2003.<br />

[234] T. L<strong>en</strong>ganer, R. Mannhold, H. Kubinyi, H. Timmerman, “Bioinformatics<br />

– from G<strong>en</strong>omes to Drugs”, Wiley, Nueva York, USA, 2002.<br />

[235] J. Zupan, J. Gasteiger, “Neural Networks in Chemistry and Drug Design:<br />

an Introduction, Second Edition”, Wiley, Nueva York, 1999.<br />

[236] M.A. Miller, Nature Rev. Drug Discov. 1 (2002) 220.<br />

[237] W.A. Warr, J. Chem. Inf. Comput. Sci. 37 (1997) 134.<br />

[238] B.A. Leland, J. Chem. Inf. Comput. Sci. 37 (1997) 62.<br />

[239] K. Eckschlager, K. Danzer, “Information Theory in Analytical<br />

Chemistry”, Wiley, Nueva York, 1994.<br />

[240] D.L. Massart, J. Chromatogr. 79 (1973) 157.<br />

[241] F. Dupuis, A. Dijkstra, Anal. Chem. 47 (1975) 379.<br />

[242] P.J. Slonecker, X. Li, T.H. Ridgway, J.G. Dorsey, Anal. Chem. 68 (1996)<br />

682.<br />

99


Manuel Urbano Cuadrado Tesis Doctoral<br />

[243] P.J. Tandler, J.A. Butcher, H. Tao, P. De B. Harrington, Anal. Chim.<br />

Acta 312 (1995) 231.<br />

[244] D.R. Scott, A. Levitski, S.E. Stein, Anal. Chim. Acta 278 (1993) 13.<br />

[245] L.A. Clark, D. Pregibon, “Tree-Based Models”, <strong>en</strong> Statistical Models,<br />

J.M. Chambers, T.J. Hastie (Eds.), S. Chapman and Hall, Nueva York, 1992.<br />

[246] L.A. Zadeh, Inform. Control 8 (1965) 338.<br />

[247] M.Otto, H. Bandemer, Chemom. Intell. Lab. Syst. 1 (1986) 71.<br />

[248] T. Blaffert, Anal. Chim. Acta 161 (1984) 135.<br />

[249] B. Walczak, E. Bauer-Wolf, W. Wegscheider, Microchim. Acta 113<br />

(1994) 153.<br />

[250] D.H. Rouvray, A.T. Balaban, “Chemical Applications of Graph Theory.<br />

Applications of Graph Theory”, R.J. Wilson, L.W. Beineke (Eds.), Academic<br />

Press, Nueva York, 1979.<br />

[251] G.M. Downs, P. Willet, “Similarity Searching in Databases of Chemical<br />

Structures” <strong>en</strong> Reviews in Computational Chemistry, Vol. 7, Wiley, Nueva<br />

York, 1995.<br />

[252] H. Scsibrany, M. Karlovits, W. Demuth, F. Mueller, K. Varmuza,<br />

Chemom. Intell. Lab. Syst. 67 (2003) 95.<br />

[253] R. Hefferlin, M.T. Matus, J. Chem. Inf. Sci. 41 (2001) 484.<br />

[254] R.P. Sheridan, M.D. Miller, D.J. Underwood, S.K. Kearsley, J. Chem.<br />

Inf. Sci. 36 (1996) 128.<br />

[255] K. Varmuza, M. Karlovits, W. Demuth, Anal. Chim. Acta 490 (2003)<br />

313.<br />

[256] W. Demuth, M. Karlovits, K. Varmuza, Anal. Chim. Acta 516 (2004) 75.<br />

[257] P. Willet, J.M. Barnard, G. Downs, J. Chem. Inf. Comput. Sci. 38 (1998)<br />

983.<br />

[258] K. Varmuza, P.N. P<strong>en</strong>chev, H. Scsibrany, J. Chem. Inform. Comput. Sci.<br />

38 (1998) 420.<br />

[259] V. Schoonjans, F. Questier, Q. Guo, Y. Van der Heyd<strong>en</strong>, D.L. Massart, J.<br />

Pharm. Biomed. Anal. 24 (2001) 613.<br />

100


Refer<strong>en</strong>cias<br />

[260] F. Ehr<strong>en</strong>treich, Anal. Chim. Acta 393 (1999) 193.<br />

[261] W. Werther, K. Varmuza, Fres<strong>en</strong>ius J. Anal. Chem. 344 (1992) 223.<br />

[262] P.J. Dunlop, C.M. Bignell, J.F. Jackson, D. Brynn Hibbert, Chemom.<br />

Intell. Lab. Syst. 30 (1995) 59.<br />

101


Parte experim<strong>en</strong>tal


Parte I: Informatización del proceso<br />

analítico y de la gestión y<br />

análisis de los datos<br />

producidos mediante el uso<br />

del paradigma ori<strong>en</strong>tado a<br />

objetos


Capítulo 1<br />

USE OF OBJECT-ORIENTED<br />

TECHNIQUES FOR THE DESIGN AND<br />

DEVELOPMENT OF STANDARD<br />

SOFTWARE SOLUTIONS IN<br />

AUTOMATION AND DATA<br />

MANAGEMENT IN ANALYTICAL<br />

CHEMISTRY<br />

El cont<strong>en</strong>ido de este capítulo ha sido <strong>en</strong>viado para su publicación a la revista<br />

Tr<strong>en</strong>ds in Analytical Chemistry.


Tr<strong>en</strong>ds Anal. Chem., <strong>en</strong>viado para su publicación Parte I, cap. 1<br />

USE OF OBJECT-ORIENTED TECHNIQUES FOR THE DESIGN AND<br />

DEVELOPMENT OF STANDARD SOFTWARE SOLUTIONS IN<br />

AUTOMATION AND DATA MANAGEMENT IN ANALYTICAL<br />

CHEMISTRY<br />

Manuel Urbano Cuadrado, M. D. Luque de Castro, Miguel Ángel Gómez-Nieto<br />

Abstract<br />

An object-ori<strong>en</strong>ted design of software structures for both automating<br />

analytical processes and managing the data g<strong>en</strong>erated from these processes is<br />

proposed. Two models, for automation and data managem<strong>en</strong>t, are developed for<br />

building the programs used in these two areas. The advantages aris<strong>en</strong> from these<br />

object-ori<strong>en</strong>ted models regarding the classical design are exposed. Thus, the<br />

standardisation, scalability, indep<strong>en</strong>d<strong>en</strong>ce, etc., of the programs are assured by<br />

the object-ori<strong>en</strong>ted modelling. Characteristics like inheritance, polymorphism,<br />

<strong>en</strong>capsulation, etc., are used for achieving the pursued goals, in addition to<br />

having a new way for repres<strong>en</strong>ting the analytical concepts in automation and data<br />

managem<strong>en</strong>t.<br />

Keywords: Object-ori<strong>en</strong>ted paradigm, Automation, Data managem<strong>en</strong>t.<br />

109


Manuel Urbano Cuadrado Tesis Doctoral<br />

1. Introduction<br />

The developm<strong>en</strong>t of two main subareas<br />

in analytical chemistry as<br />

automation and laboratory information<br />

managem<strong>en</strong>t systems (LIMS)<br />

can not be conceived without the fast<br />

advances on informatics. Firstly,<br />

computing has allowed automation of<br />

the differ<strong>en</strong>t steps of the analytical<br />

process —sample preparation [1,2],<br />

detection [3,4] and data collection and<br />

processing [5-7]— thus avoiding<br />

human participation in analysis<br />

developm<strong>en</strong>t and errors owing to<br />

manual operations. Regarding information<br />

managem<strong>en</strong>t, differ<strong>en</strong>t approaches<br />

have be<strong>en</strong> developed with<br />

differ<strong>en</strong>t complexity and scope,<br />

namely: systems for handling daily<br />

data from laboratories —Managem<strong>en</strong>t<br />

Information Systems (MIS)— [8,9],<br />

systems for supporting decisions<br />

making in laboratories —Decision<br />

Support Systems (DSS)— [10,11],<br />

and, at the highest level, systems for<br />

<strong>en</strong>tirely substitution of human skills<br />

and expertise —Knowledge Based<br />

Systems (KBS)— [12,13]. In addition,<br />

analytical disciplines such as<br />

110<br />

chemometrics, hyph<strong>en</strong>ated techniques,<br />

molecular design, QSOR<br />

/QSAR, etc., have also tak<strong>en</strong> advantages<br />

from informatics. Thus,<br />

computers and modern analytical<br />

chemistry are closely interrelated<br />

subjects.<br />

Computer programs are built<br />

following <strong>en</strong>gineering processes —<br />

Software Engineering [14,15]—<br />

consisting of a series of steps, namely:<br />

specification of requirem<strong>en</strong>ts (also<br />

known as system analysis), system<br />

design, codification, implem<strong>en</strong>tation<br />

and testing. Most efforts, experi<strong>en</strong>ce<br />

and time are devoted to programs<br />

analysis and design—these two steps<br />

constitute the modelling of a system—.<br />

The quality of the remaining<br />

process, and, in turn, of the software<br />

developed, dep<strong>en</strong>ds on the modelling<br />

stage.<br />

The analytical problems (that<br />

is, the number and properties of the<br />

target analytes, characteristics of the<br />

samples, etc.), and their resolution<br />

(the time for obtaining results, the<br />

level of accuracy required, etc.) are in<br />

continuous change. Re-updating computational<br />

resources to the new


Tr<strong>en</strong>ds Anal. Chem., <strong>en</strong>viado para su publicación Parte I, cap. 1<br />

sc<strong>en</strong>arios raised from these changes is<br />

oft<strong>en</strong> an exp<strong>en</strong>sive and long period,<br />

which frequ<strong>en</strong>tly makes necessary to<br />

improve the software and hardware<br />

involved. This is a consequ<strong>en</strong>ce of<br />

shortcomings of the classical model<br />

ling in software <strong>en</strong>gineering. Other<br />

problems in analytical laboratories<br />

related to defici<strong>en</strong>t modelling are the<br />

specificity of software for a giv<strong>en</strong><br />

equipm<strong>en</strong>t and hardware, disconnection<br />

betwe<strong>en</strong> software for<br />

automation and software for data<br />

managem<strong>en</strong>t, etc.<br />

New efforts in modelling<br />

software systems have be<strong>en</strong> addressed<br />

at the developm<strong>en</strong>t of programs with a<br />

high degree of scalability —property<br />

referred to the capacity for <strong>en</strong>larging<br />

the program functionality with<br />

minimum efforts—, indep<strong>en</strong>d<strong>en</strong>ce of<br />

both the hardware used and the<br />

required information, re-usability, etc.<br />

With this aim, computational researchers<br />

developed the Object-Ori<strong>en</strong>ted<br />

Paradigm (OOP) for <strong>en</strong>gineering<br />

software [16,17] at the beginnings of<br />

the 90s —despite the object-ori<strong>en</strong>ted<br />

programming was introduced by<br />

Smalltalk in the 70s, the modelling<br />

based on objects was not used for<br />

analysis and design of software<br />

solutions—, based on the key and<br />

intuitive object concept: “an abstraction<br />

unit of a real <strong>en</strong>tity”. In this<br />

way, a program is composed by a<br />

number of objects related betwe<strong>en</strong><br />

them and <strong>en</strong>dowed with a series of<br />

properties and actions.<br />

The object-ori<strong>en</strong>ted modelling<br />

has be<strong>en</strong> hardly used in analytical<br />

chemistry [18,19] owing to reasons<br />

such as: 1) the shortcomings owing<br />

products standardisation for commercial<br />

brands; 2) the relatively<br />

rec<strong>en</strong>t developm<strong>en</strong>t of the paradigm,<br />

and in turn, 3) the non-availability of<br />

both a standardised modelling language<br />

and tools appropriate for<br />

implem<strong>en</strong>tation. Nevertheless, the developm<strong>en</strong>t<br />

of both Unified Modelling<br />

Language (UML) [20] and objectori<strong>en</strong>ted<br />

programming languages —<br />

C++ and, particularly, Java [21]—<br />

increases the use of OOP.<br />

In this paper, two objects<br />

models for automation and data<br />

managem<strong>en</strong>t are described with the<br />

aim of showing the advantages of<br />

these models in analytical chemistry.<br />

111


Manuel Urbano Cuadrado Tesis Doctoral<br />

The developm<strong>en</strong>t of these models is<br />

an attempt to create a useful programming<br />

structure, in addition to a<br />

new meta-language based on the<br />

objects definition in analytical chemistry.<br />

2. Object model for automation<br />

Many approaches have be<strong>en</strong> developed<br />

in analytical chemistry regarding<br />

automation, but few of them<br />

[22,23] deal in some ext<strong>en</strong>sion with<br />

software design. The description of<br />

the model here pres<strong>en</strong>ted deals with<br />

structural modelling —the abstraction<br />

of the analytical equipm<strong>en</strong>t—.<br />

Therefore, only the dynamic aspects<br />

related to actions carried out by<br />

analytical hardware are considered.<br />

The automation processes in which<br />

this model can be used have be<strong>en</strong><br />

described previously. [24].<br />

2.1 The analytical hardware: devices,<br />

apparatus, instrum<strong>en</strong>ts and autoanalysers<br />

A giv<strong>en</strong> instrum<strong>en</strong>tal set-up aimed at<br />

providing either a signal, such as a<br />

peak height or area, slope, etc., or,<br />

directly, the value of the parameter<br />

112<br />

under study is necessary in order to<br />

carry out analyses in an automatic or<br />

automated way. The use of the word<br />

“automatic” or “automated” implies<br />

computer control of some of the steps<br />

of the analytical process —al least<br />

data collection and processing—.<br />

Computer control requires<br />

two parts. Firstly, the software that, in<br />

addition to data processing for<br />

information output, commands the<br />

hardware, which constitutes the<br />

second part involved. For the<br />

developm<strong>en</strong>t of the model, the<br />

concept of hardware is divided into<br />

two types, namely: the physical part<br />

of computers and the analytical<br />

equipm<strong>en</strong>t —“analytical hardware” is<br />

the name here proposed—.<br />

The IUPAC distinguishes<br />

betwe<strong>en</strong> devices, apparatus, instrum<strong>en</strong>ts<br />

and analysers. Devices are<br />

considered as the minimum part of<br />

analytical equipm<strong>en</strong>t (either apparatus<br />

or instrum<strong>en</strong>ts) able of realising a<br />

unitary physical or electronic operation<br />

(e.g. electronic interface,<br />

mechanical rotor, etc.). Thus, apparatus<br />

are defined as a set of devices<br />

assembled to carry out physical,


Tr<strong>en</strong>ds Anal. Chem., <strong>en</strong>viado para su publicación Parte I, cap. 1<br />

dynamic or chemical operations<br />

involving samples and reag<strong>en</strong>ts (e.g.<br />

an ultrasound digester, a selection<br />

valve, etc.). Nevertheless, apparatus<br />

cannot provide any information about<br />

the samples in contrast to instrum<strong>en</strong>ts<br />

(e.g. a spectrophotometer, a pot<strong>en</strong>tiometer,<br />

a chromatograph, etc.). At the<br />

highest level, the combination of<br />

apparatus and instrum<strong>en</strong>ts for setting<br />

up an analytical method is known as<br />

analyser (e.g. an autoanalyser for<br />

pesticides in soils).<br />

The objects model to be<br />

developed must take into account<br />

these IUPAC definitions in order to<br />

assure the standardisation level<br />

pursued.<br />

2.2 Classes involved in automation:<br />

static view of the analytical hardware<br />

The concept of class means a<br />

g<strong>en</strong>eralisation of a group of objects<br />

<strong>en</strong>dowed with common both<br />

properties and behaviour from the<br />

OOP point of view —attributes are<br />

properties that characterise the<br />

structure of a giv<strong>en</strong> object and<br />

methods are operations to be carried<br />

out by the objects—. Therefore, an<br />

object is a case of a giv<strong>en</strong> class which<br />

repres<strong>en</strong>ts a recognisable world real<br />

<strong>en</strong>tity.<br />

The object-ori<strong>en</strong>ted modelling<br />

uses a Classes Diagram for designing<br />

the structural aspects of a system [20].<br />

Fig. 1 shows the classes diagram<br />

developed here for automation in<br />

analytical chemistry. As can be se<strong>en</strong><br />

in the figure, the class Analytical<br />

Hardware is considered as the par<strong>en</strong>t<br />

class. The remaining classes are<br />

desc<strong>en</strong>ding from AnalyticalHardware<br />

and, thus, they inherit its properties<br />

and methods —inheritance and<br />

specialisation are concepts below<br />

comm<strong>en</strong>ted—. The attributes of the<br />

class AnalyticalHardware are id<strong>en</strong>tifier,<br />

brand, model and communication_port.<br />

These attributes<br />

show differ<strong>en</strong>t value for each object<br />

of the AnalyticalHardware class. Any<br />

hardware involved in an analytical<br />

process is id<strong>en</strong>tified by an item, is<br />

from a giv<strong>en</strong> brand, corresponds to a<br />

specific model, and, finally, needs a<br />

channel for communication with<br />

computers. On the other hand, the<br />

methods of the class hardware are<br />

113


Manuel Urbano Cuadrado Tesis Doctoral<br />

-abstract setRemoteControl() : void<br />

-abstract exitRemoteControl() : void<br />

114<br />

APPARATUS<br />

Branch detailed in Fig. 2<br />

ANALYTICALHARDWARE<br />

-id<strong>en</strong>tifier : String<br />

-brand : String<br />

-model : String<br />

-communication_port : String<br />

-setId<strong>en</strong>tifier() : void<br />

-setBrand() : void<br />

-setModel() : void<br />

-setCommunicationPort() : void<br />

-getId<strong>en</strong>tifier() : String<br />

-getBrand() : String<br />

-getModel() : String<br />

-getCommunicationPort() : String<br />

-abstract setRemoteControl() : void<br />

-abstract exitRemoteControl() : void<br />

Branch detailed in Fig. 3<br />

INSTRUMENT<br />

-abstract setRemoteControl() : void<br />

-abstract exitRemoteControl() : void<br />

-abstract monitoring() : void<br />

Fig. 1. Classes diagram for automation in analytical chemistry (I). Specialisation<br />

of the class AnalyticalHardware into classes Apparatus and Instrum<strong>en</strong>t.<br />

those in charge of managing the<br />

attributes above cited and also two<br />

abstract methods responsible for<br />

setting and exiting the remote control<br />

necessary for automation. The term<br />

abstract is a method modifier that<br />

means that the latter is implem<strong>en</strong>ted<br />

in the lower classes. Any class with<br />

abstract methods is considered as an<br />

abstract class, and therefore, the<br />

specialisation of the par<strong>en</strong>t class is<br />

mandatory in order to implem<strong>en</strong>t<br />

these methods.<br />

The inheritance capacity is<br />

one of the key object-ori<strong>en</strong>ted modelling’s<br />

characteristics that yields<br />

advantages related to reusability of<br />

the code and programming time.<br />

Yourdon provided the following data<br />

[25]: reduction of 70 and 84 % in time


Tr<strong>en</strong>ds Anal. Chem., <strong>en</strong>viado para su publicación Parte I, cap. 1<br />

and costs, respectively, required for<br />

the developm<strong>en</strong>t of a software<br />

product. Moreover, the inheritance<br />

property helps to support a conceptual<br />

view of the problem. Thus, the classes<br />

desc<strong>en</strong>ding from a giv<strong>en</strong> class inherit<br />

the structure and behaviour of its<br />

par<strong>en</strong>t, but taking into account to add<br />

new functionality (new attributes or<br />

methods). This fact is known as specialisation<br />

and permits to differ<strong>en</strong>tiate<br />

classes of the same level. Thus,<br />

classes Apparatus and Instrum<strong>en</strong>t are<br />

desc<strong>en</strong>ding from class Analytical-<br />

Hardware. This justly corresponds to<br />

IUPAC hierarchy, and because the<br />

differ<strong>en</strong>ce betwe<strong>en</strong> apparatus and<br />

instrum<strong>en</strong>ts is the analytical information<br />

provided by the latter, class<br />

Instrum<strong>en</strong>t has a new method named<br />

monitoring, also defined as abstract.<br />

This method, which is implem<strong>en</strong>ted<br />

by classes derived from class<br />

Instrum<strong>en</strong>t, collects data from<br />

instrum<strong>en</strong>ts in a continuous way.<br />

The use of specialisation appears<br />

continuously in the proposed<br />

model. Thus, Figs. 2 and 3 summarise<br />

the classes sub-diagrams for apparatus<br />

and instrum<strong>en</strong>ts, respectively. The<br />

Apparatus class is specialised into<br />

classes HydrodynamicApparatus and<br />

SampleTreatm<strong>en</strong>tApparatus. The former<br />

corresponds to apparatus for<br />

propelling samples and reag<strong>en</strong>ts<br />

through the analyser (e.g., auto<br />

samplers, peristaltic pumps, selection<br />

valves, etc.) and the latter repres<strong>en</strong>ts<br />

apparatus for samples and reag<strong>en</strong>ts<br />

treatm<strong>en</strong>t (e.g., thermostats, ultra<br />

sound digesters, microwave digesters,<br />

high pressure chambers, etc.). Thus,<br />

classes as MicrowaveDigester, Auto<br />

sampler, SelectionValve, etc., are in<br />

Fig. 2, where the most outstanding<br />

attributes and methods of each class<br />

are shown.<br />

The branch of the classes<br />

diagram for automation in Fig. 3 is<br />

devoted to instrum<strong>en</strong>ts. Class Instrum<strong>en</strong>t<br />

is firstly specialised into<br />

OpticalInstrum<strong>en</strong>t and ElectroanalyticalInstrum<strong>en</strong>t.<br />

Thus, classes as Spectrophotometer,<br />

Spectrofluorimeter,<br />

DiodeArraySpectrometer, Pot<strong>en</strong>tiometricInstrum<strong>en</strong>t,AmperometricInstrum<strong>en</strong>t,<br />

etc., are shown in Fig. 3.<br />

115


Manuel Urbano Cuadrado Tesis Doctoral<br />

Fig. 2. Classes diagram for automation in analytical chemistry (II).<br />

Specialisation of the class Apparatus into differ<strong>en</strong>t classes that repres<strong>en</strong>t<br />

the apparatus involved in analytical chemistry.<br />

116


Tr<strong>en</strong>ds Anal. Chem., <strong>en</strong>viado para su publicación Parte I, cap. 1<br />

Fig. 3. Classes diagram for automation in analytical chemistry (III).<br />

Specialisation of the class Instrum<strong>en</strong>t into differ<strong>en</strong>t classes that repres<strong>en</strong>t<br />

the instrum<strong>en</strong>ts involved in analytical chemistry.<br />

117


Manuel Urbano Cuadrado Tesis Doctoral<br />

2.3 Separation betwe<strong>en</strong> logical<br />

structure and physical implem<strong>en</strong>tation:<br />

degree of indep<strong>en</strong>d<strong>en</strong>ce<br />

The structural modelling based on the<br />

object-ori<strong>en</strong>ted paradigm takes into<br />

account only a logical point of view<br />

of the analytical equipm<strong>en</strong>t involved<br />

in automation by classes. These<br />

classes are <strong>en</strong>dowed with a series of<br />

properties and operations that are<br />

close to the analytical chemist. The<br />

implem<strong>en</strong>tation of the abstract<br />

methods of the corresponding classes<br />

is carried out by leaf classes, which<br />

are the manufacturers’ classes. This is<br />

the linkage betwe<strong>en</strong> standard<br />

application for monitoring analytical<br />

processes and the analytical hardware<br />

of an autoanalyser. The hardware is<br />

controlled by commands used by the<br />

classes in order to implem<strong>en</strong>t the<br />

functionality required for a giv<strong>en</strong><br />

instrum<strong>en</strong>t or apparatus. The set of<br />

commands is the physical part not<br />

treated by the logical model and oft<strong>en</strong><br />

associated to devices —above comm<strong>en</strong>ted—.<br />

The join of the physical part<br />

118<br />

to the logical model is carried out by<br />

object-ori<strong>en</strong>ted programming languages<br />

<strong>en</strong>dowed with an interface for<br />

implem<strong>en</strong>ting methods writt<strong>en</strong> in<br />

other languages. The physical part is<br />

oft<strong>en</strong> composed by functions writt<strong>en</strong><br />

in languages such as C, Fortran, etc.<br />

responsible for commanding devices<br />

that compose instrum<strong>en</strong>ts and apparatus.<br />

The programming language<br />

Java is <strong>en</strong>dowed with Java Interface<br />

Native (JNI) [21] in order to develop<br />

methods able of using code writt<strong>en</strong> in<br />

other language.<br />

There are two ways for introducing<br />

the manufacturers’ classes<br />

into the model. One of them involves<br />

delivering by the manufacturer the<br />

classes corresponding to the hardware<br />

he/she fabricates. These classes must<br />

be <strong>en</strong>dowed with the requisites<br />

(namely, inheritance and implem<strong>en</strong>ttation<br />

of abstract methods) necessary<br />

for being included in the model, and<br />

therefore, in a standardised system for<br />

automation. It is clear that this way<br />

can be considered only from an<br />

optimistic point of view as standard<br />

tools are not of interest for most<br />

companies. This way is based on the


Tr<strong>en</strong>ds Anal. Chem., <strong>en</strong>viado para su publicación Parte I, cap. 1<br />

developm<strong>en</strong>t of a classes library used<br />

for the choice of the classes required<br />

in order to compose a giv<strong>en</strong> autoanalyser.<br />

On the other hand, classes can<br />

be developed taking into account the<br />

list of commands necessary to build<br />

the physical part used by the model —<br />

the list is oft<strong>en</strong> provided by the<br />

manufacturers, ev<strong>en</strong> sometimes the<br />

<strong>en</strong>tire physical part—. The authors of<br />

this article have developed some<br />

manufacturers’ classes, in addition to<br />

the rest of the classes of the model, in<br />

Java language (e.g. classes Crison-<br />

Sampler, Rheodyne7010, Unicam8625<br />

Spectrophotometer, etc.). These classes<br />

are at the disposal of researchers<br />

interested in them.<br />

2.4 The automation model in the<br />

analytical process<br />

The system for automating analytical<br />

processes proposed by the authors<br />

[24] is prepared for the classes<br />

diagram described above. This system<br />

involves a series of interfaces for the<br />

design and control of processes and it<br />

is based on the execution of hardware<br />

actions and functions if a series of<br />

time and state premises are fulfilled.<br />

The aggregation of hardware classes<br />

and the relationship betwe<strong>en</strong> the<br />

AnalyticalHardware and Hardware<br />

Action classes —the former has a list<br />

of HardwareAction objects as<br />

attribute— yields a specific auto<br />

analyser. Thus, the model allows differ<strong>en</strong>t<br />

autoanalysers to be controlled<br />

by a standard software.<br />

Polymorphism is other important<br />

object-ori<strong>en</strong>ted modelling’s<br />

characteristic, which permits that any<br />

refer<strong>en</strong>ce to a par<strong>en</strong>t class can be<br />

converted into a refer<strong>en</strong>ce to a<br />

desc<strong>en</strong>ding class. This is of importance<br />

for the scalability of the<br />

program since the introduction of a<br />

new class in the model does not affect<br />

the control code because of the use of<br />

refer<strong>en</strong>ces to the par<strong>en</strong>t Analytical<br />

Hardware class.<br />

Hybridisation betwe<strong>en</strong> the<br />

programming language Java and the<br />

markup language XML assures the<br />

coupling of the model to a standard<br />

automation system. The definition of<br />

an analytical method (consisting of<br />

the specification of both the hardware<br />

involved and the time and state<br />

119


Manuel Urbano Cuadrado Tesis Doctoral<br />

actions to be carried) is stored in an<br />

xml file. Th<strong>en</strong>, objects of the class<br />

AnalyticalHardware with their lists of<br />

objects ActionHardware are built in<br />

execution time from the XML data for<br />

autoanalyser control by the computer.<br />

3. Objects model for data managem<strong>en</strong>t<br />

Any laboratory for process control<br />

carries out a series of analyses aimed<br />

at knowing the value of several<br />

parameters of interest for monitoring<br />

a giv<strong>en</strong> process. The number of<br />

analyses to be carried out dep<strong>en</strong>ds on<br />

the complexity of the process. Thus,<br />

the more the complexity of the<br />

process, the higher the number of<br />

parameters to be monitored. Other<br />

factor that influ<strong>en</strong>ces the amount of<br />

information is the workload in the<br />

laboratory with respect to the number<br />

of samples to be analysed. This aspect<br />

dep<strong>en</strong>ds on the monitoring frequ<strong>en</strong>cy<br />

for each process. Moreover, indep<strong>en</strong>d<strong>en</strong>tly<br />

of these factors, the amount<br />

of information to manage is large —<br />

indep<strong>en</strong>d<strong>en</strong>ce of the amount and way<br />

of carrying out the measurem<strong>en</strong>ts,<br />

separation betwe<strong>en</strong> daily data<br />

120<br />

ev<strong>en</strong> if the number of samples and<br />

parameters is low— as long as a<br />

historical managem<strong>en</strong>t is necessary in<br />

order to extract information from data<br />

corresponding to long past periods.<br />

Specificity to a giv<strong>en</strong> laboratory<br />

or process is an undesirable<br />

aspect for LIMS use because the low<br />

degree of scalability the design of the<br />

programs <strong>en</strong>ables in this case. The<br />

dynamics of analytical information<br />

makes necessary systems that require<br />

null or minimum reprogramming<br />

wh<strong>en</strong> conditions as sample id<strong>en</strong>tification<br />

and classification, new<br />

analytical parameters to monitor,<br />

computer resources, etc., change.<br />

Therefore, op<strong>en</strong> characteristics are<br />

mandatory for avoiding or minimising<br />

economical and time efforts wh<strong>en</strong><br />

reprogramming is necessary.<br />

The object-ori<strong>en</strong>ted model<br />

here proposed permits to build data<br />

managem<strong>en</strong>t applications with the<br />

above comm<strong>en</strong>ted requirem<strong>en</strong>ts (namely:<br />

applicability to any process<br />

monitoring or refer<strong>en</strong>ce laboratory,<br />

handling and historical data analysis<br />

modules, etc.).


Tr<strong>en</strong>ds Anal. Chem., <strong>en</strong>viado para su publicación Parte I, cap. 1<br />

SELECTED<br />

PARAMETER 1..1 0..*<br />

PARAMETER<br />

MAGNITUDE<br />

CALCULATED<br />

MEASUREMENT<br />

< Uses ><br />

1..1<br />

CALCULUS<br />

FORMULAE<br />

FORMULAE<br />

MEASUREMENT<br />

DATUM<br />

MEASUREMENT<br />

0..*<br />

0..1<br />

USER<br />

1..*<br />

Some measurem<strong>en</strong>ts may<br />

not be associated to a<br />

calibration curve<br />

0..1<br />

CALIBRATION<br />

CURVE<br />

1..*<br />

1..1<br />

CONVERSION<br />

FORMULAE<br />

ANALYSER<br />

Fig. 4. Classes diagram for data managem<strong>en</strong>t in analytical chemistry (I). Classes<br />

for repres<strong>en</strong>ting the samples, parameters and their relationships, unities<br />

and users of the analytical information.<br />

3.1 Classes involved in the managem<strong>en</strong>t<br />

of samples and<br />

analytical parameters<br />

The class Sample repres<strong>en</strong>ts the<br />

samples in which several properties or<br />

parameters have to be determined.<br />

Samples id<strong>en</strong>tification is the key in<br />

the managem<strong>en</strong>t of the laboratory<br />

information. The criterion for id<strong>en</strong>tification<br />

is differ<strong>en</strong>t for each<br />

laboratory. Thus, modelling with a<br />

view on id<strong>en</strong>tification indep<strong>en</strong>d<strong>en</strong>t of<br />

the laboratory is the first step for<br />

constructing the classes diagram<br />

shown in Fig. 4. Class Code repres<strong>en</strong>ts<br />

the possible codes used for<br />

id<strong>en</strong>tification, with name and<br />

data_type attributes. The latter is important<br />

for correct functioning of the<br />

programs since data consist<strong>en</strong>ce is<br />

necessary and it indicates the numerical,<br />

text, date or binary code<br />

used.<br />

An analytical parameter is<br />

121


Manuel Urbano Cuadrado Tesis Doctoral<br />

considered a property of the material<br />

under study that is of interest for its<br />

characterisation. The definition of<br />

parameter is <strong>en</strong>capsulated in Para<br />

meter class. This is specialised into<br />

two classes (see Fig. 4), namely:<br />

classes DatumParameter and CalculatedParameter.<br />

The former repres<strong>en</strong>ts<br />

parameters that are determined<br />

directly in samples; and the latter<br />

those determined by the relationship<br />

betwe<strong>en</strong> one or several parameters of<br />

the first type and a mathematical<br />

expression, as shown in Fig. 4.<br />

A result is expressed by a<br />

value and the unit in which this is<br />

measured. Class Unit is necessary for<br />

repres<strong>en</strong>ting the differ<strong>en</strong>t units in<br />

which the analytical parameters can<br />

be expressed. The association betwe<strong>en</strong><br />

the classes Parameter and Unit<br />

yields the new class Magnitude,<br />

which repres<strong>en</strong>ts a giv<strong>en</strong> parameter<br />

expressed in a specific unit. This class<br />

is <strong>en</strong>dowed, among others, with two<br />

key attributes to trigger off alerts for<br />

users warning, namely, minimum<br />

_value and maximum_value, which<br />

define the normal range of a giv<strong>en</strong><br />

magnitude.<br />

122<br />

Class SelectedParameter arises<br />

from the association betwe<strong>en</strong> the<br />

classes Sample and Parameter and<br />

repres<strong>en</strong>ts a giv<strong>en</strong> parameter to be<br />

determined in a sample. This class<br />

manages all the measurem<strong>en</strong>ts of the<br />

parameter in the target sample by the<br />

list of objects of the class Measurem<strong>en</strong>t<br />

described below.<br />

3.2 Relationship betwe<strong>en</strong> measurem<strong>en</strong>t<br />

and calibration in<br />

analytical chemistry<br />

Fig. 5 shows classes that repres<strong>en</strong>t the<br />

analytical measurem<strong>en</strong>ts and the<br />

information they provide. The most<br />

important class is Measurem<strong>en</strong>t,<br />

which is specialised into classes<br />

DatumMeasurem<strong>en</strong>t and Calculated<br />

Measurem<strong>en</strong>t in a way similar to that<br />

comm<strong>en</strong>ted for the class Parameter.<br />

These classes repres<strong>en</strong>t the measurem<strong>en</strong>ts<br />

carried out in the laboratory,<br />

either in a direct or indirect way, and<br />

therefore, they are related with class<br />

Magnitude in order to know the<br />

parameter and unit to which the<br />

attribute value belongs.<br />

The relationship betwe<strong>en</strong> the<br />

classes Magnitude and Formulae is


Tr<strong>en</strong>ds Anal. Chem., <strong>en</strong>viado para su publicación Parte I, cap. 1<br />

SELECTED<br />

PARAMETER 1..1 0..*<br />

PARAMETER<br />

MAGNITUDE<br />

CALCULATED<br />

MEASUREMENT<br />

< Uses ><br />

1..1<br />

CALCULUS<br />

FORMULAE<br />

FORMULAE<br />

MEASUREMENT<br />

DATUM<br />

MEASUREMENT<br />

0..*<br />

0..1<br />

USER<br />

1..*<br />

Some measurem<strong>en</strong>ts may<br />

not be associated to a<br />

calibration curve<br />

0..1<br />

CALIBRATION<br />

CURVE<br />

1..*<br />

1..1<br />

CONVERSION<br />

FORMULAE<br />

ANALYSER<br />

Fig. 5. Classes diagram for data managem<strong>en</strong>t in analytical chemistry (II).<br />

Classes for repres<strong>en</strong>ting both the measurem<strong>en</strong>t processes and analytical<br />

calibration.<br />

shown in Fig. 5. The class Formulae<br />

is an abstraction of the formulas in<br />

charge of calculating the value of a<br />

giv<strong>en</strong> magnitude from one or several<br />

values of other magnitudes. The class<br />

Formulae is specialised into the<br />

classes CalculusFormula and ConversionFormula.<br />

These two classes have<br />

in common a Magnitude attribute<br />

named output_magnitude as any of<br />

them provides one output value. The<br />

differ<strong>en</strong>ce betwe<strong>en</strong> these formulas is<br />

the number of input values. Thus,<br />

ConversionFormula class has a<br />

Magnitude attribute, named input<br />

_magnitude that repres<strong>en</strong>ts the single<br />

value accepted by this formula. On<br />

the other hand, CalculusFormula<br />

class has a list of Magnitude class as<br />

attribute because a calculated measurem<strong>en</strong>t<br />

comes from one or several<br />

data.<br />

Conversion formulas require<br />

to be specialised. The conversion of<br />

an instrum<strong>en</strong>tal unit (e.g. an absorbance<br />

change with time) into a<br />

123


Manuel Urbano Cuadrado Tesis Doctoral<br />

chemical unit (e.g. g l -1 ) is much more<br />

complex than a conversion in which<br />

only two chemical units (e.g. mol l -1<br />

and ppm) are involved. This is a<br />

consequ<strong>en</strong>ce of the necessity of<br />

characterising the instrum<strong>en</strong>tal response.<br />

Thus, class FormulaConversion<br />

is specialised into class<br />

CalibrationCurve. The new structure<br />

involves an attribute named calibration,<br />

which is of Calibration class<br />

type. This class repres<strong>en</strong>ts the<br />

calibration process and manages<br />

information of the date wh<strong>en</strong> this step<br />

was carried out, the type of calibration<br />

used, the instrum<strong>en</strong>t employed,<br />

patterns, etc. The new classes<br />

CalibrationType, LinearCalibration,<br />

LogaritmicCalibration, Measurem<strong>en</strong>t-<br />

Calibration and Measurer are thus<br />

required.<br />

The class Analyser (see Fig.<br />

5) repres<strong>en</strong>ts analytical equipm<strong>en</strong>t<br />

from the point of view of data<br />

managem<strong>en</strong>t. The association betwe<strong>en</strong><br />

classes Magnitude and Analyser (not<br />

shown in Fig. 5) gives place to a new<br />

class named Measurer that repres<strong>en</strong>ts<br />

the feasibility of measuring an<br />

analytical parameter in a specific unit<br />

124<br />

with a giv<strong>en</strong> instrum<strong>en</strong>t. Class<br />

Measurer is an attribute of the<br />

Calibration class, as well as, date, and<br />

both permit to search for the proper<br />

calibration in the database.<br />

To now, it has be<strong>en</strong> supposed<br />

that the type of calibration is<br />

univariate, which fulfil the major part<br />

of the analyses carried out in any<br />

laboratory —the signal from the<br />

instrum<strong>en</strong>t is oft<strong>en</strong> a value of<br />

absorbance or pot<strong>en</strong>tial, a height or<br />

peak area, slope, etc.—. Nevertheless,<br />

multivariate methods have be<strong>en</strong><br />

developed in the last years with the<br />

aim of obtaining the value of one or<br />

several parameters from a large<br />

number of variables, which is, most<br />

times, a spectrum. For the case in<br />

which multichannel spectrophotometers<br />

are not provided with<br />

chemometric software for multivariate<br />

calibration, a block of chemometrics<br />

has be<strong>en</strong> modelled for supplying this<br />

possibility.<br />

3.3 Classes diagram for multivariate<br />

calibration<br />

Multivariate calibration requires a<br />

large amount of standards which, in


Tr<strong>en</strong>ds Anal. Chem., <strong>en</strong>viado para su publicación Parte I, cap. 1<br />

turn, provide a huge amount of data.<br />

Two steps can be distinguished in the<br />

developm<strong>en</strong>t of a multivariate model,<br />

namely: training and validation —<br />

after which validated equations are<br />

obtained. Multivariate calibration is a<br />

continuous process, where the calibration<br />

set is continuously <strong>en</strong>larged in<br />

order to build ‘universal’ equations<br />

with a wider application field. A<br />

complete description of the chemometric<br />

modelling would require a<br />

long discussion that is out the scope<br />

of the research here pres<strong>en</strong>ted. Only<br />

the description in Fig. 6, a brief<br />

classes diagram, is giv<strong>en</strong>.<br />

Class MultivariateEquation,<br />

which repres<strong>en</strong>ts an equation in<br />

multivariate calibration, is associated<br />

to Magnitude class. The latter class is<br />

<strong>en</strong>dowed with an attribute named<br />

equation, that is, a refer<strong>en</strong>ce to an<br />

object of the class Multivariate<br />

Equation. This attribute becomes null<br />

if the parameter associated to the<br />

object of the class Magnitude does not<br />

require multivariate calibration for its<br />

determination. Classes Spectral Measurem<strong>en</strong>t,<br />

Spectrum, and Spectral<br />

Datum, and their relationships must<br />

be tak<strong>en</strong> into account for predicting<br />

the value of the giv<strong>en</strong> parameter.<br />

Class SpectralMeasurem<strong>en</strong>t is a specialisation<br />

of the DatumMeasurem<strong>en</strong>t<br />

class, and therefore, it is associated to<br />

both a giv<strong>en</strong> sample and a specific<br />

parameter. This class provides, as<br />

specific attribute, an object of type<br />

class Spectrum —which repres<strong>en</strong>ts a<br />

spectrum <strong>en</strong>dowed with class Spectral<br />

Datum list named list_of_points—.<br />

The process of calibration is<br />

repres<strong>en</strong>ted by the differ<strong>en</strong>t associations<br />

betwe<strong>en</strong> the classes Multi<br />

variateEquation, MultivariateCalibration,<br />

MultivariateCalibration Type,<br />

PLSR, PCR, MLR and MCalibrationMeasurem<strong>en</strong>t.<br />

Thus, an instance<br />

of the class Multivariate Calibration<br />

is <strong>en</strong>dowed with a list of MCalibrationMeasurem<strong>en</strong>t<br />

objects that provide<br />

the spectrum corresponding to a<br />

pattern. In addition to the list of<br />

MCalibration Measurem<strong>en</strong>t objects,<br />

the class MultivariateCalibration is<br />

also provided with a Multivariate<br />

CalibrationType object —specialised<br />

in PLSR, PCR, and MLR— whose<br />

attributes and methods are the key for<br />

developing an instance of the class<br />

125


Manuel Urbano Cuadrado Tesis Doctoral<br />

MAGNITUDE MULTIVARIATE<br />

1..1 0..1 EQUATION<br />

126<br />

1..1<br />

1..1<br />

SPECTRAL<br />

MEASUREMENT<br />

< Uses ><br />

1..1<br />

SPECTRUM<br />

1..* 1..1<br />

1..1 *..*<br />

MULTIVARIATE<br />

CALIBRATION<br />

< Uses ><br />

1..1<br />

MULTIVARIATE<br />

CALIBRATION<br />

TYPE<br />

SPECTRAL<br />

DATUM<br />

Fig. 6. Classes diagram for data managem<strong>en</strong>t in analytical chemistry (III).<br />

Classes for repres<strong>en</strong>ting multivariate calibration.<br />

MultivariateEquation.<br />

3.4 Information from historical data:<br />

a tool for supporting decisions<br />

A module for perman<strong>en</strong>t storage of<br />

data of interest is mandatory for<br />

effici<strong>en</strong>t handling and analysis of the<br />

information. After analysing all the<br />

specified parameters for a giv<strong>en</strong><br />

sample, the corresponding data<br />

sample are stored into a historical<br />

repository and deleted from the<br />

module for daily managem<strong>en</strong>t. The<br />

modelling of the historical repository<br />

PLSR<br />

PCR<br />

MLR<br />

is shown in Fig. 6. This class diagram<br />

is similar to that of the managem<strong>en</strong>t<br />

of daily data.<br />

Class Query is used in order<br />

to extract information from historical<br />

data. This repres<strong>en</strong>ts a real-time query<br />

against the database aimed at obtaining<br />

tabular or graphical information.<br />

Thus, this class has a series of<br />

attributes and methods in charge of<br />

providing a list of data for building<br />

either a table or a plot. This class is<br />

specialised into classes EvolutionQuery<br />

and HistogramQuery for


Tr<strong>en</strong>ds Anal. Chem., <strong>en</strong>viado para su publicación Parte I, cap. 1<br />

fulfilling the characteristics of the<br />

searching criteria. An object of the<br />

EvolutionQuery is aimed at obtaining<br />

the evolution of one or several<br />

parameters with the value of either a<br />

numerical or date code. The<br />

association betwe<strong>en</strong> classes EvolutionQuery,<br />

Statistics and DataList<br />

provides statistical parameters of the<br />

data. For example: mean, increm<strong>en</strong>t,<br />

maximum, minimum, standard deviation,<br />

etc.<br />

On the other hand, Histogram<br />

Query class is in charge of obtaining<br />

the data necessary for building a<br />

frequ<strong>en</strong>cy histogram. Here, the main<br />

searching criterion is a set of intervals<br />

for a numerical or date code, or a set<br />

of values for a text code.<br />

3.5 Managem<strong>en</strong>t of users and<br />

analytical equipm<strong>en</strong>t<br />

The user of an LIMS can be of 3<br />

types. Firstly, technicians are users in<br />

charge of performing daily tasks in<br />

the laboratory, namely: inclusion and<br />

codification of new samples and<br />

specification of the parameters to be<br />

analysed, control of the workload,<br />

g<strong>en</strong>eration of reports, developm<strong>en</strong>t of<br />

the analyses carried out manually,<br />

validation of results, etc. These users<br />

interact with the computers system at<br />

an operational level. Secondly,<br />

managers are users in charge of<br />

extracting information from the data<br />

by a tabular or graphical output after a<br />

real-time query against a historical<br />

repository using differ<strong>en</strong>t criteria.<br />

This interaction is of the highest level<br />

since the system behaves as a tool for<br />

supporting decisions. In addition to<br />

this functionality, managers use the<br />

system with the aim of evaluating the<br />

workload, controlling the use of the<br />

equipm<strong>en</strong>t, etc. The last type of users<br />

is the administrators of the system,<br />

responsible for the security, integrity<br />

and privacy of the analytical<br />

information. The hierarchical order of<br />

the class User is shown in Fig. 4.<br />

Class Analyser has id<strong>en</strong>tifier,<br />

brand, model, list_of_magnitudes, acquisition_date,<br />

among other attributes.<br />

The association with class<br />

Magnitude yields the class Measurer,<br />

comm<strong>en</strong>ted in a previous section.<br />

Also, the association betwe<strong>en</strong> classes<br />

Measurem<strong>en</strong>t, Analyser, and Technician<br />

provides a new class named<br />

127


Manuel Urbano Cuadrado Tesis Doctoral<br />

AnalyserUse that repres<strong>en</strong>ts the use of<br />

an analyser by a technician in order to<br />

determine a giv<strong>en</strong> parameter. This<br />

class permits to control the managem<strong>en</strong>t<br />

and use of the analytical<br />

equipm<strong>en</strong>t.<br />

4. Conclusions<br />

The advantages aris<strong>en</strong> from two<br />

object-ori<strong>en</strong>ted models, for automation<br />

and data managem<strong>en</strong>t, have<br />

be<strong>en</strong> discussed in this work.<br />

The automation model is a<br />

new way for repres<strong>en</strong>ting the analytical<br />

equipm<strong>en</strong>t. This model takes<br />

into account the hierarchy and<br />

concepts corresponding to IUPAC<br />

definitions, and, on the other hand,<br />

classifications proposed in the analytical<br />

literature. Thus, the <strong>en</strong>capsulation<br />

of attributes and methods in a<br />

giv<strong>en</strong> class, and the inheritance,<br />

specialisation and aggregation pro<br />

cesses provide the mechanisms for<br />

specifying the structure of any<br />

autoanalyser and the operations it can<br />

carry out.<br />

The structure of this model<br />

makes possible its coupling with a<br />

standard interface for automating<br />

128<br />

analytical processes, taking advantages<br />

from both polymorphism and<br />

classes libraries in order to <strong>en</strong>large the<br />

functionality of the programs without<br />

changing the control flow in the code.<br />

Both the implem<strong>en</strong>tation of the<br />

abstract methods by the manufacturers’<br />

classes and the use of Java for<br />

translating the model into a physical<br />

system guarantee the indep<strong>en</strong>d<strong>en</strong>ce of<br />

the software regarding analytical<br />

equipm<strong>en</strong>t and hardware, respectively.<br />

The model for data managem<strong>en</strong>t<br />

also takes into account the above<br />

comm<strong>en</strong>ted characteristics of the<br />

object-ori<strong>en</strong>ted modelling. In this<br />

case, the proposed model assures the<br />

developm<strong>en</strong>t of an LIMS with a high<br />

degree of scalability regarding<br />

production process to be monitored,<br />

information to be stored, differ<strong>en</strong>t<br />

users that interact with the system,<br />

etc.<br />

Acknowledgem<strong>en</strong>ts<br />

The Comisión Interministerial de<br />

Ci<strong>en</strong>cia y Tecnología (CICyT) is<br />

thanked for financial support (Project<br />

AGL2000-0321-P4-03).


Tr<strong>en</strong>ds Anal. Chem., <strong>en</strong>viado para su publicación Parte I, cap. 1<br />

Refer<strong>en</strong>ces<br />

[1] R.P.R. Rocha, B.F. Reis, E.A.G.<br />

Zagatto, J.L.F.C. Lima, R.A.S.<br />

Lapa, J.L.M Santos, Anal. Chim.<br />

Acta 468 (2002) 119.<br />

[2] E.P. Borges, P.B. Martelli, B.F.<br />

Reis, Mikrochim. Acta 135 (2000)<br />

179.<br />

[3] K.A. Howell, E.P Achterberg,<br />

C.B. Braungardt, A.D. Tappin,<br />

P.J. Worsfold, D.R. Turner,<br />

Tr<strong>en</strong>ds Anal. Chem. 22 (2003)<br />

828.<br />

[4] B.F. Ni, P.S. Wang, H.L. Nie,<br />

S.Y. Li, X.F. Liu, W.Z. Tian, J.<br />

Radioanal. Nucl. Chem. 244<br />

(2000) 665.<br />

[5] A. Calmon, L. Dusserre-Bresson,<br />

V. Bellon-Maurel, P. Feuilloley,<br />

F. Silvestre, Chemosphere 41<br />

(2000) 645.<br />

[6] X.J. Li, H. Zhang, J.A. Ranish, R.<br />

Aebersold,<br />

(2003) 6648.<br />

Anal. Chem. 75<br />

[7] R. Perez de Alejo, E.M.<br />

Rodriguez, I. Rodriguez, D.<br />

Uribazo, E.D. Alvarez, Meas. Sci.<br />

Technol.13 (2002) 95.<br />

[8] M. Bitton, Spectra Anal. 31<br />

(2002) 37.<br />

[9] M. Pradella, R. Dorizzi, A.<br />

Burlina, Chemom. Intell. Lab.<br />

Syst. 17 (1992) 187.<br />

[10] Y. Vander-Heyd<strong>en</strong>, P. Van<br />

keerbergh<strong>en</strong>, M. Novic, J. Zupan,<br />

D.L. Massart, Talanta 51 (2000)<br />

455.<br />

[11] P. Vankeerbergh<strong>en</strong>, J. Smeyers-Verbeke,<br />

D.L. Massart, J.<br />

Anal. At. Spectrom. 11 (1996)<br />

149.<br />

[12] M. Praisler, I. Dirinck, J. Van<br />

Bocxlaer, A .de Le<strong>en</strong>heer, D.L.<br />

Massart, Talanta 53 (2000); 155.<br />

[13] M. Peris, Crit. Rev. Anal.<br />

Chem. 26 (1996) 219.<br />

[14] R.S. Pressman, Software<br />

Engineering: a Practitioner’s Approach,<br />

McGraw-Hill, New York,<br />

1997.<br />

[15] I. Sommerville, Software Engineering,<br />

Addison-Wesley Longman<br />

Inc, 1996.<br />

[16] R.G. Fichman, C.F. Kemerer,<br />

Computers 25(10) (1992) 22.<br />

[17] G. Booch, IEEE Trans. Software<br />

Engineer. SE-12(2) (1986)<br />

129


Manuel Urbano Cuadrado Tesis Doctoral<br />

130<br />

211.<br />

[18] K. Smith, J. Duckworth, K.<br />

Harrington, J. Bebel, Am. Lab.<br />

(Shelton, Conn). 32 (2000) 28.<br />

[19] R.E. Majoras, W.M. Richardson,<br />

R.S. Seymour, J. Radioanal.<br />

Nucl. Chem. 193 (1995) 207.<br />

[20] I. Jacobson, G. Booch, J. Rum<br />

baugh, The Unified Software<br />

Developm<strong>en</strong>t Process, Addison-<br />

Wesley Longman Inc, 1999.<br />

[21] M. Campione, The Java<br />

Tutorial Third Edition. McGraw-<br />

Hill, 2002, (http://java.sun.com).<br />

[22] F. Z<strong>en</strong>ie, Int. Lab. 32(1)<br />

(2002) 22.<br />

[23] M. Urbano, M.D. Luque de<br />

Castro, M.A. Gómez-Nieto, Automation<br />

of Flow Injection Methods<br />

in the Winery Industry through a<br />

Computer Program based on a<br />

Multilayer Model. Proceedings of<br />

9th IEEE International Confer<strong>en</strong>ce<br />

on Emerging Technologies<br />

and Factory Automation. Lisbon,<br />

Portugal, September, 2003.<br />

[24] M. Urbano, M.D. Luque de<br />

Castro, M.A. Gómez-Nieto,<br />

Tr<strong>en</strong>ds Anal. Chem. 23 (2004)<br />

270.<br />

[25] E. Yourdon, Developm<strong>en</strong>t<br />

Strategies 6(12) (1994) 1.


Capítulo 2<br />

AN OPEN SOLUTION FOR<br />

COMPUTER CONTROL OF FLOW<br />

INJECTION ANALYSES IN WINE<br />

PRODUCTION MONITORING<br />

El cont<strong>en</strong>ido de este capítulo ha sido <strong>en</strong>viado para su publicación a la revista<br />

Computers and Electronics in Agriculture y ha sido pres<strong>en</strong>tado como<br />

comunicación oral <strong>en</strong> la 9th International Confer<strong>en</strong>ce on Emerging Technologies<br />

and Factory Automation, celebrada <strong>en</strong> Lisboa (Portugal) <strong>en</strong>tre los días 16 y 19 de<br />

Septiembre de 2003.


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 2<br />

AN OPEN SOLUTION FOR COMPUTER CONTROL OF FLOW<br />

INJECTION ANALYSES IN WINE PRODUCTION MONITORING<br />

Abstract<br />

M. Urbano Cuadrado, M.D. Luque de Castro, M.A. Gómez-Nieto<br />

A computer program for the design and control of automated methods<br />

for wine analysis based on the Flow Injection (FI) technique is proposed. It has<br />

be<strong>en</strong> provided with differ<strong>en</strong>t layers, <strong>en</strong>compassing a physical ori<strong>en</strong>ted layer to<br />

user and analysis design layers. The user layer permits control the equipm<strong>en</strong>t,<br />

and the design layer allows selection of both the analytical instrum<strong>en</strong>ts and the<br />

actions to be performed by these instrum<strong>en</strong>ts. Thus, the analyses are carried out<br />

in an automated manner wh<strong>en</strong> they are based on FI. The use of Java and XML<br />

languages <strong>en</strong>dows the proposed system with versatility to be installed in any<br />

platform.<br />

Keywords: Automation, Flow injection, Java, XML, Object-ori<strong>en</strong>ted system.<br />

133


Manuel Urbano Cuadrado Tesis Doctoral<br />

1. Introduction<br />

The monitoring of wine production is<br />

supported by a number of chemical<br />

analyses in both must and wine<br />

samples. Wineries use official and<br />

routine methods to determine most of<br />

the <strong>en</strong>ological parameters. These<br />

methods have shortcomings in<br />

relation to both long analysis times<br />

and little —mostly nil— degree of<br />

automation. In rec<strong>en</strong>t years, new<br />

methods have be<strong>en</strong> implem<strong>en</strong>ted in<br />

the <strong>en</strong>ological laboratories with the<br />

aim of overcoming these limitations.<br />

These methods have oft<strong>en</strong> be<strong>en</strong> based<br />

on Flow Injection (FI) technique<br />

(Mataix and Luque de Castro, 1998,<br />

Mataix and Luque de Castro, 2000,<br />

González et al., 2001, González et al.,<br />

2002).<br />

Since the beginning of its<br />

inv<strong>en</strong>tion (Stewart et al., 1974,<br />

Ruzicka and Hans<strong>en</strong>, 1975) FI has<br />

be<strong>en</strong> considered an easy to automate<br />

technique. Despite this g<strong>en</strong>eral acceptance,<br />

few FI methods are automated<br />

methods in the strict s<strong>en</strong>se of the word<br />

“automated”; that is, without human<br />

interv<strong>en</strong>tion and with the capacity for<br />

134<br />

making decisions through a feed-back<br />

system. The degree of automation<br />

involved in a giv<strong>en</strong> FI method varies<br />

from pot<strong>en</strong>tial automation —expressed<br />

as “The system described can<br />

easily be automated and controlled<br />

from a personal computer” (Collins et<br />

al., 2001), or “The proposed method<br />

is suitable for automatic and<br />

continuous analysis” (Li et al.,<br />

2001)— to a real automatic approach<br />

(Danet et al., 2001). There are<br />

intermediate states such as the use of<br />

the label “automated” based on the<br />

single fact of their continuous<br />

functioning (Delgado et al., 2001,<br />

Okamura et al., 2001, Nitao et al.,<br />

2001, Solich et al., 2001); data are<br />

collected by a computer (Zhang and<br />

Beck., 2001, Sh<strong>en</strong> et al., 2001) or any<br />

of the FI units works unatt<strong>en</strong>ded<br />

(López et al., 2002).<br />

On the other hand, the use of<br />

computer programs for the control of<br />

the analytical equipm<strong>en</strong>t is not very<br />

frequ<strong>en</strong>t in wineries due to the fact<br />

that each analysis is carried out by a<br />

giv<strong>en</strong> hardware manifold. Thus,<br />

specific software must be used for<br />

each method.


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 2<br />

The work here pres<strong>en</strong>ted was<br />

aimed at the developm<strong>en</strong>t of a<br />

computer system to control the<br />

<strong>en</strong>ological analyses based on FI in a<br />

configurable and op<strong>en</strong> way that<br />

surpasses<br />

reviewed.<br />

the limitations above<br />

2. Materials and methods<br />

2.1 Apparatus and instrum<strong>en</strong>ts used in<br />

the developm<strong>en</strong>t and testing of the<br />

program<br />

Apparatus and instrum<strong>en</strong>ts from<br />

differ<strong>en</strong>t suppliers have be<strong>en</strong> used,<br />

namely: a Gilson Minipuls3 peristaltic<br />

pump (Villiers le Bel, France); a<br />

Rheodyne 7010 automatic injection<br />

valve (Elkay, Galway, Ireland) and a<br />

Rheodyne 5012 automatic selection<br />

valve (Elkay, Galway, Ireland)<br />

connected to a Gilson Valvemate111<br />

valvemate (Villiers le Bel, France); a<br />

Unicam 8625 UV-Vis spectrophotometer<br />

(Cambridge, England); a<br />

Kontron SFM 25 spectrofluorimeter<br />

(Zurich, Switzerland).<br />

Several lists of commands<br />

have be<strong>en</strong> used to control the above<br />

apparatus and instrum<strong>en</strong>ts by a<br />

computer (Gilson, Minipuls 3<br />

Peristaltic Pump, User’s Guide;<br />

Gilson ValvemateTM Valve Actuator,<br />

User’s Guide; Unicam Limited, 8625<br />

Series UV/Visible Spectrometer,<br />

User’s Guide; Kontron Instrum<strong>en</strong>ts,<br />

SFM 25, User’s Guide). On the other<br />

hand, Gilson uses a specific communication<br />

protocol, a serial GSIOC<br />

port (Gilson Serial input/output<br />

channel) which works under the<br />

RS485 protocol. This port hinders the<br />

establishm<strong>en</strong>t of communication<br />

directly through RS232C ports. A<br />

506C interface (Gilson, 506C System<br />

Interface, User’s Guide) from Gilson<br />

is necessary. This interface makes<br />

possible the control of Gilson<br />

hardware (until 64 by only an<br />

RS232C port).<br />

2.2 Semi-automated methods used<br />

The following methods have be<strong>en</strong><br />

used in the construction and testing of<br />

the system: Semiautomatic Flow-<br />

Injection Method for the Determination<br />

of Volatile Acidity in Wines<br />

(González et al., 2001); Determination<br />

of Total and Free Sulphur Dioxide in<br />

Wine by Pervaporation-Flow Injec-<br />

135


Manuel Urbano Cuadrado Tesis Doctoral<br />

tion (Mataix et al., 1998);<br />

Simultaneous Determination of<br />

Ethanol and Glycerol in Wines by a<br />

Flow Injection-Pervaporation Approach<br />

with Parallel Photometric and<br />

Fluorimetric Detection (Mataix et al.,<br />

2000); Method for the Simultaneous<br />

Determination of Total Polyph<strong>en</strong>ol<br />

and Anthocyan Indexes in Red Wines<br />

Using a Flow Injection Approach<br />

(González et al., 2002).<br />

2.3 Technology used<br />

For the construction of the system,<br />

both the object-ori<strong>en</strong>ted and the<br />

evolutionary increm<strong>en</strong>tal software<br />

<strong>en</strong>gineering paradigms have be<strong>en</strong><br />

used. Unified Modelling Language<br />

(UML) (Booch et al., 1999, Rumbaugh<br />

et al., 1999, Jacobson et al.,<br />

1999) has be<strong>en</strong> used for the modelling<br />

of the program; C (Herbert, 2000) and<br />

Java (Anderson and Stone, 1999,<br />

Campione, 2002, Eckel, 2003)<br />

languages have be<strong>en</strong> used in the<br />

developm<strong>en</strong>t step. On the other hand,<br />

eXt<strong>en</strong>sible Markup Language (XML)<br />

(Morrison et al., 2000, Goldfarb and<br />

Prescod, 2001) has be<strong>en</strong> used as<br />

storage structure. Technologies for<br />

136<br />

joining Java and XML —JDOM,<br />

JAXB and SAX (Jasnokwski,<br />

2002)— have also be<strong>en</strong> used.<br />

2.4 Software architecture for the<br />

developm<strong>en</strong>t of flow injection<br />

analysis<br />

For the developm<strong>en</strong>t of the system, a<br />

physical and logical control on the<br />

hardware compon<strong>en</strong>ts is necessary, in<br />

such as way that the situation of each<br />

compon<strong>en</strong>t can be known —and<br />

modified, if necessary— before,<br />

during, and after a giv<strong>en</strong> analytical<br />

test.<br />

A layered architecture model<br />

capable of providing indep<strong>en</strong>d<strong>en</strong>ce for<br />

working with the differ<strong>en</strong>t FI<br />

manifolds and modus operandi has<br />

be<strong>en</strong> used for software construction.<br />

As shown in Fig. 1, the system is<br />

based on a multi-layer model, which<br />

takes into account the functionality of<br />

the system at differ<strong>en</strong>t abstraction<br />

levels, from the physical or hardware<br />

aspects to the analyst, who defines the<br />

analytical method through which the<br />

analysis is carried out. The layers or<br />

software compon<strong>en</strong>ts in the proposed<br />

model are as follows:


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 2<br />

Configuration of FI analyses<br />

dep<strong>en</strong>ding on requirem<strong>en</strong>ts of<br />

the equipm<strong>en</strong>t<br />

Design Layer<br />

:Java and XML<br />

compon<strong>en</strong>ts<br />

Each Java class repres<strong>en</strong>ts a<br />

hardware elem<strong>en</strong>t, assuring<br />

the logical structure of the<br />

analysis<br />

Communication betwe<strong>en</strong> the<br />

logical structure and the<br />

hardware drivers<br />

Primary functionality for<br />

instrum<strong>en</strong>t control<br />

Input/output of information in<br />

the software system<br />

Operator Layer<br />

:IU: Interface Java<br />

Logical Layer<br />

:Java Classes<br />

Communication Layer<br />

:C Procedures<br />

Drivers Layer<br />

:Drivers Hardware<br />

Fig. 1. Layer model of the approach for the design and control of flow injection<br />

analysis.<br />

(a) The drivers layer: hardware level<br />

This layer comprises commands or<br />

functions both to make the hardware<br />

operative (e.g. to change the position<br />

of an injection valve) and to collect<br />

the primary and physical information<br />

(e.g. to check the functioning of a<br />

137


Manuel Urbano Cuadrado Tesis Doctoral<br />

peristaltic pump). It is a supplierdep<strong>en</strong>d<strong>en</strong>t<br />

layer as each supplier does<br />

a giv<strong>en</strong> physical communication<br />

protocol for the hardware he/she<br />

fabricates.<br />

The driver layer can be<br />

constructed in any language —which<br />

usually is a low or medium level<br />

language as, for example, C— and it<br />

is supplied as a compiled function<br />

library. The information of how to<br />

deploy and to use this library was<br />

provided by the hardware supplier.<br />

App<strong>en</strong>dix 1 shows the basic<br />

functions pres<strong>en</strong>t in this file for the<br />

control, not only of the peristaltic<br />

pump, but also of any hardware from<br />

Gilson. Two functions are used to<br />

s<strong>en</strong>d two types of commands to the<br />

hardware units: type I or Immediate<br />

commands, which use the ICmd<br />

function and ask for information<br />

about the hardware state; and type B<br />

or Buffered commands, which use the<br />

BCmd function and s<strong>en</strong>d operative<br />

instructions to the hardware units. An<br />

example of commands defined for the<br />

control of Minipuls3 [17] are: “K>”<br />

(B type), which makes the pump work<br />

clock-wise, and “K” (I type), which<br />

138<br />

retrieves the direction and velocity of<br />

the pumped fluid.<br />

(b) Base layer: communication with<br />

the drivers<br />

This communicates the drivers layer<br />

with the logical level. It implem<strong>en</strong>ts<br />

all the functionality the hardware is<br />

able to develop and <strong>en</strong>sures that the<br />

logical structure of the system<br />

recognises the hardware elem<strong>en</strong>ts.<br />

This layer has be<strong>en</strong> constructed<br />

using C language to achieve<br />

optimum exploitation of the<br />

computation resources and easy<br />

integration of its programs into other<br />

computer languages. This last<br />

characteristic makes it possible to link<br />

this level layer with the upper<br />

(Logical layer), constructed with Java<br />

technology. The modules developed<br />

with Java invoke methods writt<strong>en</strong> in C<br />

through the JNI. The software<br />

procedures which constitute the Base<br />

layer are used from native Java<br />

methods through a dynamic library<br />

(.dll) where the object procedures<br />

developed in C language are located.<br />

App<strong>en</strong>dix 2 shows an<br />

example of this layer through a C


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 2<br />

App<strong>en</strong>dix 1<br />

INTERFACE int (WINAPI DYNAMIC ICmd)( int unit,<br />

char const* cmd, char* rsp, int<br />

maxrsp );<br />

// returns 0=OK, 1=channel error, 4=undefined<br />

command, // 6=bad ID, 8=response buffer overflow<br />

INTERFACE int (WINAPI DYNAMIC BCmd)( int unit,<br />

char const* cmd, char* rsp, int<br />

maxrsp);<br />

// returns 0=OK, 1=channel error, 2=unit busy, 3=unit<br />

// buffer overflow, 6=bad unit<br />

App<strong>en</strong>dix 2<br />

#include "gsioc32.h"<br />

#include "GilsonMinipuls3.h"<br />

.<br />

.<br />

.<br />

JNIEXPORT jint JNICALL<br />

Java_instrum<strong>en</strong>tal_bomba_GilsonMinipuls3_setVelocity<br />

(JNIEnv *<strong>en</strong>v, object jobj, jstring<br />

velocity, jint device)<br />

{<br />

int result;<br />

int slave = (int) device;<br />

char answer;<br />

const char *command = (*<strong>en</strong>v)->GetStringUTFChars(<strong>en</strong>v,<br />

speed, 0);<br />

// Drivers’ function.<br />

result = BCmd(slave,command,&answer,5);<br />

(*<strong>en</strong>v)->ReleaseStringUTFChars(<strong>en</strong>v, speed, command);<br />

return (jint)result;<br />

}<br />

function which has as objective to fix<br />

the velocity of the peristaltic pump<br />

Minipuls-3. The function interface<br />

and body of the function can be<br />

observed in this App<strong>en</strong>dix 2. The way<br />

for using the function BCmd of the<br />

Driver layer can be se<strong>en</strong> in the<br />

function body.<br />

(c) Logical layer: control level<br />

The logical layer comprises a group of<br />

Java classes in correspond<strong>en</strong>ce with<br />

139


Manuel Urbano Cuadrado Tesis Doctoral<br />

each of the differ<strong>en</strong>t hardware<br />

elem<strong>en</strong>ts. These classes include in<br />

their definition a group of methods<br />

which make possible the control of<br />

the analysis carried out by FI.<br />

The technology used in this<br />

layer provides the system with a<br />

parallel availability for executing<br />

several tasks simultaneously and with<br />

a very precise time control. In<br />

addition, —and giv<strong>en</strong> the logical<br />

character of this level concerning the<br />

chemical problem under study— the<br />

developm<strong>en</strong>t of a multiplatform system<br />

for <strong>en</strong>suring its op<strong>en</strong> configuration<br />

is conv<strong>en</strong>i<strong>en</strong>t.<br />

Under these requirem<strong>en</strong>ts, the<br />

logical layer has be<strong>en</strong> developed<br />

using the Java language, which<br />

provides the Logic layer structure<br />

which exactly corresponds to the<br />

conceptual repres<strong>en</strong>tation of an FI<br />

system. The usefulness of this Java<br />

characteristic is used in the construction<br />

of the java.instrum<strong>en</strong>tal.valve<br />

package, which includes the<br />

classes repres<strong>en</strong>tative of the apparatus<br />

responsible for injecting and selecting<br />

samples and reag<strong>en</strong>t in the analyser.<br />

Another characteristic of Java is its<br />

140<br />

capacity to support multithread or<br />

concurr<strong>en</strong>t programs, which <strong>en</strong>able<br />

the simultaneous developm<strong>en</strong>t of<br />

several synchronised tasks.<br />

An example of this level is the<br />

class Unicam8625.java, which repres<strong>en</strong>ts<br />

the detector UV-Visible Unicam<br />

8625. One of the methods defined is<br />

that in charge of changing the<br />

wavel<strong>en</strong>gth, th<strong>en</strong> adjusting the<br />

baseline. This method invokes Thread<br />

.sleep, which stops the program<br />

execution for an interval specified in<br />

the input argum<strong>en</strong>t. This delay time is<br />

necessary because after changing the<br />

wavel<strong>en</strong>gth, the spectrophotometer<br />

requires time to locate the monochromator<br />

in the new selected<br />

position and th<strong>en</strong> for adjusting the<br />

baseline. App<strong>en</strong>dix 3 shows the Java<br />

code for this method.<br />

(d) Operator layer: user interface<br />

This level controls the execution of<br />

the differ<strong>en</strong>t wine analyses carried out<br />

from the point of view of interaction<br />

with the user. From this level, the<br />

system starts to be “tangible” to the<br />

analyst, as it allows the input and<br />

output of information in the software.


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 2<br />

App<strong>en</strong>dix 3<br />

public void changeWavel<strong>en</strong>gth(String port, String<br />

wavel<strong>en</strong>gth, Integer timesleep)<br />

{<br />

try{<br />

setWavel<strong>en</strong>gth(port, wavel<strong>en</strong>gth);<br />

try{<br />

Thread.Sleep(timesleep);<br />

}catch(InterruptedException<br />

e){System.out.println ("error in<br />

Thread.Sleep()");}<br />

setZeroAbs(port);<br />

}catch(Exception e){}<br />

This level has be<strong>en</strong> built using<br />

java.awt and java.swing packages,<br />

giving rise to the powerful windows<br />

based interface. In this layer the user<br />

can stop, cancel and re-start the<br />

execution of a giv<strong>en</strong> analysis.<br />

(e) Experim<strong>en</strong>t layer: design of flow<br />

injection methods<br />

This level <strong>en</strong>ables the design of an<br />

analysis. FI analyses consist of a<br />

series of actions to be developed by<br />

the instrum<strong>en</strong>ts involved. In this layer<br />

the information referred to number<br />

and type of instrum<strong>en</strong>ts involved and<br />

actions to be carried out by these<br />

instrum<strong>en</strong>ts is defined.<br />

This level was developed<br />

using Java and XML. The first allows<br />

the building of a user interface for the<br />

design, and the second provides the<br />

information storage structure. Thus,<br />

.xml files are used in order to store the<br />

definitions of the differ<strong>en</strong>t analysis.<br />

On the other hand, the joint use of<br />

Java and XML (thanks to the JAXB,<br />

SAX and JDOM programming<br />

interfaces) makes it possible to build<br />

both the Java classes corresponding to<br />

the equipm<strong>en</strong>t and the procedure<br />

through which the analysis is carried<br />

out, taking into account data stored in<br />

the configuration file.<br />

141


Manuel Urbano Cuadrado Tesis Doctoral<br />

2.5 Software developed<br />

142<br />

Fig. 2. Example of the interface for FI analyses design.<br />

The product is a computer application<br />

for the control of <strong>en</strong>ological analyses<br />

based on the FI technique and it is<br />

being used in a winery of the appellation<br />

d’origine “Montilla-Moriles”. It<br />

is formed by two tools: the first is in<br />

charge of either defining or modifying<br />

the procedure of the analysis and the<br />

second is in charge of executing a<br />

giv<strong>en</strong> analysis.<br />

The design tool is a graphical<br />

interface through which the user<br />

defines both the instrum<strong>en</strong>ts and<br />

actions to be developed. Figure 2<br />

shows this interface, in which, the<br />

hierarchical m<strong>en</strong>u repres<strong>en</strong>ting the<br />

analysis is on the left. The rest of the<br />

window is devoted to a framework


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 2<br />

where sub-frames for data introduction<br />

and modification are launched if<br />

the user clicks the new elem<strong>en</strong>t button<br />

or the corresponding left elem<strong>en</strong>t,<br />

respectively.<br />

The execution tool is a<br />

graphical interface created dynamically<br />

taking into account the data<br />

referred to the giv<strong>en</strong> analysis that are<br />

stored in the .xml file. Figure 3 shows<br />

the control interface for the determination<br />

of volatile acidity, which<br />

requires a pump, two injection valves<br />

and a photometric detector. The<br />

control application charges a<br />

subgroup interface —a frame— for<br />

each type of hardware. In this case,<br />

the interface will be composed by a<br />

peristaltic pump frame, a valve frame<br />

and a detector frame. The interface<br />

differ<strong>en</strong>tiates each hardware elem<strong>en</strong>t<br />

wh<strong>en</strong> the number of elem<strong>en</strong>ts is<br />

higher than 1; that is, in the above<br />

example, in the valves frame two subframes<br />

are charged.<br />

As can be se<strong>en</strong> in Figure 3,<br />

there are interface elem<strong>en</strong>ts devoted<br />

to output information inher<strong>en</strong>t to the<br />

giv<strong>en</strong> analysis. This information<br />

involves several aspects, namely<br />

analysis time elapsed, activities in<br />

which the instrum<strong>en</strong>ts is involved at<br />

pres<strong>en</strong>t (sample injection, detector<br />

monitoring, activated rinsing stream,<br />

etc.), results in a graphical and<br />

numerical format, anomalous instrum<strong>en</strong>t<br />

behaviour, etc.<br />

3. Results and discussion<br />

3.1 Users participation<br />

(a) Users in the developm<strong>en</strong>t of the<br />

software<br />

The participation of differ<strong>en</strong>t users —<br />

analysts and technicians— in the<br />

developm<strong>en</strong>t of the system has be<strong>en</strong><br />

made possible by the use of the<br />

evolutionary increm<strong>en</strong>tal paradigm.<br />

Thus, the requirem<strong>en</strong>ts for interface<br />

designs, instrum<strong>en</strong>ts control, functionality<br />

of the system, etc., have<br />

be<strong>en</strong> established by the users in<br />

various meetings. A prototype has<br />

be<strong>en</strong> installed in the laboratory for a<br />

first checking step.<br />

(b) Users in the analytical control<br />

under the system<br />

The program makes it possible to<br />

develop differ<strong>en</strong>t wine analyses<br />

143


Manuel Urbano Cuadrado Tesis Doctoral<br />

without users interv<strong>en</strong>tion. The user<br />

defines the analysis and th<strong>en</strong>, the<br />

definition can be modified if the<br />

experim<strong>en</strong>tal conditions change.<br />

Figure 4 shows the functionality<br />

referred to definition and modification<br />

of analyses. Ethanol_Glycerol.xml —<br />

for the simultaneous determination of<br />

ethanol and glycerol—, VolatileAciditiy.xml<br />

—for the determination of<br />

144<br />

Fig. 3. Example of the control interface.<br />

volatile acidity—, Total_Free_SulphurDioxide.xml<br />

—for the determination<br />

of total and free sulphur<br />

dioxide— and TotalPolyph<strong>en</strong>ol_Anthocyan.xml<br />

—for the simultaneous<br />

determination of total polyph<strong>en</strong>ol<br />

index and total anthocyan index—<br />

have be<strong>en</strong> defined for testing the<br />

systems.<br />

For the execution of the


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 2<br />

Chemist<br />

Analysis<br />

Definition<br />

Update of<br />

Analysis<br />

analyses the users load the<br />

corresponding .xml files and the<br />

sample codes, before clicking the<br />

“execute analysis” button.<br />

3.2 Improvem<strong>en</strong>ts and limitations<br />

The following improvem<strong>en</strong>ts have<br />

be<strong>en</strong> achieved using this automation<br />

approach:<br />

include<br />

include<br />

include<br />

include<br />

include<br />

include<br />

Selection of type and<br />

number of hardware<br />

Fig. 4. Functionality of the design layer.<br />

Selection of tasks for<br />

each hardware elem<strong>en</strong>t<br />

Save the definition<br />

for the new analysis<br />

and ready for run<br />

Retrieval of<br />

analysis by name<br />

Modification of<br />

neccesary data<br />

Save modifications<br />

and ready for run<br />

i. Diverse chemical parameters<br />

are determined under a unique<br />

program control. Thus, the<br />

user, after a learning period,<br />

controls most of the wine<br />

analyses carried out.<br />

ii. The program can be modified<br />

functionally with few changes<br />

in the architecture due to the<br />

145


Manuel Urbano Cuadrado Tesis Doctoral<br />

146<br />

op<strong>en</strong> and scalable structure of<br />

the system from the logical<br />

level.<br />

iii. The program can be installed<br />

in any platform (Windows,<br />

Linux, etc.).<br />

The main limitation of the program is<br />

the dep<strong>en</strong>d<strong>en</strong>ce of the drivers and<br />

communication layers on both the<br />

instrum<strong>en</strong>ts and the platform used. In<br />

this way, the compon<strong>en</strong>ts of many<br />

instrum<strong>en</strong>ts or apparatus in the<br />

laboratory for these levels have be<strong>en</strong><br />

built under Windows and Linux.<br />

Nevertheless, the introduction of a<br />

new device in the manifold of any<br />

analytical method makes necessary to<br />

develop the drivers —usually provided<br />

by suppliers— and communication<br />

compon<strong>en</strong>ts for this<br />

instrum<strong>en</strong>t.<br />

4. Conclusions<br />

The aim of this work was to introduce<br />

an op<strong>en</strong> and configurable tool for<br />

automation of wine production monitoring,<br />

int<strong>en</strong>ded to overcome the<br />

limitations of previous contributions,<br />

which have be<strong>en</strong> restricted to a giv<strong>en</strong><br />

method.<br />

The developm<strong>en</strong>t of this<br />

program has be<strong>en</strong> supported on a<br />

multi-layer model that <strong>en</strong>dows the<br />

control level —close to the analytical<br />

chemist— with maximum indep<strong>en</strong>d<strong>en</strong>ce<br />

of the physical tasks requirem<strong>en</strong>ts<br />

to communicate with<br />

instrum<strong>en</strong>ts. The main limitation of<br />

this model is in the programming of<br />

the low level layers compon<strong>en</strong>ts for<br />

each new type of instrum<strong>en</strong>t. On the<br />

other hand, the multi-layer model<br />

assures a program with op<strong>en</strong> and<br />

configurable characteristics.<br />

This contribution surpasses<br />

the role of the word “semi-automated”<br />

in many FI methods described in<br />

<strong>en</strong>ological analysis. Thus, a key tool<br />

to improve both the quality control<br />

and analysis times is pres<strong>en</strong>ted.<br />

New research lines are op<strong>en</strong>,<br />

such as remote control (through a web<br />

application) of the configuration and<br />

process monitoring, system of aid for<br />

reag<strong>en</strong>ts selection, etc.<br />

Acknowledgem<strong>en</strong>ts<br />

The Comisión Interministerial de<br />

Ci<strong>en</strong>cia y Tecnología (CICyT) is


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 2<br />

thanked for financial support (Project<br />

AGL2000-0321-P4-03). Users of the<br />

built system are thanked for their help<br />

in the developm<strong>en</strong>t of the system.<br />

Refer<strong>en</strong>ces<br />

Anderson, C.J., Stone, L.B., 1999.<br />

Manual de Oracle Jdeveloper<br />

(Oracle Jdeveloper Handbook).<br />

McGraw-Hill/Oracle Press,<br />

Madrid.<br />

Booch, G., Rumbaugh, J., Jacobson,<br />

I., 1999. The Unified Modelling<br />

Language. User Manual. Addison-Wesley<br />

Longman Inc,<br />

USA.<br />

Campione, M., 2002. The Java<br />

Tutorial Third Edition. Mc<br />

Graw-Hill.<br />

Collins, A., Nandakumar, M.P.,<br />

Csoeregi, E., Mattiasson, B.,<br />

1999. Monitoring of alphaketoglutarate<br />

in a ferm<strong>en</strong>tation<br />

process using expanded bed<br />

<strong>en</strong>zyme reactors. Bios<strong>en</strong>s.<br />

Bioelectron. 16(9-12), 765-771.<br />

Danet, A.F., Cheregi, M., Martinez,<br />

J., García, J.V., Aboul, H.Y.,<br />

2001. Flow-injection methods<br />

of analytes for waters. I.<br />

Inorganic species. Crit. Rev.<br />

Anal. Chem. 31 (3), 191-222.<br />

Delgado, F., Fernández-Romero, J.M.,<br />

Luque de Castro, M.D., 2001.<br />

Semi-automated spectrometric<br />

method for the determination of<br />

pectinesterase activity in natural<br />

and processed juices. Ana. Lett.,<br />

34 (13), 2277-2284.<br />

Eckel, B. 2003. Thinking in Java<br />

(Third Edition). Pr<strong>en</strong>tice Hall.<br />

Gilson S.A. LT801121K, 2001.<br />

Minipuls 3 Peristaltic Pump,<br />

User’s Guide. www.gilson.com.<br />

Gilson S.A. LT3331, 2001. ValvemateTM<br />

Valve Actuator.<br />

User’s Guide. www.Gilson.com<br />

Gilson S.A. LT3635, 2001. 506C<br />

System Interface, User’s Guide.<br />

www.gilson.com.<br />

Goldfarb, C., Prescod, P., 2001. XML<br />

Handbook (Fourth Edition).<br />

Pr<strong>en</strong>tice Hall.<br />

González, J., Pérez-Juan, P., Luque de<br />

Castro, M.D., 2001. Semiautomatic<br />

flow-injection method<br />

for the determination of<br />

volatile acidity in wines. J.<br />

AOAC Int., 84 (6), 1846-1850.<br />

González, J., Pérez-Juan, P., Luque de<br />

147


Manuel Urbano Cuadrado Tesis Doctoral<br />

Castro, M.D., 2002. Method for<br />

the simultaneous determination<br />

of total polyph<strong>en</strong>ol and<br />

anthocyan indexes in red wines<br />

using a flow injection approach.<br />

Talanta, 56, 53-59.<br />

Herbert, S., 2000. C: The Complete<br />

Refer<strong>en</strong>ce (Fourth Edition).<br />

McGraw-Hill.<br />

Jacobson, I., Booch, G., Rumbaugh,<br />

J., 1999. The Unified Software<br />

Developm<strong>en</strong>t Process. Addison-<br />

Wesley Longman Inc.<br />

Jasnokwski, M., 2002. Java, XML,<br />

and Web Services Bible.<br />

Hungry Minds.<br />

Kontron Instrum<strong>en</strong>ts, Spectrofluorimeter<br />

SFM 25, User’s<br />

Guide, Zurich, Switzerland.<br />

Li, B.X., Zhang, Z.J., Liu, W., 2001.<br />

Flow-injection chemiluminesc<strong>en</strong>ce<br />

determination of<br />

chlortetracycline using on-line<br />

electrog<strong>en</strong>erated [Cu(HIO6)2]5<br />

as the oxidant. Talanta, 55(6),<br />

1097-1102.<br />

Lopez, I., Merino, B., Campillo, N.,<br />

Hernandez, M., 2002. On-line<br />

filtration system for deter<br />

mining total chromium and<br />

148<br />

chromium in the soluble fraction<br />

of industrial efflu<strong>en</strong>ts by<br />

flow injection flame atomic.<br />

Anal. Bioanal. Chem., 373(1-2),<br />

98-102.<br />

Mataix, E., Luque de Castro, M.D.,<br />

1998. Determination of total<br />

and free sulphur dioxide in wine<br />

by pervaporation-flow injection.<br />

Analyst, 123, 1547.<br />

Mataix, E., Luque de Castro, M.D.,<br />

2000. Simultaneous determination<br />

of ethanol and glycerol<br />

in wines by a flow injectionpervaporation<br />

approach with<br />

parallel photometric and<br />

fluorimetric detection. Talanta,<br />

51, 489.<br />

Morrison, M., 2000. XML Unleashed.<br />

Pr<strong>en</strong>tice Hall.<br />

Nitao, J.K., Birr, B.A., Nair, M.G.,<br />

Herms, D.A., Mattson, M.J.,<br />

2001. Rapid quantification of<br />

proanthocyanidins (cond<strong>en</strong>sed<br />

tannins) with a continuous flow<br />

analyser. J. Agric. Food. Chem.,<br />

49(5), 2207-2214.<br />

Okamura, K., Sugiyama, M., Obata,<br />

H., Maruo, M., Nakayama, E.,<br />

Karatani, H., 2000. Automated


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 2<br />

determination of vanadium(IV)<br />

and (V) in natural waters based<br />

on chelating resin separation<br />

and catalytic detection with<br />

bindschedler’s gre<strong>en</strong> leuco base.<br />

Anal. Chim. Acta., 443(1), 143-<br />

151.<br />

Rumbaugh, J., Jacobson, I., Booch,<br />

G., 1999. The Unified Modelling<br />

Language. Refer<strong>en</strong>ce<br />

Manual. Addison-Wesley Long<br />

man Inc.<br />

Ruzicka, J., Hans<strong>en</strong>, E.H., 1975. Anal.<br />

Chim. Acta 78, 145.<br />

Sh<strong>en</strong>, H.L., Grung, B., Kvalheim,<br />

O.M., Eide, I., 2001. Automated<br />

curve resolution applied to data<br />

from multi-detection instrum<strong>en</strong>ts.<br />

Anal. Chim. Acta.,<br />

446(1), 313-328.<br />

Solich, F., Ogrocka, E., Schaefer, U.,<br />

2001. Aplication of automated<br />

flow-injection analysis to drug<br />

liberation studies with the Franz<br />

diffusion cell. Pharmazie,<br />

56(10), 787-789.<br />

Stewart, K.K., Beecher, G.R., Hare,<br />

P.E., 1974. Fed. Proc. Fed. Am.<br />

Soc. Biochem. 33, 1429.<br />

Unicam Limited (Division of<br />

Analytical Technology Inc.).<br />

9499 230 18011 910916, 1991.<br />

Unicam 8625 Series UV/Visible<br />

Spectrometer, UK.<br />

Zhang, B., Beck, H.P., 2001. A rapid<br />

and s<strong>en</strong>sitive method for the<br />

fluorimetric determination of<br />

phosphate by flow-injection.<br />

Anal. Lett. 34(15), 2721-2733.<br />

149


Capítulo 3<br />

TRIGGER-BASED CONCURRENT<br />

CONTROL SYSTEM FOR<br />

AUTOMATING ANALYTICAL<br />

PROCESSES<br />

El cont<strong>en</strong>ido de este capítulo ha sido publicado <strong>en</strong> la revista Tr<strong>en</strong>ds in Analytical<br />

Chemistry, 23 (2004) 370-384.


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

TRIGGER-BASED CONCURRENT CONTROL SYSTEM FOR<br />

AUTOMATING ANALYTICAL PROCESSES<br />

Manuel Urbano Cuadrado, M. D. Luque de Castro, Miguel Ángel Gómez-Nieto<br />

Abstract<br />

A system for the design and automation of analytical processes based on<br />

concurr<strong>en</strong>t actions developed by the equipm<strong>en</strong>t involved is here pres<strong>en</strong>ted. The<br />

system thus developed <strong>en</strong>ables the control of any hardware that acts during a<br />

giv<strong>en</strong> process. The control of the process is based on time and state parameters;<br />

thus the continuous monitoring of these parameters is necessary in order to<br />

achieve the pursued aim. To take decisions without human interv<strong>en</strong>tion is<br />

possible due to a subsystem in charge of an intellig<strong>en</strong>t control of the analytical<br />

process. The overall design of the analytical process is divided into two steps: the<br />

design of the time-based process and the design of the state-based control<br />

(triggers). The latter also manages the exceptions and alerts activated during each<br />

experim<strong>en</strong>t. Automation is carried out by a procedure constructed from the data<br />

design. Computer technologies like UML, Java, XML, etc. have be<strong>en</strong> used for<br />

program construction.<br />

Keywords: Experim<strong>en</strong>t automation, Instrum<strong>en</strong>tal control, Concurr<strong>en</strong>t<br />

processing, Trigger-based control.<br />

153


Manuel Urbano Cuadrado Tesis Doctoral<br />

1. Introduction<br />

Automation of chemical or analytical<br />

processes is aimed at the same<br />

objectives as in other areas, namely:<br />

short<strong>en</strong>ing the time required for<br />

developing a giv<strong>en</strong> process, avoiding<br />

human interv<strong>en</strong>tion and human errors,<br />

and increasing the quality of process<br />

control [1-3]. The International Union<br />

Pure and Applied Chemistry (IUPAC)<br />

distinguishes betwe<strong>en</strong> automatic and<br />

automated systems [4]. The formers<br />

develop programmed actions, but they<br />

can not take decisions by themselves<br />

without human interv<strong>en</strong>tion; decisions<br />

that can be tak<strong>en</strong> by the latter. The<br />

distinction does not appear clear in<br />

chemical nor analytical publications.<br />

Thus, the word ‘automation’ is<br />

referred to computer control of some<br />

step of the process; usually data<br />

collection and treatm<strong>en</strong>t [5-9]. With<br />

the exceptions of the wrong use of the<br />

word, the computer control has be<strong>en</strong><br />

widely implem<strong>en</strong>ted in the chemical<br />

field.<br />

Concerning analytical processes,<br />

where the ultimate objective is<br />

the measurem<strong>en</strong>t of one or several<br />

154<br />

compon<strong>en</strong>ts in a sample, the process<br />

is usually divided into three steps:<br />

sample treatm<strong>en</strong>t –which involves<br />

physical and chemical operations<br />

focussed on optimum monitoring–;<br />

the measurem<strong>en</strong>t step –which produces<br />

bio-chemical information from<br />

the sample–; data collection and<br />

handling for obtaining proper information<br />

on the system under study.<br />

Most times, the main shortcoming of<br />

computer programs in the literature is<br />

the necessity for a specialised user for<br />

taking decisions. There are in the<br />

literature few systems which are able<br />

to substitute human decisions for<br />

avoiding user involvem<strong>en</strong>t in the<br />

process [10-14]. Although these<br />

approaches reach the objective of<br />

avoiding human decisions, they have<br />

a series of limitations regarding to<br />

scalability, op<strong>en</strong> characteristics and so<br />

on [13]. Some of these proposals are<br />

closed systems, where the production<br />

rules, variables and other constructions<br />

to define the flow control of<br />

the process must be defined a priori<br />

and future variations in the<br />

instrum<strong>en</strong>tal used, analytical problems<br />

to be solved, etc., affect the system.


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

Thus, it is necessary to reprogram a<br />

large part of the system due to its low<br />

scalability. Regarding the purpose of<br />

the works described in the literature,<br />

the majority of them use control code<br />

construction or production rules but as<br />

simple logical construction (the infer<strong>en</strong>ce<br />

<strong>en</strong>gine, the knowledge<br />

propagation, etc. are not defined). If<br />

these concepts are not defined, the<br />

systems are simply based on triggers<br />

in order to avoid overall human<br />

interv<strong>en</strong>tion. To take decisions involves<br />

knowing the situation of the<br />

system from the values of state or<br />

time variables and either acting or not<br />

on the system dep<strong>en</strong>ding on these<br />

values [15-17].<br />

The research here pres<strong>en</strong>ted is<br />

a program, the functionality of which<br />

is on the control of analytical,<br />

determination processes. The control<br />

structures used are based on time and<br />

state system domains; thus triggers<br />

are used for taking decisions through<br />

both aspects: time and state. Other,<br />

more innovative aspect of the<br />

functionality of the program is that the<br />

user can design the control structures<br />

based on both the state of the system<br />

and time parameters. Thus, the user<br />

can define the flow of the process<br />

control based on a series of state<br />

variables, functions and processes.<br />

The scalability, portability, versatility<br />

and free distribution of the developed<br />

system make it applicable to analyses<br />

of differ<strong>en</strong>t nature, in addition to the<br />

pres<strong>en</strong>t application to the analysis of a<br />

number of wine compon<strong>en</strong>ts.<br />

A description of the op<strong>en</strong><br />

software developed for the design and<br />

automation of analytical processes is<br />

described on: first, a classification of<br />

the processes as a function of the type<br />

of control —based on time and state<br />

of the system— is the subject of<br />

section 2. Section 3 describes the<br />

model proposed for repres<strong>en</strong>ting the<br />

time-governed processes; meanwhile,<br />

section 4 describes the model and<br />

system of a state-governed control of<br />

the system. Finally, the part of the<br />

system which translates the information<br />

the user introduces in the<br />

design of the analytical process to<br />

control instructions is described in<br />

section 5. A discussion of the results<br />

obtained and the applications developed<br />

with the proposed system<br />

155


Manuel Urbano Cuadrado Tesis Doctoral<br />

constitutes the last part of the article.<br />

2. System for automation of<br />

analytical processes by a time<br />

and state-based model<br />

A process can be defined as a<br />

sequ<strong>en</strong>ce of related actions carried out<br />

along an interval with the objective of<br />

producing a change in a giv<strong>en</strong> system.<br />

From the point of view of process<br />

automation and control it can be<br />

divided into two types:<br />

Type I: Processes dep<strong>en</strong>d<strong>en</strong>t on the<br />

system state<br />

The actions which constitute an<br />

overall process are developed along<br />

the time as a function of the<br />

intermediate state reached by the<br />

system due to each previous action.<br />

Automation of these processes<br />

involves continuous control of the<br />

system by inspection and analysis of<br />

the variables or parameters which<br />

establish its characteristics. So, the<br />

actions are adopted after checking the<br />

value or state of the giv<strong>en</strong> variables.<br />

Traditionally, process automation<br />

has be<strong>en</strong> carried out by<br />

156<br />

systems based on ev<strong>en</strong>ts (actions). A<br />

series of rules are defined in these<br />

systems taking into account the values<br />

of state variables. With this aim, it is<br />

mandatory to construct a monitoring<br />

subsystem for checking the fulfilm<strong>en</strong>t<br />

of the established rules; if yes, the<br />

program executes the actions<br />

associated to the giv<strong>en</strong> rule.<br />

Type II. Processes dep<strong>en</strong>d<strong>en</strong>t on the<br />

time within which the actions are<br />

developed<br />

In this group, the actions are<br />

developed indep<strong>en</strong>d<strong>en</strong>tly of the<br />

pres<strong>en</strong>t situation of the system. This<br />

kind of processes are characterised by<br />

actions developed in a sequ<strong>en</strong>tial or<br />

concurr<strong>en</strong>t manner along the time:<br />

they only dep<strong>en</strong>d on the time elapsed<br />

since the starting point of the process<br />

and are indep<strong>en</strong>d<strong>en</strong>t of the situation of<br />

the system. So, a module for control<br />

and measurem<strong>en</strong>t of the elapsed time<br />

is mandatory.<br />

Evid<strong>en</strong>tly, a giv<strong>en</strong> process can<br />

belong to types I and II; these<br />

processes are based on ev<strong>en</strong>ts<br />

determined by both the state of the


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

system and the time elapsed from the<br />

start of the process. State-based and<br />

time-based variables will be pres<strong>en</strong>t in<br />

the rules, in this case.<br />

Automation of Type I pro<br />

cesses is more complex than those of<br />

Type II, and the control of the giv<strong>en</strong><br />

process requires higher computer<br />

costs, due –among others– to the<br />

following aspects:<br />

• The number of rules for<br />

action execution is, usually,<br />

higher.<br />

• Continuous monitoring of the<br />

variables or parameters which<br />

determine the situation of the<br />

process is mandatory in order<br />

to use the information thus<br />

obtained for ordering the<br />

corresponding action.<br />

• The module which analyses<br />

the state of the system is more<br />

complex. It requires more<br />

computer resources because a<br />

higher number of variables<br />

are involved, and a higher<br />

possibility of errors,<br />

inconsist<strong>en</strong>cies and redundancies<br />

exists. In addition, it<br />

is mandatory to establish a<br />

relationship betwe<strong>en</strong> the<br />

defined rules wh<strong>en</strong> more than<br />

one must be fulfilled in order<br />

to determine either the action<br />

to be executed first or the<br />

concurr<strong>en</strong>t execution.<br />

Nevertheless, it is always<br />

possible to convert a type I process to<br />

a type II process. For this, it is only<br />

necessary to know the foreseeable<br />

states through which the system<br />

evolutes with time; delete this<br />

information from the rules in order to<br />

consider only time-related information,<br />

and monitor the state of the<br />

process only at its <strong>en</strong>d. Most<br />

processes belong to this group (timebased<br />

processes -TBP-); that is, the<br />

user knows the initial state of the<br />

system and he/she wants to know the<br />

final state through measurem<strong>en</strong>t of<br />

signals provided by one or several<br />

detectors: the intermediate state is not<br />

interesting or it is known. If the<br />

intermediate state is of interest, only it<br />

is necessary to consider it as a final<br />

state of the process.<br />

Based on the above premises,<br />

a g<strong>en</strong>eral model for the design of<br />

157


Manuel Urbano Cuadrado Tesis Doctoral<br />

158<br />

a 0 (t=0)<br />

S 0<br />

t=t 0<br />

S 1 S 2 S F<br />

t=t 1<br />

Hardware<br />

a*(t=0) a*(t=t 1 ) a*(t=t 2 ) a*(t=t F )<br />

a F (t=t F )<br />

t=t 2<br />

t=t F<br />

Start End<br />

Fig. 1. G<strong>en</strong>eral model to design analytical processes.<br />

analytical processes can be proposed<br />

based on the structure shown in Fig.1.<br />

The initial state of the system,<br />

S0, is known. Th<strong>en</strong>, the system is<br />

subject to a series of actions to be<br />

executed in either a sequ<strong>en</strong>tial or<br />

concurr<strong>en</strong>t manner along an interval<br />

to reach a final state SF, in which the<br />

characteristics of the system are<br />

monitored again. Automation of this<br />

process involves developm<strong>en</strong>t of the<br />

necessary actions without human<br />

interv<strong>en</strong>tion. For this, specific equipm<strong>en</strong>t<br />

or hardware is in charge of the<br />

developm<strong>en</strong>t of these time-based<br />

actions a*. The initial action, a0, can<br />

be executed by the user, time-based or<br />

determined by either the characteristics<br />

of the process or its state, S0.<br />

Wh<strong>en</strong> the process reaches its final<br />

state (t=tF) a new series of actions are<br />

executed by the hardware, and a<br />

special action will determine the <strong>en</strong>d<br />

of the process (aF).<br />

Under this model, time is the<br />

parameter determinant for the actions<br />

to be carried out by the hardware.<br />

Despite these actions are executed at a<br />

giv<strong>en</strong> time, their effect can be applied<br />

along the time of the process, and<br />

several actions can be executed simultaneously;<br />

thus allowing concurr<strong>en</strong>t<br />

hardware control.<br />

In addition, action aF can<br />

determine the start of the process (see<br />

Fig.1) by considering a new initial<br />

state of the process. In this way, it is<br />

possible to repres<strong>en</strong>t, under a time-


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

based model, processes which require<br />

evolution monitoring. In this case, it is<br />

necessary to consider as final state<br />

that corresponding to a giv<strong>en</strong><br />

evolution point, to apply the final<br />

action (aF) and, th<strong>en</strong>, re-start the<br />

process control. From either an<br />

intermediate state SX or a final state<br />

SF, total automation of the process<br />

requires knowing the value of the<br />

process variables in order to use this<br />

information to take decisions affecting<br />

the process. The decisions will be<br />

executed if the analysis of the<br />

variables dictates the necessity of<br />

control actions in order to act on the<br />

process <strong>en</strong>vironm<strong>en</strong>t (user alarm); halt<br />

the process (by stopping the main<br />

execution process) or to conditioning<br />

the system for a more accurate and<br />

error-free result (by eliminating<br />

pot<strong>en</strong>tial interfer<strong>en</strong>ces).<br />

3. Process design system<br />

The design and construction of a<br />

software system for automation and<br />

control of chemical analytical processes<br />

has be<strong>en</strong> developed under the<br />

above-proposed process model. The<br />

main aim has be<strong>en</strong> to supply<br />

analytical chemists non-experi<strong>en</strong>ced<br />

on informatics with a tool to design<br />

the actions to be carried out by both<br />

the hardware and analytical equipm<strong>en</strong>t<br />

during a giv<strong>en</strong> process.<br />

The system thus developed is<br />

based on a layer architecture proposed<br />

by the authors [18], which <strong>en</strong>ables<br />

control of any hardware and analytical<br />

equipm<strong>en</strong>t. Figure 2 shows –by a<br />

compon<strong>en</strong>t diagram [19]– the architecture<br />

used. The hardware participating<br />

in a process is physically<br />

controlled by drivers supplied by the<br />

manufacturers. Usually, these drivers<br />

are functions or compiled libraries<br />

developed by a procedural language<br />

(e.g. C, Basic, etc.). From these<br />

libraries, functions in C language in<br />

charge of managing the functionality<br />

provided by the hardware are<br />

constructed. These functions, which<br />

constitute the Communication level,<br />

allow modulating the hardware func<br />

tionality, thus making indep<strong>en</strong>d<strong>en</strong>t<br />

each of the physical actions to be<br />

developed by the hardware. A library<br />

with the group of defined functions is<br />

constructed for each specific<br />

159


Manuel Urbano Cuadrado Tesis Doctoral<br />

160<br />

This layer is oft<strong>en</strong><br />

developed by<br />

manufactures<br />

Hardware<br />

Drivers Library<br />

Hardware<br />

Libraries built with<br />

language C<br />

Drivers Communication<br />

Drivers Library<br />

f1<br />

f2<br />

f1<br />

f2<br />

Classes and packages built<br />

with Java<br />

Logical<br />

Package<br />

Class<br />

properties<br />

methods<br />

m1()<br />

m2()<br />

......<br />

mk()<br />

Class<br />

properties<br />

methods<br />

m1()<br />

m2()<br />

......<br />

mk()<br />

Fig. 2. Layer architecture for the design and control of analytical<br />

experim<strong>en</strong>ts.<br />

hardware; thus allowing each type of<br />

hardware to be considered as an<br />

object to be managed in each process<br />

where the giv<strong>en</strong> hardware is used.<br />

Each of these static libraries is<br />

repres<strong>en</strong>ted by an object class by<br />

definition of the corresponding class<br />

at the Logical level (see Fig. 2). In<br />

these object classes:<br />

• The attributes repres<strong>en</strong>t each


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

parameter which takes part in<br />

functions defined at the<br />

Communication level (so they<br />

are defined at the interfaces of<br />

the drivers provided by the<br />

hardware manufacturers).<br />

• The methods correspond to<br />

each of the functions defined<br />

at the Communication level<br />

and they are pres<strong>en</strong>t in the<br />

static libraries developed for<br />

each type of hardware.<br />

The classes constructed at this<br />

Logical level can be compiled as<br />

packages for a better portability of the<br />

proposed system.<br />

The construction of these classes<br />

requires a specific knowledge of C<br />

and Java languages [20-22]. The latter<br />

has be<strong>en</strong> used due to the availability<br />

of Java-based software for both object<br />

ori<strong>en</strong>tation and portability. The<br />

authors have developed a number of<br />

op<strong>en</strong>-code packages for managing<br />

differ<strong>en</strong>t type of hardware (namely,<br />

peristaltic pumps, injection and selection<br />

valves, photometric detectors,<br />

etc.) [22-24], which can be used by<br />

other researchers for the control of<br />

either other hardware or analytical<br />

equipm<strong>en</strong>t.<br />

The analysis and developm<strong>en</strong>t of<br />

the proposed system for process<br />

design have be<strong>en</strong> carried out under the<br />

object ori<strong>en</strong>tation paradigm, which<br />

allows to consider any 'logical' or<br />

'physical' elem<strong>en</strong>t forming part of the<br />

problem domain as an object class.<br />

Under this point of view, the developed<br />

system considers an object<br />

series (object class) as actors in the<br />

developm<strong>en</strong>t of an automated process.<br />

3.1. The analytical equipm<strong>en</strong>t and<br />

hardware<br />

The analytical equipm<strong>en</strong>t also includes<br />

the hardware in charge of<br />

preparing the analytical system for<br />

monitoring and performing. Despite<br />

IUPAC nom<strong>en</strong>clature differ<strong>en</strong>tiates an<br />

instrum<strong>en</strong>t (as that providing chemical<br />

information, as a detector) from an<br />

apparatus (as that used for performing<br />

steps which do not provide chemical<br />

information), most analytical equipm<strong>en</strong>t<br />

integrates both types of devices.<br />

As comm<strong>en</strong>ted before, the<br />

Driver, Communication and Logical<br />

161


Manuel Urbano Cuadrado Tesis Doctoral<br />

levels <strong>en</strong>able control at a low,<br />

medium and high abstraction level,<br />

respectively. Control of a giv<strong>en</strong><br />

hardware or equipm<strong>en</strong>t can involve<br />

from a mechanical operation (e.g. to<br />

impel a liquid to a giv<strong>en</strong> module for<br />

the developm<strong>en</strong>t of a giv<strong>en</strong> step) to<br />

set the values of instrum<strong>en</strong>tal<br />

parameters (e.g. working pot<strong>en</strong>tial or<br />

wavel<strong>en</strong>gth).<br />

3.2. Constants and variables<br />

Constants in the proposed system are<br />

parameters defined by the designer,<br />

which repres<strong>en</strong>t properties of both the<br />

control system and the process<br />

unchangeable along the process. They<br />

can be numerical and logical, and<br />

used for taking decisions during the<br />

process developm<strong>en</strong>t.<br />

On the contrary to constants,<br />

variables are parameters that change<br />

along the process. They can also be<br />

logical and numerical.<br />

Any number of constant and<br />

variables necessary to control can be<br />

defined during the process design.<br />

The developed system has defined by<br />

default a number of constants and<br />

162<br />

variables in order to facilitate the<br />

process design. Examples of these<br />

variables are as follows:<br />

• Logical constants False and<br />

True, which repres<strong>en</strong>t these<br />

logical values.<br />

• Numerical constants, c_ProcessTime<br />

and c_Process-<br />

Number, which repres<strong>en</strong>t the<br />

process time and the number<br />

of times the process is<br />

repeated, respectively.<br />

• The variables v_ProcessTime<br />

and v_ProcessNumber, which<br />

have a zero value at the start<br />

of the process, and are<br />

modified along the process<br />

and repres<strong>en</strong>t the elapsed time<br />

of the process and the number<br />

of processes developed.<br />

Both constants and variables<br />

are used in structures to control the<br />

process, as described below.<br />

3.3. Functions<br />

Action sequ<strong>en</strong>ces are repeated along<br />

the developm<strong>en</strong>t of a giv<strong>en</strong> process.<br />

These sequ<strong>en</strong>ces can be <strong>en</strong>capsulated<br />

as a function, thus simplifying the


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

Chart 1<br />

/* Function to adjust the spectral parameters in a<br />

spectrofluorimeter */<br />

void setSpectralParameters(String id_port,<br />

String wavel<strong>en</strong>gth_exc,<br />

String wavel<strong>en</strong>gth_em)<br />

{<br />

/* Adjust the excitation wavel<strong>en</strong>gth */<br />

setExcitationWavel<strong>en</strong>gth(id_port,wavel<strong>en</strong>gth_exc);<br />

/* Wait a giv<strong>en</strong> time to <strong>en</strong>able the monochromator reaches<br />

the position */<br />

try{<br />

Thread.sleep(5000);<br />

}catch(InterruptedException e){}<br />

/* Adjust the emission wavel<strong>en</strong>gth */<br />

setEmisionWavel<strong>en</strong>gth(id_port,wavel<strong>en</strong>gth_em);<br />

}<br />

/* Function for <strong>en</strong>abling the probe sampler to go to the<br />

vial which the system under study is in */<br />

void goVial(String id_port,<br />

String position)<br />

{<br />

/* Go up the probe sampler */<br />

upVial(serial_port);<br />

/* Wait a giv<strong>en</strong> time to <strong>en</strong>able the probe sampler goes up */<br />

try{<br />

Thread.sleep(5000);<br />

}catch(InterruptedException e){}<br />

/* The probe sampler goes to the specified vial */<br />

vial(id_port,position);<br />

/* Wait a giv<strong>en</strong> time to <strong>en</strong>able the probe sampler goes to<br />

the vial */<br />

try{<br />

Thread.sleep(5000);<br />

}catch(InterruptedException e){}<br />

/* Go down the probe sampler */<br />

downVial(id_port);<br />

/* Wait a giv<strong>en</strong> time to <strong>en</strong>able the probe sampler goes down<br />

*/<br />

try{<br />

Thread.sleep(5000);<br />

}catch(InterruptedException e){}<br />

}<br />

163


Manuel Urbano Cuadrado Tesis Doctoral<br />

overall control. These functions or<br />

actions sequ<strong>en</strong>ces can be of two types;<br />

namely:<br />

a) Those formed as a single action or<br />

actions sequ<strong>en</strong>ce developed by<br />

one or several hardware involved<br />

in the process; thus a control<br />

structure similar to the structure<br />

corresponding to the analytical<br />

process is obtained. For example,<br />

those functions for establishing a<br />

preset velocity of the peristaltic<br />

pump, fixing the temperature in a<br />

thermostat, sampling data from a<br />

detector, etc. Chart 1 shows<br />

examples of this type of functions.<br />

b) Those formed by logical or<br />

mathematical operations on the<br />

variables and/or constants<br />

(parameters involved in the<br />

process). For example, start a<br />

repetitive sequ<strong>en</strong>ce, determine if<br />

the sequ<strong>en</strong>ce has be<strong>en</strong> developed<br />

at the preset times, etc. Chart 2 is<br />

an example of this type of<br />

functions.<br />

3.4. The structure of the process<br />

control<br />

The flow or actions sequ<strong>en</strong>ce to be<br />

164<br />

developed along a process only<br />

controlled by the time (Type II) can be<br />

described by the structure repres<strong>en</strong>ted<br />

in Chart 3.<br />

Where do and while are<br />

reserved words. They inform on the<br />

start and <strong>en</strong>d of the process for<br />

execution of the actions defined in<br />

Process-body until the function<br />

isEndProcess() returns true.<br />

This will happ<strong>en</strong> wh<strong>en</strong> the elapsed<br />

time is longer than the duration of the<br />

process. This function is defined in<br />

Chart 4. As can be se<strong>en</strong>, some of the<br />

functions defined in Chart 2 are used<br />

in Chart 4.<br />

The structure of the process<br />

body is repres<strong>en</strong>ted in Chart 5. Under<br />

a control model governed by time,<br />

once the process has started, the<br />

control on the analytical equipm<strong>en</strong>t is<br />

performed and the time from the start<br />

of the process at which the giv<strong>en</strong><br />

actions must be executed by each<br />

hardware elem<strong>en</strong>t involved are<br />

indicated.<br />

For each time value the following<br />

can be specified:<br />

1. The action to be developed by


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

Chart 2<br />

/* Function for reset to zero the process time. It is<br />

called if the process has to be repeated wh<strong>en</strong> final<br />

action is executed */<br />

void resetProcessTime()<br />

{<br />

v_ProcessTime = 0;<br />

}<br />

/* Function to know if the system is in a time node in<br />

which the pres<strong>en</strong>ce or abs<strong>en</strong>ce of actions to be executed<br />

has be<strong>en</strong> analysed. Thus, to call the same function in<br />

the same second is avoided */<br />

boolean isAnalysedNode()<br />

{<br />

if (analysed_node |= false)<br />

return true;<br />

else<br />

return false;<br />

}<br />

/* Function to acquire the pres<strong>en</strong>t time from the object<br />

which manages the time (This object is a java thread) */<br />

int getElapsedTime()<br />

{<br />

long time_elapsed;<br />

time_elapsed = chrono.getTime();<br />

time_elapsed = time_elapsed/1000;<br />

return (int)time_elapsed;<br />

}<br />

Chart 3<br />

/* Structure corresponding to a single process governed by<br />

the time*/<br />

do{<br />

Process-body<br />

}while ( isEndProcess() != True)<br />

the hardware. The methods<br />

defined by the classes (Logical<br />

level) corresponding to the<br />

analytical equipm<strong>en</strong>t used will<br />

be used. For example, the class<br />

repres<strong>en</strong>ting the model Minipuls3<br />

of peristaltic pumps [23]<br />

is <strong>en</strong>dowed with a method<br />

165


Manuel Urbano Cuadrado Tesis Doctoral<br />

Chart 4<br />

/* Function to know if the <strong>en</strong>d of the process has be<strong>en</strong><br />

reached */<br />

boolean isEndProcess()<br />

{<br />

v_ProcessTime = getElapsedTime();<br />

if(v_ProcessTime


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

Chart 6<br />

/* This class repres<strong>en</strong>ts the peristaltic pump Minipuls3*/<br />

class Minipuls3Pump {<br />

/* Classes code body */<br />

native void setSpeed(String id_port, String speed);<br />

/* Classes code body */<br />

}<br />

Chart 7<br />

/* Function incharged of setting true the variable<br />

is_monitoring which repres<strong>en</strong>ts if the detector is<br />

monitoring */<br />

void setMonitoring()<br />

{<br />

is_monitoring = true;<br />

}<br />

execute an action that communicates<br />

the appropriate<br />

command to the hardware for<br />

this purpose. This action is<br />

composed by two functions: the<br />

(a) type function setting the<br />

detector monitoring and the (b)<br />

type function shown in Chart 7.<br />

As can be se<strong>en</strong>, this function<br />

updates the value of the variable<br />

that repres<strong>en</strong>ts the detector state<br />

(on/off) and it is useful wh<strong>en</strong><br />

the process <strong>en</strong>ds or it is<br />

interrupted. If the detector is<br />

monitoring, the program will<br />

stop monitoring before turning<br />

off the hardware remote control.<br />

As an example, the use of the<br />

constants, variables, functions and the<br />

control structures is described by an<br />

experim<strong>en</strong>t carried out by a peristaltic<br />

pump that propels the chemical<br />

system under study to the detector. A<br />

valve inserts a reag<strong>en</strong>t that <strong>en</strong>dows the<br />

chemical system with the features to<br />

be monitored by the detector. The<br />

signal int<strong>en</strong>sity is proportional to the<br />

conc<strong>en</strong>tration of the target compon<strong>en</strong>t.<br />

Time data and hardware activities<br />

are shown in Table I. The<br />

control flow for this analysis begins<br />

wh<strong>en</strong> the setInitialActions() function<br />

167


Manuel Urbano Cuadrado Tesis Doctoral<br />

Table I. Activities to be carried out by the hardware and their execution times.<br />

168<br />

TIME (S) HARDWARE ACTIVITY<br />

0<br />

20<br />

40<br />

Peristaltic pump Turn at preset speed.<br />

Injection valve No injection<br />

Electroanalytical detector Set pot<strong>en</strong>tial<br />

Injection valve Injection<br />

Electrochemical detector Start monitoring<br />

Peristaltic pump Stop<br />

Injection valve No injection<br />

Peristaltic pump Stop Monitoring<br />

is invoked. This function orders to<br />

each hardware involved in this<br />

process to execute its initial action<br />

and also calls to the startChrono(),<br />

which initiates the part of the program<br />

in charge of time monitoring. Each<br />

second, the v_ProcessTime is updated<br />

and the instrum<strong>en</strong>tal list is read out in<br />

order to verify if there are some<br />

actions to be executed. As can be se<strong>en</strong><br />

in Table I, there are actions to execute<br />

in seconds 20 and 40. After the last<br />

actions —and as the function<br />

isEndProcess() returns true because<br />

the value of the variable<br />

v_ProcessTime is higher than the<br />

value of the constant c_Process-<br />

Time— the <strong>en</strong>dProcess() function is<br />

invoked. This function calls to other<br />

functions: namely startAgain() and<br />

exitRemoteControl(), in charge of<br />

verifying if the process is executed<br />

again and, if not, it turns off the<br />

hardware remote control.<br />

3.5. Designing analytical processes<br />

In this section, a time-based control of<br />

the analytical process is described. In<br />

the next section the analytical process<br />

design based on system state control<br />

structures will be described. In all<br />

instances, the configuration of the<br />

process is divided into two steps:<br />

definition of hardware; and, specifications<br />

of hardware actions.<br />

Because these actions can use


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

Fig. 3. Interface to design time-based processes. Configuration of the<br />

hardware involved in the process.<br />

constants, variables and functions to<br />

control the process, these control<br />

elem<strong>en</strong>ts must be defined.<br />

Figure 3 shows a program<br />

interface that belongs to the subsystem<br />

in charge of defining the<br />

analytical process. As can be se<strong>en</strong>, the<br />

interface is divided into three areas:<br />

(a) an upper area where the m<strong>en</strong>u bar<br />

is placed and which has all the<br />

functionality related to the process<br />

design, (b) a left-side area that shows<br />

all the compon<strong>en</strong>ts and elem<strong>en</strong>ts<br />

involved in the process through a<br />

hierarchical m<strong>en</strong>u, (c) a c<strong>en</strong>tral<br />

framework area in charge of data<br />

input/output concerning the differ<strong>en</strong>t<br />

elem<strong>en</strong>ts and compon<strong>en</strong>ts.<br />

For example, if a new elem<strong>en</strong>t<br />

(a detector) is added to the process<br />

definition, a window corresponding to<br />

this hardware compon<strong>en</strong>t will be<br />

placed in the c<strong>en</strong>tral framework. As<br />

can be se<strong>en</strong> in Figure 3, the users can<br />

introduce the hardware data: id<strong>en</strong>tifier,<br />

brand and model, hardware<br />

169


Manuel Urbano Cuadrado Tesis Doctoral<br />

170<br />

Fig. 4. Interface to design time-based processes. Specification of the actions<br />

to be developed by the hardware.<br />

type, communication port, and initial<br />

action. Wh<strong>en</strong> the data introduction is<br />

finished and validated by the users<br />

and the program, respectively, the<br />

node is charged in the configuration<br />

tree (hierarchical m<strong>en</strong>u).<br />

After the hardware involved<br />

in the analytical process is defined,<br />

the hardware actions can be specified.<br />

With this aim, the icon corresponding<br />

to the loading of a group of actions<br />

per time unit must be selected from<br />

the tool bar. A window, through<br />

which the user introduces hardware<br />

actions at a preset time, is charged in<br />

the framework as can be se<strong>en</strong> in<br />

Figure 4. The user introduces the time<br />

elapsed betwe<strong>en</strong> the beginning of the<br />

process and the actions to be executed<br />

by the configured hardware after this<br />

interval. In the hierarchical m<strong>en</strong>u that<br />

shows the process structure as a<br />

function of time, the corresponding to<br />

this time node is created or updated.


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

In time-based actions, the user can<br />

add other control elem<strong>en</strong>ts like<br />

functions, constants, variables and<br />

triggers, which are also defined by the<br />

user as shown later on. Both the<br />

hierarchical m<strong>en</strong>u and a window in<br />

the c<strong>en</strong>tral framework manage<br />

information about the time-dep<strong>en</strong>d<strong>en</strong>t<br />

actions of the hardware, as can be<br />

se<strong>en</strong> in Figure 4. Once the process is<br />

defined, its definition is stored in a<br />

file .xml, the structure of which is<br />

described in the next section.<br />

4. Control based on the system<br />

state: triggers<br />

In automating analytical processes, a<br />

model based on the time during which<br />

the hardware executes its actions is<br />

sometimes not <strong>en</strong>ough. The state of<br />

the system must also be known at<br />

each time in order to take decisions<br />

dep<strong>en</strong>ding on the giv<strong>en</strong> state. These<br />

decisions both vary the control flow<br />

of the process and control the<br />

exceptions produced.<br />

For this reason, the developed<br />

software has a state-based control<br />

consisting of a triggers sub-system. A<br />

trigger is a logical rule that has the<br />

g<strong>en</strong>eral structure shown in Chart 8.<br />

Dep<strong>en</strong>ding on the mom<strong>en</strong>t at<br />

which the premises are evaluated,<br />

there are two types of triggers:<br />

1. Triggers evaluated at the <strong>en</strong>d of<br />

the process: their premises are<br />

evaluated wh<strong>en</strong> the process<br />

governed by the time is executing<br />

its final action (aF). It is the<br />

simplest type because the trigger<br />

does not alter the control flow of<br />

the process. (see Chart 5).<br />

2. Triggers evaluated in a way concurr<strong>en</strong>t<br />

to the process: their<br />

premises are evaluated in parallel<br />

to the process and they have the<br />

capacity to stop or modify the<br />

control flow of the process. Their<br />

developm<strong>en</strong>t and implem<strong>en</strong>tation<br />

has a high degree of difficulty<br />

because it is necessary both to<br />

synchronise the access to the<br />

status variables and their modification<br />

and create a parallel<br />

thread of execution. Problems<br />

related with concurr<strong>en</strong>t access to a<br />

resource —either a variable or a<br />

method—, possible redundancy<br />

and high computation necessities<br />

characterise these triggers.<br />

171


Manuel Urbano Cuadrado Tesis Doctoral<br />

Chart 8<br />

/* Trigger id<strong>en</strong>tifier or name */<br />

NameTrigger<br />

/* G<strong>en</strong>eral structure of the triggers */<br />

IF<br />

/* Logical expression or premise that has the form:<br />

(variable | constant) operator (variable | constant) */<br />

premise<br />

THEN<br />

/* Action executed by the program if the premise is true. A<br />

trigger action can be a function or a new process that<br />

has the structure shown in Chart 3 */<br />

action;<br />

Figure 5 shows the classes<br />

diagram [19] that repres<strong>en</strong>ts the<br />

structure of the triggers sub-system.<br />

The TriggersManagem<strong>en</strong>t class<br />

manages all the triggers defined by<br />

the user to control the process through<br />

both manageConcurr<strong>en</strong>tTriggers and<br />

manageNoConcurr<strong>en</strong>tTriggers methods.<br />

The Trigger class has a method<br />

in charge of evaluating the defined<br />

premises, and only if all the premises<br />

are fulfilled (this is equival<strong>en</strong>t to carry<br />

out the logical operation on the<br />

group of premises), Triggers Managem<strong>en</strong>t<br />

triggers off the process<br />

corresponding to the target trigger.<br />

The Premise class is<br />

evaluated from its structure (see<br />

Figure 5), as formed by two<br />

measurable nodes which collect the<br />

172<br />

value of a constant or variable state,<br />

and an operator node in charge of a<br />

logical operation on the previous<br />

nodes. This structure, also shown in<br />

Chart 8, repres<strong>en</strong>ts the system<br />

properties and the process control<br />

through the constants and variables<br />

and the actions corresponding to the<br />

trigger, respectively.<br />

Variables involved in the<br />

premises are consulted and modified<br />

in the triggers analysis and the actions<br />

of the main process (governed by<br />

time), respectively. For this reason,<br />

consulting and updating must be<br />

subject to a concurr<strong>en</strong>t control.<br />

Constants such as c_Upper-<br />

_Value and c_Rinsing constants are<br />

defined by the user who designs the<br />

analytical process. They repres<strong>en</strong>t the


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

TriggerManagem<strong>en</strong>t<br />

Trigger[] triggers<br />

void : manageConcurr<strong>en</strong>tTriggers( )<br />

void : manageNoConcurr<strong>en</strong>tTrigges( )<br />

boolean variable<br />

1..1<br />

LeftNode<br />

Object variable<br />

abstract Object: evaluate( )<br />

void : resetValue( )<br />

1..1<br />

BooleanLeftNode<br />

Object: evaluate( )<br />

void : resetValue( )<br />

1..1<br />

1..n<br />

Trigger<br />

String id_trigger<br />

1..1<br />

1..1<br />

TriggerProcess<br />

Action[] actions<br />

int trigger_type<br />

Function[] functions<br />

Premise[] premise<br />

TriggerProcess process<br />

boolean: evaluate( )<br />

1..1<br />

1..n<br />

Premise<br />

void: executeProcess( )<br />

1..1 int premise_type<br />

LeftNode left_side<br />

RigthNode rigth_node<br />

OperatorNode operator<br />

boolean: evaluate( )<br />

1..1<br />

1..1<br />

1..1<br />

1..1<br />

OperatorNode<br />

RigthNode<br />

int operator<br />

Object value<br />

int: getOperator( ) abstract Object: evaluate( )<br />

void: resetValue( )<br />

1..1<br />

DoubleLeftNode<br />

double variable<br />

Object: evaluate( )<br />

void : resetValue( )<br />

1..1<br />

BooleanRightNode<br />

boolean variable<br />

Object: evaluate( )<br />

void : resetValue( )<br />

1..1<br />

DoubleRightNode<br />

double variable<br />

Object: evaluate( )<br />

void : resetValue( )<br />

Fig. 5. Class diagram with the structure of the trigger subsystem.<br />

upper limit of the measured property<br />

and the logical value for the necessity<br />

of a rinsing process, respectively.<br />

Variables v_Upper_Value and v_Rinsing<br />

variables, updated during the<br />

process, repres<strong>en</strong>t the value, at time t,<br />

of the measured parameter and<br />

whether or not a rinsing process is<br />

necessary after the process governed<br />

by the time, respectively.<br />

Actions associated to a trigger<br />

can be of two types:<br />

• A process governed by time as<br />

that described in section 3 (see<br />

Chart 3), so that an analytical<br />

process is designed as a group of<br />

steps that execute a list of actions<br />

in either a series or parallel way.<br />

• Functions <strong>en</strong>dowed with the same<br />

considerations as those described<br />

in section 3. These functions must<br />

be previously defined in order to<br />

<strong>en</strong>capsulate the hardware actions<br />

and/or update or calculate<br />

operations. Two groups of functions<br />

can be emphasized:<br />

Functions that <strong>en</strong>capsulate a<br />

sequ<strong>en</strong>ce of actions to be<br />

173


Manuel Urbano Cuadrado Tesis Doctoral<br />

Chart 9<br />

/* Function that stops the main process */<br />

void stopProcess()<br />

{<br />

for (h=0; h


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

Fig. 6. Interface to design triggers. Premises and the trigger process..<br />

the logical sequ<strong>en</strong>ce in the design of<br />

an analytical process is that the user<br />

defines constants, variables, functions<br />

and the control flow of the process<br />

under a view governed firstly by the<br />

time (as described in section 3). Th<strong>en</strong>,<br />

the user defines the trigger subsystem,<br />

which uses the elem<strong>en</strong>ts defined<br />

previously. The g<strong>en</strong>eral steps sequ<strong>en</strong>ce<br />

to define a trigger is as<br />

follows:<br />

• The first step consists of<br />

id<strong>en</strong>tifying the trigger with a<br />

name and specifying if the trigger<br />

is concurr<strong>en</strong>t or not. Figure 6<br />

shows the definition of a trigger<br />

named ValueControlTrigger characterised<br />

as a concurr<strong>en</strong>t trigger.<br />

• In the following step, the user<br />

defines one by one all the<br />

premises that constitute the<br />

trigger. For that, state constants or<br />

variables are chos<strong>en</strong> from the<br />

defined group of constants and<br />

variables in a previous step. Users<br />

can select both a constant and<br />

175


Manuel Urbano Cuadrado Tesis Doctoral<br />

176<br />

variable, or two variables, and<br />

th<strong>en</strong>, both nodes are related by a<br />

relational operator. Figure 6<br />

shows the choice of the<br />

v_Upper_Value variable and the<br />

c_Upper_Value constant from the<br />

interface elem<strong>en</strong>ts Parameters.<br />

The relational operator “>” is<br />

selected from the interface<br />

elem<strong>en</strong>t Operator.<br />

• The last step is the definition of<br />

the process associated to the<br />

trigger. If the trigger process is a<br />

new group of hardware actions,<br />

this process is defined in a similar<br />

way as the one described for the<br />

main process (see Chart 3). The<br />

functions are selected from the<br />

group of functions defined previously<br />

(see Figure 6).<br />

4.2. An example of state-based<br />

control<br />

The industrial monitoring of the free<br />

and total sulphur dioxide in wines<br />

from Montilla-Moriles appellation<br />

d’origine is described as an example<br />

of state-based control.<br />

The analyser for this parameter<br />

consists of the following<br />

hardware elem<strong>en</strong>ts, which are<br />

susceptible of a physical and logical<br />

control: an automated sampler, a<br />

peristaltic pump, two injection valves<br />

and a UV-VIS detector. These ele<br />

m<strong>en</strong>ts are configured through the<br />

design interface (see Figures 3, 4 and<br />

6). This interface allows introducing<br />

id<strong>en</strong>tifiers, characteristics, and serial<br />

ports. It is also necessary to specify<br />

the number of steps to be developed<br />

in the analysis. In this way, n<br />

evaluations can be carried out, which<br />

provide a continuous control of this<br />

parameter. Th<strong>en</strong>, parameters, actions<br />

and functions necessary to build the<br />

process governed by the time are<br />

defined. The user –the analyst– selects<br />

the actions and functions defined<br />

previously and assigns a time value to<br />

each.<br />

Cleaning actions are also<br />

necessary along the analytical process<br />

in order to obtain accurate, reproducible<br />

and error-free results.<br />

These cleaning actions are more<br />

important wh<strong>en</strong> the process is executed<br />

n consecutive times because of<br />

the risk of cross-contamination.<br />

In order to control cross-


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

contamination, a concurr<strong>en</strong>t trigger is<br />

defined. This trigger involves a<br />

rinsing process which is triggered off<br />

wh<strong>en</strong> a signal higher than a constant<br />

preset value is monitored (this can be<br />

due to a possible contamination).<br />

With this aim, two premises —a<br />

process and updating function— are<br />

used.<br />

The first premise is formed by<br />

v_Upper_Value variable and c_Upper<br />

_Value constant, which have be<strong>en</strong><br />

described previously. These state<br />

parameters allow to control that the<br />

rinsing step is not triggered off until<br />

the limit value is surpassed. The<br />

second premise is formed by v_PreviousRinsing<br />

variable and c_Previous-<br />

Rinsing constant. Both parameters are<br />

defined in a logical domain and allow<br />

to control if a rinsing process has be<strong>en</strong><br />

executed as a previous process; in this<br />

case, the rinsing process is not<br />

repeated, because the problem is not<br />

related with a cross-contamination<br />

ph<strong>en</strong>om<strong>en</strong>on.<br />

The rinsing process is<br />

composed by a set of actions to be<br />

executed by the hardware elem<strong>en</strong>ts.<br />

The purpose of these actions is to<br />

propel a rinsing solution through the<br />

analyser in order to clean the conflictting<br />

points (mainly dead volumes in<br />

valves, tubes, etc).<br />

Finally, setPreviousRinsing( )<br />

is the function in the trigger that<br />

assigns true to v_PreviousRinsing,<br />

thus making possible the control of<br />

the second premise. Moreover, this<br />

trigger has alert functions.<br />

5. Automation of analytical processes<br />

Automation of analytical processes<br />

involves to transform the information<br />

introduced by the user through the<br />

design sub-program in a procedure<br />

consisting of a group of actions<br />

carried out by the hardware at preset<br />

times. In addition to this automatic<br />

system for experim<strong>en</strong>t control, this<br />

information should have a domain<br />

concerning the construction of the<br />

control structures based on triggers.<br />

With these state-based structures, the<br />

program can make decisions without<br />

human interv<strong>en</strong>tion according to the<br />

result of the analysis of these<br />

parameters. Thus, the program is an<br />

automated system for the control of<br />

analytical processes.<br />

177


Manuel Urbano Cuadrado Tesis Doctoral<br />

Experim<strong>en</strong>t<br />

178<br />

+<br />

1..n<br />

1..n<br />

0..n<br />

0..n<br />

0..n<br />

0..n<br />

Hardware<br />

Action<br />

Constant<br />

Variable<br />

Function<br />

Trigger<br />

+<br />

+<br />

+<br />

+<br />

+<br />

+<br />

1<br />

id_hardware<br />

1<br />

model<br />

1<br />

id_port<br />

1<br />

type<br />

0..n<br />

other_data<br />

1<br />

id_hardware<br />

1<br />

activity<br />

0..1<br />

value<br />

1<br />

time<br />

1<br />

id_constant<br />

1<br />

type<br />

1<br />

value<br />

1<br />

id_variable<br />

1<br />

type<br />

1<br />

initial_value<br />

1<br />

id_function<br />

0..n<br />

parameter<br />

1<br />

id_trigger<br />

1<br />

trigger_type<br />

1<br />

left_node<br />

-<br />

1..n<br />

Premise<br />

+ 1<br />

operator_node<br />

1<br />

right_node<br />

-<br />

1<br />

Trigger<br />

Process<br />

+<br />

0..n<br />

0..n<br />

Function<br />

Action<br />

+<br />

+<br />

0..1<br />

0..1<br />

0..1<br />

0..1<br />

1<br />

0..n<br />

1<br />

1<br />

0..1<br />

1<br />

constant<br />

variable<br />

constant<br />

variable<br />

id_function<br />

parameter_values<br />

id_hardware<br />

activity<br />

value<br />

time<br />

Fig. 7. XML structure where the process configuration is stored.<br />

Before considering how the<br />

information is transformed into the<br />

control process, the storage structure<br />

for information is described. The<br />

developed program uses the mark<br />

language XML (eXt<strong>en</strong>sible Markup<br />

Language) [26,27], which is <strong>en</strong>dowed<br />

with marks that inform about the<br />

meaning of the elem<strong>en</strong>ts. The<br />

information corresponding to the<br />

configuration of the analytical process<br />

is saved in an .xml file (wh<strong>en</strong> the user<br />

has introduced the necessary data).<br />

Subsequ<strong>en</strong>t modification, if necess-


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

ary, of this information is allowed.<br />

The hierarchical structure of the<br />

definition of an experim<strong>en</strong>t is shown<br />

in Figure 7. The upper elem<strong>en</strong>t is<br />

ConfigurationProcess. It is formed by<br />

the Hardware, Action, Variable, Constant,<br />

Function and Trigger elem<strong>en</strong>ts<br />

(defined in previous sections). These<br />

elem<strong>en</strong>ts are <strong>en</strong>dowed with characteristic<br />

properties.<br />

The construction of the control<br />

process is developed in two steps:<br />

a first step in which the .xml file is<br />

loaded, and a second –derived from<br />

the first one– in which the executable<br />

code should understand all the<br />

information g<strong>en</strong>erated in the previous<br />

reading and execute the corresponding<br />

s<strong>en</strong>t<strong>en</strong>ces. These steps are considered<br />

in detail below.<br />

Step 1: Reading of the file containing<br />

the definition of the analytical<br />

process<br />

The hybridisation betwe<strong>en</strong> Java and<br />

XML by technologies such as JAXB,<br />

SAX and JDOM [28] facilitates the<br />

construction and reading of the XML<br />

file from a Java structure. The use of<br />

JAXB allows all the elem<strong>en</strong>ts of the<br />

storage structure become Java classes.<br />

A Java class is built in the<br />

developm<strong>en</strong>t of the program to<br />

manage all the classes resulting from<br />

the file XML and connect with the<br />

subsequ<strong>en</strong>t step. This class, which is<br />

called ManageXml.java, loads the file<br />

through the method unmarshal(File)<br />

from ConfigurationProcess.java. This<br />

class comes from the main elem<strong>en</strong>t of<br />

the XML structure and is refer<strong>en</strong>ced<br />

within ManageXml.java. Once the file<br />

has be<strong>en</strong> loaded, the ManageXml<br />

methods return the necessary objects<br />

to build the control process. The list<br />

of objects Hardware, Action, Trigger,<br />

etc. are used for building the control<br />

process.<br />

Step 2: The code execute the xml<br />

information<br />

The objects containing the informa<br />

tion XML are considered by the<br />

ManageXml methods to build and<br />

execute the control process by<br />

MainInterface.java. This class has<br />

lists that are used by the differ<strong>en</strong>t<br />

control structures, both time-based<br />

179


Manuel Urbano Cuadrado Tesis Doctoral<br />

and stated-based structures.<br />

The loading process of the<br />

information referred to triggers in the<br />

code is similar to the loading<br />

instrum<strong>en</strong>tal. An empty list of the<br />

trigger class is loaded with the<br />

information contained in the group of<br />

the trigger elem<strong>en</strong>ts in .xml file. The<br />

triggers sub-system works with this<br />

list to carry out the control process<br />

based on system state during the<br />

analytical process.<br />

6. Discussion<br />

Dep<strong>en</strong>ding on the complexity and<br />

characteristics of the analytical<br />

process carried out by the instrum<strong>en</strong>tal,<br />

the design and automation<br />

of this process can be developed from<br />

a model which only takes into account<br />

a time-action domain. Under this<br />

model, the final state of the process<br />

can be used in order to take decisions<br />

about either new actions or execution<br />

of the process again.<br />

In this way, the automation of<br />

analytical processes is simplified from<br />

the point of view of the chemical user.<br />

This model is not <strong>en</strong>ough in some<br />

experim<strong>en</strong>ts, where the system state<br />

180<br />

must be known before and after each<br />

action in order to take decisions<br />

without human interv<strong>en</strong>tion dep<strong>en</strong>ding<br />

on the value of the state<br />

parameters. The continuous monitoring<br />

of the system state increases the<br />

complexity for implem<strong>en</strong>ting the<br />

proposed model.<br />

In this work, a software<br />

system for the design of analytical<br />

processes and their subsequ<strong>en</strong>t control<br />

based on both time and system state is<br />

pres<strong>en</strong>ted. This system involves an<br />

innovation on the analytical control<br />

because the user defines the control<br />

structures for each analysis. Thus, the<br />

system overcomes limitations of<br />

previous approaches, because the<br />

number of premises and their predicates<br />

are defined and modified by<br />

the user for each analytical process. In<br />

addition, the trigger process is also<br />

defined by the users, who specify both<br />

a series of actions carried out by the<br />

hardware —that can be executed in a<br />

concurr<strong>en</strong>t way— and functions in<br />

charge of calculus, variables updating<br />

and query, etc.<br />

Thanks to the above comm<strong>en</strong>ted<br />

characteristics, in addition to


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

the layer architecture of the system,<br />

our contribution is able to design and<br />

control any analytical process indep<strong>en</strong>d<strong>en</strong>tly<br />

of hardware units to<br />

control, analysed parameters, and<br />

control flow of hardware actions and<br />

alerts.<br />

The developm<strong>en</strong>t of both a<br />

process carried out in real time and a<br />

triggers system that analyse statebased<br />

parameters in a parallel way is<br />

difficult to build. Moreover, triggers<br />

process can stop the main process and<br />

execute other hardware actions in<br />

other thread of time. The high<br />

possibility of redundancies and<br />

exceptions requires an exhaustive<br />

control and developm<strong>en</strong>t.<br />

The last technologies and<br />

standards —UML, Java, XML, etc.—<br />

have be<strong>en</strong> used in order to develop the<br />

software. These permit to build an<br />

op<strong>en</strong> system both applicable to<br />

differ<strong>en</strong>t analytical processes and<br />

indep<strong>en</strong>d<strong>en</strong>t of the used platform. The<br />

configuration of the processes is<br />

stored in an XML structure, which is<br />

later interpreted by the control<br />

subsystem –built in Java– in order to<br />

g<strong>en</strong>erate an ad-hoc application. This is<br />

in charge of full automation of the<br />

analysis, ev<strong>en</strong> to take decisions.<br />

The developed system constitutes<br />

a valuable tool for quality<br />

control in laboratories where a huge<br />

number of analyses is carried out in<br />

order to control the production<br />

process. The manifold for each<br />

analysis can be designed. Thus, the<br />

program is being used successfully in<br />

a winery in the Montilla-Moriles<br />

appellation d’origine.<br />

New research lines are op<strong>en</strong><br />

in order to couple the system to the<br />

web with the aim of develop a<br />

distributed system in charge of the<br />

overall monitoring in industrial pro<br />

cesses. The authors have both the<br />

developed system and code at the<br />

disposal of researchers interested in<br />

them.<br />

Acknowledgem<strong>en</strong>ts<br />

The Comisión Interministerial de<br />

Ci<strong>en</strong>cia y Tecnología (CICyT) is<br />

thanked for financial support (Project<br />

AGL2000-0321-P4-03).<br />

Refer<strong>en</strong>ces<br />

[1] Kormos, F., Tarsiche, I.,<br />

181


Manuel Urbano Cuadrado Tesis Doctoral<br />

182<br />

Reghini, D., Mihalcioiu, F.<br />

Lab. Robotics Automation. 11<br />

(1999) 147.<br />

[2] Hilliard, L.A., Lynch, T.,<br />

Ligthtowlers, D., Gre<strong>en</strong>wood,<br />

P.. Lab. Robotics Automation.<br />

34 (1999) 57.<br />

[3] Moscosa-Santillan, M., Bondoux,<br />

C., Porte, C.; Delacroix,<br />

A; Besselievre, R., Cortial, S.<br />

Lab. Robotics Automation.<br />

11(1999) 197.<br />

[4] Valcárcel, M.; Luque de<br />

Castro M.D. Automatic Methods<br />

of Analysis. Elsevier,<br />

Amsterdam, 1988.<br />

[5] McJunkin, T.R.; Tremblay,<br />

P.L.; Scott, J.R.. J. Assoc.<br />

Lab. Automation. 7 (2002)<br />

76.<br />

[6] Pfeil, D.L.; Reed, A. Int. Lab.<br />

32 (2002) 23.<br />

[7] Roussis, S.G. Anal. Chem. 73<br />

(2001) 3611.<br />

[8] Haber, E.; Muñoz-Guerra,<br />

J.A.; Soriano, C.; Carreras .D.<br />

J. Chromatogr., B 755 (2001)<br />

17.<br />

[9] Rodrigues, P.G.; Rodrigues,<br />

J.A.; Barros, A.A.; Lapa,<br />

R.A.S. J. Agric. Food Chem.<br />

50 (2002) 3647.<br />

[10] Bonastre, A.; Ors, R.; Peris,<br />

M. Chemometr. Intell. Lab.<br />

Syst. 50 (2000) 235.<br />

[11] Du, H.; Stillman, M.J. Anal.<br />

Chim. Acta. 354 (1997) 77.<br />

[12] Chow, C.W.K.; Davey, D.E.;<br />

Mulcachy, D.E. Lab.<br />

Automat. Inform. Manage. 33<br />

(1997) 17.<br />

[13] Peris, M.; Ors, R.; Bonastre,<br />

A.; Gil, P. Lab. Automat.<br />

Inform. Manage. 33 (1997)<br />

49.<br />

[14] Ruisanchez, I.; Lozano, J.;<br />

Larr<strong>en</strong>chi, M.S.; Rius, F.X.<br />

Anal. Chim. Acta 348 (1997)<br />

113.<br />

[15] Bhatikar, S.R.; Mahajan, R.L.<br />

IEEE Trans. Semicond.<br />

Manuf. 15, Issue 1 (2002) 71.<br />

[16] Sabharwal, J.; Jianhua, C.<br />

Proc. Tw<strong>en</strong>ty-Eigth Southeastern<br />

Symp. Syst. Theory<br />

(1996) 514-518.


Tr<strong>en</strong>ds Anal. Chem., 23 (2004) 370 Parte I, cap. 3<br />

[17] Kurtz, M.J.; H<strong>en</strong>son, M.A.<br />

Proc. Am. Control Conf. 4<br />

(1995) 2667-2671.<br />

[18] Urbano, M.; Luque de Castro,<br />

M.D.; Gómez-Nieto, M.A.<br />

Automation of Flow Injection<br />

Methods in the Winery<br />

Industry through a Computer<br />

Program based on a<br />

Multilayer Model. Proceedings<br />

of 9th IEEE International<br />

Confer<strong>en</strong>ce on Emerging<br />

Technologies and Factory<br />

Automation. Lisbon, Portugal,<br />

September, 2003.<br />

[19] Rumbaugh, J., Jacobson, I.,<br />

Booch, G., The Unified<br />

Modeling Language. Refer<strong>en</strong>ce<br />

Manual. Addison-<br />

Wesley Longman Inc, USA,<br />

1999.<br />

[20] Herbert, S.C. C: The<br />

Complete Refer<strong>en</strong>ce Fourth<br />

Edition. McGraw-Hill. 2000.<br />

[21] Eckel, B. Thinking in Java<br />

Third Edition. Pr<strong>en</strong>tice Hall.<br />

2003.<br />

[22] Campione, M. The Java<br />

Tutorial Third Edition. Mc-<br />

Graw-Hill. 2002 (http://<br />

java.sun.com).<br />

[23] Gilson S.A. LT801121K.<br />

Minipuls 3 Peristaltic Pump,<br />

User’s Guide. 2001. (www<br />

.gilson.com).<br />

[24] Gilson S.A. LT3331. Valve<br />

mateTM Valve Actuator.<br />

User’s Guide. 2001. (www<br />

.Gilson.com).<br />

[25] Unicam Limited (Division of<br />

Analytical Technology Inc.).<br />

9499 230 18011 910916.<br />

Unicam 8625 Series UV<br />

/Visible Spectrometer, UK.<br />

1991.<br />

[26] Goldfarb, C., Prescod, P.<br />

XML Handbook Fourth<br />

Edidtion. Pr<strong>en</strong>tice Hall. 2001.<br />

[27] Morrison, M. Et al. XML<br />

Unleashed.<br />

2000.<br />

Pr<strong>en</strong>tice Hall.<br />

[28] Jasnokwski, M. Java, XML,<br />

and Web Services Bible.<br />

Hungry Minds. 2002.<br />

183


Capítulo 4<br />

FULLY AUTOMATED FLOW<br />

INJECTION ANALYSER FOR THE<br />

DETERMINATION OF VOLATILE<br />

ACIDITY IN WINES<br />

El cont<strong>en</strong>ido de este capítulo ha sido <strong>en</strong>viado para su publicación a la revista<br />

Journal of Wine Research.


J. Wine Research, <strong>en</strong>viado para su publicación Parte I, cap. 4<br />

FULLY AUTOMATED FLOW INJECTION ANALYSER FOR THE<br />

Abstract<br />

DETERMINATION OF VOLATILE ACIDITY IN WINES<br />

M. Urbano Cuadrado, M.D. Luque de Castro, M.A. Gómez-Nieto<br />

A fully automated method based on both Flow Injection (FI) and<br />

analytical pervaporation for the determination of the volatile acidity in wine is<br />

here pres<strong>en</strong>ted. Both the differ<strong>en</strong>t hardware units that constitute the analyser and<br />

data collection are controlled by a computer. The method is based on<br />

pervaporation of the volatile compounds pres<strong>en</strong>t in wine into an indicator<br />

solution and monitoring the absorbance change, which is correlated with the<br />

volatile acidity cont<strong>en</strong>t. The control software was developed with Java, C and<br />

XML programming languages. The analysis frequ<strong>en</strong>cy and the precision of the<br />

method were 10 samples per hour and 0.035 g l -1 , respectively. The validation of<br />

the method was carried out with respect to the Mathieu method. The proposed<br />

method correlates (r = 0.95) with the Mathieu method (the standard method in<br />

wineries).<br />

Keywords: Automation, Flow injection, Pervaporation, Volatile acidity.<br />

187


Manuel Urbano Cuadrado Tesis Doctoral<br />

1. Introduction<br />

Volatile acidity is constituted by the<br />

fatty acids pres<strong>en</strong>t in wine that belong<br />

to the acetic series (Flanzy, 2000,<br />

Ribereau-Gayon et al., 2000). Its<br />

importance in <strong>en</strong>ological chemistry is<br />

due to the information provided by<br />

this parameter about possible bacteriological<br />

contamination. Official<br />

and usual methods are based on<br />

distillation of the volatile fraction of<br />

wine and titration of the distillated<br />

(Berezin et al., 1995). These methods<br />

have limitations regarding to the time<br />

they require and operational errors.<br />

Approaches based on flow<br />

injection (FI) (Válcarcel et al., 1987)<br />

have be<strong>en</strong> proposed in order to<br />

surpass the above comm<strong>en</strong>ted shortcomings.<br />

The method proposed by<br />

Tubino and Barros (Tubino et al.,<br />

1991) makes use of the coupling of FI<br />

with gas-diffusion and conductimetric<br />

detection. This approach has the main<br />

limitation of non-linearity of the<br />

calibration curve (Barros et al., 1992).<br />

On the other hand, Su et al. (Su et al,<br />

1998) used both a gas-diffusion channel<br />

and a gas-permeable membrane as<br />

188<br />

separation module, and a bulk<br />

acoustic wave impedance s<strong>en</strong>sor. The<br />

main drawback of this method is the<br />

time required for sample pretreatm<strong>en</strong>t<br />

(20 min boiling for CO2<br />

removal, oxidation of SO2 and<br />

filtration).<br />

Other papers dealing with<br />

volatile acidity are focused on the<br />

joint use of FI and analytical<br />

pervaporation (Mataix et al, 1999,<br />

Gónzalez-Rodríguez et al, 2001). The<br />

latter is a membrane-based technique<br />

for the removal of volatile analytes or<br />

their volatile derivatives from the<br />

sample matrix. It is considered as the<br />

integration of evaporation and gasdiffusion<br />

in a single module. These<br />

approaches, which use a photometric<br />

detector, <strong>en</strong>able the determination of<br />

volatile acidity with the analytical<br />

features (namely, precision, selec<br />

tivity, and s<strong>en</strong>sitivity) required in<br />

wineries. In addition, these methods<br />

can be easily automated thanks to<br />

their continuous functioning. Nevertheless,<br />

no ‘automated methods’ in the<br />

strict s<strong>en</strong>se of the word ‘automation’<br />

are being applied in wineries in order<br />

to determine the volatile acidity in


J. Wine Research, <strong>en</strong>viado para su publicación Parte I, cap. 4<br />

wine.<br />

This work is aimed at both<br />

surpassing the role of the word semiautomated<br />

in the above comm<strong>en</strong>ted<br />

approaches and providing a tool to<br />

monitor the volatile acidity in wine in<br />

a fully automated way, thus making a<br />

more frequ<strong>en</strong>t monitoring of this<br />

parameter easier. The method proposed<br />

by González et al. (Gónzalez-<br />

Rodríguez et al, 2001) and the<br />

software platform for automation<br />

proposed by the authors (Urbano et al,<br />

2003) were used as starting points for<br />

the developm<strong>en</strong>t of this work.<br />

2. Experim<strong>en</strong>tal<br />

2.1 Reag<strong>en</strong>ts and solutions<br />

The reag<strong>en</strong>ts used for calibration were<br />

glacial acetic acid (Merck, Darmstadt,<br />

Germany) and absolute ethanol of<br />

analytical reag<strong>en</strong>t grade (Panreac,<br />

Barcelona, Spain). Bromocresol<br />

purple (Sigma-Aldrich, Steinheim,<br />

Germany) (5x10 -4 M) in a potassium<br />

dihydrog<strong>en</strong> phosphate (Panreac,<br />

Barcelona, Spain) (0.010 M) buffer of<br />

pH 6.3 constituted the acceptor<br />

solution in the pervaporation unit.<br />

2.2 Samples<br />

Differ<strong>en</strong>t wines, including young and<br />

aged, sweet and dry wines, from the<br />

appellation d’orig<strong>en</strong> Montilla-Moriles<br />

were used for the automation study.<br />

Volatile acidity in these samples was<br />

determined by both the proposed<br />

method and Mathieu method.<br />

2.3 Apparatus<br />

The configuration of the analyser is<br />

shown in Fig. 1. It is composed by an<br />

auto-sampler Crison Sampler15A of<br />

15 positions (Barcelona, Spain); a<br />

four channel Gilson Minipuls3<br />

peristaltic pump (Villiers le Bel,<br />

France); two Rheodyne 7010<br />

automatic injection valves (Elkay,<br />

Galway, Ireland), one of them used to<br />

inject the sample into the donor<br />

stream, and the other as selection<br />

valve; a UV-visible spectrophotometer<br />

Unicam 8625 (Cambridge,<br />

England), equipped with a<br />

Helma 138-QS flow-cell (Jamaica,<br />

NY); a P<strong>en</strong>tium II computer to control<br />

all the units above described.<br />

A Selecta Tectrom polyethyl<strong>en</strong>glycol<br />

bath (Barcelona, Spain)<br />

189


Manuel Urbano Cuadrado Tesis Doctoral<br />

190<br />

acceptor<br />

stream<br />

auto-sampler<br />

donor<br />

stream<br />

peristaltic<br />

pump<br />

injection<br />

valve 1<br />

pervaporation<br />

module<br />

injection<br />

valve 2<br />

thermostat<br />

rection coil<br />

membrane<br />

waste<br />

Fig. 1. Configuration of the FI autoanalyser.<br />

is used to maintain constant the<br />

temperature in the pervaporation<br />

module, which has be<strong>en</strong> described<br />

elsewhere (Mataix et al, 1999,<br />

Gónzalez-Rodríguez et al, 2001).<br />

PTFE pervaporation membranes of 47<br />

mm diameter and 1.5 mm thickness<br />

(Trace, Braunschweig, Germany)<br />

were used in this module.<br />

2.4 Software used for the analyser<br />

control<br />

All the automated units that compose<br />

the analyser are controlled by the<br />

detector<br />

waste<br />

software developed by the authors.<br />

The software is an interactive<br />

interface —developed in Java language<br />

and supported on a communication<br />

layer developed in C<br />

language— that <strong>en</strong>ables the input and<br />

output of information referred to each<br />

analysis. Concerning detection, the<br />

absorbance versus time is the<br />

conv<strong>en</strong>tional transi<strong>en</strong>t analytical<br />

signal in FI. Both the area and the<br />

height of the peak are provided by the<br />

algorithms of the program. These<br />

values are related with volatile


J. Wine Research, <strong>en</strong>viado para su publicación Parte I, cap. 4<br />

acidity.<br />

The automated procedure<br />

described in section 2.5 is stored in a<br />

file under the eXt<strong>en</strong>sible Markup<br />

Language technology (XML). This<br />

App<strong>en</strong>dix<br />

file is composed by data referred to<br />

the differ<strong>en</strong>t units and the actions to<br />

be carried out by these units. The file<br />

structure is shown in the following<br />

app<strong>en</strong>dix:<br />

<br />

<br />

<br />

<br />

crisonSampler15A<br />

com3<br />

15<br />

true<br />

<br />

<br />

gilsonMinipuls3<br />

34<br />

<br />

<br />

gilsonValvemate111R7010<br />

36<br />

<br />

<br />

gilsonValvemate111R7010<br />

35<br />

<br />

<br />

unicam8625<br />

191


Manuel Urbano Cuadrado Tesis Doctoral<br />

192<br />

com2<br />

<br />

<br />

goVial<br />

<br />

<br />

turnClockwise<br />

35.00<br />

<br />

<br />

setInjection<br />

<br />

<br />

setFilling<br />

<br />

<br />

setWavel<strong>en</strong>gth<br />

0430<br />

<br />

<br />

turnClockwise<br />

05.70<br />

60<br />

<br />

<br />

setFilling<br />

60<br />

<br />

<br />

setInjection<br />

60


J. Wine Research, <strong>en</strong>viado para su publicación Parte I, cap. 4<br />

<br />

<br />

setZero<br />

80<br />

<br />

<br />

monitoringAbsorbance<br />

090<br />

<br />

<br />

setInjection<br />

260<br />

<br />

<br />

turnClockwise<br />

28.00<br />

300<br />

<br />

<br />

noMonitoring<br />

360<br />

<br />

<br />

stop<br />

360<br />

<br />

<br />

2.5 Procedures<br />

The results obtained by the automated<br />

FI method were compared with those<br />

provided by the Mathieu procedure —<br />

used in the winery that provided the<br />

samples. Mathieu procedure. T<strong>en</strong> ml<br />

of the target wine is distilled until 6<br />

193


Manuel Urbano Cuadrado Tesis Doctoral<br />

ml of distillate is collected; th<strong>en</strong>, 6 ml<br />

of water is added to the distillation<br />

flask. The process is repeated 3 times<br />

more so that 24 ml of distillate is<br />

finally in the collection flask.<br />

Approximately 10/11 of the total<br />

acetic acid pres<strong>en</strong>t in the wine is<br />

collected in this way. The solution is<br />

th<strong>en</strong> titrated with 0.1 M sodium<br />

hydroxide after addition of 2 drops of<br />

ethanol solution of ph<strong>en</strong>olphtalein.<br />

After this, the solution is acidified<br />

with chloride acid and titrated with<br />

0.05 M iodine for sulphur dioxide<br />

correction in the distillate.<br />

Proposed procedure. Two ml<br />

of sample from an autosampler vial is<br />

inserted via the injection valve 1 into<br />

a water carrier stream (flow-rate 0.8<br />

ml min -1 ). This carrier leads the<br />

sample plug to the lower chamber of<br />

the pervaporation module and th<strong>en</strong> to<br />

waste 1. Meanwhile, the injection<br />

valve 2 is in the filling position, so the<br />

cont<strong>en</strong>t of its loop is static for<br />

<strong>en</strong>richm<strong>en</strong>t in the pervaporated<br />

species. Thus, the acceptor stream,<br />

indicator solution (flow-rate 0.8 ml<br />

min -1 ) is going to the detector, thus<br />

establishing the baseline. After 4 min<br />

194<br />

since injection, injection valve 2 is<br />

switched to the injection position and<br />

the acceptor stream drives the cont<strong>en</strong>t<br />

of the loop to the detector for<br />

monitoring, at 590 nm, the change of<br />

the indicator caused by the analyte. A<br />

calibration graph was run for<br />

interpolation of the data from the<br />

samples.<br />

3. Results and discussion<br />

3.1 Optimisation<br />

The optimisation of the method was<br />

carried out by the authors of the semiautomated<br />

approach (Gónzalez-<br />

Rodríguez et al, 2001). The variables<br />

studied were pH, temperature and<br />

flow-rate. The optimum value of the<br />

pH of the acceptor solution was 6.3;<br />

changes of 0.1 units produced a<br />

significant change of the analytical<br />

signal (13%). Concerning temperature,<br />

changes of 1 ºC involved also<br />

error (6%). Thus, polyetil<strong>en</strong>glycol<br />

was used in the thermostat bath. This<br />

maintained the temperature constant<br />

in the pervaporation module. The<br />

optimum flow-rate was set-up at 0.8<br />

ml min -1 . Changes of 0.1 ml min -1


J. Wine Research, <strong>en</strong>viado para su publicación Parte I, cap. 4<br />

Table I. Differ<strong>en</strong>t statistical parameters obtained by differ<strong>en</strong>t ways.<br />

Height Peak<br />

Area Peak<br />

(Algorithm 1 * )<br />

Area Peak<br />

(Algorithm 2 ** )<br />

Outliers number 3-5 of 18 2-3 of 18 2-3 of 18<br />

Correlation<br />

coeffici<strong>en</strong>t<br />

Relative standard<br />

deviation<br />

0.994-0.996 0.997-0.999 0.997-0.999<br />

0.025-0.040 0.010-0.030 0.010-0.030<br />

* without taking into account baseline re-establishm<strong>en</strong>t<br />

** taking into account baseline re-establishm<strong>en</strong>t<br />

involved a change of the analytical<br />

signal of about 7%.<br />

3.2 Comparison of the results obtained<br />

by the height and area of<br />

the FI peak<br />

Although the estimation of the<br />

volatile acidity making use of the area<br />

is better than that wh<strong>en</strong> the height is<br />

used, the differ<strong>en</strong>ce is not significant.<br />

The comparison betwe<strong>en</strong> the two<br />

signals —height peak and area peak,<br />

the latter calculated by two algorithms,<br />

with and without reestablishm<strong>en</strong>t<br />

baseline—, based on<br />

the outliers number, correlation<br />

coeffici<strong>en</strong>t and relative standard<br />

deviation, is shown in Table I. The<br />

use of the peak area yields slightly<br />

better results, indep<strong>en</strong>d<strong>en</strong>tly of the<br />

algorithm used.<br />

3.3 Characterisation of the method<br />

Calibration curve and correlation<br />

coeffici<strong>en</strong>t<br />

Standards of differ<strong>en</strong>t conc<strong>en</strong>trations<br />

were used. They were prepared by<br />

dilution of glacial acetic acid in bidistilled<br />

water. For long aged wines<br />

(ethanol cont<strong>en</strong>t about 20%) the large<br />

amount of ethanol pervaporated with<br />

the acid compounds changes the<br />

spectrum of the indicator. Thus, the<br />

values obtained do not correspond to<br />

195


Manuel Urbano Cuadrado Tesis Doctoral<br />

the real values. In this case, an<br />

addition of 15% ethanol to the<br />

standards was mandatory.<br />

The calibration curve was<br />

built using the following conc<strong>en</strong>trations<br />

of acetic acid: 0.20, 0.30,<br />

0.40, 0.50, 0.60, 0.70, 0.80 g l -1 . The<br />

correlation coeffici<strong>en</strong>t was 0.999.<br />

Precision: repeatability and reproducibility<br />

The precision of the automated<br />

method was studied taking into<br />

account the repeatability and reproducibility<br />

concepts. The standard<br />

deviation of the values resulting<br />

from applying the same method to<br />

the same sample in a short interval<br />

of time —repeatability— was<br />

0.035 g l -1 . On the other hand, the<br />

standard deviation of the values<br />

resulting from applying the same<br />

method in differ<strong>en</strong>t days —<br />

reproducibility betwe<strong>en</strong> days—<br />

was 0.51 g l -1 in a series of six<br />

days.<br />

Comparison betwe<strong>en</strong> the results<br />

obtained by the automated method<br />

196<br />

and Mathieu method: validation of the<br />

former<br />

Differ<strong>en</strong>t wines from the appellation<br />

d’origine Montilla-Moriles were used<br />

in order to compare both methods. A<br />

significant differ<strong>en</strong>ce was not found<br />

betwe<strong>en</strong> both procedures. The<br />

correlation of the Mathieu method<br />

versus the automated method is<br />

characterised by a coeffici<strong>en</strong>t of<br />

0.975. The regression graph is shown<br />

in Fig. 2.<br />

The analysis frequ<strong>en</strong>cy is 10 samples<br />

per hour; thus, the time required for<br />

the determination is short<strong>en</strong>ed as<br />

compared with that of the Mathieu<br />

method. In addition, no human<br />

interv<strong>en</strong>tion is required.<br />

Advantages of the analyser for the<br />

determination of volatile acidity<br />

The proposed analyser permits to<br />

determine the volatile acidity in a<br />

fully automated manner. A large<br />

number of samples can be analysed<br />

without human interv<strong>en</strong>tion, with<br />

analysis time of 6 minutes per sample.<br />

Thus, the quality control of wine can<br />

be improved thanks to a more


J. Wine Research, <strong>en</strong>viado para su publicación Parte I, cap. 4<br />

Automated method<br />

0,7<br />

0,6<br />

0,5<br />

0,4<br />

y = 0,9653x + 0,0335<br />

r 2 = 0,975<br />

0,4 0,5 0,6 0,7<br />

Mathieu method<br />

Fig. 2. Correlation graph of the Mathieu method versus the automated method.<br />

frequ<strong>en</strong>t monitoring of this parameter.<br />

The cost of the implem<strong>en</strong>tation of the<br />

autoanalyser in wineries is not high<br />

because the instrum<strong>en</strong>ts and apparatus<br />

used, as well as the control software,<br />

are not exp<strong>en</strong>sive.<br />

4. Conclusions<br />

In this work, the advantages involved<br />

in the use of an automated method for<br />

the determination of volatile acidity<br />

have be<strong>en</strong> pres<strong>en</strong>ted. The system<br />

makes human interv<strong>en</strong>tion unnecessary<br />

and reduces the analysis time.<br />

The implem<strong>en</strong>tation of the auto<br />

analyser can be carried out in any<br />

winery thanks to its low cost and easy<br />

use. In addition, no specialised users<br />

are required to develop the analyses.<br />

On the other hand, the<br />

accuracy and precision of the<br />

automated measurem<strong>en</strong>ts are similar<br />

to those of the Mathieu method,<br />

commonly used in wineries. Thus, the<br />

analyser allows improving the quality<br />

control in the winery by a more<br />

frequ<strong>en</strong>t analysis of the target<br />

parameter.<br />

197


Manuel Urbano Cuadrado Tesis Doctoral<br />

A research line is thus op<strong>en</strong><br />

for automation of continuous methods<br />

and the integration of these systems<br />

with an information system.<br />

Refer<strong>en</strong>ces<br />

Barros F.G., Tubino M. (1992)<br />

Conductimetric and Spectrophotometric<br />

Determination of<br />

the volatile Acidity of Wines by<br />

Flow Injection. Analyst, 117,<br />

917-919.<br />

Berezin O.Y., Tur’yan Y.I.,<br />

Kuselman, I., Sh<strong>en</strong>har, A.<br />

(1995) Alternative Methods for<br />

Titratable Acidity Determination.<br />

Talanta, 42, 507-517.<br />

Flanzy C. (2000) Enología: Fundam<strong>en</strong>tos<br />

Ci<strong>en</strong>tíficos y Tecnológicos.<br />

AMV-Mundi Pr<strong>en</strong>sa,<br />

Madrid.<br />

González-Rodríguez J., Perez-Juan P.,<br />

Luque de Castro M.D. (2001)<br />

Semiautomatic Flow-Injection<br />

Method for the Determination<br />

of Volatile Acidity in Wines.<br />

Journal of Association Official<br />

of Analytical Chemistry, 84,<br />

1846-1850<br />

198<br />

Mataix E., Luque de Castro M.D.<br />

(1999) Sequ<strong>en</strong>tial Determination<br />

of Total and Volatile<br />

Acidity in Wines Based on a<br />

Flow Injection-Pervaporation<br />

Approach. Analytical Chimica<br />

Acta, 381, 23-30.<br />

Official Journal of European Community,<br />

L 272, October 1990.<br />

Ribereau-Gayon P., Glories Y.,<br />

Maujean A., Dubourdieu D.<br />

(2000) Handbook of Enology.<br />

Vol 2: The Chemistry of wine.<br />

Stabilization and Treatm<strong>en</strong>ts.<br />

John Wiley & Sons, Ltd.<br />

Su X.L., Nie L.H., Yao S.Z. (1998)<br />

Flow-Injection Analysis Based<br />

on a Membrane Separation<br />

Module and a Bulk Acoustic<br />

Wave Impedance S<strong>en</strong>sor -<br />

Determination of the Volatile<br />

Acidity of Ferm<strong>en</strong>tation Products.<br />

Fres<strong>en</strong>ius' Journal of<br />

Analytical Chemistry, 360, 272-<br />

274.<br />

Tubino M., Barros F.G. (1991)<br />

Conductimetric and Color<br />

imetric Determination of


J. Wine Research, <strong>en</strong>viado para su publicación Parte I, cap. 4<br />

Volatile Acidity of Vinegar by<br />

Flow Injection. Journal of<br />

Association Official of Analytical<br />

Chemistry, 74, 346-350.<br />

Urbano, M., Luque de Castro, M.D.,<br />

Gómez-Nieto, M.A. (2003)<br />

Automation of Flow Injection<br />

Methods in the Winery Industry<br />

through a Computer Program<br />

based on a Multilayer Model.<br />

Proceedings of 9th IEEE<br />

International Confer<strong>en</strong>ce on<br />

Emerging Technologies and<br />

Factory Automation, 530-536.<br />

Valcárcel M., Luque de Castro M.D.<br />

(1987) Flow Injection Analysis:<br />

Principles and Applications,<br />

Ellis Horwood, Chichester.<br />

199


Capítulo 5<br />

A FULLY AUTOMATED METHOD<br />

FOR IN REAL TIME<br />

DETERMINATION OF LACASSE<br />

ACTIVITY IN WINES<br />

El cont<strong>en</strong>ido de este capítulo ha sido <strong>en</strong>viado para su publicación a la revista<br />

Analytica Chimica Acta.


Anal. Chim. Acta, <strong>en</strong>viado para su publicación Parte I, cap. 5<br />

A FULLY AUTOMATED METHOD FOR IN REAL TIME<br />

DETERMINATION OF LACASSE ACTIVITY IN WINES<br />

Manuel Urbano Cuadrado, Pedro M. Pérez-Juan, María D. Luque de Castro<br />

Abstract<br />

An automated method for the measurem<strong>en</strong>t of lacasse activity in musts<br />

and wines is here pres<strong>en</strong>ted. The method is based on the Flow Injection technique<br />

using the mode of stop-flow at the detector with monitoring of the absorbance<br />

change caused by the oxidation of the substrate (syringaldazine). All the units<br />

that form the autoanalyser are controlled by a computer program for automating<br />

continuous processes developed by authors. This work was aimed at providing<br />

wineries with a new tool for evaluating the degree of infection by Botrytis<br />

cinerea that overcomes the disadvantages involved in the measurem<strong>en</strong>t of<br />

gluconic acid. In addition, a study of the relationship betwe<strong>en</strong> the cont<strong>en</strong>t of<br />

gluconic acid and lacasse activity was carried out and no relationship was found.<br />

Thus, this acid is not an appropriate marker for evaluating infection by Botrytis.<br />

The analytical method was characterised and the limit of detection and the limit<br />

of quantification were 0.2 and 0.6 U ml -1 , respectively. The linear range was 0.6<br />

– 24.0 U ml -1 . This range is <strong>en</strong>ough for the application of the method to wine;<br />

nevertheless an <strong>en</strong>largem<strong>en</strong>t of the range, if required, could be obtained with a<br />

higher dilution factor. Repeatability and reproducibility, expressed as relative<br />

standard deviation, were 4.0 and 6.5 %, respectively. The total time necessary per<br />

analysis is 12 minutes. The method can be used as a routine method at grape<br />

reception in wineries.<br />

Keywords: Automation, Lacasse, Wine, Flow injection.<br />

203


Manuel Urbano Cuadrado Tesis Doctoral<br />

1. Introduction<br />

The chemical composition of wine is<br />

very complex. The final product must<br />

contain the major and minor compon<strong>en</strong>ts<br />

within a conc<strong>en</strong>tration range<br />

that assures both the pursued<br />

properties of a kind of wine and the<br />

abs<strong>en</strong>ce of stability problems in long<br />

time storage [1,2]. This fact implies<br />

the monitoring of a number of<br />

chemical parameters during the winemaking<br />

process, that is, from the<br />

reception of the grape to just before<br />

wine market. Thus, the analytical<br />

tools used in monitoring wine<br />

elaboration have an important role in<br />

this field. Techniques like spectrophotometry,<br />

d<strong>en</strong>sitometry, titration,<br />

chromatography, etc. are widely<br />

employed in winery laboratories.<br />

Most analytical methods<br />

recognised by the international wine<br />

community are manual or with a low<br />

degree of automation. Although these<br />

methods show high accuracy and<br />

roughness, they are oft<strong>en</strong> very timeconsuming.<br />

So monitoring wine elaboration<br />

in real time, and particularly at<br />

grape reception, and ev<strong>en</strong> before<br />

204<br />

harvest is an unfeasible task. Thus, to<br />

obtain data of the raw material, useful<br />

for making a good musts, and avoid<br />

economical losses is very desirable.<br />

O<strong>en</strong>ology, as other areas, has<br />

tak<strong>en</strong> advantages from automation in<br />

analytical chemistry. During the two<br />

last decades, numerous automated<br />

methods, most based on continuous<br />

techniques —Flow Injection (FI) as<br />

the commonest—, have be<strong>en</strong> developed<br />

for monitoring several parameters<br />

in wine [3-8]. In addition,<br />

the joint use of multivariate analysis<br />

and spectroscopic techniques with<br />

multichannel detection —Near Infrared<br />

Spectroscopy, Fourier Transform<br />

Mid Infrared Spectroscopy, etc.— has<br />

<strong>en</strong>abled the determination of various<br />

<strong>en</strong>ological parameters in a few<br />

minutes [9-13]. Nevertheless, these<br />

methods are not applicable to minor<br />

wine compon<strong>en</strong>ts.<br />

As starting point, a good state<br />

of grape is the key to elaborate a good<br />

wine. The quality of grape diminishes<br />

wh<strong>en</strong> infections of differ<strong>en</strong>t nature<br />

occur. The infections can be caused<br />

by either fungi (such as Botrytis<br />

cinerea, P<strong>en</strong>icilium, Aspergillus and


Anal. Chim. Acta, <strong>en</strong>viado para su publicación Parte I, cap. 5<br />

Mucor) or by bacteria (Acetobacter<br />

and Gluconobacter). Although the<br />

pres<strong>en</strong>ce of Botrytis cinerea can drive<br />

to “noble rot” —pursued rot in the<br />

elaboration of special wines such as<br />

the Fr<strong>en</strong>ch Sauternes or the Hungarian<br />

Tokay—, this fungus oft<strong>en</strong> involves<br />

problems in the wine-making process.<br />

Wh<strong>en</strong> this occurs, a wine disease<br />

called as “common rot” or “grey rot”<br />

takes place. [14-15]<br />

The common rot consists of<br />

an increase of the oxidase activity of<br />

<strong>en</strong>zymes such as lacasse and tyrosine,<br />

which cause colour changes in wines,<br />

the formation of glycerol and some<br />

polysaccharides, decrease of titrable<br />

acidity and increase of volatile acidity<br />

(if Botrytis cinerea is accompanied by<br />

the pres<strong>en</strong>ce of acetic bacteria)<br />

[16,17]. Although the oxidase activity,<br />

as well as bacteria contamination<br />

can be reduced by addition of sulphur<br />

dioxide and filtering of polysaccharides,<br />

the s<strong>en</strong>sory properties are<br />

affected as a result. In addition, the<br />

pres<strong>en</strong>ce of gluconic acid also affects<br />

the stability for long-term storage.<br />

Nowadays, the cont<strong>en</strong>t of<br />

gluconic acid is the unique parameter<br />

employed in most wineries for<br />

monitoring the degree of infection in<br />

grapes. The gluconic acid conc<strong>en</strong>tration<br />

in must or wine is characteristic<br />

of the source of the acid, that<br />

is, caused by either fungi or bacteria<br />

[18,14]. This criterion is only<br />

approximate. Moreover, as above<br />

comm<strong>en</strong>ted, gluconic acid is determined<br />

in a manual way by an<br />

exp<strong>en</strong>sive <strong>en</strong>zymatic.<br />

Measurem<strong>en</strong>t of lacasse activ<br />

ity is a good parameter to evaluate the<br />

infection by botrytis only. So, this<br />

parameter could be very useful for<br />

controlling problems regarding colour<br />

change and increase of the dry extract.<br />

A manual and easy to automate photometric<br />

method for the determination<br />

of lacasse activity in wines was<br />

developed by Dubourdieu et al. [19];<br />

nevertheless and despite its simplicity,<br />

the automation of the lacasse activity<br />

determination in wine using the<br />

reaction described has be<strong>en</strong> not<br />

carried out. An FI method based on<br />

fluorimetric detection has be<strong>en</strong><br />

described, but not applied to real<br />

samples [20]. Although the s<strong>en</strong>sitivity<br />

of this method is very high, its<br />

205


Manuel Urbano Cuadrado Tesis Doctoral<br />

complexity and costs are higher than<br />

those of the photometric method.<br />

The aim of the research here<br />

pres<strong>en</strong>ted was the developm<strong>en</strong>t of an<br />

FI method for in real time<br />

determination of lacasse activity in<br />

wine. Thus, this g<strong>en</strong>eral objective was<br />

divided into three more specific goals:<br />

1) to use the photometric reaction<br />

above comm<strong>en</strong>ted; 2) to develop a<br />

rough method to be used as routine<br />

method; 3) to automate the method for<br />

short<strong>en</strong>ing the time necessary for<br />

making decisions about the state of<br />

the grape, thus improving the quality<br />

of the final product.<br />

2. Experim<strong>en</strong>tal<br />

2.1 Apparatus and instrum<strong>en</strong>ts<br />

The experim<strong>en</strong>tal set-up proposed for<br />

lacasse determination is outlined in<br />

Fig. 1. This autoanalyser is composed<br />

by the following elem<strong>en</strong>ts: a Crison<br />

Sampler15A auto-sampler of 15<br />

positions (Barcelona, Spain) equipped<br />

with a stirrer; a four channel Gilson<br />

Minipuls3 peristaltic pump (Villiers le<br />

Bel, France); two Rheodyne 7010<br />

automatic injection valves (Elkay,<br />

206<br />

Galway, Ireland), used for injecting<br />

the sample into the carrier 1 stream<br />

and the substrate solution into the<br />

carrier 2 stream; a UV-visible spectrophotometer<br />

Unicam 8625 (Cambridge,<br />

England), equipped with a<br />

Helma 138-QS flow-cell (Jamaica,<br />

NY); a P<strong>en</strong>tium II computer for<br />

controlling all the units above<br />

described.<br />

A Selecta Tectrom polyethyl<strong>en</strong>glycol<br />

bath (Barcelona, Spain)<br />

was used for maintaining constant the<br />

temperature of both carrier and<br />

substrate solutions.<br />

2.2 Reag<strong>en</strong>ts and solutions<br />

Buffer solutions (0.100 M) of pH 6.5,<br />

5.5 and 4.5 were prepared from<br />

potassium dihydrog<strong>en</strong> phosphate<br />

anhydrous (Merck, Darmstadt, Germany),<br />

sodium acetate anhydrous<br />

(Panreac, Barcelona, Spain) and<br />

sodium cytrate anhydrous (Panreac,<br />

Barcelona, Spain), respectively.<br />

Carrier 1 and carrier 2 were<br />

composed by distilled water and<br />

distilled water–ethanol mixture,<br />

respectively. The composition of<br />

carrier 2 was aimed at avoiding air


Anal. Chim. Acta, <strong>en</strong>viado para su publicación Parte I, cap. 5<br />

remote control<br />

substrate<br />

reag<strong>en</strong>t<br />

carrier 2<br />

autosampler<br />

carrier 1<br />

peristaltic<br />

pump<br />

remote control<br />

remote control<br />

injection<br />

valve 2<br />

injection<br />

valve 1<br />

remote control<br />

conflu<strong>en</strong>ce<br />

point<br />

remote control<br />

detector<br />

Fig. 1. Autoanalyser for the determination of lacasse in musts.<br />

bubbles owing to the mixture betwe<strong>en</strong><br />

aqueous and organic phases in the<br />

conflu<strong>en</strong>ce point (see Fig. 1). A 1:3<br />

water-ethanol ratio assured the abs<strong>en</strong>ce<br />

of air bubbles.<br />

Substrate solutions (0.05, 0.10<br />

and 0.15%) were prepared by<br />

dissolving syringaldazine (Sigma,<br />

Steinheim, Germany) in distilled<br />

water-ethanol (25–75 %) mixture (by<br />

the reasons above comm<strong>en</strong>ted).<br />

Ultrasonification was necessary for<br />

complete dissolution of the substrate.<br />

Lacasse from Trametes versi-<br />

waste<br />

color (Fluka Chemie, Steinheim,<br />

Germany) was used for preparing a<br />

conc<strong>en</strong>trated solution of lacasse in<br />

sodium acetate buffer (0.100 M) of<br />

pH 5.5. Standards were prepared from<br />

this solution.<br />

Polyvinypolypyrrolidone (P-<br />

VPP) (Sigma, Steinheim, Germany)<br />

was the resin used for anthocians and<br />

tanins removal.<br />

Enzymatic tests (Boehringer<br />

Mannheim, R-Biopharm, Darmstadt,<br />

Germany) based on ultraviolet monitoring<br />

were used for quantifying the<br />

207


Manuel Urbano Cuadrado Tesis Doctoral<br />

cont<strong>en</strong>t of gluconic acid.<br />

2.3 Samples and preparation<br />

Forty musts and wines—including<br />

red, rosé and white musts and wines<br />

(20, 10 and 10 samples, respectively)<br />

and from differ<strong>en</strong>t grape variety—<br />

from the apellation d’origine “La<br />

Mancha” were employed in the study<br />

of applicability of the method to real<br />

samples. Lacasse standards for the<br />

characterisation of the method were<br />

prepared using a pool from the<br />

differ<strong>en</strong>t musts and wines. Standard<br />

additions of lacasse were carried out<br />

due to the abs<strong>en</strong>ce of infections<br />

produced by Botrytis in the 2004<br />

harvest (good climate factors).<br />

Samples were prepared by<br />

adding equal volumes of must or wine<br />

and 0.1 M sodium acetate buffer<br />

solution of pH 5.5; thus, samples were<br />

diluted in 1:2 proportion.<br />

2.4 Procedures<br />

Flow injection method for the determination<br />

of lacasse in wines. T<strong>en</strong> ml<br />

of sample is added to vials containing<br />

0.5 g of PVPP. The mixture is stirred<br />

for 10 min for anthocians and tanins<br />

208<br />

removal, and th<strong>en</strong>, the sample (0.300<br />

ml) and the substrate (1 ml) solutions<br />

are injected into the carriers 1 and 2,<br />

respectively. A filter at the <strong>en</strong>d of the<br />

FI tube inserted in the vials assures<br />

the abs<strong>en</strong>ce of solid particles from the<br />

resin into the FI tubes. The sample is<br />

injected five seconds after injecting<br />

the substrate. Both the differ<strong>en</strong>ce in<br />

injection times and the ratio of the<br />

injection volumes make possible that,<br />

at the conflu<strong>en</strong>ce point, the substrate<br />

merges with the c<strong>en</strong>tre of the sample.<br />

Th<strong>en</strong>, wh<strong>en</strong> the sample-substrate plug<br />

reaches the detector, the flow is<br />

stopped. T<strong>en</strong> seconds after stopping<br />

the flow, the absorbance data are<br />

monitored at 700 nm for 30 seconds.<br />

The slope of absorbance vs time plot<br />

repres<strong>en</strong>ts the progress of the<br />

<strong>en</strong>zymatic reaction. The increm<strong>en</strong>t of<br />

absorbance with time is related to the<br />

lacasse activity.<br />

Procedure for determination<br />

of gluconic acid in wines based on<br />

<strong>en</strong>zymatic kit. This procedure is<br />

described in the instructions for using<br />

the <strong>en</strong>zymatic kit. It is based on the<br />

absorbance measurem<strong>en</strong>ts (at 340,<br />

344 or 365 nm) at 5 min (after mixing


Anal. Chim. Acta, <strong>en</strong>viado para su publicación Parte I, cap. 5<br />

the sample and 2 of the 3 reag<strong>en</strong>ts and<br />

before addition of the third reag<strong>en</strong>t,<br />

which starts the <strong>en</strong>zymatic reaction)<br />

and 25 min.<br />

2.5 Software used for the analyser<br />

control<br />

All the automatic units that compose<br />

the autoanalyser are controlled by the<br />

software developed by the authors [3].<br />

The software is an interactive<br />

interface —developed in Java language<br />

and supported on a communication<br />

layer developed in C<br />

language— that <strong>en</strong>ables the input and<br />

output of information from each<br />

analysis.<br />

The automated procedure<br />

described in section 2.4 is stored in a<br />

file under the eXt<strong>en</strong>sible Markup<br />

Language technology (XML). This<br />

file is composed by data related to the<br />

differ<strong>en</strong>t units and the actions to be<br />

carried out by these units.<br />

3. Results and discussion<br />

3.1 Optimisation of the <strong>en</strong>zymatic<br />

reaction<br />

The variables affecting the <strong>en</strong>zymatic<br />

reaction are pH, temperature and<br />

substrate conc<strong>en</strong>tration. A full design<br />

was built for a scre<strong>en</strong>ing study of the<br />

behaviour of these variables. The<br />

number of experim<strong>en</strong>ts carried out is<br />

giv<strong>en</strong> by the expression 2 n +3, where n<br />

is the number of variables and the<br />

term 3 takes into account the three<br />

c<strong>en</strong>tre points. Thus, 11 random<br />

experim<strong>en</strong>ts were developed. The<br />

upper and lower values giv<strong>en</strong> to each<br />

factor were selected from the<br />

available data and experi<strong>en</strong>ce<br />

gathered in preliminary experim<strong>en</strong>ts.<br />

These values were 4.5 and 6.5 units<br />

for the pH; 20.0 and 40.0 ºC for the<br />

temperature; and 0.05 and 0.15 % for<br />

the substrate conc<strong>en</strong>tration.<br />

At 95% of significance level<br />

the results of the scre<strong>en</strong>ing was that<br />

only the pH is an influ<strong>en</strong>tial factor,<br />

and with negative influ<strong>en</strong>ce. Neither<br />

temperature nor substrate conc<strong>en</strong>tration<br />

affect the signal. Relationship<br />

betwe<strong>en</strong> factors was not observed.<br />

The fact of non-influ<strong>en</strong>ce of the<br />

temperature assures easy implem<strong>en</strong>tation<br />

of the method in the wine<br />

industry. The study of the pH showed<br />

that the lacasse activity diminishes<br />

drastically for values of pH above 6.0,<br />

209


Manuel Urbano Cuadrado Tesis Doctoral<br />

and pres<strong>en</strong>ts its optimum at pH 5.0.<br />

3.2 Optimisation of the anthocyans<br />

and tannins removal by PVPP<br />

Several studies carried out aimed at<br />

demonstrating the influ<strong>en</strong>ce of tanins<br />

and anthocyanins on the lacasse<br />

activity. These two groups of<br />

compounds pres<strong>en</strong>t in musts are<br />

retained in the PVPP resin. The<br />

ret<strong>en</strong>tion capacity of this material as a<br />

function of the quantity of resin was<br />

tested. The <strong>en</strong>zyme activity was set at<br />

2.0 U ml -1 and the matrix employed<br />

was the pool prepared using differ<strong>en</strong>t<br />

musts.<br />

Figure 2 shows the values of<br />

slope of the A/t plot vs the grams of<br />

resin. An amount of resin betwe<strong>en</strong><br />

0.1-0.8 g was employed in this study.<br />

From 0.5 g, the slope was constant.<br />

Th<strong>en</strong>, 0.5 g of resin was used for<br />

tanins and anthocyanins removal from<br />

a red wine (as this wine contains<br />

higher amounts of tanins than the pool<br />

used for the study).<br />

3.2 Analytical characterisation of the<br />

FI method<br />

210<br />

Limits of detection (LOD) and quantification<br />

(LOQ)<br />

Table 1 shows the analytical characteristics<br />

of the method proposed. The<br />

limit of detection (LOD) and the limit<br />

of quatification (LOQ) were calculated<br />

using the expressions: CLOD = Cb +<br />

3 * Sb and CLQ = Cb + 10 * Sb,<br />

respectively, where Cb and Sb<br />

correspond to the conc<strong>en</strong>tration of the<br />

blank and the standard deviation of<br />

the blank signal, respectively. The<br />

values obtained were 0.1 and 0.3 U<br />

ml -1 for LOD and LOQ, respectively.<br />

Taking into account the 1:1 dilution of<br />

the samples, the values of these<br />

parameters in the samples are 0.2 and<br />

0.6 U ml -1 .<br />

Because not samples of must<br />

infected by Botrytis cinerea were<br />

available during the developm<strong>en</strong>t of<br />

this research, data about the<br />

relationship betwe<strong>en</strong> lacasse activity<br />

and the degree of infection were<br />

obtained from the literature [19]. The<br />

grape that showed the minimum value<br />

of activity wh<strong>en</strong> there was a light<br />

infection was the Cabernet-Sauvignon<br />

variety. The value obtained was 0.8 U


Anal. Chim. Acta, <strong>en</strong>viado para su publicación Parte I, cap. 5<br />

slope (mA/s)<br />

8<br />

7<br />

6<br />

5<br />

4<br />

3<br />

2<br />

1<br />

0<br />

0 0,2 0,4<br />

Resin (g)<br />

0,6 0,8<br />

Fig. 2. Slope (mA s -1 ) vs resin quantity (g). The <strong>en</strong>zyme activity was set at 2.0 U<br />

ml -1 .<br />

ml -1 . Thus, the LOD and LOQ<br />

obtained with the automated method<br />

were appropriate for evaluating the<br />

degree of infection by Botrytis.<br />

Calibration curve and regression<br />

coeffici<strong>en</strong>t<br />

A calibration curve was run using<br />

standard solutions prepared following<br />

the procedure under sample preparation,<br />

in the Experim<strong>en</strong>tal section.<br />

The matrix employed was the pool<br />

from must non affected by fungi. The<br />

standards covered a conc<strong>en</strong>tration<br />

range of 0.0–18.0 U ml -1 (namely, 0.3,<br />

1.0, 3.0, 6.0, 9.0, 12.0, 15.0, 18.0 U<br />

ml -1 ). A linear response was found<br />

betwe<strong>en</strong> 0.3–12.0 U ml -1 . Thus, the<br />

effective linear range was 0.6–24.0 U<br />

ml -1 since the sample preparation<br />

involved the 1:1 dilution of musts. A<br />

higher dilution <strong>en</strong>larges the linear<br />

range for lacasse determination. The<br />

regression coeffici<strong>en</strong>t was 0.988.<br />

The relationship betwe<strong>en</strong> lacasse<br />

activity and the infection by<br />

Botrytis dep<strong>en</strong>ds on grape variety.<br />

The range of lacasse activity obtained<br />

in musts is betwe<strong>en</strong> 0.8–60.0 U ml -1 ,<br />

which is wider than the linear range of<br />

211


Manuel Urbano Cuadrado Tesis Doctoral<br />

Table 1. Analytical characteristics of the method proposed (1:1 sample dilution).<br />

212<br />

Limit of detection (LOD) 0.2 U ml -1<br />

Limit of quantification (LOQ) 0.6 U ml -1<br />

Linear range 0.6 – 24 U ml -1<br />

Calibration equation y = 3.05 x + 1.18<br />

Regression coeffici<strong>en</strong>t (r) 0.988<br />

Repeatability 4 %<br />

Reproducibility (six days) 6.5 %<br />

the method proposed. This fact does<br />

not restrict the applicability of the<br />

method as: 1) For a giv<strong>en</strong> amount of<br />

<strong>en</strong>zyme added, the sample-buffer<br />

dilution ratio does not affect the<br />

activity of the biocatalyst for ratio<br />

equal to or higher than 1:1, and 2).<br />

The higher values of activity corresponds<br />

to rot levels that can be<br />

appreciated by ocular inspection and<br />

the effect in wine levelled off for<br />

activities higher than 20.0 U ml -1 .<br />

Precision of the method<br />

The precision of the proposed method<br />

was studied as repeatability and<br />

reproducibility. The parameter employed<br />

was the standard deviation for<br />

the same red wine spiked with 2.0 U<br />

ml -1 of lacasse. The repeatability or<br />

standard deviation obtained applying<br />

the method to samples in a short time<br />

interval was 0.08 U ml -1 , which corresponds<br />

to 4.0 % in relative terms.<br />

The reproducibility or standard<br />

deviation obtained applying the<br />

method to samples in differ<strong>en</strong>t days<br />

was 0.13 U ml -1 , which means 6.5 %<br />

in relative terms, for a six-day study.<br />

These precision values show<br />

the roughness of the method, which<br />

can be used as a routine tool for<br />

evaluating pot<strong>en</strong>tial infections by<br />

Botrytis.


Anal. Chim. Acta, <strong>en</strong>viado para su publicación Parte I, cap. 5<br />

3.3 Application of the method to real<br />

samples. Relationship betwe<strong>en</strong> the<br />

lacasse activity and the cont<strong>en</strong>t of<br />

gluconic acid<br />

Gluconic acid and lacasse activity<br />

were determined in forty samples by<br />

the <strong>en</strong>zymatic test and the automated<br />

method proposed, respectively. The<br />

cont<strong>en</strong>t of gluconic acid obtained was<br />

betwe<strong>en</strong> 0.40 and 1.20 g l -1 . Nevertheless,<br />

lacasse activity in the samples<br />

was not detected. Although inprevious<br />

research [18,14] it was stated<br />

that a cont<strong>en</strong>t of gluconic acid of 1- 2<br />

g l -1 indicates low levels of rot, this<br />

does not mean infection by Botrytis as<br />

no oxidase activity was obtained, so<br />

another disease could be involved in<br />

the g<strong>en</strong>eration of gluconic acid<br />

(namely, gluconobacter bacteria). In<br />

addition, the 2004 harvest (to which<br />

the samples in this study belong) was<br />

good regarding climate conditions for<br />

abs<strong>en</strong>ce of infections by Botrytis.<br />

All the forty samples were<br />

spiked with laccase, they providing<br />

activities in agreem<strong>en</strong>t with the<br />

amount of biocatalyst added.<br />

4. Conclusions<br />

A method for full automation of the<br />

monitoring of Botrytis infection is<br />

pres<strong>en</strong>ted here with the aim of<br />

overcoming the limitations for<br />

measurem<strong>en</strong>t of the curr<strong>en</strong>t parameter<br />

used for this purpose (namely,<br />

gluconic acid). The biochemical<br />

parameter involved is the oxidase<br />

activity of lacasse.<br />

The short<strong>en</strong>ing of the time<br />

required for analysis (30 min for the<br />

determination of gluconic acid and 12<br />

for that of lacasse activity), the total<br />

automation (no user involved on the<br />

analysis), and the low costs of the<br />

method proposed makes it an<br />

excell<strong>en</strong>t alternative for the<br />

determination of Botrytis disease.<br />

Flow injection provides the appropriate<br />

tool for substituting the<br />

exp<strong>en</strong>sive, manual and timeconsuming<br />

method of the <strong>en</strong>zymatic<br />

kit.<br />

A key aspect of the research<br />

carried out, from an <strong>en</strong>ological point<br />

of view, is the abs<strong>en</strong>ce of relationship<br />

betwe<strong>en</strong> the cont<strong>en</strong>t of gluconic acid<br />

and lacasse activity. This fact is due to<br />

213


Manuel Urbano Cuadrado Tesis Doctoral<br />

the exist<strong>en</strong>ce of several sources<br />

(namely, fungi and bacteria) of<br />

gluconic acid in wine in contrast to a<br />

single source of laccase (fungi). In<br />

fact, the pres<strong>en</strong>ce of gluconic acid and<br />

the abs<strong>en</strong>ce of lacasse have be<strong>en</strong><br />

demonstrated in this work. This<br />

means that musts with a high level of<br />

gluconic acid would drive to wine<br />

without problems related to colour<br />

change and increase of dry extract.<br />

The method proposed can be<br />

implem<strong>en</strong>ted as a routine method in<br />

the grape reception for improving<br />

quality control.<br />

Acknowledgem<strong>en</strong>ts<br />

The Comisión Interministerial de<br />

Ci<strong>en</strong>cia y Tecnología (CICyT) is<br />

thanked for financial support (Project<br />

AGL2000-0321-P4-03).<br />

Refer<strong>en</strong>ces<br />

[1] C. Flanzy, Enología: Fundam<strong>en</strong>tos<br />

Ci<strong>en</strong>tíficos y Tecnológicos (Enology:<br />

Sci<strong>en</strong>tific and Technological<br />

Fundam<strong>en</strong>tals), AMV-Mundi<br />

Pr<strong>en</strong>sa, Madrid, 2000.<br />

[2]. P. Ribereau-Gayon, Y. Glories,<br />

A. Maujean, D. Dubourdieu,<br />

214<br />

Handbook of Enology. Vol. 2:<br />

The Chemistry of wine. Stabilization<br />

and Treatm<strong>en</strong>ts, John<br />

Wiley & Sons, Ltd., 2000.<br />

[3] M. Urbano, M.D. Luque de<br />

Castro, M.A. Gómez-Nieto,<br />

Automation of Flow Injection<br />

Methods in the Winery Industry<br />

through a Computer Program<br />

based on a Multilayer Model. In<br />

Proceedings of 9th IEEE International<br />

Confer<strong>en</strong>ce on Emerging<br />

Technologies and Factory Automation,<br />

530-536, Lisbon, 2003.<br />

[4] J. González, P. Pérez-Juan, M.D.<br />

Luque de Castro, Talanta, 56<br />

(2002) 53.<br />

[5] E. Mataix, M.D. Luque de Castro,<br />

Talanta, 51 (2000) 489.<br />

[6] X.L. Su, L.H. Nie, S.Z. Yao, Fres.<br />

J. Anal. Chem., 360 (1998) 272.<br />

[7] O.Y. Berezin, Y.I. Tur’yan, I.<br />

Kuselman, A. Sh<strong>en</strong>har, Talanta,<br />

42 (1995) 507.<br />

[8] F.G. Barros, M. Tubino, Analyst,<br />

117 (1992) 917.<br />

[9] M. Urbano-Cuadrado, M.D. Luque<br />

de Castro, P.M. Pérez-Juan, J.


Anal. Chim. Acta, <strong>en</strong>viado para su publicación Parte I, cap. 5<br />

García Olmo, M.A. Gómez-Nieto,<br />

Anal. Chim. Acta, 527 (2004) 81.<br />

[10] Y. Li, C. Brown, J. Near Infrared<br />

Spectrosc. 7 (1999) 101.<br />

[11] C.M. García-Jares, B. Medina,<br />

Fres. J. Anal. Chem. 357 (1997)<br />

86.<br />

[12] R. Eberl, J. Near Infrared<br />

Spectrosc. 6 (1998) 133.<br />

[13] M. Gish<strong>en</strong>, R.G. Dambergs, A.<br />

Kambouris, M. Kwiatkowski,<br />

W.U. Cynkar, P.B. Høj, I.L.<br />

Francis, Proceedings of the 9 th<br />

International Confer<strong>en</strong>ce on Near<br />

Infrared Spectroscopy 1999, 917.<br />

[14] L. Pérez, M.J. Valcárcel, P.<br />

González, B. Domecq, Am. J.<br />

Enol. Vitic., 42 (1991) 58.<br />

[15] J. Suárez, B. Iñigo, Microbial<br />

Alterations in Wines. Yeast and<br />

Molds. In Enological Microbiology,<br />

331-347, Mundi-Pr<strong>en</strong>sa,<br />

Madrid, 1990.<br />

[16] A. Joyeux, S. Lafon-Lafourcade,<br />

P. Ribereau-Gayon, Appl. Environ.<br />

Microbiol., 48 (1984) 153.<br />

[17] A. Joyeux, S. Lafon-Lafourcade,<br />

P. Ribereau-Gayon, Sci. Alim<strong>en</strong>t.,<br />

4 (1984) 247.<br />

[18] S. Chauvet, PhD Thesis,<br />

University of Bordeaux II, 1981.<br />

[19] D. Dubourdieu, C. Grassin, C.<br />

Deruche, P. Ribereau-Gayon,<br />

Connaissance<br />

(1984) 237.<br />

Vigne Vin, 18<br />

[20] H. Huang, R. Cai, Y. Du, Z. Lin,<br />

Y. Z<strong>en</strong>g, Anal. Chim. Acta, 318<br />

(1995) 63.<br />

215


Capítulo 6<br />

JWISWINE: A JAVA-WEB<br />

INFORMATION SYSTEM FOR<br />

QUALITY CONTROL IN WINERIES<br />

El cont<strong>en</strong>ido de este capítulo ha sido <strong>en</strong>viado a la revista Computers and<br />

Electronics in Agriculture para su publicación y ha sido pres<strong>en</strong>tado como cartel<br />

<strong>en</strong> la 5th International Confer<strong>en</strong>ce on Enterprise Information Systems, celebrada<br />

<strong>en</strong> Angers (Francia) <strong>en</strong>tre el 22 y el 26 de abril de 2003.


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 6<br />

JWISWINE: A JAVA-WEB INFORMATION SYSTEM FOR QUALITY<br />

CONTROL IN WINERIES<br />

M. Urbano-Cuadrado, M.D. Luque de Castro, P. M. Pérez-Juan, M. A. Gómez-<br />

Nieto<br />

Abstract<br />

A system for the overall managem<strong>en</strong>t of the information related to<br />

analytical processes and quality control in wineries is pres<strong>en</strong>ted. It <strong>en</strong>ables the<br />

integration of semi-automated and automated analytical processes. It has be<strong>en</strong><br />

developed in Java using the database managem<strong>en</strong>t system Oracle 9i and can be<br />

executed both as a stand-alone program and through a standard Internet browser.<br />

It has be<strong>en</strong> developed under the evolutionary increm<strong>en</strong>tal paradigm in order to<br />

take into account users’ requirem<strong>en</strong>ts and using UML object ori<strong>en</strong>ted technology<br />

to repres<strong>en</strong>t the complexity of the processes and the large amount of analytical<br />

information g<strong>en</strong>erated in wine production. Thus, a decision support system,<br />

JWisWine, was built for monitoring wine production.<br />

Keywords: Decision support system, Quality control, Wineries, Object-ori<strong>en</strong>ted<br />

paradigm.<br />

219


Manuel Urbano Cuadrado Tesis Doctoral<br />

1. Introduction<br />

Wine composition and production are<br />

both extremely complex (Flanzy,<br />

2000, Ribereau-Gayon et al., 2000).<br />

Chemical monitoring and control of<br />

the overall production process is<br />

needed to provide knowledge of the<br />

quality of the raw material (grape),<br />

the intermediate and final product.<br />

Figure 1 shows a detailed activity<br />

diagram (Booch et al., 1999) of the<br />

overall process. Analytical monitoring<br />

of the <strong>en</strong>ological parameters —in<br />

parallel with the process— determines<br />

the start and <strong>en</strong>d of each step, in<br />

addition to the quality achieved. The<br />

availability of analytical information<br />

at the precise time and in the<br />

appropriate format is crucial to this<br />

operation.<br />

Advances in the automation<br />

of quality control requires: a)<br />

implem<strong>en</strong>tation of a system for<br />

managem<strong>en</strong>t, organisation, handling<br />

and treatm<strong>en</strong>t of the information<br />

g<strong>en</strong>erated throughout the production<br />

process with the aim of providing the<br />

technical manager with <strong>en</strong>ough<br />

knowledge for making decisions<br />

220<br />

(McGrawth et al., 1998, Muller et al.,<br />

1999); b) automation of analytical<br />

methods using instrum<strong>en</strong>tation<br />

coupled to the information system<br />

(Ilyukhin et al., 2001).<br />

Three common steps are<br />

involved in the analysis of the<br />

chemical parameters: sampling and<br />

possible sample treatm<strong>en</strong>t; instrum<strong>en</strong>t<br />

measurem<strong>en</strong>t and data collection and<br />

processing of the instrum<strong>en</strong>ts outputs<br />

(Figure 2). An average of 75 and 25<br />

samples per day (ferm<strong>en</strong>tation and<br />

non-ferm<strong>en</strong>tation periods, respectively,<br />

with a number of 5-20 analyses<br />

per sample) is carried out in the<br />

laboratories in which JWisWine has<br />

be<strong>en</strong> implem<strong>en</strong>ted. The amount of<br />

data g<strong>en</strong>erated as a consequ<strong>en</strong>ce of<br />

the variety and number of analyses<br />

justifies the implem<strong>en</strong>tation of an<br />

information managem<strong>en</strong>t system with<br />

the following aims:<br />

1. To make possible the appropriate<br />

managem<strong>en</strong>t of historical data.<br />

This includes the effici<strong>en</strong>t storage<br />

of a huge amount of data<br />

corresponding to previous harvests,<br />

which can be used wh<strong>en</strong><br />

and as required.


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 6<br />

GRAPE<br />

NEW WINE<br />

VINTAGE WINE<br />

AGEING<br />

MARKET<br />

RECEPTION OF RAW MATERIAL<br />

Transport and discharge<br />

PRE-FERMENTATION<br />

Crush<br />

Press and must selection (white wines)<br />

Must selection (white wines)<br />

Must clarification (white wines)<br />

Chemical correction (pH, sugars, sulphur dioxide, N)<br />

FERMENTATION<br />

Alcohol ferm<strong>en</strong>tation<br />

Maceration (red wines)<br />

Press and wine-must selection (red wines)<br />

NEW WINE MATURATION<br />

Malolactic ferm<strong>en</strong>tation<br />

Phisycal-chemical equilibrium<br />

Spontaneous clarification<br />

Storage, wine selection and bl<strong>en</strong>ding<br />

NO<br />

AGEING<br />

YES<br />

Wood<strong>en</strong> casks<br />

Bottles<br />

FINAL PROCESS<br />

Clarification<br />

Filtration<br />

Physical and chemical stabilization<br />

Packaging<br />

D<strong>en</strong>sity, Reducing sugars,<br />

pH, Gluconic acid,<br />

Pesticides residues<br />

D<strong>en</strong>sity, Reducing sugars,<br />

pH, Sulphur dioxide,<br />

Readity<br />

assimilable nitrog<strong>en</strong><br />

D<strong>en</strong>sity, Reducing sugars,<br />

Colour and Total ph<strong>en</strong>ols<br />

(red wines)<br />

D<strong>en</strong>sity, Reducing sugars,<br />

Colour and Total ph<strong>en</strong>ols<br />

(red wines)<br />

D<strong>en</strong>sity, Reducing sugars,<br />

Alcohol cont<strong>en</strong>t, pH,<br />

Titratable acidity, L-Malic<br />

acid, Sulphur dioxide (free<br />

and total), Colour, Total<br />

ph<strong>en</strong>ols and Iron.<br />

S<strong>en</strong>sory Analysis<br />

S<strong>en</strong>sory and physicochemical<br />

control vs<br />

Specification of final product<br />

Fig. 1. Activity diagram of the wine production process.<br />

221


Manuel Urbano Cuadrado Tesis Doctoral<br />

t:Technician c:Calibrate<br />

s:Sample m:Measurem<strong>en</strong>t<br />

222<br />

prepare the sample for measurem<strong>en</strong>t<br />

check calibration<br />

make calibration<br />

correct values<br />

make analytical measurem<strong>en</strong>t of sample<br />

analyse results<br />

take decisions<br />

store analytical result<br />

Technician may be replaced by<br />

the autoanalyser in the initial<br />

stages<br />

relationship sample<br />

calibration<br />

Results (measurem<strong>en</strong>ts) are stored<br />

in the database<br />

measurem<strong>en</strong>t<br />

(result)<br />

Tasks can be repeated as a<br />

function of decisions<br />

Fig. 2. Stages involved in the developm<strong>en</strong>t of analytical measurem<strong>en</strong>ts.<br />

2. To have access to additional<br />

information about analysers, analytical<br />

parameters, etc. This aspect<br />

<strong>en</strong>dows the system with the<br />

traceability capacity, which allows,<br />

for example, correlating the<br />

decision about selling a giv<strong>en</strong><br />

wine batch with the evolution of a<br />

giv<strong>en</strong> parameter (e.g. volatile<br />

acidity, ethanol, etc.).<br />

3. To assess the quality, accuracy<br />

and reliability of the information,<br />

which require analytical instrum<strong>en</strong>ts<br />

and software compon<strong>en</strong>ts<br />

for their controls, thus<br />

providing the users with the<br />

results in the appropriate format.<br />

The work pres<strong>en</strong>ted here


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 6<br />

focuses on managem<strong>en</strong>t of the<br />

information. It constitutes a first step<br />

to automation of the analytical<br />

methods in wineries (Válcarcel and<br />

Luque de Castro, 1987, Urbano et al,<br />

2003). Thus, a Decision Support<br />

System (DSS), JWisWine, has be<strong>en</strong><br />

built using Java and Oracle 9i as tools,<br />

while the design of the system was<br />

carried out by both object-ori<strong>en</strong>ted<br />

and evolutionary increm<strong>en</strong>tal paradigms.<br />

2. Materials and methods<br />

For the construction of JWisWine<br />

both the object-ori<strong>en</strong>ted and the<br />

evolutionary increm<strong>en</strong>tal software<br />

<strong>en</strong>gineering paradigms have be<strong>en</strong><br />

used.<br />

2.1 Modelling of the System Domain<br />

In order to model the domain under<br />

study the following classes and<br />

subclasses have be<strong>en</strong> established:<br />

class Parameter, for the parameters to<br />

be determined in wine; subclass<br />

DatumParameter, which includes the<br />

parameters to be determined directly<br />

in the sample (e.g. pH measurem<strong>en</strong>t);<br />

CalculatedParameter, which compri-<br />

ses the parameters which are<br />

determined in an indirect manner<br />

through a giv<strong>en</strong> algorithm for the<br />

establishm<strong>en</strong>t of a relationship betwe<strong>en</strong><br />

the DatumParameter and a<br />

mathematical equation (e.g. dissolved<br />

solids in wine), as shown in the class<br />

diagram (Rumbaugh et al., 1999) in<br />

Figure 3.<br />

Class Unit repres<strong>en</strong>ts the scale<br />

in which a parameter is measured (e.g.<br />

ethanol conc<strong>en</strong>tration expressed in<br />

perc<strong>en</strong>tage, mg mL -1 , etc.), together<br />

with the class Parameter, —which<br />

repres<strong>en</strong>ts the property which<br />

characterises the material under study<br />

(e.g. ethanol)— yield the new class<br />

Magnitude, which repres<strong>en</strong>ts a<br />

parameter measured in a giv<strong>en</strong> unit<br />

(e.g. volatile acidity measured in<br />

absorbance unit).<br />

The advantages of using the<br />

object-ori<strong>en</strong>ted paradigm (Booch,<br />

1994) for modelling the problem are<br />

summarized in App<strong>en</strong>dix 1, where<br />

part of the Java code (Eckel, 2002,<br />

Anderson and Stone, 1999) corresponding<br />

to the definition of the<br />

previously m<strong>en</strong>tioned classes is<br />

pres<strong>en</strong>ted. For instance:<br />

223


Manuel Urbano Cuadrado Tesis Doctoral<br />

App<strong>en</strong>dix 1<br />

/* Definition of the class Parameter * /<br />

public abstract class Parameter<br />

ext<strong>en</strong>ds java.lang.Object<br />

implem<strong>en</strong>ts Persist<strong>en</strong>tSQL<br />

/* It implem<strong>en</strong>ts the interface Persist<strong>en</strong>tSQL with the<br />

methods to access to the database */<br />

/ * Definition of some of the attributes of the class * /<br />

protected java.lang.String alias<br />

/* It contains the alias of the parameter, used in the<br />

formulas */<br />

protected Magnitude default<br />

/* It contains a refer<strong>en</strong>ce to the default magnitude */<br />

protected java.util.Vector magnitudes<br />

/* It contains all the magnitudes in those a value of<br />

this parameter can be expressed */<br />

protected java.lang.String id_parameter<br />

/* It contains the name of the parameter */<br />

/* Other class attributes */<br />

cache, connection, debugParameter, stateSQL,<br />

deletedMagnitudes, ninstances, changedname, objcache,<br />

idChanged<br />

/* The constructors definition */<br />

Parameter()<br />

/* Constructor without argum<strong>en</strong>ts */<br />

Parameter(java.lang.String n, java.lang.String alias,<br />

Unit u)<br />

/* It creates a parameter of name 'n', alias' alias'<br />

and the unit 'u' as their default unit */<br />

/* Definition of some of the class methods */<br />

Magnitude addMagnitude(Unit u)<br />

/* It allows that the parameter is expressed in the unit<br />

'u', creating a new magnitude associated to the parameter<br />

*/.<br />

Magnitude[] getMagnitudes()<br />

/* This method returns an array with all the magnitudes<br />

defined in the system for this parameter */<br />

Magnitude getDefaultMagnitude()<br />

/* It locates and returns the default magnitude associated<br />

to this parameter */<br />

void setNormalInterval(Unit u, double min, double max)<br />

/* This method fixes the maximum and minimum values for<br />

measurem<strong>en</strong>ts expressed in the magnitude that associates the<br />

unit 'u' and the parameter */<br />

void setNormalInterval(Magnitude m, double min, double<br />

max)<br />

224


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 6<br />

/* This method overloads the previous ones and fixes the<br />

normal interval for the magnitude indicated in 'm' */<br />

void loadSample(Sample s)<br />

/* This method relates the parameter with the sample 's' */<br />

abstract Measurem<strong>en</strong>t createMeasurem<strong>en</strong>t()<br />

/* It creates and returns a new measurem<strong>en</strong>t */<br />

boolean isMeasurem<strong>en</strong>tNormal(Measurem<strong>en</strong>t m)<br />

/* This method checks if the indicated value in the<br />

measurem<strong>en</strong>t is betwe<strong>en</strong> the maximum and minimum values of<br />

the parameter */<br />

/* Other class methods */<br />

addToCache, storeParameter, addMagnitude,<br />

deleteParameter, disablePersist<strong>en</strong>tCache,<br />

deleteMagnitude, <strong>en</strong>ablePersist<strong>en</strong>tCache,<br />

equalsParameter, finalizeParameter, getAlias,<br />

getStoreException, getConnection, getSQLDeleted,<br />

getSQLState, getFromCache, getMagnitudes,<br />

getIdParameter, getNewSQL, getParameter,<br />

getParameters, getSQL, hashCode, isAliasDefined,<br />

isIdDefined, isMagnitudeDefined,<br />

isPersist<strong>en</strong>tCacheEnabled, rebuild, retrieve,<br />

removeFromCache, setAlias, setConnection, setSQLState,<br />

setDefaulfMagnitude, setIdParameter, toString,<br />

unloadSample, isSampleValidable, isMeasurem<strong>en</strong>tNormal<br />

/* Definition of the class DatumParameter * /<br />

public class DatumParameter<br />

ext<strong>en</strong>ds Parameter<br />

/* It inherits the attributes and methods from the class<br />

Parameter */<br />

/* Definition of some of the class methods */<br />

Measurem<strong>en</strong>t createMeasurem<strong>en</strong>t()<br />

/* This method provides an implem<strong>en</strong>tation to the superclass<br />

method */<br />

/* Definition of the class CalculatedParameter * /<br />

public class CalculatedParameter<br />

ext<strong>en</strong>ds Parameter<br />

/* It inherits the attributes and methods from the class<br />

Parameter */<br />

/* Definition of the class attributes */<br />

protected CalculusFormulae calculusFormulae<br />

/* It stores a refer<strong>en</strong>ce to the calculation formulae that<br />

evaluates this parameter in their default units */<br />

/* Definition of some of the class methods */<br />

void loadSample(Sample s)<br />

/* This method overloads the superclass method */<br />

Measurem<strong>en</strong>t createMeasurem<strong>en</strong>t()<br />

/* This method provides an implem<strong>en</strong>tation to the superclass<br />

method */<br />

225


Manuel Urbano Cuadrado Tesis Doctoral<br />

CalculusFormulae getCalculusFormulae()<br />

/* This method returns the calculation formulae that allows<br />

to evaluate the CalculatedParameter */<br />

DatumParameter[]getDatumParameter()<br />

/* This method consults the calculation formulae of the<br />

CalculatedParameter and returns all the parameters involved<br />

in the formulae */<br />

/* Definition of the class Magnitude * /<br />

public abstract class Magnitude<br />

ext<strong>en</strong>ds java.lang.Object<br />

implem<strong>en</strong>ts Persist<strong>en</strong>tSQL<br />

/* It implem<strong>en</strong>ts the interface Persist<strong>en</strong>tSQL with the<br />

methods to access to the database */<br />

/* Definition of some of the class attributes */<br />

protected TranslationFormulae translationformulae<br />

/* It contains a refer<strong>en</strong>ce to the conversion formulae that<br />

calculates this magnitude */<br />

protected java.lang.String name<br />

/* It contains the name of the magnitude */<br />

protected Parameter parameter<br />

/* It contains the parameter associated to the magnitude */<br />

protected Unit unit<br />

/* It contains the unit in which the parameter can be<br />

expressed */<br />

protected double maximumValue<br />

/* It contains the maximum value for evaluation of the<br />

associate parameter in the associate units */<br />

protected double minimumValue<br />

/* It contains the minimum value for evaluation of the<br />

associate parameter in the associate units */<br />

• The attribute magnitudes can only<br />

be accessed from the class<br />

Parameter, because only the<br />

instances (objects) of this class<br />

have permission to manage that<br />

property.<br />

• The inheritance property allows<br />

that both the DatumParameter<br />

and CalculatedParameter classes<br />

226<br />

inherit the Parameter class<br />

structure. Also, these classes<br />

include their characteristic<br />

attributes and methods; thus<br />

<strong>en</strong>capsulating their definition.<br />

• Differ<strong>en</strong>t constructor methods can<br />

be defined in order to facilitate the<br />

system developm<strong>en</strong>t (see the<br />

constructor methods for the


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 6<br />

0..*<br />

0..1<br />

SAMPLE<br />

1..1<br />

1..*<br />

id_sample<br />

SELECTED<br />

PARAMETER<br />

USER<br />

0..*<br />

1..1<br />

MAGNITUDE<br />

id_parameter<br />

1..*<br />

id_parameter<br />

1..1<br />

inputs validates<br />

1..*<br />

id_unit<br />

1..1<br />

1..* 1..1<br />

Differ<strong>en</strong>t unities in which<br />

each parameter may be<br />

measured<br />

0..*<br />

MEASUREMENT<br />

1..1<br />

PARAMETER<br />

Class detailed in Figure 4<br />

TECHNICIAN MANAGER ADMINISTRATION<br />

Parameter class).<br />

Fig. 3. Class diagram for parameters and samples.<br />

• The functionality of overload's<br />

mechanism is illustrated in the<br />

method createMeasurem<strong>en</strong>t of the<br />

Parameter class, which is<br />

redefined in the Calculated<br />

Parameter and DatumParameter<br />

UNIT<br />

DATUM<br />

PARAMETER<br />

CALCULATED<br />

PARAMETER<br />

1..1<br />

1..1<br />

CALCULUS<br />

FORMULAE<br />

classes to adapt it to their<br />

particular behaviour.<br />

2.1.1 Information domain in winery<br />

laboratories<br />

The information domain can be<br />

repres<strong>en</strong>ted by three main blocks,<br />

namely:<br />

227


Manuel Urbano Cuadrado Tesis Doctoral<br />

1. The samples and the analytical<br />

parameters to be monitored.<br />

2. The analytical measurem<strong>en</strong>ts performed<br />

along the wine production<br />

process.<br />

3. The quality assessm<strong>en</strong>t and the<br />

control of the integrity and<br />

accuracy of information.<br />

Figure 3 shows, through a<br />

class diagram (Rumbaugh et al.,<br />

1999), the modelling for repres<strong>en</strong>ttation<br />

of the samples and analytical<br />

parameters to be monitored. In this<br />

diagram, SelectedParameter —an<br />

association betwe<strong>en</strong> the classes<br />

Sample and Parameter— repres<strong>en</strong>ts<br />

the whole of analytical parameters to<br />

be monitored in a giv<strong>en</strong> sample at a<br />

giv<strong>en</strong> time.<br />

The association betwe<strong>en</strong><br />

Parameter and Unit classes (see<br />

Figure 3) makes it possible to express<br />

a giv<strong>en</strong> analytical parameter in<br />

differ<strong>en</strong>t units through the Magnitude<br />

class, as required. In this way, the<br />

range of normal values of the<br />

parameter can be expressed in a<br />

differ<strong>en</strong>t manner.<br />

Figure 4 shows some of the<br />

228<br />

classes that repres<strong>en</strong>t the information<br />

concerning the analytical measurem<strong>en</strong>ts<br />

during wine production. The<br />

class Measurem<strong>en</strong>t repres<strong>en</strong>ts the<br />

measurem<strong>en</strong>ts with time, which<br />

becomes specific for a giv<strong>en</strong><br />

parameter through DatumMeasurem<strong>en</strong>t<br />

and CalculatedMeasurem<strong>en</strong>t.<br />

The model also <strong>en</strong>ables<br />

plotting the calibration curves with<br />

the data of instrum<strong>en</strong>t checking by<br />

association betwe<strong>en</strong> classes CalibrationCurve<br />

and Analyser. In<br />

addition, the data obtained in the<br />

analytical measurem<strong>en</strong>ts can be<br />

transformed into chemical values or<br />

magnitudes defined for the selected<br />

parameter by association betwe<strong>en</strong> the<br />

CalibrationCurve and Calculated-<br />

Measurem<strong>en</strong>t classes.<br />

Finally, Figure 3 shows the<br />

most important classes and associations<br />

that constitute the third block<br />

focused on the control of security,<br />

integrity and quality of the<br />

information. As can be se<strong>en</strong> in the<br />

figure, the system takes into account<br />

the importance of the users in the<br />

security and quality of the production<br />

process. Class User repres<strong>en</strong>ts dif-


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 6<br />

CALCULATED<br />

MEASUREMENT<br />

< Uses ><br />

1..1<br />

CALCULUS<br />

FORMULAE<br />

MEASUREMENT<br />

1..1<br />

DATUM<br />

MEASUREMENT<br />

1..*<br />

0..1<br />

1..*<br />

CALIBRATION<br />

CURVE<br />

fer<strong>en</strong>t users involved in the information<br />

system through Technician,<br />

Administration and Manager subclasses.<br />

2.2. Modelling of the function domain<br />

Three types of users are recognised by<br />

the system: Technicians, Managers<br />

and Administration. Technician users<br />

are responsible for the daily analyses<br />

in the winery laboratory, namely:<br />

g<strong>en</strong>eral information managem<strong>en</strong>t<br />

(parameters, units, magnitudes and so<br />

SELECTED<br />

PARAMETER<br />

0..*<br />

Some measurem<strong>en</strong>ts may<br />

not be associated to a<br />

calibration curve<br />

id_parameter<br />

1..*<br />

0..1<br />

0..*<br />

1..1<br />

Classes previously defined<br />

(Figure 3)<br />

USER<br />

Fig. 4. Class diagram for measurem<strong>en</strong>ts.<br />

DATUM<br />

PARAMETER<br />

1..1<br />

Calibration curves for<br />

each parameter<br />

measured with the<br />

analyser<br />

ANALYSER<br />

on); inclusion of new samples and<br />

parameters to be monitored in these<br />

samples; validation of results,<br />

g<strong>en</strong>eration of reports, and the basic<br />

functions related with the managem<strong>en</strong>t<br />

of information g<strong>en</strong>erated in<br />

the wine analysis processes.<br />

In addition to all the<br />

privileges that correspond to Technician,<br />

Manager users are responsible<br />

for managem<strong>en</strong>t of the daily activities<br />

in the laboratory, the evaluation of the<br />

workload, the testing of both the<br />

229


Manuel Urbano Cuadrado Tesis Doctoral<br />

results and the analytical equipm<strong>en</strong>t,<br />

and the analysis of the results as a<br />

function of both origin and time. In<br />

this way, the Manager can develop<br />

the reports that support the decisions<br />

to be made in the winery. This type of<br />

user can ask for information on the<br />

system using non pre-established<br />

criteria for searching and the system<br />

will provide managers with real time<br />

responses in the appropriate format<br />

(either tabular or graphical). For<br />

example, the evolution with time of<br />

the measurem<strong>en</strong>ts of the analytical<br />

parameters in a sample, comparison of<br />

these results betwe<strong>en</strong> samples of the<br />

same or differ<strong>en</strong>t origin and year, etc.,<br />

can be requested.<br />

Finally, the functionality<br />

assigned to Administration users is<br />

similar to that these users have in<br />

conv<strong>en</strong>tional information systems.<br />

They are responsible for the<br />

managem<strong>en</strong>t of users of the system<br />

and the privileges they have. Also,<br />

they must maintain the security,<br />

integrity and privacy of the information<br />

involved in the system.<br />

2.3. Technology used in the developm<strong>en</strong>t<br />

of the system<br />

230<br />

JWisWine is a system developed in<br />

Java (Campione, 2002, Anderson and<br />

Stone, 1999) under a three-layer<br />

structure, as shown in the deploym<strong>en</strong>t<br />

diagram (Rumbaugh et al., 1999) of<br />

Figure 5. The information is updated<br />

using the DBMS Oracle 9i (Dorsey<br />

and Hudicka, 1999, Loney and Koch,<br />

2002) under an object-relational<br />

model which implem<strong>en</strong>ts properly the<br />

classes model in the data base server<br />

in charge of giving the data service to<br />

the users. From their terminal, that<br />

provides the calculation service, the<br />

users access to the information<br />

through the Web server —using<br />

Apache (Wainwright et al., 2001) for<br />

this service— and by both JDBC and<br />

SQLJ procedures (Morisseau-Leroy et<br />

al., 2001). The Web server communicates<br />

with the database server,<br />

transmits the user requirem<strong>en</strong>t and<br />

backed to him/her the result,<br />

pres<strong>en</strong>ted through a Java interface.<br />

3. Results and discussion<br />

3.1. Software developed<br />

JWisWine is an DSS (Decision<br />

Support System) composed by two


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 6<br />

Database Server<br />

TCP/IP<br />

Web Server<br />

:Database objects<br />

:JSP pages<br />

:Java Package<br />

:JwisWine<br />

User Terminal<br />

TCP/IP<br />

:IU JwisWine<br />

TCP/IP<br />

Control Server<br />

: Analysers<br />

Domain<br />

:Browser<br />

Any Protocol<br />

Analytical Equipm<strong>en</strong>t<br />

:Control application<br />

Fig. 5. Deploym<strong>en</strong>t diagram of the system architecture.<br />

tools: the first is a cli<strong>en</strong>t application<br />

through which users load samples,<br />

introduce chemical data, g<strong>en</strong>erate<br />

daily reports, etc. Thus, this tool is in<br />

charge of managing the daily<br />

g<strong>en</strong>erated data in the winery. The<br />

other is a web application through<br />

which managers use information<br />

extracted from historical data for<br />

making decisions.<br />

3.2. Users participation<br />

3.2.1.- Users in the developm<strong>en</strong>t of<br />

JWisWine<br />

The participation of differ<strong>en</strong>t users —<br />

managers and technicians— in the<br />

developm<strong>en</strong>t of the system has be<strong>en</strong><br />

implem<strong>en</strong>ted by the evolutionary<br />

increm<strong>en</strong>tal paradigm. This allowed<br />

the dynamic specification of the<br />

system requisites in order to take into<br />

account the objectives pursued by<br />

companies.<br />

231


Manuel Urbano Cuadrado Tesis Doctoral<br />

3.2.2.- Users in the functionality of<br />

JWisWine<br />

The system users have overall control<br />

and monitoring of the data whether<br />

the data are acquired automatically or<br />

<strong>en</strong>tered manually (e.g. if the data from<br />

the analyser are collected by the<br />

computer through a digital interface<br />

or the data are manually introduced by<br />

the user, respectively). In addition,<br />

each type of user has a differ<strong>en</strong>t<br />

access to the system as a function of<br />

the assigned privileges and all<br />

activities in the system are monitored.<br />

3.2. Evolution of JWisWine functionality<br />

3.3.1.- Operational sub-system<br />

The aim of this sub-system was to<br />

<strong>en</strong>dow wineries with a tool able to<br />

assist the managem<strong>en</strong>t of the analytical<br />

monitoring in the following<br />

aspects:<br />

• To establish the appropriate<br />

information flow in the overall<br />

system in order to unify and<br />

classify the working procedures.<br />

• To know in real time the working<br />

232<br />

load of the winery as the system<br />

has previously stored the types of<br />

samples and the parameters to be<br />

analysed in each sample.<br />

• To visualize, modify, verify and<br />

validate the daily results from any<br />

workstation in the Local Area<br />

Network.<br />

• To move —after validation— the<br />

results and all data of interest<br />

from a giv<strong>en</strong> sample to the<br />

historical repository. Warning<br />

messages advise users about the<br />

exist<strong>en</strong>ce of outliers.<br />

• To store all data related to both<br />

instrum<strong>en</strong>ts use and technicians<br />

activity.<br />

3.3.2.- Information<br />

system<br />

analysis sub-<br />

The aim of this sub-system is to<br />

extract information from the data<br />

stored in the historical repository. The<br />

most remarkable tasks of this subsystem<br />

are as follows:<br />

• To know the evolution of a giv<strong>en</strong><br />

parameter att<strong>en</strong>ding to preset<br />

searching criteria. The information<br />

can be obtained through a


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 6<br />

standard browser and pres<strong>en</strong>ted in<br />

graphs or tables.<br />

• To obtain series of statistical data<br />

as either the change or standard<br />

deviation of any parameter as a<br />

function of time.<br />

• To group samples att<strong>en</strong>ding to the<br />

values of one or more parameters,<br />

including the possibility of<br />

applying PCA (principal compon<strong>en</strong>ts<br />

analysis).<br />

• To introduce control samplers in<br />

order to extract information of the<br />

functioning of the analytical<br />

equipm<strong>en</strong>t —namely, Sewart<br />

graphics—. Traceability of historical<br />

data with both the<br />

equipm<strong>en</strong>t and regression data<br />

used is also available.<br />

4. Conclusions<br />

Firstly, JWisWine is a valuable tool to<br />

manage historical data. Thus, users<br />

are able to extract information<br />

structured in differ<strong>en</strong>t manners de<br />

p<strong>en</strong>ding on requirem<strong>en</strong>ts. The access<br />

to data of interest is achieved in real<br />

time, overcoming limitations related<br />

to manual searches. Wine quality is<br />

improved because of the major<br />

knowledge of the wine making.<br />

On the other hand, daily<br />

handling of data is also improved by<br />

easy handling of the interactive<br />

interfaces. The introduction and validation<br />

of data, g<strong>en</strong>eration of reports<br />

and other operational tasks are carried<br />

out by simple procedures and<br />

protocols that are close to users, who<br />

only require a short learning period.<br />

JWisWine can be modified<br />

functionally with few changes in the<br />

architecture and compon<strong>en</strong>ts of the<br />

system due to the op<strong>en</strong>, scalable and<br />

indep<strong>en</strong>d<strong>en</strong>t characteristics of both the<br />

supporting model and the technology<br />

used.<br />

Acknowledgem<strong>en</strong>ts<br />

The Spanish Comisión Interministerial<br />

de Ci<strong>en</strong>cia y Tecnología<br />

(CICyT) is thanked for financial<br />

support (Project AGL2000-0321-P4-<br />

03).<br />

Refer<strong>en</strong>ces<br />

Anderson, J.C. Stone, B.L., 1999.<br />

Manual de Oracle Jdeveloper<br />

(Oracle Jdeveloper Manual).<br />

233


Manuel Urbano Cuadrado Tesis Doctoral<br />

234<br />

McGraw-Hill/Oracle Press, Madrid.<br />

Booch, G., Rumbaugh, J., Jacobson,<br />

I., 1999. The Unified Modeling<br />

Language. User Manual. Addison-Wesley<br />

Longman Inc.<br />

Booch, G., 1994. The Object-Ori<strong>en</strong>ted<br />

Analysis and Design with<br />

Applications. Addison-Wesley.<br />

Campione, M., 2002. The Java<br />

Tutorial Third Edition. McGraw-<br />

Hill, (http://java.sun.com).<br />

Dorsey, P., Hudicka, J.R., 1999.<br />

Oracle8 Database Design Using<br />

UML Object Modelling. Mc-<br />

Graw-Hill Osborne Media.<br />

Eckel, B., 2003. Thinking in Java<br />

(Third Edition). Pr<strong>en</strong>tice Hall.<br />

Flanzy, C., 2000. Enología: Fundam<strong>en</strong>tos<br />

Ci<strong>en</strong>tíficos y Tecnológicos<br />

(Enology: Sci<strong>en</strong>tific<br />

and Technological Fundam<strong>en</strong>tals).<br />

AMV-Mundi Pr<strong>en</strong>sa,<br />

Madrid.<br />

Ilyukhin, S.V., Haley, T.A., Singh,<br />

R.K., 2001. A survey of automation<br />

practices in the food<br />

industry. Food Control, 12 (5),<br />

285-296.<br />

Jacobson, I., Booch, G., Rumbaugh,<br />

J., 1999. The Unified Software<br />

Developm<strong>en</strong>t Process. Addison-<br />

Wesley Longman Inc.<br />

Loney, K., Koch, G., 2002. Oracle 9i<br />

The Complete Refer<strong>en</strong>ce. Oracle<br />

Press.<br />

McGrath, M.J., O'Connor, J.F.<br />

Cummins, S., 1998. Implem<strong>en</strong>ting<br />

a process control strategy for the<br />

food processing industry. J. Food<br />

Engineer., 35 (3), 313-321.<br />

Morisseau-Leroy, J. N., Solomon, M.,<br />

Momplaisir, G., 2001. Oracle9i<br />

SQLJ Programming. Osborne-<br />

Oracle Press.<br />

Muller, E. Bassin, M. Troyon, JP.<br />

Nowak, P., 1999. Implem<strong>en</strong>tation<br />

of rapid result managem<strong>en</strong>t<br />

systems in the metals industry.<br />

Lab. Autom. Inform. Manag.,<br />

34(1), 31-40.<br />

Murali, N.S., Secher Bo, J.M.,<br />

Rydahl, P., Andreas<strong>en</strong> Finn, M.,<br />

1999. Application of information<br />

technology in plant protection in


Comput. Electron. Agric., <strong>en</strong>viado para su publicación Parte I, cap. 6<br />

D<strong>en</strong>mark: from vision to reality.<br />

Comput. Electron. Agric., 22,<br />

109-115.<br />

Ribereau-Gayon, P., Glories, Y.,<br />

Maujean, A., Dubourdieu, D.,<br />

2000. Handbook of Enology. Vol.<br />

2: The Chemistry of wine.<br />

Stabilization and Treatm<strong>en</strong>ts.<br />

John Wiley & Sons, Ltd.<br />

Urbano, M., Luque de Castro, M.D.,<br />

Gómez-Nieto, M.A., 2003.<br />

Automation of flow injection<br />

methods in the winery industry<br />

through a computer program<br />

based on a multilayer model.<br />

Proceedings of 9th IEEE International<br />

Confer<strong>en</strong>ce on Emerging<br />

Technologies and Factory Automation,<br />

530-536, Lisbon.<br />

Rumbaugh, J., Jacobson, I., Booch,<br />

G., 1999. The Unified Modeling<br />

Language. Refer<strong>en</strong>ce Manual.<br />

Addison-Wesley Longman Inc.<br />

Valcárcel, M., Luque de Castro, M.D.,<br />

1987. Flow Injection Analysis:<br />

Principles and Applications. Ellis<br />

Horwood, Chichester.<br />

Van Asseldonk, M.A.P.M., Huirne,<br />

R.B.M., Dijkhuiz<strong>en</strong>, A.A., Beul<strong>en</strong>s,<br />

A.J.M., Udink t<strong>en</strong> Cate, A.J.,<br />

1999. Information needs and<br />

information technology on dairy<br />

farms. Comput. Electron. Agric.,<br />

22, 97-107.<br />

Wainwright, P., Ahmad, A., Link, M.,<br />

Sarang, P., 2001. Professional<br />

Apache 2.0. Wrox,<br />

(http://www.apache.org).<br />

Warner, S.A., Sywilok, J.W., 1995.<br />

Implem<strong>en</strong>ting information technology.<br />

Anal. Chem., 67(5), 173-<br />

179.<br />

235


Parte II: Desarrollo de métodos<br />

quimiométricos y algoritmos<br />

para el desarrollo de modelos<br />

cualitativos y cuantitativos <strong>en</strong><br />

química analítica


Capítulo 7<br />

ULTRAVIOLET-VISIBLE<br />

SPECTROSCOPY AND PATTERN<br />

RECOGNITION METHODS FOR<br />

DIFFERENTIATION AND<br />

CLASSIFICATION OF WINES<br />

El cont<strong>en</strong>ido de este capítulo ha sido <strong>en</strong>viado a la revista Food Chemistry para su<br />

publicación.


Food Chem., <strong>en</strong>viado para su publicación Parte II, cap. 7<br />

ULTRAVIOLET-VISIBLE SPECTROSCOPY AND PATTERN<br />

RECOGNITION METHODS FOR DIFFERENTIATION AND<br />

CLASSIFICATION OF WINES<br />

Manuel Urbano Cuadrado, María D. Luque de Castro, Pedro M. Pérez Juan, Juan<br />

García Olmo, Miguel A. Gómez-Nieto<br />

Abstract<br />

The feasibility of developing a qualitative model based on cheap and<br />

simple instrum<strong>en</strong>tation to differ<strong>en</strong>tiate and classify wines from the apellation<br />

d’origine “La Mancha” (Spain) has be<strong>en</strong> studied. The criteria for discrimination<br />

were origin, grape variety and ageing process. Ultraviolet Visible Spectroscopy<br />

(UV-Vis) was used for the developm<strong>en</strong>t of a inexp<strong>en</strong>sive and simple scre<strong>en</strong>ing<br />

approach. Once spectra were collected, a data exploratory analysis was carried<br />

out in order to both show tr<strong>en</strong>ds hidd<strong>en</strong> in the data matrix from the sample<br />

spectra and study the characteristics of the models thus developed. Principal<br />

Compon<strong>en</strong>ts Analysis (PCA) and Soft Indep<strong>en</strong>d<strong>en</strong>t Modelling of Class Analogy<br />

(SIMCA) were used for the exploratory analysis and the developm<strong>en</strong>t of<br />

classification models, respectively. The ultraviolet region has for the first time<br />

be<strong>en</strong> used for the discrimination of types of wines. This region is of great<br />

importance for differ<strong>en</strong>tiation of wines according to both origin within a same<br />

apellation d’origine and ageing process. The sum of false positives and false<br />

negatives —the criteria used for evaluating errors— were not higher than 25%,<br />

and the classification of wines according to the origin zone yielded the best<br />

values (10%). Sample preparation was not necessary.<br />

Keywords: Ultraviolet-visible spectroscopy; Wine classification; Pattern<br />

recognition methods.<br />

241


Manuel Urbano Cuadrado Tesis Doctoral<br />

1. Introduction<br />

Quality control of foods is oft<strong>en</strong> based<br />

on modern and sophisticated instrum<strong>en</strong>ts<br />

that involve high costs and<br />

require well-trained analysts (Flurer,<br />

2003; Wang, Geil, Kolling, & Padua,<br />

2003; Encinar, Sliwka-Kaszynska,<br />

Polatajko, Vacchina, & Szpunar,<br />

2003; De Villiers, Alberts, Lyn<strong>en</strong>,<br />

Crouch, & Sandra, 2003). However,<br />

the results from these instrum<strong>en</strong>ts are<br />

oft<strong>en</strong> not obtained in time despite<br />

being supported on modern tech<br />

niques. This is owing to the necessity<br />

of steps, previous to measurem<strong>en</strong>t,<br />

focused on improving the accuracy<br />

and precision of the results.<br />

Quantification of compon<strong>en</strong>ts either<br />

involved in a fraudul<strong>en</strong>t wine<br />

elaboration or those that constitute a<br />

key family in wine from a giv<strong>en</strong><br />

apellation d’origine is, most times, a<br />

long and exp<strong>en</strong>sive step (Legin,<br />

Rudnitskaya, Lvova, Vlasov, Di<br />

Natale, & D'Amico, 2003; Cullere,<br />

Aznar, Cacho, & Ferreira, 2003;<br />

López, Aznar, Cacho, & Ferreira,<br />

2002). A pres<strong>en</strong>t tr<strong>en</strong>d in analytical<br />

chemistry is the developm<strong>en</strong>t of<br />

242<br />

methodologies able to provide “fitness<br />

for purpose” results, which take into<br />

account aspects related with the<br />

importance of time against accuracy<br />

achieved. These aims are oft<strong>en</strong><br />

supported on qualitative aspects in<br />

contrast to quantitative results<br />

(Trullols, Ruisánchez, & Rius, 2004).<br />

Chemometric techniques allow<br />

construction of models to<br />

characterise target samples within<br />

previously defined and validated<br />

groups. Multivariate analysis is a<br />

powerful tool that permits to extract<br />

qualitative and quantitative chemical<br />

information from large data sets.<br />

Thus, qualitative techniques as cluster<br />

analysis (CA), principal compon<strong>en</strong>ts<br />

analysis (PCA), linear discriminant<br />

linear analysis (LDA), soft indep<strong>en</strong>d<strong>en</strong>t<br />

modelling of class analogy<br />

(SIMCA), etc., are aimed at<br />

improving the quality of food<br />

products (Kos, Lohninger, & Krska,<br />

2003; Yu & MacGregor, 2003; Tura,<br />

Pr<strong>en</strong>zler, Bedgood, Antolovich, &<br />

Robards, 2004).<br />

Wine industry has employed<br />

the above comm<strong>en</strong>ted tools with<br />

several objectives; namely: wine


Food Chem., <strong>en</strong>viado para su publicación Parte II, cap. 7<br />

classification based on either grape<br />

variety or climate factors; assessm<strong>en</strong>t<br />

of the auth<strong>en</strong>ticity of wine; study of<br />

differ<strong>en</strong>t brownings; etc. The datasets<br />

used were of differ<strong>en</strong>t nature, namely:<br />

the conc<strong>en</strong>tration of ph<strong>en</strong>olic compounds<br />

(De la Presa & Noble, 1995;<br />

García-Parrilla, González, Heredia, &<br />

Troncoso, 1997), the composition of<br />

volatile compounds (García-Jares,<br />

García-Martín, Marino, & Torrijos,<br />

1995; Guth, 1997), amino acids cont<strong>en</strong>t<br />

(Etiévant, Schlich, &. Bouvier,<br />

1988), conc<strong>en</strong>tration of metal ions<br />

(Baxter, Crews, D<strong>en</strong>nis, Goodall, &<br />

Anderson, 1997), isotopic determination<br />

(Martin, Guillou, & Martin,<br />

1998), etc.<br />

Spectroscopy has be<strong>en</strong> widely<br />

used for the developm<strong>en</strong>t of classification<br />

models. Thus, Near Infrared<br />

Spectroscopy (NIRS), Fourier Transform<br />

Infrared (FT-IR), Mass Spectrometry<br />

(MS), etc., have be<strong>en</strong> used for<br />

the differ<strong>en</strong>tiation and classification<br />

of samples in various areas (Downey,<br />

McIntyre, & Davies, 2002; Reeves &<br />

Zapf, 1998; Pérez-Pavón, Del Nogal-<br />

Sánchez, García-Pinto, Fernández<br />

Laespada, Mor<strong>en</strong>o-Cordero, &<br />

Guerrero-Peña, 2003). Although<br />

quantitative methods based on these<br />

techniques have be<strong>en</strong> developed in the<br />

<strong>en</strong>ological area, there are few<br />

approaches regarding to their qualitative<br />

use. Visible and NIR regions<br />

have be<strong>en</strong> used to discriminate<br />

betwe<strong>en</strong> white wines of two varietal<br />

origins (Cozzolino, Smyth, & Gish<strong>en</strong>,<br />

2003). The visible region has also<br />

be<strong>en</strong> used in an indirect way for<br />

certification of rosé wines from the<br />

apellation d’origine “Rioja” (Spain)<br />

(Meléndez, Sánchez, Íñiguez, Sarabia,<br />

& Ortiz, 2001). The authors employed<br />

six parameters obtained from the<br />

absorption spectrum in the visible<br />

range for classification. The ultraviolet<br />

zone has not be<strong>en</strong> employed for<br />

differ<strong>en</strong>tiation and classification of<br />

wines.<br />

The aim of this work was to<br />

study the use of both the ultraviolet<br />

and visible zones in order to obtain<br />

spectra for classification of wines<br />

based on criteria more restrictive than<br />

those above comm<strong>en</strong>ted. Criteria as<br />

ageing process and origin within a<br />

apellation d’origin have be<strong>en</strong> studied.<br />

Varietal discrimination has also be<strong>en</strong><br />

243


Manuel Urbano Cuadrado Tesis Doctoral<br />

evaluated. Thus, the approach here<br />

reported is aimed at studying the<br />

feasibility of developing a cheap and<br />

simple model —using only the<br />

ultraviolet and visible zones— for the<br />

differ<strong>en</strong>tiation and classification of<br />

wines without the help of trained<br />

specialists.<br />

2. Materials and methods<br />

2.1 Samples<br />

Differ<strong>en</strong>t samples —red and white<br />

wines; young and aged wines; wines<br />

from differ<strong>en</strong>t zones within the “La<br />

Mancha” apellation d’origine (“Quintanar<br />

de la Ord<strong>en</strong>”, “Fu<strong>en</strong>te de Pedro<br />

Naharro”, “Mota del Cuervo”, “Corral<br />

de Almaguer” and “Villacañas”) and<br />

grape varieties (“C<strong>en</strong>cibel” and<br />

“Cabernet Sauvignon”)— were used<br />

in the study. Thus, the number of<br />

samples employed in the calibration<br />

and validation steps was 120.<br />

2.2 Apparatus and procedure<br />

The instrum<strong>en</strong>t employed for spectra<br />

collection was an Agil<strong>en</strong>t 8453E UVvisible<br />

Spectroscopy System (Agil<strong>en</strong>t<br />

244<br />

Technologies, Waldbronn, Germany).<br />

The spectra were collected using a<br />

UV-VIS Chem Station Rev. A.06.03<br />

(Hewlet-Packard, USA). The absorbance<br />

spectra were recorded in<br />

duplicate. The working range was 300<br />

– 800 nm.<br />

The instrum<strong>en</strong>t was equipped<br />

with a quartz cell with a pathl<strong>en</strong>gth of<br />

0.1 cm. This short pathl<strong>en</strong>gth <strong>en</strong>abled<br />

to obtain absorbance values within the<br />

appropriate range regarding to accuracy<br />

and precision specified by the<br />

spectrophotometer characteristics manual.<br />

2.3 Chemometric software used for<br />

data processing and statistical<br />

techniques employed<br />

Duplicate spectra from two aliquots of<br />

each sample were averaged. The<br />

Unscrambler 7.5 (Camo Process AS,<br />

Oslo, Norway) was used for data<br />

processing. PCA and SIMCA (Vandeginst<strong>en</strong>,<br />

Massart, Buyd<strong>en</strong>s, De<br />

Jong, Lewi, & Smeyers-Verbeke,<br />

1998; Wold, 1976; Esb<strong>en</strong>s<strong>en</strong>, 2002)<br />

were the multivariate pattern<br />

recognition methods.


Food Chem., <strong>en</strong>viado para su publicación Parte II, cap. 7<br />

Principal compon<strong>en</strong>ts analysis (PCA)<br />

Principal compon<strong>en</strong>ts analysis has<br />

be<strong>en</strong> ext<strong>en</strong>sively used for visualisation<br />

of hidd<strong>en</strong> tr<strong>en</strong>ds in a data<br />

matrix M consisting of n objects<br />

defined by m variables. In this work,<br />

the objects were the sample spectra<br />

and the variables were the wavel<strong>en</strong>gths.<br />

This can also be se<strong>en</strong> as an<br />

m-dim<strong>en</strong>sional space, in which each<br />

wavel<strong>en</strong>gth defines one dim<strong>en</strong>-sion.<br />

In order to show tr<strong>en</strong>ds or differ<strong>en</strong>t<br />

data structures hidd<strong>en</strong> in the M<br />

matrix, a new c-dim<strong>en</strong>sional space<br />

can also be built from the original mdim<strong>en</strong>sional.<br />

The new dim<strong>en</strong>sions,<br />

principal compon<strong>en</strong>ts —PCs—, are<br />

built taking into account the maximum<br />

variance of data and the<br />

requirem<strong>en</strong>ts about an orthogonal<br />

space. The number of PCs is much<br />

lower than the number of original<br />

variables, mainly in spectral analysis,<br />

due to the linear combination of the<br />

original variables in order to form the<br />

PCs thus removing co-linearity betwe<strong>en</strong><br />

variables. Objects plotted in the<br />

new space —score plot— oft<strong>en</strong> show<br />

tr<strong>en</strong>ds that, in spite of having to be<br />

interpreted and explained, constitute a<br />

first step in subsequ<strong>en</strong>t modelling for<br />

samples classification.<br />

Soft indep<strong>en</strong>d<strong>en</strong>t modelling of class<br />

analogy (SIMCA)<br />

SIMCA, which is a supervised pattern<br />

recognition technique in contrast to<br />

the not supervised PCA, is considered<br />

a key chemometric approach for<br />

classification. This technique <strong>en</strong>ables<br />

to classify the samples into an already<br />

existing group, assigning new objects<br />

to the class to which they show the<br />

largest similarity. SIMCA is strongly<br />

based on PCA, because each class is<br />

defined by an indep<strong>en</strong>d<strong>en</strong>t PCA,<br />

taking into account the optimal<br />

number of PCs for each class, which<br />

is <strong>en</strong>dowed with a specific data<br />

structure.<br />

The SIMCA classification<br />

process consists of two stages,<br />

namely: the training stage, in which<br />

the individual models of the data<br />

classes are developed, and the<br />

classification stage, in which new<br />

samples are classified within the<br />

established class models.<br />

245


Manuel Urbano Cuadrado Tesis Doctoral<br />

3. Results and discussion<br />

3.1 Exploratory analysis<br />

246<br />

Fig. 1. Variance explained in the PCA for white wines.<br />

Visualising tr<strong>en</strong>ds or groups in white<br />

wines<br />

PCA was applied to the matrix formed<br />

by the UV-Vis spectra corresponding<br />

to samples of white wines. The<br />

maximum number of PCs was set at<br />

10. Firstly, Fig. 1 shows the data<br />

variance explained by the new PC<br />

plot. As can be se<strong>en</strong> in the figure, the<br />

first two PCs explain almost all the<br />

data variance.<br />

The first criterion was to<br />

differ<strong>en</strong>tiate wines from differ<strong>en</strong>t<br />

zones within the same apellation<br />

d’origine, namely: “Quintanar de la<br />

Ord<strong>en</strong>” (id<strong>en</strong>tified by A), “Fu<strong>en</strong>te de<br />

Pedro Naharro” (B), “Mota del<br />

Cuervo” (C) and “Corral de<br />

Almaguer” (D). Fig. 2-A shows the<br />

plot of samples in the bi-dim<strong>en</strong>sional<br />

space formed by the first two PCs. As<br />

can be se<strong>en</strong>, there are four incipi<strong>en</strong>t


Food Chem., <strong>en</strong>viado para su publicación Parte II, cap. 7<br />

A<br />

B<br />

Fig. 2. Plot of white wines samples in the space formed by the first two PCs: (A)<br />

original spectra data. (B) first derivative spectra data.<br />

247


Manuel Urbano Cuadrado Tesis Doctoral<br />

248<br />

Fig. 3. Loadings plot for the two first compon<strong>en</strong>ts in white wines.<br />

groups corresponding to the four<br />

zones. Thus, UV-vis spectra can be<br />

used for the differ<strong>en</strong>tiation of wines as<br />

a function of wine origin within the<br />

same apellation d’ origine.<br />

First derivative is oft<strong>en</strong> used<br />

as a mathematical preprocessing for<br />

UV-Vis spectra in order to <strong>en</strong>large the<br />

differ<strong>en</strong>ces betwe<strong>en</strong> them. This<br />

treatm<strong>en</strong>t was carried out with the aim<br />

of improving the discrimination above<br />

achieved. Fig. 2-B shows the more<br />

significant differ<strong>en</strong>tiation betwe<strong>en</strong><br />

groups. The clusters corresponding to<br />

C and D were very close, but the<br />

differ<strong>en</strong>ce betwe<strong>en</strong> them was clearer<br />

after re-scaling. Discrimination was<br />

possible because of the differ<strong>en</strong>t<br />

conc<strong>en</strong>tration dep<strong>en</strong>ding on zones of<br />

families of compounds that absorb<br />

UV-Vis radiation.<br />

In order to find out these<br />

compounds, loadings for the first two<br />

PCs were plotted as shown in Fig. 3.<br />

Loading vectors can be considered as<br />

the bridge betwe<strong>en</strong> the initial<br />

variables space and the PCs space. As<br />

comm<strong>en</strong>ted before, each PC is a linear


Food Chem., <strong>en</strong>viado para su publicación Parte II, cap. 7<br />

Fig. 4. PCA for red wines according to origin zone.<br />

combination of the <strong>en</strong>tire initial<br />

variables; that is, of all the<br />

wavel<strong>en</strong>gths. The coeffici<strong>en</strong>ts of this<br />

combination are called loadings, and<br />

each wavel<strong>en</strong>gth has a loading. The<br />

higher the loadings, the higher the<br />

influ<strong>en</strong>ce of the corresponding<br />

wavel<strong>en</strong>gths in the explanation of the<br />

data variance. Fig. 3 shows that the<br />

key wavel<strong>en</strong>gths for the discrimination<br />

of groups were in the range<br />

300-400 nm; that is, the ultraviolet<br />

region. Compounds pres<strong>en</strong>t in wine<br />

that absorb in this region are esters<br />

from hydroxicynamic acids (Flanzy,<br />

2000). Thus, two conclusions can be<br />

obtained from this exploratory<br />

analysis. The first is that there are<br />

differ<strong>en</strong>ces betwe<strong>en</strong> the proportion of<br />

these families betwe<strong>en</strong> differ<strong>en</strong>t zones<br />

within an apellation d’ origine. The<br />

second is that this discrimination can<br />

not be visual because the differ<strong>en</strong>ces<br />

lead in the ultraviolet region.<br />

Visualising tr<strong>en</strong>ds or groups in red<br />

wines<br />

The first criterion used for the<br />

249


Manuel Urbano Cuadrado Tesis Doctoral<br />

differ<strong>en</strong>tiation was also origin zone.<br />

Three zones were tak<strong>en</strong> into account,<br />

namely: “Fu<strong>en</strong>te de Pedro Naharro”<br />

(J), “Quintanar de la Ord<strong>en</strong>” (K) and<br />

“Villacañas” (L). Fig. 4 shows the<br />

PCA applied to the data from the first<br />

derivative spectra from red wines. The<br />

major differ<strong>en</strong>ces were found betwe<strong>en</strong><br />

wines from “Quintanar de la Ord<strong>en</strong>”<br />

and those from “Villacañas”. Wines<br />

from “Fu<strong>en</strong>te de Pedro Naharro” were<br />

located betwe<strong>en</strong> the other two zones.<br />

As can be se<strong>en</strong>, the differ<strong>en</strong>tiation<br />

was worse than that achieved for<br />

white wines.<br />

Other criterion used to<br />

differ<strong>en</strong>tiate red wines was the grape<br />

variety used for obtaining the two<br />

groups of wine. The varieties employed<br />

were “Cabernet Sauvignon”<br />

(S) and “C<strong>en</strong>cibel” (T). The score plot<br />

is shown in Fig. 5-A. Two tr<strong>en</strong>ds can<br />

be observed: T samples, which are the<br />

most abundant, provided a swarm of<br />

points that comprises a large zone and<br />

S samples were located in the belowright<br />

part of the plot. Loadings from<br />

the visible region, as can be se<strong>en</strong> in<br />

Fig. 5-B, were higher than those<br />

obtained from white wines. Ob-<br />

250<br />

viously, this is due to the red colour.<br />

The ageing process of wines<br />

was also studied. Aged (Y) and noaged<br />

wines (Z) were considered. The<br />

former gathered in the right side and<br />

the latter in the left side of Fig. 5-C.<br />

A higher dispersion was<br />

observed in the PCAs for red wines as<br />

compared with that obtained for white<br />

wines, which can be due to the higher<br />

complexity of the composition of red<br />

wines.<br />

3.2 Developm<strong>en</strong>t of classification<br />

models<br />

Model for classifying white wines<br />

according to origin of the grape<br />

A model for the classification of three<br />

types of wines according to zone of<br />

the grape was developed. The classes,<br />

following the nom<strong>en</strong>clature employed<br />

in section 3.1.2, were named A<br />

(“Quintanar de la Ord<strong>en</strong>”), B (“Fu<strong>en</strong>te<br />

de Pedro Naharro”) y C (“Mota del<br />

Cuervo”). Indep<strong>en</strong>d<strong>en</strong>t principal compon<strong>en</strong>ts<br />

analyses were carried out for<br />

each class. The first derivative spectra<br />

were employed. The prediction<br />

capacity of the model was studied


Food Chem., <strong>en</strong>viado para su publicación Parte II, cap. 7<br />

A<br />

B<br />

Fig. 5. (A) PCA plot. (B) Loadings plot for the two first compon<strong>en</strong>ts of red wines<br />

according to grape variety<br />

251


Manuel Urbano Cuadrado Tesis Doctoral<br />

C<br />

252<br />

Fig. 5. (cont.) (C) PCA for red wines according to the ageing process.<br />

by external validation using both<br />

samples of these classes that had not<br />

be<strong>en</strong> used in the training stage, and<br />

samples from “Corral de Almaguer”<br />

(D), that has not be<strong>en</strong> modelled<br />

because of the small number of<br />

samples. The significance level was<br />

set at 5%.<br />

Coomans plots (Esb<strong>en</strong>s<strong>en</strong>,<br />

2002) were used for evaluating the<br />

results from the classification. These<br />

plots provide the orthogonal distance<br />

from all new objects to two selected<br />

classes at the same time. The critical<br />

cut-off class membership limits are<br />

also obtained from those plots. If an<br />

object belongs to a model (class) it<br />

should fall within the membership<br />

limit, which is on the left of the<br />

vertical line or below the horizontal<br />

line in Fig. 6-A.<br />

As can be se<strong>en</strong> in Fig. 6-A,<br />

the validation samples corresponding<br />

to origin zones for grape A and B<br />

were all within the limit of each<br />

membership. Nevertheless, B samples<br />

were placed in the class C<br />

membership zone in the Cooman plot


Food Chem., <strong>en</strong>viado para su publicación Parte II, cap. 7<br />

for the classes A and C shown in Fig.<br />

6-B; thus, too many false positives<br />

were obtained in the classification<br />

table (the 50 % of B samples were<br />

also assigned to class C). This is<br />

owing to the proximity of both groups<br />

—B and C— , the major dispersion of<br />

the class B and, mainly, the exist<strong>en</strong>ce<br />

of two C samples within the swarm of<br />

points corresponding to B zone, as<br />

shown in the PCA in Fig. 2-B. Better<br />

results were achieved wh<strong>en</strong> these two<br />

C samples were not used in the<br />

modelling of class C —that is, they<br />

were considered as outliers—. Almost<br />

all the validation samples corres<br />

ponding to zone C were classified<br />

correctly in class C, and all the<br />

validation samples corresponding to<br />

zone D were not classified in any<br />

class, as expected. The sum of perc<strong>en</strong>t<br />

of false positives and false negatives<br />

was 10% and the number of samples<br />

in the validation set was 32.<br />

In order to explain the classification<br />

data, the concept of<br />

Variable Discrimination Power (Esb<strong>en</strong>s<strong>en</strong>,<br />

2002) was used; this gives<br />

information about the power of a<br />

variable to discriminate betwe<strong>en</strong> any<br />

two models. A value close to 1 indicates<br />

no discrimination power at all,<br />

while a high value, e.g. greater than 3,<br />

indicates good discrimination for a<br />

giv<strong>en</strong> variable.<br />

The discrimination power<br />

plots for comparison betwe<strong>en</strong> classes<br />

A-B and comparison betwe<strong>en</strong> classes<br />

C-B are shown in Fig. 6-C and Fig. 6-<br />

D, respectively. In the former, the<br />

discrimination values were much<br />

higher in the ultraviolet than in the<br />

visible region. For this reason, the<br />

classification of wines from<br />

“Quintanar de la Ord<strong>en</strong>” (A) and<br />

wines from “Fu<strong>en</strong>te de Pedro<br />

Naharro” (B) was based on the<br />

differ<strong>en</strong>ces in the conc<strong>en</strong>tration of<br />

esters from hydroxicynamic acids,<br />

which absorb in the ultraviolet region.<br />

Distinction betwe<strong>en</strong> wines<br />

from “Quintanar de la Ord<strong>en</strong>” (A) and<br />

“Mota del Cuervo” (C) was explained<br />

by the same effect.<br />

The discrimination values in<br />

Fig. 6-D were lower than those shown<br />

in Fig. 6-C. This fact explains that<br />

classes B and C were close, as<br />

compared with the distance from A.<br />

The visible zone betwe<strong>en</strong> 620 and 640<br />

253


Manuel Urbano Cuadrado Tesis Doctoral<br />

A<br />

B<br />

Fig. 6. (A) Cooman plot for the classes A and B. (B) Cooman plot for the classes<br />

B and C.<br />

254


Food Chem., <strong>en</strong>viado para su publicación Parte II, cap. 7<br />

C<br />

D<br />

Fig. 6. (C) Discrimation power plot for classes A and B. (D) Discrimation power<br />

plot for classes B and C.<br />

255


Manuel Urbano Cuadrado Tesis Doctoral<br />

nm provided a high discrimination<br />

power for classes B and C. Ph<strong>en</strong>olic<br />

compounds are responsible for the<br />

slightly gre<strong>en</strong> colour pres<strong>en</strong>t in white<br />

wines; thus, the proportion of these<br />

compounds is differ<strong>en</strong>t betwe<strong>en</strong> B and<br />

C wines.<br />

Model for classifying red wines<br />

according to origin of the grape<br />

Classes corresponding to wines from<br />

“Quintanar de la Ord<strong>en</strong>” (K) and<br />

wines from “Villacañas” (L) were<br />

developed using indep<strong>en</strong>d<strong>en</strong>t principal<br />

compon<strong>en</strong>t analysis. External<br />

validation was carried out using<br />

samples that have not be<strong>en</strong> used for<br />

models developm<strong>en</strong>t.<br />

The Distance versus Leverage<br />

plot (Si vs Hi plot) (Esb<strong>en</strong>s<strong>en</strong>, 2002)<br />

was used in the evaluation of the<br />

external validation. It shows the limits<br />

used in the classification, both for the<br />

distance to the model (Si) and of the<br />

leverage (Hi). The objects within<br />

these limits have a high probability to<br />

belong to the class at the chos<strong>en</strong><br />

significance level. They summarise<br />

the information contained in the<br />

model.<br />

256<br />

Fig. 7 shows the Si vs Hi plot<br />

for the validation set of the model<br />

composed by classes K and L at 5%<br />

significance level. For the class K<br />

(Fig. 7-A) almost all the validation<br />

objects were within the leverage limit.<br />

As can be se<strong>en</strong> in the figure, two<br />

samples were false negatives. They<br />

came from two zones placed in the<br />

border of zone K. Fig. 7-B shows the<br />

classification achieved for class L.<br />

Four samples of the K group were<br />

plotted within the class L membership<br />

limit; thus, these samples were false<br />

positives. The classification of L<br />

samples was successful. The sum of<br />

false positives and false negatives was<br />

20% and the number of samples for<br />

the validation set was 30.<br />

On the other hand, the zone<br />

betwe<strong>en</strong> 500 and 560 nm <strong>en</strong>ables the<br />

highest discrimination power for red<br />

wines origin, in contrast to the<br />

discrimination of the ultraviolet<br />

region for white wines. In this region,<br />

the absorb<strong>en</strong>t compounds are<br />

anthocyans.<br />

Model for classifying red wines<br />

according to grape variety


Food Chem., <strong>en</strong>viado para su publicación Parte II, cap. 7<br />

A<br />

B<br />

C<br />

Fig. 7. (A) Si vs Hi plot for the class K. (B) Si vs Hi plot for the class L. (C) Si vs<br />

Hi plot for the class Y.<br />

257


Manuel Urbano Cuadrado Tesis Doctoral<br />

258<br />

D<br />

E<br />

F<br />

Fig. 7. (cont.) (D) Si vs Hi plot for the class Z. (E) Discrimination power plot for<br />

classification according to grape variety. (F) Discrimination power plot<br />

for classification according to the ageing process.


Food Chem., <strong>en</strong>viado para su publicación Parte II, cap. 7<br />

Classes corresponding to red wines<br />

from “Caubernet Sauvignon” grape<br />

(S) and red wine from “C<strong>en</strong>cibel”<br />

grape (T) were modelled. Class models<br />

were th<strong>en</strong> externally validated.<br />

Fig. 7-C and Fig. 7-D show the Si vs<br />

Hi plots of the validation set for the<br />

classes S and T, respectively. The<br />

error —sum of false positives and<br />

false negatives— was 25 %. The<br />

validation set was composed by 30<br />

samples and the significance level<br />

was set at 5%. The larger data<br />

dispersion, as shown in the PCA in<br />

Fig. 5-A under the variety criterion,<br />

meant a higher error.<br />

Model for classifying red wines<br />

according to the ageing process<br />

In this case, the model developed was<br />

aimed at classifying red wines into<br />

aged wines and no-aged wines. Thus,<br />

two groups of wine were tak<strong>en</strong> in<br />

order to model the classes, namely: Y<br />

class, non-aged wines, and Z class,<br />

aged wines. The sum of false<br />

positives and false negatives was<br />

25%. The validation set was<br />

composed by 30 samples and the<br />

significance level was set at 5%.<br />

The discrimination power of<br />

the variables of the last two models<br />

was lower than that of the first model,<br />

as can be se<strong>en</strong> in Fig. 7-E and Fig. 7-<br />

F; this explains the higher number of<br />

false positives and false negatives.<br />

The last one shows the higher<br />

discrimination values in the ultraviolet<br />

region. This fact means that the<br />

quantitative and qualitative evolution<br />

of the ph<strong>en</strong>olic fraction in the ageing<br />

process yields differ<strong>en</strong>ces in ultraviolet<br />

absorb<strong>en</strong>t compounds.<br />

4. Conclusions<br />

Differ<strong>en</strong>tiation and classification of<br />

wine under various criteria have be<strong>en</strong><br />

achieved in the approach pres<strong>en</strong>ted in<br />

this work, using cheap and simple<br />

instrum<strong>en</strong>tation. The error in the<br />

prediction dep<strong>en</strong>ds on the type of<br />

wine to which the method is applied<br />

(namely, white or red wine).<br />

The classification of the wines<br />

from differ<strong>en</strong>t origins within the same<br />

apellation d’origine is around 90%. In<br />

addition, the classification of wines<br />

according to grape variety and ageing<br />

process is better than 75%. The model<br />

thus developed supplies a simple,<br />

259


Manuel Urbano Cuadrado Tesis Doctoral<br />

inexp<strong>en</strong>sive scre<strong>en</strong>ing tool for wines<br />

from the apellation d’origine “La<br />

Mancha” from the data provided by<br />

an array diode UV-VIS spectrophotometer.<br />

Other advantage of the<br />

model is the time required for analysis<br />

—about t<strong>en</strong> minutes were <strong>en</strong>ough for<br />

classification into a giv<strong>en</strong> class—.<br />

The ultraviolet region has<br />

be<strong>en</strong> used for the first time for<br />

differ<strong>en</strong>tiation of wines. This region is<br />

the key for discrimination of wines<br />

according to the zone within the same<br />

apellation d’origine. In addition, the<br />

joint use of the ultraviolet and visible<br />

regions <strong>en</strong>ables a better classification<br />

of wine according to the ageing<br />

process, as compared with the single<br />

use of one of the spectrum zones.<br />

The ph<strong>en</strong>olic compounds<br />

from the secondary metabolism of<br />

vegetables are excell<strong>en</strong>t discriminators<br />

for wines. This characteristic<br />

is due to the variability of those<br />

compounds as a function of soils,<br />

grape variety, production conditions,<br />

etc.<br />

Acknowledgem<strong>en</strong>ts<br />

The Comisión Interministerial de<br />

260<br />

Ci<strong>en</strong>cia y Tecnología (CICyT) is<br />

thanked for financial support (Project<br />

AGL2000-0321-P4-03).<br />

Refer<strong>en</strong>ces<br />

Baxter, J. M., Crews, M. E., D<strong>en</strong>nis,<br />

J., Goodall, I., & Anderson, D.<br />

(1997). The determination of the<br />

auth<strong>en</strong>ticity of wine from its trace<br />

elem<strong>en</strong>ts composition. Food<br />

Chemistry, 60, 443-450.<br />

Cozzolino, D., Smyth, H. E., &<br />

Gish<strong>en</strong>, M. (2003). Feasibility<br />

study on the use of visible and<br />

near-infrared spectroscopy together<br />

with chemometrics to<br />

discriminate betwe<strong>en</strong> commercial<br />

white wines of differ<strong>en</strong>t varietal<br />

origins. Journal of Agriculture<br />

and Food Chemistry, 51, 7703-<br />

7708.<br />

Cullere, L., Aznar, M., Cacho, J., &<br />

Ferreira, V. (2003). Fast fractionation<br />

of complex organic<br />

extracts by normal-phase chromatography<br />

on a solid-phase extraction<br />

polymeric sorb<strong>en</strong>t. Optimization<br />

of a method to<br />

fractionate wine flavor extracts.


Food Chem., <strong>en</strong>viado para su publicación Parte II, cap. 7<br />

Journal of Chromatographia, A,<br />

1017, 17-26.<br />

De la Presa, C., & Noble, A. C.<br />

(1995). Descriptive analysis of<br />

three white wines varieties from<br />

P<strong>en</strong>edes. American Journal of<br />

Enological and Viticulture, 46, 5-<br />

9.<br />

De Villiers, A., Alberts, F., Lyn<strong>en</strong>,<br />

F., Crouch, A., & Sandra, P.<br />

(2003). Evaluation of liquid<br />

chromatography and capillary<br />

electrophoresis for the elucidation<br />

of the artificial colorants brilliant<br />

blue and azorubine in red wines.<br />

Chromatographia, 57, 393-397.<br />

Downey, G., McIntyre, P., & Davies,<br />

A. N. (2002). Detecting and<br />

quantifying sunflower oil adulteration<br />

in extra virgin olive oils<br />

from the Eastern Medite- rranean<br />

by visible and near infrared<br />

spectroscopy. Journal of<br />

Agriculture and Food Chemistry,<br />

50, 5520-5525.<br />

Encinar, J. R., Sliwka-Kaszynska, M.,<br />

Polatajko, A., Vacchina, V., &<br />

Szpunar, J. (2003). Methodo-<br />

logical advances for sel<strong>en</strong>ium<br />

speciation analysis in yeast.<br />

Analytica Chimica Acta, 500,<br />

171-183.<br />

Esb<strong>en</strong>s<strong>en</strong>, K. H. (2002). Multivariate<br />

Data Analysis – in Practice, Oslo:<br />

Camo Process AS.<br />

Etiévant, P., Schlich, P., & Bouvier, J.<br />

C. (1998). Varietal and geographic<br />

classification of Fr<strong>en</strong>ch<br />

red wines in terms of elem<strong>en</strong>ts,<br />

amino acids and aromatic<br />

alcohols. Journal of Sci<strong>en</strong>ce and<br />

Food Agriculture, 48, 25-41.<br />

Flanzy, C. (2000). Enología: Fundam<strong>en</strong>tos<br />

Ci<strong>en</strong>tíficos y Tecnológicos<br />

(Enology: Sci<strong>en</strong>tific and Technological<br />

Fundam<strong>en</strong>tals). Madrid:<br />

AMV-Mundi Pr<strong>en</strong>sa.<br />

Flurer, C. L. (2003). Analysis of<br />

antibiotics by capillary electrophoresis.<br />

Electrophoresis, 24,<br />

4116-4127.<br />

García-Jares, C. M., García-Martín,<br />

M. S., Marino, N., & Torrijos, C.<br />

(1995). GC-MS id<strong>en</strong>tification of<br />

volatile compon<strong>en</strong>ts of Galician<br />

(northwestern Spain) white wines.<br />

261


Manuel Urbano Cuadrado Tesis Doctoral<br />

262<br />

Application to differ<strong>en</strong>tiate Rias<br />

Baixas wines from wines produced<br />

in nearby geographical<br />

regions. Journal of Sci<strong>en</strong>ce and<br />

Food Agriculture, 69, 175-184.<br />

García-Parrilla, M. C., González, G.<br />

A., Heredia, F. J., & Troncoso, A.<br />

M. (1997). Differ<strong>en</strong>tiation of wine<br />

vinegars based on ph<strong>en</strong>olic composition.<br />

Journal of Agriculture<br />

and Food Chemistry, 45, 3487-<br />

3492.<br />

Guth, H. (1997). Quantification and<br />

s<strong>en</strong>sory studies of character<br />

impact odorants of differ<strong>en</strong>t white<br />

wine varieties. Journal of Agriculture<br />

and Food Chemistry, 45,<br />

3027-3032.<br />

Kos, G., Lohninger, H., & Krska, R.<br />

(2003). Developm<strong>en</strong>t of a method<br />

for the determination of fusarium<br />

fungi on corn using mid-infra-red<br />

spectroscopy with att<strong>en</strong>uated total<br />

reflection and chemometrics.<br />

Analytical Chemistry, 75, 1211-<br />

1217.<br />

Legin, A., Rudnitskaya, A., Lvova, L.,<br />

Vlasov, Y., Di Natale, C., &<br />

D'Amico, A. (2003). Evaluation<br />

of Italian wine by an electronic<br />

tongue: recognition, quantitative<br />

analysis and correlation with<br />

human s<strong>en</strong>sory perception.<br />

Analytica Chimica Acta, 484, 33-<br />

44.<br />

Lopez, R., Aznar, M., Cacho, J., &<br />

Ferreira, V. (2002). Determination<br />

of minor and trace volatile<br />

compounds in wine by solidphase<br />

extraction and gas<br />

chromatography with mass<br />

spectrometric detection. Journal<br />

of Chromatographia, A, 966, 167-<br />

177.<br />

Martin, G. J., Guillou, C., & Martin,<br />

M. L. (1998). Natural factors of<br />

isotope fractionation and the<br />

characterization of wines. Journal<br />

of Agriculture and Food Chemistry,<br />

36, 316-322.<br />

Meléndez, M. E., Sánchez, M. S.,<br />

Íñiguez, M., Sarabia, L. A., &<br />

Ortiz, M. C. (2001). Pysichophysical<br />

parameters of colour<br />

and the chemometric characterisation<br />

of wines of certified<br />

d<strong>en</strong>omination of origin ‘Rioja’.


Food Chem., <strong>en</strong>viado para su publicación Parte II, cap. 7<br />

Analytica Chimica Acta, 446,<br />

159-169.<br />

Pérez-Pavón, J. L., Del Nogal-<br />

Sánchez, M., García-Pinto, C.,<br />

Fernández Laespada, M. E.,<br />

Mor<strong>en</strong>o-Cordero, B., & Guerrero-<br />

Peña, A. (2003). A method for the<br />

detection of hydrocarbon pollution<br />

in soils by headspace mass<br />

spectrometry and pattern recognition<br />

techniques. Analytical<br />

Chemistry, 75, 2034-2041.<br />

Reeves, J. B., & Zapf, C. M. (1998).<br />

Mid-infrared diffuse reflectance<br />

spectroscopy for discriminant<br />

analysis of food Ingredi<strong>en</strong>ts.<br />

Journal of Agriculture and Food<br />

Chemistry, 46, 3614-3622.<br />

Trullols, E., Ruisánchez, I., & Rius, F.<br />

X. (2004). Validation of<br />

qualitative analytical methods.<br />

Tr<strong>en</strong>ds in Analytical Chemistry,<br />

23, 137-145.<br />

Tura, D., Pr<strong>en</strong>zler, P. D., Bedgood, D.<br />

R., Antolovich, M., & Robards,<br />

K. (2004). Varietal and processing<br />

effects on the volatile<br />

profile of Australian olive oils.<br />

Food Chemistry, 84, 341-349.<br />

Vandeginst<strong>en</strong>, B. G. M., Massart, D.<br />

L., Buyd<strong>en</strong>s, S., De Jong, S.,<br />

Lewi, P. J., & Smeyers-Verbeke,<br />

J. (1998). Handbook of Chemometrics<br />

and Qualimetrics: Parts A<br />

and B. Amsterdam: Elsevier.<br />

Wang, J. F., Geil, P. H., Kolling, D.<br />

R. J., & Padua, G. W. (2003).<br />

Analysis of zein by matrix-assisted<br />

desorption/ionization mass<br />

spectrometry. Journal of Agri<br />

cultural and Food Chemistry, 51,<br />

5849-5854.<br />

Wold, S. (1976). Pattern Recognition,<br />

8, 127-139.<br />

Yu, H. L., & MacGregor, J. F. (2003).<br />

Multivariate image analysis and<br />

regression for prediction of<br />

coating cont<strong>en</strong>t and distribution in<br />

the production of snack foods.<br />

Chemometrics and Intellig<strong>en</strong>t<br />

Laboratory Systems, 67, 125-144.<br />

263


Capítulo 8<br />

STUDY OF SPECTRAL ANALYTICAL<br />

DATA USING FINGERPRINTS AND<br />

SCALED SIMILARITY<br />

MEASUREMENTS<br />

El cont<strong>en</strong>ido de este capítulo ha sido aceptado para publicación <strong>en</strong> la revista<br />

Analytical and Bioanalytical Chemistry.


Anal. Bioanal. Chem. XX (2005) XX Parte II, cap. 8<br />

STUDY OF SPECTRAL ANALYTICAL DATA USING FINGERPRINTS<br />

Abstract<br />

AND SCALED SIMILARITY MEASUREMENTS<br />

M. Urbano Cuadrado, M. D. Luque de Castro, M. A. Gómez-Nieto<br />

A new chemoinformatic model for <strong>en</strong>larging the differ<strong>en</strong>ces betwe<strong>en</strong><br />

spectra has be<strong>en</strong> developed. Th<strong>en</strong>, it has be<strong>en</strong> applied to the differ<strong>en</strong>tiation of<br />

wines according to various criteria —namely, grape origin and variety, ageing<br />

process—. The model is based on g<strong>en</strong>eration of fingerprints from normalised<br />

spectra, using empirical parameters and a set of 120 samples. After g<strong>en</strong>eration of<br />

the fingerprints, similarity matrixes based on the Tanimoto similarity index<br />

betwe<strong>en</strong> the fingerprints of the samples were built. The calculation of the<br />

Tanimoto index was modified in order to adapt the index to the characteristics of<br />

the analytical measurem<strong>en</strong>ts. Thus, scaling factors taking into account pattern<br />

fingerprint g<strong>en</strong>erated from a group of samples with common characteristics were<br />

used. In addition, a modified expression for calculating the Tanimoto index was<br />

employed. Principal Compon<strong>en</strong>ts Analysis (PCA) and Soft Indep<strong>en</strong>d<strong>en</strong>t<br />

Modelling of Class Analogy (SIMCA) were applied to the similarity matrixes.<br />

The results obtained are discussed as a function of the normalisation method<br />

employed, the empirical factor used in g<strong>en</strong>eration of the fingerprints, selection of<br />

samples for building the pattern fingerprint, etc. Finally, the results for<br />

differ<strong>en</strong>tiating of wines are compared with those obtained by applying PCA to<br />

the unprocessed spectra as stated by the proposed model.<br />

Keywords: Similarity calculation, Fingerprints, Att<strong>en</strong>uated total reflection mid<br />

infrared, Wine differ<strong>en</strong>tiation.<br />

267


Manuel Urbano Cuadrado Tesis Doctoral<br />

Introduction<br />

Spectroscopic techniques have be<strong>en</strong><br />

widely used for the developm<strong>en</strong>t of<br />

analytical methods, so they constitute<br />

one of the macro-areas that support<br />

instrum<strong>en</strong>tal analysis. The differ<strong>en</strong>t<br />

spectroscopic techniques provide<br />

solutions to a wide range of analytical<br />

problems as a function of the type of<br />

information extracted from the<br />

samples. Although Mid Infrared<br />

Spectroscopy (MIRS), Near Infrared<br />

Spectroscopy (NIRS), Nuclear<br />

Magnetic Resonance (NMR) and<br />

Mass Spectrometry (MS) are<br />

techniques traditionally used in<br />

structural determination of organic<br />

compounds [1-3], their use for<br />

quantitative aspects has rec<strong>en</strong>tly<br />

increased significantly [4-6]. In the<br />

last few years, NIRS has become a<br />

key technique for the determination of<br />

compon<strong>en</strong>ts in the agrifood field<br />

[7,8].<br />

Qualitative analysis [9] is a<br />

tr<strong>en</strong>d in Analytical Chemistry aimed<br />

at short<strong>en</strong>ing the time required for a<br />

giv<strong>en</strong> analysis, achieving objectives<br />

close to users and industry requi-<br />

268<br />

rem<strong>en</strong>ts without the use of<br />

sophisticated instrum<strong>en</strong>tation. Thus,<br />

approaches focused on obtaining<br />

information about polluted/non polluted<br />

materials, fraudul<strong>en</strong>t production<br />

processes, clinical yes/no responses,<br />

etc. [10-12] have be<strong>en</strong> developed in<br />

the last years. For this, multivariate<br />

analysis, and, specifically, pattern<br />

recognition techniques, have be<strong>en</strong><br />

employed for sample differ<strong>en</strong>tiation<br />

and classification [13,14].<br />

In order to obtain maximum<br />

information from datasets, it is<br />

mandatory to both characterise the<br />

objects by means of a series of<br />

variables and apply multivariate<br />

analysis. The number of variables for<br />

developing pattern recognition methods<br />

dep<strong>en</strong>ds on the data available<br />

from each sample. In this way, to use<br />

variables difficult to be obtained<br />

owing to measurem<strong>en</strong>t costs, low<br />

sample quantity, long analysis time,<br />

etc. limits the number of variables<br />

[15,16]. On the other hand, a minimum<br />

number of variables is<br />

necessary for supporting the models.<br />

Spectroscopic techniques are useful as<br />

they fulfil the requirem<strong>en</strong>t of ob-


Anal. Bioanal. Chem. XX (2005) XX Parte II, cap. 8<br />

taining large datasets.<br />

A spectrum is a set of data —<br />

namely, absorbances, emission int<strong>en</strong>sities,<br />

relative int<strong>en</strong>sities of<br />

fragm<strong>en</strong>ts in a mass spectrum, etc.—<br />

at giv<strong>en</strong> values of the variables —<br />

wavel<strong>en</strong>gths, mass/charge ratios, distances,<br />

etc.—. The spectrum is usually<br />

collected in a short time, so it is<br />

possible to obtain the values of<br />

hundreds of variables in real time in a<br />

non-destructive fashion (most times)<br />

and, usually, affordable acquisition<br />

and maint<strong>en</strong>ance costs.<br />

Advances in chemometrics<br />

constitute a powerful tool for surpassing<br />

limitations inher<strong>en</strong>t to nonexp<strong>en</strong>sive<br />

instrum<strong>en</strong>ts in order to<br />

obtain maximum information. The<br />

developm<strong>en</strong>t of a new chemoinformatic<br />

method —based on similarity<br />

calculation, used in structural<br />

aspects most times [17,18]— in order<br />

to improve the information provided<br />

by spectroscopic techniques is pres<strong>en</strong>ted<br />

in this paper. The aim of this<br />

method is to obtain qualitative<br />

information —differ<strong>en</strong>tiating samples<br />

of wine according to their zone and<br />

grape origins in a preliminary study—<br />

from very similar MIR spectra. This<br />

similarity is due to the high influ<strong>en</strong>ce<br />

on the spectrum of the common<br />

compon<strong>en</strong>ts of wine, masking the<br />

contribution to the spectrum of the<br />

specific compon<strong>en</strong>ts. The method<br />

<strong>en</strong>ables to <strong>en</strong>large the differ<strong>en</strong>ces<br />

betwe<strong>en</strong> samples by means of the<br />

digitalisation of spectra and the<br />

calculation of similarity matrixes<br />

using fingerprints of samples.<br />

Proposed model<br />

After data preprocessing aimed at<br />

detecting and removing spectral<br />

outliers, a procedure for transformation<br />

of spectral data into binary<br />

fingerprints was carried out. The<br />

fingerprints were th<strong>en</strong> used for<br />

calculating similarity betwe<strong>en</strong> the<br />

analysed samples. This process consists<br />

of the following steps.<br />

Normalisation of the spectral data<br />

The spectrum from a giv<strong>en</strong> sample<br />

can be considered as a variable array e<br />

composed by n elem<strong>en</strong>ts, where e(i)<br />

repres<strong>en</strong>ts the absorbance value at the<br />

wavel<strong>en</strong>gth i. A matrix E with di-<br />

269


Manuel Urbano Cuadrado Tesis Doctoral<br />

m<strong>en</strong>sions n x e is defined for the<br />

sample set, where n is the number of<br />

samples and e is the number of<br />

variables. The elem<strong>en</strong>t E(i,j) repres<strong>en</strong>ts<br />

the absorbance value for the<br />

sample i at the wavel<strong>en</strong>gth j.<br />

270<br />

The matrix E is transformed<br />

into a normalised matrix E . From the<br />

types of normalisation proposed in the<br />

literature [19], three of them are<br />

employed in this work, namely:<br />

Standard:<br />

E(<br />

i,<br />

j)<br />

−min(<br />

E(<br />

n,<br />

j))<br />

∀ n,<br />

E(<br />

i,<br />

j)<br />

=<br />

max( E(<br />

n,<br />

j))<br />

−min(<br />

E(<br />

n,<br />

j))<br />

Logarithmic:<br />

(1)<br />

log( E(<br />

i,<br />

j)<br />

+ 1)<br />

− min(log( E(<br />

n,<br />

j)<br />

+ 1)<br />

∀n<br />

, E(<br />

i,<br />

j)<br />

=<br />

max(log( E(<br />

n,<br />

j)<br />

+ 1)<br />

− min(log( E(<br />

n,<br />

j)<br />

+ 1)<br />

Tang<strong>en</strong>tial:<br />

(2)<br />

∀n , E(<br />

i,<br />

j)<br />

= tanh(log( E(<br />

i,<br />

j)<br />

+ 1))<br />

(3)<br />

The three types normalise the<br />

absorbance values of the matrix E<br />

within the range [0,1], but equation<br />

(3) is indep<strong>en</strong>d<strong>en</strong>t of the distribution<br />

of values in contrast to equations (1)<br />

and (2).<br />

G<strong>en</strong>eration of the fingerprints<br />

After normalising the data, the matrix<br />

E consisting of values within the<br />

range [0,1] is used for building a new<br />

matrix F, the fingerprint matrix, as<br />

follows:<br />

A threshold value U within the<br />

range [0,1] is selected for the<br />

construction of the fingerprint.<br />

An elem<strong>en</strong>t F(i,j) = 1, if and only<br />

if, E( i,<br />

j)<br />

≥ U , and F(i,j) = 0<br />

otherwise.<br />

Thus, the threshold value U<br />

determines the significance of the<br />

spectral value at every wavel<strong>en</strong>gth.


Anal. Bioanal. Chem. XX (2005) XX Parte II, cap. 8<br />

The matrix F is equal to the unity<br />

matrix wh<strong>en</strong> U=0 and, on the other<br />

hand, most elem<strong>en</strong>ts F(i,j) are equal to<br />

zero wh<strong>en</strong> U=1.<br />

G<strong>en</strong>eration of the similarity matrix<br />

Transformation of the spectra into<br />

fingerprints allows to use the<br />

similarity indexes in the literature<br />

[20,21]. In this work, the Tanimoto<br />

index has be<strong>en</strong> used, which is<br />

described as follows:<br />

c<br />

=<br />

a + b − c<br />

TA, B<br />

(4)<br />

where: c repres<strong>en</strong>ts the number of bits<br />

set to 1 common in the fingerprints A<br />

and B; a and b repres<strong>en</strong>t the number<br />

of bits set to 1 in the fingerprints A<br />

and B, respectively.<br />

Calculation of similarity<br />

measurem<strong>en</strong>ts using the Tanimoto<br />

index is applied to the matrix F, thus<br />

building the similarity matrix S. This<br />

matrix is symmetrical and its<br />

dim<strong>en</strong>sion is n x n, where n is the<br />

number of samples (objects). The<br />

elem<strong>en</strong>ts S(i,i) are equal to 1 and each<br />

elem<strong>en</strong>t S(i,j) repres<strong>en</strong>ts the similarity<br />

value betwe<strong>en</strong> sample i and sample j<br />

obtained from the application of<br />

equation (4) to the fingerprint matrix<br />

F.<br />

Scaled similarity matrix<br />

For the calculation of the similarity<br />

measurem<strong>en</strong>ts by equation (2), all the<br />

fingerprint bits have the same<br />

influ<strong>en</strong>ce or loading in the similarity<br />

calculation. This assertion is correct in<br />

applications as structural similarity<br />

calculation [17,18]; nevertheless, it is<br />

incorrect wh<strong>en</strong> the fingerprints are<br />

built from the processing of differ<strong>en</strong>t<br />

analytical measurem<strong>en</strong>ts at differ<strong>en</strong>t<br />

working conditions.<br />

It can be considered that each<br />

sample is defined by the following<br />

equation:<br />

M = a X + a X + L+<br />

a<br />

i<br />

X<br />

1 i 1i<br />

2i<br />

2i<br />

Ni Ni (5)<br />

where: i repres<strong>en</strong>ts the sample i; N is<br />

the number of analytical measurem<strong>en</strong>ts;<br />

Xji is the analytical value<br />

(the absorbance value in this case);<br />

and aji is a coeffici<strong>en</strong>t that takes into<br />

account the influ<strong>en</strong>ce of the analytical<br />

value j on sample i.<br />

271


Manuel Urbano Cuadrado Tesis Doctoral<br />

272<br />

The similarity calculation<br />

must be modified if the coeffici<strong>en</strong>ts aji<br />

show differ<strong>en</strong>t values for differ<strong>en</strong>t<br />

samples or groups of samples. This<br />

modification is carried out through a<br />

scaling process using a pattern<br />

fingerprint P, which has a size equal<br />

to those of the fingerprints that<br />

constitute the matrix F. Bits set to 1<br />

repres<strong>en</strong>t the group of bits more<br />

significant betwe<strong>en</strong> the bits set to 1 in<br />

the matrix F, that is, the analytical<br />

variables that provide more information<br />

from the sample under<br />

study.<br />

Thus, a new calculation of the<br />

similarity matrix is proposed by the<br />

application of a Tanimoto index<br />

scaled as follows:<br />

T<br />

c<br />

s<br />

S = (6)<br />

as<br />

+ bs<br />

− cs<br />

where:<br />

a<br />

b<br />

c<br />

s<br />

s<br />

s<br />

= a<br />

= b<br />

= c<br />

b<br />

c<br />

a<br />

+ a<br />

+ b<br />

+ c<br />

p<br />

p<br />

p<br />

× W<br />

× W<br />

× W<br />

(7)<br />

The aa, bb and cc values repres<strong>en</strong>t<br />

the number of bits set to 1 in the<br />

fingerprints A, B, and common in<br />

A and B, respectively, and not set<br />

to 1 in the pattern fingerprint P.<br />

The ap, bp and cp values repres<strong>en</strong>t<br />

the number of bits set to 1 in the<br />

fingerprints A, B, and common in<br />

A and B, respectively, and set to 1<br />

in the pattern fingerprint P.<br />

W is a scaling factor that permits<br />

to give more weight to those bits<br />

set to 1 in the samples A and B<br />

and also set to 1 in the pattern P<br />

in the similarity calculation.<br />

In this way, equation (7)<br />

permits to weigh up the differ<strong>en</strong>t<br />

fingerprint bits in the similarity<br />

calculation, thus considering differ<strong>en</strong>t<br />

levels of significance of the analytical<br />

variables.<br />

G<strong>en</strong>eration of the pattern fingerprint<br />

The number and position of the bits<br />

set to 1 in the pattern fingerprint are<br />

the key for application of the equation<br />

(7), and they clearly dep<strong>en</strong>ds on the<br />

problem under study. This dep<strong>en</strong>d<strong>en</strong>ce<br />

makes necessary to op<strong>en</strong> the<br />

proposed model to the analytical<br />

technique, number of analytical


Anal. Bioanal. Chem. XX (2005) XX Parte II, cap. 8<br />

variables, characteristics of the<br />

samples, data dispersion, etc.<br />

In this paper, a method based<br />

on frequ<strong>en</strong>cy measurem<strong>en</strong>ts of the<br />

bits of the matrix F has be<strong>en</strong> used.<br />

This method consists of the following<br />

steps:<br />

A group of samples is selected<br />

for building pattern P. The<br />

group of samples determines the<br />

characteristics of the pattern. It<br />

is possible to build several<br />

patterns according to the group<br />

of samples selected.<br />

The matrix F is analysed by<br />

columns and, th<strong>en</strong>, a frequ<strong>en</strong>cy<br />

array is g<strong>en</strong>erated in the<br />

following way:<br />

i n<br />

∑ =<br />

f j =<br />

i=<br />

F i j<br />

n<br />

1<br />

( )<br />

( , )<br />

(8)<br />

where the values i determine the<br />

samples to be considered for<br />

g<strong>en</strong>erating the pattern, and n is<br />

the number of samples.<br />

A pattern fingerprint P is built<br />

from the frequ<strong>en</strong>cy array by the<br />

consideration of a threshold<br />

frequ<strong>en</strong>cy value V. Thus, a<br />

pattern P is g<strong>en</strong>erated with<br />

elem<strong>en</strong>ts P(i)=1 (fingerprint<br />

bits) if the corresponding<br />

elem<strong>en</strong>t of the frequ<strong>en</strong>cy array<br />

f(i) has a value equal to or<br />

higher than the threshold value<br />

V. All the bits of the pattern<br />

fingerprint P are set to 1 wh<strong>en</strong><br />

the threshold value is V=0.<br />

Thus, the higher the values for<br />

V, the lower the number of bits<br />

set to 1 in the pattern<br />

fingerprint.<br />

Experim<strong>en</strong>tal<br />

Samples<br />

120 samples of wine were used. From<br />

these, 60 were of red wine and 60 of<br />

white wine. The grape variety was<br />

known for all red wines (25 of<br />

“C<strong>en</strong>cibel” and 35 of “Cabernet<br />

Sauvignon”), but not for white wines.<br />

Only 15 red wines were aged, 25 nonaged<br />

and the age of the rest of red<br />

wines was unknown. The origin was<br />

known for 40 samples of white wine<br />

(15 samples of “Quintanar de la<br />

273


Manuel Urbano Cuadrado Tesis Doctoral<br />

Ord<strong>en</strong>” and 25 samples of “Fu<strong>en</strong>te de<br />

Pedro Naharro”, both within the “La<br />

Mancha” apellation d’origine). The<br />

samples were used as such, because<br />

filtering, dilution, preconc<strong>en</strong>tration,<br />

interfer<strong>en</strong>ts removal, etc., were not<br />

required.<br />

Apparatus and methods<br />

The instrum<strong>en</strong>t employed for MIR<br />

spectra collection was an FT-MIR<br />

Nicolet Magna-IR550 Serie II<br />

(Nicolet Instrum<strong>en</strong>t Corp., Madison,<br />

Wisconsin, USA), capable of making<br />

measurem<strong>en</strong>ts at 4 cm -1 resolution in<br />

the spectral range covering 4000-400<br />

cm -1 . The instrum<strong>en</strong>t was furnished<br />

with an infrared att<strong>en</strong>uated total<br />

reflection (ATR) solid, liquid and<br />

mellow sample cell with a zinc<br />

sel<strong>en</strong>ide crystal (Spectra Tech.,<br />

Stamford, CT, USA) for Nicolet<br />

Spectrometers. The ATR cell consists<br />

of the following: base accessory unit<br />

containing the mirrors to direct the IR<br />

beam to and from the sampling plate;<br />

a sampling plate containing the ZnSe<br />

ATR crystal and; precision single or<br />

dual readout controller. The number<br />

274<br />

of reflections of the ATR module was<br />

15. Other characteristics of the<br />

instrum<strong>en</strong>t were a transmission range<br />

betwe<strong>en</strong> 20000 and 650 cm -1 , a<br />

refractive index (at 1000 cm -1 ) of 2.4,<br />

d<strong>en</strong>sity of 5,27 g cm -3 and volume of<br />

3.5 ml. Before recording the spectra,<br />

the samples were thermostated at<br />

24ºC. The absorbance (log(1/R))<br />

spectra were collected in duplicate.<br />

Chemometric software for data<br />

processing and statistical techniques<br />

used<br />

The software employed for spectra<br />

normalisation, building of the<br />

fingerprints and g<strong>en</strong>eration of the<br />

similarity matrixes was developed by<br />

the authors in C programming<br />

language. The Unscrambler 7.8<br />

(Camo Process AS, Oslo, Norway)<br />

was used for principal compon<strong>en</strong>ts<br />

analysis (PCA). The chemometric<br />

procedure consists of the following<br />

steps:<br />

PCA for visualisation of spectral<br />

outliers<br />

PCA was carried out for the detection<br />

of sample spectra that behave as


Anal. Bioanal. Chem. XX (2005) XX Parte II, cap. 8<br />

outliers and can badly influ<strong>en</strong>ce the<br />

building of the fingerprints. Once the<br />

samples were in the new space<br />

defined by principal compon<strong>en</strong>ts, the<br />

leverage value —a measure of how<br />

far an object is as compared to the<br />

majority— and the residual variance<br />

were computed using The Unscrambler<br />

7.8 software. The outliers were<br />

examined in order to know if either<br />

they provided any useful information<br />

or they must be removed.<br />

Normalisation, building the fingerprints<br />

and g<strong>en</strong>eration of similarity<br />

matrixes<br />

Similarity matrixes were obtained<br />

from the sample spectra after data<br />

normalisation, building the fingerprints<br />

and calculation of the Tanimoto<br />

indexes for the samples. This<br />

procedure is based on the model<br />

described in section 2.<br />

Analysis of the similarity matrixes<br />

PCA and SIMCA were applied to the<br />

similarity matrixes for differ<strong>en</strong>tiation<br />

and classification of samples, respectively,<br />

according to differ<strong>en</strong>t criteria.<br />

Results and discussion<br />

Sample spectra and spectral outliers<br />

The zone of the MIR spectra used was<br />

the 800-3000 cm -1 region; thus, the<br />

400-800 and 3000-4000 cm -1 zones<br />

were deleted from this study owing to<br />

irreproducibility because of the high<br />

absorbance values. The MIR absorption<br />

band corresponding to the<br />

fundam<strong>en</strong>tal str<strong>en</strong>gth vibration of the<br />

–OH group at 3300-3500 cm -1 is<br />

responsible for irreproducibility. The<br />

800-3000 cm -1 spectra are shown in<br />

Fig. 1-A. As can be se<strong>en</strong> in this<br />

figure, the spectra show a high degree<br />

of similarity, with the exception of the<br />

1150-1300 and 2300-2400 cm -1 zones.<br />

For this reason, the use of the model<br />

proposed is necessary for <strong>en</strong>larging<br />

the dissimilarities in order to<br />

differ<strong>en</strong>tiate and classify samples of<br />

wines using spectroscopic data under<br />

various criteria.<br />

Analysis of spectral outliers<br />

was carried out to avoid the influ<strong>en</strong>ce<br />

of anomalous spectra on building the<br />

fingerprints, and th<strong>en</strong>, in the g<strong>en</strong>eration<br />

of the similarity matrixes.<br />

275


Manuel Urbano Cuadrado Tesis Doctoral<br />

A<br />

B<br />

Fig. 1. (A) MIR 400-3000 cm -1 spectra for all the samples of wine. (B) Residual<br />

variance vs leverage plot for the PCA applied to all the sample spectra.<br />

Thus, PCA was applied to the spectra<br />

and the residual variance versus<br />

leverage, shown in Fig. 1-B, was<br />

obtained. Five samples behave as<br />

276<br />

outliers, taking into account both the<br />

leverage value for each sample and<br />

sample dispersion. On the other hand,<br />

one sample was also considered


Anal. Bioanal. Chem. XX (2005) XX Parte II, cap. 8<br />

outlier because of the high value of<br />

residual variance in spite of being<br />

close to the swarm of samples.<br />

Study of normalisation methods<br />

The normalised spectra of a giv<strong>en</strong><br />

sample randomly selected and<br />

resulting from standard, logarithmic<br />

and tang<strong>en</strong>tial methods are shown in<br />

Fig. 2-A, 2-B and 2-C, respectively.<br />

The first two yield spectra without<br />

significant differ<strong>en</strong>ces, and neither in<br />

the fingerprints built using several<br />

threshold values U (0.2, 0.4, 0.6 and<br />

0.8), also shown in Fig. 2.<br />

Nevertheless, the tang<strong>en</strong>tial<br />

method yields a normalised spectrum<br />

very differ<strong>en</strong>t from those obtained by<br />

the first two methods. The tang<strong>en</strong>tial<br />

method only reduces the absorbance<br />

values owing to the use of the<br />

hyperbolic tang<strong>en</strong>t and not the<br />

minimum and maximum values of<br />

each variable, as can be se<strong>en</strong> in Fig. 2-<br />

C. The threshold values U used for<br />

building the fingerprints were also<br />

reduced (0.1, 0.2, 0.3 and 0.4) in order<br />

to do not g<strong>en</strong>erate fingerprints with<br />

too many elem<strong>en</strong>ts set to 0, that is,<br />

almost empty fingerprints.<br />

The results from the differ<strong>en</strong>t<br />

normalisation methods are shown in a<br />

g<strong>en</strong>eral way in Fig. 3, where both the<br />

frequ<strong>en</strong>cy spectra for all the samples<br />

—a pattern of the <strong>en</strong>tire sample<br />

population— and the fingerprints built<br />

with threshold values for the three<br />

methods can be se<strong>en</strong>. Very similar<br />

frequ<strong>en</strong>cy spectra were obtained again<br />

for the standard and logarithmic<br />

methods, as can be se<strong>en</strong> in Figs. 2-A<br />

and 2-B. The tang<strong>en</strong>tial method yields<br />

only minimum and maximum frequ<strong>en</strong>cies<br />

for almost all the variables<br />

and, for this reason, the tang<strong>en</strong>tial<br />

method t<strong>en</strong>ds to equalise the<br />

differ<strong>en</strong>ces betwe<strong>en</strong> samples (see Fig.<br />

2-C). This result is just the opposite to<br />

that pursued; that is, to <strong>en</strong>large the<br />

differ<strong>en</strong>ces betwe<strong>en</strong> samples. Thus,<br />

the standard normalisation was used<br />

for subsequ<strong>en</strong>t studies.<br />

Threshold value for the g<strong>en</strong>eration of<br />

fingerprints.<br />

index<br />

Averaged Tanimoto<br />

The selection of the threshold value U<br />

is a key aspect in building the<br />

277


Manuel Urbano Cuadrado Tesis Doctoral<br />

278<br />

A Standard normalisation<br />

0.2<br />

0.4<br />

0.6<br />

0.8<br />

B Logarithmic normalisation<br />

0.2<br />

0.4<br />

0.6<br />

0.8<br />

C Tang<strong>en</strong>tial normalisation<br />

Fig. 2. Normalised spectra corresponding to sample T166 resulting from the<br />

normalisation methods: (A) standard; (B) logarithmic; (C) tang<strong>en</strong>tial.<br />

Corresponding fingerprints built using the differ<strong>en</strong>t threshold values U<br />

are added to each spectrum.<br />

0.2<br />

0.4<br />

0.6<br />

0.8


Anal. Bioanal. Chem. XX (2005) XX Parte II, cap. 8<br />

A Standard normalisation<br />

0.4<br />

0.6<br />

B Logarithmic normalisation<br />

0.4<br />

0.6<br />

C Tang<strong>en</strong>tial normalisation<br />

Fig. 3. Frequ<strong>en</strong>cy spectra from all the samples, obtained using the differ<strong>en</strong>t<br />

normalisation methods: (A) standard; (B) logarithmic; (C) tang<strong>en</strong>tial.<br />

Corresponding fingerprints built using the differ<strong>en</strong>t threshold values U<br />

are added to each spectrum.<br />

0.1<br />

0.3<br />

279


Manuel Urbano Cuadrado Tesis Doctoral<br />

fingerprint as it determines its d<strong>en</strong>sity.<br />

The higher the threshold value, the<br />

lower d<strong>en</strong>sity. Fingerprints with high<br />

d<strong>en</strong>sity yield high similarity values,<br />

ev<strong>en</strong> for very differ<strong>en</strong>t samples. Just<br />

the opposite occurs with low-d<strong>en</strong>sity<br />

fingerprints. Thus, very low similarity<br />

values are obtained, ev<strong>en</strong> for very<br />

similar samples.<br />

The selection of the threshold<br />

value U dep<strong>en</strong>ds on the distribution of<br />

the normalised frequ<strong>en</strong>cies in the<br />

sample set. For this reason, this<br />

selection was carried out in an empirical<br />

way. Medium-d<strong>en</strong>sity finger<br />

prints with medium threshold values<br />

(0.4, 0.6) were obtained, and th<strong>en</strong>, the<br />

best results. This can be se<strong>en</strong> in the<br />

differ<strong>en</strong>t fingerprints shown in Figs. 2<br />

and 3.<br />

From the above comm<strong>en</strong>ted<br />

results, a new way for calculating the<br />

similarity index was proposed, based<br />

on taking also into account the<br />

fingerprint bits set to 0. The Tanimoto<br />

index calculated by expressions (4)<br />

and (6) was modified in such way that<br />

bits set to 0 common in the<br />

fingerprints were considered and not<br />

bits set to 1. Finally, both the values<br />

280<br />

of the original Tanimoto index and the<br />

modified Tanimoto index were<br />

averaged, for the g<strong>en</strong>eration of the<br />

similarity matrixes.<br />

A comparison of the two<br />

ways of calculating the Tanimoto<br />

index is giv<strong>en</strong> in Fig. 4, where the<br />

score plots for the PCA applied to the<br />

similarity matrixes g<strong>en</strong>erated from<br />

fingerprints are summarised. Differ<strong>en</strong>t<br />

threshold values U were used for<br />

building the fingerprints. Betwe<strong>en</strong> the<br />

threshold values U —namely, 0.2, 0.4<br />

and 0.6; 0.8— the last yielded a high<br />

no-explained data variance and was<br />

not employed (the variance explained<br />

was no higher than 60% versus values<br />

higher than 80% for threshold values<br />

U of 0.2, 0.4 and 0.6. Data variances<br />

explained by the first two factors are<br />

in the low part of the score plots of<br />

Fig. 4). Tr<strong>en</strong>ds are shown in Fig. 4.<br />

For example, samples of white wines<br />

(the first letter of the code is b) form a<br />

horizontal group in the above zone<br />

and samples of red wines (the first<br />

letter of the code is t) constitute other<br />

group placed from the down side to<br />

<strong>en</strong>d of the group of white samples in<br />

Fig. 4-A. The best discrimination is


Anal. Bioanal. Chem. XX (2005) XX Parte II, cap. 8<br />

A, U=0.2<br />

B, U=0.2<br />

C, U=0.4 D, U=0.4<br />

Fig. 4. Score plots obtained applying PCA to the similarity matrixes obtained by:<br />

(A) U=0.2 and normal Tanimoto index; (B) U=0.2 and averaged Tanimoto<br />

index; (C) U=0.4 and normal Tanimoto index; (D) U=0.4 and averaged<br />

Tanimoto index.<br />

281


Manuel Urbano Cuadrado Tesis Doctoral<br />

E, U=0.6 F, U=0.6<br />

Fig. 4. (cont.). (E) U=0.6 and normal Tanimoto index; (F) U=0.6 and averaged<br />

Tanimoto index.<br />

achieved for the threshold value<br />

U=0.4 and the averaged Tanimoto<br />

index, as can be se<strong>en</strong> in Fig. 4.<br />

Application of the model to the<br />

differ<strong>en</strong>tiation of wines<br />

The model proposed in this paper has<br />

be<strong>en</strong> applied to the differ<strong>en</strong>tiation of<br />

types of wines. Thus, the origin and<br />

variety of the grape, and ageing<br />

process were the criteria used to<br />

distinguish betwe<strong>en</strong> wines using MIR<br />

spectra. The results were compared<br />

with those obtained applying PCA to<br />

282<br />

spectra. For the reasons above<br />

comm<strong>en</strong>ted, the similarity matrixes<br />

were built using a threshold value<br />

U=0.4 and the averaged Tanimoto<br />

index. First, and with the aim of<br />

checking the model, it was applied to<br />

something obvious: differ<strong>en</strong>tiation of<br />

red and white wines.<br />

Figure 5 shows the score plot<br />

applying PCA to spectra (the data<br />

variance explained by the first two<br />

factors was 82%). White wines are on<br />

the right part of the plot and red wines<br />

on the left. A clearer separation of the


Anal. Bioanal. Chem. XX (2005) XX Parte II, cap. 8<br />

Fig. 5. Score plot obtained applying PCA to MIR spectra.<br />

two types of wines is achieved<br />

applying PCA to the similarity matrix<br />

using a threshold value U=0.4. Thus,<br />

the s<strong>en</strong>sitivity of the model to<br />

distinguish white and red wines is<br />

high, in spite of the initial similarity<br />

of the spectra and the low selectivity<br />

of the MIR instrum<strong>en</strong>t as compared<br />

with that of sophisticated instrum<strong>en</strong>ts<br />

as mass spectrometers.<br />

Study of the influ<strong>en</strong>ce of the pattern<br />

As comm<strong>en</strong>ted in describing the<br />

model, a pattern is a fingerprint used<br />

for filtering (scaling) the calculation<br />

of similarity. The ultimate objective<br />

was to increase and decrease the<br />

similarity values for similar and<br />

differ<strong>en</strong>t samples, respectively. Two<br />

factors influ<strong>en</strong>ce the effici<strong>en</strong>cy of the<br />

pattern for <strong>en</strong>larging the differ<strong>en</strong>ces,<br />

namely: a) the selection of the<br />

samples used for building the pattern<br />

fingerprint; and b) the frequ<strong>en</strong>cy<br />

threshold value V employed in this<br />

process.<br />

Figure 6 shows both the frequ<strong>en</strong>cy<br />

distribution of the normalised<br />

values and the corresponding<br />

pattern fingerprints g<strong>en</strong>erated from<br />

283


Manuel Urbano Cuadrado Tesis Doctoral<br />

differ<strong>en</strong>t threshold values V for all the<br />

samples, including both white and red<br />

wines, and also for white wines and<br />

red wines, separately. A significant<br />

variation in the frequ<strong>en</strong>cy distribution<br />

for the variables (wavel<strong>en</strong>gths in this<br />

case) dep<strong>en</strong>ding on samples selected<br />

for g<strong>en</strong>eration of the pattern can be<br />

observed. This behaviour affects the<br />

fingerprints g<strong>en</strong>erated for a giv<strong>en</strong><br />

frequ<strong>en</strong>cy threshold value V, differ<strong>en</strong>t<br />

for equal threshold values V, as can be<br />

observed in Fig. 6. Thus, the proposed<br />

method based on building fingerprints<br />

from spectral information permits to<br />

differ<strong>en</strong>tiate wines.<br />

In order to deal with more<br />

interesting problems, pattern finger<br />

prints of wines from differ<strong>en</strong>t grape<br />

varieties and ageing processes were<br />

built. Frequ<strong>en</strong>cy distributions and the<br />

fingerprints g<strong>en</strong>erated from these<br />

distributions are shown in Fig. 7.<br />

Thus, frequ<strong>en</strong>cies and fingerprints for<br />

both wines from varieties “C<strong>en</strong>cibel”<br />

and “Cabernet Sauvignon” —aged<br />

and non-aged wines— can be se<strong>en</strong> in<br />

this figure. Low threshold values V<br />

yield pattern fingerprints with high<br />

d<strong>en</strong>sity that are not appropriate for<br />

284<br />

samples characterisation. Nevertheless,<br />

the fingerprints g<strong>en</strong>erated<br />

using a threshold value V=0.6 are<br />

appropriate for characterisation.<br />

The low number of samples<br />

employed for building pattern<br />

fingerprints yielded a high number of<br />

consecutive variables with similar<br />

values in the frequ<strong>en</strong>cy distributions<br />

shown in Fig. 7. For this reason,<br />

fingerprints with high d<strong>en</strong>sity were<br />

obtained. Thus, the higher the number<br />

of samples, the higher the quality of<br />

the pattern; and a large number of<br />

samples is mandatory in order to<br />

develop robust models. In spite of this<br />

shortcoming, differ<strong>en</strong>tiation of samples<br />

was achieved, as comm<strong>en</strong>ted in<br />

the following section.<br />

On the other hand, parameter<br />

W of expression (7) also influ<strong>en</strong>ced<br />

the results. The values used were 5, 7,<br />

9, 11 and 13. Best differ<strong>en</strong>tiation was<br />

achieved with medium values<br />

(namely: W=9 and W=11).<br />

Differ<strong>en</strong>tiation of red wines according<br />

to grape variety and ageing process<br />

Refer<strong>en</strong>ce data of grape varieties and<br />

ageing process were known for the


Anal. Bioanal. Chem. XX (2005) XX Parte II, cap. 8<br />

A White and red wines<br />

0.4<br />

0.6<br />

B White wines<br />

0.4<br />

0.6<br />

C Red wines<br />

Fig. 6. Frequ<strong>en</strong>cy distributions and their fingerprints for building patterns using:<br />

(A) all the samples; (B) white wines; (C) red wines.<br />

0.4<br />

0.6<br />

285


Manuel Urbano Cuadrado Tesis Doctoral<br />

A “Cabernet Sauvignon”, no aged wines<br />

0.4 0.4<br />

0.6 0.6<br />

C “C<strong>en</strong>cibel”, no aged wines<br />

0.4 0.4<br />

0.6 0.6<br />

286<br />

B “Cabernet Sauvignon”, aged wines<br />

D “C<strong>en</strong>cibel”, aged wines<br />

Fig. 7. Frequ<strong>en</strong>cy distributions and their fingerprints for the building of patterns.<br />

major part of red wines. PCA was<br />

applied to the similarity matrixes<br />

obtained applying a threshold value<br />

V=0.6 (selected from differ<strong>en</strong>ces in<br />

the fingerprints shown in Fig. 7) and<br />

using the averaged Tanimoto index.<br />

Figure 8 (A and B) shows the score<br />

plots resulting from PCA for spectra<br />

and similarity matrixes, respectively<br />

(the data variance explained was<br />

higher than 80%). Wines from the<br />

“C<strong>en</strong>cibel” variety were named as X


Anal. Bioanal. Chem. XX (2005) XX Parte II, cap. 8<br />

Application of PCA to MIR spectra<br />

A<br />

C<br />

B<br />

Application of PCA to similarity<br />

matrixes<br />

Fig. 8. Score plots resulting from PCA applied to: (A) spectra of non-aged and<br />

aged wines from “C<strong>en</strong>cibel” —X— and “Caubernet Sauvignon” —Y—<br />

grapes; (B) similarity matrix betwe<strong>en</strong> samples of non-aged and aged<br />

wines from “C<strong>en</strong>cibel” grapes —X— and samples of non-aged and aged<br />

wines from “Caubernet Sauvignon” grapes —Y—; (C) spectra of nonaged<br />

—S— and aged —T— wines from “C<strong>en</strong>cibel” grapes; (D)<br />

similarity matrix betwe<strong>en</strong> samples of non-aged —S— and aged —T—<br />

wines from “C<strong>en</strong>cibel” grape.<br />

D<br />

287


Manuel Urbano Cuadrado Tesis Doctoral<br />

Application of PCA to MIR spectra<br />

E<br />

288<br />

F<br />

Application of PCA to similarity<br />

matrixes<br />

Fig. 8. (cont.). Score plots resulting from PCA applied to: (E) spectra of wines<br />

from “Quintanar de la Ord<strong>en</strong>” —A— and “Fu<strong>en</strong>te de Pedro Naharro” —<br />

B— grape origins; (F) similarity matrix betwe<strong>en</strong> samples of wines from<br />

“Quintanar de la Ord<strong>en</strong>” —A— and “Fu<strong>en</strong>te de Pedro Naharro” —B—<br />

grape origins.<br />

and wines from “Cabernet Sauvignon”<br />

were named as Y. A clear<br />

grouping is obtained using the<br />

proposed model; that is, Y samples on<br />

the right and X samples on the left.<br />

This separation is not achieved in Fig.<br />

8-A.<br />

Similar results were obtained<br />

in differ<strong>en</strong>tiating wines according to<br />

the ageing process. Wines from<br />

“C<strong>en</strong>cibel” grape were employed.<br />

Aged wines were named T and nonaged<br />

wines S. The formers are<br />

grouped on the right and the latter on<br />

the left in Fig. 8-D, corresponding to<br />

the score plots from the similarity<br />

matrix. Figure 8-C, corresponding to<br />

PCA applied to spectra without<br />

processing, shows only slight tr<strong>en</strong>ds.<br />

Differ<strong>en</strong>tiation of white wines<br />

according to grape origin<br />

The model was used for the<br />

differ<strong>en</strong>tiation of white wines<br />

according to grape origin; thus, wines<br />

from “Quintanar de la Ord<strong>en</strong>” were


Anal. Bioanal. Chem. XX (2005) XX Parte II, cap. 8<br />

named as A and wines from “Fu<strong>en</strong>te<br />

de Pedro Naharro” were named as B.<br />

These zones are within the appellation<br />

d’origine “La Mancha”. In this case a<br />

second order differ<strong>en</strong>tiation that<br />

requires a degree of discrimination<br />

higher than that for differ<strong>en</strong>tiation of<br />

wines from differ<strong>en</strong>t appellation<br />

d’origine was obtained.<br />

PCA was applied to spectra<br />

without processing the proposed<br />

model and similarity matrix. Score<br />

plots for the classical method and the<br />

similarity calculation are shown in<br />

Figs. 8-E and 8-F, respectively (the<br />

data variance explained was higher<br />

than 80%). Better results are obtained<br />

using the model. Wines within the<br />

same origin show a grouping in Fig.<br />

8. This is not achieved using classical<br />

processing.<br />

SIMCA methods for prediction<br />

Classification of samples in their<br />

respective classes has be<strong>en</strong> tested.<br />

SIMCA, which is a supervised pattern<br />

recognition method based on the<br />

developm<strong>en</strong>t of PCA for giv<strong>en</strong> classes<br />

separately, has be<strong>en</strong> used. Thus,<br />

SIMCA uses PCA for modelling<br />

classes of objects tak<strong>en</strong> into account<br />

the differ<strong>en</strong>t groups a priori.<br />

Table 1 shows the results<br />

obtained from the prediction of the<br />

SIMCA models. The classification<br />

error was calculated by the sum of<br />

false positive and false negative/number<br />

of samples ratio. Firstly,<br />

two classes for white and red wines<br />

were modelled using data from<br />

spectra and similarity matrixes. PCA<br />

and outliers removing were applied to<br />

each group. The training set was<br />

composed of 85 samples. For<br />

validation, a test set consisting of 30<br />

samples not used in the training step<br />

was used. The classification errors of<br />

samples were 20% and 10% for<br />

sample spectra and similarity<br />

matrixes, respectively.<br />

Classes for wines from differ<strong>en</strong>t<br />

grape varieties and origins, in<br />

addition to the ageing process, were<br />

developed. In this case, test sets<br />

consisting of samples not employed in<br />

the training of any class were not used<br />

because of the low number of samples<br />

in which these parameters were<br />

known. Despite this, to use samples of<br />

a giv<strong>en</strong> class for validating other<br />

289


Manuel Urbano Cuadrado Tesis Doctoral<br />

Table 1 Results from SIMCA prediction<br />

Classification<br />

criterion and data<br />

used<br />

Type of wine. Sample<br />

spectra<br />

Type of wine.<br />

Similitude matrixes<br />

290<br />

Type<br />

Number of<br />

samples<br />

Classified<br />

in class A<br />

White (A) 14 13 1<br />

Red (B) 16 3 15<br />

White (A) 14 14 1<br />

Red (B) 16 2 16<br />

Grape variety.<br />

C<strong>en</strong>cibel<br />

(A)<br />

23 23 2<br />

Similitude matrixes Caber.-<br />

Sauv. (B)<br />

32 3 32<br />

Ageing process.<br />

Non-aged<br />

(A)<br />

23 23 0<br />

Similitude matrixes<br />

Aged (B) 14 2 14<br />

Proced<strong>en</strong>ce.<br />

Similitude matrixes<br />

Quint. de la<br />

Ord<strong>en</strong> (A)<br />

F. de Pedro<br />

Naharro (B)<br />

classes developed with their<br />

respective training sets can be<br />

considered as an indep<strong>en</strong>d<strong>en</strong>t test. The<br />

high data dispersion for samples of<br />

the same type obtained wh<strong>en</strong> PCA is<br />

applied to spectra without the<br />

proposed processing can be observed<br />

in Figs. 8-A, 8-C and 8-E. This fact<br />

made impossible to obtain correct<br />

classifications. The classes developed<br />

from the similarity matrixes yielded<br />

15 15 3<br />

21 5 21<br />

Classified<br />

in class B Error<br />

20%<br />

10%<br />

9%<br />

5%<br />

22%<br />

the values summarised in Table 1.<br />

The classification errors obtained<br />

were 9% and 5% for grape variety and<br />

ageing process criteria, respectively.<br />

The classification according to origin<br />

yielded errors of 22% owing to the<br />

high data dispersion.<br />

Conclusions<br />

A new chemoinformatic method<br />

based on both building fingerprints of


Anal. Bioanal. Chem. XX (2005) XX Parte II, cap. 8<br />

wines from MIR spectra and<br />

similarity calculation has be<strong>en</strong><br />

pres<strong>en</strong>ted in this work. The use of this<br />

method permits to <strong>en</strong>large differ<strong>en</strong>ces<br />

betwe<strong>en</strong> very similar spectra. Thus,<br />

the similarity matrixes show samples<br />

groupings according to origin of<br />

grape, variety of grape, and ageing<br />

process.<br />

The empirical parameters<br />

used for building the fingerprints, that<br />

is, for digitalisation of MIR spectra,<br />

influ<strong>en</strong>ce the differ<strong>en</strong>tiation results<br />

obtained. Pattern fingerprints g<strong>en</strong>erated<br />

for filtering the calculation of<br />

the Tanimoto index yield the best<br />

results, but the low number of<br />

samples used for building patterns of<br />

varieties, origins and ageing process<br />

also influ<strong>en</strong>ce the quality of the<br />

pattern fingerprints. Thus, this study<br />

can be only considered as exploratory<br />

for testing the characteristics of the<br />

method proposed.<br />

The calculation of the<br />

Tanimoto index has also be<strong>en</strong> modifyed<br />

in order to <strong>en</strong>large differ<strong>en</strong>tiation.<br />

An advantage of the model is<br />

the possibility of building a library of<br />

wine fingerprints, which would not<br />

require a high storage capacity due to<br />

the size of the fingerprints (1 kilobyte<br />

per wine).<br />

Acknowledgem<strong>en</strong>ts<br />

The Comisión Interministerial de<br />

Ci<strong>en</strong>cia y Tecnología (CICyT) is<br />

thanked for financial support (Project<br />

AGL2000-0321-P4-03).<br />

Refer<strong>en</strong>ces<br />

[1] Blanco M, Valdes D, Bayod<br />

MS, Fernández Mari F,<br />

Llor<strong>en</strong>te I (2004) Anal Chim<br />

Acta 502:221-227<br />

[2] Murphy BT, MacKinnon SL,<br />

Yan XJ, Hammond GB,<br />

Vaisberg AJ, Neto CC (2003)<br />

J Agric Food Chem 51:3541-<br />

3545<br />

[3] Emmett MR (2003) J<br />

Chromatogr, A 1013:203-213<br />

[4] Cran MJ, Bigger SW (2003)<br />

Appl Spectrosc 57:928-932<br />

[5] Bruch MD, Fatunmbi HO<br />

(2003) J Chromatogr, A<br />

1021:61-70<br />

[6] Ch<strong>en</strong> H, He MY, Pei J, He<br />

291


Manuel Urbano Cuadrado Tesis Doctoral<br />

292<br />

HF (2003) Anal Chem<br />

75:6531-6535<br />

[7] Albanell E, Caja G, Duch X,<br />

Rovai M, Salama AAK,<br />

Casals R (2003) J AOAC Int<br />

86:746-752<br />

[8] Bu<strong>en</strong>ing Pfaue H (2003) Food<br />

Chem 82:107-115<br />

[9] Trullols E, Ruisánchez I, Rius<br />

FX (2004) Tr<strong>en</strong>ds Anal Chem<br />

23: 137-145<br />

[10] Pérez-Pavón JL, Del Nogal-<br />

Sánchez M, García-Pinto C,<br />

Fernández Laespada ME<br />

Mor<strong>en</strong>o-Cordero B, Guerrero-<br />

Peña A (2003) Anal Chem<br />

75:2034-2041<br />

[11] Arvanitoyannis IS, Katsota<br />

MN, Psarra EP, Soufleros<br />

EH, Kallithraka S (1999)<br />

Tr<strong>en</strong>ds Food Sci Techn<br />

10:321-336<br />

[12] Lasch P, Schmitt J, Beekes<br />

M, Udelhov<strong>en</strong> T, Eid<strong>en</strong> M,<br />

Fabian H, Petrich W,<br />

Naumann D (2003) Anal<br />

Chem 75:6673-6678<br />

[13] Esb<strong>en</strong>s<strong>en</strong> KH (2002)<br />

Multivariate Data Analysis -<br />

in Practice. Camo Process<br />

AS, Oslo<br />

[14] Vandeginst<strong>en</strong> BGM, Massart<br />

DL, Buyd<strong>en</strong>s S, De Jong S,<br />

Lewi PJ, Smeyers-Verbeke J<br />

(1998) Handbook of Chemometrics<br />

and Qualimetrics:<br />

Parts A and B. Elsevier,<br />

Amsterdam<br />

[15] García-Jares CM, García-<br />

Martín MS, Marino N,<br />

Torrijos C (1995) J Sci Food<br />

Agric 69:175-184<br />

[16] La S, Cho JH, Kim JH, Kim<br />

KR (2003) Anal Chim Acta<br />

486:171-182<br />

[17] Varmuza K, Karlovits M,<br />

Demuth W (2003) Anal Chim<br />

Acta 490:313-324<br />

[18] Scsibrany H, Karlovits M,<br />

Demuth W, Mueller F,<br />

Varmuza K (2003) Chemom<br />

Intell Lab Syst 67:95-108<br />

[19] Mazzatorta P, B<strong>en</strong>f<strong>en</strong>ati E<br />

(2002) J Chem Inf Comput<br />

Sci 42:1250-1255


Anal. Bioanal. Chem. XX (2005) XX Parte II, cap. 8<br />

[20] Willet P, Barnard JM, Downs<br />

G (1998) J Chem Inf Comput<br />

Sci 38: 983-996<br />

[21] Rouvray DH, Balaban AT<br />

(1979) Chemical Applications<br />

of Graph Theory. Applications<br />

of Graph Theory.<br />

Wilson RJ, Beineke<br />

LW(Eds.). AcademicPress<br />

293


Capítulo 9<br />

NEAR INFRARED REFLECTANCE<br />

SPECTROSCOPY AND<br />

MULTIVARIATE ANALYSIS IN<br />

ENOLOGY: DETERMINATION OR<br />

SCREENING OF FIFTEEN<br />

PARAMETERS IN DIFFERENT TYPES<br />

OF WINES<br />

El cont<strong>en</strong>ido de este capítulo ha sido publicado <strong>en</strong> la revista Analytica Chimica<br />

Acta, 527 (2004) 81-88.


Anal. Chim. Acta 527 (2004) 81 Parte II, cap. 9<br />

NEAR INFRARED REFLECTANCE SPECTROSCOPY AND<br />

MULTIVARIATE ANALYSIS IN ENOLOGY: DETERMINATION OR<br />

SCREENING OF FIFTEEN PARAMETERS IN DIFFERENT TYPES OF<br />

WINES<br />

Urbano-Cuadrado M., Luque de Castro M.D., Pérez-Juan P.M., García-Olmo J.,<br />

Gómez-Nieto M.A.<br />

Abstract<br />

A study of the feasibility of near infrared reflectance spectroscopy<br />

(NIRS) for analytical monitoring in wineries is pres<strong>en</strong>ted, in which equations for<br />

the determination or scre<strong>en</strong>ing of the commonest <strong>en</strong>ological parameters are<br />

proposed. The training and validation sets to develop NIR g<strong>en</strong>eral equations were<br />

built with samples (180) from differ<strong>en</strong>t apellation d’origine, differ<strong>en</strong>t wine types,<br />

etc. By the calibration step (partial least squares regression and cross validation<br />

were used for multivariate calibration), major compon<strong>en</strong>ts such as ethanol,<br />

volumic mass, total acidity, pH, glycerol, colour, tonality and total polyph<strong>en</strong>ol<br />

index are accurate determined by the proposed equations as compared with the<br />

refer<strong>en</strong>ce data obtained by the official and standard methods —determination<br />

coeffici<strong>en</strong>ts (R 2 ) were higher than 0.800 (and higher than 0.900 most times) and<br />

standard error cross validation (SECV) values were close to those of the<br />

refer<strong>en</strong>ce methods—. The proposed method also offers scre<strong>en</strong>ing capability for<br />

compon<strong>en</strong>ts such as volatile acidity (R 2 = 0.481), organic acids (R 2 = 0.432 for<br />

malic acid, R 2 = 0.544 for tartaric acid, R 2 = 0.541 for gluconic acid) —with the<br />

exception of the accurate determination of lactic acid (0.860 and 0.35 g l -1 for R 2<br />

and SECV, respectively)—, reducing sugars (R 2 = 0.705) and total sulphur<br />

dioxide (R 2 = 0.615). In equations validation, the correlation betwe<strong>en</strong> the<br />

refer<strong>en</strong>ce and NIRS methods was tested, and lope and bias values statistically not<br />

differ<strong>en</strong>t from 1 and 0, respectively, were obtained for most parameters.<br />

Keywords: Near infrared spectroscopy, Wineries, Multivariate calibration.<br />

297


Manuel Urbano Cuadrado Tesis Doctoral<br />

1. Introduction<br />

The main objective of an analytical<br />

chemist is the developm<strong>en</strong>t of<br />

methods able to extract physical,<br />

chemical and biological information<br />

from a target system. In agrifood<br />

industries, as in other areas, the new<br />

methodologies should be as close as<br />

possible to both time and operational<br />

requirem<strong>en</strong>ts, and aims of cli<strong>en</strong>ts<br />

regarding to product characterisation.<br />

Multi-parameter approaches —that<br />

permit to deter mine more than one<br />

parameter in a single analysis— such<br />

as those based on chromatography,<br />

electrophoresis [1-3], or emission<br />

atomic spectrometry with multichannel<br />

detection [4,5], etc. have be<strong>en</strong><br />

widely employed.<br />

In this s<strong>en</strong>se, the use of<br />

various spectral regions and<br />

chemometrics is oft<strong>en</strong> aimed at<br />

obtaining multiparametric information,<br />

as is the case with approaches<br />

based on Fourier trans form infrared<br />

[6,7]. Also Near Infrared Reflectance<br />

Spectroscopy (NIRS) is a very useful<br />

technique in this area as it <strong>en</strong>ables<br />

298<br />

multiparametric determination with<br />

minimum or null sample pretreatm<strong>en</strong>t<br />

[8,9]. The effici<strong>en</strong>cy of NIRS, of<br />

particular significance in food<br />

analysis, has be<strong>en</strong> tested regarding to<br />

some official and standard methods in<br />

wineries and other spirit industries.<br />

Thus, key parameters in brewing<br />

processes —namely: ethanol and<br />

sugar (fructose, glucose or residual<br />

sugars)— can be determined by both<br />

off-line and on-line approaches [10-<br />

12]. The possibility of multidetermination<br />

comp<strong>en</strong>sates for both the<br />

time-consuming calibration step and<br />

the lower or similar accuracy of these<br />

methods as compared with the<br />

refer<strong>en</strong>ce methods. The accuracy can<br />

be improved by both high<br />

reproducible refer<strong>en</strong>ce data and<br />

homog<strong>en</strong>eous training and validation<br />

sets. The applicability of NIRS to<br />

wine parameters differ<strong>en</strong>t from<br />

ethanol and sugars —namely, soluble<br />

solids, pH, colour and methanol— has<br />

also be<strong>en</strong> studied [13].<br />

A method for the determination<br />

of 15 <strong>en</strong>ological parameters —<br />

alcoholic degree, volumic mass, total<br />

acidity, pH, volatile acidity, glycerol,


Anal. Chim. Acta 527 (2004) 81 Parte II, cap. 9<br />

total polyph<strong>en</strong>ol index, reducing<br />

sugars, lactic, malic, tartaric and<br />

gluconic acids, colour, tonality, total<br />

sulphur dioxide and free sulphur<br />

dioxide— by NIRS has be<strong>en</strong><br />

developed. The objective was to<br />

check the applicability of this<br />

technique for either determination or<br />

scre<strong>en</strong>ing of key parameters in a<br />

variety of both apellation d’origine<br />

and types of wines (red, rosé and<br />

white wines).<br />

2. Experim<strong>en</strong>tal<br />

2.1. Samples and sample preparation<br />

Differ<strong>en</strong>t wines —including red, rosé<br />

and white wines (98, 12 and 70<br />

samples, respectively); young and<br />

aged wines (the proportion was 70<br />

and 30 perc<strong>en</strong>t for young and aged<br />

wines, respectively); wines from<br />

differ<strong>en</strong>t apellation d’origine (80 from<br />

“La Mancha”, 25 from “Valdepeñas”,<br />

17 from “Alicante”, 15 from<br />

“Jumilla”, 18 from “Navarra” and 25<br />

from “Madrid”) and grape varieties<br />

(27 from “C<strong>en</strong>cibel”, 30 from<br />

“Cabernet Sauvignon”, 15 from<br />

“C<strong>en</strong>cibel-Cabernet Sauvig non”, 20<br />

from “Merlot”, 15 from “Garnacha”,<br />

30 from “Bobal” and 43 from<br />

“Ari<strong>en</strong>”)— were used in the pres<strong>en</strong>t<br />

study. Thus, the number of samples<br />

employed in the calibration and<br />

validation steps was 180 for all the<br />

parameters, but for organic acids (155<br />

samples), colour (98 samples) and<br />

tonality (98 samples). The last two<br />

parameters were obtained only for red<br />

wines—. These samples were used as<br />

such, because filtering, dilution,<br />

interfer<strong>en</strong>ts removal, etc. were not<br />

required.<br />

2.2. Apparatus and methods<br />

The instrum<strong>en</strong>t employed for spectra<br />

collection was a Foss-NIRSystems<br />

6500 System II spectrophotometer<br />

(Foss-NIRSystems Inc., Silver Spring,<br />

MD, USA) equipped with a transport<br />

module. The samples were analysed<br />

by folded transmission using a ring<br />

cup with a 0.1 mm pathl<strong>en</strong>gth. A<br />

diffuse reflecting gold surface placed<br />

at the bottom of the cup reflected the<br />

radiation back through the sample to<br />

the reflectance detector. The spectra<br />

299


Manuel Urbano Cuadrado Tesis Doctoral<br />

were collected using WinISI software<br />

1.50 (Infrasoft International, Port<br />

Matilda, PA, USA). Before recording<br />

the spectra, the samples were<br />

thermostated at 24ºC. The reflectance<br />

(log1/R) spectra were collected in<br />

duplicate.<br />

On the other hand, samples<br />

were analysed in duplicate by the<br />

refer<strong>en</strong>ce methods shown in Table 1<br />

and standard error laboratory (SEL)<br />

was estimated from these duplicates<br />

using the following equation:<br />

2<br />

( yi1<br />

− yi2)<br />

i 1<br />

SEL = (1)<br />

n<br />

where n is the number of samples and<br />

yi1 and yi2 are values obtained for the<br />

replicates 1 and 2, respectively, of<br />

sample i.<br />

300<br />

n<br />

∑<br />

=<br />

2.3. Chemometric software used for<br />

data processing and statistical<br />

techniques used<br />

WinISI software 1.50 (Infrasoft<br />

International, Port Matilda, PA, USA)<br />

was also used for data processing. The<br />

chemometric procedure consists of the<br />

following steps:<br />

a) Root Mean Square (RMS) calculus<br />

The RMS [14] was used for the study<br />

of similarity betwe<strong>en</strong> spectra<br />

corresponding to aliquots of the same<br />

sample. The following equation was<br />

used:<br />

n<br />

∑<br />

=<br />

6<br />

RMS(<br />

j)<br />

= 10 ×<br />

i 1<br />

( yij<br />

− yi)<br />

n<br />

(2)<br />

where n is the number of<br />

wavel<strong>en</strong>gths, y ij is the log(1/R) for<br />

the sub-sample j at λi and y i is the<br />

log(1/R) for the averaged spectrum of<br />

a sample at λi. The factor 10 6 is<br />

introduced in the calculation of RMS<br />

for avoiding to work with too low<br />

values. As two spectra were collected<br />

per sample, their RMS values were<br />

equal. Thus, a unique RMS value was<br />

considered, th<strong>en</strong> compared with the<br />

RMScut off, which was calculated from<br />

the individual RMS values of the set<br />

of samples using the MEAN and STD<br />

parameters and equations (3) and (4),<br />

where N and n are the number of<br />

samples and the number of<br />

wavel<strong>en</strong>gths, respectively.<br />

Taking into account equations<br />

2


Anal. Chim. Acta 527 (2004) 81 Parte II, cap. 9<br />

Table 1. Enological parameters and refer<strong>en</strong>ce methods<br />

Parameter Refer<strong>en</strong>ce method<br />

Alcoholic degree Distillation and aerometry<br />

Volumic mass Aerometry<br />

Total acidity Titration with NaOH up to pH = 7.0<br />

pH Pot<strong>en</strong>tiometry<br />

Volatile acidity<br />

Distillation, vapour dragging and titration with<br />

NaOH<br />

Glycerol Enzymatic reaction<br />

Total<br />

index<br />

polyph<strong>en</strong>ol<br />

Folin-Ciocalteu reag<strong>en</strong>t in alkaline medium<br />

Reducing sugars Reduction of Cu +2 in boiling alkaline medium<br />

Lactic acid High pressure liquid chromatography<br />

Malic acid High pressure liquid chromatography<br />

Tartaric acid High pressure liquid chromatography<br />

Gluconic acid Enzymatic kits<br />

Colour Absorbance sum at 420, 520 and 620 nm<br />

Tonality Absorbance ratio at 420 nm and 520 nm<br />

Total sulphur dioxide<br />

Hydrolysis with NaOH and Iodometry in acid<br />

medium<br />

Free sulphur dioxide Iodometry in acid medium<br />

MEAN =<br />

STD =<br />

N<br />

∑<br />

j=<br />

1<br />

2 ( RMS ) ( yij<br />

− yi)<br />

N<br />

n N<br />

j ∑∑<br />

i=<br />

1 j=<br />

1<br />

=<br />

nN<br />

N<br />

n N<br />

2<br />

∑ ( RMSj)<br />

∑∑(<br />

yij<br />

− yi)<br />

j=<br />

1<br />

N −1<br />

(3) and (4), the relationship betwe<strong>en</strong><br />

the values of MEAN and STD is<br />

defined by the following equation:<br />

N<br />

STD = × MEAN<br />

N −1<br />

(5)<br />

=<br />

i=<br />

1 j=<br />

1<br />

n<br />

( N −1)<br />

2<br />

2<br />

(3)<br />

(4)<br />

Equation (5) can be transformed into<br />

equation (6) as 2 replicates per sample<br />

were obtained in this work:<br />

STD = 2 × MEAN (6)<br />

301


Manuel Urbano Cuadrado Tesis Doctoral<br />

The expression for calculating<br />

STD is a variance of the error that<br />

302<br />

STD<br />

lim it = . 036×<br />

k m<br />

2<br />

∑ STDk<br />

k 1<br />

= 1.<br />

036×<br />

=<br />

=<br />

where m is the number of samples.<br />

Finally, RMScut off is obtained<br />

using STDlimit and equation (5). For<br />

samples with RMS lower than RMScut<br />

off an average of the two spectra was<br />

obtained; for samples with RMS<br />

higher than RMScut off a third spectrum<br />

was obtained, and the two more<br />

similar were used for recalculation of<br />

the RMS. In this way, RMS values<br />

lower than the RMScut off were also<br />

obtained in all instances.<br />

b) Principal Compon<strong>en</strong>ts Analysis<br />

(PCA) for visualisation of spectral<br />

outliers<br />

PCA was required for the reduction of<br />

the number of variables showing colinearity,<br />

thus repres<strong>en</strong>ting the<br />

samples in a new, reduced pdim<strong>en</strong>sional<br />

space (p3.0 were considered outliers.<br />

Because of the exist<strong>en</strong>ce of clusters of<br />

samples PCA and H were computed<br />

for each cluster. These outliers were<br />

examined in order to know if either<br />

they provided any useful information<br />

or they must be removed.<br />

c) Selection of the calibration and<br />

validation sets<br />

Once the outliers without useful information<br />

had be<strong>en</strong> removed, the<br />

calibration and validation sets were<br />

defined. Both sets were indep<strong>en</strong>d<strong>en</strong>t;<br />

thus, the validation set was only used<br />

for testing the equations. The perc<strong>en</strong>t<br />

of samples in each set were 85% and<br />

15% for the training and validation<br />

sets, respectively. The selection of the<br />

validation set was carried out by


Anal. Chim. Acta 527 (2004) 81 Parte II, cap. 9<br />

calculating both PCA and subsequ<strong>en</strong>t<br />

H distance. The criterion used was<br />

samples more separated betwe<strong>en</strong> them<br />

with the highest number of neighbours<br />

(H


Manuel Urbano Cuadrado Tesis Doctoral<br />

304<br />

Table 2. Refer<strong>en</strong>ce data<br />

Parameter<br />

Alcoholic<br />

degree (%v/v)<br />

Volumic mass<br />

(kg l -1 )<br />

Total acidity<br />

(meq l -1 )<br />

Calibration set Validation set<br />

N Range Mean<br />

Stand.<br />

Dev.<br />

N Range Mean<br />

Stand.<br />

Dev<br />

150 9.58 – 15.15 12.14 1.24 25 10.13 – 14.96 12.26 1.37 0.19<br />

150 989.5 – 999.3 992.9 2.1 25 990.4 – 999.4 993.5 2.4 0.4<br />

150 3.55 – 8.72 5.42 0.92 25 4.15 – 8.69 5.70 1.09 0.35<br />

pH (pH units) 150 3.26 – 4.04 3.65 0.15 25 3.30 – 4.03 3.63 0.17 0.02<br />

Volatile acidity<br />

(g l -1 )<br />

150 0.14 - 0.87 0.42 0.15 25 0.19 – 0.82 0.45 0.20 0.08<br />

Glycerol (g l -1 ) 150 1.95 - 12.38 6.29 2.47 25 2.57 – 14.56 6.74 2.88 0.43<br />

Total<br />

polyph<strong>en</strong>ol<br />

index<br />

Reducing sugars<br />

(g l -1 )<br />

Lactic acid<br />

(g l -1 )<br />

Malic acid<br />

(g l -1 )<br />

Tartaric acid<br />

(g l -1 )<br />

Gluconic acid<br />

(g l -1 )<br />

Colour. Only<br />

red wines<br />

Tonality. Only<br />

red wines<br />

Total sulphur<br />

dioxide (mg l -1 )<br />

Free sulphur<br />

dioxide (mg l -1 )<br />

150 5.0-131.0 35.3 25.4 25 6.0 – 92.0 36.6 25.8 3.2<br />

150 0.65 – 9.78 2.19 1.24 25 0.85 – 14.3 2.86 3.39 0.12<br />

130 0.06 – 5.32 1.36 1.10 20 0.22 – 5.09 1.33 1.09 0.22<br />

130 0.03 – 1.83 0.77 0.49 20 0.19 – 1.79 0.80 0.50 0.10<br />

130 1.54 – 4.64 2.59 0.44 20 1.76 – 4.20 2.63 0.55 0.25<br />

130 0.06 – 1.80 0.63 0.48 20 0.06 – 1.85 0.73 0.65 0.16<br />

80 3.80 – 21.40 10.59 3.77 14 8.10 -16.10 11.25 2.77 1.48<br />

80 0.440 – 0.950 0.627 0.120 14 0.430 – 0.840 0.602 0.104 0.045<br />

150 16.0 – 149.0 59.9 35.4 25 19.0 – 204.0 69.3 43.0 13.3<br />

150 8.0 – 24.0 16.45 4.7 25 8.0 – 59.0 20.9 10.8 1.4<br />

the table, in addition to standard error<br />

laboratory (SEL). As can be se<strong>en</strong>, the<br />

range of refer<strong>en</strong>ce values <strong>en</strong>compass-<br />

SEL<br />

ses the characteristic values for a high<br />

diversity of wine. An exception is<br />

reducing sugars, whose values were


Anal. Chim. Acta 527 (2004) 81 Parte II, cap. 9<br />

only within the interval for dry and<br />

semi-dry wines but not for sweet<br />

wines.<br />

3.2. Spectral similarity<br />

After calculating individual RMS<br />

values for each sample, the RMScut off<br />

value obtained was 3200. Figure 1<br />

shows the evolution of this statistic<br />

parameter versus the sample number<br />

(no sample id<strong>en</strong>tifier). Four samples<br />

had an RMS value higher than the<br />

limit (samples that did not fulfill the<br />

spectral similarity control); thus, a<br />

third spectrum was collected for each<br />

outlier and the RMS values were<br />

recalculated using the two closer<br />

spectra and the remaining spectrum<br />

was deleted. This means that a<br />

spectrum of the three collected per<br />

sample was anomalous owing to<br />

operational errors. In this way the four<br />

samples had an RMS value lower than<br />

the upper limit.<br />

3.3. Spectral outliers<br />

After studying and controlling the<br />

spectral similarity within samples,<br />

similarity betwe<strong>en</strong> samples was<br />

studied with the aim of detecting<br />

spectral outliers regarding sample<br />

population. For this, the averaged<br />

spectrum per sample was considered<br />

(see Fig. 2). Significant differ<strong>en</strong>ces<br />

betwe<strong>en</strong> spectra in the regions 400-<br />

1000 nm and 1800-2000 nm can be<br />

observed. The figure also shows that<br />

one spectrum differs significantly<br />

from the rest of spectra.<br />

PCA was applied to the<br />

spectra. The samples plotted in the tridim<strong>en</strong>sional<br />

space formed by the first<br />

three principal compon<strong>en</strong>ts are shown<br />

in Fig. 3. Two groups can be<br />

distinguished: white wine samples are<br />

placed in a down plane and red wine<br />

samples are in a top swarm. Rosé<br />

wines (a small group) are located<br />

betwe<strong>en</strong> the other two groups, next to<br />

the plane corresponding to white<br />

wines. The spectrum far from the rest<br />

belongs to sample T075 in Fig. 2.<br />

Considering the above comm<strong>en</strong>ted,<br />

PCA and H Mahalanobis<br />

distance were computed for each of<br />

the two clear clusters in Fig. 3 —<br />

white and rosé wines were considered<br />

jointly—. Three spectra of red wines<br />

and one spectrum of white wine<br />

305


Manuel Urbano Cuadrado Tesis Doctoral<br />

306<br />

RMS values<br />

12000<br />

10000<br />

8000<br />

6000<br />

4000<br />

3200<br />

2000<br />

0<br />

B094<br />

T112<br />

0 30 60 90<br />

Samples<br />

120 150 180<br />

Fig. 1. RMS values versus sample number.<br />

Fig. 2. NIR spectra.<br />

T121<br />

T139


Anal. Chim. Acta 527 (2004) 81 Parte II, cap. 9<br />

Fig. 3. Samples in the space determined by the first three compon<strong>en</strong>ts.<br />

behaved as outliers.<br />

T<strong>en</strong> and twelve principal<br />

compon<strong>en</strong>ts were used for H distance<br />

calculation. The criterion to fix the<br />

number of compon<strong>en</strong>ts was to obtain<br />

an increm<strong>en</strong>t of explained variance<br />

lower than 0.25%. On the other hand,<br />

the sum of explained variance for<br />

each model was close to 100%.<br />

3.4. Equations developm<strong>en</strong>t<br />

3.4.1. Influ<strong>en</strong>ce of spectra preprocessing<br />

The results obtained, based on the<br />

statistic parameters described below,<br />

were similar indep<strong>en</strong>d<strong>en</strong>tly of the<br />

mathematical preprocessing employed.<br />

3.4.2. Equations calibration<br />

The cross validation procedure was<br />

used for equations calibration. The<br />

minimum value of SECV determined<br />

the number of PLS factors in each<br />

equation, thus avoiding overfitting<br />

problems. The values of R 2 and SECV<br />

indicated the precision achieved in<br />

calibration. The analytical quality of<br />

the equations will be studied in the<br />

subsequ<strong>en</strong>t step of validation. The<br />

criteria proposed by Sh<strong>en</strong>k et al.<br />

based on the values of R 2 and SECV<br />

[15] were employed in this section.<br />

307


Manuel Urbano Cuadrado Tesis Doctoral<br />

Thus, R 2 values higher than 0.90<br />

indicate excell<strong>en</strong>t precision, as well as<br />

SECV values lower than 1.5*SEL. R 2<br />

values betwe<strong>en</strong> 0.70-0.90 mean good<br />

precision, as do the SECV values<br />

betwe<strong>en</strong> 2-3*SEL. On the other hand,<br />

R 2 values lower than 0.70 indicate that<br />

the equation can only be used for<br />

scre<strong>en</strong>ing purposes, which <strong>en</strong>able<br />

distinction betwe<strong>en</strong> low, medium and<br />

high values for the measured<br />

parameter. If the R 2 value is lower<br />

than 0.50, the equation only discriminates<br />

high and low values.<br />

Table 3 shows the results<br />

obtained in equations calibration.<br />

Thus, the number of samples used<br />

after outliers removal (using the<br />

Stud<strong>en</strong>t test), number of PLS factors,<br />

mean, minimum, maximum, SECV<br />

and R 2 are summarised in this table.<br />

The best results were achieved for the<br />

determination of alcoholic degree and<br />

volumic mass, being the SECV values<br />

very close to those of the standard<br />

methods —namely 0.19 %V/V and<br />

0.33 kg l -1 for the determination of<br />

alcoholic degree and volumic mass,<br />

respectively—. The R 2 values for the<br />

correlation betwe<strong>en</strong> the refer<strong>en</strong>ce and<br />

308<br />

NIRS methods were 0.986 and 0.980<br />

for the determination of these two<br />

parameters.<br />

There are three parameters in<br />

wine related to acidity: total acidity,<br />

pH, and volatile acidity. The first two<br />

were determined with good precision<br />

(the SECV values were 0.38 meq l -1<br />

and 0.05 pH units, respectively). The<br />

model for the volatile acidity can be<br />

used only as scre<strong>en</strong>ing methodology<br />

to distinguish betwe<strong>en</strong> low and high<br />

values, according to the R 2 value<br />

(0.481). The SECV value was 0.09 g<br />

l -1 .<br />

Glycerol and polyph<strong>en</strong>ol total<br />

index (t.p.i) showed both good R 2<br />

values (0.936 and 0.975, respectively)<br />

and SECV values (0.59 g l -1 and 4.50,<br />

respectively). Thus, a good precision<br />

was also achieved.<br />

The results for reducing<br />

sugars (R 2 and SECV were 0.705 and<br />

0.27 g l -1 , respectively) were in betwe<strong>en</strong><br />

the values corresponding to the<br />

applicability into either determination<br />

or scre<strong>en</strong>ing.<br />

The applicability of NIRS to<br />

organic acids —lactic, malic, tartaric<br />

and gluconic— was limited to


Anal. Chim. Acta 527 (2004) 81 Parte II, cap. 9<br />

Table 3. Mean, minimum, maximum, SECV and R 2 in the calibration step<br />

PARAMETER N<br />

PLS<br />

factors<br />

MEAN MIN MAX SECV R2<br />

Alcoholic degree (%v/v) 140 7 12.07 9.69 15.18 0.19 0.986<br />

Volumic mass (kg l -1 ) 141 14 992.8 989.5 997.1 0.33 0.980<br />

Total acidity (meq l -1 ) 139 14 5.41 3.77 8.69 0.38 0.845<br />

pH (pH units) 143 10 3.64 3.28 4.03 0.05 0.905<br />

Volatile acidity (g l -1 ) 143 10 0.40 0.17 0.82 0.09 0.481<br />

Glycerol (g l -1 ) 139 12 6.27 2.43 12.51 0.59 0.936<br />

Total polyph<strong>en</strong>ol index 138 11 32.31 6.17 83.21 4.50 0.975<br />

Reducing sugars (g l -1 ) 140 12 1.95 0.81 3.07 0.27 0.705<br />

Lactic acid (g l -1 ) 125 12 1.38 0.11 5.41 0.35 0.860<br />

Malic acid (g l -1 ) 128 7 0.73 0.08 1.72 0.34 0.452<br />

Tartaric acid (g l -1 ) 126 8 2.59 1.32 3.54 0.23 0.544<br />

Gluconic acid (g l -1 ) 128 8 0.64 0.04 1.75 0.31 0.541<br />

Colour. Only red wines 75 7 10.29 4.18 22.8 1.52 0.820<br />

Tonality. Only red wines 74 7 0.60 0.42 0.95 0.05 0.781<br />

Total sulphur dioxide (mg l -1 ) 141 12 53.2 17.0 138.2 21.5 0.615<br />

scre<strong>en</strong>ing methodologies due to the<br />

low conc<strong>en</strong>tration of these compounds;<br />

except for lactic acid, with<br />

values of 0.860 and 0.35 g l -1 values<br />

for R 2 and SECV, respectively. Errors<br />

involved in the cross validation for<br />

malic, tartaric and gluconic acids were<br />

high (SECV values of 0.34, 0.23 and<br />

0.31 g l -1 for malic, tartaric and<br />

gluconic acids, respectively).<br />

With respect to colour and<br />

tonality parameters, the results obtained<br />

were acceptable. The standard<br />

methods for these parameters are<br />

309


Manuel Urbano Cuadrado Tesis Doctoral<br />

based on absorbance measurem<strong>en</strong>ts at<br />

established wavel<strong>en</strong>gths in the visible<br />

range. The spectral region was 400-<br />

2500 nm; thus, the visible spectrum<br />

was also tak<strong>en</strong> into account and, for<br />

this reason, good correlation betwe<strong>en</strong><br />

the refer<strong>en</strong>ce and NIRS methods was<br />

achieved. The wave- l<strong>en</strong>gth region<br />

longer than UV-VIS added to the<br />

spectrum a specific noise, which<br />

affected to R 2 and SECV values<br />

(0.820 and 1.52 for colour, and 0.781<br />

and 0.049 for tonality).<br />

Sulphur dioxide pres<strong>en</strong>t in<br />

wine is divided in two fractions: the<br />

free fraction and the combined<br />

fraction or sulphur dioxide bonded to<br />

diverse organic compon<strong>en</strong>ts. The<br />

model was not appropriate for the<br />

determination of the free fraction as<br />

the s<strong>en</strong>sitivity of NIRS is not high<br />

<strong>en</strong>ough; so the values of this<br />

parameter are not shown in Table 3,<br />

which lists that the model yielded<br />

acceptable statistic values (R 2 and<br />

SECV were 0.615 and 21.5 mg l -1 ,<br />

respectively) to distinguish low,<br />

medium and high values of total<br />

sulphur dioxide —that is, the sum of<br />

free and bonded sulphur dioxide—.<br />

310<br />

These results can be explained by<br />

both the highest conc<strong>en</strong>tration of<br />

combined sulphur dioxide and the<br />

suitability of NIRS for organic<br />

compounds.<br />

3.4.3. - Equations validation<br />

The equations were tested with the<br />

validation set consisting of samples<br />

not used for calibration. Table 4<br />

shows the number of samples used<br />

after removing outliers (from Stud<strong>en</strong>t<br />

test), mean, minimum, maximum,<br />

SEP, r 2 , slope and bias. These statistic<br />

parameters were used for evaluating<br />

the analytical quality of the equations.<br />

The values of slope and bias<br />

parameters were useful for distinguishing<br />

systematic errors and<br />

studying the correlation betwe<strong>en</strong> the<br />

refer<strong>en</strong>ce and NIRS methods. Slope<br />

and bias values were evaluated for<br />

testing if they are statistically equal to<br />

1 and 0, respectively. With this aim,<br />

the criteria proposed by the OIV [17]<br />

were used at a significance level of<br />

0.5 %. The range of non-significance<br />

is also shown in the slope and bias<br />

columns. Only the determination of<br />

volatile acidity (bias), and tartaric and


Anal. Chim. Acta 527 (2004) 81 Parte II, cap. 9<br />

Table 4. Correlation betwe<strong>en</strong> the refer<strong>en</strong>ce and NIR methods in the validation<br />

step<br />

Parameter N MEAN MIN MAX SEP R 2 SLOPE BIAS<br />

Alcoholic<br />

degree (%v/v)<br />

Volumic mass<br />

(kg l -1 )<br />

Total acidity<br />

(meq l -1 )<br />

24 12.27 10.08 15.36 0.24 0.978<br />

24 993.3 989.5 998.5 0.54 0.917<br />

24 5.68 4.12 8.65 0.48 0.812<br />

pH (pH units) 24 3.62 3.22 3.91 0.07 0.819<br />

Volatile acidity<br />

(g l -1 )<br />

24 0.44 0.25 0.72 0.14 0.345<br />

Glycerol (g l -1 ) 24 6.31 2.89 10.67 0.72 0.845<br />

Total<br />

polyph<strong>en</strong>ol<br />

index<br />

Reducing<br />

sugars (g l -1 )<br />

Lactic acid (g l -<br />

1 )<br />

Malic acid (g l -<br />

1 )<br />

Tartaric acid (g<br />

l -1 )<br />

Gluconic acid<br />

(g l -1 )<br />

Colour. Only<br />

red wines<br />

Tonality. Only<br />

red wines<br />

Total sulphur<br />

dioxide (mg l -1 )<br />

24 32.14 5.54 67.14 6.70 0.919<br />

23 1.86 1.37 2.65 0.33 0.712<br />

19 1.40 0.03 2.87 0.41 0.814<br />

19 0.73 0.33 1.17 0.36 0.441<br />

19 2.55 2.19 3.61 0.39 0.428<br />

19 0.72 0.07 1.82 0.38 0.498<br />

14 10.57 7.90 13.71 1.83 0.705<br />

14 0.65 0.45 0.83 0.06 0.729<br />

23 63.16 23.24 112.11 23.5 0.569<br />

gluconic acids (slope) yielded values<br />

out of the limits. These values are<br />

bolded in Table 4.<br />

Although almost all slope and<br />

bias values were within the nonsignificance<br />

range, this was wider for<br />

0.971<br />

(0.969 – 1.031)<br />

1.001<br />

(0.973 – 1.027)<br />

0.986<br />

(0.789 – 1.211)<br />

0.989<br />

(0.916 – 1.084)<br />

0.730<br />

(0.582 – 1.418)<br />

0.871<br />

(0.710 – 1.290)<br />

0.918<br />

(0.894 – 1.106)<br />

0.983<br />

(0.929 – 1.071)<br />

0.941<br />

(0.847 – 1.143)<br />

0.910<br />

(0.682 – 1.318)<br />

0.675<br />

(0.754 – 1.246)<br />

0.701<br />

(0.809 – 1.191)<br />

0.807<br />

(0.725 – 1.275)<br />

0.95<br />

(0.925 – 1.075)<br />

0.845<br />

(0.698 – 1.302)<br />

0.04<br />

(-0.10 – 0.10)<br />

-0.09<br />

(-0.30 – 0.30)<br />

0.09<br />

(-0.21 – 0.21)<br />

-0.02<br />

(-0.03 – 0.03)<br />

0.12<br />

(-0.08 – 0.08)<br />

-0.29<br />

(-0.32 – 0.32)<br />

-2.15<br />

(-2.83 – 2.83)<br />

0.12<br />

(-0.14 – 0.14)<br />

-0.05<br />

(-0.20 – 0.20)<br />

0.03<br />

(-0.16 – 0.16)<br />

-0.09<br />

(-0.17 – 0.17)<br />

0.13<br />

(-0.15-0.15)<br />

-0.91<br />

(-1.07 – 1.07)<br />

0.06<br />

(-0.08 – 0.08)<br />

1.62<br />

(-8.24 – 8.24)<br />

parameters with r 2 and SEP values<br />

which only <strong>en</strong>able scre<strong>en</strong>ing (namely,<br />

volatile acidity, tartaric and gluconic<br />

acids and total sulphur dioxide). The<br />

slopes for correlation were always<br />

lower than 1, but for volumic mass.<br />

311


Manuel Urbano Cuadrado Tesis Doctoral<br />

This means that the NIRS values are<br />

systematically higher than those<br />

obtained by the refer<strong>en</strong>ce methods,<br />

taking into account that the NIRS<br />

values correspond to abcisas axis in<br />

correlation plots.<br />

On the other hand, almost all<br />

the SEP values in the external<br />

validation were within the limit value<br />

—SEP = 1.5*SECV—. Only the<br />

validation of volumic mass and<br />

tartaric acid yielded SEP values<br />

slightly upper the limit; thus, the<br />

equations developed were robust.<br />

3.4.4. Comparison with the results<br />

obtained by other authors<br />

The determination of alcoholic<br />

degree, volumic mass, pH and<br />

glycerol yielded R 2 , SECV and SEP<br />

values close to the values in the<br />

literature [11-13]. The error obtained<br />

in the determination of sugars and<br />

colour was higher [11,13], but a<br />

variety of both apellation d’origine<br />

and types of wines were used for<br />

establishing the equations with the<br />

aim of obtaining a g<strong>en</strong>eral approach.<br />

The determination of organic acids,<br />

312<br />

volatile acidity, total acidity, t.p.i. and<br />

total sulphur dioxide had not be<strong>en</strong><br />

reported previously.<br />

4. Conclusions<br />

The applicability of NIRS to the<br />

evaluation of 16 <strong>en</strong>ological parameters<br />

in wine has be<strong>en</strong> studied in this<br />

work. The results have be<strong>en</strong> compared<br />

with the values obtained by other<br />

authors, wh<strong>en</strong> available and quite<br />

similar values were obtained in spite<br />

of the fact the calibration and<br />

validation sets were more heterog<strong>en</strong>eous<br />

than those involved previous<br />

approaches [11-13]. Thus, the<br />

calibration and validation of the<br />

equations were carried out with a<br />

variety of both apellation d’origine<br />

and types of wines. The final<br />

equations were developed for the<br />

determination of 15 parameters.<br />

Thus, the most remarkable<br />

aspects of this work are the evaluation<br />

of the applicability of NIRS to the<br />

quantitative analysis in a wide variety<br />

of wines and the high number of<br />

<strong>en</strong>ological parameters which can be<br />

determined.


Anal. Chim. Acta 527 (2004) 81 Parte II, cap. 9<br />

Acknowledgem<strong>en</strong>t<br />

The Comisión Interministerial de<br />

Ci<strong>en</strong>cia y Tecnología (CICyT) is<br />

thanked for financial support (Project<br />

AGL2000-0321-P4-03).<br />

Refer<strong>en</strong>ces<br />

[1] Q.J. Wang, H. Yu, H. Li, F. Ding,<br />

P.G. He, Y.Z. Fang, Food Chem.<br />

83 (2003) 311.<br />

[2] M. Bonoli, M. Montanucci, T.G.<br />

Toschi, G. Lercker, J. Chromatogr.<br />

A 1011 (2003) 163.<br />

[4] G. Álvarez Llamas, M.D.R.<br />

Fernández de la Campa, A. Sanz<br />

Medel, J. Anal. Atom. Spectrom.<br />

18 (2003) 460.<br />

[5] F.M. P<strong>en</strong>nebaker, M.B. D<strong>en</strong>ton,<br />

Appl. Spectrosc. 55 (2001) 504.<br />

[6] A. K. Kupina, A. Shrikhande, J.<br />

Amer. J. Enol. Viticult. 54 (2003)<br />

131.<br />

[7] M. Dubernet, M. Dubernet, Revue<br />

Française d’O<strong>en</strong>ologie, 81 (2000)<br />

10.<br />

[8] E. Albanell, G. Caja, X. Such, M.<br />

Rovai, A.A.K. Salama, R. Casals,<br />

J. AOAC Internat. 86 (2003) 746.<br />

[9] F.E. Barton, D.E. Akin, W.H.<br />

Morrison, A. Ulrich, D.D. Archibald,<br />

J. Agric Food Chem. 50<br />

(2002) 7576.<br />

[10] Y. Li, C. Brown, J. Near<br />

Infrared Spectrosc. 7 (1999)<br />

101.<br />

[11] C.M. García-Jares, B. Medina,<br />

Fres<strong>en</strong>. J. Anal. Chem. 357<br />

(1997) 86.<br />

[12] R. Eberl, J. Near Infrared<br />

Spectrosc. 6 (1998) 133.<br />

[13] M. Gish<strong>en</strong>, R.G. Dambergs, A.<br />

Kambouris, M. Kwiatkowski,<br />

W.U. Cynkar, P.B. Høj, I.L.<br />

Francis, Proceedings of the 9 th<br />

International Confer<strong>en</strong>ce on<br />

Near Infrared Spectroscopy<br />

1999, 917.<br />

[14] J.S. Sh<strong>en</strong>k, M.O. Westerhaus,<br />

Routine Operation, Calibration,<br />

Developm<strong>en</strong>t, and Network<br />

System Managem<strong>en</strong>t Manual,<br />

NIRSystems Inc., Silver Spring,<br />

MD, USA, 1995.<br />

313


Manuel Urbano Cuadrado Tesis Doctoral<br />

[15] J.S. Sh<strong>en</strong>k, M.O. Westerhaus,<br />

Calibration the ISI way. In Near<br />

Infrared Spectroscopy: the<br />

Future Waves, NIR Publications,<br />

p.198-202, Chichester,<br />

1996<br />

[16] B.G.M. Vandeginst<strong>en</strong>, D.L.<br />

Massart, S. Buyd<strong>en</strong>s, S. De<br />

Jong, P.J. Lewi, J. Smeyers-<br />

Verbeke, Handbook of Chemometrics<br />

and Qualimetrics: Part<br />

B, Elsevier, Amsterdam, 1998.<br />

[17] Resolution OENO 6/99.<br />

Validation Protocol for a<br />

Typical Analytical Method<br />

Compared to the OIV Refer<strong>en</strong>ce<br />

Method. Office International de<br />

la Vigne te du Vin.<br />

http://www.oiv.int/Database/Im<br />

ages/Cli<strong>en</strong>t/o<strong>en</strong>o699uk.doc<br />

314


Capítulo 10<br />

COMPARISON AND JOINT USE OF<br />

NEAR INFRARED SPECTROSCOPY<br />

AND FOURIER TRANSFORM MID<br />

INFRARED SPECTROSCOPY FOR<br />

THE DETERMINATION OF WINE<br />

PARAMETERS<br />

El cont<strong>en</strong>ido de este capítulo ha sido aceptado para su publicación <strong>en</strong> la revista<br />

Talanta.


Talanta. XX (2005) XX Parte II, cap.10<br />

COMPARISON AND JOINT USE OF NEAR INFRARED<br />

SPECTROSCOPY AND FOURIER TRANSFORM MID INFRARED<br />

SPECTROSCOPY FOR THE DETERMINATION OF WINE<br />

PARAMETERS<br />

M. Urbano Cuadrado, M. D. Luque de Castro, P. M. Pérez Juan, M. A. Gómez-<br />

Nieto<br />

Abstract<br />

A study of the statistic characteristics of the multidetermination of<br />

several <strong>en</strong>ological parameters —namely, alcoholic degree, volumic mass, total<br />

acidity, glycerol, total polyph<strong>en</strong>ol index, lactic acid and total sulphur dioxide—,<br />

dep<strong>en</strong>ding on the spectroscopic zone employed, was carried out. The two<br />

techniques used were Near Infrared Spectroscopy (NIRS) and Fourier Transform<br />

Mid Infrared Spectroscopy (FT-MIRS). The combination of these two regions<br />

(sum of their spectra) was also studied. NIRS yielded better results, but the use of<br />

both zones improved the determination of glycerol and total sulphur dioxide. The<br />

training and validation sets used for developing g<strong>en</strong>eral equations were built with<br />

samples from differ<strong>en</strong>t apellation d’origine, differ<strong>en</strong>t wine types, etc. Partial least<br />

squares regression was used for multivariate calibration, using systematic cross<br />

validation in the calibration stage and external validation in the testing stage.<br />

Sample preparation was not required.<br />

Keywords: Near infrared spectroscopy; Att<strong>en</strong>uated total reflection mid infrared;<br />

Wineries; Multivariate calibration.<br />

317


Manuel Urbano Cuadrado Tesis Doctoral<br />

1. Introduction<br />

One of the last tr<strong>en</strong>ds in analytical<br />

chemistry is aimed at short<strong>en</strong>ing the<br />

time required for a giv<strong>en</strong> analysis and<br />

subsequ<strong>en</strong>t availability of the pursued<br />

information in a short time. This goal<br />

is so far achieved by differ<strong>en</strong>t ways;<br />

namely, the reduction and simplification<br />

of the steps involved in sample<br />

preparation [1,2], the rec<strong>en</strong>t advances<br />

in automation and instrum<strong>en</strong>tation [3-<br />

5], the developm<strong>en</strong>t of qualitative and<br />

scre<strong>en</strong>ing methodologies [6,7], the<br />

higher use of chemometrics thanks to<br />

advances in computers [8,9], etc.<br />

In the food area, and<br />

specifically in the wine industry, the<br />

above comm<strong>en</strong>ted ways have also<br />

be<strong>en</strong> used in order to obtain fast<br />

information about the production<br />

process. Several methods based on<br />

Flow Injection (FI) have be<strong>en</strong> developped<br />

in order to automate and<br />

reduce the complexity of some<br />

official methods in wine laboratories.<br />

Thus, parameters as ethanol, glycerol,<br />

total and free sulphur dioxide, etc [10-<br />

11]. can be determined by FI methods.<br />

318<br />

Chemometrics in wine pro-<br />

duction and laboratory is widely<br />

refer<strong>en</strong>ced in the literature from<br />

several points of view. Thus, supervised<br />

and non-supervised pattern<br />

recognition techniques have be<strong>en</strong> used<br />

to distinguish differ<strong>en</strong>t varieties,<br />

geographical areas, elaboration processses,<br />

etc. Variables used for<br />

differ<strong>en</strong>tiating can be classified into<br />

non-spectroscopic and spectroscopic<br />

variables[12-14]. Concerning the latter,<br />

the spectra obtained, g<strong>en</strong>erally in<br />

few seconds, by spectroscopic<br />

techniques —namely, Near Infrared<br />

Reflectance Spectroscopy (NIRS),<br />

Fourier Transform Mid Infrared<br />

Spectroscopy (FT-MIRS), Ultraviolet-<br />

Visible Spectroscopy (UV-VISS),<br />

Nuclear Magnetic Resonance (NMR),<br />

etc.— constitute large data sets which<br />

contain hidd<strong>en</strong> information. Multivariate<br />

regression, such as Principal<br />

Compon<strong>en</strong>t Regression (PCR) and<br />

Partial Least Squares Regression<br />

(PLSR) are standards in chemometrics,<br />

which has be<strong>en</strong> used for<br />

developing equations for the<br />

determination of quantitative parameters<br />

in wine and other food industries<br />

using the data provided by the


Talanta. XX (2005) XX Parte II, cap.10<br />

spectroscopic techniques above cited.<br />

Approaches based on NIRS are the<br />

most used for the determination of<br />

differ<strong>en</strong>t analytes; namely, ethanol,<br />

glycerol, sugars, [15,16] etc. FT-IR<br />

applications for wine analyses have<br />

also be<strong>en</strong> developed [17,18].<br />

Here, the applicability of both<br />

NIRS and FT-MIRS techniques to the<br />

determination of several <strong>en</strong>ological<br />

parameters —alcoholic degree, volumic<br />

mass, total acidity, glycerol,<br />

total polyph<strong>en</strong>ol index, lactic acid and<br />

total sulphur dioxide— is studied in<br />

wines from both several appellations<br />

d’origine and differ<strong>en</strong>t grape varieties.<br />

The aim of this study is the<br />

developm<strong>en</strong>t of equations indep<strong>en</strong>d<strong>en</strong>t<br />

of the type of wine. In<br />

addition, the joint use of spectral<br />

regions of shorter wavel<strong>en</strong>gth for<br />

improving the statistic parameters of<br />

the calibrations is discussed for the<br />

first time.<br />

2. Experim<strong>en</strong>tal<br />

2.1. Samples and sample preparation<br />

Differ<strong>en</strong>t wines —including red, rosé<br />

and white wines; young and aged<br />

wines; wines from differ<strong>en</strong>t apellation<br />

d’origine (“La Mancha”, “Valdepeñas”,<br />

“Jumilla”, “Navarra”,<br />

“Alicante” and “Madrid”) and grape<br />

varieties (“C<strong>en</strong>cibel”, “Cabernet Sau<br />

vignon”, “C<strong>en</strong>cibel-Cabernet Sauvig<br />

non”, “Merlot”, “Garnacha Tintorera”<br />

and “Syrah”)— were used in the<br />

pres<strong>en</strong>t study. Thus, the number of<br />

samples employed in the calibration<br />

and validation steps was 180. The<br />

samples were used as such, because<br />

filtering, dilution, preconc<strong>en</strong>tration,<br />

interfer<strong>en</strong>ts removal, etc. were not<br />

required.<br />

2.2. Apparatus and methods<br />

The instrum<strong>en</strong>t employed for NIR<br />

spectra collection was a Foss-NIR<br />

Systems 6500 System II spectrophotometer<br />

(Foss-NIRSystems Inc.,<br />

Silver Spring, MD, USA) equipped<br />

with a transport module and capable<br />

of making measurem<strong>en</strong>ts at 2 nm<br />

resolution in the spectral range<br />

covering 400-2500 nm. The samples<br />

were analysed by folded transmission<br />

using a ring cup with a 0.1 mm<br />

pathl<strong>en</strong>gth. A diffuse reflecting gold<br />

surface placed at the bottom of the<br />

319


Manuel Urbano Cuadrado Tesis Doctoral<br />

cup reflected the radiation back<br />

through the sample to the reflectance<br />

detector. The spectra were collected<br />

using WinISI software 1.50 (Infrasoft<br />

International, Port Matilda, PA,<br />

USA). Before recording the spectra,<br />

the samples were thermostated at<br />

24ºC. The reflectance spectra (log1/R)<br />

were collected in duplicate.<br />

The instrum<strong>en</strong>t employed for<br />

MIR spectra collection was an FT-<br />

MIR Nicolet Magna-IR550 Serie II<br />

(Nicolet Instrum<strong>en</strong>t Corp., Madison,<br />

Wisconsin, USA), capable of making<br />

measurem<strong>en</strong>ts at 4 cm -1 resolution in<br />

the spectral range covering 4000-400<br />

cm -1 . The instrum<strong>en</strong>t was furnished<br />

with an infrared att<strong>en</strong>uated total<br />

reflection (ATR) solid, liquid and<br />

mellow sample cell with a zinc<br />

sel<strong>en</strong>ide crystal (Spectra Tech.,<br />

Stamford, CT, USA) for Nicolet<br />

Spectrometers. The ATR cell consists<br />

of the following: base accessory unit<br />

containing the mirrors to direct the IR<br />

beam to and from the sampling plate;<br />

a sampling plate containing the ZnSe<br />

ATR crystal and; precision single or<br />

dual readout controller.<br />

Other characteristics were a<br />

320<br />

transmission range betwe<strong>en</strong> 20000<br />

and 650 cm -1 , a refractive index (at<br />

1000 cm -1 ) of 2.4, d<strong>en</strong>sity of 5,27 g<br />

cm -3 and volume of 3.5 ml. Before<br />

recording the spectra, the samples<br />

were thermostated at 24ºC. The<br />

reflectance spectra (log1/R) were<br />

collected in duplicate.<br />

On the other hand, the<br />

samples were also analysed in<br />

duplicate by the refer<strong>en</strong>ce methods,<br />

and standard error laboratory (SEL)<br />

was estimated from the duplicates.<br />

The refer<strong>en</strong>ce methods used are<br />

shown in Table 1.<br />

2.3. Chemometric software for data<br />

processing and statistical techniques<br />

used<br />

The Unscrambler 7.8 (Camo Process<br />

AS, Oslo, Norway) was used for data<br />

processing. The chemometric procedure<br />

consists of the following steps:<br />

2.3.1. Principal Compon<strong>en</strong>ts Analysis<br />

(PCA) for visualisation of spectral<br />

outliers<br />

PCA [19] was required for the<br />

reduction of the number of variables<br />

showing co-linearity, thus repre-


Talanta. XX (2005) XX Parte II, cap.10<br />

Table 1. Enological parameters and refer<strong>en</strong>ce methods.<br />

Parameter Refer<strong>en</strong>ce method<br />

Alcoholic degree Distillation and aerometry<br />

Volumic mass Aerometry<br />

Total acidity Titration with NaOH up to pH = 7.0<br />

Glycerol Enzymatic reaction<br />

Total polyph<strong>en</strong>ol index Folin-Ciocalteu reag<strong>en</strong>t in alkaline medium<br />

Lactic acid High pressure liquid chromatography<br />

Free sulphur dioxide Iodometry in acid medium<br />

s<strong>en</strong>ting the samples in a new, reduced<br />

n-dim<strong>en</strong>sional space. Once the<br />

samples were in the new space<br />

defined by principal compon<strong>en</strong>ts, the<br />

leverage value —a measure of how<br />

far an object is compared to the<br />

majority— was computed. Sample<br />

spectra with leverage higher than 0.5<br />

were considered outliers. The outliers<br />

were examined in order to know if<br />

either they provided any useful<br />

information or they must be removed.<br />

2.3.2. Spectra preprocessing<br />

Differ<strong>en</strong>t treatm<strong>en</strong>ts were applied to<br />

the spectra in the calibration and<br />

validation steps, namely: data<br />

c<strong>en</strong>tring, scatter correction, first<br />

derivative, and some of them jointly.<br />

2.3.4. Calibration<br />

validation<br />

step: cross<br />

In this step, Partial Least Square<br />

Regression (PLSR) [19,20] was used<br />

for developing the equations. The<br />

number of calibration groups and<br />

maximum number of PLS factors<br />

were set at 5 and 16, respectively. The<br />

latter is based on the following rule:<br />

one PLS factor per 10 samples of the<br />

training set plus 2. On the other hand,<br />

a study of possible outliers in the<br />

prediction of the cross validation was<br />

carried out taking into account the<br />

321


Manuel Urbano Cuadrado Tesis Doctoral<br />

Table 2. Refer<strong>en</strong>ce data.<br />

Parameter<br />

Alcoholic<br />

degree (%V/V)<br />

Volumic mass<br />

(Kg/L)<br />

Total acidity<br />

(meq/L)<br />

322<br />

Calibration set Validation set<br />

N Range Mean SD. N Range Mean SD<br />

150 9.58 – 15.15 12.14 1.24 25 10.13 – 14.96 12.26 1.37 0.19<br />

150<br />

989.5 –<br />

999.3<br />

992.9 2.1 25 990.4 – 999.4 993.5 2.4 0.4<br />

150 3.55 – 8.72 5.42 0.92 25 4.15 – 8.69 5.70 1.09 0.35<br />

Glycerol (g/L) 150 1.95 – 12.38 6.29 2.47 25 2.57 – 14.56 6.74 2.88 0.43<br />

Total<br />

polyph<strong>en</strong>ol<br />

index<br />

Lactic acid<br />

(g/L)<br />

Free sulphur<br />

dioxide (mg/L)<br />

150 5.0-131.0 35.3 25.4 25 6.0 – 92.0 36.6 25.8 3.2<br />

130 0.06 – 5.32 1.36 1.10 20 0.22 – 5.09 1.33 1.09 0.22<br />

150 8.0 – 24.0 16.45 4.7 25 8.0 – 59.0 20.9 10.8 1.4<br />

statistic t (Stud<strong>en</strong>t’s test) parameter,<br />

which was set at 2.50. Statistic<br />

parameters as Standard Error Cross<br />

Validation (SECV) and the<br />

Determination Coeffici<strong>en</strong>t (R 2 ) were<br />

employed.<br />

2.3.5. Validation step<br />

The validation set was introduced in<br />

the model, thus statistic parameters as<br />

Standard Error Prediction (SEP) and<br />

r 2 were obtained. The procedure<br />

SEL<br />

above comm<strong>en</strong>ted was applied to the<br />

spectral data from the NIR and the<br />

MIR zones and a combination of both.<br />

3. Results and discussion<br />

3.1. Refer<strong>en</strong>ce data<br />

Table 2 shows information about<br />

refer<strong>en</strong>ce data. Thus, the range, mean,<br />

standard deviation (Std. Dev.) and<br />

number of samples for the calibration<br />

and validation sets are summarised in


Talanta. XX (2005) XX Parte II, cap.10<br />

A<br />

B<br />

Fig. 1. (A) NIR spectra. (B) MIR spectra.<br />

323


Manuel Urbano Cuadrado Tesis Doctoral<br />

C<br />

324<br />

Fig. 1. (cont.). (C) Combination of NIR and MIR spectra.<br />

the table, in addition to the standard<br />

error laboratory (SEL). As can be<br />

se<strong>en</strong>, the range of refer<strong>en</strong>ce values<br />

<strong>en</strong>compassed the characteristic values<br />

for a high diversity of wines.<br />

3.2. Sample spectra<br />

Spectra in the whole measurem<strong>en</strong>t<br />

range provided by the NIR instrum<strong>en</strong>t;<br />

that is, 400-2500 nm were<br />

obtained. Nevertheless, the zone of<br />

the MIR spectra used was only the<br />

800-3000 cm -1 region; thus, the 400-<br />

800 and 3000-4000 cm -1 zones were<br />

not employed in this study owing to<br />

the high irreproducibility because of<br />

the high absorbance values. NIR and<br />

MIR spectra are shown in Fig. 1-A<br />

and Fig. 1-B, respectively. The<br />

highest differ<strong>en</strong>ces in the NIR spectra<br />

were within 400-1100 and 1910-1960<br />

nm, while the MIR spectra pres<strong>en</strong>ted<br />

the largest differ<strong>en</strong>ces in the 1000-<br />

1500 and 2300-2400 cm -1 regions.<br />

The combination of the NIR and MIR<br />

spectra is shown in Fig. 1-C.<br />

In the NIR zone, the absorption<br />

bands with the highest int<strong>en</strong>sity


Talanta. XX (2005) XX Parte II, cap.10<br />

Fig. 2. Samples in the space determined by the first two principal compon<strong>en</strong>ts for<br />

the NIR region.<br />

—namely, 1820-2030 and 1370-1600<br />

nm— are second and first harmonics,<br />

respectively, of the MIR absorption<br />

band corresponding to the str<strong>en</strong>gth<br />

vibration of the –OH group. The<br />

fundam<strong>en</strong>tal vibration band corresponding<br />

to this group is at 3300-3500<br />

cm -1 , which was not used owing to the<br />

high irreproducibility, as comm<strong>en</strong>ted<br />

before.<br />

3.3. Spectral Outliers<br />

PCA was applied to the three data<br />

matrixes corresponding to the sample<br />

spectra for NIR, MIR and their<br />

combination. The leverage values<br />

were calculated in order to detect<br />

spectral outliers. Four and three<br />

spectra were outliers for NIR and<br />

MIR, respectively. These spectral<br />

outliers were not common for the two<br />

regions; which can be due to<br />

operational errors. With respect to the<br />

combination of the two zones, only<br />

two spectra were computed as<br />

outliers. The samples plotted in the bidim<strong>en</strong>sional<br />

space formed by the first<br />

two principal compon<strong>en</strong>ts for the NIR<br />

region are shown in Fig. 2. The<br />

outliers are within circles. Two groups<br />

can also be distinguished: white wine<br />

are in the left side and red wines in<br />

325


Manuel Urbano Cuadrado Tesis Doctoral<br />

326<br />

Table 3. Results obtained with the proposed equations.<br />

Parameter Spectrum<br />

Alcoholic degree<br />

(%V/V)<br />

Volumic mass<br />

(Kg/L)<br />

Total acidity<br />

(meq/L)<br />

Glycerol (g/L)<br />

Total polyph<strong>en</strong>ol<br />

index<br />

Lactic acid (g/L)<br />

Calibration equation<br />

Validation<br />

equation<br />

N MEAN SECV R 2 r 2 SEP<br />

NIR 140 12.07 0.19 0.986 0.978 0.24<br />

MIR 140 12.11 0.23 0.972 0.961 0.29<br />

NIR-MIR 138 12.07 0.20 0.980 0.953 0.35<br />

NIR 141 992.8 0.33 0.980 0.917 0.54<br />

MIR 139 992.7 0.42 0.961 0.912 0.60<br />

NIR-MIR 142 992.8 0.40 0.967 0.901 0.63<br />

NIR 139 5.41 0.38 0.845 0.812 0.48<br />

MIR 140 5.52 0.45 0.837 0.795 0.54<br />

NIR-MIR 139 5.47 0.43 0.841 0.814 0.49<br />

NIR 139 6.27 0.59 0.936 0.845 0.72<br />

MIR 140 6.33 0.55 0.940 0.813 0.68<br />

NIR-MIR 140 6.33 0.50 0.954 0.926 0.57<br />

NIR 138 32.31 4.50 0.975 0.919 6.70<br />

MIR 139 32.10 4.70 0.937 0.892 7.13<br />

NIR-MIR 141 32.05 4.83 0.914 0.890 7.24<br />

NIR 125 1.38 0.35 0.860 0.814 0.41<br />

MIR 123 1.36 0.42 0.825 0.790 0.55<br />

NIR-MIR 122 1.35 0.37 0.871 0.811 0.52


Talanta. XX (2005) XX Parte II, cap.10<br />

Table 3 (cont.). Results obtained with the proposed equations.<br />

Parameter Spectrum<br />

Total sulphur<br />

dioxide (mg/L)<br />

Calibration equation<br />

Validation<br />

equation<br />

N MEAN SECV R 2 r 2 SEP<br />

NIR 141 53.2 21.5 0.615 0.569 23.5<br />

MIR 140 52.3 24.3 0.573 0.520 27.0<br />

NIR-MIR 138 52.7 19.0 0.765 0.670 22.7<br />

the right. Rosé wines (a small group)<br />

are located betwe<strong>en</strong> the other two<br />

groups, next to white wines.<br />

3.4. Equations Developm<strong>en</strong>t<br />

3.4.1. Influ<strong>en</strong>ce of the spectra<br />

preprocessing<br />

Accuracy and precision, based on<br />

SECV and R 2 values, were similar,<br />

indep<strong>en</strong>d<strong>en</strong>tly of the mathematical<br />

preprocessing employed.<br />

3.4.2. Equations accuracy<br />

Table 3 shows the statistic results<br />

obtained in the calibration and<br />

external validation stages (SECV and<br />

R 2 ). Table IV summarises the criteria<br />

proposed by Sh<strong>en</strong>k et al. 21 to compare<br />

statistic results from calibrations and<br />

the subsequ<strong>en</strong>t validations. NIRS<br />

provided the best statistic results for<br />

alcoholic degree and volumic mass,<br />

being the SECV values very close to<br />

those of the standard methods —<br />

namely 0.19 % V/V and 0.33 Kg/L<br />

for the determination of alcoholic<br />

degree and volumic mass, respectively—.<br />

The R 2 values for the<br />

correlation betwe<strong>en</strong> the refer<strong>en</strong>ce and<br />

NIRS methods were 0.986 and 0.980,<br />

respectively, for the determination of<br />

these parameters. The use of the MIR<br />

region did not improve the results, as<br />

did the combination of both zones.<br />

Total acidity was determined<br />

with good precision (the SECV and<br />

R 2 values were 0.38 meq/L and 0.845,<br />

respectively) by NIRS. The determination<br />

of this parameter by FT-MIR<br />

showed statistic results similar to<br />

327


Manuel Urbano Cuadrado Tesis Doctoral<br />

328<br />

Table 4. Criteria for the evaluation of the results.<br />

R 2 SEP<br />

R 2 ≥ 0.90 Excell<strong>en</strong>t precision SEP = 1-1.5 SEL Excell<strong>en</strong>t precision<br />

R 2 = 0.70 – 0.89 Good precision SEP = 2-3 SEL Good precision<br />

R 2 = 0.50 – 0.69<br />

R 2 = 0.30 – 0.49<br />

R 2 = 0.05 – 0.29<br />

Good separation<br />

betwe<strong>en</strong> low, medium,<br />

and high values<br />

Correct separation<br />

betwe<strong>en</strong> low and high<br />

values<br />

It is better than no<br />

analysing<br />

NIRS (0.45 meq/L and 0.837), but not<br />

surpassed the effici<strong>en</strong>cy of the NIR<br />

region. The determination of polyph<strong>en</strong>ol<br />

total index also yielded similar<br />

values by the two procedures proposed,<br />

as can be se<strong>en</strong> in Table 3.<br />

Glycerol and total sulphur<br />

dioxide were determined by the<br />

combination of MIR and NIR regions<br />

in a more accurate way than by either<br />

NIR or MIR separately. It is worth to<br />

emphasising the improvem<strong>en</strong>t achieved<br />

for the determination of total<br />

sulphur dioxide —taking into account<br />

SEP = 4 SEL Medium precision<br />

SEP = 5 SEL Low precision<br />

the R 2 values, from 0.615 by NIR to<br />

0.765— by the combination of the<br />

two zones studied. In this way, this<br />

parameter can thus be quantitatively<br />

determined, according to the criteria<br />

showed in Table 4.<br />

The applicability of NIRS to<br />

the most repres<strong>en</strong>tative organic acids<br />

—namely, malic, tartaric and gluconic—<br />

was limited to scre<strong>en</strong>ing<br />

methodologies owing to the low<br />

conc<strong>en</strong>tration of these compounds.<br />

For this reason, these parameters are<br />

not shown in the tables. Only the


Talanta. XX (2005) XX Parte II, cap.10<br />

determination of lactic acid, with<br />

values of R 2 higher than 0.800 and<br />

SECV values acceptable —according<br />

to the criteria shown in Table 4—<br />

with respect to SEL value in Table 2.<br />

3.4.3. External validation<br />

The equations were tested with the<br />

validation set (samples not used for<br />

the developm<strong>en</strong>t of the equations).<br />

Almost all the SEP values in the<br />

external validation were within the<br />

limit value —SEP = 1.5*SECV—.<br />

Only the validation of volumic mass<br />

yielded an SEP value slightly upper<br />

the limit; thus, the equations<br />

developed were robust.<br />

3.4.4. Comparison betwe<strong>en</strong> the spec<br />

tral zones employed<br />

The determinations carried out using<br />

the NIR region yielded g<strong>en</strong>erally<br />

better statistic results than those using<br />

the MIR region. This behaviour is due<br />

to the low signal/noise ratio in the<br />

MIR spectra caused by both<br />

instrum<strong>en</strong>tal and technical characteristics<br />

and the high int<strong>en</strong>sity of the<br />

absorption bands corresponding to the<br />

str<strong>en</strong>gth vibration of the –OH group.<br />

In spite of the best effici<strong>en</strong>cy of<br />

NIRS, drastic differ<strong>en</strong>ces were not<br />

found.<br />

The combination of the two<br />

spectral zones improved the determination<br />

for glycerol and total<br />

sulphur dioxide. This combination is<br />

particularly useful for the later as it<br />

provides a quantitative method and<br />

not a scre<strong>en</strong>ing method as occurs<br />

wh<strong>en</strong> the spectral regions are used<br />

separately. The use of a larger dataset<br />

by combination of the two spectral<br />

zones (2100 variables) surpasses<br />

results obtained from the data of the<br />

MIR region.<br />

4. Conclusions<br />

A study of the applicability of the<br />

spectroscopic techniques in the near<br />

and mid infrared zones to the<br />

determination of wine parameters has<br />

be<strong>en</strong> studied in this work. Thus, the<br />

spectroscopic methods developed<br />

<strong>en</strong>able multidetermination for alcoholic<br />

degree, volumic mass, total<br />

acidity, total polyph<strong>en</strong>ol index,<br />

glycerol and total sulphur dioxide,<br />

surpassing the limitations of standard<br />

and refer<strong>en</strong>ce methods regarding to<br />

329


Manuel Urbano Cuadrado Tesis Doctoral<br />

time, reag<strong>en</strong>t consumption, operational<br />

errors, etc.<br />

The simplicity of the methods<br />

developed is similar for both spectral<br />

regions. The calibration stage, and<br />

developm<strong>en</strong>t of the equations is the<br />

limiting step taking into account the<br />

time necessary for calibration. After<br />

this step, the determination of the<br />

parameters in a single analysis is<br />

carried out in 2 min. In addition, the<br />

equations were developed with the<br />

aim of covering a wide range of<br />

wines; for which wines from differ<strong>en</strong>t<br />

appellation d’origine and grape<br />

varieties were used.<br />

The study carried out shows<br />

that NIRS results were better than<br />

those obtained by FT-MIR due to the<br />

high signal/noise ratio of the latter. In<br />

addition, the combination of both<br />

spectral zones has be<strong>en</strong> studied for the<br />

first time. The availability of a larger<br />

number of variables (wavel<strong>en</strong>gths)<br />

than wh<strong>en</strong> used separately surpasses<br />

the noise of MIR spectra for two<br />

parameters; namely, glycerol and total<br />

sulphur dioxide. The improvem<strong>en</strong>ts<br />

achieved are the key for the quantitative<br />

determination of the latter.<br />

330<br />

The equations provided for each zone<br />

of the spectrum separately can only be<br />

used for scre<strong>en</strong>ing.<br />

5. Acknowledgem<strong>en</strong>ts<br />

The Comisión Interministerial de<br />

Ci<strong>en</strong>cia y Tecnología (CICyT) is<br />

thanked for financial support (Project<br />

AGL2000-0321-P4-03).<br />

6. Refer<strong>en</strong>ces<br />

[1] M. Valcárcel and M.D. Luque<br />

de Castro, Flow Injection Analysis:<br />

Principles and Appli-<br />

[2]<br />

cations, Ellis Horwood, Chichester,<br />

1987.<br />

M. D. Luque de Castro and J. L.<br />

Luque García, Acceleration and<br />

Automation of Solid Sample<br />

Treatm<strong>en</strong>t, Elsevier, Amsterdam,<br />

2002.<br />

[3] L, Yang, V, Colombini, P.<br />

Maxwell, Z. Mester and R. E.<br />

Sturgeon, J. Chromatogr., A.<br />

1011 (2003) 135.<br />

[4] M. Bonoli, M. Montanucci, T.<br />

G. Toschi and G. Lercker, J.<br />

Chromatogr., A. 1011 (2003)<br />

163.


Talanta. XX (2005) XX Parte II, cap.10<br />

[5] G. Alvarez Llamas, M. D. R.<br />

Fernández de la Campa and A.<br />

Sanz Medel, J. Anal. Atom.<br />

Spectrom. 18 (2003) 460.<br />

[6] E. Trullols, I. Ruisánchez and F.<br />

X. Rius, Tr<strong>en</strong>ds Anal. Chem. 23<br />

(2004) 137.<br />

[7] R. Muñoz-Olivas, Tr<strong>en</strong>ds Anal.<br />

Chem. 23 (2004) 203.<br />

[8] G. Kos, H. Lohninger and R.<br />

Krska, Anal. Chem. 75 (2003)<br />

1211.<br />

[9] J.L. Pérez-Pavón, M. Del<br />

Nogal-Sánchez, C. García-Pinto,<br />

M. E. Fernández Laespada,<br />

B. Mor<strong>en</strong>o-Cordero and A.<br />

Guerrero-Peña, Anal. Chem. 75<br />

(2003) 2034.<br />

[10] E. Mataix and M. D. Luque de<br />

Castro, Analyst. 123 (1998)<br />

1547.<br />

[11] E. Mataix and M. D. Luque de<br />

Castro, Talanta. 51 (2000) 489.<br />

[12] M. C. García-Parrilla, G. A.<br />

González, F. J. Heredia and<br />

A.M. Troncoso, J. Agric. Food<br />

Chem. 45 (1997) 3487.<br />

[13] G. J. Martin, C. Guillou and M.<br />

L. Martin, J. Agric. Food Chem.<br />

36 (1998) 316.<br />

[14] M. Urbano-Cuadrado, M. D.<br />

Luque de Castro, P. M. Pérez-<br />

Juan, J. García-Olmo and M. A.<br />

Gómez-Nieto, Anal. Chim. Acta<br />

527 (2004) 81.<br />

[15] C. M. García-Jares and B.<br />

Medina, Fres<strong>en</strong>ius' J. Anal.<br />

Chem. 357 (1997) 86.<br />

[16] R. Eberl, J. Near Infrar. Spectrosc.<br />

6 (1998)133.<br />

[17] A. K. Kupina and A. Shrik<br />

hande, J. Amer. J. Enol.<br />

Viticult. 54 (2003) 131.<br />

[18] M. Dubernet and Mathieu<br />

Dubernet, Rev. Franç. D’O<strong>en</strong>olog.<br />

81 (2000) 10.<br />

[19] B. G. M. Vandeginst<strong>en</strong>, D. L.<br />

Massart, S. Buyd<strong>en</strong>s, S. De<br />

Jong, P. J. Lewi and J. Smeyers-<br />

Verbeke, Handbook of Chemometrics<br />

and Qualimetrics: Part<br />

B. Elsevier, Amsterdam, 1998.<br />

[20] K. H. Esb<strong>en</strong>s<strong>en</strong>. Multivariate<br />

Data Analysis- in Practice. Camo<br />

Process AS, Oslo, 2002.<br />

[21] J. S. Sh<strong>en</strong>k and M. O.<br />

Westerhaus, Calibration the ISI<br />

way. En Near Infrared Spec<br />

troscopy: the Future Waves.<br />

331


Manuel Urbano Cuadrado Tesis Doctoral<br />

332<br />

NIR Publications, Chichester,<br />

1996, p.198.


Discusión de los resultados


Discusión<br />

La normativa vig<strong>en</strong>te <strong>en</strong> la Universidad de Córdoba sobre la elaboración de<br />

Memorias de Tesis Doctorales <strong>en</strong> la modalidad que permite incluir los artículos<br />

publicados o <strong>en</strong> vías de publicación como tales, establece la inclusión de una<br />

sección de discusión conjunta de los resultados, que puede llevarse a cabo o no<br />

dep<strong>en</strong>di<strong>en</strong>do de la homog<strong>en</strong>eidad del tema de la tesis.<br />

Esta Memoria recoge la investigación sobre la aplicabilidad de las<br />

nuevas herrami<strong>en</strong>tas informáticas <strong>en</strong> química analítica, tema g<strong>en</strong>eral que puede<br />

dividirse <strong>en</strong> dos partes: 1) la informatización del proceso analítico y la gestión y<br />

análisis de los datos que éste proporciona con el uso del paradigma de ing<strong>en</strong>iería<br />

del software de ori<strong>en</strong>tación a objetos. 2) La comparación de métodos<br />

quimiométricos conv<strong>en</strong>cionales con otros propuestos <strong>en</strong> esta Memoria y basados<br />

<strong>en</strong> el cálculo de la similitud <strong>en</strong>tre muestras problema a partir de las d<strong>en</strong>ominadas<br />

fingerprints o huellas digitales construidas utilizando los datos espectroscópicos.<br />

Además, se estudió la posibilidad de mejorar la determinación de parámetros<br />

<strong>en</strong>ológicos con el aum<strong>en</strong>to de la información espectral, para lo que se usaron dos<br />

regiones: NIR y MIR.<br />

Por tanto, esta sección se ha dividido <strong>en</strong> dos bloques: informatización del<br />

proceso y de los datos analíticos, y desarrollo y uso de métodos quimiométricos<br />

para el tratami<strong>en</strong>to de datos espectroscópicos.<br />

1. Informatización del proceso y de los datos analíticos<br />

Las aplicaciones informáticas diseñadas y construidas <strong>en</strong> esta investigación son<br />

el fruto de procesos basados <strong>en</strong> los paradigmas ori<strong>en</strong>tado a objetos y de<br />

335


Manuel Urbano Cuadrado Tesis Doctoral<br />

desarrollo <strong>en</strong> espiral. Estas metodologías han proporcionado programas<br />

informáticos familiares al químico analítico, abiertos a los cambios funcionales e<br />

indep<strong>en</strong>di<strong>en</strong>tes de los análisis llevados a cabo y de los datos obt<strong>en</strong>idos.<br />

En esta primera parte se han abarcado dos verti<strong>en</strong>tes difer<strong>en</strong>ciadas por el<br />

ámbito de aplicación: la automatización del proceso analítico, y la gestión y<br />

análisis de los datos.<br />

1.1 Automatización del proceso analítico<br />

1.1.1 Modelo estructural para la automatización <strong>en</strong> química analítica<br />

En el modelo estructural propuesto se ha utilizado la nom<strong>en</strong>clatura de la IUPAC,<br />

difer<strong>en</strong>ciando <strong>en</strong>tre dispositivo, aparato, instrum<strong>en</strong>to y autoanalizador. En la<br />

jerarquía de clases desarrollada se han empleado las relaciones de g<strong>en</strong>eralización<br />

y agregación, junto con el proceso de especialización, para reflejar también las<br />

distintas clasificaciones propuestas <strong>en</strong> el Análisis Instrum<strong>en</strong>tal y <strong>en</strong> las Técnicas<br />

Analíticas de Separación para los instrum<strong>en</strong>tos y aparatos, respectivam<strong>en</strong>te.<br />

El concepto de dispositivo se c<strong>en</strong>tra <strong>en</strong> los aspectos físicos de la<br />

implantación de los aparatos e instrum<strong>en</strong>tos, no tratándose de un <strong>en</strong>te lógico<br />

desde el punto de vista de la automatización analítica.<br />

1.1.2 Modelo dinámico para la automatización <strong>en</strong> química analítica<br />

En la investigación que recoge esta Memoria se ha propuesto un modelo para<br />

repres<strong>en</strong>tar un proceso analítico capaz de ejecutar acciones según parámetros de<br />

tiempo (es decir, un instrum<strong>en</strong>to o aparato lleva a cabo una determinada acción<br />

<strong>en</strong> un mom<strong>en</strong>to preseleccionado) y según parámetros de estado (es decir, se lleva<br />

a cabo una determinada acción según el valor de unas variables, instrum<strong>en</strong>tales o<br />

no, como son el valor de absorbancia, el número de muestras analizadas, la<br />

temperatura de un termostato, etc.). Para este tipo de control se han propuesto dos<br />

módulos: uno para el control del tiempo y otro para el control de las variables de<br />

estado.<br />

336


Discusión<br />

Las estructuras de control usadas para la gestión de los disparadores no<br />

pued<strong>en</strong> ser consideradas como un motor de infer<strong>en</strong>cia y, además, adolec<strong>en</strong> del<br />

cálculo de incertidumbre. Como v<strong>en</strong>tajas, el modelo dinámico propuesto permite<br />

la construcción de un sistema abierto a cualquier tipo de regla y cercano al<br />

usuario.<br />

1.1.3 Modelo arquitectónico para la automatización <strong>en</strong> química analítica<br />

Se ha desarrollado un modelo por capas para cubrir desde el aspecto físico de la<br />

comunicación del instrum<strong>en</strong>to con el ord<strong>en</strong>ador hasta el aspecto analítico del<br />

diseño de la configuración de los métodos. Se diseñaron 5 capas: de drivers, de<br />

comunicación, de lógica, de control y de diseño. Las dos primeras son las que<br />

limitan la total escalabilidad e indep<strong>en</strong>d<strong>en</strong>cia del sistema de automatización,<br />

si<strong>en</strong>do necesario que los fabricantes la aport<strong>en</strong>, o, <strong>en</strong> su defecto, desarrollarlas<br />

para los distintos sistemas operativos. Si se consigue esto último, se puede hablar<br />

de un sistema estándar de automatización.<br />

En la Tesis realizada se han desarrollado las dos primeras capas para un<br />

total de 10 instrum<strong>en</strong>tos y aparatos (incluy<strong>en</strong>do bombas peristálticas, automuestreadores,<br />

espectrofotómetros, espectrofluorímetros, válvulas automáticas,<br />

peachímetros, etc.).<br />

La última capa, la de diseño, es una aplicación para la especificación de<br />

sistemas de control <strong>en</strong> automatización, cercana al l<strong>en</strong>guaje del químico analítico,<br />

y que no necesita que el usuario posea ningún conocimi<strong>en</strong>to sobre algorítmica y<br />

estructuras de datos, a difer<strong>en</strong>cia de otros <strong>en</strong>tornos comúnm<strong>en</strong>te utilizados<br />

descritos <strong>en</strong> la bibliografía.<br />

1.1.4 Pruebas del funcionami<strong>en</strong>to del sistema de automatización<br />

El sistema se ha probado mediante la automatización total del método de<br />

determinación de la acidez volátil <strong>en</strong> vinos propuesto por uno de los grupos de<br />

investigación donde se ha realizado la tesis. El hecho de disponer de un sistema<br />

totalm<strong>en</strong>te automatizado aportó la v<strong>en</strong>taja de comodidad para el usuario y la<br />

337


Manuel Urbano Cuadrado Tesis Doctoral<br />

reducción de costes. Además, se obtuvieron mejoras cuantitativas <strong>en</strong> la exactitud<br />

y precisión al eliminar la participación humana <strong>en</strong> el análisis.<br />

Otra aplicación de prueba para el sistema de automatización ha sido la<br />

puesta a punto del método para la medición de la actividad oxidásica de la lacasa<br />

<strong>en</strong> vinos. La versatilidad que aporta el sistema se constató <strong>en</strong> el estudio de las<br />

variables que afectan la señal analítica (diseño de experim<strong>en</strong>tos para la<br />

optimización) y <strong>en</strong> la caracterización del método. La configuración instrum<strong>en</strong>tal<br />

y la adquisición y tratami<strong>en</strong>to de los datos cambió respecto al método para la<br />

acidez volátil.<br />

1.2 Automatización de la gestión y el análisis de los datos analíticos<br />

Se ha desarrollado un sistema para la gestión y análisis de los datos g<strong>en</strong>erados <strong>en</strong><br />

los laboratorios analíticos pert<strong>en</strong>eci<strong>en</strong>tes a empresas dedicadas a la producción o<br />

elaboración de productos cuya calidad está basada <strong>en</strong> el valor de unos<br />

determinados parámetros. El modelo y la tecnología usados para la construcción<br />

del sistema hac<strong>en</strong> que éste t<strong>en</strong>ga una configuración abierta respecto a cualquier<br />

proceso de producción, que permita la accesibilidad remota a la información y<br />

que sea indep<strong>en</strong>di<strong>en</strong>te respecto a la plataforma <strong>en</strong> la que se instala.<br />

El sistema desarrollado es de ayuda a la hora de tomar decisiones <strong>en</strong> el<br />

sector <strong>en</strong>ológico y está compuesto por dos herrami<strong>en</strong>tas: 1) una aplicación de<br />

gestión de los datos analíticos de la elaboración de vinos, además de la<br />

información refer<strong>en</strong>te al laboratorio; 2) una aplicación Web a través de la cual los<br />

técnicos extra<strong>en</strong> información de los datos históricos correspondi<strong>en</strong>tes a ciclos de<br />

producción anteriores o al actual. La primera aplicación se d<strong>en</strong>omina subsistema<br />

operacional y la segunda subsistema de análisis.<br />

La aplicación operacional establece un flujo de trabajo unificado <strong>en</strong> el<br />

laboratorio, ya que se ha de llevar a cabo una serie de etapas secu<strong>en</strong>ciales como<br />

son la id<strong>en</strong>tificación de las muestras, la carga de parámetros, la introducción de<br />

resultados y su validación, y la introducción de los datos <strong>en</strong> el histórico. Además,<br />

338


Discusión<br />

es posible conocer la carga de trabajo <strong>en</strong> el laboratorio <strong>en</strong> tiempo real, la gestión<br />

automatizada de los instrum<strong>en</strong>tos, etc.<br />

La aplicación de análisis de la información permite obt<strong>en</strong>er la evolución,<br />

<strong>en</strong> formato gráfico o tabular, de uno o varios parámetros <strong>en</strong>ológicos según unos<br />

determinados criterios de búsqueda. Se puede también llevar a cabo un estudio<br />

estadístico de los datos (por ejemplo, el increm<strong>en</strong>to de un parámetro o la<br />

desviación estándar por día).<br />

2. Métodos quimiométricos para el tratami<strong>en</strong>to de datos<br />

espectroscópicos<br />

En la segunda parte de la tesis se han utilizado las zonas espectrales ultravioleta,<br />

visible, infrarrojo cercano e infrarrojo medio para la difer<strong>en</strong>ciación y<br />

clasificación de muestras por un lado, y la determinación de parámetros químicos<br />

por otro, mediante la aplicación de varios métodos quimiométricos. El campo de<br />

aplicación de los métodos propuestos ha sido el <strong>en</strong>ológico.<br />

Las variables categóricas usadas <strong>en</strong> la difer<strong>en</strong>ciación y clasificación de<br />

muestras de vinos fueron la zona de proced<strong>en</strong>cia de las muestras d<strong>en</strong>tro de una<br />

única d<strong>en</strong>ominación de orig<strong>en</strong>, la variedad de la uva utilizada, y el proceso de<br />

crianza.<br />

Las ecuaciones para la determinación de parámetros cuantitativos han<br />

cubierto la mayoría de los parámetros <strong>en</strong>ológicos que se cuantifican <strong>en</strong> el vino.<br />

Se ha estudiado la determinación de 16 propiedades cuantitativas por<br />

espectroscopía con detección multicanal, abarcando todos los parámetros de<br />

rutina <strong>en</strong> vinos de difer<strong>en</strong>tes d<strong>en</strong>ominaciones de orig<strong>en</strong>.<br />

2.1 Análisis cualitativo<br />

2.1.1 Espectroscopía ultravioleta-visible y métodos clásicos de patrones de<br />

reconocimi<strong>en</strong>to de muestras<br />

Se han utilizado los métodos de análisis de compon<strong>en</strong>tes principales (ACP) y el<br />

339


Manuel Urbano Cuadrado Tesis Doctoral<br />

soft indep<strong>en</strong>d<strong>en</strong>t modelling of class analogies (SIMCA) para el análisis<br />

exploratorio y el desarrollo de reglas de clasificación, respectivam<strong>en</strong>te. Los<br />

espectros ultravioleta-visible obt<strong>en</strong>idos han permitido discriminar vinos blancos<br />

y tintos de difer<strong>en</strong>te proced<strong>en</strong>cia d<strong>en</strong>tro de una misma d<strong>en</strong>ominación de orig<strong>en</strong>.<br />

Así, se ha conseguido una discriminación de segundo ord<strong>en</strong>, para lo que<br />

se requirieron datos espectroscópicos que proporcionaran una mayor información<br />

química, recurri<strong>en</strong>do a la zona de ultravioleta 300-400 nm, normalm<strong>en</strong>te no<br />

usada para estos propósitos. Esta región ha sido clave para poder difer<strong>en</strong>ciar el<br />

orig<strong>en</strong> de los vinos, si<strong>en</strong>do los ésteres de los ácidos hidroxicinámicos, que<br />

absorb<strong>en</strong> <strong>en</strong> esta región, los principales compuestos discriminadores. Los errores<br />

<strong>en</strong> el conjunto para la validación de los modelos desarrollados fueron del 10% y<br />

el 20% para vinos blancos y tintos, respectivam<strong>en</strong>te.<br />

Los modelos propuestos para la clasificación de vinos tintos según la<br />

variedad de la uva empleada y el proceso de crianza mostraron un 25% de error<br />

<strong>en</strong> la predicción. La región visible pres<strong>en</strong>ta <strong>en</strong> estos modelos una mayor<br />

capacidad de discriminación que la mostrada para el primer criterio, lo que indica<br />

que el cont<strong>en</strong>ido de antocianos producidos por las dos variedades de uva y su<br />

evolución <strong>en</strong> el proceso de crianza es significativam<strong>en</strong>te difer<strong>en</strong>te. De nuevo, la<br />

región ultravioleta pres<strong>en</strong>tó una alta capacidad de difer<strong>en</strong>ciación.<br />

2.1.2 Espectroscopía de infrarrojo medio y métodos de preprocesami<strong>en</strong>to<br />

basados <strong>en</strong> huellas digitales y <strong>en</strong> el cálculo de similitudes<br />

Se ha propuesto un método para el tratami<strong>en</strong>to de los espectros de infrarrojo<br />

medio obt<strong>en</strong>idos para distintos tipos de vinos. La baja selectividad que pres<strong>en</strong>ta<br />

esta zona espectral fue la causante de la no-discriminación de vinos según los<br />

criterios de orig<strong>en</strong>, variedad y crianza.<br />

El método permite la construcción de huellas digitales para cada muestra<br />

sigui<strong>en</strong>do los pasos de normalización (para t<strong>en</strong>er valores de absorbancia <strong>en</strong> el<br />

rango 0-1) y de asignación de uno o cero a cada variable (longitud de onda<br />

340


Discusión<br />

considerada) según ésta supere o no, respectivam<strong>en</strong>te, un valor umbral estudiado<br />

para valores de 0.2, 0.4, 0.6 y 0.8.<br />

Una vez construidas las huellas se procedió a la g<strong>en</strong>eración de una matriz<br />

de similitud (basada <strong>en</strong> el cálculo del índice de Tanimoto) que considera para<br />

cada par de muestras un valor que ti<strong>en</strong>e <strong>en</strong> cu<strong>en</strong>ta la semejanza <strong>en</strong>tre éstas. A la<br />

matriz de similitud se le realizó un ACP para visualizar posibles t<strong>en</strong>d<strong>en</strong>cias <strong>en</strong> el<br />

agrupami<strong>en</strong>to de muestras. La discriminación conseguida fue mayor que la<br />

obt<strong>en</strong>ida con los espectros de MIR sin la aplicación del tratami<strong>en</strong>to propuesto,<br />

si<strong>en</strong>do los valores umbrales 0.4 y 0.6 los que condujeron a los mejores<br />

resultados.<br />

La obt<strong>en</strong>ción de una huella digital patrón y el cálculo modificado de la<br />

matriz de similitud, t<strong>en</strong>i<strong>en</strong>do <strong>en</strong> cu<strong>en</strong>ta tanto la huella digital como un nuevo<br />

método de conteo de los bits significativos, proporcionó mejores discriminaciones<br />

<strong>en</strong>tre grupos de muestras.<br />

Se realizó un SIMCA para estudiar la capacidad de predicción de los<br />

modelos, obt<strong>en</strong>i<strong>en</strong>do los m<strong>en</strong>ores valores de error para la clasificación de<br />

muestras de difer<strong>en</strong>te variedad y del desarrollo o no de proceso de crianza (9 y<br />

5%, respectivam<strong>en</strong>te). El error <strong>en</strong> la clasificación de muestras de difer<strong>en</strong>te orig<strong>en</strong><br />

fue del 22%.<br />

La calidad de las huellas digitales patrón y la capacidad de predicción de<br />

los modelos SIMCA construidos requier<strong>en</strong> un número mayor de muestras, por lo<br />

que los errores correspond<strong>en</strong> a un primer estudio exploratorio de la capacidad del<br />

método propuesto.<br />

2.2 Análisis cuantitativo<br />

2.2.1 Espectroscopía NIR y calibración multivariante<br />

Se ha estudiado la posibilidad de la espectroscopía NIR <strong>en</strong> el campo <strong>en</strong>ológico<br />

con el fin de ampliar las aplicaciones que aparec<strong>en</strong> recogidas <strong>en</strong> la bibliografía.<br />

Así, un primer objetivo fue el desarrollo de ecuaciones PLS de ámbito g<strong>en</strong>eral<br />

341


Manuel Urbano Cuadrado Tesis Doctoral<br />

para difer<strong>en</strong>tes tipos de vino, incluy<strong>en</strong>do blancos, rosados, tintos, de difer<strong>en</strong>te<br />

variedad de uva, de distinta d<strong>en</strong>ominación de orig<strong>en</strong>, etc.<br />

Un segundo objetivo fue el ampliar el número de parámetros estudiados,<br />

llegando hasta 16 parámetros (a saber: grado alcohólico, masa volúmica, acidez<br />

total, pH, acidez volátil, glicerol, índice de polif<strong>en</strong>oles totales (ipt), azúcares<br />

reductores, color, tonalidad, dióxido de azufre total y libre y los ácidos tartárico,<br />

láctico, málico y glucónico).<br />

Se han llevado a cabo las correspondi<strong>en</strong>tes etapas de calibración<br />

(mediante el método de validación cruzada) y de validación, obt<strong>en</strong>iéndose una<br />

serie de parámetros estadísticos que se analizaron según difer<strong>en</strong>tes criterios y<br />

normas. De esta forma, el grado alcohólico, masa volúmica, acidez total, pH,<br />

glicerol, color, ácido láctico, tonalidad e ipt se determinaron de forma exacta<br />

at<strong>en</strong>di<strong>en</strong>do a los valores R 2 y ETVC (Error Típico de la Validación Cruzada). La<br />

espectroscopía <strong>en</strong> el infrarrojo cercano sólo puede utilizarse para métodos de<br />

scre<strong>en</strong>ing del dióxido de azufre total, los azúcares reductores, la acidez volátil y<br />

el resto de ácidos orgánicos. El dióxido de azufre libre no puede determinarse por<br />

NIRS.<br />

La comparación del error que proporciona el SECV con el obt<strong>en</strong>ido <strong>en</strong> la<br />

validación de las ecuaciones desarrolladas, ETP (Error Típico de la Predicción),<br />

ha conducido a la conclusión de que la mayoría de las ecuaciones desarrolladas<br />

son robustas (excepto para la masa volúmica y el ácido tartárico, que mostraron<br />

difer<strong>en</strong>cias levem<strong>en</strong>te superiores al límite permitido por el criterio ETP ≤ 1.5 *<br />

ETVC). También se ha comprobado que la p<strong>en</strong>di<strong>en</strong>te y el sesgo o desviación de<br />

la correlación <strong>en</strong>tre el método de refer<strong>en</strong>cia y el método NIRS no difier<strong>en</strong><br />

estadísticam<strong>en</strong>te de 1 y 0, respectivam<strong>en</strong>te.<br />

2.2.2 Estudio del uso separado y conjunto de la espectroscopía visible-NIR y la<br />

espectroscopía FT-MIR <strong>en</strong> la determinación de parámetros <strong>en</strong>ológicos<br />

La región visible y ambas zonas del espectro infrarrojo (400-2500 nm para el<br />

visible y NIR, y 3000-800 cm -1 para el MIR) se han usado para la determinación<br />

342


Discusión<br />

de varios parámetros <strong>en</strong> vinos de difer<strong>en</strong>te variedad, proced<strong>en</strong>cia y tipo. Los<br />

parámetros determinados fueron el grado alcohólico, masa volúmica, glicerol,<br />

acidez total, ipt, ácido láctico y dióxido de azufre total.<br />

La espectroscopía NIR mostró, <strong>en</strong> la mayoría de los casos, mejores<br />

resultados estadísticos que la espectroscopía FT-MIR (aunque no se <strong>en</strong>contraron<br />

difer<strong>en</strong>cias significativas). Una causa de este comportami<strong>en</strong>to radica <strong>en</strong> la<br />

naturaleza de la absorción <strong>en</strong> ambas zonas. La elevada int<strong>en</strong>sidad de la absorción<br />

correspondi<strong>en</strong>te a la t<strong>en</strong>sión de vibración del grupo –OH da lugar a una baja<br />

relación señal/ruido.<br />

La combinación de ambas regiones mejoró la determinación de dos<br />

parámetros: el dióxido de azufre total y el glicerol. Para el dióxido de azufre total<br />

los parámetros estadísticos obt<strong>en</strong>idos permit<strong>en</strong> usar la ecuación para la<br />

determinación cuantitativa y no sólo el scre<strong>en</strong>ing.<br />

343


Conclusiones


Conclusiones<br />

A continuación se pres<strong>en</strong>tan las conclusiones más destacables de la investigación<br />

realizada <strong>en</strong> la Tesis Doctoral y recogida <strong>en</strong> esta Memoria.<br />

A) Se han desarrollado herrami<strong>en</strong>tas computacionales para la automatización<br />

del proceso analítico y el análisis de la información que este proceso<br />

g<strong>en</strong>era. Las soluciones software construidas pose<strong>en</strong> un carácter abierto<br />

respecto al problema analítico, un alto grado de escalabilidad para futuras<br />

ampliaciones y un elevado nivel de indep<strong>en</strong>d<strong>en</strong>cia fr<strong>en</strong>te a instrum<strong>en</strong>tos y<br />

aparatos, sistemas operativos, y hardware informático. Estas herrami<strong>en</strong>tas<br />

son las sigui<strong>en</strong>tes:<br />

A.1) Plataforma para la automatización de procesos analíticos compuesta<br />

por dos subsistemas: 1) un subsistema que permite al químico<br />

analítico el diseño de métodos automatizados (estructura y<br />

comportami<strong>en</strong>to del autoanalizador) y su almac<strong>en</strong>ami<strong>en</strong>to <strong>en</strong> formato<br />

XML y, 2) un subsistema que, a partir de los datos de la fase de<br />

diseño, posibilita la ejecución de los análisis de forma totalm<strong>en</strong>te<br />

automatizada.<br />

La automatización de dos métodos continuos para la determinación<br />

de parámetros <strong>en</strong>ológicos han sido los casos de prueba para la<br />

evaluación de la plataforma.<br />

A.2) Un LIMS (Laboratory Information Managem<strong>en</strong>t System) para la<br />

gestión y análisis de los datos <strong>en</strong> una laboratorio analítico,<br />

compuesto por dos subsistemas de funcionalidad marcadam<strong>en</strong>te<br />

347


Manuel Urbano Cuadrado Tesis Doctoral<br />

348<br />

especializada: 1) un subsistema de gestión del trabajo diario <strong>en</strong> el<br />

laboratorio analítico, que permite la organización y planificación de<br />

muestras, parámetros a medir, instrum<strong>en</strong>tos y reactivos, usuarios y<br />

alertas, y 2) un subsistema de análisis de los datos históricos<br />

almac<strong>en</strong>ados por la organización (o laboratorio), que posibilita la<br />

consulta según criterios preestablecidos o no para la extracción de<br />

información que ayude a la toma de decisiones.<br />

B) Se han propuesto nuevos métodos quimiométricos para el análisis de la<br />

gran cantidad de información espectral que proporcionan los equipos<br />

actuales. Se ha trabajado con la espectroscopía ultravioleta-visible, de<br />

infrarrojo cercano y de infrarrojo medio con transformada de Fourier. Se<br />

han extraido las sigui<strong>en</strong>tes conclusiones <strong>en</strong> el campo <strong>en</strong>ológico, tanto a<br />

nivel cualitativo como cuantitativo:<br />

B.1) Se han desarrollado modelos de clasificación de vinos a partir de los<br />

espectros ultravioleta y visible. Estos modelos permit<strong>en</strong> la<br />

clasificación de vinos según la zona de proced<strong>en</strong>cia d<strong>en</strong>tro de una<br />

d<strong>en</strong>ominación de orig<strong>en</strong> (clasificación de segundo ord<strong>en</strong>), tipo de<br />

uva empleada y proceso de elaboración.<br />

B.2) Se ha desarrollado un método computacional para el análisis de<br />

información espectroscópica basado <strong>en</strong> la construcción de huellas<br />

digitales, el cálculo de similitudes y la escalabilidad de las medidas<br />

de similitud para increm<strong>en</strong>tar el nivel de caracterización.<br />

B.3) Se ha aplicado el método anterior a la clasificación de vinos<br />

utilizando el espectro infrarrojo medio según los tres criterios citados<br />

<strong>en</strong> el punto B.1. Se obtuvieron mejoras significativas <strong>en</strong> la<br />

clasificación de muestras al aplicar el modelado SIMCA a las<br />

matrices de similitud basadas <strong>en</strong> el uso de las huellas digitales de


Conclusiones<br />

espectros y <strong>en</strong> el del método de escalabilidad <strong>en</strong> el cálculo de la<br />

similitud espectral fr<strong>en</strong>te al empleo de los datos sin tratar.<br />

B.4) Se han construido ecuaciones PLS para la determinación y scre<strong>en</strong>ing<br />

de 15 parámetros <strong>en</strong>ológicos utilizando el espectro infrarrojo medio.<br />

Se trata de ecuaciones globales para cuyo desarrollo se han usado<br />

vinos de difer<strong>en</strong>tes tipos de uva y d<strong>en</strong>ominación de orig<strong>en</strong>.<br />

B.5) Se han comparado los resultados obt<strong>en</strong>idos empleando las zonas NIR<br />

y MIR, y se ha estudiado la posibilidad de usar la combinación de<br />

ambas regiones para mejorar los estadísticos de las determinaciones<br />

cuantitativas. La zona NIR ofreció una mejor capacidad de<br />

determinación, que se mejoró para dos parámetros analíticos con el<br />

uso conjunto de los espectros NIR y MIR.<br />

349

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!