Summary:
Data transmission is an important part of dam safety monitoring, bridge monitoring, water regime measurement and reporting and other monitoring systems, as shown in Figure 1. With the progress of technology and the development of monitoring system, higher requirements are put forward for data transmission. The original data transmission can not meet the requirements of distribution, data processing and analysis, network sharing and mobility.
Characteristics of monitoring systems commonly used in water conservancy and hydropower projects and geotechnical engineering and requirements for data transmission system:
① The distribution of measuring points is relatively scattered, and the wiring from measuring points to monitoring center is very difficult;
② The geographical location of each measuring point is far away, such as Tianjin, Nanjing, Guangzhou, etc., and the monitoring cycle is long. It is unrealistic and costly to set up one monitoring center at each measuring point, so only one monitoring center can be set up;
③ The monitoring center can be moved, and the monitoring personnel can collect and control the data of each measuring point anytime and anywhere.
A monitoring system based on GPRS data transmission is designed, which has the following characteristics:
① It can better meet the needs of the monitoring system
② Incremental upgrading of the original monitoring system without changing the original hardware and software is applicable to the upgrading of the existing monitoring system;
③ It has a wide range of application and can be applied to dam safety monitoring, water regime measurement and reporting, pollution source monitoring and other fields. The system has been put into use in a bridge monitoring system.
1、 Selection of data transmission mode
At present, the data transmission modes of dam safety monitoring, bridge monitoring, water regime measurement and reporting and other monitoring systems mainly include wired and wireless.
1.1 wired data transmission mode
Shielded twisted pair, optical fiber and public telephone line are used as transmission media in wired mode. The existing monitoring system is widely used, but there are also the following shortcomings: ① some measuring points are located in deep mountains and valleys,
Figure 1 important composition block diagram of monitoring system
Wiring is difficult; ② When the measuring points of the system are scattered, the wiring is also very difficult; ③ Because the transmission medium is wired, it costs more and the operation management is difficult; ④ The system is inflexible and under monitoring
The heart can only be in a fixed place, and the communication distance is not far.
1.2 wireless data transmission mode
At present, the commonly used wireless methods are mainly divided into two categories: ultrashort wave radio station and public mobile network.
1.2.1 ultrashort wave radio station
The existing monitoring system is widely used, but it also has the following shortcomings: ① the communication distance is limited, which is generally used for data transmission within 30 km; ② The communication rate is not high and the anti-interference ability is insufficient; ③ Both the measuring points and the monitoring center should be equipped with radio stations, which has a high cost.
1.2.2 public mobile network
Using public network for data transmission is an important direction of the development of monitoring system. Taking the network of China Mobile as an example, there are three ways to use public mobile network for data transmission: short message SMS, circuit switched data service CSD mode and GPRS mode.
(1) Short message SMS
It is widely used, but it also has the following shortcomings: ① long communication delay and easy congestion of wireless channel; ② The amount of information transmitted at one time is limited, which is less than 160 bytes. When the data packet is greater than 160 bytes, packet transmission shall be carried out; ③ Charge according to the number of SMS messages,
Spend more; ④ The measuring point and monitoring center should be equipped with short message data transmission module, which has high cost.
(2) CSD mode of circuit switched data service
Data transmission is similar to telephone communication. There are few applications in the existing monitoring system, and there are the following deficiencies: ① the rate is calculated based on the length of service time. When the measuring point and the monitoring center are not in the same city, it is charged according to the long-distance charge, which costs more; ② The communication rate is not high, generally 9600 BPS; ③ Both measuring points and monitoring center shall be equipped with mobile phone module, which has high cost.
(3) GPRS mode
GPRS (General Packet Radio Service) is an efficient data transmission method using packet switching. Each user can occupy multiple wireless channels at the same time, and the same wireless channel is shared by multiple users. Resources are effectively utilized. The data transmission rate is up to 170 Kbps. GPRS technology is used to send and receive data packets. Users are always online and charged according to traffic, which quickly reduces the service cost. Its characteristics are as follows: ① strong real-time performance. Because GPRS has real-time online characteristics, the system has no time delay, which can well meet the requirements of the system for real-time data acquisition and transmission; ② The layout of measuring points is flexible, GPRS network has covered most areas, there is basically no blind area, and large-scale monitoring can be realized; ③ The monitoring center can move flexibly. As long as it can connect to the Internet, it can monitor the measuring points; ④ The amount of information transmitted at one time can reach 1024 bytes; ⑤ High communication rate, up to 40 Kbps; ⑥ Using GPRS public network platform, there is no need to build a network, just install GPRS data transmission module at the measuring point, and the construction cost is low. Through the above analysis, combined with the needs of the monitoring system, GPRS is selected as the data transmission mode of the system.
2、 Structure of monitoring system based on GPRS
The structure of GPRS based monitoring system is shown in Figure 2, which is composed of three parts: data acquisition unit MCU, GPRS data transmission system and monitoring center computer.
2.1 data acquisition unit MCU
The main functions of data acquisition unit MCU are: ① complete the measurement of each sensor and upload the measurement data under the control of the computer in the monitoring center; ② Automatically and regularly measure each sensor and store the data in MCU for reading by the computer in the monitoring center.
2.2 monitoring center computer
The monitoring center computer is equipped with data acquisition software, database, data center software, virtual serial port and other supporting software. Its main functions are: data acquisition, data storage, process line display, report output, etc. The monitoring center computer should be able to connect to the Internet.
2.3 GPRS data transmission system
GPRS data transmission system is the communication bridge between monitoring computer and data acquisition unit MCU. GPRS DTU adopts mature commercial products and has the following functions:
(1) Internal integrated TCP / IP protocol stack
Fig. 2 structure diagram of monitoring system based on GPRS
It encapsulates PPP dial-up protocol and TCP / IP protocol stack, and has embedded operating system. In terms of hardware, it can be regarded as the combination of embedded PC and wireless gprs modem. It has the functions of GPRS dial-up Internet access and TCP / IP data communication.
(2) Serial port data transparent transmission function
The serial communication interface is provided, including common serial communication modes such as RS232 and RS485. The serial port data is designed as "transparent transmission", that is, the original data on the serial port is converted into TCP / IP data packets for transmission, and the received TCP / IP data packets are converted into strings
Data on the port. It can be connected with all kinds of MCU using serial communication without changing MCU. It is suitable for the upgrading of existing monitoring system.
(3) Support automatic heartbeat and stay online forever
One of the advantages of GPRS network is to support the permanent online of GPRS terminal equipment. GPRS DTU supports the permanent online function, including automatic dialing when powered on and keeping the permanent online with heartbeat packet (when there is no data communication for a long time, the mobile gateway will disconnect the DTU from the data
Heart connection: heartbeat packet is a small data packet sent by DTU and data center before the connection is disconnected to keep the connection from being disconnected), which supports automatic reconnection after disconnection, automatic redial, etc.
2.4 working process
2.4.1 establishment of communication link
The whole computer is running and the relevant software of the monitoring center is powered on;
GPRS DTU connects to GPRS network through dial-up to obtain a dynamic IP address. GPRS DTU connects to GPRS network. GPRS DTU can connect to lnternet through mobile gateway GGSN;
GPRS DTU, as the client, establishes a connection with the data center software (as the server) of the monitoring center computer in the form of IP address or domain name, and the communication link is established.
2.4.2 data transmission process
The monitoring center computer sends telemetry and remote control commands, and the data is transmitted to GPRS DTU through GPRS wireless communication; GPRS DTU transparently sends data to data acquisition unit MCU through RS485; MCU parses the instruction, executes the control command, and sends the measured data or response back to the monitoring center computer, and the data returned by MCU is returned to the monitoring center computer.
2.5 comparison of monitoring system structure with non GPRS
The structure of the monitoring system with shielded twisted pair as the communication medium is shown in Figure 3
Structure diagram of monitoring system with shielded twisted pair as communication medium
Fig. 3 structure diagram of monitoring system with shielded twisted pair as communication medium
Hardware changes required for system update: ① add GPRS DTU, and there shall be mobile signal at the installation position of GPRS DTU; ② The monitoring center computer is required to be able to connect to Internet and transmit data through Internet and MCU.
Advantages of the updated system: ① there is no cable connection between the monitoring center computer and MCU; ② The computer in the monitoring center is not required to be in the same geographical location as the MCU. As long as it can connect to the Internet, it can collect data, which improves the flexibility of the system.
3、 Software composition of monitoring system based on GPRS
The software composition of monitoring system based on GPRS is shown in Figure 4.
3.1 MCU system software
Cooperate with the hardware of data acquisition unit MCU to complete the measurement of each sensor and the upload of measurement data.
3.2 GPRS D Fu system software
PPP dial-up protocol and TCP / IP protocol are encapsulated inside, which can complete: ① dial-up access to GPRS network; ② Establish TCP connection with the monitoring center computer through the domain name of the monitoring center computer, support automatic heartbeat and keep permanently online; ③ Complete the transparent transmission of data between the monitoring center computer and MCU.
3.3 dynamic domain name resolution client software
It is used to ensure that GPRS DTU can establish TCP connection with monitoring center computer through domain name. No matter where the monitoring center computer is located, as long as it can connect to the Internet and run the dynamic domain name solution
Fig. 4 software composition of monitoring system based on GPRS
By analyzing the client software, GPRS DTU can establish TCP connection with the monitoring center computer through the domain name.
3.4 data acquisition software
Data transmission is carried out through serial port and MCU to complete data acquisition, data storage, process line display, report output, etc.
3.5 virtual serial port software
The monitoring center computer (data acquisition software) of the existing monitoring system mostly uses serial port to transmit data with MCU. In order to complete the data acquisition by using the virtual serial port, the software can not be upgraded. Virtual serial port software is to create several virtual serial ports on the computer through a virtual serial port driver. The virtual serial ports are the same as these serial port hardware for the application layer. The schematic diagram of virtual serial port software is shown in Figure 5.
Figure 5 Schematic diagram of virtual serial port software
The local monitoring port and the local target port are the ports in the UDP protocol. The local target port is not occupied by the virtual serial port software. It is actually the virtual serial port monitoring port in the data center software. See section 3.6 data center software in this paper for details. After the virtual serial port software is installed and run, the machine has a virtual serial port - comX. The data acquisition software operates comX, that is, the virtual serial port. When the data acquisition software writes comX, the data will be written to the local target port. The software monitoring the local target port (i.e. data center software in section 3.6 of this article) can obtain the data. When an application program (i.e. the data center software in section 3.6 of this article) writes data to the local monitoring port, the data will be written to the virtual serial port comX, and the data acquisition software can obtain the data by reading comX.
3.6 data center software
As the server of TCP connection, the data center software connects with the TCP client of GPRS DTU system software, and transmits the measurement data transmitted by MCU through GPRS DTU to data acquisition software through virtual serial port, or transmits the measurement instruction transmitted by data acquisition software through virtual serial port to GPRS DTU and then to MCU. The schematic diagram of data center software is shown in Figure 6.
Figure 6 schematic diagram of data center software
DTU service port is used to establish TCP connection with GPRS DTU and transmit information between data center software and GPRS DTU.
The DTU and virtual serial port connection information table is used to store the connection information between DTU and virtual serial port, and connect a DTU with a virtual serial port, that is, the data from a DTU should be written to a virtual serial port, and the data received from a virtual serial port should be transmitted to a DTU. When there are two GPRS DTUs in the whole system, two virtual serial ports should be established, and two pieces of information are stored in the DTU and virtual serial port connection information table. The virtual serial port monitoring port is a port in the UDP protocol, which is used to receive the data from the virtual serial port (essentially the data written in the virtual serial port by the data acquisition software). The data center software transmits the received data to the corresponding GPRS DTU through the TCP connection according to the connection information of the DTU and the virtual serial port connection information table, and then to the MCU.
When the DTU service port receives the data transmitted from GPRS DTU (essentially the measurement data transmitted from MCU to GPRS DTU), the data center software writes the received data into the local monitoring port in the corresponding virtual serial port (see section 3.5 virtual serial port software in this paper) according to the connection information between DTU and virtual serial port connection information table, and then transmits it to the data acquisition software.
3.7 comparison of software composition of monitoring system with non GPRS
The software composition of non GPRS monitoring system is shown in Figure 7. Software changes required for system updates:
(1) Add GPRS DTU system software, which already exists due to the purchase of commercial DTU;
Figure 7 software composition of non GPRS monitoring system
(2) The purpose of adding dynamic domain name resolution client software is to improve the flexibility of the system. In addition, there are free domain name application and dynamic domain name resolution services, that is, the cost of using paid services is not high. In addition, if the monitoring center computer can have a fixed IP address, DTU can be set to directly use the IP address to establish TCP connection with the monitoring center computer, There is no need to add dynamic domain name resolution client software;
(3) Add virtual serial port software, which is added without changing the existing data acquisition software (the software uses serial port to transmit data with MCU), and there is free virtual serial port software. If it is convenient to change the existing data acquisition software, there is no need to add virtual serial port software;
(4) Add data center software. It is not complicated to write this software with the help of API functions provided by commercial DTU. Some commercial DTU manufacturers may provide data center software. If it is convenient to change the existing data acquisition software, the functions of this software can be integrated into the data acquisition software without adding the center software.
(5) The update of the software system can be an incremental update for the existing software system, which is suitable for the upgrade of the existing monitoring system. The benefits of the system update will not be repeated.
4、 Conclusion
This paper presents a monitoring system based on wireless public network GPRS network, and introduces the design and implementation of the scheme in detail. It has been run on a bridge monitoring project. The operation practice shows that the system can better meet the needs of bridge monitoring, with stability, reliability, good flexibility and low design and operation cost. The scheme can also be applied to dam safety monitoring, water regime monitoring and other monitoring systems, and can easily upgrade the existing system.