# A Recursive Least-Squares with a Time-Varying Regularization Parameter
## 5 Simulation Results  
The results in this section simulate model (1), where \(\mathbf{A}\) is generated independently from a Gaussian distribution with zero-mean and unit variance. The noise, \(\mathbf{z}\), and the data vector, \(\mathbf{x}\), are zero-mean Gaussian vectors. Having these assumptions on hand suggests the optimal regularization parameter can be obtained from Equation (7). Initially, the matrix \(\mathbf{A}\) has 100 columns (\(n=100\)) and 90 rows (\(m=90\)). We simulate three scenarios with uncertainties in calculating the signal-to-noise ratio (SNR). The SNR varies uniformly during the update process within the three intervals \([10.5,11]\) dB, \([10.25,11]\) dB and \([10,11]\) dB, i.e., the uncertainties are 0.5 dB, 0.75 dB, and 1 dB, respectively. We consider two competitive methods: the fixed RRLS and the time-varying RRLS. In the fixed regularization setting, the regularization parameter does not account for this variation in the SNR, while, in the varying regularization parameter, the parameter is changed according to Equation (7).  
Figure 1 compares the MSE performance for the fixed regularization and the varying regularization parameter methods when the number of observations is increased one at a time. Figure 1a shows the result obtained when the uncertainty is 0.5 dB. When applying the fixed regularized recursive formula at (\(m=91\)), the MSE scores 17.9 square units, while the time-varying RRLS scores 17.8 square units. At \(m=100\), the MSE is 16.4 square units for the fixed RLS and is 15.9 square units for the varying RLS. Figure 1b plots the MSE against \(m\) when the uncertainty is increased to 0.75 dB. The MSE of the fixed regularization method is 17.8 square units when \(m=91\) and decreases to 15.9 at \(m=100\). On the other hand, the proposed time-varying RRLS achieves 17.7 square units at \(m=91\) and falls to 15.5 square units when \(m=100\). Finally, Figure 1c compares the performance of the two methods when the uncertainty in SNR is 1 dB. The MSE of both the fixed RRLS and the time-varying RRLS is 17.6 square units at \(m=91\). As \(m\) increases, the MSE reaches 15.1 square units for the fixed regularization method and 14.7 square units for the varying regularization method when \(m=100\). Hence, it can be concluded from Figure 1 that the performance of the proposed time-varying RRLS outperforms the fixed RRLS for \(m>90\) most of the time.  
Figure 2 plots the error in estimating the data vector recursively using the proposed time-varying RRLS versus the number of rows, \(m\). As expected, the recursive formula's error increases in each iteration because the derived formula relies on some approximations. Figure 2a plots the error curve when the uncertainty in the SNR is 0.5 dB. The minimum error is \(9\times 10^{-6}\) at \(m=91\) and the maximum error is \(2\times 10^{-3}\) at \(m=100\). Figure 2b illustrates that the recursive update's minimum and maximum errors are between \(1\times 10^{-6}\) and \(8\times 10^{-2}\), respectively, for 0.75 dB uncertainty. Finally, for 1 dB uncertainty in calculating the SNR in Figure 2c, the minimum error is \(7\times 10^{-5}\) at \(m=91\) and the maximum error is \(1\times 10^{-2}\) at \(m=100\).  
Figure 1: Comparison between the MSE performance of the fixed regularization parameter (Algorithm 1) and the varying regularization parameter (Algorithm 2) methods of the least squares solution considering three different uncertainties in estimating the SNR, 0.5 dB, 0.75 dB and 1 dB. (**a**) \(\Delta\)SNR = 0.5 dB. (**b**) \(\Delta\)SNR = 0.75 dB. (**c**) \(\Delta\)SNR = 1 dB.