## 6 Performance Evaluation  
Our vehicle detection algorithm is designed to minimize both computational complexity and memory usage. We implemented our algorithm on the MICAz mote, which has only an 8 MHz clock speed and 4 KB of memory. We confirmed the complete operation of our algorithm with TinyOS in real time. It indicated that our algorithm is designed with greatly lowered computational complexity and memory usage. Next, we analyzed the accuracy of our vehicle detection algorithm. The experiments considered a two-lane road from 10:00 to 11:00. Table 1 compares the detection results with video results. In Table 1, the possible detection errors in our system are classified into three categories. An \"overlap\" error occurs when two vehicles in different lanes pass the detector at the same time. In this case, the vehicle furthest from the sensor cannot be detected. A \"loss\" error occurs when the vehicle detection data are filtered out by the noise filter. Finally, an \"over-counting\" error is caused by a vehicle lane change. If a vehicle changes lanes in front of the detector, the data pattern is measured as the third or fourth pattern in Figure 22. The \"loss\" and \"over-counting\" errors can occur in other types of sensors, such as magnetic and acoustic sensors. However, \"overlap\" errors are specific to the roadside installation of sensors. It is obvious that the number of \"overlap\" errors will increase with higher traffic flow. \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c} \hline \hline  & \multicolumn{4}{c}{**Count by Video**} & \multicolumn{4}{c}{**Type of Error (vehicles)**} \\ \cline{3-13}
**Time** & \multicolumn{4}{c}{**(vehicles)**} & \multicolumn{4}{c}{**Count by Ultrasonic (vehicles)**} & \multicolumn{4}{c}{**Error Rate (\%)**} & \multicolumn{4}{c}{**Overlap**} & \multicolumn{4}{c}{**Loss**} & \multicolumn{4}{c}{**Over Counting**} \\ \cline{2-13}  & Lane 1 & Lane 2 & Total & Lane 1 & Lane 2 & Total & Lane 1 & Lane 2 & Total & Lane 1 & Lane 1 & Lane 2 & Lane 1 & Lane 2 \\ \hline
10:00–10:10 & 23 & 63 & 86 & 21 & 63 & 84 & \(-\)  
As shown in Table 1, the total number of detection errors using the ultrasonic sensors is 6.37% lower in Lane 1 and 0.55% higher in Lane 2. This difference is because the detector is installed on the roadside next to Lane 2. The total error rate is 1.53% lower than that recorded by the video sensors, which indicates that our algorithm has high vehicle detection accuracy. The previous analysis and performance evaluation indicate the feasibility of vehicle detection with ultrasonic sensors within a WSN-based traffic information acquisition system. The traffic information can be collected in real time with small, simple hardware and software. Moreover, the detection accuracy is very high. However, such a system has some limitations. The roadside installation of sensors leads to \"overlap\" errors, and their number will increase with higher traffic flows. Our detector was tested on a road with 522 veh/h, which is a normal traffic flow on a two-lane road. If the experiments were performed with higher traffic volumes, the error rate would be higher than that reported here. This suggests that roadside sensor installation, while improving the system's scalability, can increase the number of detection errors. Thus, to maintain detection accuracy, ultrasonic sensors should only be employed on roads with few lanes, and dense traffic flows should be avoided. These two limitations can be overcome with small changes. For instance, the detection accuracy could be increased across multiple lanes by installing sensors on both sides of the road. In addition, our system could be used for temporal vehicle detection, such as within a work zone. It is true that the roadside installation of sensors has limitations for accurate vehicle detection with dense traffic flows. Other mount positions, such as overhead and side top mount, in Figure 1 can be used. In these case, the scalability will decline, because each lane needs its own sensor.