A Parking Evaluation System Based on the BDS and Intensity Distance Scoring Algorithm

In this paper, a parking evaluation system based on the BDS (BeiDou Navigation Satellite System) and IDS (Intensity Distance Scoring) algorithm has been proposed. Real-time kinematic (RTK) positioning technology and an extended Kalman filter (EKF) algorithm were applied to the BDS to achieve centimeter-level positioning. A dynamic error experiment was performed to verify the positioning accuracy. The parking evaluation system was developed using the IDS algorithm to score parking trajectories. A parking experiment was carried out in a simulated field to prove the effectiveness of the parking evaluation system. With the IDS algorithm, a parking lot in the simulation was modeled using an 8-bit grayscale map image. The map contains 1 departure area, 5 obstacle areas, and 2 parking areas. The intensity of each pixel in the remaining area is inversely proportional to its shorter distance to the two parking areas. The IDS algorithm evaluates parking through three aspects, the choice of different parking trajectories, parking time, and whether an obstacle area is passed through, which can effectively judge the driver’s parking technology.


I. INTRODUCTION
In recent years, ''smart cities'' have been widely integrated into daily life [1], [2]. Autonomous vehicles (AVs) have developed rapidly and have become one of the major trends in ''smart cities'' research [3]- [5]. AVs are widely used in transportation, the environment, agriculture, underwater exploration, and other fields [6]- [9]. A standard is required to evaluate AV trajectories, especially the route to the endpoint, which is the parking process. Driving performance assessment (DPA) can be used to determine the quality of autonomous driving trajectories [10].
Before obtaining the driving trajectories and evaluating them, we first need to navigate and locate the driving trajectories precisely. To date, the BDS has successfully launched 55 navigation satellites and is providing reliable high-precision timing and positioning services. The establishment of a parking evaluation system through the BDS can be used to better improve positioning accuracy. Carrier phase technology must be used to achieve high-precision positioning [11]. There are two main methods for high-precision The associate editor coordinating the review of this manuscript and approving it for publication was Antonino Orsino . carrier phase positioning: precise point position (PPP) technology [12], [13] and RTK differential technology [14], [13]. In general, applying GNSS clock prediction performance analysis and other methods to PPP technology can be used to reach the decimeter level [15], while RTK technology can achieve relative positioning at the centimeter level by eliminating the same error through a differential algorithm [16]. Applying a Kalman filter (KF) model to an RTK positioning algorithm can obtain better positioning results. An unscented Kalman filter (UKF) is used in [17] in combination with RTK-GPS (Real-time kinematic-Global Positioning System) and INS (Inertial Navigation System) technology for very accurate displacement records. In [18], a KF is used for sensor fusion in a GPS system receiver, which effectively improves the attitude estimate of a self-propelled agricultural sprayer.
DPA evaluates the driving skills of a driver from two perspectives: (1) vehicle-centered and (2) overall route-centered. In the vehicle-centered method, vehicle driving stability, vehicle parking gesture, passenger comfort, and other aspects are used as evaluation criteria. The authors in [19] proposed a map-based approach to improve the performance of vehicle pose estimation. In addition, the driving time, whether a collision occurred, driving trajectories, and other aspects will be used as evaluation criteria in the overall route-centered method. Time efficiency indicators and safety indicators were used to evaluate the driver's driving technology in [20]. The authors in [21] proposed a novel warning/avoidance algorithm to avoid collisions. In [22]- [24], a two-step planning trajectory algorithm, a parallel elite genetic algorithm, and hierarchical trajectory planning are proposed for driving route planning and to generate the trajectories of automatic driving. In [25], the curvature path is constrained by geometric constraints, and the parking trajectory is finally generated by continuous error correction.
This study mainly consists of two parts: (1) A BeiDou navigation satellite system is established based on RTK positioning technology and an extended Kalman filter algorithm to achieve real-time tracking of vehicles' driving trajectories and centimeter-level positioning; (2) The intensity value of a parking map is modeled, and a scoring algorithm designed based on intensity distance with the following three factors is taken into consideration: parking time, the trajectory before parking and whether the parking trajectory passes through the obstacle area. The effectiveness of the algorithm is proven through experiments.
The rest of the paper is organized as follows: Section II introduces the hardware and software components of the positioning system. Section III implements the centimeter-level positioning algorithm. In Section IV, the scoring algorithm based on IDS is introduced in detail. Experimental configurations and results are shown in Section V. Finally, Section VI presents the conclusions and implications of the study.

II. POSITIONING SYSTEM BASED ON BDS A. HARDWARE DESIGN
The hardware system consists of a fixed base station and a mobile base station.
The fixed base station is composed of a BDS receiver, a BDS antenna, a signal amplifier, a radio station, power supply equipment (the power supply is powered by a 12 V stable voltage battery) and the host. The fixed base station can work even under severe weather conditions with a lightning rod module that is placed 1-3 m from the fixed base station. The fixed base station is shown in Figure 1.
The mobile base station, as shown in Figure 2, consists of a BDS receiver, dual BDS antennas (The two antennas are connected to the mobile base station. The position and posture of the mobile vehicle can be judged by observing the angular distance between the two baselines.), power supply equipment (powered by a 12 V stable voltage battery), and a wireless bridge. The mobile base station has a terminal BDS receiver host inside, and the signal receiver is fixed to the vehicle through a suction cup. The fixed base station and mobile base station have a modular design and are easy to carry, disassemble, and maintain on-site.

B. SOFTWARE DESIGN
The software runs on the Android 4.4 operating system, which uses JDK (software development kit in the Java language), the MVP framework and the built-in SQLite. The communications between the software and the hardware are through Wi-Fi.
The following functionalities are incorporated: (1) map collection (collect the map information of the parking lot into the system); (2) mobile vehicle model collection (to determine the size and shape of the mobile vehicle); (3) real-time display of the vehicle's initial position and movement trajectory; (4) real-time display of the vehicle's movement information and parking score; (5) playback of the vehicle movement process, and so on.

III. RTK POSITIONING ALGORITHM BASED ON BDS A. BEIDOU POSITIONING SOLUTION MODEL
The RTK positioning algorithm can ensure centimeter-level vehicle positioning accuracy. The pseudorange and carrier phase observation equations of BeiDou positioning are as follows: where P, ϕ and λ denote the pseudorange observation value, carrier phase observation value, and wavelength, VOLUME 8, 2020 respectively. R is the geometric distance from the satellite to the receiver. t r and t s are the receiver clock error and the satellite clock error, respectively. T and I are the tropospheric delay error and the ionospheric delay error, respectively. M is the multipath error, N is the ambiguity of the carrier phase, and e is the observation noise. With the quadratic difference between 2 satellites and 2 receivers worked out to improve accuracy, the double-difference observation equation is obtained as follows: where ∇ is the double difference operator. The double-difference observation equation is jointly solved to obtain the matrix formula of carrier phase positioning as follows: In (5): where dX is a three-position coordinate correction vector and L is a constant vector. In equation (6), (x 0 , y 0 , z 0 ) is the receiver position, and (x k , y k , z k ) is the position of the k-th satellite. If there are k satellites, we can obtain k-1 double-difference observation equations and then obtain accurate relative position coordinates.

B. EKF ALGORITHM IN THE RTK POSITIONING ALGORITHM
The state vector model in the EKF used in this study is a constant acceleration (CA) model. The state vector of the receiver is X k = x kẋkẍk y kẏkÿk z kżkzk ∇N 1 · · · ∇N k−1 . Specifically, this vector represents the position coordinates, speed, acceleration, and carrier-phase ambiguity. The discrete form of the system observation equation is: In (8) and (9), where F is the state transition matrix,P is the prediction covariance matrix, Q is the noise matrix, and the system update equation is: In (12), (13), (14), K, Z, H and R are the Kalman gain, observation value, observation matrix and covariance matrix of measurement noise, respectively.x is the output result of the EKF, and the filter model is applied to the RTK positioning algorithm. The system finally achieves centimeter-level positioning accuracy. Figure 3 shows the data flowchart of the BDS RTK positioning system. The observation frequencies in BDS RTK processing are B1 (1561.098MHz), B2 (1207.14MHz), and B3 (1268.52MHz). The system receives the satellite's wireless navigation signal by the BDS satellite antenna, converts the wireless signal into an electrical signal, and finally processes and records the signal. The fixed base station transmits internal information and the received BDS signals to the mobile base station through the radio. Then, the mobile base station resolves the observation data of both the fixed base station and itself and optimizes both using the EKF. Then, the obtained data will be transformed to the xyz coordinate system and transmitted to the user.

IV. IDS ALGORITHM A. COORDINATE AXIS CREATION
The position of the coordinate system is determined by the location of the fixed base station. Two signal receivers on the fixed base station are placed a certain distance apart horizontally (generally 3-5 m from the receiver). The Y-axis is the connection of the two signal receivers, and the X-axis is the vertical direction of the midpoint of the connection of the two signal receivers. The direction away from the host is the positive direction of the X-axis, and the direction of the Y-axis rotating counterclockwise along the X-axis is the positive direction.
The East-North-Up (ENU) coordinate vector is obtained from the receiver as p ENU = (x 0 , y 0 , z 0 ), and the ENU coordinate vector is converted into the coordinate vector in the map as follows (15), as shown at the bottom of the page, where ϕ, θ, γ are the pitch angle, heading angle, and roll angle of the vehicle, respectively. Figure 4a shows a parking lot. We simulated the parking area in an 8-bit grayscale image, as shown in Figure 4b. Area A is the vehicle departure area, B 1 and B 2 are the parking space areas, and C 1 -C 5 are the obstacle areas. The intensity value of each pixel is determined by its shorter distance to the two parking spaces. The shorter the distance is, the larger the intensity value. The smaller the minimum distance is, the larger the intensity value. In (15), the position coordinates p(x, y, z) of the vehicle relative to the receiver (coordinates in the modeled map) can be obtained as follows: p(x, y, z) = 0, (x, y, z) / ∈ Map 1, (x, y, z) ∈ Map (16) where ''Map'' is the modeled parking map. Points beyond the modeled parking map are not recorded.

B. DESIGN OF THE IDS ALGORITHM
Define D as the intensity distance: where gray(x, y, z) is the intensity value corresponding to the current location on the parking map. As shown in Figure 5, we assume that the distances from point S1(x 1 , y 1 , z 1 ) to parking spaces B 1 and B 2 are d1 and d2, respectively. The intensity value of point S1 is expressed as follows: gray(x 1 , y 1 , z 1 ) = 255 − INT (kd S1 ) p =   sin ϕ cos θ + sin θ cos ϕ sin γ cos θ cos ϕ sin ϕ sin γ − sin θ cos ϕ cos γ cos ϕ cos γ − sin θ sin ϕ sin γ − cos θ sin ϕ cos ϕ sin γ − sin θ sin ϕ cos γ cos θ sin γ − sin θ − cos θ cos γ   .p ENU (15) VOLUME 8, 2020  where INT indicates the round function and k is the scaling factor. The scoring criteria based on intensity distance are listed below: (1) If any of the obstacle areas is passed during parking, the score is 0; (2) If no obstacle area is passed during parking, then x If the parking is overtime, the score is 0; y If the parking does not time out, then the driver will obtain a score normally. The score at each moment is related to the distance from the position to the nearest parking space at that moment. The closer the distance, the higher the score will be. If the parking time is less than the maximum parking time, the corresponding reward score will be obtained according to the amount of early parking time. The parking scoring flowchart is shown in Figure 6. The score based on the above scoring criteria is calculated as follows: Here, Obs is the obstacle area (C1-C5 areas in the parking map). nis the number of samples; T is the total time spent parking, T = ndt; and dt is the sampling interval. T max is the maximum parking time; D max is the maximum intensity distance D(x, y, z); and w 1 , w 2 are weights, w 1 ≤ w 2 . n max is the number of samples corresponding to the maximum parking time, n max = T max /dt. When the parking time T is less than the maximum parking time T max , the reward score is obtained at a subsequent time, and D max is obtained with a score of w 2 . For example, people taking the same route with a shorter time score higher.
The positioning error of the system determines whether the parking trajectory and vehicle parking position data can be accurately obtained. This has a great impact on the system's DPA evaluation of the driver. In IDS, the positioning error of the system is required to be at least decimeter level.
After the observation points in the system are optimized by the RTK and EKF algorithms, a dynamic error experiment of positioning can be used to analyze the positioning error of the system. We select data within a certain period randomly and use the same GNSS type, observation frequency, and other parameters. To ensure the validity and reliability of data processing, we use the GNSS dynamic relative positioning method to detect the measurement performance of the GNSS receiver and use dynamic data postprocessing software to process the observation data.
The specific experimental steps are as follows: (1) Take a certain point as a reference station and settle through software to obtain the relative coordinates of the monitoring station; (2) The BDS received data was collected and the precise coordinates of the site are known in CGCS2000. The coordinates are used as the real coordinates of the point; (3) Measure the coordinates of the monitoring station for 24 hours and average the coordinates during this period. It is found that the error between the average coordinates and the true coordinates is less than 0.001m. Therefore, the average coordinate can also be the most real coordinate.; (4) Select the data in any time period during the 24-h measurement period as the experimental data, and record the difference in the positioning accuracy error between each coordinate and the real coordinate in the experimental data. Since the BDS output is in ENU coordinates, we need to measure the positioning errors in 3 directions, as shown in Figure 7. In the experiment, we compare the selected position coordinates measured by the system within 20 min with the real coordinates measured in step (2) to obtain the error curve of the test point. The dynamic error is calculated as follows: where e is the dynamic error, p is the measured coordinate within 20 minutes, and p is the real coordinate measured in step (2), respectively. The East and North coordinate errors are almost less than 0.5 cm. Due to the signal interference coordinates, the errors exceed 0.5 cm on only a few occasions but remain less than 1 cm. The error in the U direction is large, with the result being less than 10 cm. The error in the U direction is relatively smooth in a short time. Considering that parking positioning is mainly related to East-North plane coordinates, the positioning accuracy in the U direction is within an acceptable range.

B. PARKING JUDGMENT EXPERIMENT
We explain the parking scoring process in detail through the parking processes of 5 different routes. In parking scoring, the IDS algorithm is used as the scoring rule. Figure 8 shows the driving route map. The drivers of Tracks A, B, C, D, and E completed parking in 160 s, 180 s, 192 s, 144 s, and 153 s, respectively. Figure 9 shows the scores of the 5 different trajectories, and Table I shows the DPA of the five drivers. The   abscissa is the duration of parking, and the ordinate is the score. Here, we set the maximum parking duration to 180 s. Track A stopped parking in 160 s and obtained extra bonus points between 160 s and 180 s. Track B stopped parking at exactly 180 s and thus did not receive additional bonus points. The stop time of Track C exceeded 180 s, so the final score was 0. Track D passed through the obstacle area, so the final score was also 0.
We further verified that the IDS algorithm can evaluate the parking scoring process by observing the three effective scoring Tracks A, B, and E. The IDS algorithm evaluation rules are as follows: (1) The closer to the parking point, the higher the score is. In other words, a driver selecting a shorter route can obtain a higher score than a driver choosing a longer route. (2) If parking is completed in advance, an additional bonus score corresponding to the amount of time in advance will be obtained. Therefore, for the same parking route, a driver who achieves a shorter time will obtain a higher score. The drivers of Track A and Track B chose different parking spaces. The driver of Track A chose a parking route that was shorter and took less time. Therefore, the parking score of Track A is significantly higher than that of track B. The drivers of Track A and Track E chose the same route to parking, but the driver of Track E took a shorter time than that of track A to complete parking, so the driver of Track E received more points.

VI. CONCLUSION
In this paper, a parking evaluation system, which includes a position tracking module based on BDS and a back-end parking scoring system based on IDS, has been designed. The position tracking module based on BDS achieves centimeter-level positioning by using RTK positioning technology and an EKF algorithm. The IDS algorithm was used to design an evaluation standard for the parking process in a simulated parking map. In the simulated field, we verified the centimeter-level positioning of the system and the effectiveness of the IDS algorithm through dynamic error experiments and parking trajectory experiments, respectively.
The proposed system has a wide range of application scenarios and can be used in driving schools, large parking lots, and docks where parking procedures are important. The high positioning accuracy and IDS algorithm can also be applied to the evaluation of autonomous driving trajectories and to any future research on path planning.