# Kalman Filter and Wavelet Cross-Correlation for VHF Broadband Interferometer Lightning Mapping
## 2 Materials and Methods
### Broadband Interferometer (ITF)
#### 2.1.3 Lightning Mapping  
For sources located in two spatial dimensions, two angles are needed to specify the direction and height of the radiation source, namely the azimuth (\(Az\)) and elevation (\(El\)) angles. From the spherical coordinate in Figure 2, the \(Az\) and \(El\) angles can be found by,  
\[Az=\arctan\left(\frac{\tau_{d1}}{\tau_{d2}}\right) \tag{3}\]  
\[El=\arccos\left(\frac{c}{d}\sqrt{\tau_{d1}^{2}+\tau_{d2}^{2}}\right) \tag{4}\]  
where \(c\) is the speed of light, \(\tau_{d1}\) and \(\tau_{d2}\) are the TDOAs of the two orthogonal baselines. The TDOA (\(\tau_{d}\)) between every pair of antennae cannot exceed the transit time \(\tau_{transit}=c/d\). This constrains the instance between the brackets of Equation (4) to have values in the range of \(\pm 1\). However, any values exceed the \(\pm 1\) range are considered as wrong estimations due to existing noise, and the corresponding \(Az\) and \(El\) angles can be neglected from the cross-correlation calculations.  
In this paper, we compare the performance of three filtering approaches, a Butterworth BPF filter of order 4 and cut-off frequencies of (20-100 MHz) (fdesign MATLAB function), a Kalman filter (implemented in MATLAB [26] as in [24]), and a wavelet denoising technique (wdenoise MATLAB function). The wavelet filtering methods are abbreviated in this study for simplicity, e.g., WT-Coif5-SURE is the wavelet denoising using the Coiflet wavelet function of order 5 with [PERSON]'s unbiased risk estimate (SURE) thresholding rule. Besides the influence of different wavelet denoising functions, we also report the results of using two different thresholding rules, SURE and Universal Threshold. Wavelet denoising methods alter the estimated wavelet coefficients before the reversed transformation (reconstruction), which is achieved with some thresholding rules. The Kalman filter is a powerful tool that uses the state space formulations with a set of mathematical equations to recursively estimate future observations minimizing the mean square error of these estimates. Hence, the output  
Figure 2: Basic interferometer geometry [9; 19].  
of the Kalman filter is considered as a clean copy of the noisy signal where the filter successfully eliminates the Gaussian noises. Further details of the implemented Kalman filter in this paper can be found in [24].  
Three cross-correlation methods are used; namely, cross-correlation in the time domain (CCTD), cross-correlation in the frequency domain (CCFD), and cross-correlation in the wavelet domain (CCWD). We have implemented the three cross-correlation methods in MATLAB, where a recursive sliding dot-product was used for CCTD, recursive conjugate dot-product of fit MATLAB function for CCFD, and modwtxcorr MATLAB function for CCWD. The cross-correlation is used to measure the similarity of lightning signals received at multiple antennae. In this context, a measure of similarity is to locate the peak of cross-correlation (the highest value of correlation coefficients over time lags) which then used to calculate the time delay of arrival between the correlated signals.