Development of a web-based remote load supervision and control system

Development of a web-based remote load supervision and control system

Electrical Power and Energy Systems 28 (2006) 401–407 www.elsevier.com/locate/ijepes Development of a web-based remote load supervision and control s...

606KB Sizes 2 Downloads 55 Views

Electrical Power and Energy Systems 28 (2006) 401–407 www.elsevier.com/locate/ijepes

Development of a web-based remote load supervision and control system Wei-Fu Chang, Yu-Chi Wu *, Chui-Wen Chiu Department of Electrical Engineering, National United University, No. 1 Lien-Da, Miao-Li 360, Taiwan, ROC Received 18 December 2004; received in revised form 15 December 2005; accepted 25 January 2006

Abstract The ability to remotely acquire information and even to control appliances/devices at fingertips over the Internet is becoming desirable to the general public as well as professionals. In this paper, a web-based remote electric load supervision and control (WBRELSAC) system with automatic meter reading and demand control via programmable logic controllers (PLCs) is presented. For both utilities and industrial/commercial customers, the electric load supervision and control (ELSAC) system is a critical function to their load management. However, most high voltage customers do not have enough capital to build a regular-scale supervisory control and data acquisition system as the one for utilities. Therefore, we adopt the industrial-widely-used PLCs in WBRELSAC. In order to make a non-web-based PLC become web-controllable, we develop a graphical-control interface and utilize Internet techniques to implement our system. Based on the performance test conducted under the Laboratory environment, the proposed WBRELSAC architecture is cost-effective and suitable for industrial applications. q 2006 Elsevier Ltd. All rights reserved. Keywords: Web-based control system; PLC; Load supervision and control; WWW; Internet

1. Introduction From the workplace to the home, different types of end users make use of different kinds of devices/instruments every day. The need to access information concerning these devices/instruments has forced technology to evolve dramatically. As part of the evolution, effective performance monitoring and remote control of these devices are now a primary interest for many commercial and industrial businesses. Due to the advances in the Internet, the ability to acquire information and even to control devices at fingertips over the Internet is becoming desirable to the general public as well as professionals. The Internet is now providing a new and increasing important medium for distributing information world wide without time constraint, permitting information to be displayed numerically and graphically on any client platform. This has generated the concept of ‘Web-Based Supervision and Control System’ to allow end users to access the real-time data and to control the instruments via a web browser. Medida, et al. [1] presented a supervisory control and data acquisition (SCADA) system on the Internet for energy * Corresponding author. Tel.: C886 37 350846; fax: C886 37 327887. E-mail address: [email protected] (Y.-C. Wu).

0142-0615/$ - see front matter q 2006 Elsevier Ltd. All rights reserved. doi:10.1016/j.ijepes.2006.01.004

management system (EMS), using Java applets and Java database connectivity (JDBC) APIs (application programming interfaces) to make SCADA database accessible and available to the remote man machine interfaces (MMIs) through web browsers. No vendor dependent hardware, software and application are required at the remote location for SCADA. Just an Internet connection is required and the remote MMI can be accessed from any corner of the world. Georges and Aubin [2] presented a PLC-based system for on-line monitoring of power transformer to give access to a Web page where the current performances of the transformer can be monitored. Ref. [3] presented a web embedded PLC that had two key communication functions: embedded HTTP server and Ethernet TCP/IP connectivity, applied to substation automation, enabling the utility enterprise to access to PLC realtime data using standard browser technology. In this paper, a web-based remote electric load supervision and control (WBRELSAC) system with automatic meter reading and demand control via programmable logic controllers (PLCs) is presented. For both utilities and industrial/commercialcustomers, the electric load supervision and control (ELSAC) system is a critical function to their load management. Based on the statistics from customer information system of Taipower system, more than 40% of high voltage customers have demand contract violation problems. According to Taipower electric charge rule, the electricity bill for high voltage customers counts both basic and floating charges [4]. The portion of peak power exceeding

402

W.-F. Chang et al. / Electrical Power and Energy Systems 28 (2006) 401–407

demand contract will be penalized by two or three times of normal charge rate. Without a proper ELSAC system to monitor and control loads, industrial and commercial customers have to pay extra penalty fee for mis-managing their loads. Moreover, improper demand side management causes the increase of system peak load and decrease of spinning reserve, jeopardizing system security and raising the required installed generation capacity. For this reason, most electric utilities install their own SCADA systems to fulfill functions of load control, energy management, distribution automation, and automatic meter reading. However, since the cost of building a SCADA system is expensive, most high voltage customers do not have enough capital to build a regular-scale SCADA as the one for utilities. Cho and Huang [5] presented a cost-effective but non-webbased PC-based energy management system for electrical energy saving of high voltage customers, using PLCs for both collecting measurements from digital power meters and controlling magnetic switches of air conditioners. The reason of using PLCs for collecting data and controlling loads is that they provide cheaper cost and superior control functions with respect to remote terminal units (RTUs). Besides, with the technology improvement, PLCs also offer unprecedented flexibility of sequencing and reliable control and have been widely used in most industrial applications [6–10] and power systems [11–14]. Especially, with an increasing emphasis on factory automation to cut the cost of production and/or increase product quality, the majority of manufacturing controllers now involves PLCs. However, each type of PLC has its own protocol and most existing PLCs are not equipped with Internet ability. To make a non-web-based PLC web-controllable, our approach is to use VB, ActiveX, HTML, and ASP (active server page) to build graphical control interfaces, and to use ADO, RDS (remote data service) for web database connectivity. The choice of VB, HTML, and ASP gives us simplicity of implementation and makes WBRELSAC browser independent. The paper is organized as follows. Section 2 describes the structures of the presented WBRELSAC system. Section 3 presents the software design. Section 4 presents a test system to demonstrate the proposed system. Conclusions are given in Section 5. 2. System architecture The system chosen for WBRELSAC is based on the client/server structure. Depending on how the server communicates with the PLC, two types of system architecture are proposed. Type 1 system shown as Fig. 1 consists of a RS-232/ TCP-IP converter through, which the server communicates with the PLC for data acquisition and supervisory control. The server in this system does not need a program to deal with ‘hardware service process’ and the connection requests from the clients to communicate with the PLC. The converter can provide such functions. The server or clients can send command codes of the PLC through the converter and the PLC feeds data back to the server or clients also through the converter. However, since the converter needs an assigned IP

Fig. 1. System type 1 of WBRELSAC architecture.

address to connect to Internet, the security issue to protect the PLC from other unauthorized users’ access needs to be considered. Nevertheless, with the function provided by the RS-232/TCP-IP converter, the design time on the system program can be reduced. Fig. 2 shows the second type of system architecture for WBRELSAC. In this system, the server communicates with the PLC directly through RS-232 port; therefore, a program that deals with hardware service process and the connection requests from the clients to communicate with PLC is needed. This increases the design time but gives flexibility to the program for adding new features and the security to control the PLC. In both types of system architecture, the non-web-based PLC is used to collect measurements from the digital power meter and to control loads through its output relays. The data transmission between PLC and the converter (system type 1) or the server (system type 2) is through RS-232 port. Furthermore, a ladder program for PLC is developed for automatic meter reading. Since WBRELSAC system has to provide clients the function to monitor on-line electric load curves that can be shown on their browsers, the server needs a database management system for these measurements. In our implementation, Microsoft RDS/ADO/ODBC technologies are used for this purpose. The server collects real-time data from the digital power meter through the PLC and saves them into three different files. File 1 contains only the latest 100 measurements. File 2 keeps all the data until the number of data records hits a designed limit and then the file is copied to a back-up file (file 3). To plot the trends of measurements on the client browser, an ActiveX control embedded in the ASP program for the client is developed for reading the latest 100 measurements from File 1. This will reduce the data transmission time between the server and the client. The graphical control interface is written in Visual Basic (VB). VB is based on an event-driven programming model. It supports a number of features and takes advantage of the graphical user interface in Microsoft Windows, making it

Fig. 2. System type 2 of WBRELSAC architecture.

W.-F. Chang et al. / Electrical Power and Energy Systems 28 (2006) 401–407

an excellent language for quickly creating full-featured solutions. These features include data access, ActiveX technologies, Internet capabilities, rapid application development (RAD), etc. It can also use system-provided APIs or external DLL/OCX to extend its functionality. For instance, we can easily use winsock.ocx (Winsock control) to develop an ActiveX control in the ASP program that gives the Internet accessibility to the server and the client. The WBRELSAC system provides easy access to the user. However, for security reasons, an ID check-up web page program on the server was designed to check the user’s ID/password and a firewall was added the system. Furthermore, the WBRELSAC VB program has the ability to block any access coming from bad IP addresses, increasing the security level of the system. Once the user logins the server web page and passes the ID check-up, the user then has the ability to access the WBRELSAC web site and to start the client window at the press of a button. By clicking the command button icons on the client window, the user can control on/off switches of the loads and view the trends of measurements. The user can also observe the live video of load operations through a web camera that is implemented on the load site.

3. Software design Figs. 3 and 4 show the software structures for system type 1 (Fig. 1). Fig. 3 presents the software structure for the server, and Fig. 4 illustrates the software structure for the client. The server program uses Winsock control of VB to communicate with the client and the RS-232/TCP-IP converter for data acquisition and supervisory controls of the PLC. By using the Winsock control, it is possible to create sockets and perform TCP- and UDP-style communications over TCP/IP network. In the server, the database management system is to collect measurements from the digital power meter and then to show them on the client’s window. VB uses ADO through ODBC method to access the database on the server side. Fig. 5 shows the ADO relationship with VB, ODBC, and the database [15]. In system type 1, ActiveX components on the client side communicate with the RS-232/TPC-IP converter also through the Winsock control [16]. The communication program on the client side is similar to the one for the server except it needs to perform supervisory controls of hardware and to plot the trends

Fig. 3. Software structure of the server for system type 1.

403

Fig. 4. Software structure of the client for system type 1.

of measurements using RDS. Since ADO only allows the VB program to access the database on the same computer, RDS and IIS (Internet information server) or PWS (personal web server) techniques are needed for the VB program on the client side to access the database on the server side. Fig. 6 shows the relationship among VB, ADO, RDS, and IIS/PWS. The preprocess to establish RDS connection is as follows: 1. Install PWS or IIS. In this paper, PWS is used. 2. Install MDAC version 1.5 or higher version. 3. In PWS, set up a virtual directory for MSADC with the right to execute application program. 4. Open msdfmap.ini file under windows directory and edit the parameters for [connect] and [sql] to define the user’s access right to the database. On the client side, except for the ActiveX control for the trend display an ActiveX control for the digital inputs/outputs (DIs/DOs) of PLC through the RS-232/TCP-IP converter is developed. Through this ActiveX control, the on/off statuses of these DIs/DOs can be monitored and the loads connected to DIs/DOs can also be controlled by the remote client. The visual

Fig. 5. ADO relationship with VB, ODBC, and database.

Fig. 6. RDS relationship with ADO, VB, ODBC, and database.

404

W.-F. Chang et al. / Electrical Power and Energy Systems 28 (2006) 401–407

Fig. 7. Software structure of the sever for system type 2.

image of the load operations can even be seen through the ActiveX control of the Web camera server installed on the load side. Figs. 7 and 8 show the software structures for the server and client in system type 2 (Fig. 2), respectively. These structures are similar to those in system type 1. The only difference is the exclusion of RSC-232/TCP-IP converter in system type 2. Due to this difference, the server program for system type 2 needs to use MSComm control [16] to monitor/control PLC through RS-232 port. On the client side in system type 2, a different ActiveX control is developed and embedded in the web page to communicate directly with the server. This is different from the one in system 1 where the ActiveX control is to communicate with the RS-232/TCP-IP converter. For the trend display, the same ActiveX control in system type 1 is used in system type 2.

Fig. 9. Connection diagram of WBRELSAC.

4. Two loads: an electric fan and a lamp. 5. One digital power meter. 6. One web camera server and one CCD. Fig. 9 shows the connection diagram of the tested WBRELSAC system. The electric loads are controlled by four DOs of PLC: one DO (Y3) for controlling the on/off switch of the lamp, the other three DOs (Y2, Y1, and Y0) for

4. Implementation The proposed WBRELSAC based on system type 2 was implemented in a laboratory environment to demonstrate its performance. In this WBRELSAC, the following equipment is used: 1. One server PC with Pentium III 550 MHz CPU and 128 MB RAM running Windows 98 operating system with PWS installed. 2. One client PC with Pentium III 300 MHz and 64 MB RAM running Windows 98 operating system. 3. One non-web-based PLC.

Fig. 10. Main interface of the server program.

Fig. 8. Software structure of the client for system type 2.

Fig. 11. Trend display window.

W.-F. Chang et al. / Electrical Power and Energy Systems 28 (2006) 401–407

Fig. 12. Load control window.

Fig. 13. Web page seen by the client.

405

controlling high/medium/low speeds of the electric fan. The control commands for these DIs/DOs are sent by the server through MSComm.ocx. A digital power meter is also connected to the loads to measure voltage, current, real/reactive power and some other electrical data. These measurements are then transmitted and stored in the registers of the PLC. A PLC ladder program was designed to read these data automatically into the PLC from the digital power meter. The server then reads in these data from the PLC using MSComm control. Figs. 10–15 are the system software interfaces shown on computer screen. Fig. 10 shows the main interface of the server program. This interface can process the connection and service requests of the client, display the statuses of these requests, and open trend display windows and the load control window. Fig. 11 shows one of the trend display window in which the voltage curve is plotted. Fig. 12 shows the load control window. In the top portion of Fig. 12, the statuses of DIs/DOs of the PLC are monitored by the color of their button icons. The DIs/DOs can further be controlled by clicking these buttons. Two demand curves are also plotted in Fig. 12: the one on the left side showing the current demand curve with demand interval of 15 min and the one on the right side showing the last 15-min demand curve. In the bottom portion of Fig. 12, the measurements from the digital power meter are displayed and some other parameters are calculated for demand control purpose. Preventive load shedding actions are implemented to avoid demand contract violation. There are also two icons (run and stop) at the top left corner of Fig. 12 to run and stop PLC. Fig. 13 shows the web page seen by the client when it logins the

Fig. 14. Trend display for voltage.

406

W.-F. Chang et al. / Electrical Power and Energy Systems 28 (2006) 401–407

Fig. 15. Trend display for current.

web site of the server. There are five buttons in this web page: one to turn on or turn off the lamp, one to turn off the electric fan, and the other three to control the speed (high/medium/low) of the electric fan. There is a live video embedded in this web page to watch the load operations. There are also two links to

plot trend displays for voltage and current. Figs. 14 and 15 show the trend displays for voltage and current, respectively. The live video image captured in the Fig. 13 shows that the lamp is on and the electric fan is off. If the client clicks the high-speed button, the electric fan starts running with high speed as seen in Fig. 16. Then if the client clicks the on/off button for the lamp, the lamp is off as seen in Fig. 17. 5. Conclusions

Fig. 16. Live video showing the lamp is on and the electric fan is running with high speed.

The ability to acquire information remotely and even to control appliances/devices at fingertips over the Internet is becoming desirable to the general public as well as professionals. In this paper, a web-based remote electric load supervision and control (WBRELSAC) system with automatic meter reading and demand control via programmable logic controllers (PLCs) has been presented. The presented WBRELSAC system integrates VB programs, ActiveX controls, HTML, ADO, RDS, and ASP to provide graphical control interfaces to the client with the ability to monitor/control electric loads remotely through the Internet. The presented system is simple and easy to implement and is flexible for adding new functionalities. With the increasing use of PLCs in industrial automation, this PLCbased WBRELSAC can be easily implemented for the load management in industrial factories. Acknowledgements

Fig. 17. Live video showing the lamp is off.

Financial support from National Science Council and LienHo Technology and Commerce Foundation for this presented work is greatly acknowledged.

W.-F. Chang et al. / Electrical Power and Energy Systems 28 (2006) 401–407

References [1] Medida S, Sreekumar N, Prasad KV. SACDA-EMS on the Internet. Proc Int Conf Energ Manage Power Deliv 1998;2:656–60. [2] Georges B, Aubin J. Application of PLC for on-line monitoring of power transformers. IEEE PES Winter Meet 2001;2:483–6. [3] George B, Aubin J. Web embedded plc applications in substations, IEEE PES Winter Meeting, vol. 2; 2001. p. 487–8. [4] Electric charge table and rule. Taipei, Taiwan: Business Department of Taipower Company; 1998. [5] Cho MY, Huang CW. Development of PC based energy management system for electrical energy saving of high voltage customer. IEEE Ind Commer Power Syst Tech Conf 2001;7–12. [6] Zhou MC, Twiss E. Design of industrial automated systems via relay ladder logic programming and petri nets. IEEE Trans Syst Man Cybern Part C 1998;28(1):137–50. [7] Ramirez-Serrano A, et al. A hybrid PC/PLC architecture for manufacturing system control: implementation. IEEE Int Conf Syst Man Cybern 2000;3:1679–702.

407

[8] Erickson KT. Factory automation: a controls course for every university. Proc Am Control Conf 2001;1167–72. [9] Lauzon SC, et al. Application of discrete-event-system theory to flexible manufacturing. IEEE Control Syst Mag 1996;16(1):41–4. [10] Boothroyd D. Failsafe systems gain the flexibility of the PLC approach. IEEE Comput Control Eng J 1995;6(1):43–4. [11] Roman R, Wilson R. Commercial demand side management using a programmable logic controller. IEEE Trans Power Syst 1995;10(1):376–9. [12] Quartey B, Shaw D, Waked P. An application of PLC’s as an RTU in SCADA systems. IEEE industry application society 29th annual petroleum and chemical industry conference; 1992. p. 271–4. [13] Duan F, et al. A supervisory control system including digital simulation realized by PLC. Proceedings of the third world congress on intelligent control and automation; 2000. p. 3721–3. [14] Al-Ali AR, Negm MM, Kassas M. A PLC based power factor controller for a 3-phase induction motor. Proc Ind Appl Conf 2000;2:1065–72. [15] Wang KJ. Visual basic 6.0 database design. Taipei, Taiwan: Chi-Biaw Book Company; 1999. [16] Russo MF, Echols MM. Automating science and engineering laboratories with visual basic. New York, USA: Wiley; 1999.