## 4 Expressway PTV Detection Algorithm for Over-the-Horizon
### Section Vehicle Speed Prediction Algorithm
#### 4.4.1 Wavelet Transform  
The application of the ETC gantry on expressways provides convenience for predicting vehicle speed. However, due to various environmental and device-specific reasons, the collected data often contain a large amount of noise, which poses a great threat to speed prediction. In the process of analyzing real traffic flow, it was found that real speed signals often appear as low-frequency or stationary speed signals, while noise signals are more reflected in the high-frequency part [35]. Therefore, we use WT to filter the noise signal in the original data, so as to obtain more accurate section speed data. In order to separate the low-frequency and high-frequency parts from the original signal, [PERSON] proposed the concept of multi-resolution analysis in 1989, and based on this, he proposed a fast algorithm of discrete wavelet transform. The principle of the Mallat algorithm for wavelet decomposition and synthesis at a certain scale is shown in Figure 4.  
This algorithm can more accurately separate high-frequency noise and low-frequency signal components from the signal by analyzing it at different scale levels. By utilizing this algorithm, we can effectively filter out high-frequency noise signals while retaining low-frequency signals and obtain relatively accurate section speeds. The decomposition expression is as follows:  
\[cA_{j,k}=\sum_{n}h(n-2k)cA_{j-1,n} \tag{2}\]  
\[cD_{j,k}=\sum_{n}g(n-2k)cA_{j-1,n} \tag{3}\]  
where \(cA_{j,k}\) is the wavelet coefficient of the low-frequency part of signal \(f(t)\) in layer j; \(cD_{j,k}\) is the wavelet coefficient of the high-frequency part of signal \(f(t)\) in layer j; and \(h\) and \(g\) are both filter coefficients, usually low-pass and high-pass filters. The original signal is decomposed into a series of wavelet bands. This process is accomplished by multiple layers of low-pass and high-pass filters, where the low-pass filter is used to extract the low-frequency components of the signal and the high-pass filter is used to extract the high-frequency components of the signal. In each layer of the decomposition process, the low-frequency portion is progressed and the high-frequency portion is used as the input for  
Figure 4: Schematic diagram of wavelet transform. the next layer of decomposition. This results in a series of wavelet coefficients in different frequency bands, representing local features of the original signal. Reconstruction of the expression is seen as:  
\[\mathrm{cA_{j-1,k}=\sum_{n}h(k-2n)cA_{j,n}+\sum_{n}g(k-2n)cD_{j,n}} \tag{4}\]  
Reconstruct the obtained wavelet coefficients into the original signal. This process is completed by multiple inverse filters and inverse upsampling operations. The inverse filter is used to transform the wavelet coefficients, while the inverse upsampling operation restores the splitting rate to its original size. In this way, similar results to the original signal can be reconstructed from the decomposed wavelet coefficients. In the process of expressway speed prediction, we need to process a set of raw section speed sequence data with non-stationary characteristics. In this context, we chose the sym5 wavelet as the basis function mainly to balance the selection of data decomposition levels, as the decomposition levels are crucial for grasping the changes and trends of data. Specifically, an excessive number of decomposition layers may disrupt the inherent dynamic changes and development trends of the section speed sequence, while an insufficient number of decomposition layers may prevent the effective separation of different frequency features in the original section speed signal. Therefore, based on the current research results of wavelet transform sequence denoising [36], we set the number of decomposition layers to 3 to achieve the best signal extraction effect. Then, we apply a threshold function to process the high-frequency signal portion of each decomposition layer to reduce its impact on speed prediction.