The probability of two samples of a waveform to be separated by certain amount

70 Views Asked by At

I am trying to mathematically model the probability of observing a waveform crossing based on two of its samples. Im particular, I want to know the effect of the sampling frequency and phase on this. Unfortunately, my statistics is a bit underdeveloped for this at this time.

Here is how I have tried to formulate it as:

Say the first sample is defined by:

$X_1 = A~sin(\omega_ot)$

where $A$ is uniformally distributed between $-A_0$ and $+A_0$ and $\omega_ot$ has some Gaussian distribution Uniform distribution between $-\pi,\pi$. Amplitude is a random variable indicating that the amplitude modulated sequence is random and time is a random variable indicating no phase relationship between the sampling clock and the signal.

Similarly, $X_2 = A~sin(\omega_o(t+T_S))$ where $T_S$ is the sampling period between the two samples.

$T_s$, $T$ and $\omega_o$ are known constants.

Now I want the probability $P(X_1<-T~and~X_2>T) ~or~ P(X_1>T~and~X_2<-T)$

How can I proceed from here now and find the distribution?

EDIT 1: The restriction on $t$ being Gaussian is just made up as a starting point, perhaps assuming some other distribution such as $Uni(-\pi,\pi)$ will allow for easier analytical expressions?

EDIT 2: I realize what I want is not the same as $P(|X_1-X_2|>2T)$, so I have removed my attempt at the calculation.

1

There are 1 best solutions below

6
On BEST ANSWER

HINT / partial solution only. Also, this Answer really needs a diagram, but I don't have any easy way to draw pictures... sorry!

First re-frame the problem a bit. For ease of visualization we will only consider positive $A \sim U(0, A_0)$. You have a uniform-random phase $\theta = \omega_0 t \sim U(-\pi, \pi)$ and a given "phase offset" $\phi = \omega_0 T_S$. And you want $\{\sin\theta, \sin(\theta + \phi)\}$ to be one above $T/A$ and one below $-T/A$.

For the rest, it is easier if we consider $\phi \in [0, \pi]$. You can obviously bring it to $[-\pi, \pi]$ by just ignoring multiples of $2\pi$, and then you can also bring it to $[0, \pi]$ by conceptually swapping the roles of the two, which would change the sign of $\phi$, but doesn't affect the "one above, one below" criterion.

For a given value of the $T/A$ ratio, I would solve this geometrically. Simply draw a unit circle and then two lines $y=\pm T/A$. Then imagine rotating the pair of radii at angles $\theta, \theta + \phi$ and ask: what values of $\theta$ satisfy the "one above, one below" criterion?

This means the two radii must "straddle" the "band" $-{T\over A}\le y \le {T\over A}$. First of all this is impossible if $T \ge A$ (the band covers the entire circle), so for now assume $T < A$. The angle subtended by the band and including the positive $x$-axis (sorry I have no other way to describe it) is $\alpha = 2 \arcsin {T\over A}.$ If $\phi \le \alpha$, straddling is again impossible, whereas for $\phi > \alpha$, there is "leeway" of $\phi - \alpha$ as the pair of radii straddles the band on the $x>0$ side of the circle. The straddling can also happen on the $x<0$ side, so the overall probability is

$$ \begin{align} p(\phi, T, A) &= {2 (\phi - \alpha) \over 2 \pi} = {\phi - \alpha \over \pi} = {\phi - 2\arcsin {T\over A} \over \pi} && \text{ if } T < A \text{ and } \phi > \alpha\\ p(\phi, T, A) &= 0 && \text{ otherwise} \end{align} $$


UPDATE: OK, finally you want to integrate over $A \sim U(0, A_0)$, which of course has pdf $1/A_0$, so the overall answer is:

$$ {1 \over A_0} \int_0^{A_0} p(\phi, T, A)\, dA$$

To turn this into something more useful, we retain only the part where $p(\phi, T, A) > 0$, i.e. we retain the cases where (i) $T < A$ and (ii) $\phi > \alpha$. Requirement (ii) can be rewritten as:

$$\phi > \alpha = 2 \arcsin {T\over A} \iff {T\over A} < \sin {\phi \over 2} \iff A > {T \over \sin {\phi \over 2}} = A_1$$

(Note: this first $\iff$ works because $\phi \in [0, \pi]$ and so ${\phi \over 2} \in [0, {\pi \over 2}]$, and in this latter range, the $\sin()$ function is strictly increasing.)

Since $A_1 \ge T$ always, this means requirement (ii) $A > A_1$ is strictly more stringent than requirement (i) $A > T$, and so the integral becomes:

$$ {1 \over A_0} \int_{T/\sin{\phi \over 2}}^{A_0} {\phi - 2\arcsin {T\over A} \over \pi}\, dA\,\,\,\,\,\,\,\,\,\, \text{assuming } A_1 = T/\sin{\phi \over 2} < A_0$$

I have no idea how to solve this in closed form, but luckily you said you only plan to evaluate it numerically!