Embedded Web-based Power Quality Data Logger

0 downloads 0 Views 1MB Size Report
controller is attached to the Ethernet controller, and then connected to the PC or Ethernet via the registered connector (RJ45). Another controller is fixed to the.
Journal of Engineering Technology Vol. 1: 58-62, 2011 ISSN 2231-8798 © 2011 UniKLBMI

Embedded Web-based Power Quality Data Logger I. Adam1, A. Mohmmed2 & H. Sanusi2 1

2

Electronic Section, UniKL-BMI, Gombak, Selangor, Malaysia Faculty of Engineering and Built Environment, Universiti Kebangsaan Malaysia, Bangi, Selangor, Malaysia Corresponding email: [email protected]

Abstract: This paper presents the development of the web-based Power Quality (PQ) data logger using the embedded web server (EWS) connection. It is designed to generate and save single phase voltage and current data at the PQ monitoring sites. The data can be downloaded remotely through the web browser for further PQ assessments. The data logger operates based on the embedded web server technology thus giving an advantage in terms of lower cost and simplicity. This paper highlights on the embedded code developed for downloading data via the web browser using the EWS connection embedded web system. The novelty of the developed web-based PQ data logger is in independency on processing the PQ data at the customer sites. Keywords: PQ assessment, remotely.

is increasing yearly. With Ethernet connectivity, the data stored in the instrument can be accessed remotely at almost no extra cost. Power quality assessment depends merely on the monitored voltage and current data of the power supply system. For that reason, the instrument that is able to generate and relay the data via the browser is vital for PQ assessment. Thus, the prototype PQ data logger is installed with Ethernet connectivity to support remote data downloading.

1.0 INTRODUCTION A concern in power quality (PQ) is stimulated by the advancement in power generation, distribution and user’s application. In dealing with PQ issues, regulations have been developed to standardize PQ practices [1]. The main purpose of developing PQ regulation is to ensure quality power being supplied to customers. The enforcement of PQ regulation initiates a new dimension in power system. It results in the power utility having the responsibility to regulate the power supply up to the standard specified in the regulation. In addition, such regulation affects the socio-economic rational operation and business related operation. In practice, instrument to assess the quality of supplied power has to be made available. The development of PQ monitoring instrument started with a simple data logger that has the capability to generate PQ data over a period of time. In processing sampled data, usually a PQ application software is developed to process the data for specific PQ parameters. In contrast, the newly designed PQ instrument is able to process the data internally. It supports power system predictive maintenance, energy management, cost management and quality control. Unfortunately, such PQ instrument is expensive. In general, majority of PQ monitoring instruments do not provide immediate communication in which PQ data is normally stored in the SD memory card and physically fetched when necessary for off-line processing [2]. This procedure is not economical because the cost of deploying personnel to acquire and process PQ data at customer sites

2.1 COST IN DEVELOPING PQ INSTRUMENT The cost of PQ instrument depends on the development cost, manufacturing cost, quantity, installation and supporting cost [2]. This implies that, besides practicing a good manufacturing technique, the main components required in designing the instrument must not be costly. The instrument should be easily installed and requires minimum technical support after delivery. In addition, it should be produced at a reasonably high volume so that the development cost per unit is low. Due to the rapid development in the Very Large Scale Integration (VLSI) technologies, integrated chip can be manufactured at a lower cost. It is reported that the price of the same component reduces to one tenth of the previous ten years price. The reduction in cost benefits a few other technology such embedded system. From a simple application such as handheld temperature sensor, the embedded system application invokes the web-based technology. For example, the Ethernet chip that was not economic for the embedded system application in the last 58

Journal of Engineering Technology Vol. 1: 58-62, 2011

decade is widely used in many control application recently . In addition, the advancement has also lead to the manufacturing of smaller and low power integrated chips. Manufacturing smaller sized chips provide a tremendous reduction in manufacturing cost and renders smaller sized instrument. The conventional PQ instruments are bigger in size and for this reason, the shipment and installation costs become expensive. However, with smaller sized PQ instruments, the shipment cost is reduced thus making the overall instrument cost cheaper. If the instrument cost becomes low, there will be more demand for the instrument. Presently, the cost of PQ instrument based on digital signal processor or microcontroller with internet connectivity is competitive [3,4,5].

As shown, two microcontrollers are used in the design in which the first microcontroller (processor) handles the sampling of the data and processing if any. It is called as processor. The second microcontroller (publisher) handles the publishing of data. The data in the SD/MMC card is kept in a number of blocks. The block of one Megabyte size could be accessed by using the unique code. Upon requesting the data downloading, the publisher requests the data from the processor by sending appropriate codes. In response, the processor retrieves data in the selected block and passes the data to the publisher through a serial port. The transferring of data is controlled by a simple handshaking protocol. The data received by the publisher will be transferred into the file of .dat extension. The requesting, transferring and downloading of data continue until the end of data is encountered.

[3]

2.2 DESIGN OF THE WEB-BASED PQ DATA LOGGER

2.3 HARDWARE PROTOTYPE OF THE POWER QUALITY DATA LOGGER The hardware prototype of the developed web based PQ data logger instrument is shown in Fig. 3. The prototype is developed based on the Explorer 16 microcontroller training kit available from the MICROCHIP®. To enable Ethernet connectivity, one controller is attached to the Ethernet controller, and then connected to the PC or Ethernet via the registered connector (RJ45). Another controller is fixed to the SD/MMC card for data saving. Both of the controllers are integrated via the RS232 connector. With this connection, the two controllers are able to communicate with each other.

Fig. 1 Configuration of the low-cost web-based PQ data logger Fig. 1 shows the configuration of the developed webbased PQ data logger which is connected to the Ethernet through the Ethernet hub. The Ethernet connectivity enables the instrument to be accessed through the web browser locally or remotely. The high level block diagram of the instrument is shown in Fig. 2. The main components of the instrument are the signal conditioning module, MICROCHIP PIC24F240GA010 microcontroller, SD/MMC card and ENC28J60 Ethernet card. The voltage and current sensors are connected to the internal Analog to Digital Converter (ADC) via signal conditioning circuits.

Fig. 3 Hardware prototype of the PQ data logger Fig.2 High level block diagram of the low-cost web-based PQ data logger 59

Journal of Engineering Technology Vol. 1: 58-62, 2011

2.4 THE SOURCE CODE QUALITY DATA LOGGER

OF

THE

POWER

The data that is kept in the SD/MMC card of the processor can be downloaded by the publisher provided that there is a mechanism to pass the data kept in the SD/MMC card to the publisher. It has been shown that the modified serial communication technique can be used to handle that problem [6]. The software platform is based on the TCP/IP driver that is freely available from MICROCHIP. For simplicity, only the modification on the code is discussed in this paper.

Fig. 4 The download outlook The slight modification on the web page is performed by adding the menu to download the data. In the web page shown in Fig. 4, the data from FILE1 up to FILE4 can be selected by clicking on the appropriate menu. This is made possible by adding the web page script as shown in the snippet code below to the system’s web page.

This page enables downloading of raw data (voltage and current) for off-line processing

Please be patient, it takes a few minutes to transfer all the data.

Download Data FILE 1

Download Data FILE 2

Download Data FILE 3

Download Data FILE 4



The function handles the request of data from the processor. Once the data is received it will be published into the magic.dat file. The function is terminated by indicating either the received code is the code to indicate no SD/MMC card is detected at the processor or end of file. In case the processor is not ready for transferring data, the callback function will be recalled.



In the web file directory, the dummy text file of magic.dat must be created. The file contains only dynamic variable of the created file for instance ‘~magic~’. In this case, whenever the HTTP2 web server module encounters the variable (when the menu is clicked), the callback function which has an extension of _magic will be executed. For that matter, the callback function ‘HTTPPrint_magic’ shown by the flowchart below is written in the C application file (CutomHTTPApp.c).

3.0 EXPRIMENTAL SET UP AND TESTING In implementing the developed web-based PQ data logger, the experimental set up shown in Fig. 5 is developed. Upon power up, the instrument samples and saves the power line voltage and current data in the SD/MMC card.

60

Journal of Engineering Technology Vol. 1: 58-62, 2011

Fig. 5 Experimental set up for downloading data from the web-based PQ instrument 4.0 RESULTS

Fig. 7 The plot of the downloaded data

The data logger can be accessed by the web browser as shown in Fig. 4. The data is transferred into a file of .dat extension when the download button is clicked. The data is downloaded at a baud rate of 3.6 kb/s [6]. Upon downloading, the desktop notepad application can be used to unwrap the file. Fig. 6 shows the data that resides in the file magic1.dat. As shown, the 16 sampled current and voltage data is arranged in a row. The current resides in the odd column while the voltage resides in the even column. The raw data is in its digital equivalent representation.

Fig. 8 Measured voltage and current – (voltage on top and current at bottom) Fig. 6 Sampled data in magic1.dat

5.0 CONCLUSION

To evaluate the web based PQ data logger, the Power Quality Application Software (PQAS) based on MATLAB GUI has been developed to analyse the downloaded data. The PQAS retrieves, reconstructs, plots and processes the original data. As shown the GUI calculates PQ parameters in terms of THD of voltage and current as well the phase angle [7]. Fig. 7 shows the plot of the downloaded data. The original sampled voltage is plotted on the left upper row, and the original sampled current is plotted in the left bottom row. As shown the reconstructed voltage and current in Fig. 7 is identical to the voltage and current signals measured by an oscilloscope as shown in Fig. 8. The results indicate that the developed web based PQ data logger has successfully sampled, saved and transferred the PQ data remotely via the web browser.

The web-based PQ data logger has been developed for monitoring of the power network through the web browser. It is developed by utilizing the Embedded Web Server (EWS) embedded web system. It order to accomplish the objective of the project which is using the EWS embedded web system in the design, the embedded web system is limited to the task of publishing the data. The task of sampling and saving of the PQ data is delivered to another embedded system. In this way, the speed of the EWS embedded system is optimum used for publishing the data, enhance the speed of data downloading and allows system to work in real time. Consequently, the technique of downloading the data via web browser from the embedded web system is also developed. The html codes to enable the downloading of data is introduced in the web page files and the callback 61

Journal of Engineering Technology Vol. 1: 58-62, 2011

function to handles the publishing of data requested for downloading is added to the application C file. The work demonstrates that by including Ethernet connectivity to the PQ data logger enables the PQ data to be transmitted remotely via the web browser. In due course, the PQ data can be processed at the receiving end so as to eliminate dependency on processing the PQ data at the customer sites. ACKNOWLEDGEMENT The work reported in this article is the milestone of the project entitled Low-cost Web-based Power Quality Instrument. The technical supports by colleagues and laboratory staff of UKM are gratefully acknowledged.

REFERENCES [1] D. B. Vannoy, M. F. McGranaghan, S. M. Halpin, W. A. Moncrief, and & D. D. Sabin (2007). “Roadmap for PowerQuality Standard Development,” IEEE Transactions on Industry Applications, 43(2), pp. 412-421. [2] McEachern (2008), “A New, Ultra-low-cost Power Quality Measurement Technology,” in 2nd International Conference on Modern Power Systems, pp. 302-304. [3] M. Aiello, A. Cataliotti, V. Cosentino and S. Nuccio (2004). “A Low Cost and Easy Re-configurable Instrument for Power Quality Survey,” in Instrumentation and Measurement Technology Conference, 3, pp. 1752-1757. [4] J. Batista, J. L. Afonso and J. S. Martins (2003). “Low Cost Power Quality Monitor Based on a PC,” in IEEE International Symposium on Industrial Electronics, 9(1), pp. 1013-1018. [5] G. H. Yang, B. Y. Wen (2006). “A Device for Power Quality Monitoring Based on ARM and DSP,” in IEEE Conference on Industrial Electronics and Applications, pp. 1-5. [6] I. Adam, A. Mohamed, H. Sanusi (2009). “Modified Controller to Controller Communication through USART,” in International Conference on Engineering Technology.

[7] I. Adam, A. Mohamed, H. Sanusi (2009). “Simple Phase Angle Measurement of Two Periodic Signals,” in Proceeding of 2009 Student Conference on Research and Development.

62