| |||||
| The Digitally Sampled System: How Fast Is Fast Enough?
Analog System Bandwidth
The system designer's question is, "What bandwidth is required to meet my error budget?" The oft-quoted recommendation is that 10× your maximum signal frequency makes the measurement system bandwidth an insignificant contributor to error. The magnitude of this error is a function of the ratio of the measurement system bandwidth to signal frequency. For ease of understanding and analysis, a single-pole low-pass response is considered. Defining:
the following formulas for a single-pole rolloff response apply:
It is desirable for r to be as large as possible. As r increases toward infinity, the error approaches 0. The error equation is plotted in Figure 2.
For higher values of bandwidth ratio (and lower errors), a second vertical axis is used to expand the graph. In this case, if you consider the standard recommendation of a bandwidth ratio of 10, the error is 0.5%. This may or may not be significant, depending on your system requirements. Digital System Sample Rate The bandwidth of the analog components is typically not a concern in a digital system; instead, the speed performance is most likely limited by one of the following: The ratio of the sample rate to the maximum frequency of the changes in the input (a term I call the oversampling ratio) The effects of digital sampling can best be understood by considering examples of various input frequencies and sample rates. For measurement of periodic motion, if the sensor response is plotted on an oscilloscope it will often look similar to a distorted sine wave. Therefore, sine waves have been used to display the signal to be measured. Example 1. Input Frequency at 960 Hz, Sampled at 5 kHz. The dots on the waveform in Figure 3 represent the data points that a digital system may have acquired.
Two effects should be noted from the graph: At an oversampling ratio of 5.2, the output signal does not exactly follow the input. This effect is always present to some extent in a digital system, but can be minimized by a higher oversampling ratio. Example 2. Input Frequency at 1050 Hz, Sampled at 10 KHz. Observing Figure 4 and considering the same two effects as before: At an oversampling ratio of 9.5, the output signal more closely follows the input, and the error in missing the maximum or minimum of the input signal has been reduced. This error can never be reduced to zero, but it is the goal of the system designer to determine the minimum sample rate that will reduce the error to a level that is small compared to the signal being measured.
Maximum Instantaneous Error in a Digital System
In this case, the sampled signal occurs at ~81% of the peak, resulting in an error of 19%. As would be anticipated, for higher values of oversampling the error is reduced. Figure 6 plots the maximum error as a function of the oversampling ratio.
For higher values of oversampling (and lower errors), a second vertical axis was used to expand the graph. It is particularly interesting and important to note that standard practice often recommends an oversampling ratio of 10. In this case, the potential maximum error for a single-cycle sampling could be as high as 5%. Likewise for a potential maximum error of <0.5%, the oversampling ratio must be at least 32. How Fast Do You Need to Sample? 2. Determine the maximum frequency of the motion that needs to be characterized. Multiply this frequency by the oversampling ratio determined in Step 1. This is the minimum sampling rate that must be used to measure the input signal. Performance Limitations Based on Latency from Input to Output Example 3. Input Frequency at 960 Hz, Sampled at 5 kHz, Time Latency of Two Samples. Note that the same errors of Example 1 are still present, but the output is shifted (delayed) due to the signal processing delays. Figure 7 more fully demonstrates the sampled nature of digital systems because the output points are not lying on top of the input sine wave. Remember that the data you observe are only from the sampled output points.
Example 4. Input Frequency at 1050 Hz, Sampled at 10 kHz, Time Latency of Two Samples. Note that the same errors of Example 2 are still present, but the output is shifted (delayed) due to the signal processing delays. The higher sample rate (compared to Example 3) has the effect of reducingboth the sampling and the time latency errors. The higher rate of oversampling allows you to more easily see the pattern of the input sine wave (see Figure 8). Latency delay may or may not be a problem, depending on the application. If the measuring system is simply measuring the extremes of motion, the latency delay is not a problem. If, however, the measurement is a part of a control loop, the latency delay must be considered and could play a significant role in determining the stability of the control system. Applications and Examples
Determining system alignment and quality of assembly Figure 9A shows a perfect systema circular shaft rotating about its center. Figures 9B, C, and D show other types of error that may occur in a typical application. For Figure 9A, the gap from the sensor to the shaft is unchanging. The output of the measurement system will be a stable DC value. For Figures
Note that the frequency of the distorted sine wave output may be 2× the speed of the shaft rotation. This is more easily understood by looking at the ellipse and noting that a peak and valley occur two times for each shaft revolution. Unless the rotating shaft is keyed and it is desirable to know the relationship of the maximum or minimum runout location with respect to the key, time latency in the output is not a problem and can be ignored. Application 2. Reciprocating Motion. From the standpoint of a digital system, this application is very similar to shaft runout. Figure 10 illustrates a typical reciprocating motion application: measurement of piston motion. This application is unique because the target does not necessarily remain in the sensor's dynamic operating range. When the target is outside the range of the sensor, the measuring system output may be saturated at the maximum value. The result is a sine wave type of motion, with the top of the waveform clipped at a fixed level. Figure 11 is included to give an idea of how the digitized results may look.
An oversampling ratio of 10 is used for convenience. All of the previous concerns regarding the error as a function of oversampling ratio pertain tothis application as well. As before, time latency in the output is probably not an issue and can be ignored.
Application 3. Gap Between Rotating and Stationary Plates. In this application (see Figure 12), the gap between the rotating and stationary plates is to be controlled. It is assumed that the rotation rate is significantly faster than the rate at which the plate gap changes. If the plates are not parallel, the sensor will once again see a sine wave type of motion. The desired control is to keep the average plate spacing at a fixed value. At first glance, this application looks similar to the previous examples. It highlights one of the strengths of a digital measurement system: digital filtering. Figure 13 shows the sensor signal and the system output for a plate rotation of 1000Hz. Two different digital filters are implemented to show their effects.
The measuring system should ignore the wobble and give a value of the average plate separation, which in this case is 1.5 units. A digital system with a programmable digital filter is a real advantage here. By programming the filter to a low frequency (heavy filter), the wobble in the plates can be filtered out. If the digital system has sufficient flexibility, the plate wobble can be attenuated to the point that it is hardly noticeable. For the graph, an oversampling ratio of 10 is used for convenience; in the application, however, the oversampling ratio is not a significant factor provided the sampling and rotation rates are not synchronous or multiples of each other. The digital filter will cause the discrete points in the wobble to be averaged out. Thedigital sampling system need only be fast enough to track the actual up and down motion of the plates, not the speed of rotation. Summary The examples and graphs given here provide the tools necessary to determine how fast you need to sample. Some points to consider: Recognize that every measurement system has some type of error associated with it. Analyze the specific application to define the requirements and allowable errors. Each applicationand the amount of error it can toleratemust be examined on its own merits. Digital systems, when compared to analog systems, provide many advantages but may also have some limitations depending on the actual application. You need to understand these performance tradeoffs when you make a decision on the type of measuring system. If in doubt, consult an application engineer to assist you in understanding how these tradeoffs apply to your own unique application. New! Scroll down to post and view article comments. |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||