# Iterative Parameter Estimation Algorithms for Dual-Frequency Signal Models
## 4 The Moving Data Window Gradient-Based Iterative Algorithm
Minimizing \(J_{2}(\mathbf{\theta})\) and using the negative gradient search, we can obtain the moving data window gradient-based iterative (MDW-GI) algorithm:  
\[\hat{\mathbf{\theta}}_{k}(t_{i}) = \hat{\mathbf{\theta}}_{k-1}(t_{i})-\mu_{k}(t_{i})\text{grad}[J_{2}( \hat{\mathbf{\theta}}_{k-1}(t_{i}))] \tag{41}\] \[= \hat{\mathbf{\theta}}_{k-1}(t_{i})-\mu_{k}(t_{i})\mathbf{\Phi}^{\intercal} (p,\hat{\mathbf{\theta}}_{k-1}(t_{i}),t_{i})[\mathbf{Y}(p,t_{i})-\mathbf{F}(p,\hat{\mathbf{ \theta}}_{k-1}(t_{i}),t_{i})],\] \[\hat{\mathbf{\Phi}}_{k}(p,t_{i}) = \hat{\mathbf{\Phi}}_{k}(p,\hat{\mathbf{\theta}}_{k-1}(t_{i}),t_{i})\] (42) \[= [\mathbf{\varphi}(\hat{\mathbf{\theta}}_{k-1}(t_{i}),t_{i}),\mathbf{\varphi} (\hat{\mathbf{\theta}}_{k-1}(t_{i}),t_{i-1}),\cdots,\mathbf{\varphi}(\hat{\mathbf{\theta}} _{k-1}(t_{i}),t_{i-p+1})]^{\intercal},\] \[\mathbf{Y}(p,t_{i}) = [y(t_{i}),y(t_{i-1}),\cdots,y(t_{i-p+1})]^{\intercal},\] (43) \[\hat{\mathbf{F}}_{k}(p,t_{i}) = \hat{\mathbf{F}}_{k}(p,\hat{\mathbf{\theta}}_{k-1}(t_{i}),t_{i})\] (44) \[= [f(\hat{\mathbf{\theta}}_{k-1}(t_{i}),t_{i}),f(\hat{\mathbf{\theta}}_{k- 1}(t_{i}),t_{i-1}),\cdots,f(\hat{\mathbf{\theta}}_{k-1}(t_{i}),t_{i-p+1})]^{ \intercal},\] \[\hat{\mathbf{\varphi}}_{k}(t_{i-j}) := \mathbf{\varphi}(\hat{\mathbf{\theta}}_{k-1}(t_{i}),t_{i-j})\] (45) \[= [-\cos(\hat{\mathbf{\omega}}_{1,k-1}(t_{i})t_{i-j}),-\cos(\hat{\mathbf{ \omega}}_{2,k-1}(t_{i})t_{i-j}),\hat{a}_{k-1}(t_{i})t_{i-j}\sin(\hat{\mathbf{ \omega}}_{1,k-1}(t_{i})t_{i-j}),\] \[\hat{\mathbf{\theta}}_{k}(t_{i}) = \hat{\mathbf{\theta}}_{k-1}(t_{i})-\mu_{k}(t_{i})\text{grad}[J_{2}( \hat{\mathbf{\theta}}_{k-1}(t_{i}))] \tag{41}\]0 \[\hat{\mathbf{\theta}}_{k}(t_{i}) = \hat{\mathbf{\theta}}_{k-1}(t_{i})-\mu_{k}(t_{i})\text{grad}[J_{2}( \hat{\mathbf{\theta}}_{k-1}(t_{i}))] \tag{41}\]1 (46) \[\hat{\mathbf{\theta}}_{k}(t_{i}) = \hat{\mathbf{\theta}}_{k-1}(t_{i})-\mu_{k}(t_{i})\text{grad}[J_{2}( \hat{\mathbf{\theta}}_{k-1}(t_{i}))] \tag{41}\]2 (47) \[\hat{\mathbf{\theta}}_{k}(t_{i}) = \hat{\mathbf{\theta}}_{k-1}(t_{i})-\mu_{k}(t_{i})\text{grad}[J_{2}( \hat{\mathbf{\theta}}_{k-1}(t_{i}))] \tag{41}\]3 (48) \[\hat{\mathbf{\theta}}_{k}(t_{i}) = \hat{\mathbf{\theta}}_{k-1}(t_{i})-\mu_{k}(t_{i})\text{grad}[J_{2}( \hat{\mathbf{\theta}}_{k-1}(t_{i}))] \tag{41}\]4  
The steps of the MDW-GI algorithm in Equations (41)-(49) to compute \(\hat{\mathbf{\theta}}_{k}\) are listed as follows. 1. Pre-set the length of \(p\), let \(i=p\), give the parameter estimation accuracy \(\varepsilon\) and the iterative length \(k_{\max}=500\). 2. To initialize, let \(k=1\), \(\hat{\mathbf{\theta}}_{0}(t_{i})=\mathbf{1}_{n}/p_{0}\), \(p_{0}=10^{6}\). 3. Collect the observed data \(y(t_{i})\), form \(\mathbf{Y}(p,t_{i})\) by Equation (43). 4. Form \(\hat{\mathbf{\varphi}}_{k}(t_{i-j})\) by Equation (45), form \(\hat{\mathbf{\Phi}}_{k}(p,t_{i})\) by Equation (42). 5. Form \(f_{k}(t_{i-j})\) by Equation (46), form \(\hat{\mathbf{F}}_{k}(p,t_{i})\) by Equation (44). 6. Select a larger \(\mu_{k}(t_{i})\) satisfying Equation (49), update the estimate \(\hat{\mathbf{\theta}}_{k}(t_{i})\) by Equation (47). 7. If \(k<k_{\max}\), increase \(k\) by \(1\) and go to Step 4; otherwise, go to the next step. 8. Compare \(\hat{\mathbf{\theta}}_{k}(t_{i})\) with \(\hat{\mathbf{\theta}}_{k-1}(t_{i})\), if \(\|\hat{\mathbf{\theta}}_{k}(t_{i})-\hat{\mathbf{\theta}}_{k-1}(t_{i})\|>\varepsilon\), then let \(\hat{\mathbf{\theta}}_{0}(t_{i+1}):=\hat{\mathbf{\theta}}_{k}(t_{i})\), \(i:=i+1\), go to Step 2; otherwise, obtain the parameter estimate \(\hat{\mathbf{\theta}}_{k}(t_{i})\), terminate this procedure.