turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Navigation
- Simcenter
- Forums
- Blogs
- Knowledge Bases

- Siemens PLM Community
- Simcenter
- Testing Knowledge Base
- Gain, Range, and Quantization

- Article History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content

Siemens Experimenter

07-11-2016
08:31 AM

Gain (also known as the amplification factor) represents the relationship between the magnitude of the input signal and the magnitude of the output signal (see Equation 1).

Below, the red curve is a 5V sine wave. After applying a gain of 2, we get the green curve (a 10V sine wave).

So, when a signal is gained the signal out has a larger amplitude than the signal in.

**How is a signal gained? **

Signals are gained by using an amplifier (amp). An amplifier is an electronic component that boosts electronic signals. Amplifiers come in many shapes, sizes, and types, but all exhibit the property of gain.

Below are two examples of amplifiers, a tiny transistor amplifier and a large guitar amplifier.

**Why gain a signal? What is quantization?**

Gaining a signal helps to reduce *quantization error* and maximize the usage of a data acquisition system’s bits.

When measuring real-life quantities like pressure, temperature, and acceleration, transducers translate these real-life quantities into a voltage signal. This voltage signal is analog but is digitized during signal processing. During the analog to digital conversion, the amplitude of the analog signal is split into discrete levels; this is called *quantization*. The difference between the analog amplitude value and the digital amplitude value is *quantization error* or *quantization distortion*.

As you can see in the graph above, the signal is split into discrete levels. Analog values at each point are put into the quantization level that they are closest to. This is demonstrated in the graph below.

So, if we had a level at 2.0 and a level at 2.1 and our analog amplitude value was 2.03 the digitized signal would be put into the 2.0 level.

**How do we reduce quantization error? **

To reduce quantization error, we need to reduce the bin size. Bin size is a function of the *range* and the number of bits of your system (see Equation 2).

The number of bits is fixed for your data acquisition system. The range is the voltage range over which you are reading in your signal. For example, the range in the graph to the bottom left is 10V, the range of the graph to the bottom right is 0.01V.

Let’s look at an example of a 10V system with 16 bits (current SCADAS hardware are 24 bit systems). At the max voltage range (10V) there are 65536 discrete levels (2^{number of bits}) to quantize the signal. But, at 1.25V there are only 8192 available bins to quantize the signal. See the graphic below.

The maximum range is fixed for your data acquisition system. However, some systems allow you to reduce the range to more closely match the range of your signal. By setting the voltage range to be just larger than your signal range you are able to minimize your quantization error.

So, if a data acquisition system has a max range of 10V and 16 bits, the bin size will be 1.53x10^{-4}.

*Note: if you have an LMS SCADAS with 24 bits you will have 16,777,216 discrete levels, a lot more than a 16 bit system with 65,536 discrete levels.*

Let’s see what happens if we decrease the bin size and re-process our original signal (grey signal from Figure 2).

Looking at the above graph, you can see that the smaller the bin size, the better the translation of the signal from analog to digital.

Let’s look at an even more extreme case. If we have a 0.001V signal and a 16 bit system, we will only have 6 levels to discretize the signal.

Therefore, if the signal you are reading in is significantly less than the maximum range of your system you risk large quantization errors.

**How can quantization error be reduced?**

If the signal voltage being read in is significantly less than the voltage range of the hardware, it is possible for the system to *apply a gain to the incoming signal* so the signal approaches the full range of the system. So if the system’s max range is 10V and you read in a 0.1V signal, the system will apply a gain of 100 to amplify the signal to 10V. See the chart below to see what gain values are applied to different incoming signal levels (assuming 10V max range).

So, let’s look at the same example in which a 0.001V sine wave was being read in. Now, let’s add a gain factor of 10000 to this sine wave to amplify the amplitude to 10V. Now, because we are utilizing the full range of the system we will have 65536 levels to discretize the signal.

**But my signal isn’t 10V, its 0.001V!!**

In Test.Lab, this gain is applied behind the scenes, so when looking at the graph after applying the appropriate ranges, it will still appear to be a 0.001V sine wave, but the full number of discrete levels will be available to quantize the signal.

So, even though it looks like your range didn’t change, the gain was applied in the background and your signal is now making full use of the max range and bits available.

**How to know if range is appropriate:**

Test.Lab will give you an indication of whether or not your range/gain is set appropriately.

In the acquisition set up workbook, there is a range indication bar in the lower left corner.

When the bar is white, the range is too large for the signal. Various shades of green indicate the range is set appropriately. Orange indicates the signal is close to the range limits. Red incidates you have overloaded.

This quick visual check ensures you get the most from your system!

**How do I set the range of my signal? **

If the bar is white, the range needs to be decreased. If the bar is red or orange, the range needs to be increased.

To auto-set the ranges, click 1) start ranging, 2) hold level, and 3) set ranges.

This will set the gain to an appropriate level thus minimizing quantization errors.

NOTE: It is important to use the full range of the system when autoranging. If the full range of the system is not used, and an overload occurs, the system gain will only change by one increment. The adjustment by only one increment may not be enough to avoid another overalod. If the full range is used, the gain can be adjusted to be as low as possible to accomodate the signal range to avoid overloads and minimize quantization errors.

Turn on "Use full range when autoranging" by pushing the "More..." button in Figure 13.

Remember, the range of the system doesn’t actually change, only the gain applied to the signal changes. The gain amplifies the signal to fit within the max range of the system.

It’s that easy!

Questions? Contact us!

**Additional data acquistion links: **

- Siemens LMS SCADAS Data Acquisition Hardware
- AC and DC coupling
- Single Ended and Differential Inputs
- Cool triaxial accelerometer tips
- Digital Signal Processing: Sampling Rates, Bandwidth, Spectral Lines, and more...
- Gain, Range, Quantization
- Aliasing
- Overloads
- Averaging Types: What's the difference?
- Spectrum versus Autopower
- Autopower Function...Demystified!
- Power Spectral Density
- Windows and Leakage
- Window Types
- Window correction factors
- RMS Calculations

Labels:

- Article History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content

Related content

Follow Siemens PLM Software

© 2018 Siemens Product Lifecycle Management Software Inc