40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
 40m Log Not logged in
 Mon Sep 20 15:42:44 2021, Ian MacMillan, Summary, Computers, Quantization Code Summary Wed Sep 22 14:22:35 2021, Ian MacMillan, Summary, Computers, Quantization Noise Calculation Summary Mon Sep 27 12:12:15 2021, Ian MacMillan, Summary, Computers, Quantization Noise Calculation Summary Mon Sep 27 16:03:15 2021, Ian MacMillan, Summary, Computers, Quantization Noise Calculation Summary Mon Sep 27 17:04:43 2021, rana, Summary, Computers, Quantization Noise Calculation Summary Thu Sep 30 11:46:33 2021, Ian MacMillan, Summary, Computers, Quantization Noise Calculation Summary Wed Nov 24 11:02:23 2021, Ian MacMillan, Summary, Computers, Quantization Noise Calculation Summary Wed Nov 24 13:44:19 2021, rana, Summary, Computers, Quantization Noise Calculation Summary Tue Dec 7 10:55:25 2021, Ian MacMillan, Summary, Computers, Quantization Noise Calculation Summary Fri Dec 10 13:02:47 2021, Ian MacMillan, Summary, Computers, Quantization Noise Calculation Summary Mon May 9 15:32:14 2022, Ian MacMillan, Summary, Computers, Quantization Noise Calculation Summary Fri Sep 2 13:30:25 2022, Ian MacMillan, Summary, Computers, Quantization Noise Calculation Summary
Message ID: 16355     Entry time: Wed Sep 22 14:22:35 2021     In reply to: 16348     Reply to this: 16360
 Author: Ian MacMillan Type: Summary Category: Computers Subject: Quantization Noise Calculation Summary

Now that we have a model of how the SS and IIR filters work we can get to the problem of how to measure the quantization noise in each of the systems. Den Martynov's thesis talks a little about this. from my understanding: He measured quantization noise by having two filters using two types of variables with different numbers of bits. He had one filter with many more bits than the second one. He fed the same input signal to both filters then recorded their outputs x_1 and x_2, where x_2 had the higher number of bits. He then took the difference x_1-x_2. Since the CDS system uses double format, he assumes that quantization noise scales with mantissa length. He can therefore extrapolate the quantization noise for any mantissa length.

Here is the Code that follows the following procedure (as of today at least)

This problem is a little harder than I had originally thought. I took Rana's advice and asked Aaron about how he had tackled a similar problem. We came up with a procedure explained below (though any mistakes are my own):

1. Feed different white noise data into three of the same filter this should yield the following equation: $\textbf{S}_i^2 =\textbf{S}_{ni}^2+\textbf{S}_x^2$, where $\textbf{S}_i^2$ is the power spectrum of the output for the ith filter,  $\textbf{S}_{ni}^2$ is the noise filtered through an "ideal" filter with no quantization noise, and  $\textbf{S}_x^2$ is the power spectrum of the quantization noise. Since we are feeding random noise into the input the power of the quantization noise should be the same for all three of our runs.
2. Next, we have our three outputs:  $\textbf{S}_1^2$,  $\textbf{S}_2^2$, and  $\textbf{S}_3^2$ that follow the equations:

$\textbf{S}_1^2 =\textbf{S}_{n1}^2+\textbf{S}_x^2$

$\textbf{S}_2^2 =\textbf{S}_{n2}^2+\textbf{S}_x^2$

$\textbf{S}_3^2 =\textbf{S}_{n3}^2+\textbf{S}_x^2$

From these three equations, we calculate the three quantities: $\textbf{S}_{12}^2$$\textbf{S}_{23}^2$, and $\textbf{S}_{13}^2$ which are calculated by:

$\textbf{S}_{12}^2 =\textbf{S}_{1}^2-\textbf{S}_2^2\approx \textbf{S}_{n1}^2 -\textbf{S}_{n2}^2$

$\textbf{S}_{23}^2 =\textbf{S}_{2}^2-\textbf{S}_3^2\approx \textbf{S}_{n2}^2 -\textbf{S}_{n3}^2$

$\textbf{S}_{13}^2 =\textbf{S}_{1}^2-\textbf{S}_3^2\approx \textbf{S}_{n1}^2 -\textbf{S}_{n3}^2$

from these quantities, we can calculate three values: $\bar{\textbf{S}}_{n1}^2$$\bar{\textbf{S}}_{n2}^2$, and $\bar{\textbf{S}}_{n3}^2$ since these are just estimates we are using a bar on top. These are calculated using:

$\bar{\textbf{S}}_{n1}^2\approx\frac{1}{2}(\textbf{S}_{12}^2+\textbf{S}_{13}^2+\textbf{S}_{23}^2)$

$\bar{\textbf{S}}_{n2}^2\approx\frac{1}{2}(-\textbf{S}_{12}^2+\textbf{S}_{13}^2+\textbf{S}_{23}^2)$

$\bar{\textbf{S}}_{n3}^2\approx\frac{1}{2}(\textbf{S}_{12}^2+\textbf{S}_{13}^2-\textbf{S}_{23}^2)$

using these estimates we can then estimate  $\textbf{S}_{x}^2$  using the formula:

$\textbf{S}_{x}^2 \approx \textbf{S}_{1}^2 - \bar{\textbf{S}}_{n1}^2 \approx \textbf{S}_{2}^2 - \bar{\textbf{S}}_{2}^2 \approx \textbf{S}_{3}^2 - \bar{\textbf{S}}_{n3}^2$

we can average the three estimates for  $\textbf{S}_{x}^2$  to come up with one estimate.

This procedure should be able to give us a good estimate of the quantization noise. However, in the graph shown in the attachments below show that the noise follows the transfer function of the model to begin with. I would not expect this to be true so I believe that there is an error in the above procedure or in my code that I am working on finding. I may have to rework this three-corner hat approach. I may have a mistake in my code that I will have to go through.

I would expect the quantization noise to be flatter and not follow the shape of the transfer function of the model. Instead, we have what looks like just the result of random noise being filtered through the model.

Next steps:

The first real step is being able to quantify the quantization noise but after I fix the issues in my code I will be able to start liking at optimal model design for both the state-space model and the direct form II model. I have been looking through the book "Quantization noise" by Bernard Widrow and Istvan Kollar which offers some good insights on how to minimize quantization noise.

 Attachment 1: IIR64-bitnoisespectrum.pdf  34 kB  Uploaded Wed Sep 22 16:51:50 2021
ELOG V3.1.3-