MicroMeasurement Digital Signal Processing

Embed Size (px)

Citation preview

  • 7/29/2019 MicroMeasurement Digital Signal Processing

    1/8

    Th Nt TN-517

    Micro-MeasureMeNTs

    Introduction to Digital Signal Processing

    Tec

    h

    N

    o

    Te

    Strain Gages and Instruments

    F thnl ppt, [email protected]

    www.m-mmnt.m169

    Dmnt Nmb: 11067rvn: 01-Nv-2010

    1.0 Introduction

    When a signal varies with time, we are usually concernednot only with its magnitude but also with how it changes.Oscilloscopes, strip chart recorders and other analogrecording devices enable us to make observations othe signal by continuously recording and displaying the

    measurement data in the time domain. When digitalcomputers are utilized or this purpose, however, themagnitude o the signal is sampled only at xed intervalso time with a complete loss o continuity between. Fordata acquired in this orm, the mathematics o digitalsignal processing can be used to analyze the signal in boththe time and requency domains. That is, we can know notonly how the magnitude o the signal varied with time, butalso what the amplitudes o any oscillations were over aspectrum o requencies.

    This Tech Note is intended as a guide to understanding thenecessary considerations or converting an analog signalinto a useul series o discrete digital data, particularly as

    related to StrainSmart Data Systems.

    2.0 Signal Aliasing

    2.1 Fundamentals

    Care must be taken when dealing with digital data toavoid the creation o alse, lower-requency signals by aphenomenon called aliasing. Do you remember seeing thespoke wheels o a wagon that appeared to turn backwardsas the wagon rolled across a television or movie screen?Thats a alse visual impression caused by aliasing. Whenthe wheel is rotating at a slightly slower rate than that atwhich the rames are projected, the wheels appear to run

    in reverse. Further, i the wheels were rotated at the samerate as the rames are projected, the wheel would appear tobe static, or not turning at all!

    Similar things can happen with an analog signal thatis sampled periodically. Consider a sinusoidal signaloscillating at, say, 1000 Hz, or 1000 times per second. Iwe sample this signal at the same rate as the oscillations(Figure 1), we might think the signal was static, not varyingwith time.

    All sampling between 1000 and 2000 times per secondwould produce a lower-requency alias. Shown here is the333-Hz alias that we would see at a sample rate o 1333

    per second (Figure 2).

    Sampling at 2000 times per second, the signal would againappear to be static (Figure 3).

    So what is it that we must do to ensure that our instrumentalways sees the wagon wheel turning in the right direction?The answer is to always sample at more than twice thehighest rate o oscillation. When sampling at 4000 timesa second (Figure 4), we can see that it is impossible toproduce either a static or lower-requency alias rom themeasurements.

    0 1 2 3

    Time, ms

    Sampling rate: 1000/s Frequency: 1000 Hz

    Fg 1

    *Scans * * *

    0 1.5 3.0

    Time, ms

    Sampling rate: 1333/s Frequency: 1000 Hz

    Fg 2

    * Scans * * * *

    mailto:micro-measurements%40vishaypg.com?subject=mailto:micro-measurements%40vishaypg.com?subject=
  • 7/29/2019 MicroMeasurement Digital Signal Processing

    2/8

    Tec

    h

    N

    o

    Te

    F thnl qtn, [email protected]

    TN-517

    M-Mmnt

    Dmnt Nmb: 11067rvn: 01-Nv-2010

    www.m-mmnt.m170

    Introduction to Digital Signal Processing

    Just how ast should we sample? The mathematics usedin digital signal processing can construct a model o theanalog waveorm that produced a particular set o databy looking at how the magnitudes o the measurements

    data vary over time. For requency domain analysis, thesampling rate can be quite close to twice the maximumrate o oscillation. Reconstruction o the actual signalitsel would require a sampling rate o ten or more timesthe highest requency.

    2.2 Anti-aliasing Filters

    In the general case, we do not know the requency o anyo the oscillations that might be present in the signal beingmeasured. But, as was just shown, we do know thoseo hal or more the sampling rate will produce aliasesduring acquisition. Thereore, to ensure that aliases are

    prevented, it is necessary to remove all components o

    the signal and noise with requencies o hal or more thesampling rate with a low-pass anti-aliasing lter. This is ananalog circuit through which the input signal must pass onits way to the analog-to-digital converter. O course, thelter not only eliminates any aliasing in the digital data,but also attenuates any true signals wanted or unwanted above the stopband o the lter. Thus, when the data issubsequently analyzed with digital signal processing, weneed not worry about any alse lower-requency signalsbeing let in the data by the analog-to-digital conversionprocess.

    3.0 Digital Filters

    The sampling rate o the ADC is typically much higher thanthat required to extract the necessary inormation rom thesignal within the requency range o interest. In addition toallowing unwanted higher requency components (noise)to remain in the data, these higher sampling rates will alsoincrease data storage requirements and analysis time.

    In preparation or acquiring data in digital orm, theanalog signal being measured is typically passed throughan analog lter to ensure that al l components o the signal,and noise with requencies corresponding to a hal, ormore, o the digital sampling rate o the analog-to-digitalconverter (ADC), are removed. As described in Section2.0, this helps ensure that alse lower-requency signals

    called aliases are not introduced into the digital data bythe sampling process itsel.

    In order to acquire data at a lower rate while avoidingaliasing errors, it would be necessary to make physicalchanges to the analog anti-aliasing lter and slow downthe sampling rate o the ADC. The disadvantage othis approach is that dierent analog lter componentsare required or each sampling rate. A more practicalsolution is to leave the analog lter and ADC sampling rateunchanged and to mathematically eliminate any unwantedcomponents rom the measured signal by passing thedigital data through a digital lter.

    Speciically, low-pass digital ilters enable the digitaldata coming rom the ADC to be decimated. Insteado the sotware processing and storing data rom everyanalog-to-digital conversion, the digital lter allows datato be sampled at intervals corresponding to every nthconversion, eectively reducing the sampling rate withoutintroducing aliases. And, at the same time, any unwantedhigher requency components o the measured signal areeliminated rom the digital data as well.

    Like an analog lter, the digital lter is selected on thebasis o which requencies in the signal are to be retainedand which are to be rejected. Low-pass lters, the mostcommon type, are designed to allow signal components

    0 1 2 3Time, ms

    Sampling rate: 2000/s Frequency: 1000 Hz

    Fg 3

    * Scans * * * * * *

    0 1 2 3

    Time, ms

    Sampling rate: 4000/s Frequency: 1000 Hz

    Fg 4

    Scans

    * * * * * * * * * * * * *

    http://www.micro-measurements.com/http://www.micro-measurements.com/
  • 7/29/2019 MicroMeasurement Digital Signal Processing

    3/8

    Tec

    h

    N

    o

    Te

    F thnl qtn, [email protected]

    TN-517

    M-Mmnt

    Dmnt Nmb: 11067rvn: 01-Nv-2010

    www.m-mmnt.m171

    Introduction to Digital Signal Processing

    rom 0 Hz (dc) to some nonzero passband requency, fo,to pass essentially unaltered (Figure 5). The lter doesintroduce a series o small positive and negative deviationsrom the actual signal in the passband. When this rippleexceeds a certain amount, typically 0.01 dB, it denes thepassband requency. For requencies in the transition bandbetween the passband requency and higher stopbandrequency, the signal is increasingly attenuated. When theattenuation reaches a certain level, typically in the vicinityo 95 dB, it denes the stopband requency o the digitallter.

    When using digital lters, the user should pay attention toboth the stopband and the transition band. In some cases,particularly those with lower passband requencies, the

    transition band may be as great as, or even greater than,the passband itsel.

    Further, as shown in Figure 5, it should be noted that thepassband and stopband requencies o digital lters dierrom the cuto requency o the commonly used Besseland Butterworth analog lters. The cuto requency o ananalog lter, typically specied at an attenuation o 3 dB,usually lies in the transition band between the passbandand stopband requencies o comparable digital lters.

    Digital lters are a combination o mathematical algo-rithms and ast digital circuits that operate on a series odigital data acquired over a period o time. The necessityo using a series o data leads to a delay as the data passes

    PassbandRipple

    Passband

    Frequency

    Passband StopbandTransitionBand

    Digital Filter

    Frequency

    Stopband

    Frequency

    Analog Filter

    Cutoff

    Frequency

    0

    100

    0

    100

    Stopband

    Attenuation

    Attenuation,

    dB

    Fg 5

  • 7/29/2019 MicroMeasurement Digital Signal Processing

    4/8

    Tec

    h

    N

    o

    Te

    F thnl qtn, [email protected]

    TN-517

    M-Mmnt

    Dmnt Nmb: 11067rvn: 01-Nv-2010

    www.m-mmnt.m172

    Introduction to Digital Signal Processing

    through the lter. Ater each new sample is taken, the oldest

    data drops o the ront o the series, the remaining data ismoved orward in the series, and the data just acquiredis added to the end o the series. Then the algorithm isapplied to the series o data to obtain a calculated valueor the ltered data. The delay, calculated as the time aparticular sample takes to get midway through the series,is a unction o the ADC sampling rate, the number oterms used in the series, and the passband requency.Accordingly, the same digital lter should be selected orall measurement channels to ensure that all data acquiredat the same time emerges rom the digital lters at thesame, but delayed, time.

    4.0 Throughput Rates of Digital Systems

    The electrical resistance strain gage is an inherentlyanalog device that utilizes changes in the relative resistanceo the gage to quantiy mechanical strains in the surace towhich it is attached. O course, as readers probably alreadyknow, the strain gage is typically connected to someorm o instrumentation that incorporates a Wheatstonebridge circuit to provide an analog electrical signal thatvaries as the strain changes. Indeed, most sensors whether they be strain-gage-based transducers, LVDTs,thermocouples, piezoelectric devices, or a wide variety oothers ultimately produce such a signal.

    Unortunately, the digital computers increasingly

    incorporated into measurement systems are inherentlyincompatible with these analog signals. To storemeasurement data in digital orm, the analog signal mustbe sampled at various points in time and converted tonumbers, i.e., the signal must be digitized. Ideally, the timebetween samples should be vanishingly small (approachingzero). But we know rom arithmetic that anything dividedby zero is innitely large. And, o course, the computer canhandle only a nite number o data points. The questionthen becomes how inrequently to sample. I the signal isoscillating on a regular basis, then a minimum o ten datapoints per period, or the highest requency component toreasonably reconstruct the signal in the time domain, aretypically required. In the requency domain, any rate omore than two samples per period wil l suce. In order orthese conditions to be met, a digital measurement systemmust have a sucient throughput rate.

    In the simplest o terms, the throughput rate is little morethan an indication o how much digital data a speciccombination o hardware and sotware can acquire perunit o time. At the instrumentation level, it is primarilycontrolled by the number o analog-to-digital converters(ADCs) being used in the system, and the rate at which theanalog signals being measured can be sampled and digitized.The useul throughput rate o the overall data acquisitionsystem, however, is typically much slower because o

    such things as (1) the need or oversampling to eliminate

    aliasing in dynamic signals, (2) the presence o bottlenecksin the communications link between instrumentation andcomputer hardware, and (3) limitations in the rate at whichsotware can acquire, reduce, store, and/or present thedigital data.

    A calculation o throughput also requires knowledge ohow the instrumentation hardware acquires the data. Thesimplest approach is to sequentially sample each datachannel in the system at xed intervals (Figure 6). System4000, the original Micro-Measurements data system,acquires data in this ashion, using a single ADC at athroughput rate o 25 or 30 samples per second (dependingupon the requency o the mains power).

    A more complicated approach, at the opposite end o thespectrum, is to simultaneously sample each data channel inthe system (Figure 7). System 6000 does this at rates o up to10 000 samples per second per channel. Because a separate

    ADC is used or each instrumentation card, the theoreticalthroughput rate o the system is 10 000 times the numbero channels used in the system. For a 100 channel system,that would be a million samples per second. However,because o the limitations in the digital communicationslink between instrumentation hardware (where the datais acquired) and computer (where the data is stored), thepractical maximum throughput o System 6000 utilizingModel 6100 Scanners is about 200 000 samples per secondper system or data acquisition and storage. That total canbe rom a combination o 20 channels acquiring data at10 000 samples a second, or o 1000 channels acquiring 200samples a second.

    Multi-plexer

    ADC

    Scanner

    Communi-cations

    LinkComputer

    Signal

    Fg 6

    ADC*

    Scanners

    Communi-cations

    LinkComputer

    Signals

    *Simultaneous sampling

    ADC*

    ADC*

    ADC*

    Fg 7

    http://www.micro-measurements.com/http://www.micro-measurements.com/
  • 7/29/2019 MicroMeasurement Digital Signal Processing

    5/8

    Tec

    h

    N

    o

    Te

    F thnl qtn, [email protected]

    TN-517

    M-Mmnt

    Dmnt Nmb: 11067rvn: 01-Nv-2010

    www.m-mmnt.m173

    Introduction to Digital Signal Processing

    A substantially higher throughput can be obtained with

    System 7000 (or System 6000 using the Model 6200Scanners), which simultaneously sample and store datalocally on each scanner (Figure 8). With a ull complemento sixteen cards, each System 7000 scanner has a practicalthroughput o 256 000 samples per second (128 channels at2000 samples/second/channel) or 160 000 samples/second(16 channels at 10 000 samples/second/channel) or theModel 6200. With this combination, the communicationslink bottleneck is virtual ly eliminated, and the total systemthroughput is limited only by the number o scanners used.A System 7000 with 10 scanners, each lled with sixteencards, would have a maximum throughput rate or dataacquisition and storage o 2 560 000 samples per second,or example.

    In addition to sequential and simultaneous samplingmethods, it is also possible or systems to utilize a hybrido the two (Figure 9). System 5000 is an example. In thiscase, all scanners begin sampling simultaneously, but thedata rom each channel in each scanner is sampled andconverted sequentially. Consequently, while the maximumscanning rate or this hardware is 50 scans per second perchannel and the maximum number o channels is 1200per system, the maximum throughput rate o the systemis limited by the communications link between scannersand computer to about 12 500 samples per second. Thatcould be 250 channels running at 50 samples a second, or1000 channels collecting and storing data at 10 samples a

    second.

    As shown here, the useul throughput o a digital system

    is a unction o many parameters. While it is clear thatthe throughput rate can be no greater than the sum o theanalog-to-digital conversions taking place, it is sometimesless obvious that other processes (digital ltering; transero the data to the computer; data storage, reduction anddisplay) are oten the limiting actors. Indeed, the realquestion o throughput is not always how much analogdata can be digitized, but rather how much o the digitizeddata can actually be utilized.

    5.0 Scanning Rates

    As mentioned in Section 4.0, the throughput rate o a digitaldata system was dened as the total number o useul data

    points that can be acquired, stored, reduced, or displayedby the system, per unit o time. While many hardware andsotware actors contribute to the throughput rate, oneo the most important is the sampling rate, which can bedened as the total number o useul datum per unit otime for each signal channel. While the throughput andscanning rates may be the same or a system containing asingle signal channel, the scanning rate is more commonlythe throughput rate divided by the number o channels.

    For static signals, where the measurand does not varyduring the measurement process, the sampling rate is olittle consequence. For dynamic signals, unless the userhas an understanding o how the system acquires data,

    how many measurement channels are being sampled, andhow the data are to be used, the term can be particularlymisleading, resulting in data that is somewhat inaccurate,or completely wrong.

    For example, consider a digital measurement system thatacquires data sequentially, with a single analog-to-digitalconverter (ADC) running at 100 samples/second, and asingle strain gage on a test part vibrating at 10 Hz. Thissampling rate o 100 samples/second/channel providesor 10 datum/cycle/channel, and should be adequate toreconstruct the signal in the time domain. But i therequency o the signal increases to 100 Hz, the system canprovide or only 1 datum/cycle/channelclearly insucient

    to reconstruct the signal. While both the throughput andsampling rates are unchanged, the data becomes meaninglesswhen the frequency of the signal changes.

    Changes aecting the sampling rate can cause similarcases o undersampling. Consider again the same digitalmeasurement system acquiring data at 100 samples/secondand a single strain gage on a test part vibrating at 10Hz. As beore, this sampling rate o 100 samples/second/channel provides or 10 datum/cycle/channel, and shouldbe adequate to reconstruct the signal in the time domain.But i the number o channels is increased to 10 and amultiplexer is used to sample each channel sequentially, thescanning rate is reduced to only 10 scans/second/channel

    Scanners

    Communi-cations

    LinkComputer

    Signals

    *Simultaneous sampling

    LocalStorage

    LocalStorage

    ADC*

    ADC*

    ADC*

    ADC*

    Fg 8

    Multi-plexer

    ADC

    Scanners

    Communi-cations

    LinkComputer

    Signals

    Multi-plexer ADC

    Simultaneous start/sequentialsampling in each scanner

    Fg 9

  • 7/29/2019 MicroMeasurement Digital Signal Processing

    6/8

    Tec

    h

    N

    o

    Te

    F thnl qtn, [email protected]

    TN-517

    M-Mmnt

    Dmnt Nmb: 11067rvn: 01-Nv-2010

    www.m-mmnt.m174

    Introduction to Digital Signal Processing

    and the system can now provide or only 1 datum/cycle/

    channel. While the throughput rate and frequency of thesignal were unchanged, the data became meaningless whenthe number of channels (and thus the sampling rate) waschanged.

    The only cure or undersampling, o course, is toincrease the sampling rate. For systems operating at aixed throughput rate (like System 4000, the originalVishay Micro-Measurements data system), that usuallymeans decreasing the number o channels being sampled.More sophisticated systems like the Vishay Micro-Measurements System 5000, 6000 and 7000 data systems allow the sampling (scanning) rates to be adjusted untilthe maximum scan rate, maximum throughput rate, or

    both are reached. System 5000, or example, can scan at 1,10, 50, and 100 samples/second/channel with a maximumthroughput o 12 500 samples/second/system. System6000 will scan at 10, 100, 200, 500, 1000, 5000, and 10 000samples/second/channel with a maximum throughput oabout 200 000 samples/second/system when using Model6100 Scanners, and virtually unlimited throughput whenusing Model 6200 Scanners. System 7000 supports scanrates o 2048, 2000, 1024, 1000, 512, 500, 256, 200, 128, 100,and 10 samples/second/channel with virtually unlimitedthroughput.

    5.1 Time Skewing

    Data acquired rom various channels are oten unctionallyrelated. In stress analysis work, or example, three separatechannels might provide strain data rom the three gridso a strain gage rosette, which are used together tocalculate principal stresses and strains. In this case, whenthe measurements were made is important i the threesignals vary with time. When such signals are sampledsequentially, the resulting data are all taken at dierenttimes, and are said to be skewed. The errors produced bythis skewing depends upon the nature o the signal, thescanning interval (inverse o the scanning rate) and thenumber o intervals between the sampling o any two datapoints.

    For sinusoidal signals with sequential sampling, the worst-case errors will occur as the signal is crossing through theinfection points. At these points, the maximum requencythat can be sampled without any detectable skewing (signalchange o 1 LSB, or less, o the ull scale signal over asingle scanning interval) is a unction o the sampling rateand the number o bits into which the ADC digitizes theull-scale signal. These requencies are a ew hertz at best,even or relatively high sampling rates. And, o course, thesituation worsens as the number o intervals between data

    points increases.

    Skewing errors greater than 1 LSB o ull scale are detectableand, as shown in Figure 10, the measurable requencyrange is increased moderately i the accompanying errorsare acceptable.

    O course, all skewing errors can be virtually eliminated byusing a digital data system, like System 6000 and System7000, that eatures simultaneous sampling of all signalchannels. In these systems, the maximum time dierencebetween samples is typically in the nanosecond range, suchthat skewing errors or all measurable requency ranges areundetectable.

    6.0 Uncertainties in DigitalMeasurement of Peak Signals

    For most engineering parameters that require measure-ment, the test signal varies continuously over time. A ploto these signals, made on any analog data recorder as theyvary rom one instant o time to the next, produces a lineconsisting o an innite number o data points. From avisual inspection o this line, we can immediately see thenature o the variable. Does it increase or decrease? Is itcyclical? What are the maximum and minimum values,and when did they occur? When measurements are madedigitally, the time between each conversion o an analog

    Frequency Response and Sampling Rate

    For an analog instrument designed to measure changing inputsignals, a key parameter is requency response, or bandpass,

    stated in hertz (Hz). That is a direct indication o how rapidly

    the input signal can change, while still being properly amplied

    and conditioned by the instrument. For a digital instrument

    used in the same application, the key parameter is the sampling

    rate, which is the number o samples that can be acquired in a

    specied period o time, typically one second. Sampling rate is

    sometimes specied in terms o requency response (Hz), but

    while the two are related, they are not the same, and should not

    be used interchangeably.

    1000

    100

    10

    1

    1 10

    Sampling Rate, samples/sec/channel

    5% Error

    2% Error

    1% Error

    100 1000 10 000

    0.1

    0.01

    0.001

    Fg 10. Mxmm fqn tht n b

    mpld t v kwng lvl.

    http://www.micro-measurements.com/http://www.micro-measurements.com/
  • 7/29/2019 MicroMeasurement Digital Signal Processing

    7/8

    Tec

    h

    N

    o

    Te

    F thnl qtn, [email protected]

    TN-517

    M-Mmnt

    Dmnt Nmb: 11067rvn: 01-Nv-2010

    www.m-mmnt.m175

    Introduction to Digital Signal Processing

    measurement to a digital datum, and the nite data storage

    capacity o a computer, limits us to the measuremento only a ew o the data points on the line o interest.The question then is how many digital data are neededto make a good enough reconstruction o the analogsignal or us to obtain meaningul measurement results.That depends upon the nature o the analog signal, thedigital sampling rate, when the samples are taken, and theaccuracy required.

    Suppose, as shown in Figure 11, that a signal varies in asinusoidal way with time. Further suppose that digitalsamples are taken at ten even intervals throughouteach cycle, beginning at the point where the amplitudepasses through zero. As we can urther see when these

    measurement values are superimposed on the plot o theanalog signal, it is possible to get a vague notion thatthe signal is sinusoidal. But, the largest values actuallymeasured are only about 95% o the peak value.

    I, however, the start o sampling is delayed by a twentietho a cycle, as shown in Figure 12, we can still get the samenotion about the nature o the signal. But, in this case, thelargest measurement values will correspond to the peakvalues o the signal.

    This problem o timing is present in nearly all digital

    measurements because we can seldom ensure that samplesare taken at the peak values. Accordingly, all measurementso analog signals with digital systems will contain someamount o uncertainty with regard to capture o the peakvalues. In the case o a sinusoidal signal, this uncertaintyis a unction o the ratio o the digital sampling rate and

    Fg 12

    Fg 13

    Fg 14

    Fg 11

    Fg 15

  • 7/29/2019 MicroMeasurement Digital Signal Processing

    8/8

    Tec

    h

    N

    o

    Te

    F thnl qtn, [email protected]

    TN-517

    M-Mmnt

    Dmnt Nmb: 11067rvn: 01-Nv-2010

    www.m-mmnt.m176

    Introduction to Digital Signal Processing

    the signal requency, as shown in Figure 13 or a sinusoidal

    signal oscillating about zero (with no zero oset).O course, many dynamic signals do not vary in a sinusoidalashion. Consider the urther case o a discontinuous signal(Figure 14) that varies linearly with time to some maximumor minimum value beore instantly returning to zero (suchas would be experienced by a load-bearing structureundergoing a uniormly increasing load until it breaks).

    Here the worst case scenario is or the signal discontinuityto occur one sampling interval ater the start o the lastmeasurement. (And, because the event can occur at any timeduring a sampling interval, there is always one samplinginterval o uncertainty.) The extent o the error caused by

    ailure to read the peak value depends not only upon the

    rate o sampling, but also upon the rate o change in thesignal and the peak value o the signal. The uncertaintyassociated with this error is shown in Figure 15 or variouspeak values as a unction o the ratio o sampling rate andsignal rate o change.

    Uncertainties, unlike errors, cannot be eliminated rommeasurements. At best, they can be minimized. And, inthe case o digital measurements o peak values, the onlyrecourse or minimizing them is to increase the samplingrate. Particular care should be taken i the per-channelsampling rate o the measurement system decreases withan increasing number o measurement channels.

    http://www.micro-measurements.com/http://www.micro-measurements.com/