ETC technology and its Application in the Campus Intelligent Vehicle Management System

In order to solve the problem that the vehicles within the university campus are increasing steadily and a large number of outside vehicles drive through the campus arbitrarily and park disorderly. In this paper, a campus intelligent vehicle management system based on ETC is designed, and the ETC technology is introduced. On the basis of analyzing the system's hardware architecture and workflow, a design model of lane is given. Finally, it discusses the communication theory of Winsock, customs a format of data frame and proposes a Winsock-based intelligent data synchronization algorithm. The daily traffic volume has been decreased by 65% since the system is put into operation in a university.


Introduction
As the living standard of people improve ceaselessly, the vehicles within the university campus are increasing steadily, and a large number of outside vehicles drive through the campus arbitrarily and park disorderly.In order to control the flows of the outside vehicles, ease the campus transport pressure, guarantee the traffic safety of the teachers and students and the traffic smooth and create a safe, green, harmonious campus environment, we urgently need a campus intelligent vehicle management system which can identify automatically a variety of types of vehicles and has a high degree of automation.
Some scholars made a lot of research in the vehicle management system, such as Hao Zhuo designed the structure of hardware and software for the vehicle management system based on RFID [1]; Wentao Guo etc, designed and researched intelligent parking management system based on RFID [2], but they didn't discuss the traffic safety issues when the vehicle access lanes and the data synchronization and consistency between the client and server.
In the ETC technology, Zhengdong Liu etc, introduced the design of hardware and software and workflow for the lane control system [3]; Fei Wang Designed and implemented the ETC lane toll software for highway [4], but they didn't apply the ETC technology to the area of the campus intelligent vehicle management system.
In the campus intelligent vehicle management project for a university, we put the ETC technology into it for the first time, gave a design model of lane and proposed a Winsock-based intelligent data synchronization algorithm.
Finally, a campus intelligent vehicle management system based on ETC is designed and implemented.

Introduction of ETC technology
Electronic Toll Collection System (ETC System) is developed on the RFID technology.It integrates computer technology, automatic control technology, detection technology and communication technology and other high-tech means.When the vehicles pass the toll lane, they are charged automatically by the system according to their type [3].The system consists of the on board units (OBU), the road side unit (RSU) and loop sensor etc.When the vehicles pass the lane installing RSU, loop sensor perceive the vehicles, the RSU sends out enquiry signal and the OBU gives the response to complete the two-way communication and data exchange, and then complete the transaction between them according to various operation parameters, ultimately achieve the automatic collection of tolls.

Hardware architecture
The hardware architecture of the system is shown in figure 1.The system consists of the IPC, the antenna (RSU), electronic label (OBU), controller, induction coil, vehicle detectors, alarm light, sound box, LED display, lane traffic lights, camera, automatic barrier, IC card reader, ballot box and other equipment.The microwave antenna installed in sentry box and the electronic label installed in the vehicle exchange information through a dedicated short range microwave communication (DSRC) in this system.

System workflow
According to the users' identity, the vehicle is divided into two categories which are staff vehicles and temporary user vehicles in this system.For the staff vehicles, we adopt remote identification technology, so it needn't stop when the vehicles pass the lane.For the temporary user vehicles, it must obtain a temporary card from the ballot box at the entrance and return the card at the exit.After paying by charging management practices, it is allowed to pass.The system workflow is shown in figure 2.

Design model of ETC lane
The layout of ETC lane is shown in figure 3. When the vehicles enter the ETC lane of the sentry box, in order to ensure the traffic safety, realize smooth transaction between OBU and RSU and improve the efficiency of traffic, this paper puts forward with the design model of ETC lane.The model is confirmed by lane geometric parameter [5], which includes lane driving speed, the minimum safe distance between vehicles, the distance between the lane induction coils, lane length, lane width, etc.The specific design model as follows:

lane driving speed
As the vehicle passes the deceleration strip before it enters the ETC lane, so the lane driving speed is confirmed by initial value and the deceleration parameter of the deceleration strip.

The minimum safety distance between vehicles
In general, two vehicles drive into the ETC lane one after the other, when the leading driver finds the traffic light being red and brakes immediately, the following driver can also brake immediately via the leading vehicle's braking information until stopping which needs two stages that is the driver's braking response time named r t and continuous braking time.So we can work out the minimum safety distance between vehicles by working out the following vehicle's driving distance in those two stages which is named f S and the leading vehicle's driving distance during the continuous braking time which is named l S .
S is the distance between the two vehicles after they are stopping, f v and l v are the initial speed of two vehicles when they are braking, g is the gravity accelerated speed, f is the resistance coefficient of road and i is the longitudinal grade of road, the uphill take mark "+" and the downhill take mark"-".Suppose

The distance between trigger coil A and capture coil B
According to the manufacturer's product specifications, we know the projection of the microwave antenna in the lane is an ellipse that is communication area.The vehicle enters into the trigger coil A, and then it drives away the communication area to enter into the capture coil B. In the whole process, the OBU and the RSU communicate with each other through three stages that is the opened time of RSU, the waken time of OBU and the transaction time between the OBU and the RSU.

The distance between capture coil B and falling rod coil C
When the Vehicle leaves communication area and enters into the capture coil B, if it is recognized as a temporary user vehicle, the alarm light is warning, the traffic lights is red and the automatic barrier is closed, then the driver begin braking in reaction time until stopping.According to f S , we can get the distance between the capture coil B and the falling rod coil C which is named BC L .

lane length
As shown in figure 3, the temporary user vehicle leaves the communication area until encountering the red light to stop.The entire route plus the minimum safety distance between vehicles is the lane length which is named L, we can get it according to B.
For example, according to B and D, we can see that 3.00+0.50+4.83=8.83m.We set it as 9 m in this project.

lane length
The lane width is related with the vehicle type, vehicle width, transverse safety distance and other factors.According to the City Road Design Standard Regulation, we set it as 3.50m in this project.

Intelligent data synchronization algorithm based on WinSock
In the implementation of the system, the SQL Server database of each sentry box and the Oracle database of management center server must exchange data with each other to realize the data synchronization between the server and each sentry box.In the field of distributed database, we usually adopt the technologies which are data replication, data pipeline, XML and Winsock to realize data synchronization between heterogeneous databases [6].As for data replication technology, it is very complex for the configuration and maintenance of the database and prone to replication block, and what's more, there is some system delay.Data pipeline technology lacks of response mechanism, so it's hard to know whether the other has been received the data.Meanwhile, it also depends on high-performance network.Once the network breaks down, the transmission will come to naught.XML technology is a popular technique at present, but it requires setting up Web server and highperformance hardware.It also requires additional applications to complete data transmission, so it increases the system load.Therefore, this paper adopts Winsock communication mechanism to realize data synchronization.On the one hand it can greatly reduce the delay of data synchronization to realize complete intelligent.On the other hand, it has fault-tolerance mechanism and supports breakpoint continuingly.It can retransmit the data to adapt to more challenging environments.

the communication theory of Winsock
The TCP/IP protocol is the most important protocol in Internet network.Winsock conduct network communication on the basis of TCP/IP.It contains the UDP protocol and TCP protocol, in which the TCP protocol is connection-oriented and can provide high reliability service; the UDP protocol is connectionless and can provide efficient services.As the system requires relatively high for the reliability of data, so we use the TCP protocol.The data flow diagram of client/server based on Winsock is shown in figure 4.

Custom data frame
It is crucial to set a format of data frame for ensuring the synchronization and consistency of the sending data and receiving data.According to TCP protocol, when we set the data frame format, we must meet the following principles of communication protocol: (1) Handshake, when one starts to send data, it must notify the other.( 2) Safety, it must ensure that only the two sides reached a handshake agreement, can they transmit data mutually.(3) Fault tolerance, when the data block is error during transmission, it must inform the other and make appropriate treatment immediately.Based on the above principles, we define the format of data frame as shown in Figure 5.The symbols have the following meanings: "HEAD" is the head of the frame and its length is 2 bytes; "CMD" is the control instruction and its length is 4 bytes; "IP" is the receiver's address and its length is 4 bytes; "LEN" is the length of the sending data and its length is 2 bytes; "DATA" is the content of the data, and its length can not exceed 255 bytes; "CRC" is the check code and its length is 2 bytes; "END" is the end of the frame and its length is 2 bytes.

the implementation of intelligent data synchronization algorithm
The design of data synchronization algorithm is divided into two parts: client design and server design.In this paper, the system takes the database table as a unit to achieve data synchronization.Take the records of vehicle in or out table named t_IO for example, specific implementation as follows: Step 1: Write a service program named Server and add a control array of Winsock named wskServer(0) in the server, then add a control of Winsock named wskClient in the client system which is running in each sentry box.Set IP address and port number, and transmission protocol for client and server.The transmission protocol is TCP protocol.Go to step 2.
Step 2: The Server monitors the connection request from each client by calling the listen method.It doesn't accept the client's request until the accept method is executed.Go to step 3.
Step 3: Each client calls the connect method to establish a connection with the Server.If the connection is failed, the system prompts error and handles it; if the connection is successful, the system check the temporary records of vehicle in or out table named t_tempIO if there are some records from local database.If there is record, remove the record and write it into the buffer first, then send it to the Server via the sendData method, delete this record from the t_tempIO at last, go to step 5; otherwise, go to step 4.
Step 4: When the vehicle passes through the lane, each client stores the vehicle access record to the t_IO of the local database, meanwhile, the system check if the connection is normal.If the connection is normal, write the record into the buffer via the sendData method, then remove the record from the buffer and send it to the Server; if the connection is failed, insert the record into the t_tempIO of local database.
Step 5: The Server receives the data from the local buffer by calling getData method, and then stores the record to the t_IO of the server database.Finally, the Server sends the message which whether processed successfully or not to the client.It goes to step 3 after the client makes appropriate treatment.

CONCLUSION
Applying ETC technology to this system, it had achieved obvious effect since it is put into operation at a university.On the one hand, the recognition rate of internal vehicles reaches over 99.95% which ensure the vehicle traffic of campus smooth; On the other hand, the daily traffic flow had decreased from 20000 to 7000 which alleviate the transport pressure of campus efficiently and create a harmonious campus environment.

Figure 3 .
Figure 3. Layout diagram of ETC lane.

v
is the maximum speed limit for the vehicle on the campus, O is set by the deceleration value of the deceleration strip, suppose 0 v = 20 km/h , O = 10 km/h.

Figure 4 .
Figure 4. Data flow diagram of client/server.

Figure 5 .
Figure 5.The format of data frame.
For example, according to the manufacturer's instruction, the opened time of RSU is generally between 60 ms and 300 ms, the waken time of OBU is less than 5 ms, the transaction time about 250 ms to 300 ms.Suppose