Tuesday, September 17, 2019

fourier transform - Coherent Sampling And The Distribution Of Quantization Noise


I have a question concerning the distribution of noise in the frequency domain in case of Coherent Sampling. I read up about Coherent Sampling and understood that in order for a frequency $f_{in}$ to be located on one single bin of the DFT, the period or a multiple of it must fit exactly into the data window of the DFT, meaning that the following must be true:


$$ \frac{f_{in}}{f_s}=\frac{N_c}{N} $$ $N$ ... Record Length, $N_c$ ... Number of cycles in data window



Furthermore in the slides of a course about Mixed-Signal Processing I am attending it is mentioned that $N_c$ and $N$ need to be coprime in order for the quantization noise to be distributed uniformaly. Otherwise the quantization noise would show a discrete spectrum. Why is that the case?



Answer



This is most easily understood by examining the error between the true sinusoid and the quantized sinusoid. Let's start by defining a simple sinusoid. For simplicity, I will assume a cosine, but the same arguments apply for a sinusoid with an arbitrary phase offset. The true sinusoid is defined in continuous-time as


$$ x(t) = \cos\left(2 \pi f_{in} t\right). $$


Now, we need to sample this signal with a period of $T_s = \frac{1}{f_s}$ to obtain a discrete-valued (but unquantized) signal


$$ x_D(n T_s) = \cos\left(\frac{2 \pi f_{in} n}{f_s}\right).$$


Using the relationship that you provided in your question, we can rewrite this as


$$ x_D(n T_s) = \cos\left(\frac{2 \pi N_c n}{N}\right). $$


From this it should be clear that this signal lies in two bins, specifically the bins at $N_c$ and $N - N_c$ of an $N$ point FFT. However, this signal is not realizable with finite precision numbers. So, we need to quantize it. Let us assume that we are quantizing to $q+1$ bits using two's complement. A reasonable approximation to the quantized signal is given by


$$ x_Q(n T_s) = 2^{-q} \left\lfloor 2^{q} \cos\left(\frac{2 \pi N_c n}{N}\right) \right\rfloor.$$



Another way to represent this would be to represent the sinusoid added with an error term (i.e., the quantization noise $\epsilon_q(n T_s)$). This is captured in the following:


$$ x_{D}(n T_s) = x_Q(n T_s) + \epsilon_q(n T_s). $$


Now, let's consider what $\epsilon_q(n T_s)$ looks like for the two cases you mentioned. That is, the coprime case and the common factor case. Let's rearrange this slightly so that we can see things a little better,


$$ \epsilon_q(n T_s) = \cos\left(\frac{2 \pi N_c n}{N}\right) - 2^{-q} \left\lfloor 2^{q} \cos\left(\frac{2 \pi N_c n}{N}\right) \right\rfloor. $$


Now, consider the case where $N_c$ and $N$ share a common factor, $M$. Let's say $M$ is the greatest common factor. In this case, $N_c = M K_c$ and $N = M K$. Using this and the expression derived for $\epsilon_q(n T_s)$, we can show that


$$ \epsilon_q(n T_s) = \cos\left(\frac{2 \pi K_c n}{K}\right) - 2^{-q} \left\lfloor 2^{q} \cos\left(\frac{2 \pi K_c n}{K}\right) \right\rfloor, $$


and from this, we can see that


$$ \epsilon_q(n T_s) = \epsilon_q(n T_s + K T_s) $$


since


$$ \cos\left(\frac{2 \pi K_c n}{K}\right) = \cos\left(\frac{2 \pi K_c (n + K)}{K}\right).$$



In other words, the sequence is periodic with period $K < N$ since $K$ and $K_c$ are coprime. This means that all of the information in this signal can be captured with a $K$ point FFT. This, in turn, means that all of the energy from this signal is contained at the equivalent bins in the $N$ point FFT. These are the bins at $0, M, 2M, ... (K-1)M$. All of the other bins are zero-valued. This is why you see a discrete spectrum as shown in the slides you mentioned.


Now, if $N$ and $N_c$ are coprime, then the sequence is non-sinusoidal and aperiodic (or viewed another way, it is periodic with period $N$). There is no shorter period embedded in the sequence as there was with the common factor case. Therefore, all bins are required to represent the signal.


No comments:

Post a Comment

digital communications - Understanding the Matched Filter

I have a question about matched filtering. Does the matched filter maximise the SNR at the moment of decision only? As far as I understand, ...