# Estimating variance in arbitrary, periodic signal

I have a periodic signal $x[m], m \in [0;M-N+1]$ made of modulated templates $s[n],~ n \in [0;N-1],~ N \ll M = NK$ of finite energy and support (i.e. zero outside of its defined interval, which does not extend to infinity). For simplicity, we write thus

$$x[m] = \sum_{k=1}^{K}A_{k}s[m-n_{k}] + w[m]$$

with $n_{k}$ the $k$-th repetition of the template modulated by $A_{k}$. The noise term $w[m] \sim \mathcal{N}(\mathbb{0},\sigma^2_{w})$ sums over the whole signal (not just one template) and can be considered i.i.d for each realization.

Is it possible to estimate the variance $\sigma^2_{w}$ of the noise, given this setup? For one, I have seen methods that try to obtain some portion of the signal $x$ where the template $s$ is absent, but in my practical case, that is impossible to obtain. What DSP tricks can be applied in order to obtain this information?

• what is the type / dimension of $A_k$? – Marcus Müller Aug 9 '18 at 10:37
• $A_{k}$ is a scalar. – KaiserHaz Aug 10 '18 at 7:34
• do you know your $s$? – Marcus Müller Aug 10 '18 at 10:59
• Yes, $s$ is known. – KaiserHaz Aug 10 '18 at 12:59
• so, is the period equal to $$P = n_{k+1}-n_k \qquad \forall \quad1 \le k < K$$ ? and do the $A_k$ vary as a function of $k$? because if the latter is the case, your $x[m]$ is not periodic. – robert bristow-johnson Aug 10 '18 at 19:05

Do a cross correlation with your known $s$; you will get peaks of height $\|s\|A_k$ at the positions of your shifts.
You just sum up these peaks, call that sum $P$, calculate the overall energy in your signal (i.e. $\|x\|$), and calculate $\text{SNR}=\frac P{\|x\|-P}$ if you need the SNR. If you just need the noise: $\|x\|-P$ (quite directly). Done!
• How does $SNR$ estimate the variance $\sigma^{2}_{w}$? – KaiserHaz Aug 10 '18 at 13:12
• This assumes that $x$ is zero-mean, am I correct? – KaiserHaz Aug 10 '18 at 13:49
• I think I phrased it wrongly. What I understand is that if the signal $x$ is zero-mean, then definitely variance == power. But in saying that, this assumes that the signal $x$ is indeed zero-mean. I'm not entirely sure of this in practice. – KaiserHaz Aug 10 '18 at 13:55