Download Lecture Notes

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Ringing artifacts wikipedia , lookup

Utility frequency wikipedia , lookup

Variable-frequency drive wikipedia , lookup

Spectrum analyzer wikipedia , lookup

Islanding wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Chirp spectrum wikipedia , lookup

Mains electricity wikipedia , lookup

Buck converter wikipedia , lookup

Dynamic range compression wikipedia , lookup

Pulse-width modulation wikipedia , lookup

Audio crossover wikipedia , lookup

Schmitt trigger wikipedia , lookup

Oscilloscope history wikipedia , lookup

Power electronics wikipedia , lookup

Heterodyne wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Oscilloscope types wikipedia , lookup

Opto-isolator wikipedia , lookup

Analog-to-digital converter wikipedia , lookup

Transcript
Planning Experiments & Measurements
• Plan before doing/buying/measuring anything
• First and most critical step
• Define the problem
• Ask questions
• Lots of questions
• Unless you define the problem, you cannot find the
solution(s)
• At least not the best solution(s)
Some Questions
• What is the problem?
• What physical laws are involved?
• What experiment(s) may provide the answer? (most efficiently)
• What (physical) quantities must be measured?
• What is their range?
• How accurately do you need to measure them?
• Precision
• What parameters/variables can be/need to be controlled?
• How well?
• What Instrumentation & Hardware should be used?
• Sensors (thermocouples, pressure sensors, accelerometers, cameras, …)
• Signal conditioning & processing (filters, amplifiers, …)
• Data acquisition systems → Data rate, number of points, …
• How to analyze the data → Numerical & analytical approach, modeling, …
• How to best present or summarize the data
Picking the Right ‘Stuff’
Based on the answer to the questions during the planning
stages, we select the appropriate Hardware & Software
• Consider
• Range
• Precision / accuracy
• Compatibility with the rest of the hardware
• Ease of use, Size, Weight
• PRICE
• Delivery time
• The Right Sensors
• Temperature
• Pressure
• Visualizations / cameras
• Optics: Light Sources (lasers, halogen lamps, LEDs), Lenses, …
• Accelerometers
Picking the Right ‘Stuff’
• Other Hardware
• Data acquisition systems
• Data rate, number of points, number of channels,
voltage or current range, Number of Bits
• Cables / wires / connectors
• Compatibility, shielding, size / length
• Price
• Signal Conditioning & Processing
• Filters
• Low-Pass (LP, “Anti-Aliasing”), High-Pass (HP), Band-Pass,
Band-Stop (“Notch”), # of Channels, Price
• Amplifiers
• Gain, Range, # of Channels, Price
Picking the Right ‘Stuff’
Remember to ask questions and plan
1. Transducers: Measure a physical parameter or variable
and convert it into an electrical signal which is related to
(usually proportional to) the value of the parameter
• E.g., 1) Microphone: fluctuating pressure to voltage
2) Pressure transducer: pressure to voltage
3) Thermocouple: temperature to voltage
4) Camera sensors: CCD arrays: photons to voltage
Picking the Right ‘Stuff’
2. Input Circuitry: E.g. wheatstone bridge
• Signal conditioning: To improve the quality of the signal: usually
consists of filters and amplifiers
• Removes noise, improves signal-to-noise ratio (SNR)
3. Transmission: Shielded cables
• E.g., scopes, voltmeters, analog-to-digital converters (A/D)
• Each process has specific types of hardware and with each type,
certain precautions need to be taken
• Also, each type has an error associated with it
• We will briefly talk about Data Acquisition (DAQ) Systems
Digital Data Acquisition
Digital Data Acquisition
• Output of most measuring instruments is ANALOG,
i.e., continuous
• However, most recording devices are DIGITAL,
e.g., DVD player
• Analog Recording / Display devices
1. Strip chart recorder
2. Analog scope
3. Most modern devices use a (digital) computer to record and
store and display the signal
• This is done through the use of Analog-to-Digital Converters (A/Ds),
which is a piece of hardware – usually a card
Choosing the Right A/D or DAQ System
• When sampling an analog signal, it is important that we
sample fast enough to accurately measure the analog
signal
• Sampling frequency, fs must be ≥ 2 times the signal
frequency
• Otherwise, aliasing will occur
• In a real signal, fs ≥ 2fc
where fc = the highest frequency present,
determined by filter cutoff frequency
• Most measurement and control devices are analog
• Encoders are an exception (in that they provide a digital
output)
Analog-to-Digital Converters (A/D)
A/Ds are a critical part of Data Acquisition (DAQ) systems
• The outside world is analog while computers are digital
• A/D and D/A converters serve as translators, enabling
computers to communicate with the outside world.
• E.g., A/D – Sample output from pressure probes, thermocouples,
hotwires, etc., and store those outputs in digital form
• D/A – Take the output from the computer to control an
analog device.
• E.g., Controlling a heater (current), Controlling the position of a
motor.
Important Parameters of A/D Converters
1. Input Voltage Range: Usually ± Volts and ± mV.
Sometimes only + V or + mV
• This determines how much the input signal needs to be amplified to
use the maximum input range
• More of a choice, input resolution is usually more expensive
2. A/D Resolution (Digitization Resolution)
• Number of bits N which make up the digital resolution (binary)
• The larger the number of bits, the greater the resolution
• The number of bins = 2N for an N-bit A/D,
i.e., a 3-bit A/D has 23 = 8 bins
• Resolution = (Vmax – Vmin) / 2N
10.000
111(7)
9.375
7.500
6.250
5.000
3.750
2.500
1.250
0.000
110(6)
8.125
101(5)
6.875
100(4)
5.625
011(3)
4.375
010(2)
3.125
001(1)
1.875
000(0)
Input voltage range = 0 – 10 V
3 bit A/D converter → 10 V / 8 bins = 1.25 V/div (Resolution)
Digitization error = ± 0.5 (Vmax – Vmin) / 2N = ± 0.625 V
0.625
A/D Output Voltage (Volts)
Analog voltage Input (Volts)
8.750
Digitization Resolution (cont’d)
• Example:
• Consider an A/D converter with a ± 5 V full scale range
• An 8-bit converter has 28 = 256 bins (subdivisions)
• A 12-bit converter has 212 = 4096 bins
• 8-bit: [5 V – (-5 V)] / 256 bins = 0.0391 V/div = 39.1 mV/div
• 12-bit: [5 V – (-5 V)] / 4096 bins = 0.00244 V/div = 2.44 mV/div
• You can see the effects of digitization error associated
with the A/D
• Digitization error is the smallest change in voltage that the
converter can measure (1/2 the bin-width)
• 8-bit: 39.1 / 2 = ~20 mV digitization error
• 12-bit: 2.44 / 2 = 1.2 mV digitization error
Digitization Resolution (cont’d)
• Note that the errors are based on the full-scale input
voltage range and can be significant if the input voltage
range is not carefully chosen
• E.g., Thermocouple output 0 – 10 mV
• 8-bit, ± 5 V card → ± ~20 mV error
• ± 20 mV / (10 – 0) mV x 100% = ± 200 % error
• If the input voltage range is switched to 0 – 10 mV on the
A/D, then the digitization error for the 8-bit card is:
• ½ (10 mV / 256) = ± ~0.02 mV (± 0.2 %)
• Therefore, it is important to closely match the input range
of the A/D to the amplified output of the transducer
Important Parameters of A/D Converters
2. A/D Resolution (Digitization Resolution)
• Usually, input range should encompass the transducer output
range closely (be careful of clipping)
• Most common cards are 8-bit and 12-bit, although 16-bit cards are
also available
3. Sampling Rate
• How quickly can the analog signal be digitized or converted (also
called the conversion rate)
• Can range from a few kHz up to a few MHz
• What determines the sampling rate?
• The frequency content of the measured parameter(s)
• According to the Nyquist criterion, the sampling frequency (rate)
must be at least 2 times the highest frequency present in the input
signal to avoid aliasing
Sampling Rate & Aliasing
• Digital systems sample signals at discrete times only, not
continuously
• In a digital DAQ system, no information is recorded at
times in between these discrete sampling times
Δt = 1 / fs
Sampling Rate & Aliasing
• If the sampling frequency fs is too low, one can actually
measure an incorrect frequency! This is called aliasing
•
sampled at fs = 15 Hz.
Sampling Rate & Aliasing
• Same signal,
sampled at 11 Hz
To avoid aliasing, the sampling frequency must be greater than twice the
highest frequency component of the analog signal.
Important Parameters of A/D Converters
4. Number of Channels
5. Memory
• How does one control the frequency content of a signal?
• Filtering
• High Pass
• Low Pass
• Band Pass
• Band Stop or “Notch”
• Note that real filters will never have the sharp functions of
an ideal filter
Amplitude ratio
Amplitude ratio
Filters
Ideal
Actual
Low pass
frequency
High pass
frequency
Amplitude ratio
Amplitude ratio
Filters
Band pass
Ideal
Actual
frequency
Band Stop (“Notch’’)
frequency
Important Parameters of Filters
1. Dynamic Range: Operating frequency range of the filter
• Usually, a LP filter will have a maximum pass band frequency.
Higher dynamic range is more expensive
2. Attenuation / Rolloff: How quickly can the spurious
frequencies be reduced / attenuated
• This is represented by the slope of the curve
• Normally expressed as dB/octave
• The amplitude ratio is typically written as:
Amplitude (dB) = 20 log10(Output / Input)
• One octave: doubling or halving (1:2) ratio
Review of the Decibel Scale (dB)
• dB is just another way of comparing relative amplitudes
between 2 signals
• Value in dB is a ratio of the output / the input in log scale:
dB = 20 log10(output/input)
• E.g., 20 dB implies what amplitude ratio?
• 20 dB = 20 log10(output/input)
• Log10(output/input) = 1
• Output/input = 10
• Similarly, 40 dB implies output/input = 100
Review of the Decibel Scale (dB)
• If a filter has a 20 dB/octave rolloff and the cutoff
frequency is 1000 Hz, then
• An input at 2000 Hz (one octave higher) will be reduced
by 20 dB
• -20 dB = -20 log10(output/input)
• Output/input = 1/10
• 2000 Hz signal will be attenuated to 1/10th its value
• 40 dB/octave would imply 1/100th attenuation
Important Parameters of Filters
3. Pass Band Ripple: How much noise is introduced to the
signal which is not attenuated
• ± 0.05 dB – Amplitude ratio of 1.005, approximately 0.5 %
4. Cutoff Frequency: Usually defined as the frequency
when the amplitude is 3 dB below the no attenuation
value
• Good filters have short rolloff and very small pass band ripple
• Costs (e.g., 2 channel filter 110 dB/octave & 0.01 dB ripple - $3000)
Filters Cont’d
• The way that the circuitry is built determines these
characteristics. In general there are two types:
• Passive (e.g., RC circuits)
• Good dynamic range, low noise, cheap, poor rolloff
• Active filters (using op amps)
• Better dynamic range, excellent attenuation, easy to use. Usually have
a digital selectable input, but they can be expensive
LP
HP
Filters Cont’d
dB
+0.05 dB pass band ripple
fr
0
f, Hz
fc
-3dB
-78dB Attenuation floor
Typical seventh-order
Cauer filter
fa = 1.56 fr
fa
fs
Not to scale
Amplifiers
• Amplify the signal to minimize noise and increase Signal-
to-Noise ratio (SNR) and match the input voltage range of
the A/D
• Amplification usually given in dB’s (also called gain)
• Usually filters and amplifiers are packed in one unit
Review
• A/D or DAQ
• Input voltage range
• Resolution (8-bit, 12-bit, …)
• Maximum sampling rate
• Number of points stored (onboard memory)
• Number of channels
• Filters
• Dynamic range (maximum cutoff frequency)
• Attenuation (rolloff) rate
• Pass band ripple
• Number of channels
Review
• Amplifiers
• Dynamic range (maximum response frequency)
• Gains
• Input & Output range
• Number of channels
• Often, DAQ systems include filtering and amplification as
options
• Now that we have acquired the data,
• We can analyze the results and present them
• One of the most important factors in presenting results is to state
the accuracy of your results
Examples from AAPL
• Transducers:
• Omega
• Kulite
• Endevco
• Bruel & Kjaer
• Amplifiers:
• Omega
• National Instruments
• In-house
• Filters:
• Stanford Research Systems
• DAQ:
• National Instruments