GPRS-based wireless video surveillance system

1 Introduction

At present, remote video surveillance systems have been widely used in industrial and mining enterprises in the field of production site monitoring, telecommunications room monitoring, urban traffic management and other fields. Most of the common remote video surveillance systems transmit video signals by erecting a dedicated wired medium or by renting a telecommunications carrier's communication line. The former has a long construction period, a relatively large investment in the early stage, and a limited transmission distance; the latter is greatly affected by the surrounding environment and has poor scalability, which results in restrictions on applications in remote areas such as mines and complex terrain.

With the development of mobile communication technology, the speed of wireless data transmission has been greatly improved. In order to be able to provide GSM users with data services in packet form, mobile companies use most of the existing GSM network infrastructure to upgrade software, forming a new network logic entity - General Packet Radio Service, GPRS). China Mobile's GPRS network has a wide coverage rate, and has the advantages of IP-based, real-time online, flow-based, convenient, and cost-effective. The transmission of video data compressed by low bit image compression standard such as H.263 through GPRS network has become a new choice for remote video real-time monitoring system. This paper introduces a wireless video surveillance system based on GPRS network. This system can use the existing China Mobile GPRS network and the Internet to replace the traditional wired video surveillance system to video the remote target in a special geographical environment that is not suitable for the line network. monitor. The embedded control module I-7188 is used as the main controller of the monitoring terminal in the system.

2 system structure

GPRS is a new type of GSM data service that provides a connection between users and data networks to provide high-speed wireless IP and X.25 packet data access services to mobile users. GPRS adopts packet switching technology, and multiple users can share certain fixed channel resources to avoid the disconnection of the Internet. The GPRS data transfer rate is theoretically up to 164 kb/s. Although only the peak transmission rate of 53.3 kb/s is currently supported, since the low-bit image compression standard such as H.263 can compress and decompress single-frame or active-frame video at a code rate lower than 28.8 kb/s, It is entirely feasible for the GPRS network to transmit the compressed video signal.

The whole wireless video surveillance system is divided into three parts: on-site video collection site, GPRS network and remote video server, as shown in Figure 1. The live video collection site and the remote video server establish a TCP connection through the GPRS network to transmit video coding and control commands. The live video collection site serves as the client of the TCP connection, and the remote video server serves as the server of the TCP connection. The live video capture site automatically finds the remote video server after power-on. After establishing a TCP connection with the live video collection site, the remote video server remotely controls the start and end of the video capture by sending commands, and whether single frame acquisition or continuous frame acquisition is used.

2.1 Live video collection site

The on-site video collection site includes camera, pan/tilt, video capture card, I-7188 embedded control module, and GPRS Modem 5 modules, as shown in Figure 1. Among them, the camera can select the appropriate model according to the clarity, color/black and white, controllability, etc. requested by the customer, and can also increase the pan/tilt to control the action of the camera. The format of the camera output video should meet the requirements of the video capture card. The video capture card can select the finished video capture card that conforms to the H.263 protocol on the market. It can also be implemented by FPGA, DSP and dedicated video capture device according to requirements. The system design uses the video coding board produced by Beijing Baimu Company - ç›®EC 719EC.

2.1.1 ç›®EC 719EC video coding board

One of the design priorities of image monitoring systems is image coding and decoding. Although the performance of the GPRS network has been greatly improved compared to the GSM network. However, the speed requirement of dynamic image transmission cannot be satisfied. Therefore, the system uses the proprietary video sequence compression algorithm CAMEC developed by Beijing Baimu Co., Ltd. to transmit static images, and appropriately selects the encoding and decoding steps of the image.

The CAMEC algorithm has the characteristics of small calculation under the premise of ensuring certain performance, which can effectively reduce system power consumption and cost. All of the products in the series are based on the CAMEC algorithm, which has been recognized and praised by users in various industries in practical applications. The 719EC code board can output a single frame code generated by intra-frame video compression, or a frame sequence code stream generated based on inter-frame prediction compression. Generally, single-frame coding is more suitable for photo storage applications, and frame sequential coding is suitable for transmission applications. In addition, the video compression card supports the H.263 image compression standard and the CIF/QCIF format, and the compression frame rate is 1 to 25 frames per second, which is adjustable.

The main function of the 719EC code board is to quantize, compress, encode and process the input analog video signal, and then output the compressed code stream to the host device through an RS232 serial data port. The host device utilizes the video compression coding board of the terminal 719EC to implement functions such as video transmission and video storage.

2.1.2 Application of GPRS Modem Network Part Command

The GPRS Modem has a built-in TCP/IP protocol stack for transparent data transmission. The I-7188 operates the GPRS Modem via the COM1 port using standard AT commands. Some of the commands related to the GPRS Modem network are as follows:

2.1.3 How the video capture site works

First, the video capture card is connected to the COM3 port of the controller I-7188 to quantize, compress, and encode the input analog video signal. The compressed encoded code stream is then output to controller I-7188 via COM3. The COM1 port of the I-7188 is connected to the GPRS Modem, and the I-7188 transmits the input code to the GPRS Modem according to the network condition through COM1. After the GPRS Modem is powered on, it automatically attaches to the GPRS network and enters the command mode.

2.2 Remote Video Server

As shown in Figure 1, the surveillance video server consists of an Internet access point, a video server, and monitoring software. The monitoring software adopts an object-oriented method and is programmed by Visual C++6.0. In addition to the main thread, the application adds a decoding line for each established TCP connection, allowing the program to monitor multiple monitoring terminals at the same time. The identification of the monitoring terminal and the control of the video (including monitoring point image switching, pan/tilt control and camera lens control) are uniformly managed by the monitoring software.

2.2.1 TCP connection implementation

For computer users, it is easy to achieve dial-up access to the Internet, because there are very mature software on the PC that can easily implement PPP and TCP/IP protocols. However, for terminals using embedded devices, especially single-chip microcomputers, it is difficult to implement due to hardware resource constraints and complicated and cumbersome protocols.

The program TCP connection was developed on the basis of Windows sockets (Winsock). Winsock is a universal interface for TCP/IP programming in Windows systems. The CAsyncSocket class and the CSocket class in the MFC class library provide an object-oriented programming interface for developing Windows Socket communication programs. In practical applications, Socket objects are usually derived from them as the base class to complete network communication. A TCP connection needs to be established between the remote video capture site and the server in the system, so the Socket uses streaming sockets.

Two Socket classes are used in the server program: the CLIs-tenSocket class and the CAcceptSocket class. They are all generated by the CSocket class in the Public way. The CListenSocket class is a listen socket class, which only registers the FD_ACCEPT event, and is mainly responsible for maintaining the data sockets that serve the client connection. The CAccept-Socket class is a data socket class that is primarily responsible for communication with video collection sites. The CAceeptSocket class is established by the CListenSocket class to accept connection requests from video capture sites. At the same time as the establishment, a video decoding thread is started to decode the transmitted video code. At the same time, the remote video collection site control instruction is sent according to the transmitted video information to adjust the action of the video collection site. The workflow of the TCP connection is shown in Figure 2.

2.2.2 GPRS remote transmission mode

There are two ways for the system to establish a TCP connection through the GPRS network. One is that the monitoring terminal communicates with the GSM base station through the GPRS Modem. After the GPRS packet data packet passes through the internal gateway node, it is converted into a format that can be transmitted in the Internet and transmitted to the video server. The other is that the live video capture site GPRS Modem directly communicates with the GPRS Modem of the monitoring server through the GPRS network, and then sends the data to the video server through the serial port.

In comparison, the second method is to carry out data transmission inside the GPRS network, so the transmission rate and reliability are better than the first method, but the communication and equipment costs are higher. The video server only accepts a connection request from a live video capture site at the same time, which is suitable for mobile office video surveillance.

The first method is recommended. The remote video server terminates the Internet and has a fixed real IP address. The live video capture site is set to automatically request to establish a connection with this IP address after power-on. As the TCP server, the video server can selectively accept the connection request of the live video collection site, and assign a connected video encoding and decoding thread to each connected live video collection site, which can simultaneously monitor multiple sites. This method is suitable for large-scale, multi-site video surveillance.

3 I-7188 embedded application in wireless monitoring

The role of the embedded control module in the live video capture site is critical. The initialization of the on-site system, the detection of the current state of the system, the packaged data transmission, the interpretation of the control commands issued by the server, the transmission of AT commands to the GPRS Modem, and the establishment of a TCP connection with the remote server are all performed by the embedded control module. This system design uses I-7188 as the main controller of the monitoring terminal.

3.1 Structure and performance of I-7188

The I-7188 series controller is an embedded controller manufactured by Taiwan ICP DAS. It is suitable for high reliability, PC compatible, compact and affordable embedded systems, and is often used in data acquisition and control. Its internal structure is shown in Figure 3.

The I-7188 series controller adopts the American AMD 80188 core with a frequency of 40 MHz. The I-7188 module contains 256 KB/512 KB of static RAM and 256 KB (expandable to 512 KB) Flash-ROM. This ROM is small in size, low in power consumption, fast in access speed, strong in shock and shock resistance, and non-volatile. Volatile, can be widely used in embedded devices. The I-7188 contains not only Flash-ROM but also 2 KB of E2PROM. Because the requirements of the site are different, Flash-ROM deletes the entire block of data, and can delete 64 KB at a time. For small files less than 1 KB, I-7188 adds 2 KB of E2PROM. However, the number of erasures of E2PROM and Flash-ROM is limited (for example, E2PROM does not exceed 1,000,000 times). The field system needs to read and write data frequently. Flash-ROM and E2PROM cannot meet this requirement. Therefore, this module provides 31-bit NVRAM, which can be erased and read repeatedly. The designer provides different functions of memory considering the application requirements of different data. Large application files, operating system, BIOS, etc. are stored in the Flash-ROM, while small files are stored in the E2PROM, and the change is convenient, for frequent erasure, Read and write data is available in NVRAM.

The I-7188 not only has powerful computing and storage functions, but also has powerful communication functions. It can provide 4 serial ports: COM1 (RS-232 or RS-485), which can be used for ordinary 9-wire or 3-wire RS-232 strings. Line interface, such as communication with ordinary PC or other RS-232 devices, can also be connected to MODEM for remote communication; can also do 2-wire RS-485 serial interface to communicate with other RS-485 devices through RS-485 network. COM2 (with 3 000 V isolated RS-485). COM3 (RS-232); COM4 (RS-232), I-7188 program through COM4 manned Flash-ROM or E2PROM, program debugging also through COM4.

Each COM port of the I-7188 can achieve a high speed of 115.2 kbit/s. And each COM port has a 1 KB buffer. For high-speed data, the buffer allows the I-7188 to process the data without causing data loss.

The operating system of the I-7188 uses the embedded operating system MiniOS7 developed by ICP DAS itself. MiniOS7 is compatible with DOS operating system. Compared with conventional DOS, MiniOS7 is more suitable for embedded applications, such as: shorter power-on startup time (less than 0.1 s), built-in hardware diagnostics, direct support for built-in or active storage devices. Wait.

The I-7188 contains a real-time clock that can set the time and supports 1980 to 2079. There are no 2000 problems. I-7188 contains the watchdog circuit, power on, watchdog operation and detection every 1.6 s, such as I-7188 no response, I-7188 reset, suitable for unattended and critical applications.

The I-7188 can operate from a temperature range of -25°C to 75°C and consumes 2 W to 3 W. The operating power supply is a +10 VDC to +30 VDC DC power supply commonly used in industrial sites. It supports reverse power protection. It is very suitable for the harsh environment of industrial sites.

The software uses the standard C language, that is, the user only needs to write the program in the standard C language, and then download it to the I-7188 by using the tools provided by ICP DAS. In addition to the C language standard function library, ICP DAS also provides a wealth of C function libraries, including: serial port operation related functions, Flash file system read and write functions, Flash read and write erase related functions, E2PROM read and write related functions, Timer and watchdog related functions, etc. Users can easily develop an embedded control system with serial communication.

3.2 Software Design of I-7188

The internal process of the embedded controller I-7188 is shown in Figure 4. In the case of establishing a TCP connection, the I-7188 will continuously query whether data is received, whether there is data to be sent, and then perform corresponding operations.

In the system, the monitoring terminal acts as a client of the TCP connection, and the monitoring server acts as a server of the TCP connection. After the monitoring terminal is powered on, the I-7188 controller controls the GPRS Modem to find the monitoring server. After receiving the connection request of the monitoring terminal and establishing a TCP connection, the monitoring server sends a control command to the I-7188, and the I-7188 controls the video acquisition and video encoding transmission of the monitoring terminal.

It can be seen from the internal flow chart of I-7188: the initialization of the field system, the detection of the current state of the system, the packaged data transmission, the interpretation of the control commands issued by the server, the sending of AT commands to the GPRS Modem, and the establishment of a TCP connection with the remote server. It is controlled by I-7188.

3.3 I-7188 scalability

The I-7188's COM2 is an RS-485 serial interface and is a balanced differential drive, half-duplex serial communication interface standard. RS-485 is usually applied to a one-to-multipoint master-slave response communication system, that is, one host can correspond to multiple slave devices. Here, the I-7188 is used as the master device, and the camera and pan/tilt are used as slave devices. The communication baud rate is set to 4 800 b/s.

In an example of a wireless video surveillance system in an unattended machine room, RS-485 is connected to two other power parameter acquisition modules in addition to the camera and the pan/tilt, and several special power supplies in the equipment room. The parameters are monitored regularly. In general, the power parameters are stored in the Flash ROM of the I-7188. When the parameter exceeds the warning value, the I-7188 will send an alarm signal to the monitoring server and transmit the error parameter to the monitoring server, which helps the staff to analyze the cause of the failure as soon as possible.

4 Conclusion

The system utilizes the existing mobile GPRS network and the Internet, and can perform real-time video monitoring on remote targets without laying special lines; the on-site video collection site fully reflects the advantages of the embedded system: low power consumption, simple installation and maintenance, High cost performance, emphasizing the principle of “tailor-made”. The I-7188 embedded controller provides users with a wealth of resources, and users can develop a system that meets the requirements in a short period of time. The built-in MiniOS7 operating system is very stable, coupled with the watchdog circuit, which can greatly improve the reliability of the system and is more suitable for unattended applications, thus reducing the maintenance cost of the system.

Experiments show that the system transmits 10 frames of QCIF format black and white images per second in a stable GPRS network, which can meet the application requirements that are not very strict with real-time requirements. It is believed that the performance of the system will be greatly improved after adding the flow control mechanism.



references:

[1]. GPRS datasheet http://
[2]. RS232 datasheet http://
[3]. RS-485 datasheet http://
[4]. COM datasheet http://


:
0 times
Window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": " 0", "bdSize": "24" }, "share": {}, "image": { "viewList": ["qzone", "tsina", "tqq", "renren", "weixin"], "viewText": "Share to:", "viewSize": "16" }, "selectShare": { "bdContainerClass": null, "bdSelectMiniList": ["qzone", "tsina", "tqq", "renren" , "weixin"] } }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share. Baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];

Cylindrical Pins

Internal Thread Cylindrical Pin,Alloy Steel Cylindrical Pin,Flat Head Cylindrical Pins,Polished Steel Cylindrical Pins

Qingdao Yukun Bearing Needle Roller Co.,Ltd. , https://www.ykneedleroller.com