# Is there a rule of thumb for selecting the variance of the input?

Considering an estimation problem, where I want to estimate the unknown input $x$ using the known channel parameters. This estimation problem can be solved by Least Squares.

Thus, the model is $$\hat{x}[n] = \mathbf{A}^T\mathbf{x}_{n} + w[n]$$ where $\mathbf{A} = [a_0,a_1,\ldots,a_{L-1}]^T \in \mathbb{R}^{1 \times L}$ represents the channel's impulse response, and $\mathbf{x}_{n} = [x[n], x[n-1], x[n-2],\ldots,x[n-L+1]^T$ and $L$ is the order. The model is an FIR filter and $w[n]$ is the measurement noise which is $w \sim N(0,\sigma^2_w)$.

After the estimation, I want to see the performance using Mean square error defined as $MSE = \frac{1}{NT}\sum_{n=1}^Ne[n]^2$ where $T$ is the number of independent runs, that is for every SNR, I generate $T = 10$ different channel parameters at random and for each $T$ I perform estimation.

The error is $e[n] = x[n] - \hat{x}[n]$.

The graph to plot would be SNR on $X$ axis vs. $MSE$ on $Y$ axis. SNR is defined as $\frac{\sigma^2_x}{\sigma^2_w}$.

But I don't know what is the value of the numerator, $\sigma^2_x$. I cannot understand how to plot the curve. Can somebody please explain (with an illustration / graph would be very useful) what is the procedure to plot the graph, what is the value of variance of the input, $\sigma^2_x$?

Please correct me where ever I have done mistake (especially, in the formula ).

• Your formula for SNR needs to be amended. Perhaps you can define signal power (the numerator) as the mean of the sum of squares of the elements of $x[n]$ and use that instead of $\sigma_x^2$. Jul 14, 2017 at 0:58

You can define your model as $$\hat{x}[n] = \frac{1}{||\mathbf{x}_{n}||}\mathbf{A}^T\mathbf{x}_{n} +\frac{1}{\sqrt{\mathsf{SNR}}} w[n]$$ In this way, you define a range for $\mathsf{SNR}$ in dB (e.g. between 0 to 10 dB), then translate it to natural (non-dB) scale, and then $\frac{1}{\sqrt{\mathsf{SNR}}}$ gives you the noise power. The signal power is normalized to one which makes it easy.
Here, $w\sim \mathcal{N}(0,1)$ is a standard Gaussian RV and you can simulate it as w = randn;. In fact, $\frac{1}{\sqrt{\mathsf{SNR}}}w=w'\sim \mathcal{N}(0,\sigma^2_{w'})$, where $\sigma^2_{w'}$ has the right proportion wrt the SNR.
• signal power is normalized to one in my answer. The exact value is not so important since SNR is a ratio. You can also use awgn as well. Since you specify measured it uses the right values.