Bayesian Cooperative Localization With NLOS and Malicious Vehicle Detection in GNSS-Challenged Environments

Owing to the inter-vehicle non-line-of-sight (NLOS) measurement and malicious attack in global navigation satellite system (GNSS) challenged environment, the vehicle position precision is seriously damaged. In order to improve the vehicle position accuracy, we propose a new Bayesian cooperative localization scheme which tackles this problem by combining the vehicle position measurements and inter-vehicle distance measurements. In the proposed scheme, an abnormal vehicle detection algorithm (AVDA) is presented to eliminate the impacts of NLOS and malicious attack. Simulation results demonstrate that the proposed scheme can achieve excellent localization performance in the presence of NLOS and malicious attacks. Based on these results, the abnormal and normal detection rates of AVDA are approximate and the root mean square error (RMSE) is reduced to the sub-meter level. The performances of the proposed scheme are also verified in real environmental conditions by using the simulation of urban mobility (SUMO).


I. INTRODUCTION
Intelligent transportation systems (ITS), which aims at providing innovative services and making safer, more convenient use of traffic network, typically depends on the accurate and reliable vehicle location information [1]. Currently, the Global Navigation Satellite System (GNSS) plays an important role in acquiring the vehicle location information [2]. Through some enhancement technologies [3], [4], the GNSS has the capability to achieve the meter level accuracy, even the centimeter level. However, due to the faded or blocked GNSS signals, the validity of these GNSS systems is limited by the complex local environmental conditions [5]. In order to solve this problem, the cooperative localization approach is introduced. The cooperation in vehicular networking is able to alleviate the shortcomings of GNSS by incorporating the additional information which is independent of GNSS [6]. With the assistant of the emerging technologies in the fifth The associate editor coordinating the review of this manuscript and approving it for publication was Maurice J. Khabbaz . generation (5G) mobile cellular systems [7], [8] and the vehicle ad-hoc network (VANET) [9], [10], vehicles are allowed to establish a connection with each other, which supports to implement cooperative localization technology within vehicular networking. Cooperative localization in VANET exchanges the measurements of vehicle nodes through communication between them to improve the position accuracy. Inter-distance measurement of nodes plays an important role in cooperative localization [11]- [15]. The inter-distance measurement includes the time of arrival (TOA) [16], time difference of arrival (TDOA), angle of arrival (AOA) [17], [18], and round trip time (RTT). RTT only required the time tag (i.e., the times of signal transmission, signal reception, and signal processing at both sides of the receivers), which is able to be easily implemented in VANET without any additional hardware overhead.
However, the non-line-of-sight (NLOS) delay may lead to the large inter-distance measurement error in an environment with more obstacles [19], [20]. In addition, the vehicles may suffer the malicious attacks [22]- [28] in VANET, such as V2V ranging manipulation [22], location spoofing [23], [26] and malicious message generation [24], which provides incorrect time tags to make ranging with neighboring vehicles erroneous and spreads distorted messages to the neighboring vehicles. The threat model are shown in detail: NLOS link: The signal path between the vehicles is NLOS path, which results in an additional time delay for time tags. So the inter-distance measurement will be greater than real inter-distance. Ranging manipulation: The vehicle A suffering from ranging manipulation provides delayed time-tags. The neighboring vehicle B of the A receives the incorrect time-tags, causing malicious error to inter-distance measurement. Location spoofing: The vehicle A suffering from location spoofing will generate incorrect GNSS coordinates, resulting in its own positioning accuracy error. In addition, the location result of neighboring vehicle B will be affected if the B receives the mistaken coordinate of A. Message distortion: The vehicle A suffering from Message distortion will transmits distorted message to its neighboring vehicle B. The B uses the distorted GNSS coordinate messages and distorted time-tag messages, which will damage the performance of cooperative localization.
To sum up, the performance of cooperative vehicle localization is seriously affected by NLOS link, inter-distance attacks and GNSS coordinates attacks. Therefore, the NLOS link and the malicious attack detection are required to ensure the credibility of localization before using the measured data to update the ego vehicle position. This paper constructs a new cooperative vehicle localization scheme in malicious vehicular network, and the framework is shown in Fig. 1. vehicle nodes in VANET obtain GNSS positioning information through the GNSS receiver, inter-distance information with neighboring vehicles through the range sensor, and exchange these measurements with each other through V2V. The main contributions of this paper are as follows: 1) The AVDA is proposed to detect malicious and NLOS vehicle in vehicular network. We analysis the statistic difference of LOS range measurement and abnormal range measurement. We also define the normalized detection variable with Mahalanobis Distance (MD), which is utilized to distinguish the normal vehicles from the abnormal vehicles.
2) The Bayesian cooperative localization method is proposed to find posterior probability of ego vehicle position. The method combines the GNSS measurement filtered by Kalman filter (KF) and range measurement selected by AVDA. We compare the performance of the method with two estimators, i.e., the posterior probability (MAP) estimator and minimum mean square error (MMSE) estimator. This paper is organized as follows. Section II shows the related work. Section III defines the vehicular networks model and the range measurements model. In Section IV, we describe the proposed AVDA and Bayesian cooperative localization method in detail. In section V, we describe the simulation environment and verify the performance of the proposed scheme by using MATLAB and SUMO, and Section VI concludes the paper.
Sysmbol Notations: A, a, a, and A represent a matrix, a vector, a scalar, and a set, respectively; A T denotes transpose of the matrix A; a 0 and a 2 denote the length and the two-norm of vector a; E{a} represents the expectation of a. diag {a 1 , . . . , a n } means a diagonal matrix whose main diagonal elements are [a 1 , . . . , a n ]. Tr(·) is the trace sum of matrix. Other specific symbols are explained as follows: Recently, cooperative localization in VANET has attracted an increasing amount of attention. Ou in [13] proposed a roadside units (RSU)-based cooperative localization scheme in VANET. In the scheme, the vehicle retrieved the number VOLUME 8, 2020 and positions of adjacent RSUs, then fixed the position of itself by measuring two-way TOAs. The author assumed that there was a pair of RSUs deployed on both sides of the road, communicating with the passing vehicles continuously. Thus, it required densely deployed RSUs on the road, the prohibitively high cost of RSU installation and the limitation in short time might kill the cooperative localization of VANET business case. Cooperative localization approaches which benefited from mobile-to-mobile interactions (i.e., in terms of both measurements and exchanged location information) had been increasingly adopted [14], [15]. In [14], the authors used inter-vehicle distance measurements to improve the accuracy of vehicle location in GNSS-equipped VANETs. In their proposed localization framework, the inter-distance to neighboring vehicle was used to generate the location weight. The improved location was estimated by calculating a weighted sum over the locations. But the vehicles are restricted to single lane and do not communicate with vehicles in other lanes. Rohani et al. in [15] introduced data fusion to obtain high precision vehicle location. In their work, the intervehicle distance and GNSS location of neighboring vehicle were regarded as data source of data fusion technology. The method relieved the GNSS location error effectively. Whether as a weight factor or as a data source of data fusion, the accuracy of inter-vehicle distance was the basis of the accuracy of position estimation. However, these studies all assumed that vehicle measured the inter-vehicle distance in ideal vehicular network without NLOS link and malicious attacks.
The NLOS and malicious attack detections were necessary for cooperative localizations. NLOS detection have been investigated in some applications [20], [21]. A method to detect NLOS node based on the characteristics of autocorrelation matrix of distance measurement was proposed in [20]. Their proposed method could effectively detect NLOS node even without LOS node. But the detection performance was limited to the size of the distance value, it worked only at large distance. Li et al. [21] proposed a NLOS node location method based on firefly algorithm. According to the maximum likelihood method, the objective function was established by using the propagation probability of NLOS signal and LOS signal, and the NLOS node position was estimated by solving the objective function with firefly algorithm. To some extent, the method reduced the impact of NLOS error. However, it required the prior knowledge of NLOS error statistics, which was difficult to obtain in reality.
On a separate track, malicious attacks in the vehicular network have been studied [26]- [28]. In [26], a RSU with a uniform linear array (ULA) antenna measures the RSS and AOA of vehicle signals to estimate the actual distance and direction to the vehicle, which are then compared to the distance calculated using the vehicle's location coordinates. The method could eliminate the influence of location spoofing in vehicular network. However, the extra cost of the ULA antenna on the RSU made the business case difficult. In [27], the empirically determined thresholds were used to test whether the malicious vehicle was within the communication boundary, on the road, and obeying the speed limit. But they required the real-time estimation of communication boundary and the additional information (e.g., road map and speed limit). A malicious vehicle detection scheme utilizing the 1-hop table, where each vehicle cooperated with a reliable common reference vehicle to evaluate their neighboring vehicles was presented in [28]. The scheme required verified reliable vehicle in vehicular network, which was not satisfied in some real scenes. In addition, the authors given insufficient theoretical analysis.

III. SYSTEM MODEL A. VEHICULAR NETWORKS MODEL
Considering a network of N vehicles equipped with GNSS receiver and range sensor in two dimension space as exemplified in Fig. 2. Each vehicle (ego vehicle) connects to other vehicles (neighboring vehicles) among communicated range. There are NLOS measurements between vehicles due to the occlusion of obstacles to the wireless signal. And the malicious vehicle in the vehicular network spreads distorted information to its neighboring vehicles. V N denotes the set of vehicles in the vehicular network. V e is the set of N e neighboring vehicle. Defining the abscissa as x-coordinate, the ordinate as y-coordinate in the two-dimensional space. p i ] represent the position and velocity in x-coordinate and y-coordinate of the ego vehicle and n-th neighboring vehicle for i = e and i = n at time instant k respectively.
The state of the vehicle consists of its position and velocity. We define true state, predicted state, filtered state, and estimated state of vehicle.
a) The true state of the ego vehicle and neighboring vehicle can be found, respectively, as where p * (k) e and p * (k) n are the true position of the ego vehicle and neighboring vehicle.
b) The predicted state of the ego vehicle and neighboring vehicle can be written, respectively, as (1c) where p −(k) e and p −(k) n are the predicated position of the ego vehicle and neighboring vehicle, which are obtained by GNSS receiver. c) The filtered state of the ego vehicle and neighboring vehicle can be expressed, respectively, as are the filtered position of the ego vehicle and neighboring vehicle, which are obtained by Kalman filter described in subsection IV-A.
d) The estimated state of the ego vehicle and neighboring vehicle can be formulated, respectively, as where p +(k) e and p +(k) n are the estimated position of the ego vehicle and neighboring vehicle, which are updated by the Bayesian cooperative localization method described in subsection IV-C.

B. RANGE MEASUREMENTS MODEL
The true range between the ego vehicle and the n-th neighboring vehicle is defined as The measured range from the ego vehicle to the neighboring vehicle is found as where m n are the delay error of a malicious vehicle, NLOS delay error and range noise error, respectively. Further, different types of measured ranges are defined in the following: a) Measured range with measurement error only can be written as b) Measured range with NLOS delay can be formulated as c) Measured range with malicious attack can be written as The range measurement vector of N e vehicles at k-th time instant as where the n-th row of r k , d (k) , n k , m k , and w k are r n , respectively.

IV. BAYESIAN COOPERATIVE LOCALIZATION WITH ABNORMAL VEHICLE DETECTION
The proposed scheme aims to update vehicle position using normal vehicle measurement information selected by AVDA. We assume that each vehicle is able to obtain the position measurement and covariance matrix by GNSS receiver. We also suppose that each vehicle is able to obtain inter-vehicle distance measurements by range sensor.

A. GNSS WITH KF
There are errors in GNSS positioning results affected by measurement noise. Before cooperative positioning, KF algorithm is needed to preprocess GNSS localization results. We define the state of Kalman model as , the elements of which represent the vehicle position, velocity, and acceleration in xcoordinate and y-coordinate, respectively.
• System state equation: where F is the state transition matrix obtained by acceleration model,i.e.
where T is the sample time; b is the process noise vector which describes the uncertainty of the state model. The noise is assumed to be additive zero-mean white Gaussian noise.
where the elements on the diagonal in turn represent the error variance of each element variable in s (k) .
• Measurement equation: where H is the measurement matrix and c is the measurement noise vector which describes the uncertainty of the measurement value. Here the measurement only consists of the position of vehicle from GNSS receiver. So we can obtain that whereσ 2 GNSS is the noise error variance of GNSS receiver. After being preprocessed, the position information from GNSS is taken as the filtered data by KF in the following article, i.e, p f i = p x , p y , i ∈ {e, n}.

B. ABNORMAL VEHICLE DETECTION ALGORITHM
In this part, the purpose is to find the normal range measurements from all raw range measurements of ego vehicle. For explanation simplicity, the time index notation k is dropped.
According to [22], range measurement can be expressed by probability statistical model. The probability distribution of LOS measurement can be written as whereσ 2 n = σ 2 n + σ 2 e + σ 2 r n , σ 2 n = Tr Similarly, the distribution of malicious range measurement can be found as From the distribution expression of NLOS range measurement and malicious range measurement, we obtain that the range measurements distribution disturbed by malicious attack are the same as those induced by NLOS delay, i.e., the Gaussian distribution with mean p − n − p − e 2 and variance σ 2 n . Our purpose is to get normal measurement. In addition, if the GNSS coordinates of ego or neighboring vehicle are attacked, the distribution should be expressed as Pr( r n | m n , p n , p e ) where GNSS coordinates error p m is translated into malicious range error by 2-norm operation, so (14) reflects malicious attacks on GNSS coordinate and inter-distance. Therefore, the paper proposes the unified detection scheme to detect malicious attack and NLOS. Due to the NLOS and malicious range are greater than LOS range, we obtain preliminarily LOS measurement from raw measurements using a simple threshold as According to the decision result of (16), the range measurement vector r is reconstructed as where r 1 and r 2 are range measurement vector corresponding to V 1 and V 2 , µ 1 and µ 2 are mean vector of r 1 and r 2 , V 11 , V 12 , V 21 , and V 22 are covariance matrices of size r 1 0 × r 1 0 , r 1 0 × r 2 0 , r 2 0 × r 1 0 and r 2 0 × r 2 0 , respectively. The decision algorithm (16) has a conservative rule that accepts only the measurements having less than half of sigma (i.e.,σ n ) error from the expected value for LOS. So V 1 may contain some LOS elements. In order to obtain as many normal measurements as possible, we need to further detect the range measurements.
When r 1 is LOS range measurement, conditional variable r 1 |r 2 has a central χ 2 distribution with r 1 0 degrees of freedom (DOF). To test whether the measurements in r 1 are corrupted by NLOS delay, the Mahalanobis Distance (MD) is introduced. We define normalized detection variable as the square of MD [29], i.e., where Note that the value of Z r 1 is the sum of the MD squares of all measurements in r 1 . To test each measurement in r 1 individually, there are r 1 0 times 1 DOF χ 2 -tests to be performed. Define the credibility of a single vehicle as where Z i is the MD square corresponding to i-th element of r 1 . Due to the elements of the r 2 are considered as LOS measurements, we set the credibility of those q i 2 = 1. Now we have the credibility of all measurements. Then we reallocate the elements of r in two group using their credibility, i.e., for i = 1 to length (r 1 ) do 13: Compute the normalized detection variable Z r i (18) 14: Compute credibility q i 1 (19) 15: end for 16: Set the credibility of the elements of r 2 are 1, i.e. where j ∈ {1, 2} and γ is threshold. The proposed AVDA is summarized in Algorithm 1, and includes the following three steps: Step 1: We divide all neighboring vehicles into two group through a conservative threshold, a group of vehicles that are temporarily considered abnormal V 1 and a group of normal vehicles V 2 . The corresponding range measurement vectors are r 1 and r 2 , respectively.
Step 2: We obtain the normalized detection variable Z r 1 by the MD between r 1 and r 2 . Using Z r 1 to calculate the credibility of neighboring vehicles in V 1 .
Step 3: We obtain the group of normal vehiclesV 2 and normal range measurement vectorr 2 by the credibility of neighboring vehicles.

C. UPDATE EGO VEHICLE POSITION WITH BAYESIAN COOPERATIVE LOCALIZATION METHOD
In subsection IV-B, we use the statistical method to detect abnormal vehicle caused by NLOS delay and malicious attack. Now theV 2 will be fully utilized to improve the positioning accuracy of ego vehicle with the help of a Bayesian cooperative positioning method [15].
In the vehicle network, ego vehicle receives the observations from its neighboring vehicles. The observations can be expressed as p n e = p n + r n cos θ n sin θ n , (21) where θ n is the bearing of the inter-vehicle distance measurement. But this paper assumes that the range sensor only provides inter-vehicle distance measurement, not the bearing. First, we consider that there is a single normal vehicle near the ego vehicle. According to Bayesian theory, we establish as The left of (22) Differentiating with respect to d 1 in (23), the PDF can be derived as Since vehicle position and range come from different sensor, the joint probability distribution of p 1 and d 1 can be expressed by the product of the corresponding probability distributions. So (24) can be written as Similarly, we obtain likelihood function as Ego vehicle and its neighboring vehicles are supposed to be sufficient far apart to ensure independence of their position measurement. Thus, (25) and (26) can be developed to · f d 1 (p 1 − p e ) dp 1 dp e , f p 1 e |p e p 1 e p e = +∞ −∞ f p 1 (p 1 ) · f d 1 (p 1 −p e ) dp 1 . (28) Substituting (27) and (28) into (22), (22) can expressed in (29), as shown at the bottom of next page. Now we extend it to the multi-neighboring vehicles scenario. We approximate the prior PDF of vehicle position and VOLUME 8, 2020 range by the filtered vehicle position and range measurement respectively, i.e., where p f i is position data filtered by the Kalman filter described in subsection IV-A, r m is measured inter-vehicle distance data, and σ 2 r is variance of range sensor. Similar to (29), we get the post PDF of ego vehicle position in the case of N 2 neighboring vehicles. Therefore, in multineighboring vehicles case, (29)  In the section, we describe the process of whole proposed cooperative vehicle localization scheme. Specifically, each ego vehicle obtains its GNSS location and collects the GNSS locations of neighbors and the inter-distance measurement at k-th moment. These GNSS locations are pre-processed by KF. To provide the normal inter-distance measurement for cooperative localization, the AVDA is applied, which is detailed in Algorithm 1. In the algorithm, firstly ego vehicle obtains partial normal inter-distance measurements r 2 from all raw measurements by a conservative threshold. The rest of raw measurements are treated as abnormal r 1 temporarily, which needs to be further detected . Then the detection variables Z r i of inter-distance measurements of r 1 are calculated to further get the credibility q i 1 of the corresponding neighboring vehicles. Finally, the detection based on the credibility is implemented to obtain all normal inter-distance measurements r (k) m and normal neighboring vehiclesV 2 . Based onV 2 and r (k) m obtained by AVDA, the Bayesian cooperative localization method is applied to estimate the ego vehicle location. In the method, the pre-processed GNSS locations p f i (i ∈ {e,V 2 }) and normal inter-distance measurements r (k) m are regarded as mean value to approximate the vehicle location prior-PDFs and the inter-distance prior-PDFs. Based these location prior-PDFs, ego vehicle generates N p ego location particles and N p neighbor location particles. According to the idea of Monte Carlo method, these location particles are substituted into the (32), and the posterior probabilities of N p ego location particles are calculated with N p * N p cycles. Based on these posterior probabilities, the final location of ego vehicle is estimated using MAP and MMSE.
f p e (p e ) · f p 1 (p 1 ) · f d 1 (p 1 − p e ) dp 1 dp e (29) f p e |p 1 e ,p 2 e ,...,p b is random matrix whose elements follow uniform distribution U(−2, 2) for varying formation of the vehicular network in simulation. Fig. 3 draws the initial locations of all vehicles and the initial vehicular network topology. At each time slot, the ego vehicle and the neighboring vehicles are considered as relatively static.
In the simulation scenario, all vehicles move along the road at same direction. Ego vehicle moves at initial stable velocity v (1) = [25,0], then change its velocity at uniform acceleration successively until v (k) = [−25, 0]. Define the ratio α as the ratio of the number of abnormal vehicles to the number of neighboring vehicles. We select some vehicles as attacked vehicles and NLOS vehicles in vehicular network by the ratio α. The simulation parameters are shown in Table 1.

B. PERFORMANCE ANALYSIS
In this subsection, we investigate the performance of the proposed scheme in MATLAB software. The proposed AVDA and Bayesian cooperative localization method are executed  180 times continuously in a experiment. We repeat the experiment 10 times, taking the average value as the result.
We first focus on the performance of AVDA. The malicious inter-distance error and the NLOS bias are generated from uniform distribution m k n ∼ U (5,20) and nlos k n ∼ U(0.5d   10 and 14, respectively. We perform 180 times the algorithm and compute the averages in the four scenarios, respectively. Fig. 5 shows the normal detection rate, missing detection rate, abnormal detection rate, and false alarm rate of AVDA with different number of connections. As shown in Fig. 5-(a), the normal detection rates and abnormal detection rates of the 15 vehicles in the four scenarios are more than 90% when the credibility threshold γ =0.8. Meanwhile, Fig. 5-(b) shows the missing detection rates are less than 7% and false alarm rates are less than 12%.
Then, we consider all connectivity network, i.e., the number of connections allowed for each vehicle equals to 14. We study the detection performance of AVDA against malicious attacks and NLOS respectively. As shown in the Fig. 6, AVDA also achieves excellent performance for the detection of these two kinds of abnormal measurement. The malicious detection rate and NLOS detection rate are both above 90%. The missing detection rates and false alarm rates remain low probability. Fig. 7 shows the detection performace of AVDA under the condition that the abnormal inter-distance measurement error is close to GNSS error. Abnormal inter-distance measurement error is set to 5 m, close to √ 2σ GNSS . Compared with the condition that abnormal inter-distance error larger than GNSS measured error, the performances of AVDA are still good. The normal detection rate and abnormal detection rate are kept above 90%, while the missing detection rate and false alarm rate are lower 10%. Note that AVDA must satisfy the condition that there is LOS vehicle near the ego vehicle. If all the inter-vehicle distances between the ego vehicle and the neighboring vehicles are measured from NLOS and malicious attack, the AVDA may not work.
The malicious GNSS x and y coordinate error are generated from uniform distribution U(10, 20). Fig. 8 shows the detection rates of AVDA when both the ranging measurement and the GNSS measurements are under the malicious attacks. The results show that the normal detection rate and abnormal detection rate are approximate 90%. But the missing detection rate indicates that the more abnormal vehicles are decided to normal vehicles. To sum up, the proposed AVDA has excellent detection performance for NLOS link, interdistance attacks and GNSS coordinate attacks, especially for the former two.
Finally, we compare the four different localization methods: GNSS, GNSS with Kalman filter, Bayesian cooperative localization with MMSE, and Bayesian cooperative localization with MAP. GNSS means stand-alone GNSS positioning method. GNSS with Kalman filter is to use Kalman filter to filter the GNSS positioning results to improve the GNSS positioning accuracy. The last two methods are the proposed localization with two different estimators, i.e. MAP and MMSE. Fig. 9 shows partial path of a special ego vehicle with ground truth position, filtered position and estimated position. Fig. 9 illustrates the trajectories estimated by the proposed scheme and ground truth are basically the same,  which indicates the proposed scheme achieves good effect in location tracing. Fig. 10 and Fig. 11 compare the localization precision of different positioning methods. As shown in the two figures, the proposed scheme improves the positioning accuracy effectively within the malicious and NLOS vehicular network. Fig. 11 shows that the RMSE of the proposed localization scheme is optimized to approximate 2 meters with MMSE and sub-meter with MAP.

C. REAL SCENARIO WITH SUMO-SIMULATED TRAFFIC
To verify the scheme performance in a more realistic environment, we use the traffic simulator SUMO, which uses real city maps to generate synthetic traces of vehicles. For this experiment, we consider a special vehicle (ego vehicle) constrained to the highlighted streets in Fig. 11, in three areas of Beijing (China). Ego vehicle receives the information from the neighboring vehicles when driving on the streets. In particular, we generate 300, 600, 500 vehicles to pass through these areas in 1000 seconds, respectively. We assume that each vehicle is equipped with a GNSS receiver to obtain itself GNSS position. Since GNSS positioning performance is sensitive to surround environment, we model three types of conditions which affect the GNSS positioning accuracy differently, as shown in Table 2. In vehicular network, the generation of NLOS vehicle and malicious vehicle refers to subsection IV-A. In vehicular network, we randomly select two neighbor vehicles as the malicious vehicles and half of the connected vehicles as the NLOS vehicles at each time slot. The malicious error and the NLOS bias are generated from uniform distribution m k n ∼ U(10, 20) and nlos k n ∼ U(0.5d (k) n , 0.75d (k) n ), respectively. We repeat the experiment 10 times, taking the average as the final result.
In Fig. 12, the top three sub-figures show real time satellite images of the three conditions listed in Table 2, and the highlighted part are roads through which the vehicles pass; the bottom three sub-figures describe the cumulative distribution functions (CDFs) of the vehicle location error under the three conditions listed in Table 2, for Bayesian cooperative localization with MMSE (blue line) and Bayesian cooperative localization with MAP (red line) and stand-alone GNSS (orange line). Figs. 12-(a), (b) and (c) show that in the environments that scatter different size buildings, the proposed scheme improves the localization result of GNSS effectively, and the localization performances using MAP is similar with those using MMSE. Fig. 13 shows that the detection performance of AVDA when the number of connection is time-varying. The AVDA remains superior detection performance. The abnormal detection rate and normal detection rate are maintained 90% approximately, and the missing detection rate and false alarm rate are lower than 10%.

D. COMPUTATIONAL COMPLEXITY
Ego vehicle needs to communicate to N e neighboring vehicle, which induces a computational cost of O(N e ). AVDA performs NLOS and malicious detection on N e neighboring vehicles, resulting in a computational complexity of O(N e ). The proposed Bayesian cooperative localization method needs to integrate the measurement of N e neighboring vehicles, and this method is realized by Monte Carlo simulation with particle number N p , so its computational complexity is O(N p * N e ). VOLUME 8, 2020  Table 2, for the bayesian cooperative localization with MMSE and the bayesian cooperative localization with MAP and stand-alone GNSS. Therefore, the computational complexity of each ego vehicle is O((N p + 2) * N e ), the overall complexity is O((N p + 2) * N e ) * N ) in network of N vehicles.

VI. CONCLUSION
This paper has proposed an AVDA method to detect the NLOS vehicles and the malicious vehicles by using the range measurements and predicted position in VANET. The method firstly gets the probability normal neighboring vehicles through a conservative threshold; then obtaining the credibility of all neighboring vehicles by performing several times 1 DOF χ 2 test. The proposed Bayesian cooperative localization method with AVDA has been implemented into the cooperative localization scheme with MAP and MMSE estimator, which effectively improves the position accuracy by combining selected range and position measurements.