# A Time-Varying Filter for Doppler Compensation Applied to Underwater Acoustic OFDM
## 3 Doppler Compensation for Multicarrier Modulation
### Compensation at the Receiver
Similarly, \(\mathbf{\tilde{A}}_{\alpha}\) is a common frequency distortion due to time scaling for all paths. As previous defined in Equation (17), the selection matrix \(\mathbf{\Gamma}\) identifies which sub-carriers contain pilot tones. By using Equation (20), the mean squared error between the actual and the approximated received vector is defined as a cost function, which is an \(\mathrm{L}_{2}\) norm expressed as  
\[\varepsilon(\mathbf{x},\alpha)=\left\|\mathbf{r}-\hat{\mathbf{r}}\right\|^{2 }=\left\|\mathbf{r}-\mathbf{D}_{\alpha}\mathbf{\tilde{A}}_{\alpha}\mathbf{x} \right\|^{2}, \tag{21}\]  
and is a function of the resampling factor \(\alpha\) and of the multipath channel output \(\mathbf{x}\). When the channel parameters are known, the distorted reference \(\mathbf{x}\) observed at the output of a static multipath channel is  
\[\mathbf{x}=\mathbf{S}\mathbf{F}\mathbf{h}, \tag{22}\]  
where \(\mathbf{S}\) is the diagonal \(N_{p}\times N_{p}\) matrix of the pilot vector \(\mathbf{s}\), and \(N_{p}\) is the length of the reference pilot vector. The matrix of \(\mathbf{F}\) (with size \(N_{p}\times P\)) provides a relationship between the phase shift of each sub-carrier to the channel gain of each path and is given as  
\[\mathbf{F}= \begin{bmatrix}\mathrm{e}^{-j2\pi f_{p_{1}}\tau_{1}}&\mathrm{e}^{ -j2\pi f_{p_{1}}\tau_{2}}&\cdots&\mathrm{e}^{-j2\pi f_{p_{1}}\tau_{p}}\\ \mathrm{e}^{-j2\pi f_{p_{2}}\tau_{1}}&\mathrm{e}^{-j2\pi f_{p_{2}}\tau_{2}}& \cdots&\mathrm{e}^{-j2\pi f_{p_{2}}\tau_{p}}\\ \vdots&\ddots&\vdots&\\ \mathrm{e}^{-j2\pi f_{p_{p}}\tau_{1}}&\mathrm{e}^{-j2\pi f_{p_{p}}\tau_{2}}& \cdots&\mathrm{e}^{-j2\pi f_{p_{p}}\tau_{p}}\\ \end{bmatrix} . \tag{23}\]  
In addition, \(\mathbf{h}=[h_{1},h_{2},\cdots,h_{L}]^{T}\) is the \(L\times 1\) vector of the channel gain on each path. An initial estimate of the channel impulse response, \(\mathbf{\hat{h}}\), can be obtained using the preamble as described in [1]. Then, the cost function in Equation (21) becomes \[\epsilon(\hat{\mathbf{h}},\alpha)=\left\|\mathbf{r}-\hat{\mathbf{r}}\right\|^{2}= \left\|\mathbf{r}-\mathbf{D}_{\alpha}\tilde{\mathbf{A}}_{\alpha}\mathbf{S} \mathbf{F}\hat{\mathbf{h}}\right\|^{2}. \tag{24}\]  
In time-varying fading scenarios, the path amplitudes change from one symbol to the next. Thus, the coarse channel estimation from the preamble cannot be used for all the OFDM symbols. As explained in [14], since the statistical characteristics of the channel are unknown, the reference signal \(\mathbf{x}\) can be estimated using  
\[\hat{\mathbf{x}}=\tilde{\mathbf{A}}_{\alpha}^{\dagger}\mathbf{D}_{\alpha}^{H} \mathbf{r}. \tag{25}\]  
where \((\cdot)^{H}\) is the Hermitian adjunct operator, while \((\cdot)^{\dagger}\) is the pseudo-inverse operator. Replacing \(\hat{\mathbf{x}}\) in Equation (25) with \(\mathbf{x}\) in Equation (22), the approximation of the distorted received signal \(\hat{\mathbf{x}}\) can be expressed as  
\[\hat{\mathbf{x}}=\tilde{\mathbf{A}}_{\alpha}^{\dagger}\mathbf{D}_{\alpha}^{H} \mathbf{r}=\mathbf{S}\mathbf{F}\hat{\mathbf{h}}. \tag{26}\]  
Then, an estimation of the path amplitude, \(\hat{\mathbf{h}}\), can be obtained by applying a matrix inversion and multiplication on Equation (26), such that  
\[\hat{\mathbf{h}}=\mathbf{F}^{\dagger}\mathbf{S}^{H}(\tilde{\mathbf{A}}_{ \alpha})^{\dagger}\mathbf{D}_{\alpha}^{H}\mathbf{r}. \tag{27}\]  
The cost function then can be reduced to a one-dimensional function of the optimum resampling factor, \(\alpha\), by replacing Equations (27) in (24), such that the ML function becomes  
\[\epsilon(\alpha)=\left|\mathbf{r}-\mathbf{D}_{\alpha}\tilde{\mathbf{A}}_{ \alpha}\mathbf{S}\mathbf{F}\mathbf{F}^{\dagger}\mathbf{S}^{H}(\tilde{\mathbf{ A}}_{\alpha})^{\dagger}\mathbf{D}_{\alpha}^{H}\mathbf{r}\right|^{2}. \tag{28}\]  
The optimum time-scaling factor is estimated by minimizing the new cost function as \(\hat{\mathbf{a}}=\arg\min\limits_{\alpha}\epsilon\).