# How do you estimate necessary dynamic range?

Say I have a signal (1D in my case, but could be an image, etc.) that has been captured adequately on nice equipment with sufficient resolution and range to get all the details of the signal that are important. I want to estimate what the minimum dynamic range to capture the relevant details of the signal would be.

In particular I want to compare the dynamic range of two signals.

My idea was to take the top percentile of the absolute value of the stored signal, divided by the bottom percentile. In python, for example:

DRestimate = np.percentile(y,99)/np.percentile(y,1)


Obviously this depends on subjectively picking a good percentile for your application, but it does allow me to get a comparison between two signals. So, the question is, is there a standard, or better way to do this?

Well, as you guessed, it depends!

For example, assume you're observing a multi-carrier communication signal. It has probability of 0.1% of symbol times to land in upper the percentile you "cut off".

Let's say that in that case, you get a bit error rate of 25% whenever signal is cut off.

Now, you get a BER –due to cutting off– of 2.5·10⁻³. That's pretty much for some systems, and nearly nothing for others.

So, define this from what your measurement describes, and generate a curve of "error you introduce" over "cutting off at a specific level"; let's call that function $e(l)$ ("error of level").

Then, calculate how often that level $l$ or anything lower occurs; that's a cumulative distribution function of the signal amplitude! It can be easily estimated from an observation. Because it's a probability distribution, we'll call it $F_L(l)$ of the random variable $L$, the observed level.

$\tilde F_L(l) = 1 - F_L(l)$ is just the "counterpart": How often does a value above $l$ occur?

Now, you can find the cumulative error of a cutoff-level by just defining a function

$$C(l) = \tilde F_L(l) e(l)$$

and evaluate it for some different $l$. (Do a plot of this, really.)

Then, calculate the percentage of broken measurements you're willing to accept, and compare your $C(l)$ to it.