Design and implementation of networked remote automatic meter reading system

Publisher:快乐兔子Latest update time:2010-12-23 Source: 现代电子技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

The power grid has long relied on manpower to read commercial and domestic electricity data, which is extremely inefficient. Meter reading data statistics mainly rely on manpower, with a long report generation cycle and slow analysis of statistical results. The results obtained cannot reflect the distribution of system power demand in a timely manner, and have no reference value for network optimization of the supply system, which seriously limits the improvement of power supply efficiency and quality of the power supply system.

The traditional meter reading method relies on manual reading, and the meter data reading cycle is long. It is impossible to obtain the meter data of all users at the same time, which makes the acquisition of meter data inaccurate and the time period ambiguous, resulting in low credibility of the spatiotemporal distribution results of power grid electricity consumption, and thus unable to provide effective reference data and suggestions to the power supply management department.

The automatic meter reading system is an important means for the power supply system supervision department to monitor, manage and control industrial and domestic electricity consumption, as well as to collect statistics and analyze users' electricity consumption. This paper proposes a solution that combines GPRS communication technology with J2EE technology and applies it to the design of the automatic meter reading system, forming a networked remote automatic meter reading system. In the underlying hardware design, an automatic data collection solution based on the general packet radio service GPRS (General Packet Ratio Service) wireless Internet access technology is adopted. In the upper-level software design, the J2EE (Java 2 Platform, Enterprise Edition) platform launched by Sun Microsystems of the United States is adopted. This product has been applied in actual meter reading systems with good results.

1 The overall structure and working principle of the system

1.1 System composition

Figure 1 is the overall design of the system. The system consists of five parts: GPRS data acquisition module, communication server, database server, Web server, and client.


a.JPG

GPRS data acquisition module: It is the main hardware part of the system. After the GPRS module is powered on, it has a dynamic IP address and can communicate with the communication server through Socket. Its function is to send the detected power flow to the communication server in hexadecimal data format. The GPRS terminal can also accept commands from the communication server.

Communication server: It opens a port on the server, listens to and receives UDP data packets sent by all GPRS terminals to the port, and then parses the data packets into traffic and other data and writes them into the database. Another task of the communication server is to send commands to the GPRS terminal, that is, to send UDP data packets to the GRPS terminal.

Database server: The data obtained by the communication server from the GPRS terminal is stored in the database server, and the database server also needs to back up the data.

Web server: It connects the database server and the client. First, it provides Web services to the client. It responds to requests from the client and obtains data from the database server according to the client's request, and then returns the data to the client in HTML format so that the client can browse the data it requested. The Web server can also directly make requests to the communication server, and the communication server sends commands to the GPRS terminal according to the request of the Web server.

Client: It uses a thin client and only requires an Internet browser. The client's task is to send an http request to the web server and then display the ht-ml format file returned by the web server to the user.

1.2 System Functions

The functions of the system include: viewing historical data and reading real-time or hourly data.

View historical data: The client requests to view a certain period of historical data according to its own needs. The request is forwarded to the database server through the Web server. The database server returns the data to the client in HTML format through the Web server.

Reading real-time or hourly data: The client requests to read real-time or hourly data. The Web server notifies the communication server according to the request, and then the communication server notifies the GPRS data acquisition module. The GPRS data acquisition module sends a data packet to the communication server through the GPRS network. When the communication server receives the data packet, it parses the data packet into traffic parameters and writes it to the database server. The database server then sends the data to the Web server, and the Web server returns the data to the client in HTML format.

2 Design and function of GPRS communication module

2.5th Generation Communication Technology GPRS (General Packet Radio Service) As the prelude to the third generation communication technology, GPRS technology is a new packet exchange data bearer service developed on the basis of the existing GSM technology. It was proposed by the British BTCellent company in 1983. GSM technology mainly provides voice services, while GPRS technology provides packet transmission services between mobile terminals and routers of computer communication networks. This is the biggest difference between GPRS network and GSM network.

GPRS introduces packet switching technology into the existing GSM system to provide voice communication between mobile users and data networks. GPRS uses packet switching technology to mainly provide non-voice data services, especially suitable for intermittent, sudden, frequent, and small amounts of data transmission, providing mobile users with high-speed wireless IP and x.25 services. The GSM network uses circuit switching and is also suitable for occasional large data transmission.

This system uses the GPRS packet wireless service to connect to the on-site automatic meter reading device through a wireless network to measure data.

In the system, one of the key points is the choice of network protocol. There are currently two protocols, namely TCP protocol and UDP protocol. Compared with TCP protocol, UDP protocol has the following advantages: it is suitable for the transmission of small amounts of data; it is easy to use and does not require a connection to be established. It is a connectionless communication method; it has high efficiency in data transmission and strong real-time performance.

Considering the above characteristics of UDP and the high real-time requirements of the flow measurement system, this system adopts the UDP protocol.

3 System Hardware Design

There are two working modes for electric energy flow measurement equipment: one is to periodically collect user data at a pre-set time interval and transmit it to the database server in real time; the other is to respond to control commands from the communication server in real time and perform specific data collection tasks according to the control commands. This requires the GPRS terminal, which is a data transmission module and terminal equipment control module, to be able to parse and process various control commands in real time and provide the data transmission service with the highest possible throughput. In addition, considering the scalability of the system, the hardware design of this system does not adopt the traditional low-cost but high-development cost and performance and function-limited single-chip microcomputer plus GPRS communication module solution, but uses a design solution with a high-performance embedded CPU chip as the core. The hardware composition and connection of the GPRS data transmission terminal are shown in Figure 2. The CPU uses the Samsung ARM7 4510B designed for network solutions. The GPRS module uses the currently popular Siemens MC35 series module.

b.JPG

The software of the transmission terminal adopts an architecture based on an embedded real-time operating system platform and network components with independent intellectual property rights as the core. The operating system uses μclinux. The biggest feature of μclinux is that it has no MMU, which is very suitable for ARM embedded microprocessors. The kernel version of μclinux is Linux 2.4, which has a complete embedded TCP/IP network protocol stack. The image file compiled with all the operating system codes is less than 1 MB.

The system takes the digital signal processor DSP as the core and adopts AC sampling technology to continuously detect and count the relevant parameters of electricity.

The meter reading data terminal plays the role of managing and coordinating the GPRS network and meter data communication. Since wireless transmission is based on GPRS, the meter reading data transmission terminal can also be called a GPRS terminal, which requires the completion of hardware and software design. The hardware design of the meter reading terminal generally uses a GPRS module produced by a world-renowned manufacturer as the middleware for connecting the meter reading terminal to the GPRS network, realizing the connection with the base station air interface, and using a high-speed microprocessor to connect the meter and the GPRS module to handle the data communication problem between the two.

4 System Software Design

4.1 B/S Structure

At present, there are two main types of software structure design modes: one is the traditional Client/Server mode, which uses Intranet technology and is suitable for LAN environments with a limited number of connectable users. When the number of users increases, the performance will be significantly reduced, and the client must be installed. The other is the Browser/Server mode, which is constantly developing.
It uses Internet/Intranet technology and is suitable for WAN environments. It supports more clients and can dynamically configure Web servers and application servers according to the number of visits to ensure system performance. The client only needs a standard Internet browser.

Due to the complexity of the physical platform running the system, such as the differences in operating systems and database servers of different devices, various professional networks have their own different network architectures and implementation methods, so it is necessary to choose an operating environment that can better support cross-platform development for design. In addition, considering that the personnel using the system are extensive and can view the details of the system at any time according to different permissions, if the traditional fixed C/S mode is still fully adopted, it is necessary to strictly set parameters for each client, which is obviously not advisable.

The software design of the system adopts a solution based on Web technology and a browser/server or B/S architecture. Compared with the traditional C/S model, the advantages of the B/S model are: the main work is the development of server-side programs. The server is mainly responsible for developing and maintaining online content and resources, and is responsible for the collection, storage, and release of information. There is no development and maintenance of client programs. The client directly uses the existing LAN or Internet connection, does not require special settings and installation, and uses a standard Internet browser to directly access the dedicated Web server page to view the real-time data of monitoring and analyzing power quality, and can query the required historical data.

4.2 System operating environment and tool selection

Considering the portability and cross-platform nature of the system, this system selected the J2EE platform designed and developed by Sun, and used JSP (Java Server Pages) as the development tool for the B/S model. J2EE (Java 2 Platform Enterprise Edition) is a Java platform with a new concept that supports multi-layer and distributed applications for enterprise-level computing. It provides a good mechanism for building enterprise information systems with scalability, flexibility, and easy maintenance, and has incomparable advantages over traditional Internet application models. J2EE is mainly oriented to network applications. It defines a series of normative standards, allowing Java programmers to jointly follow this standard to develop large-scale network-oriented projects. It also provides a huge development library and is an enterprise-level application platform for e-commerce development. Java has the characteristics of "write once, run everywhere". It can easily connect to various databases and call various APIs through JDBC, while protecting the data security model in Internet applications. The platform solution of the system is summarized as follows:

Computing mode: three-tier B/S mode; Network operating system: Windows 2000 Server; Database server: Oracle 8i; Web server: Apache Tomcat 5.0; Database driver interface: JDBC driver; Main development environment and tools: J2EE, Java, JSP, Javascript.

4.3 Connection Pool Mechanism

The efficiency of the program is very important in the JSP programming process, that is, how to use limited computer system resources to provide better services to more customers and ensure the customer's response speed and service quality. If many people visit the website, each Web request needs to establish a connection with the database, then the database may have to handle many connection requests at the same time, which is a serious burden for the database server and Web Server, and may even cause resource exhaustion and crash.

This system uses the connection pool mechanism to solve this problem. The most basic idea of ​​the connection pool is to pre-establish some connections and place them in memory objects for use. When the program needs to establish a connection with the database, it only needs to read from the connection pool without creating a new connection. When the program does not need the connection, it only needs to put the connection back into the connection pool for other programs or users to use. At the same time, the connection pool mechanism has the function of managing the connections in the pool, which increases the robustness of the connection with the database.

4.4 Remote Management of Databases

The database contents include: real-time data of on-site flow parameters, historical data, unqualified data, personnel management, authority management, etc.

Database remote management is implemented according to the following process:

(1) The client issues a command to query or modify data;
(2) The server receives the command and returns the result to the client;
(3) The client receives the result and displays the queried data.

When the client requests to view real-time data, the client sends a request to the server. The server sends the real-time data to the client every 2 seconds, and the client receives and displays the data. This process is a typical database remote management process. The traditional technology is to refresh the page continuously to obtain new data so that users can see the constantly changing real-time data. However, the disadvantages of this method are that when the amount of data is large, it consumes a lot of server resources; second, users can clearly feel the continuous refreshing of the page, which has a great impact on the user's vision and hearing. This system uses the xmlhttp technology developed by Microsoft, which is a client/service communication channel protocol in the Microsoft xml parser (MSXML). Using xmlhttp can easily and conveniently realize remote database management. Because it transmits data in XML format, it greatly reduces the consumption of the server, and the use of the xmlhttp protocol can realize the update of data without refreshing the page, making the interface more friendly.

5 Conclusion

This system uses GPRS communication module in hardware, B/S mode in software, and J2EE platform provided by Sun Company as the development tool to complete the system design. It can monitor and analyze the on-site electric energy flow remotely, in real time and intuitively. Compared with other systems, it has the advantages of remote monitoring, maintenance-free client, easy maintenance on the server, safe and reliable system, simple and convenient operation, etc. This product has been applied in the actual meter reading system with good results.

Reference address:Design and implementation of networked remote automatic meter reading system

Previous article:Wireless sensor networks and their applications in preventive maintenance of optical cable trunk lines
Next article:Design and implementation of centralized sewage discharge monitoring terminal

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号