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.
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.
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.
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
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- The STM8S003F3P6 chip is very interesting
- Serial port cannot be recognized
- The design is too exquisite, but the repair is too painful: iFixit releases a teardown report of AirPods 2, and the repairability score is zero
- 【Wireless closed-loop feedback system for desktop robotic arms】
- 8/21-22@Wuhan! Intel/World Peace Group invites you to participate in the Artificial Intelligence Technology Introduction and Implementation Seminar
- Professor Li Xia: How basic should basic research be?
- DSP Flash API Steps
- 【i.MX6ULL】Driver Development 11——LCD Driver Practice
- Microcontroller interview question collection
- HEF4051 is easy to damage