Dealing with large Dynamic Range

The Problem:

Designing an ultra-low noise, high speed, DC coupled amplifier that operates over a wide temperature range is difficult, but the technical problems become far more severe if the amplifier also has to function over a wide dynamic range. By wide dynamic range we mean that the amplifier has to maintain a prescribed transfer curve for input signals that vary in amplitude by 4 or 5 orders of magnitude. Typically, the output is the logarithm of the input to maintain constant error for all signal sizes, as we will see later. So, for example, if the amplifier is linear with gain G, it has to remain linear with the same gain over the entire dynamic range. Examples of systems that produce wide dynamic range signal include many from imaging in general, ultrasound in particular, RADAR, LIDAR and many from optoelectronics. An LED is linear over a very large dynamic range (>70 dB) so it can be used to provide a wide dynamic range electrical output which represents the light intensity. Imaging, in general, produces wide dynamic ranges because of absorption, scattering losses and spatial dispersion of beams.

What limits the dynamic range we can handle? The low end is invariably set by the noise floor. To be clear, we are dealing with a general case, not necessarily a repetitive signal. This means we cannot improve the signal to noise by averaging, or using band narrowing techniques such as lock in. Looking at the maximum input signal reveals a less clear cut boundary; one that is somewhat dependent on circumstances. Microelectronics cannot handle kilowatts of power, so for our purposes you might gain 3 dB in range by increasing the maximum input pulse from 5 to 10 volts, but you are unlikely to be able to gain 10 dB, which would require you to handle up to 50 Volt inputs.

Since the noise limits the dynamic range, and noise increases with bandwidth, it is more difficult to make a wide dynamic range amplifier if it is fast. For very slow systems, e.g. strain gauges, the dynamic range can be over a hundred dB. However, we are interested in the problem of high speed, wide dynamic range amplification. The maximum range that can be dealt with in this regime is generally around 50 dB, but in some cases, it is possible to use attenuation methods on a split signal to get larger dynamic ranges. (for example, extended range DLVA’s)

Before going on to discuss the difficulties, we note that in nature organisms can handle enormous dynamic ranges. We note that one of the most important examples of systems with large dynamic ranges, our senses, are sensitive over many decades, and it is interesting to see how nature has adapted to dealing with these extremely wide dynamic range situations.

The most obvious difficulties that come up when one is dealing with a large dynamic range are related to the time it takes for the amplifier to recover from the passage of a large pulse to a state where the amplifier’s performance is restored to sufficient accuracy. These large signals can cause crosstalk, or shift the values of the rail voltages, which results in an inaccurate measurement of a small pulse following the larger pulse closely. The measurement could also be affected by the recovery time of the amp, i.e. the amps recovery time to a level of 10-4 for a 40 dB dynamic range. Increasing dynamic range becomes increasingly difficult. For each 10 dB increase we want for the dynamic range, it is necessary to lower the cross talk etc. by 10 dB in order to maintain the same degree of isolation between the largest and smallest pulses. These are the problems that the designers have to overcome.

Why use a logarithmic transfer when dealing with a wide dynamic range?

It is instructive to consider making measurements on a sample of wide dynamic range, using a high-speed A/D to digitize the data for analysis and storage. To gain intuitive insight into when and why to use logarithmic amplifiers, we will consider the problem of measuring and storing the pulse outputs of a transducer which has a 40 dB dynamic range. Let us assume that we have an N bit A/D available to digitize the pulse heights we want to measure.

We need to decide how accurately we want to measure the amplitudes. This is not as simple a choice as it is if we have a very small dynamic range, in which case we invariably choose to measure all the amplitudes to the same absolute accuracy. When we have a broad dynamic range, we may choose to measure all the pulses to the same percentage accuracy, or we can tailor the accuracy to depend on the amplitude in a customized manner by using appropriate nonlinear compression amplifiers. There is a short section below on customizing the gain to zoom in on regions in a wide dynamic range.

The best distribution of bits depends on the what is desired. For example, with amplitudes varying over 4 decades, say from 100 µv to 1V, is it optimal to choose to measure all of these amplitudes to 100 µv? This is a large error for the smallest pulses, but a small error for the largest pulses. It is impossible to say if this is the best choice without knowing a lot more about what the purpose of the measurement is.

Let us assume we have a linear amplifier and see how well we can measure amplitudes over the whole range if we use our A/D. When digitizing an analog signal by binning, the results will be subject to quantization, or rounding errors. This causes an uncertainty of W/√12 in the nominal value associated with the channel, where W is the width of the bin in which the pulse amplitude fell. This is simply a statement that the actual value of this result has an uncertainty due to the width of the bin. This result for the uncertainty follows trivially by calculating the standard deviation for pulses that fall in this bin, assuming the bin width is narrow. If we want, say 10% accuracy, we have to have the uncertainly due to quantization error be less than .1W. However, W/√12 =.2887W so this error is too large, and has to be reduced by a factor of 2.9. Since we have a linear A/D with constant width bins, the voltage corresponding to bin n is just nV1, where V1 is the voltage corresponding to the lowest bin, or LSB. The quantization error is fixed, and the same for every bin, so if we want to keep the error in the measurement below 10%, we need the value of voltage in the lowest bin used, to be >2.887 V1. We can achieve this by selecting a gain for the amplifier to be such that the smallest signal in the dynamic range falls into channel 3. This means we need to use 2 bits to get the necessary accuracy for the smallest pulse, and another 14 bits to deal with range.

This result is a disaster as 100MSPS A/Ds do not come with 16 bit range. We only wanted 10% accuracy and 40 dB range We could easily have needed higher accuracy and more range, which would have placed even steeper requirements of the A/D. Even if a 16-bit A/D is available, the increased range and accuracy we would like to achieve will definitely require a circuit that does not exist currently. Can we do better? Why did it use so many channels?

The difficulty is exactly the same one we face whenever we have to plot a set of data with a very wide spread in the range in one of the variables, e.g. y=10x, where x goes from 1 to 5. If we try to plot this with linear scales, we find that the value for y can only be read with any accuracy for values of x that span a range of x that is perhaps 1.5. One cannot choose a y scale so that the data is displayed in a useful way for all x. The solution is of course well known, just use semi log paper to make the plot, and it then becomes possible to read the entire data set on one graph. Perhaps using a logarithmic output response to the input signal, could enable us to do better with the limited number of bits at our disposal. We need compression, and a log amp does give that. What we shall see is that it gives the optimal compression.

If we try to understand where all our bits disappeared, we note that the percentage accuracy for pulses at the upper end of the spectrum is far higher than needed, 10-4x10% or .001%. (This follows from the fact that the quantization error is unchanged as we go to different bins, but the magnitude of the largest pulse is 104 times that of the smallest pulse, so the relative error is clearly reduced by 104.) The binning is far too fine at the high end. We could clearly save bins if we allowed the percentage error to remain constant, instead of having it drop to ridiculously low values for large pulses. Simply binning in wider and wider bins, or channels, in order to keep the percentage resolution constant would work. To be precise, to maintain constant percentage error we need the width of the channels to be inversely proportional to their channel number. So, channel 50 is half the width of channel 100 etc. We note that a logarithmic amplifier has a gain which is inversely proportional to the input pulse height, so using an amplifier with a log transform seems like a promising compression function. An easy way to see that a log transfer will give us constant percentage accuracy is shown below.

Suppose that the output voltage of the amplifier, Vout is proportional to the logarithm of the input voltage Vin, i.e. we put in a log converter, before making the measurements.

eq1.png

 (1)

within the range where the amplifier’s output follows a log transfer. K is just a constant that adjusts the scale.

Now differentiating (1) yields

eq2.png

(2)

dVout, the quantization error, is fixed in our example, since we are using an A/D with constant width bins. Therefore, if we make a logarithmic conversion, the error dVin/Vin is a constant percentage, or so many dB, everywhere in the dynamic range of the input signals.

Since we have taken the log of the input pulse, let’s work in dB. We have a total dynamic range of 40 dB. The 10% error that we can tolerate is 0.42 dB. The question we have is how wide can we make our bins or channels, and still have good enough resolution (10%) everywhere.

For a bin width W dB, the resolution in dB is 0.2887W, so we see that we require W to be small enough so that the following is true:

0.2887 W < 0.42 dB

so W must be less than 1.45 dB.

Using W=1 dB, rather than 1.45 dB we still see that it takes only 40 channels, or 6 bits to cover the range with the required accuracy. This is a huge improvement over what it would take to cover this large a dynamic range with a linear amplifier and A/D. Where did all the channels go? We were wasting huge numbers of channels, all those that were ridiculously closely packed could be eliminated while maintaining percentage accuracy. This has important consequences. If we do use a logarithmic amplifier prior to digitization and store the data after it has been logged, we need far less storage to retain the same accuracy. The log function has exactly what is needed for efficient storage and transfer of data of this type; it selects exactly the right effective channel width to give uniform accuracy over the entire dynamic range. We can conclude that wide dynamic range input pulses are best handled using a log amp. Extreme accuracy for a data set with very little dynamic range is most easily achieved without the use of a log amp.

We see also that a log amp makes it easier to observe pulses directly on an oscilloscope because the gain for small pulses is so large. With a logarithmic amplifier one can see down to 40 or 50 dB below the top of a pulse. For large dynamic range signal sets, a log amp not only enables you to see the pulses over the full dynamic range but the logarithmic compression can be used to optimize the measurement accuracy of wide dynamic range data sets.

The L-17D

A log amp is clearly extremely useful for handling wide dynamic ranges. However, making a fast log amp IC is not easy.

While designing them is not the user’s problem, it does help to have some understanding of difficulties inherent in making a broad band logarithmic amplifier. To put matters into perspective, the L-17D has a gain-bandwidth product of about 250 GHz; yet the input-output isolation is high enough so that there is no tendency for the chip to oscillate, even at temperature extremes. As mentioned, many people who have tried to make integrated circuit log amps with dynamic ranges in excess of 80 dBv, have had difficulty maintaining temporal stability. This is not surprising given the enormous gain of a log amp for small signals. Remember that the gain of a log amp is inversely proportional to the amplitude of the pulse, within the specified range for logarithmic behavior. Although this range does not include 0, since the log function is not bounded at zero, the L-17D is typically run with a gain in excess of 3000, for input pulses that are less than 100µv. This is the very gain that allows us to see detail for pulses that are 40 dB below the maximum signal in amplitude. Unfortunately, this is the same gain that makes log amps so sensitive to temperature variations, layout problems etc.

Anadyne spent considerable time understanding the origin of the temperature instability in order to make such a circuit reliable, and were successful, producing the L-17C, a logarithmic amplifier for which the company was awarded a “Top 12 Product of the Year” by the Journal, “Microwaves & RF” in 1988. The L-17C was later replaced by the L-17D which uses an improved IC process to make a substantially more powerful chip. In spite of the large gain- bandwidth the chip does not display any tendency to oscillate, and, if reasonable layout precautions are taken, the chip is very docile.

The L-17D does require tuning to match input detectors and required gains etc. and it also might need temperature correction. However, that correction is linear and can be done using a positive tempco resister and a lookup table, so it is simple. Most of the tuning is to set the parameters to values that match the requirements for a specific task, and are one-time selections for each application. What is important, is that the temperature adjustments, and other settings are stable over time, even when the amplifiers are used in extreme radioactive environments. Many people have had trouble with reproducibility and stability when trying to make an integrated circuit log amp. Given the enormous gains needed for small signals, this is not entirely surprising, but we believe that we have solved this problem (after a substantial effort) and our amplifier’s input offset drift is on the order of a microvolt per year with repeated temperature cycling. Details of the chip’s performance, specifications etc. can be found elsewhere on this website. Browse around the technical section where there are lots of pointers on how to use log amps as they can be conceptually counterintuitive, and it takes a little adjustment in thinking to get comfortable using them.

Personally, I like to think of log amps in relation to dynamic range by using the following analogy. Imagine yourself with a group of people at some place which has magnificent views. We want to take photos of people, photos which show off the views as well as the people. How often do these pictures fail to achieve a balance? The group is too far away, so you cannot identify people, or the group is too close, so the vista is spoiled, or…It is bad enough with a single group and the background. When there are two or more groups or attractions, balance becomes impossible. You cannot see enough detail to get the effect you want. This is what a log amp changes. It enables you to see local detail in a scale independent way. You actually see what I call logarithmic perspective in Chinese art’ when a group of people who might be quite far away in a sweeping scene, are featured by being magnified to give the detail required, while still retaining the overall setting. To me this is reminiscent of using a log amp.

The result of Billions of years of evolution;

How does Nature handle large dynamic ranges? By using logarithmic sensitive detectors. It makes sense.

Making a Zooming Amp.

As mentioned earlier it is possible to design wide dynamic range amplifiers that have a better sensitivity (higher accuracy) in selected portions of the range.

Log amps like the L-17D approximate a log transfer using smoothed piecewise linear segments. For an amplifier with a logarithmic transfer, we simply have the relationships in eqations (1) and (2).

but dVout/dVin is just the local gain of the amplifier, so the gain has to be inversely dependent on the input amplitude. There is a relatively simple way of achieving this which is described below. We describe the method we use to produce a log transfer, and we illustrate it with the L-17D block diagram. Anadyne’s web site contains more technical information for those interested. For now, we give a quick and dirty explanation, we do not want to get hung up in a lot of equations, it’s not necessary.

 

figure3-1.png

 

Fig 1: L-17D block diagram
 

In fig 1 we show the block diagram for the L-17D. A1, A2 and A3 are linear amplifiers. Their gains can be adjusted externally. When one is running a log transfer, A2 and A3 are run with their nominal gains: 4 for A2 and 16 for A3. Each of the linear amps drives one or more undegenerated differential amplifiers. These amplifiers are labeled L1 to L8 and are summed before being fed into the output amplifier. L9 to L11 are extra log stages that can be used as a trio anywhere since the input to the chain is pinned out. Some Log stages can also have their effective gain changed. (L1, L6, L7, L9, L10 and L11). Let us assume that the gain on all the log stages is set to be the same. If this is done, to make a log amp it is only necessary to adjust the gains of the amplifiers feeding the log stages as we shall show. Each log stage limits when its input reaches about 200 mv, and as each stage limits, the gain is decreased by a factor of 4. A3 with a gain of 16 drives L1 and L2. When A2 reaches about 600 mv L2 is essentially limiting, (limiting is essentially complete when it reaches 800 mv) L2 limits slightly before A3 does. L3 and L4 are driven by A2. This means that when L3 is on, the effective gain is down by a factor of 16 and when L4 is on the effective gain has dropped by a factor of 64. Similarly, L5 to L8 are attenuated by a further factor of 4 for each increase in the log stage number. The actual result of summing the log stages as described is more accurate, and smoother than one might imagine as once you are into log stage 2 say, as it dies log stage 3 is kicking in so the curve is smoothed. This produces a perfectly fine log curve. For more detail on this please see the Anadyne site section on the theory of log amps.

The adjustments in the log states can be used to take out minor problems with the detector response not being linear. For the example the output of rf diode detectors rolls-off from the square law value at around -20 dB for most detectors. The adjustments for stages 6 and 7 were primarily introduced to combat this by increasing the gain when the pulse rolls over. However, there is nothing to prevent a user from using the amplifier to produce other curves by adjusting the gains of any stage, or even adjusting the gains of A2 and A3. Adjusting the gain of A1 simply changes the scale unless a preamp is used and stages 9 to 11 are driven from the preamp.

How do we adjust them to Zoom in on a section of a transfer curve where we want more sensitivity? Well the sensitivity is proportional to the local gain. Recall that the error comes from the quantization and is a fixed fraction of the bin width. We saw that we can improve the accuracy by decreasing the bin width, or equivalently, increasing the local gain. In our earlier example we had constant gain, so we had to shift the whole curve over to minimize the quantization error. More generally, if we look at some input voltage Vin and the corresponding output is at Vout. Vout is not necessarily equal to GLVin. However, dVout =GLdVin and increasing the local gain is what increases the sensitivity. So, to make a sensitive region it is only necessary to increase the gain right where you want the added sensitivity. That way you do not waste bits. In practice, it is easiest to do if you can simply change the gain on the log stage, that is firing where you want the increased sensitivity. If there is not a log stage available, you can try to see if adjusting other gains can do the trick. If not you can add an external stage.

It is also possible to change it dynamically, i.e. you can have a roving sensitive spot by introducing a system that changes a resistor to determine where will be sensitive. There is lots of room for imagination here.