Vous êtes sur la page 1sur 6

A WSN-based Large Electrical Equipment On-line Monitoring System

Yongming Yang, Xuejun Chen, Xiong Zhuang,Wei Ding State Key Laboratory of Power Transmission Equipment & System Security and New Technology Chongqing University, Chongqing 400044 China. Email: yangyym@cqu.edu.cn
Abstract In this paper, a new wireless sensor network (WSN) for large electrical equipment on-line monitoring is proposed, designed and implemented. The design of the wireless monitoring system emphasizes to solve the problems of traditional wired online monitoring system wiring too much, cost too high, fault diagnosing and maintaining difficulty and so on. The hardware design for wireless sensor network node and base station based on the CC2431 chip and the program design of transplanting TinyOS into the sensor nodes and base stations are discussed in detail. Then, a based on Visual C++ and database program technique system management software is proposed and implemented. The experiments show that the system possesses real-time data gathering, data storage and search, data curve drawing, low power consumption, wide coverage, no region limitation, and good operation performance. Keywords- CC2431, on-line monitoring, TinyOS, WSN

standard package framing, and then the data frames will be transmitted to the nearby nodes, or these nodes receive data frames from other nodes, and adding multi-hop information, package framing, and then the new data frames are transmitted. Until transmit the data frame to the base station, base station will directly upload the receiving data to computer. In the network, all nodes information uploaded to the computer will do complex digital processing, and will be integrated managed by database system. These data can be linked to the Internet through computer and interact with the remote host, thus achieving the remote fault diagnosis.

I.

INTRODUCTION

On-line monitoring of large electrical equipment is an important means to prevent electric power system failures. Currently, the communications of large electrical equipment on-line monitoring is wired [1]-[4], which caused the wiring complexity, vulnerability increased, maintenance and mend hard. To overcome the restrictions of wired sensor networks, we propose to use a wireless sensor network for electrical equipment on line monitoring. Wireless sensor network is a new control network technology, integrated sensor technology, embedded computer technology, modern network technology, wireless communication technology and distributed intelligent information processing technology. The proposed network consists of the same or different functional intelligent wireless sensors. It is an intelligent network application system, which can implement the data acquisition, the data fusion and the data transmission. Its self-organization, adaptability and flexibility topology can greatly enhance reliability of on-line monitoring system. II. SYSTEM DESIGN The system framework is shown in Fig. 1. In large electrical equipment such as transformers, we installed wireless sensor network nodes on the external of their insulators and the winding. These network nodes are ultraviolet pulse sensors, ultrasonic sensors, temperature sensors, humidity sensors and other sensors. When winding or insulator surface discharge, the nodes can detect the discharge signals and executive signal quantization, simple processing, and the IEEE802.15.4 [5]

Fig. 1. System framework.

III.

NODES AND BASE STATION DESIGN

A single node is a typical resource-constrained embedded system. It needs many functions like environmental awareness, data transmission and processing capabilities, receiving and execution instructions and other network functions. So every node needs a small operating system to organize and manage the hardware, software and complete its function. TinyOS is a small operating system for wireless sensor networks which was developed by the University of California, Berkeley [6]. But the core of platforms which TinyOS supports are separate with the radio frequency transceiver, so it must affect the nodes energy saving. The hardware of nodes and base station use CC2431 System-onChip as the processing core. Its high integration level overcomes the above shortcomings, and the node size is greatly decreased. It coupled a PCB antenna, so the system is further enhanced power conservation.

978-1-4244-5046-6/10/$26.00 c 2010 IEEE

1849

A.

Hardware Design The CC2431 is highly suited for systems where ultra low power consumption is required. This is achieved by various operating modes. Short transition times between these modes further ensure low power consumption. The hardware framework is in Fig. 2. The main circuits include the power supply circuit, CC2431 external circuit, sensors circuit, flash ROM, serial interface and three lightemitting diodes. The power supply circuit composes by three 1.2 V batteries. The power input required some filter capacitors to inhibit the major harmonic interference. And then we divide digital power and analog power from the power input. The digital power direct access to the power input; the analog power access to the power input through a bead.

Write Hardware Presentation Layer and Hardware Abstraction Layer: The wiring framework of the radio frequency configuration file CC2430RadioC is in Fig. 4. This file is a hardware abstraction layer file. It wires the lower level layer files CC2430RadioM CC2430ControlM CC2430TimerM HPLCC2430RFInterruptM and LedsC to form the radio frequency module. This configuration provide radio frequency functions to higher level layer by the interfaces StdControl BareSendMsg ReceiveMsg CC2430Control SplitControl MacControl RadioCoordinator. According to the different application we can add other interfaces, but required to revise the configuration and the related modules.

Fig. 2. Hardware framework.

Software design Software design mainly discussed about TinyOS transplantation. Since the transplant work includes many components, the paper first discussed a typical example of radio frequency components transplantation. TinyOS transplantation in the 8051 core is different from TinyOS transplantation in AVR/MSP430/PIC/ARM core, because nesC compiler bases on the GCC (GNU Compiler Collection), but GCC does not support cross-compile for the series of MCS-51 core [12]. The whole process of this transplantation is shown in Fig. 3. We illustrate the transplantation process by a typical example of radio frequency components transplantation as follows.

B.

Fig. 4. Radio frequency configuration framework.

The functions of every module in radio frequency configuration: CC2430RadioM is a hardware abstraction layer file, and most of radio frequency functions were realized in this module component. It realize data messages sending and receiving tasks, including data framing and various MAC protocols such as CSMA / CA, MAC layer conversation and so on. CC2430ControlM is a hardware presentation layer file. It present the radio frequency controls to various functions for CC2430RadioM calling. HPLCC2430RFInterruptM is a hardware presentation layer file, mainly dealing with the services of radio frequencyrelated interruption, and providing event signals for CC2430ControlM and CC2430RadioM. CC2430TimerM is a hardware presentation layer file, which provides the MAC control clock for radio frequency component, for example, counting the frame transmitting time by capturing the start of frame delimiter signal. LedsC module is hardware abstraction layer file. It provides radio frequency component running instructions by three lightemitting diodes. 1) NesC Compile for TinyOS: When we complete writing the hardware presentation layer files and hardware abstraction layer files, we combine with an application to compile into app.c by nesC compiler. Before compile, we must add the platform parameter into the file \apps\makerules and set up a platform configuration file called .platform in the directory of new platform.

Fig. 3. The whole transplantation process

1850

2010 5th IEEE Conference on Industrial Electronics and Applicationsis

We add the new platform name CC2431 after the code PLATFORMS = in the file makerules. We create a new file .platform in the directory of CC2431 platform. Here is the content of the file: @opts = ("-fnesc-target=keil", "-fnesc-no-debug"); Note that nesC compiler can not identify the IAR option, so we set the option by keil. After the two steps, we can use nesC compiler to compile the application. 2) Syntax Editing Script: Syntax editing script is used to couple app.c and IAR Embedded Workbench. There are much syntax in app.c can not be identify by IAR Embedded Workbench, so we must convert those codes syntax into the IAR syntax. In app.c, there are thousands lines of codes. So it is very cumbersome, time-consuming and prone to error if we change them by manual. So we need a text editing script to change the codes automatically. This syntax editing script is created by perl (Practical Extraction Report Language). Perl has many applications in the Internet programming. It has simple syntax, wide use range, cross-platform, objectoriented, embedded files, C / C++ Links and easy debugging features. We utilize the powerful text editing function of Perl [13] . The change of codes: Add // before the codes typedef int sfr; and typedef int sbit;DBG debugging codes, line command codes and other useless codes for IAR Embedded Workbench. Change register definition codes like sfr P0 __attribute((x80)); into SFR(P0,0x80). Change the codes accessing to external data storage ((unsigned char *) 0) [addr] into ((unsigned char volatile __xdata *) 0)[addr]. Change the codes calculating the data offset like (size_t )& ((struct TOS_Msg *)0)->data into(size_t)(unsigned long)&((struct TOS_Msg *)0)->data. Wipe off the 64-bit long long type, and change all long long type data to 32-bit long type. Change the beginning codes of interrupt service routine like void __attribute((interrupt)) __vector_16(void)or void __attribute((signal)) __vector_16(void) into #pragma vector=RF_VECTOR __interrupt void RF_IRQ(void) After the script we convert app.c to IARapp.c, and then we can debug and program IARapp.c in IAR Embedded Workbench. 3) Debugging And Programming: We can debug and program directly in the Integrated Development Environment IAR Embedded Workbench for 8051. This step refers to Reference [14]. IV. SYSTEM MANAGEMENT SOFTWARE DESIGN

the sensor nodes, and then realize the function of predicting the failure. Visual C++ provides a unique graphical user interface (GUI), which is more flexible than other tools and more easily comprehensive. The primary character of Visual C++ is that provides the Microsoft Foundation Class [15] (MFC) libraries which not only encapsulate the Windows Application Programming Interface (API) functions and but also establish the structure of the application, letting programmer can concentrate on solving the problems of the project. We adopt Visual C++ and language C++ as the exploitation platform and language The software flowchart is shown in Fig. 5. We use Visual C++ and SQL Server 2000 to realize the system immediate communication and data management. A. Real-time data collect and curves In this part, firstly we should collect data through serial port, and then analyze and extract data, finally use MFC (Microsoft Foundation Classes) to draw a relative curve and display the dynamic curve.

Fig.5. System flow chart

In order to make the above-mentioned WSN be really used in electrical equipment on-line monitoring, a management software is needed to monitor and manage the data between

1. Multithreading CSerialPort Classes The multithreading CSerialPort[16] Classes provides the function of monitoring assistant thread to deal with the serial port events, using superposition I/O to realize unblocked communication. The main task of assistant thread is to monitor the serial port situation. The main thread executes other tasks such as affording friendly User Interface (UI), saving data and so forth. Because monitoring the electrical equipment on-line monitoring system is required long time operation and high communication stability, we choose this way to communicate. 1) Define serial port handle and thread in serial port classes .h files HANDLE m_hCom; CWindThread* m_pThread; 2) Open and set serial port a) Define the object of serial port in the user application .h file CSerialPort m_ComPort;

2010 5th IEEE Conference on Industrial Electronics and Applicationsis

1851

b) Calling serial port classes initialize the InitialPort function InitialPort(CWnd* pPortwnd //Receive data pointer UNIT portnr, //Port ID UNIT baud //Baud rate of serial port char parity, //Odd-even efficacy UINT databits, //Data bit UINT stopbits, //Stop bit DWOR dwCommEvents //Receive bit event UNIT writebuffersize) //Write buffer size In the initialization serial port function, serial port is opened, relative parameters are set, user control events are created and critical section are initialized. nterCriticalSection and LeaveCriticalSection function are used to exclusiveness call in the queue form. 3) Start-up the assistant thread to deal with the serial port events After the serial port is rightly set, we need to start the StartMonitoring function. m_ComPort StartMonitoring(); //Start-up serial port monitoring function The function is used to create serial port monitoring thread. It calls the AfxBeginThread function to create monitoring thread m_pThread, which will execute CommThread function in a endless loop when it is stimulated. During the circulation, the WaitCommEvent function is used to get data from serial port and handle different events in different types. If some serial port events have happened, the WaitForMultipleObject function will be used to estimate whether the response events have happened or not. This function is also used to inspect m_hEventAarray event group. If there is no signal during the event groups time, the function will be in blocked situation which means the function will be in an endless inspect situation. If there is a signal during the event groups time , the function will return signal index of the event, then estimate which event it is and execut writing and reading operations of the serial port. The ReceiveChar function which is used to read the date of the serial port and the WriteChar function are respectively realized by calling Win32API function named ReadFile and WirteFile. Finally, we need to add user serial port receive and send function and close function which will not be given more details in this paper. 2. Node data Analysis and extraction When data are continually stored in the temporary memory from the serial port, these data cant be used except being analyzed. Therefore, we must extract the information from the temporary memory through some programming, and transform it into useful information for decision-making. The programming flowchart for extracting node data is shown in Fig. 6. 3. Real-time curve We use the data received from the serial port to draw curves by LineTo function. First of all, we need to define an overall variable which is used to save the collected the numerical values of the data, then in the OnPaint function which is used to draw curves, we use the overall variable to be the vertical

coordinate and 100 equation dots to be abscissa coordinate, and then connect these dots by beelines. When the numerical

Fig.6. Analyze node data flow chart.

values in the overall variable have changed, the Invalidate function will be used to load OnPaint function that the curve can be dynamic and real-time. void CCommDlg::OnPaint() { if(NextTime<= 600 && stop==FALSE) { LineHight[NextTime/6]= LineHight[101]; } else { for (int i=0;i<100;i++) { LineHight[i] = LineHight[i+1]; } LineHight[100]=LineHight[101]; } NextTime = NextTime+6; this->Invalidate(); return; } B. Real-time database In order to conveniently search and manage the sensor data, realize the electrical equipment on-line monitoring and fault diagnosis, we need to design the real-time database to store the information of the collected sensor data. The real-time database system structure is shown in Fig. 7.
Data source
COM Acquisition

Visual C++ Programme

Database Interface

SQL Server 2000

Fig.7. Real-time Database System

1852

2010 5th IEEE Conference on Industrial Electronics and Applicationsis

1.

Create the Database We can conveniently create the database and design the tables need by the corporation manager of SQL Server 2000[17]. In this paper, we store the data in the node_info table which include node_id, data_num, group, data, time which respectively means node id number, data package number, the group of the node, node data and storage time. Database Interface ADO [18] (Active Data Object) is the new interface s exploited by Microsoft database application programming. It is an advanced visiting technology built on the OLE DB. ADO encapsulates many sub layer work, which is very convenient, has high speed, and needs small memory to handle it. Use flow: 1) Initialize COM library, and import ADO library files. We use AfxOleInit function to initialize COM library, and use #import instruction to import ADO library. 2) Connect database 3) Utilize the built connection to get record set to search and handle data through Connection and Command objects to execute SQL commands. 4) Close and release objects. 3. Insert and renew data In order to realize real-time storage, firstly we should insert data into node_info table which is received by serial port, and use SQL language to realize sql=insert into node_info, then use updata to renew the table. In this paper, we not only set a timer to insert node data and also design a background thread. With the discussion above, we realize the system management software. The system interface is shown in Fig. 8. The data is instantly collected which demonstrates the information of transformers temperature. Following the design thoughts of software engineering, this PC management system can directly reflect the objects situation and realize real-time storage which offer materials for on-line monitoring that satisfy the users requirements. V. CONCLUSION 2.

Fig. 8. System interface

REFERENCES
[1] H. C. Lin, "Intelligent Neural Network-Based Fast Power System Harmonic Detection," IEEE Trans. on Industrial Electronics, vol. 54, no. 1, pp. 43-52, Feb 2007. [2] H.Su, K.T. Chong, "Induction Machine Condition Monitoring Using Neural Network Modeling," IEEE Trans. on Industrial Electronics, vol. 54, no. 1, pp. 241-249, Feb 2007. [3] M. Blodt, D. Bonacci, J. Regnier, M. Chabert, J. Faucher, "On-Line Monitoring of Mechanical Faults in Variable-Speed Induction Motor Drives Using the Wigner Distribution," IEEE Trans. on Industrial Electronics, vol. 55, no. 2, pp. 522-533, Feb 2008. [4] A.M.Gaouda et al., " On-Line Detection and Measurement of Partial Discharge Signals in a Noisy Environment," IEEE Trans. on Dielectrics and Electrical Insulation, vol. 15, no. 4, pp.1162-1173, Aug 2008 [5] A. Ghose, J. Grobklags and J. Chuang. Resilient data-centricstorage in wireless ad-hoc sensor networks, in Porceedings of the 4thInternational Conference on Mobile Data Management (MDM03), 2003, pp.45-62. [6] J. Hill, System Architecture for Wireless Sensor Networks, USA: University of California, Berkeley,CA, 2003. [7] Chipcon AS. (2006). CC2430 PRELIMINARY Data Sheet (Rev. 2.01). Available: http://focus.ti.com/lit/ds/swrs036e/swrs036e.pdf. [8] Chipcon AS. (2006). CC2431 PRELIMINARY Data Sheet (Rev. 1.01). Available: http://focus.ti.com/lit/ds/symlink/cc2431.pdf. [9] G E Jonsrud. (2006). Folded dipole antenna for CC2400, CC2420 and CC2430. Available: http://focus.ti.com/lit/an/swra093/swra093.pdf. [10] Atmel Corporation. (2002). AT45DB041B Data Sheet. Available: http://www.atmel.com/dyn/resources/prod_documents/doc3443.pdf. [11] Yu Haibin et al, Intelligent Wireless Sensor Networks, Beijing, Science Publishing Company, 2006, pp. 286-292. [12] Anders Egeskov Petersen. Et al. (May 2006). Towards TinyOS for 8051.Available: http://www.tinyos.net/dist-2.0.0/tinyos2.x/doc/html/tep121.html. [13] Long Yang, Shi Po et al, Perl5 Practical Programming, Beijing, China , Water Power Press, January 2001. [14] IAR Systems. (December 2004). IAR Embedded Workbench IDE User Guide. Available: fttp://fttp.iar.se/WWWfiles/guides/ide/ouew-3.pdf. [15] Jeff Prosise, MFC Windows Programmer,2nd ed. Beijing, China, Tsinghua University Press ,2004. [16] X. Li Visual C++ Serial Port Communication Technology and Project, 2nd ed. Beijing, Post & Telecom Press, China, 2006.

The paper presents a new wireless sensor network (WSN) and realizes a system management software for the large electrical equipment on-line monitoring. We will take full advantage of the CC2431 node location engine to add localization procedures for monitoring network node for future work. According to nodes working in different environment, we will add solar power generation and thermal power generation for enabling wireless sensor power management more flexible, and extension the wireless sensor network life cycle. ACKNOWLEDGMENT This work is supported by the Chongqing Natural Science Foundation of China Project -- CSTC, 2007BA3001.

2010 5th IEEE Conference on Industrial Electronics and Applicationsis

1853

[17]

S. Gao, Familiarity SQL 2007.

Beijing, Post & Telecom Press, China,

[18] Q.F. Hou et al.

Visual C++ Database Current Module Exploitation Beijing, Tsinghua University Press

and System Transplantation China, 2007,pp.20-40.

1854

2010 5th IEEE Conference on Industrial Electronics and Applicationsis

Vous aimerez peut-être aussi