Application of Virtual Instrumentation for Sensor etwor Monitoring COSTATI VOLOSECU VICTOR MALITA Department of Automatics and Applied Informatics Politehnica University of Timisoara Bd. V. Parvan nr. 2, Timisoara, 300223 ROMAIA constantin.volosencu@aut.upt.ro http://www.aut.upt.ro/~cvolos/ Abstract: - This paper presents a technical solution for sensor networ monitoring based on virtual instrumentation. Computer developing allows usage of virtual instrumentation for measurement, data acquisition, signal processing, estimation, monitoring, fault detection and diagnosis. The sensor networs may be use as distributed measuring sensors for the physical variables in distributed parameter systems, in space, as temperature, acceleration, pressure, luminosity and humidity. There are many possible applications of monitoring in the field of distributed parameter systems, based on the new technologies of intelligent ad-hoc wireless sensor networs. Key-Words: - monitoring systems, sensor networs, virtual instrumentation, measurements instrumentation, long distance monitoring by Internet. 1 Introduction The paper is made in the general context of the development of monitoring distributed parameter systems, based on the new technologies of sensor networs and virtual instrumentation. Monitoring of industrial systems for a fast detection and diagnosis of faults is a necessary tas in modern control systems. The development of sensor networs, built with many intelligent sensor, at a low cost, maes possible the measurement of different physical variables as: temperature, pressure, luminosiy, and humidity. Usage of estimation techniques allows accurate monitoring, in which the sensor networ may be seen as a distributed sensor. The technology of virtual instrumentation implemented on personal computers has been developed with succes in many electronic applications, measurements, data acquisition, signal processing, system identification, fault detection and diagnosis. The theme of the paper is framed in some important scientific and technical domain, as: intelligent wireless sensor networs, system identification, fault detection and diagnosis, virtual instrumentation on personal computers, distributed parameter systems. The paper presents the results of a development of a virtual instrument for monitoring a sensor networ with capabilitis of measuring physical variable in space. The virtual instrument conects the sensor at the computer, it is capable to acquire information transmited by each sensor in part. An estimator for temperature was implemented based on the least square method [1, 2, 3, 4]. 2 System architecture 2.1 General Structure The bloc diagram of the application is presented in Fig. 1. Fig. 1. Application structure ISS: 1792-4693 264 ISB: 978-960-474-220-2
A high number m of sensor may be used, wireless connected through a gateway to PC. In the computer a monitoring interface and a virtual instrument were implemented, for local monitoring. An estimator for temperature is also implemented. All data are memorised in an Excel data base. The monitoring system offers result tables from its data base. A web server and a data base are implemented for long distance monitoring. Some PC http client may be connected by Internet, through Ethernet conexion, for long distance monitoring. The sensors are wireless connected by a gateway on USB conection to a PC, in which there are the virtual instruments and the estimators. 2.2 System Components The system has the following components. The modern sensors are intelligent devices, they are small, easy to use, portable, with a communication infrastructure, developed for monitoring physical variables as temperature, humidity, pressure, luminosity, vibrations, acceleration. They have low power consumption. Each node has two Crossbow components: 1. a processor module IRIS, which activates the measuring system, at 2,4 GHz. 2. a sensor board for temperature, humidity, pressure, illumination and acceleration. The humidity and temperature sensor has the following technica characteristics: a module with a calibrated digital output, a A-D converter and a serial interface. Measuring range: humidity 0-100%, temperature 40 80 oc, error+/-3,5%, +/- 2oC. The pressure sensor includes a piesoresitiv sensor and a CA interface. Range: 1110 300 mbar, error +/3 %. Luminosity sensor has two fotodiodes and a a-d converter. Range 400 1000 nm. Accelerometer on two axis may be used for movement, vibrations, seismic measurements. Range: +/- 2 g (9,81 m/s2), sensitivity 167 mv/g, resolution 2 mg, analogic interface. The base station is main component of networ, wireless, wit high computation, power and communication resources. It is acting as a gate between nodes and the end user. It has two components: 1. a processor IRIS which is functioning as a base station connected on USB interface. 2. an interface board for data communication. 2.3 Communication Te communication between the sensor networ and the virtual instrument needs the driver for the sensor family. The program pacages are going from each node to the base station, which is acting lie a gate between the compuyer anjd the sensor nodes. The virtual instrument interacts with the base station at the lowest level. It is manipulating pacages from the serial port. The received data are ept in the buffer, until they are requested by the user. The driver assures data conversion. The communication between computers is done based on a relation client server. The cleitn mae a request f services to other program, the server fulfills the request. For the purpose of client visualization of data from the data base the server must open a browser and to introduce an IP address of the server. The sensor networ has its own monitoring program - MoteView. This program is reading data from tha data base PostrgreSQL, installed with the program. 2.4 Functioning Characteristics The system is woring in real time. The sampling period is 9 s. The driver assures data manipulation with a very small delay. The functions of the virtual instrument are: star/stop, data acquisition from sensors, data visualization in different digital formats, estimation, copy of data in an Excel file. The functioning phases of the virtual instrument are: start, setting the connection with the base station, decapsulation of the pacages received from the nodes, ID extraction and the measured values, computing the estimates, based on the previous measurements, testing the good functioning of sensors, stocing data in the data base, data visualization, copy the data in the Excel file, stop. 2.5 Virtual Instrumentation From many years electronic instruments represent self designed products. Today, they are programs in a computers. A virtual instrument is a program, in a PC. ational Instruments developed such technology to implement electronic devices and systems under a program on PC. A virtual contains a control panel and a bloc diagram. The user has at his disposition many virtual instruments from toolboxes. The traditional instrument was defined by its producer. The virtual instrumentation technology offers applications for large domains of measurement, data acquisition, calculus, decision, control. The virtual instruments (VI) are modular, they have an hierarchy, wit many sub-vis. The components of a virtual instrument. with nods and ISS: 1792-4693 265 ISB: 978-960-474-220-2
terminals, are objects which are taing and they are offering data, they have specific tass and they are controlling the program.they are simulating the input/output devices by software. The indicators from panel are simulating the input/output devices and present data as tables, diagrams, signals, and graphics, on digital forms. A source code is built using function representation, to control the panel objects. The bloc diagram contains functions, commends, structures and predefined sub-vis. 2.6 Sensor etwor Capabilities The modern wireless sensor networ has multiple measuring capabilities. So, it can measure temperature, humidity, light intensity or acceleration on 2 axes. For these ind of physical variables the mathematical models are as follows. For temperature: θ θ θ (1) = a + Q( x, y, t) t + x y where Q is the time variable source of heating, positioned in space and θ is the temperature. For light intensity: I Φ S E( x) =, E =, Φ = I = I. α 2 h + x S r (2) where I is the luminous intensity of the light source, at the distance x and high h, as a measure of the source intensity as seen by the eye, E is the luminance at the specific point, defined as a ratio, with Φ representing the flux that stries a tiny area S, calculated considering a spherical surface of radius r, with α representing the solid angle. For acceleration: dv dv x y dx ax = ay =, vx =, vy = dt dt dt dy dt, (3) where the above notations represents the acceleration a x, a y, the speed v x, v y and the space x, y on two axis for an object of the mass m, under a force F. 2.7 Estimator Algorithm For estimation the following variables are considered: -A set of measured variables, obtained from the sensor networare considered: xi ), i = 1,..., m, = 0, 1, 2,..., (4) where x is the physical variable, which could be for example the temperature, in the point P i from the space in which the sensor S i from the networ is deployed, t = h is the time moment, with h the sampling period, the networ has m sensor and to determine an estimator measured value are used. -A set of estimated values x i ) for the variable x; -The error, defined as the difference: ei, = xi ) x i ), i =,..., m, = 1,..., and a quadratic error criterion: 1 2 Ji = ei,, i = 1,..., m 2 j= 1 1 (5) The equation of the linear estimator is: xi + 1) = ai.,0xi ) + ai,1xi + ai,2xi 2) + ai,3xi 3), i = 1,..., m, = 3,..., 1 1 ) + (6) (7) The estimate x i + 1 ) at the time t +1 =(+1)h is obtained using four antecedent values x i 1 2 3 ) and four constant coefficients a 0, a1, a2, a3. To obtain the coefficient we are using the least square method. The coefficients are the solution of a linear algebraic system with four equations: J a j = 0, j = 0,...,3 (8) 3 Results 3.1 Modeling and Simulation The heat circulation was modeled and simulated, the heat transfer parabolic equation. The space was divided in an optimal number of meshes, lie in Fig. 2. The heat variation in space is presented in Fig. 3. The evolution in time of temperature for 5 points is presented in Fig. 4. ISS: 1792-4693 266 ISB: 978-960-474-220-2
Fig. 2. Optimal meshes Fig. 4. Heat evolution in time Fig. 3. Heat variation in plane 3.2 Implementation The bloc diagram of the virtual instrument is presented in Fig. 5. This bloc diagram is implementing all the functions presented above. The control panel with measuring results is presented in Fig. 6. Fig. 5. Bloc diagram ISS: 1792-4693 267 ISB: 978-960-474-220-2
Fig. 6. Control panel with test results The web page with long distance results is presented in Fig. 4. distance monitoring. An estimator is implemented for temperature. Good results were obtained, verified by a quadratic error criterion. The virtual instrument has many applications, as: measuring, estimation, for different process, for example environment monitoring. Fig. 7. Web page 4 Conclusion In this paper a virtual instrument for monitoring a sensor networ is presented. The measured variables are: temperature, humidity, pressure, luminosity and acceleration. The application allows local and long References: [1] M. Tubaishat, S. Madria, Sensor networs: an overview, IEEE Potential, Apr. 2003, Vol. 22, Issue 2, p. 20-23. [2] S. Postalcioglu, K. Eran, E. D. Bolat, Intelligent sensor fault detection and identification for temperature control, Proc. of the 11th WSEAS Int. Conf. on Computers, Greece, 2007, p. 131-134. [3] G.B. Giannais, G.B., Distributed Estimation Using Wireless Sensor etwors, The 12 th WSEAS Int. Conf. On Systems, Heralion, Crete Island, Greece, 2008. [4] C. Volosencu, C., Algorithms for Estimation in Distributed Parameter Systems Based on Sensor etwors and AFIS, WSEAS Trans. on Systems, Issue 3, Vol. 9, 2010, pp. 283-294. ISS: 1792-4693 268 ISB: 978-960-474-220-2