[ieee 2010 12th international conference on optimization of electrical and electronic equipment...

6
Artificial olfaction system with hardware on-chip learning neural networks Alin Tisan*, Marcian Cirstea**, Stefan Oniga*, Attila Buchman* *North University of Baia Mare, Romania, **Anglia Ruskin University, Cambridge, United Kingdom [email protected], [email protected], [email protected], [email protected] Abstract- This paper presents a hardware implementation of a multilayer feed-forward neural network based on back- propagation. The implementation is assumed to design and implement modules that emulate FF-BP functions with computing blocks of the predefined System Generator library and user defined blocks integrated in the System Generator library. The main application of the developed structure is an artificial olfactory system used to recognize the type of coffee presented in a test chamber. Data acquisition was achieved through the PC-MIO-16E-1 acquisition card and a virtual instrument, developed in Labview, for signal pre-processing and data logging into text files. The patterns presented (the type of coffee) have been recognized through neural networks. In order to select the RNA with the highest accuracy in recognising the coffee type, several different RNAs were simulated. I. INTRODUCTION In the last decade, artificial olfaction systems have been generating a remarkable interest, due to their potential of solving a vast range of problems from different fields. The main areas of application include the already well known pharmaceutical industry, the chemical engineering industry, environmental monitoring, the food industry and now getting into areas which until recently were considered only theoretical concepts such as: telesurgery, identification of crisis circumstances, non-invasive medical diagnosis and identification of persons on biometric basis. The research leading point consists of the development of an artificial olfaction system based on an intelligent platform with learning and adaptive capabilities to recognize the human biometrical pattern. Developing such a platform presumes FPGA implementation of different Artificial Neural Networks (ANN) through Matlab, ISE or EDK environments, by creating libraries of predefined components necessary for implementing a neural computing system and by user setting of these components to create basically any neural network. The advantage of using this method consists of the adaptability of the neural network to a given target application that depends on the type and number of the sensors used in the artificial olfaction system, the concentration of the volatile organic molecules present in the analyzed gas and on the ambient environment conditions. The domain approached as application in this paper refers to the identification of a chosen assortment of coffee. The reason for choosing coffee for the application is its complex composition: according to academic research, more than 700 volatile molecules have been reported, none of these molecules alone being able to represent, in a defining way, a certain assortment of coffee. Therefore, a certain type of coffee is identified only by considering the whole spectrum of specific signatures consisting of volatile molecules. The paper proposes an integrated hardware-software environment, to allow the rapid development of an intelligent system using the following resources: - Sensors specific to the application; - Hardware modules easy to interconnect; - Modules described by means of graphic programming language Labview, for managing the analog acquisition block (virtual instrument); - Modules described in programming language MCode for signal processing and for feature extraction; - Artificial Neural Networks (used for pattern recognition); Given this framework, developing a system for identifying different olfactory chemical compounds consists of the design and synthesis of modules (described in Labview and MCode) for the acquisition module and the use of neural networks specific application. The implementation of a system which recognizes different patterns (olfactory signature of organic molecules) and uses neural networks, onto programmable logic circuits such as FPGA (Field Programmable Gate Arrays), is an important step in the creation of intelligent sensory systems. II. THE ARTIFICIAL OLFACTION SYSTEM THE E-NOSE The generally accepted definition of an artificial olfaction system was given by J. Gardner, who states that an Electronic nose is “an instrument which comprises an array of electronic chemical sensors with partial specificity and an appropriate pattern recognition system, capable of recognizing simple or complex odours”[1]. A typical traditional architecture of an e- nose is presented in Fig. 1. Fig. 1. The traditional architecture of an e-nose 884 978-1-4244-7020-4/10/$26.00 '2010 IEEE 2010, 12th International Conference on Optimization of Electrical and Electronic Equipment, OPTIM 2010

Upload: attila

Post on 15-Oct-2016

220 views

Category:

Documents


1 download

TRANSCRIPT

Artificial olfaction system with hardware on-chip learning neural networks

Alin Tisan*, Marcian Cirstea**, Stefan Oniga*, Attila Buchman*

*North University of Baia Mare, Romania, **Anglia Ruskin University, Cambridge, United Kingdom [email protected], [email protected], [email protected], [email protected]

Abstract- This paper presents a hardware implementation of

a multilayer feed-forward neural network based on back-propagation. The implementation is assumed to design and implement modules that emulate FF-BP functions with computing blocks of the predefined System Generator library and user defined blocks integrated in the System Generator library. The main application of the developed structure is an artificial olfactory system used to recognize the type of coffee presented in a test chamber. Data acquisition was achieved through the PC-MIO-16E-1 acquisition card and a virtual instrument, developed in Labview, for signal pre-processing and data logging into text files. The patterns presented (the type of coffee) have been recognized through neural networks. In order to select the RNA with the highest accuracy in recognising the coffee type, several different RNAs were simulated.

I. INTRODUCTION

In the last decade, artificial olfaction systems have been generating a remarkable interest, due to their potential of solving a vast range of problems from different fields. The main areas of application include the already well known pharmaceutical industry, the chemical engineering industry, environmental monitoring, the food industry and now getting into areas which until recently were considered only theoretical concepts such as: telesurgery, identification of crisis circumstances, non-invasive medical diagnosis and identification of persons on biometric basis.

The research leading point consists of the development of an artificial olfaction system based on an intelligent platform with learning and adaptive capabilities to recognize the human biometrical pattern. Developing such a platform presumes FPGA implementation of different Artificial Neural Networks (ANN) through Matlab, ISE or EDK environments, by creating libraries of predefined components necessary for implementing a neural computing system and by user setting of these components to create basically any neural network.

The advantage of using this method consists of the adaptability of the neural network to a given target application that depends on the type and number of the sensors used in the artificial olfaction system, the concentration of the volatile organic molecules present in the analyzed gas and on the ambient environment conditions.

The domain approached as application in this paper refers to the identification of a chosen assortment of coffee. The reason for choosing coffee for the application is its complex composition: according to academic research, more than 700 volatile molecules have been reported, none of these molecules alone being able to represent, in a defining way, a

certain assortment of coffee. Therefore, a certain type of coffee is identified only by considering the whole spectrum of specific signatures consisting of volatile molecules.

The paper proposes an integrated hardware-software environment, to allow the rapid development of an intelligent system using the following resources:

- Sensors specific to the application; - Hardware modules easy to interconnect; - Modules described by means of graphic programming

language Labview, for managing the analog acquisition block (virtual instrument);

- Modules described in programming language MCode for signal processing and for feature extraction;

- Artificial Neural Networks (used for pattern recognition);

Given this framework, developing a system for identifying different olfactory chemical compounds consists of the design and synthesis of modules (described in Labview and MCode) for the acquisition module and the use of neural networks specific application.

The implementation of a system which recognizes different patterns (olfactory signature of organic molecules) and uses neural networks, onto programmable logic circuits such as FPGA (Field Programmable Gate Arrays), is an important step in the creation of intelligent sensory systems.

II. THE ARTIFICIAL OLFACTION SYSTEM – THE E-NOSE

The generally accepted definition of an artificial olfaction system was given by J. Gardner, who states that an Electronic nose is “an instrument which comprises an array of electronic chemical sensors with partial specificity and an appropriate pattern recognition system, capable of recognizing simple or complex odours”[1]. A typical traditional architecture of an e-nose is presented in Fig. 1.

Fig. 1. The traditional architecture of an e-nose

884978-1-4244-7020-4/10/$26.00 '2010 IEEE

2010, 12th International Conference on Optimization of Electrical and Electronic Equipment, OPTIM 2010

Fig. 2. Test chamber

The adopted model of the artificial olfaction system consists of: seven gas sensors (TGS842, TGS826_1, TGS826_2, TGS2600, TGS2601, TGS2602, TGS2620) chosen to respond to a wider spectrum of odours, a temperature sensor (LM35) and a humidity sensor (SY-HS-230) (all mounted in a gas test chamber - Fig.2), a harvesting chamber, three pumps for gas transportation, circuits for sensors conditioning and pumps command, a data acquisition board (PCI-MIO-16E-1), a pattern recognizer module hardware implemented in FPGA (Virtex-4 SX MB - 4VSX35) and a user interface developed in Labview 8.2 - Fig. 3.

A. Data acquisition The application for data acquisition was developed in

Labview as a virtual instrument (.vi file) and has the following tasks: to acquire data generated by all 9 sensors, to pre-process the acquisitioned signals (filtering, drift cancelation) and to save data into a text file format (.lvm file). In this way, the user interface of the created VI allows to set the values for reference signal calculation time, absorption time of the volatile components in the testing chamber, desorption time of the volatile components from the testing chamber and the path and name for the files in which data will be saved, as illustrated by Fig. 4.

The modules that compound the VI are presented in Fig. 5 and consist of: - pumps control module, (1); - data acquisition control module, (2); - sub-VIs control module as function of time, sets by the user,

(3); - pre-processing signal module, (4);

Fig. 3. The architecture of the adopted artificial olfaction system

Fig. 4. The user interface of the VI

- C grade conversion module of the signal generated by the temperature sensor, (5);

- %RH conversion module of the signal generated by the humidity sensor, (6); The results of time setting in the user interface and its

influence on the gas sensor voltage amplitude as volatile compounds absorption are shown in Fig. 6.

Fig. 5. Block diagram of the VI

885

Fig. 6. Voltage variation with baseline time, baseline calculation time,

absorption time and desorption time

B. Features extraction One of the most important components of data processing

is dimensionality reduction to a few descriptors by means of feature extraction in order to form a feature vector or fingerprint. In most cases this is performed by extracting a single parameter (e.g. steady-state, final or maximum response) from each sensor, disregarding the initial transient response, which may be affected by the fluid dynamics of the odour delivery system. In some situations, transient analysis may significantly improve the performance of the gas sensor arrays and should be taken in consideration.

Considering the feature extraction methods reported in literature [2, 3, 4, 5, 6], the heuristic method was adopted, with the following selected features: average value, maximum value, integral of the function, integral of the absorption time function, maximum slope of the absorption time function, maximum slope of the desorption time function and time of maximum slope of desorption function. All features were software extracted by means of an application developed in Matlab. A part of the resulting matrix is presented in Fig. 7 and will constitute the batch data for the pattern recognition system, which will be analyzed in the following section.

C. The pattern recognition system The developed artificial olfaction system (AOS) is an

instrument that tries to mimic the human olfaction system. In this way, the AOS is both a chemical sensing and a data analysis system, developed in order to discriminate between different simple or complex odours.

Amongst the pattern recognition techniques reported in the literature, the artificial neural network represents one than can be considered as being “intelligent”, and its behaviour mimics the human brain.

Considering the important advantages of the hardware implementation of the Artificial Neural Networks (ANNs) over computer simulated ones, explained by small-size, low

Fig. 7. Matrix representation of the selected features

Fig. 8. The proposed method for hardware implemented ANN designing

power consumption and the full exploitation of the parallel operation of the neurones (which gives the possibility to achieve a very high speed of information processing), the hardware implementation of ANN based pattern recognition system seems to be a natural choice for an electronic nose.

According to an European Network of Excellence report [7], the near and long-term future implementation of hardware-based neural networks will be shaped in 3 ways: i) by developing advanced techniques for mapping neural networks onto FPGAs, ii) by developing innovative learning algorithms which are hardware-realizable, iii) by defining high-level descriptions of the neural algorithms in an industry standard to allow full simulations and fabrication by the most appropriate technique and to produce demonstrators of the technology for industry.

Numerous methods to develop hardware implemented ANNs have been reported in the literature in the past decade [8,9,10,11,12,14,15,16]. The adopted solution presumes to change the way in which the user applications are defined. In a classical solution, the application is defined by using a high level language. However, instead of a classical solution, in which the application is defined by using a high level language, it will be more useful and user friendly to create a pattern recognition system, in our case an ANN, by means of configurable modules grouped into a specific library. The immediate advantage of this approach is given by the hardware implementation of different ANNs in the early research phase of the development, with the possibility to establish by simulation the best resolution of data representation (Fig. 8).

III. THE PLATFORM FOR RAPID HARDWARE IMPLEMENTATION OF THE ANN

The main goal is to design a hardware platform powerful and flexible enough to allow hardware implementation in FPGA circuits of an ANN.

In this way, an extendable digital architecture design methodology has been developed, for the implementation of different ANN topologies such as backpropagation neural network (BP-NN) with on-chip delta rule learning, which allows the system designer to concentrate on a high level functional specification.

886

Fig. 9. The flowchart for FF-BP algorithm

For this reason, a new library Simulink block set has been

created, consting of Simulink Xilinx blocks, MCode blocks and VHDL blocks. With these blocks, the designer will be able to develop the entire neural network by parameterizing the ANN topologies as number of neurons and layers. The implementation goal is achieved using the Mathworks’ Simulink environment for functional specification and System Generation, to generate the VHDL code according to the characteristics of the chosen FPGA device.

A. Neural algorithms for hardware implementation The neural algorithms, which must be implemented in hardware in order to emulate an ANN behaviour, are briefly sketched in Fig. 9. For FF-BP, the algorithms involved start with the computation of the output vector: MAC of all inputs with its corresponding weight (the net value) and firing the results with an activation function, the sigmoid one, eq. 3. The principal goal is to minimize the error function calculated with eq. 4 by means of weights adjustment. For this, a corresponding partial derivative error with respect to its net output value is computed (eq. 5). After that, an update stage follows, in which all the weights, hidden and output ones, will be adjusted (eq. 6). The FF-BP network will follow these computation steps until the calculated error will be smaller than a given threshold value.

B. Blockset Design All blocks are designed in System Generator environment

and use basic computing Xilinx blocks, VHDL code incorporated into design by a black box HDL and MCode blocks. The parallelism adopted is a node parallelism one and requires managing all the neurons from the same layer in the same time.

Fig. 10. Hardware model of the FF-BP neuron

The proposed model is constituted by neuronal blocks, organized in hidden and output layers, the control blocks that control and command the behavior of the neurons elements (one MAC unit, a RAM memory block for weights storage) and one HDL block that implement a specific firing function (Fig 11). The firing function adopted is a sigmoidal one and for its implementation a PLAN approximation function was assumed [13]. Due to the node parallelism of the neurons, for each layer in part the designer has to set the layer parameters: weights initialization and the depth of the memory (Fig. 11).

The overview architecture of the proposed FF-BP neural network used for the pattern recognition module of the artificial olfaction system is presented in Fig. 12 and includes as inputs one input layer with seven neurons and one target layer, one hidden layer with seven neurons and an output layer with four neurons. The blocks involved are: a control block of the neuronal system, a neuronal layer block, errors and weights computation of the hidden layer block, target and input blocks and an output layer weights computation block.

Regarding the resources utilization, the hardware implementation of the proposed architecture in a FPGA circuit will lead us to the following results:

Fig. 11. The architecture of the proposed FF-BP NN

887

Fig. 12. Errors distribution / sensor for different data representation

- each neuron from the output layer (Ni) will take 40 LUTs and 4 dedicated multipliers in order to implement the block that calculates the weights;

- each neuron from the hidden layers (Na) will take 49 LUTs and 1 dedicated multiplier in order to implement the block that calculates the weights;

- each neuron from the hidden layers will take other 32 LUTs and 1 dedicated multiplier.

Considering that for a specific network it is possible to make an aprioristic estimation of the utilized resources expressed in terms of RAMs, LUTs and DSP blocks (eq.7):

( )( )

( )( )

__

_

_ _

. 2

. 12

+ 4 3 15 6 2

. 40 8 32

7 200

ctrl blockneuronal block

hidden layer

output layer ctrl block

No RAMs Na Ni

No DSPs Na Ni

Ni Na Ni Ni Na

No LUTs Na Ni

Ni

= +

= + + +

+ + + = + +

= + + +

+ +

(7)

Therefore the total number of the neurons that can be implemented into 4VSX35 circuit is 120, with 80 neurons in the hidden layer and 40 neurons in the output layer.

Fig. 13. Recognition rates distribution vs. data representation for 56-56-4

FF-BP topology

Fig. 14. Recognition rate for the following features: average value (set-

i1), maximum value (set-i2), integral of the function (set-i3), integral of the absorption time function (set-i4), maximum slope of the absorption time function (set-i5), maximum slope of the desorption time function (set-i6),

time of maximum slope of absorption function (set-i7) and time of maximum slope of desorption function (set-i8)

IV. RESULTS - RECOGNITION RATE

In order to find the best FF-BP topology with minimum resource utilization, a series of different FF-BP NN topologies were implemented. At the same time, for every topology, a different number of bits was used for data representation and computation. In the case of an FF-BP NN having a topology of 56-56-4 neurons, meaning 56 neurons on the input layer, 56 neurons on the hidden layer and 4 neurons on the output layer, which processes an input vector that comprises 56 components (8 features per gas sensors (the selected features are analyzed in section 2.B.) and. having 7 gas sensors), the recognition rate results obtained vary from 100%, for 32 bits representation, 50% for 16 bits representation and 0% for 6 bits representation (Fig. 13).

An analysis of recognition rates versus data training with different features was made considering a smaller topology (21-21-4 neurons). It can be clearly seen in Fig.14 that the recognition rate depends on input vector dimensionality and its features component. In this case, the recognition varies from 95% to 75%. Considering different data representations and the training set with the best recognized rate (set 1), a constancy of recognition in the case of data representation range of 32 to 10 bits can be observed. After that, a major drop to 50% will occur for a representation of 5 bits (Fig. 15). Further on, an analysis of the recognition rate function of features kind is made. In this case, just one feature per sensor is considered; therefore, a different topology of FF-BP has been used. The results show that the recognition rate varies from 90% to 35% and for implementations with different date representation, the recognition rate decreases rapidly to 20% starting from a representation of 16 bits.

Fig. 15. Recognition rate vs. data representation for FF-BP with 21-21-4

neurons topology

888

Fig. 16. Recognition rate for different sets of data training

V. CONCLUSIONS AND FUTURE WORK

This paper presents an artificial olfactory system based on an artificial neural network, as pattern recognition module. The E-nose system was developed using the Labview environment with NI data acquisition board and 7 gas sensors used to acquire the organic compounds released by 4 different kinds of coffee (presented in the test chamber).

The pattern recognition module is a neural network hardware implemented in an FPGA circuit, with on-chip learning controlled by generic block units described in VHDL code, MCode and Xilinx blocks. The main advantage of this solution is high modularity and versatility in neural network design. In order to design and implement the neural network, the Mathworks’ Simulink environment was used for functional specification, System Generation to generate the VHDL code according to the characteristics of the chosen FPGA device and ISE Xilinx to simulate the design at different stages of implementation and to generate the bit file.

The neural network architecture is built with generic modules and used to design neural networks that have the following features: on-line training and on-chip learning, all weights have to be initialized prior to the start of the learning process, the initialization of the neurons number per layer, number of layers, weights RAMs must be done by setting the variables from the Function Block Parameters from Matlab environment.

Finally, an analysis of the recognition rate for different FF-BP topology, data representation and features selection was made.

Directions for future work may include: Analysis of new information brought by the pseudo-

sensors. MOS gas sensors are strongly influenced by the heating temperature. Creating pseudo-sensors by heating them at different temperatures may be a solution for improving the information generated by chemo sensors.

Implementation of new types of intelligent recognition systems. In addition to other systems of recognition with neural networks, whose libraries can also be developed, the implementation of fuzzy systems or those hybrid (neuro-fuzzy systems) can be viable alternatives in pattern recognition applications..

Expanding the analysis system. Olfactory sense is very similar to and closely related to the gustatory sense, in fact

supplementing each other. So, starting from the olfactory system and by selecting the appropriate liquid phase measurement sensors and a suitable sampling system, an artificial gustatory sense can be obtained: the electronic tongue.

REFERENCES [1] J.W. Gardner, P.N. Bartlett, Sensors and Actuators B-Chemical, 1994,

18(1-3), 211-220. [2] E. Llobet, J. Brezmes, X Vilanova, J.E. Sueiras, Qualitative and

quantitative analysis of volatile organic compounds using transient and steady-state responses of a thick-film tin oxide gas sensor array, Sensors and Actuators B, 1997, 41(1-3), 13-21.

[3] D. M. Wilson, S. P. DeWeerth, Odour discrimination using steady-state and transient characteristics of tin-oxide sensors, Sensors and Actuators B, 1995, 28(2), 123-128.

[4] J. White, J.S. Kauer, T.A. Dickinson, D.R. Walt, Rapid Analyte Recognition in a Device Based on Optical Sensors and the Olfactory System, Anal. Chem., 1996, 68(13), 2191- 2202

[5] T. Nakamoto, Iguchi, A. and Moriizumi, T., Vapour supply method in odor sensing system and analysis of transient sensor responses Sensors and Actuators B, 2000, 71, 155-160.

[6] R. Gutierrez-Osuna, H. T. Nagle, and S.,S Schiffman, Transient response analysis of an electronic nose using multi-exponential models, Sensors and Actuators B, 1999, 61(1-3), 170-182.

[7] NEuroNet Roadmap, “Future Prospects for Neural Networks,” http://www.kcl.ac.uk/neuronet/about/roadmap/.

[8] B.M. Wilamowski, R.C. Jaeger, M.O. Kaynak, “Neuro-Fuzzy Architecture for CMOS Implementation”, IEEE Trans. Ind. Electron., vol. 46, no.6, pp. 1132-1136, 1999.

[9] M. N. Cirstea, A. Dinu, J. Khor and M. McCormick: "Neural and Fuzzy Logic Control of Drives and Power Systems", Elsevier Science Ltd., Oxford, UK, 2002.

[10] E. Monmason and M. N. Cirstea, “FPGA design methodology for industrial control systems—A review,” IEEE Trans. Ind. Electron., vol. 54, no. 4, pp. 1824–1842, Aug. 2007.

[11] A. Tisan, et. all, Architecture and Algorithms for Synthesizable Neural Networks with On-Chip Learning, 8-th International Symposium on Signals, Circuits and Systems. ISSCS 2007, (1), pag 265 – 268.

[12] A. Tisan, et. all, A Generic Control Block for Feedforward Neural Network with On-Chip Delta Rule Learning Algorithm, 30th International Spring Seminar on Electronics Technology, p. 567-570, 2007.

[13] A. Tisan, S. Oniga, D. Mic, A. Buchman, Digital Implementation of The Sigmoid Function for FPGA Circuits", Acta Technica Napocensis – Electronics and Telecommunications Volume 50, Number 2/2009.

[14] B. M. Wilamowski, N. J. Cotton, O. Kaynak, G. Dundar, "Computing Gradient Vector and Jacobian Matrix in Arbitrarily Connected Neural Networks," IEEE Trans. on Ind. Electronics, vol. 55, no. 10, pp. 3784-3790, Oct. 2008.

[15] A. Dinu, M. N. Cirstea: “A Digital Neural Network FPGA Direct Hardware Implementation Algorithm”, Proc. of ISIE 2007, Vigo, Spain, pp.2307-2312.

[16] J. J. Rodriguez-Andina, M. J. Moure, M. D. Valdes: “Features, Design Tools and Application Domains of FPGAs”, IEEE Trans. on Ind. Electronics, vol.54, no.4, pp.1810-1823. Aug. 2007.

889