# Iterative Parameter Estimation Algorithms for Dual-Frequency Signal Models
## 2 The Gradient-Based Iterative Parameter Estimation Algorithm  
Consider the following dual-frequency cosine signal model:  
\[y(t)=a\cos(\omega_{1}t)+b\cos(\omega_{2}t)+v(t), \tag{1}\]  
where \(\omega_{1}>0\) and \(\omega_{2}>0\) are the angular frequencies, \(a>0\) and \(b>0\) are the amplitudes, \(t\) is a continuous-time variable, \(y(t)\) is the observation, and \(v(t)\) is a stochastic disturbance with zero mean and variance \(\sigma^{2}\). In actual engineering, we can only get discrete observed data. Suppose that the sampling data are \(y(t_{i})\), \(i=1,2,3,\cdots,L\), where \(L\) is the data length and \(t_{i}\) is the sampling time. As we all know, signals include the sine signal, cosine signal, Gaussian signal, exponential signal, complex exponential signal, etc. Among them, the sine signal and the cosine signal are typical periodic signals whose waveforms are sine and cosine curves in mathematics. Many periodic signals can be decomposed into the sun of multiple sinusoidal signals with different frequencies and different amplitudes by the Fourier series [43]. The cosine signal differs from the sine signal by \(\pi/2\) in the initial phase. This paper takes the double-frequency cosine signal model as an example and derives the parameter estimation algorithms, which are also applicable to the sinusoidal signal models. Use observed data \(y(t_{i})\) and the model output to construct the criterion function  
\[J_{1}(\mathbf{\theta}):=\frac{1}{2}\sum_{i=1}^{L}[y(t_{i})-a\cos(\omega_{1}t_{i})-b \cos(\omega_{2}t_{i})]^{2}. \tag{2}\]  
The criterion function contains the parameters to be estimated, and it represents the error between the observed data and the model output. We hope that this error is as small as possible, which is equivalent to minimizing \(J_{1}(\mathbf{\theta})\) and obtaining the estimates of the parameter vector \(\mathbf{\theta}:=[a,b,\omega_{1},\omega_{2}]^{\tau}\in\mathbb{R}^{4}\). Letting the partial derivative of \(J_{1}(\mathbf{\theta})\) with respect to \(\mathbf{\theta}\) be zero gives  
\[\text{grad}[J_{1}(\mathbf{\theta})]:=\frac{\partial J_{1}(\mathbf{\theta})}{\partial \mathbf{\theta}}=\left[\frac{\partial J_{1}(\mathbf{\theta})}{\partial a},\frac{ \partial J_{1}(\mathbf{\theta})}{\partial b},\frac{\partial J_{1}(\mathbf{\theta})}{ \partial\omega_{1}},\frac{\partial J_{1}(\mathbf{\theta})}{\partial\omega_{2}} \right]^{\tau}\in\mathbb{R}^{4}. \tag{3}\]  
Define the stacked output vector \(\mathbf{Y}(L)\) and the stacked information matrix \(\mathbf{\Phi}(\mathbf{\theta},L)\) as  
\[\mathbf{Y}(L):= \begin{bmatrix}y(1)\\ y(2)\\ \vdots\\ y(L)\end{bmatrix} \in\mathbb{R}^{L},\quad\mathbf{\Phi}(\mathbf{\theta},L):= \begin{bmatrix} \mathbf{\varphi}^{\mathbb{T}}(\mathbf{\theta},1)\\ \mathbf{\varphi}^{\mathbb{T}}(\mathbf{\theta},2)\\ \vdots\\ \mathbf{\varphi}^{\mathbb{T}}(\mathbf{\theta},L)\end{bmatrix} \in\mathbb{R}^{L\times 4}. \tag{4}\]  
Define the information vector  
\[\mathbf{\varphi}(\mathbf{\theta},t_{i}):=[-\cos(\omega_{1}t_{i}),-\cos(\omega_{2}t_{i }),at_{i}\sin(\omega_{1}t_{i}),bt_{i}\sin(\omega_{2}t_{i})]^{\mathbb{T}}\in \mathbb{R}^{4}. \tag{5}\]Let \(f(t_{i}):=a\cos(\omega_{1}t_{i})+b\cos(\omega_{2}t_{i})\in\mathbb{R}\), and the model output stacked vector  
\[\mathbf{F}(\mathbf{\theta},L):= \begin{bmatrix}f(\mathbf{\theta},1)\\ f(\mathbf{\theta},2)\\ \vdots\\ f(\mathbf{\theta},L)\end{bmatrix} \in\mathbb{R}^{L}. \tag{6}\]  
Then, the gradient vector can be expressed as  
\[\text{grad}[J_{1}(\mathbf{\theta})]:=\mathbf{\Phi}^{\top}(\mathbf{\theta},L)[Y(L)-\mathbf{F}( \mathbf{\theta},L)]. \tag{7}\]  
Let \(k=1,2,3,\cdots\) be an iterative variable and \(\hat{\mathbf{\theta}}_{k-1}\) be the estimate of \(\mathbf{\theta}\) at iteration \(k-1\).