*3.1. Underlying Dataset*

We based our validation on data recorded on the expressway "Pariser Ring" in Aachen on 30 November 2018 (Figure 4). The experiment was conducted with the use of four radar devices that detected passing vehicles and recorded their timestamp and speed at the cross-section of the device. The distances between consecutive devices were measured and consisted of 155 m, 35 m, and 35 m, respectively.

It is important to note that the radar devices had separate internal clocks with limited synchronization possibilities. The resolution of the recorded timestamp was only one second, while the resolution of the speed was 1 km h−1. Another limitation of these devices is that they were installed and configured with a given angle to the street, and the exact cross-section of the detection was not known. We will analyze the effect of these limitations and also demonstrate that even under these circumstances, a reasonable reconstruction result is achievable.

**Figure 4.** The location of the data recording. Four radar devices were installed at the poles marked here with yellow. The red line shows a path recorded with an RTK-GNSS sensor mounted on a vehicle.

#### *3.2. Synthetic Data Validation*

The validation based on synthetic data was mainly motivated by the possibility of a systematic performance analysis. First, if necessary, we can easily control the different sources of error of the recording devices. We can, for example, eliminate the quantization of the recording resolutions or errors in the detection location. This gives the possibility to analyze specifically the effect of each error source separately, which cannot be done with real data. Secondly, we can apply a preconfigured range for measurement errors ("synthetic errors") in order to analyze specifically their effect on the results. Finally, the underlying microscopic vehicle data can also be generated and used as a perfect reference. In comparison, real reference data measured in vehicles can never be completely errorless.

We based the synthetic data generation on the measurements of the first radar device, as it recorded all passing vehicles on three lanes and thus delivered the largest and densest data volume. We extracted the data of the morning rush-hour and overcame the limitation of time resolution by adding a uniformly-distributed number of milliseconds between zero and 1000 to each recorded entry. We kept the recorded speed values and chose a second cross-section at a specified distance *d*. Then, for each vehicle, we generated a normally-distributed acceleration value with mean *ma* and standard deviation *σa*, and we calculated the time when the vehicle would reach the second sensor if it used the generated acceleration value. We then split the data, treating the start and end positions as the dataset of the first and second sensor accordingly. We of course neglected the location information from the datasets so that the original offset had to be reconstructed by our algorithm. In the different validation steps presented, we varied specific parameters like measurement errors and data volume. For each of the parameter values, we applied the EM algorithm a fixed number of times to have the mean and variance of the resulting output. We were also able to apply the algorithm with optimization in the space/time domain separately or with combined spatio-temporal optimization.

The considered performance metrics are defined as follows:


#### 3.2.1. Errorless Data

In this first validation step, we considered the case where the timestamp and speed of the vehicles can be recorded without error at the exact cross-section of the sensor. We varied the number of vehicles from 5–400 using a sensor distance of 100 m. Additionally, we varied the distance between the sensors from 50–150 m using 200 vehicles. We used 50 runs for each setting, resulting in a total of 4000 runs for the analysis of the vehicle count and 500 runs for the analysis of sensor distance. We first used only spatial optimization. The results showed that for all the settings, our algorithm was able to reconstruct both the sensor offsets and the vehicle trajectories perfectly, meaning that all appropriate metrics had zero mean. The only metric varying was the number of iterations for convergence, which seemed to depend on the number of vehicles used, but not on the distance between the sensors (Figure 5). We also validated the spatio-temporal estimation when we altered the sensor time offset by shifting each time entry of one dataset by a fixed value between one and 10 s and using a location offset of 100 m and a data volume of 200 vehicles. Just as in the case of the distance variation, the algorithm perfectly estimated both spatial and temporal offsets.

**Figure 5.** Number of iterations for algorithm convergence depending on (**a**) the number of vehicles and (**b**) the distance between sensors.

#### 3.2.2. Variance in Detection Location

Next, we analyzed the effect of varying the detection location. This constituted a type of error resulting from the fact that a sensor will not detect a vehicle at the exact same cross-section as it is installed, although we treated the data as such. In most cases, each vehicle will be detected at an individual cross-section depending on the physical characteristics, which influence the detection. An example would be the reflectance of the vehicle chassis in the case of a radar sensor, which will influence how early a vehicle can be detected. We used a total number of 200 simulated vehicle trajectories for this step, and 75 m, 100 m, and 125 m were used for the sensor distance. Note that we were still assuming that the detector made no error in speed measurement and started with the sensors being perfectly time-synchronized, so we only applied optimization in the space dimension.

From Figure 6, it can be seen that the bias of the offset estimation error remained low, while a small variation was present due to the fact that a limited number of measurements (runs) had been used. Both results were independent of the sensor distance. The standard deviation of the estimation error increased linearly with the standard deviation of the detection location, but remained at a much lower level. This can be explained by the fact that the location errors of individual vehicles compensated each other. The right plot of Figure 6 shows that the standard deviation decreased with a higher number of vehicles. Thus, it is arguably sensible to use more vehicles for optimization to decrease the resulting error. On the other hand, a higher number of vehicles not only led to a higher number of required iterations (Figure 7), but additionally increased the computation time of each iteration as the dimensions of the matrices used in optimization increased.

**Figure 6.** Offset estimation error depending on detection location (**a**) and depending on the number of vehicles (**b**). In both plots, the mean resulting error is plotted with a continuous line, while the standard deviation of the error is plotted with a dashed line.

**Figure 7.** Number of iterations until convergence depending on detection location (**a**) and depending on the number of vehicles (**b**).

In contrast to the sensor offset estimation, the mean RMS error of the vehicle trajectories only depended on the variance of the detection location and remained constant with increasing number of vehicles (see Figure 8). The linearity between the standard deviation in detection and the RMS error came from the relation between the end point of the computed trajectory and the calculated curve, which will adapt the location curve accordingly. The standard deviation of the mean RMS error showed a slightly negative slope, due to the variance of the mean being the variance of the individuals divided by the sample size, a property of independent identically distributed data. Thus, as the number of vehicles (sample size) became larger, the variance of the mean error decreased.

**Figure 8.** Trajectory RMS error depending on detection location (**a**) and depending on the number of vehicles (**b**). In both plots, the mean resulting error is plotted with a continuous line, while the standard deviation of the error is plotted with a dashed line.

We go on to examine the performance of the spatio-temporal offset estimation. Obtaining a time offset of zero is of course expected as we did not specifically add any time shift to the dataset. When looking at the results, the error values showed that while the time offset estimation mean was indeed at zero, the location estimation error significantly increased. Figure 9 shows a scatter plot between the time and space offset errors, where we observed that the values were distributed like a bivariate Gaussian, which seemed to be aligned with the mean speed of the vehicles. Indeed, deriving the eigenvectors of the covariance matrix showed that the principal axes of the Gaussian fitted to the data had a slope almost equal to the mean speed. Thus, when we only used the spatial optimization, the result was spread like a conditional Gaussian distribution at the vertical axes with the time offset of zero. The main reasoning here is that it is objectively reasonable to only use space optimization in order to significantly reduce errors in the estimation of location offset. In the following steps of validation, we will only consider the space optimization.

**Figure 9.** Scatter of the errors made in time and space offset estimation when using spatio-temporal optimization. The errors show a bivariate Gaussian distribution with the main axis representing the slope of the mean speed of the vehicles (red line).

Because the performance showed very limited dependence on the sensor distance used, we will limit our further analysis to a distance of 100 m.

#### 3.2.3. Error in Speed Measurement

One other important source of error when recording traffic data consists of measuring the wrong speed of the vehicles. Although many of the vehicle detectors used in enforcement applications have a very high-quality standard and measurement accuracy, this error can never be completely neglected. Moreover, detectors developed for simpler applications like gathering traffic statistics most probably have lower accuracy standards. Thus, it is important to examine the influence of this error. In order to reduce the complexity of the results, we will neglect variations in the detection location. When not explicitly stated, the number of vehicles used for the optimization will be 200.

In the left plot of Figure 10, we show the results of the offset estimation after altering the measured vehicle speeds of the second sensor with a Gaussian noise, given its standard deviation. From this plot, we can see that the mean error of the offset estimation will only change with the mean error of the speed measurement. Additionally, the relationship between the values can be derived from the mean speed values of the vehicles, which was approximately 25 m/s. When changing the mean speed values of the second sensor, the slope of the linear trajectory used in the EM-algorithm changed to half that value. A distance between the sensors of 100 m led to 4 s of passing time, so the increase of the mean offset error would in this specific case be approximately double the value of the mean speed error. Similarly, the standard deviation of the resulting offset error only depended on the standard deviation of the speed measurement error, but not on the mean value. The right plot of the figure shows that the mean trajectory error changed linearly with *σv* when the mean speed error was zero. This is similar to what we see in Figure 8, although the mean RMS error was lower, while its standard deviation was higher. This means that a zero mean error in speed measurement will have a smaller influence on the result, but the error will be less predictable. In the case where the speed error had a mean value different from zero, the mean RMS error will be dominated by the mean measurement error rather than by its variance. Just as we have seen in the discussion of the detection location error, we can reduce the offset estimation error by increasing the number of vehicles. Naturally, this does not apply to the trajectory errors and will increase the number of iterations and the computation load.

**Figure 10.** Influence of speed measurement error on the offset estimation (**a**) and on the trajectory RMS error (**b**). Continuous lines show the mean values, while dashed lines show the standard deviation of the error.
