C. Ramos et al. (eds.), Ambient Intelligence - Software and Applications, Advances in Intelligent Systems and Computing 291, 241 DOI: 10.1007/978-3-319-07596-9_27, © Springer International Publishing Switzerland 2014 Multi-agent Technology to Perform Odor Classification Sigeru Omatu1, Tatsuyuki Wada1, Sara Rodríguez2, Pablo Chamoso2, and Juan M. Corchado2 1 Osaka Institute of Technology, Osaka, Japan 2 Computer and Automation Department, University of Salamanca, Spain omatu@rsh.oit.ac.jp, coco.tk.family@gmail.com, {srg,chamoso,corchado}@usal.es Abstract. Quartz crystal microbalance (QCM) sensors are used to measure and classify odors. In this paper, we use seven QCM sensors and three kinds of odors. The system has been developed as a virtual organization of agents using the agent platform called PANGEA (Platform for Automatic coNstruction of orGanizations of intElligents Agents), which is a platform to develop open mul- ti-agent systems, specifically those including organizational aspects. The main reason that justifies the use of the agents is the scalability of the platform; that is, the way in which it models the services. The functionalities of the system are modeled as services inside the agents, or as SOA (Service Oriented Approach) architecture compliant services using Web Services. In this way, it is possible to improve odor classification systems with new algorithms, tools and classifica- tion techniques. Keywords: Odor sensing, odor classification, multi-agent systems, virtual or- ganizations, QCM sensors. 1 Introduction During the last years, major advances have been made in the field of Ambient Intelli- gence [1], [2], which has come to acquire significant relevance in the daily lives of people [5], [6], [7]. Ambient Intelligence adapts technology to people’s needs by pro- posing 3 concepts: ubiquitous computing, ubiquitous communication and intelligent user interfaces. The development of new frameworks and models to allow informa- tion access, independently of the location, is needed in order to achieve these targets. Wireless sensor networks [3], [4], [22], provide an infrastructure, which is able to distribute communications in dynamic environments by incrementing mobility and efficiency independently of the location. Sensor networks interconnect a large amount of sensors and manage information in the intelligent environment. Many times infor- mation management is done in a distributed way. However, it is necessary to have distributed systems with enough capabilities to manage sensor networks in an effi- cient way and to include elements with some degree of intelligence that can be embedded in the devices and act both autonomously and in coordination with the distributed system. Multi-agent systems are a suitable alternative to perform this type of systems. 242 S. Omatu et al. There are several proposals to build smart environments that combine multi-agent systems and sensor networks [8], [9], [10], [11], [12], [13] , [14], [15], [16], [17], [18], [19], [20], [21]. New approaches are needed to support evolutional systems and to facilitate their growth and runtime updates. The dynamics of open environments have promoted the use of Virtual Organizations of Agents (VOs). A VO [25], [26], [27], [28], [29] is an open system designed for grouping; it allows for the collabora- tion of heterogeneous entities and provides a separation between the form and function that define their behavior. However, it is not possible to find an existing multi-agent architecture to work on the concept of virtual organizations and to pro- vide agents capable of working with any type of sensor or device. This article consid- ers different types of odor sensors and aims to classify odors according to sensing data by using quartz crystal microbalance (QCM) sensors. QCM sensors are sensitive to odors and allow the precise measurement of odor data. Using many QCM sensors, we will attempt to classify various kinds of odors based on neural networks. To model the system, virtual organizations of agents, which are capable of bringing a greater number of possibilities, are presented. These agents are connected with PANGEA [23], a multi-agent platform designed on the basis of virtual organizations, aimed at the creation of intelligent environments. Over the last decade, odor-sensing systems (called electronic nose (EN) systems) have undergone important developments from a technical and commercial point of view. EN refers to the ability to reproduce the human sense of smell by using sensor arrays and pattern recognition systems [30]. The authors in [31] present a type of an EN system to classify various odors under the various densities of odors based on a competitive neural network by using learn- ing vector quantization (LVQ). The odor data were measured by an odor sensor array made of MOGSs. We used fourteen MOGSs of FIGARO Technology Ltd in Japan. We considered two types of data for classification in the experiment. The first type included four types of teas, while the second included five types of coffees with simi- lar properties. The classification results of teas and coffees were approximately 96% and 89% respectively, which was much better than the results in [32], [24]. The article is structured as follows. First, the PANGEA platform is described in section 2, detailing the structure of the virtual organizations used in the odor classifi- cation case study. Both the platform and virtual organizations are evaluated in a case study consisting of an intelligent environment for odor recognition. Finally the results of the case study and the conclusions reached from this research are presented. 2 Case Study: Development of a VO for Odor Classification This central section of the article presents the integration of the system and the sen- sors used in the multi-agent architecture, and explains the main concepts of QCM sensors. In addition, an overview of the odor sensing system and the measures of odor data used are described. Multi-agent Technology to Perform Odor Classification 243 2.1 Integration in a Multi-agent Platform (PANGEA) With the development of ubiquitous and distributed systems, it is interesting to have new agent platforms that facilitate the development of open agent-architectures that can be deployed on any device. PANGEA [23] is an agent platform based on organi- zational concepts. It can model and implement all kinds of open systems, encouraging the sharing of resources and facilitating control of all nodes where the different agents are deployed. It is essential to have control mechanisms that enable new devices to be included in a single platform where they can be easily integrated, managed and monitored. In this case PANGEA, with its model of agents and organizations, provides the necessary features to function as the base platform when developing a comprehensive system. In order to facilitate control of the organization, PANGEA has several agents that are automatically deployed when starting the platform operation: OrganizationMa- nager and OrganizationAgent are in charge of the management of the organizations and suborganizations; InformationAgent is in charge of accessing the database con- taining all pertinent system information; ServiceAgent is in charge of recording and controlling the operation of services offered by the agents; NormAgent is in charge of the norms in the organization; and CommunicationAgent is in charge of controlling communication among agents, and recording the interaction between agents and or- ganizations. In addition to the intrinsic PANGEA agents, the organizations developed in the present system are the following: ─ Odor-recognition sensors organization. In this organization all agents belonging to an individual odor recognition system is deployed. Such agents may also be of dif- ferent types (sensor agents, interface agent and identifier agent). ─ Sensor control central organization. In this organization the agent interface type is included, representing each of the odor-recognition sensors organizations together with an adapter agent. Communication in this case is restricted only to the existing agents in the same or- ganization, in addition to the control agents that the PANGEA platform offers (as is the case of the Information Agent, which accesses the database). Each type of agent is engaged in a well-defined task, as explained below: ─ Sensor agent. It is exclusively dedicated to performing sensor readings and provid- ing the latest value when an authorized agent requires such data. ─ Identifier agent. Its function is to perform the necessary calculations for the identi- fication of odors. It makes use of the ability to communicate with the sensor agents, which require the data needed to perform these calculations. ─ Interface agent. This kind of agent is present in the two types of virtual organiza- tions cited. It is responsible for providing a communication link with the agents outside their own organization of odor-recognition sensors that are authorized to establish two-way communications using the appropriate communication format. 244 S. Omatu et al. ─ Classifier agent. This a algorithms described in Classification Method o platform. We can say tha fication of odors by mak ─ Adapter agent. This type trol. Its function is to tr each of the associated se all recognition systems p source of knowledge. Fig. 1. Structure o 2.2 Algorithms: Classif We will show two types o based on error back-propag tion (LVQ). First, we will explain th odors, we adopt a three-lay method, as shown in Fig.2. the gradient method, is give • Step 1. Set the i • Step 2. Specify ponding to the i • Step 3. Calculat ݊݁ݐ௝ ൌ ෍ ூ ௜ୀଵ gent performs classification services that implement the following section. To perform the classification f Odor Data (e-BPNN) is used and implemented on t the classifier agent could use new methods for the cla ing the system scalable in terms of functionality. of agent is in the central organization of the sensor c y to correct the differences between the measurements nsors to the sensor agents. Thus, a joint database amo articipating in the architecture is achieved, expanding f virtual organizations of the case study in PANGEA ication Method of Odor Data (e-BPNN) f neural networks: one is a multi-layered neural netw ation method and the other is a learning vector quanti e multi-layered neural networks. In order to classify ered neural network based on the error back-propagat The error back-propagation algorithm, which is based n by the following steps. nitial values of ݓ௝௜, ݓ௞௝, ߠ௝, ߠ௞, and η(> 0). the desired values of the output ݀௞, ݇ ൌ 1,2, ڮ , ܭ corre nput data x୧, i= 1,2, . . . , I in the input layer. e the outputs of the neurons in the hidden layer by ݓ௝௜ݔ௜ െ ߠ௝ , ௝ܱ ൌ ݂൫݊݁ݐ௝൯, ݂ሺݔሻ ൌ 1 1 ൅ ݁ି௫ the , a the ssi- on- of ng the ork za- the ion on s- • Step 4. Calculat ݊݁ݐ௞ ൌ ෍ ݓ ௄ ௞ୀଵ • Step 5. Calculat • Step 6. Use th squares of the e • Step 7. If E is s weight by the fo Δݓ௞௝ ؠ ݓ௞௝ሺݐ Δݓ௝௜ ؠ ݓ௝௜ሺݐ ൅ • Step 8. Go to St Using the above recursi Fig. 2. Three laye The neural network (Fig and output layer k. When layer, we can obtain the o desired value ݀௞ which h Multi-agent Technology to Perform Odor Classification e the outputs of the neurons in the output layer by ௞௝௜ ௝ܱ െ ߠ௝ , ܱ௞ ൌ ݂ሺ݊݁ݐ௞ሻ, ݂ሺݔሻ ൌ 1 1 ൅ ݁ି௫ e the error en and generalized errors by ݁௞ ൌ ݀௞ െ ܱ௞ ߜ௞ ൌ ߜ௞ܱ௞ሺ1 െ ܱ௞ሻ ߜ௝ ൌ ෍ ߜ௞ ௄ ௞ୀଵ ݓ௞௝ ௝ܱሺ1 െ ௝ܱሻ e following formula to calculate half of the sum of rrors in the output of all. E ൌ 12 ෍ ݁௞ ଶ ௄ ௞ୀଵ ufficiently small, exit the learning. Otherwise, modify llowing equation: ൅ 1ሻ െ ݓ௞௝ሺݐሻ ൌ ߟߜ௝ ௝ܱ௞ ֚ ݓ௞௝ ൅ Δݓ௞௝ 1ሻ െ ݓ௝௜ሺݐሻ ൌ ߟߜ௜ ௝ܱ ֚ ݓ௝௜ ൅ Δݓ௝௜ ep 3. ve procedure, we can train the odor data. red neural network with the error back-propagation . 2) consists of three layers: input layer i, hidden lay the input data ݔ௜, ݅ ൌ 1,2, … , ܫ , are applied in the in utput ܱ௞ in the output layer, which is compared to as been assigned in advance. If the error ݁௞ ൌ ݀௞ െ 245 the the er j put the ܱ௞ 246 S. Omatu et al. Fig. 3. LVQ structures occurs, then the weighting coefficients ݓ௝௜, ݓ௞௝ are corrected so that the error be- comes smaller based on the error back-propagation algorithm. Next, we will show the LVQ: The structure of LVQ is two layered, consisting of an input layer and a competitive layer as shown in Fig. 3. In order to classify the odors we adopt a two-layered neural network based on the learning vector quantization method as shown in Fig. 3. Learning vector quantization is a supervised learning method for the purpose of pattern classification for input data. The learning method is given by the following steps: Step 1. Set the initial values of wij (j=1,2,…M, i=1,2,..,n) , T, and ߙ଴ (> 0) where T is the total iteration number for learning, n is the number of input, M is the number of neurons in cluster j, and ߙ଴ is the initial value of the learning rate. Step 2. First, calculate proximity to the coupling coefficient vector WJ of the input vector x and neuron j in the sense of Euclidean distance. The neuron with the closest coupling coefficient in the sense of Euclidean distance in the competitive layer neuron is detected by following equation for the input pattern. ௝݀ ൌצ x െ ݓ௝ צൌ ඩ෍ሺݔ௜ െ ݓ௝௜ሻଶ ௡ ௜ୀଵ ݀௖ ൌצ x െ ݓ௖ צൌ min௝ ௝݀ Step 3. If the input vector and winning neuron c belong to the same class, then change ݓ௝ሺݐሻ by using the following equation: ݓ௝ሺݐ ൅ 1ሻ ൌ ݓ௝ሺݐሻ ൅ ߙሺݐሻ ቀݔ െ ݓ௝ሺݐሻቁ , ݆ ൌ ܿ ݓ௝ሺݐ ൅ 1ሻ ൌ ݓ௝, ݆ ് ܿ ଵܹ㻌 ݓଵଵ㻌 ݓଵଶ㻌 ݔଵ㻌 ݔଶ㻌 ݔ௡㻌 ௡ܹ㻌 ݓଵ௡㻌 Cluster 1 Cluster 2 Cluster M ... ... ... ... Competitive layer Input layer Multi-agent Technology to Perform Odor Classification 247 where ߙሺݐሻ ൌ ߙ଴ ቀ1 െ ଵ்ቁ. If the input vector and neuron c belong to the different class, then change ݓ௝ሺݐሻ by using the following equation: ݓ௝ሺݐ ൅ 1ሻ ൌ ݓ௝ሺݐሻ െ ߙሺݐሻ ቀݔ െ ݓ௝ሺݐሻቁ , ݆ ൌ ܿ ݓ௝ሺݐ ൅ 1ሻ ൌ ݓ௝, ݆ ് ܿ. Step 4. If t