|
|
|
SPECIAL SECTION FEBRUARY 1999
The Digitally Sampled System:
How Fast Is Fast Enough?
Tim Hitz, Kaman Instrumentation Corp.
The advent of digital measuring systems introduces a new set of concepts and ideas to the analog world. To be able to take full advantage of their capabilities, you must first understand some of their limitations.
In an analog system with a single or dominant pole, bandwidth is used as a measure of the frequency at which the output voltage drops to 71%, or 3 dB of its DC value. Figure 1 shows how the output voltage falls off as a function of frequency for a bandwidth of 10 kHz. 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:
In a digital system, the input is sampled and the output is updated at a predefined rate. In between the samples, the input can change and the change will not be reflected in the measuring system output. If the input changes very quickly (or the sample rate is very slow), it is possible for changes in the input to be missed entirely. A digital system must sample at a fast enough rate to capture the changes on the input to an accuracy that matches the system performance requirements. 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 time latency from input to output; this is a fixed delay that occurs in updating the output and is usually expressed as a number of samples of delay 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. The output does not appear cyclically consistent. Note that where the cycle minimums are closely captured for the two cycles shown, the maximum signal excursions appear to be missed. With multiple sine waves captured, eventually the maximum would be captured and the minimum missed. The reason is that the input wave is not sampled at a rate that is an integral multiple of the input frequency. Because the input frequency is rarely known and the sample rate cannot be adjusted, it is very likely that cycle-to-cycle sample points will not match up. The output does not appear cyclically consistent. Note that for one of the cycles the maximum appears to be missed, but for the next cycle it is captured near its peak excursion. This is similar to the previous example except that as a result of the sampling occurring at a higher rate, the discrepancy has also been minimized. Since the input frequency is rarely known and the sample rate cannot be adjusted, this is very likely a real-life scenario.
Maximum Instantaneous Error in a Digital System 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?1. Determine how much error can be tolerated when measuring the minimum and maximum displacements. Locate this point on the vertical axis in the maximum error vs. oversampling ratio graph. Follow this point to the horizontal axis to determine the minimum amount of oversampling required. 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 OutputAs mentioned earlier, the delay in updating the output must also be considered when evaluating a 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. 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 ExamplesApplication 1. Runout in Rotating Shafts. A typical application of a position-measuring system is to measure the runout in a rotating shaft. This measurement would be useful for: Determining system alignment and quality of assembly Bearing wear Dynamics of the rotating shaft, such as shaft growth, harmonics, bend-ing/material properties, and temperature effects
9B, C, and D, the sensor-to-shaft gap is constantly changing. If the sensor response is plotted on an oscilloscope, it will look similar to a distorted sine wave. To measure shaft runout it is important that the measurement system be able to capture the peaks of the sine wave response. All of the previous concerns regarding the error as a function of oversampling ratio apply in this application.
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
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 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. The digital sampling system need only be fast enough to track the actual up and down motion of the plates, not the speed of rotation. SummaryIn each of these applications, unless the system response is monitored on an oscilloscope it is important to recognize that the signal is usually digitized somewherein the measurement system itself, in an A/D acquisition card in a computer, or in a peak detection circuit in a DVM. Understanding the limitations in a digital measuring system will allow the user to specify a system adequate for the allowed error budget. 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. Determine whether an analog or a digital system is appropriate for your application. Using the graphs, determine the bandwidth requirement for an analog system or the sample rate requirement for a digital system. Be careful about confusing the specifications bandwidth and sample rate. The terms do not mean the same thing and cannot safely be used interchangeably. Be cautious about applying rules of thumb or general solutions to your specific application. What is acceptable for another user may not be adequate for your needs. 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.
Tim Hitz is a Design Engineer, Measuring Systems Group, Kaman Instrumentation Corp., 1500 Garden of the Gods Rd., PO Box 7463, Colorado Springs, CO 80933; 719-599-1132, fax 719-599-1823, info-cos2@kaman.com |
|
|