1

If I have a signal of the form $x\left(n\right)=Acos\left(nω+ϕ\right)$

where

$\omega \in \left[\omega -\lambda ,\omega \:+\lambda \:\right]$ is a uniform random variable and

$\phi $ is also a uniform random variable $\left[-\pi ,\pi \right]$.

I need to find the mean and the autocorrelation.

So we know the mean $E\left[x\left(n\right)\right]\:=\:AE\left[cos\left(n\omega +\phi \right)\right]$.

I think the $E\left[x\left(n\right)\right]\:=0$ regardless of the random variables just because of the periodicity of the cosine sequence.

Now I would also like to find the auto-correlation function

$R\left(n,k\right)=\:E\left[x\left(n\right)x\left(n+k\right)\right]=A^2E\left[cos\left(n\omega +\phi \right)cos\left(\left(n+k\right)\omega \:+\phi \:\right)\right]=\frac{A}{2}^2\left\{E\left[cos\left(2\left(n\omega +\phi \right)+k\omega \right)\right]+E\left[cos\left(k\omega \right)\right]\right\}=\frac{A}{2}^2cos\left(k\omega \right)$

I am not sure if am solving this the right way, can somebody please tell me if am doing something wrong? because I think the random variables must have a role in this

JordenSH
  • 303
  • 3
  • 9

1 Answers1

2

The "periodicity of the cosine" has little to do with the matter at hand. Indeed, unless $\omega/\pi$ is a rational number, it is not even the case that the discrete-time sequence $x[n] = A\cos(n\omega + \phi)$ is a periodic sequence at all. See, for example, this question which asks "Why is $\cos\left(\frac n6\right)$ aperiodic?" Now, coming to the meat of the question and correcting meaning-less notation such as $\omega \in [\omega-\lambda,\omega+\lambda]$ to $\omega \in [\omega_0-\lambda,\omega_0+\lambda]$, we have from LOTUS, the law of the unconscious statistician, that $$E\left[x[n]\right] = E[A\cos(n\omega + \phi)] = A \int_{-\pi}^{\pi}\int_{\omega_0-\lambda}^{\omega_0+\lambda}\cos(n\omega + \phi)f_{\omega,\phi}(\omega,\phi)\, \mathrm d\omega \,\mathrm d\phi \tag{1}$$ where $f_{\omega,\phi}(\omega,\phi)$ is the joint density of $\omega $ and $\phi$. The OP has not stated that $\omega$ and $\phi$ are independent random variables, but if they are assumed to be independent (as is most likely the intention), then the joint density in $(1)$ factors into the product of the marginal densities (which are given to be uniform on $[\omega_0-\lambda,\omega_0+\lambda]$ and $[-\pi,\pi]$ respectively,) and so $(1)$ can be written as $$E\left[x[n]\right] = A \int_{-\pi}^{\pi}\frac{1}{2\pi}\left[\frac{1}{2\lambda}\int_{\omega_0-\lambda}^{\omega_0+\lambda} \cos(n\omega + \phi) \, \mathrm d\omega\right] \,\mathrm d\phi. \tag{2}$$ Similarly, the autocorrelation function is given by $$E\left[x[n]x[m]\right] = A \int_{-\pi}^{\pi}\frac{1}{2\pi}\left[\frac{1}{2\lambda}\int_{\omega_0-\lambda}^{\omega_0+\lambda} \cos(n\omega + \phi)\cos(m\omega + \phi) \, \mathrm d\omega\right] \,\mathrm d\phi. \tag{2}$$

Dilip Sarwate
  • 20,349
  • 4
  • 48
  • 94
  • Would you please tell me why we're integrating? I thought we're supposed to use summation in discrete time. Please explain. Thank you so much in advance. – JordenSH Apr 04 '21 at 03:17
  • 1
    @Raykh you're discrete in time, but not in the values your random variables take. Take care -the expectation operator here is not "averaging over time"! – mmmm Apr 04 '21 at 08:06
  • 1
    (That's a pretty common confusion to have: you're not calculating a time average; the time is fixed as $m,n$. You're calculating an expectation at that time. See also: ergodicity (which isn't given here)) – mmmm Apr 04 '21 at 08:33
  • Dilipe wrote a beautiful, detailed and educational answer but I just want to point out that the OP's answer is correct because the integrals simplify because of the uniform distribution. See example 9-1-5 at https://homepages.wmich.edu/SW-Notes09.pdf – mark leeds Apr 04 '21 at 13:10
  • link doesn't work but if you google for autocorrelation with uniform phase, the chapter 9 random processes result has it in SW-notes09.pdf. it's for the sine but similar argument holds. – mark leeds Apr 04 '21 at 13:13
  • @Raykh: I just looked at the "random processes-MIT coursewae" result from the same google and the pdf there looks a lot more enlightening than on the I just referenced above. It has the exact example you asked about and it also explains the nuances of ergodicity etc. – mark leeds Apr 04 '21 at 13:56
  • Good answer, especially due to the mention of LOTUS, but the statement "... unless $\omega$ is a multiple of $\pi$ ..." is not correct, unless you consider $2\pi/3$ a multiple of $\pi$ (just an example ...). – Matt L. Apr 04 '21 at 14:52
  • @MattL. To me, multiple includes what some might call submultiple, but I will clarify the language. – Dilip Sarwate Apr 04 '21 at 15:44