Research on Vehicle Track Tracking and Vehicle Reverse Lookup Algorithm Based on Ultrasonic Waveform Recording

In order to solve the problems of garage expand, video based searching costs high, ultrasonic detector based searching cannot achieve. This paper presents a vehicle trajectory tracking algorithm based on ultrasonic waveform recording. Parking management system can determine the parking position through the ultrasonic detector, so as to achieve vehicle reverse lookup. The system first uses the vehicle license plate recognition system to obtain the vehicle information, and sets the ultrasonic detector at the intersection to perceive the detection time and waveform recording signal. Firstly according to the time series determine the direction of the vehicle at the intersection. Then via the ultrasonic wave curve of two directions at the intersection to Identify the vehicle profile and determine the turning direction. Finally, the car's parking position is tracked through the parking space detector. This paper developed the WeChat public number for vehicle reverse lookup and payment. The user concerned to find car only need to enter the license plate number and can pay online fare. The system has been tested to be stable and reliable, which is a feasible solution to realize vehicle reverse searching at low cost.


Introduction
With the development of economy and the improvement of people's living standard, the number of vehicles climbed sharply [1]. It is reported that the motor vehicles have already amounted to 290 million in China including 194 million cars by the end of 2016 [2]. The interior pattern of the parking lot is crisscross and the entrance and exit are numerous which exposes a prominent problem that cars are difficult to find in parking lot.
The key issue of mentioned problem is lacking of a vehicle reverse lookup system. The smart parking rate in big city is only 7% which cannot meet the requirements of modern parking lot [3]. Without the help of vehicle reverse lookup system, car owners cannot find parking spaces real-timely. Moreover, parking utilization rate is poor because of the lack of real-time information interaction for parking resources. That makes a parking lot needs vehicle reverse lookup system to release traffic pressure and improve the living experience of users. Therefore, how to design vehicle reverse lookup system for smart cities has been concentrated by more and more scientists and engineers.
Joshi et al [4] designed a smart parking management system using RFID and OCR. Huang et al [5] provided Real-Time RFID Indoor Positioning System. In the design, RFID readers need to be placed on both sides of the driveway and parking spaces. The user needs to carry the radio frequency card to find the car, which increases the design cost and difficulty. Cho et al [6] proposed a new automatic parking approach that uses a surveillance camera and introduced the vehicle position, attitude, and parking space detection methods by using a CCTVbased environment. Compared with artificial car seeking and card searching, the system has a widely improvement. In fact, relative cost of the system is rarely low, and it is not easy to popularize. Ultrasonic detector has many advantages, such as simple configuration, flexible identification, high recognition accuracy and strong anti-interference capability [7][8]. However, the ultrasonic detector cannot reverse vehicle lookup at present. In this paper, a reverse vehicle lookup system based on ultrasonic detection technology is explored. First, we identify the vehicle's direction based on time series discriminating method first. Second, many works confirm that identity of vehicle by using the characteristic value of recorded data. Vehicle tracking and locating are also realized to provide reverse lookup path based on WeChat platform.
The rest of this paper is organized as follows. Section 2 presents a vehicle reverse lookup system framework, and implements its hardware and database. Acquisition of vehicle waveform recording data and the vehicle trajectory tracking algorithm based on time series are illustrated in Section 3 and Section 4. Section 5 provides development of the WeChat public number. Finally, we conclude the paper and outline future work in Section 6. The main composition of the vehicle reverse lookup system based on ultrasonic detector is shown in Figure 1. It includes the a vehicle license plate recognition system, the ultrasonic detector and the parking management server. The vehicle license plate recognition system detects the vehicle license plate number. While the license plate number and the time information are t r a n s f e r r e d t o p a r k i n g m a n a g e m e n t s e r v e r .

Figure1. system architecture
The parking space ultrasonic detector detects the occupancy status of the parking space. The road ultrasonic detector is set at every intersection of the parking lot. It detects the passing time of the vehicle and triggers the recording mode. The corresponding ultrasonic detector number, recording information and time are sent to the server. The ultrasonic detector communicates with the parking management server through the network.
A relational database and a vehicle track tracking software module are deployed on the parking management server. The server receives license plate recognition information and ultrasonic detection information. It distributes parking spaces and routes, provides lighting guidance, tracks the real-time driving path of vehicles, and determines the location of vehicles.

Database model
The entities of the parking lot include roads, intersections, parking spaces, etc. Each of the four directions of each intersection is equipped with an ultrasonic detector, each parking space equipped with an ultrasonic detector, and each ultrasonic detector has a unique ID. The database is used to save the car's license plate, the user ID, the time to enter the parking lot, the track, the parking space, the time of leaving the parking lot. Figure 2 is the E-R model of the system. According to the E-R model, tables in the relational database establish.

Acquisition of vehicle recorded wave data and selection of eigenvalues
The car body characteristic value of the vehicle detected via the ultrasonic detector corresponds to the license plate number. Therefore, when several cars pass through the same intersection, the ultrasonic detector can identify the vehicle by detecting the waveform recording information of the vehicle. It will not affect the accuracy of the actual vehicle route tracking due to the occurrence of overtaking or uncertain vehicles.

Basic principle of ultrasonic wave recording
The ultrasonic ranging formula is： d vt / 2 =( ) (1) In the form: d -the distance to be measured; v-The velocity of ultrasonic wave propagation in the atmosphere; t -Back and forth propagation time of ultrasonic. The ultrasonic detector is installed at a certain height to the ground. The ultrasonic wave is transmitted to the surface at a fixed frequency and accepts reflection wave. The distance is output at a fixed frequency after calculation. When the ultrasonic comes back from the top of the vehicle, the detector receives the signal and outputs the distance d z from the detector to the top of the car. The ultrasonic detector's install height minus the measured distance can get the vehicle height h, h=H -dz. When a vehicle enters and exits the measurement area, the corresponding detector outputs a data sequence. Each height data is corresponding to the distance between the top of a vehicle and the detector. Meanwhile, the vehicle height value sequence can also be obtained.
The detector launches ultrasound at a fixed frequency, the number of measured distance can be changed to the time tp of vehicle passing the detector. p t n / f = . n is the number of data collected, and f is the measurement frequency of the sensor. In order to accurately identify the vehicle, we should first get the two-dimensional contour information of the vehicle. Therefore the measurement frequency should be as high as possible to collect the vehicle height data as much as possible.
When the sampling frequency of the ultrasonic detector is certain, the faster vehicle speed, the shorter length, the less acquisition data of the vehicle. Different types of vehicles, due to different length and speed, the number of the data collected is different. Draw side outline vehicle and vehicle are recognized through collecting the vehicle height data sequence to replace the vehicle contour curve.

Data normalization
The normalization of signal scale is the basis for the comparison of the two curves. As shown in Figure 3. The recorded wave curve of the same vehicle in different locations will vary with the speed. It mainly shows that the curve is stretched or compressed by the change in the number of points. Therefore, in order to facilitate the comparison of the similarity between the two curves, the normalization of the two parties should be first carried out. When normalization, we can take the curve with fewer sampling points as the target. The other curve is obtained the same width data as the target curve through the sampling point signal extraction.
This paper uses the Akima interpolation method to estimate the curve segment. For sampling points 0 x , x (k 0,1, , n 2) In this interval, a cubic polynomial can be uniquely identified.
Among them, At this time, the three order polynomial can be used to determine the value of the function of the interpolation point t on the interval. According to the Akima geometric condition, there are: Therefore y -y k+1 k u = k x -x k+1 k final function is as follows: The ultrasonic detector in two directions at one intersection gathers the signal curve of a vehicle. 12 vv ＞ The sampling points of the car are n and m respectively, in which n m  . The curve is normalized to the standard state of sampling point n. The original curve and compression curve are shown in Figure 3.
Euclidean distance is used to identify the similarity criterion of target vehicle. A threshold T is set in advance to determine the similarity between recorded information. If T ＜ , the vehicle detected by recorded information is the target vehicle.

4.1.1License plate recognition
When the vehicle enters the parking lot, the entrance camera gets the vehicle license plate information. The exit and entry control management software recognizes the license plate and stores it to the database.

4.1.2Parking space pre-allocate and lighting guidance
The system can pre-allocate the parking space and control the traffic light guidance are based on the information of the license plate n umber and the occupancy of parking space. If there is a fixed parking space, allocates directly the corresponding parking space. Otherwise it should be distributed dynamically according to the remaining parking space. The remaining parking assignment method is divided into the following. Optimal path planning such as Dijkstra algorithm, ant colony algorithm and allocate randomly. It is also possible to compare the distance between the remaining parking spaces and choose the nearest path. Along the path of planning, the system controls the light of the indicator on the corresponding intersection and the final parking space to realize the lighting guidance of the vehicle.

Vehicle trajectory tracking based on time series.
Suppose there are multiple intersection in the whole parking lot. There are 4 directions of a, b, c, and d at each intersection. Plane map of road ultrasonic detector distribution in parking lot is shown in Figure 4. When the vehicle passes through an ultrasonic detector, the corresponding detector sends the ultrasonic detector ID and the time to the parking management server. While vehicle passes through multiple junctions and ends at the corresponding parking spaces, the system records the vehicle information by the time sequence including the passing intersection and the final parking space. The time series of this position means the vehicle track. The data record format showns in Table 1

4.2.1Track tracking
After the vehicle passes through the entrance, the system will distribute the driving path for the vehicle. In fact, the system will track the vehicle's path in real time. The driving path is judged from the entrance, the workflow is shown in Figure 5. The concrete steps are as follows.
Step1: The system starts the corresponding light guidance control according to the allocated parking space and driving path.
Step2: The vehicle runs to the first intersection such as B101 in Figure 4. After passing through the intersection, the system receives signals from two road ultrasonic detectors, the signals consists of the detector ID number of B101a, the eigenvalue of the waveform recording and the passing time. Depending on the direction of the vehicle, the second passing detector could be B101b, B101c, B101d. The first information received by the system is used as the basis for judging the driving direction.
Step 3: Ultrasonic detection system based on timing has preliminary determine the driving direction of the vehicle. The Euclidean distance is used to calculate the vehicle eigenvalues of the first detector and other detectors at the intersection, and the minimum value corresponding detector is obtained, and then determines the direction of the vehicle. The two detector signals form the vehicle passing information at the intersection; Step 4: The consistency of the actual driving direction and the distribution path of the vehicle is compared at the intersection. If it is inconsistent, the path will be replanned. The next intersection will be judged and stored according to step 2. Step 5: This step judges whether the system accepts the parking space detector information. if no data is received, the system will judge and store at the next intersection according to step 2. The system will end the process and store information to form the vehicle's path until it receives the parking space detector information.
Subsequent vehicle tracking steps are described above.

4.2.2Uncertain parking space manage
The tracking algorithm is recorded in a chronological order. Occasionally, the second car will stop at first when two cars enter the same parking area at the same time. At the time of the first car stops, it may appears that the allocated parking number not match with the license number. The parking area is stored as parking information in the database which makes the parking area can be obtained when the user finds the car. When the one leaves the parking lot, the parking space information of the another can be determined.

WeChat public number development
The research of this paper also focus on WeChat public number developing. The WeChat public number is a platform that provides the license plate binding, parking reservation, vehicle reverse lookuping and payment in smart phone. Users can inquire the parking space information at any time through the WeChat public number, so it is convenient to arrange the trip plan ahead of departure. The function of reservation parking space, car search, vehicle parking location and search path can be implemented via WeChat. Moreover, users can pay for parking at anytime and anywhere without waiting for the queue. The parking management system, parking lot and users can interact via the WeChat powerful connection ability to facilitate user travel.

5.1Data cmmunication mchanism
The communication process of the WeChat public platform, the parking management server, and the parking management database is shown in Figure 6. Its details are as follows.
(1) Users send messages to the WeChat public platform. The message will be forwarded to the WeChat public platform through the WeChat public platform server.
(2) When the WeChat public platform receives the message, it sends the message to the parking management server according to the URL which based on interface configuration.
(3) When receives the message, the parking management server completes the business function requirements via invoking the various functional interfaces authorized by WeChat. It includes accessing parking management database, reading data information of WeChat users, responding to all kinds of operation of users, and returning corresponding information to WeChat public platform.
(4) WeChat public platform receives the response information and then forwards it to WeChat user. The user receives a reply message.

Function analysis and Implementation
The analysis of the functional requirements of the WeChat service system is shown in Figure 7. This system has applied for a WeChat service number, and has obtained the advanced interface permission by real-name authentication. The relational database MySQL is used as the data environment. Interface configuration is the primary link to the docking of the WeChat server and the public account server. When login to the public platform, the development mode will activate which in the advanced function menu. WeChat development model will open when completes and validates the WeChat server interface URL and Token. The WeChat public number will get the credentials (appId and appsecret) and advanced interface permissions. It includes information push, custom menu and two-dimensional code generation provided by WeChat platform, as well as the interaction privileges between parking management server and WeChat server.

License plate binding
The license plate number of the vehicle identity information is bound to the WeChat public number. Which can be used for authentication when booking the parking space. The only openid in the WeChat platform is to distinguish between the identity of a WeChat user. The vehicle information table is stored in the database, which is mainly used to store the corresponding relationship between WeChat openid and license plate number. The license plate recognition system of the parking lot is used to identify the number of the license plate, and then the system compares it with the license plate number which binding on the WeChat. The vehicle enters the parking lot after the vehicle and the booking information are matched. The license plate binding process is shown in Figure 8.

Reservation of parking space
Users can search for the location of nearby parking lot by looking for the location of the map. The rest of parking space in the parking lot can be confirmed as well. Users can also choose parking spaces and schedule time according to the specific location and parking status of the remaining empty parking spaces, or choose the parking spaces automatically allocated by the system according to certain rules. When the user fails to reach the parking lot within the scheduled time, the reservation time of the parking space can be extended via the WeChat public number before the end of the scheduled time.

Reverse lookup and payment
The reverse lookup path of the parking space is stored in the form of a road map. It includes parking area, parking space number and optimal path from entrance to parking space. The optimal path from entrance to parking space can solve most of the problems of vehicle reverse lookup. It is not take personnel locating and cost into consider. User reverse lookup and payment only need to enter the license plate number. WeChat server queries the database according to the license number. It obtains the corresponding search information, fare information, and pushes the information to WeChat client. User can pay for the fare. The flow diagram is shown in Figure 9.
The system adopts WeChat payment as a third-party payment. It completes the request of third-party payment based on WeChat payment API. The WeChat public number interface is shown in Figure 10.