# Coastal Wind Measurements Using a Single Scanning LiDAR
## 2 Materials and Methods
### Scanning Mode and the Velocity Volume Processing (VVP) Method
#### 2.3.2 Velocity Volume Processing (VVP)
The equation used in the least square method can be expressed as the following cost functional, which can be minimized for \(u\) and \(v\):  
\[J=\frac{1}{2}\sum_{i=1}^{N}{(Vr^{\prime}-(u\sin\varphi+v\cos\varphi))^{2}}, \tag{4}\]  
where \(N\) is the number of scans during a sweep and \(Vr^{\prime}=Vr/\!\cos\!\theta\). The condition for the minimization the cost functional is that its gradient with respect to the velocity is 0, i.e.,  
\[\frac{\partial J}{\partial u}=0,\ \frac{\partial J}{\partial v}=0. \tag{5}\]  
This leads to the following equation that is solved in this study:  
\[\left[ \begin{array}{cc}\sum\sin^{2}\varphi&\sum\cos\varphi\cdot\sin\varphi \\ \sum\cos\varphi\cdot\sin\varphi&\sum\cos^{2}\varphi\end{array} \right]\left[ \begin{array}{c}u\\ v\end{array} \right]=\left[ \begin{array}{c}\sum\sin\phi\cdot Vr^{\prime}\\ \sum\cos\phi\cdot Vr^{\prime}\end{array} \right]. \tag{6}\]  
We tested other more sophisticated numerical approaches for solving Equation (3), such as a non-linear fitting method; however, the results are not significantly different for the above discussed approach. This can be attributed to the simplicity of the equation. Before retrieving the horizontal wind speeds and directions using the VVP method, some pre-processing of the raw radial wind speed data was necessary. The raw measurements recorded by the V1 included not only instantaneous radial wind speeds but also a confidence index indicating the reliability of the various measurements diagnosed by the hardware. To screen out unreliable data, observations without a confidence flag were excluded from the analysis. As a pre-processing step for the curve fitting, a linear interpolation in the vertical direction was applied to the radial wind speed to adjust for the measurement height difference between the reference sensor (V1 or SA) and the 100s. The pitch and roll angle offsets described in Section 2.2 were also taken into account during this vertical interpolation procedure. Following this vertical interpolation, we applied noise reduction to the measured radial wind speed. The measurement uncertainty of the scanning LiDARs was higher than that of the vertical profiling LiDARs. According to the device specifications, the 100s has a measurement uncertainty of 0.5 m/s for radial wind speed, while most vertical profiling LiDARs have an uncertainty of less than 0.2 m/s for horizontal wind speed. To reduce the noise in the raw data, a first-order low-pass filter with a recursive expression was applied. This is given by  
\[\overline{Vr}_{k}=\alpha\overline{Vr}_{k-1}+(1-\alpha)Vr_{k}, \tag{7}\]  
where \(\overline{Vr}_{k-1}\) indicates the filtered radial wind speed at the previous time step and \(\alpha\) (= 0.3) is a smoothing factor. This process is useful for eliminating spikes in the data time-series. In the analysis code, the values of \(u\) and \(v\) were calculated by solving Equation (6) using the radial wind speeds for a sweep, i.e., one cycle in the PPI scan. Thus, the temporal resolution of the wind speed obtained from the 100s depended on the azimuth width and scan rate. For example, the wind speeds and directions for Case 1 (\(\varphi_{\text{range}}=60^{\circ}\), \(\omega=3^{\circ}\)/s) had a temporal resolution of approximately 20 s. From the instantaneous wind speeds and directions with an interval of 20 s, we calculated the 10-minute means and standard deviations. These were then compared to the reference observations from V1 or SA. As the data availability of the LiDARs depends on the atmospheric conditions, if the availability during the 10-minute interval was less than 80%, the measurements were excluded from the validation.