Upload
hortense-benson
View
242
Download
3
Embed Size (px)
Citation preview
ni.comni.com
Data Analysis: Time and Frequency Domain
ni.comni.com
Typical Data Acquisition System
SignalSource
SignalConnection
SignalConditioning
+-
SignalMeasurement
ADC
Analog
Digital
ni.comni.com
DigitizationDigitization
• An analog signal is sampled at a point in time and converted to a time series
• An analog signal is sampled at a point in time and converted to a time series
ni.comni.com
DigitizationDigitization
• Each sampled signal value is digitized using and analog-to-digital converter
• Parameters:– Resolution: number of bits used to represent the
analog signal– Range: min. and max. voltage ADC can span (-5V
to +5V)– Gain: range scale factor (gain factor of 10 means
that a range spans 1/10 of the original range).– Polarity: single (-5 to 5V) or double (0 to 10V)
• Each sampled signal value is digitized using and analog-to-digital converter
• Parameters:– Resolution: number of bits used to represent the
analog signal– Range: min. and max. voltage ADC can span (-5V
to +5V)– Gain: range scale factor (gain factor of 10 means
that a range spans 1/10 of the original range).– Polarity: single (-5 to 5V) or double (0 to 10V)
ni.comni.com
Code Width (LSB)Code Width (LSB)
• Number of codes is a function of resolution:
#of codes = 2
• Code width (vertical sensitivity is the amount of voltage corresponding to a one-bit increment in code number
LSB =
• Number of codes is a function of resolution:
#of codes = 2
• Code width (vertical sensitivity is the amount of voltage corresponding to a one-bit increment in code number
LSB =
resolution
range
gain x #of codes
ni.comni.com
Code Value to VoltageCode Value to Voltage
• Conversion :
voltage = (code) x code_width +
• Conversion :
voltage = (code) x code_width + Bottom of range
gain
ni.comni.com
When to Sample?When to Sample?
• Settling time is important• Settling time is important
desiredmeasured
measureddesired
ni.comni.com
When to Sample?When to Sample?
ni.comni.com
Improperly sampledImproperly sampled Properly sampledProperly sampled
fN = fs/2 fs: sampling frequencyfN = fs/2 fs: sampling frequency
Sampling GuidelinesSampling Guidelines• Nyquist Theorem
sampling rate > 2 x maximum frequency of signal
• Nyquist Frequency (fN)
maximum frequency that can be analyzed
• Frequencies above Nyquist Frequency cause aliasing
• Nyquist Theorem sampling rate > 2 x maximum frequency of signal
• Nyquist Frequency (fN)
maximum frequency that can be analyzed
• Frequencies above Nyquist Frequency cause aliasing
ni.comni.com
120
-120
-100
-80
-60
-40
-20
0
20
40
60
80
100
10m0 1m 2m 3m 4m 5m 6m 7m 8m 9m
Acquired
What is Aliasing? (Time Domain)What is Aliasing? (Time Domain)
• Samples acquired at 1 kHz• Samples acquired at 1 kHz
120
-120
-100
-80
-60
-40
-20
0
20
40
60
80
100
10m0 1m 2m 3m 4m 5m 6m 7m 8m 9m
Acquired
150 Hz
150 Hz sine tone ? 150 Hz sine tone ?
120
-120
-100
-80
-60
-40
-20
0
20
40
60
80
100
10m0 1m 2m 3m 4m 5m 6m 7m 8m 9m
Acquired
150 Hz
850 Hz
850 Hz sine tone ? (1000 Hz – 150 Hz) 850 Hz sine tone ? (1000 Hz – 150 Hz)
120
-120
-100
-80
-60
-40
-20
0
20
40
60
80
100
10m0 1m 2m 3m 4m 5m 6m 7m 8m 9m
Acquired
150 Hz
850 Hz
1150 Hz
1150 Hz sine tone ? (1000 Hz + 150 Hz) 1150 Hz sine tone ? (1000 Hz + 150 Hz)
ni.comni.com
120
0
10
20
30
40
50
60
70
80
90
100
110
30000 200 400 600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800
150 Hz
850 Hz
1150 Hz
120
0
10
20
30
40
50
60
70
80
90
100
110
30000 200 400 600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800
150 Hz
850 Hz
1150 Hz
... Hz
n * Fsampling 150 Hz n * Fsampling 150 Hz
Aliasing (Frequency Domain)Aliasing (Frequency Domain)
• 150, 850, and 1150 Hz• 150, 850, and 1150 Hz
ni.comni.com
f1f1 f3f3
fs /2fs /2 fsfs
alias free bandwidthalias free bandwidth
f1f1
fs /2fs /2 fsfs
anti-aliasingfilteranti-aliasingfilter
f2f2
attenuatedf2
attenuatedf2
aliasf3
aliasf3
f4f4
RAW SIGNALRAW SIGNAL
ACQUIRED SIGNALACQUIRED SIGNAL
Time Domain ConsiderationsAlias Free BandwidthTime Domain ConsiderationsAlias Free Bandwidth Nyquist FrequencyNyquist Frequency Sample FrequencySample Frequency
ni.comni.com
• Removes frequencies higher than Nyquist frequency
• Analog low-pass filter
• Before sampling
• Removes frequencies higher than Nyquist frequency
• Analog low-pass filter
• Before sampling
Time Domain ConsiderationsAnti-Aliasing FilterTime Domain ConsiderationsAnti-Aliasing Filter
Flat FrequencyResponse
SharpRoll-off
ni.comni.com
120
0
10
20
30
40
50
60
70
80
90
100
110
30000 200 400 600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800
150 Hz
850 Hz
1150 Hz
... Hz
AA-Filter
Anti-Aliasing Filter (Analog Only)Anti-Aliasing Filter (Analog Only)
Analog anti-aliasing filter – Passband – DC to 400 Hz– Stopband – 600 Hz
Analog anti-aliasing filter – Passband – DC to 400 Hz– Stopband – 600 Hz
ni.comni.com
Sampling MethodsSampling Methods
• Simultaneous Sampling
• Interval Sampling
• Continuous Sampling
• Random Sampling
• Multiplexing
• Simultaneous Sampling
• Interval Sampling
• Continuous Sampling
• Random Sampling
• Multiplexing
ni.comni.com
Simultaneous SamplingSimultaneous Sampling
• Critical time relation btw. signals
• Requires:– Sample-and-hold circuits OR– Individual ADC’s
• Critical time relation btw. signals
• Requires:– Sample-and-hold circuits OR– Individual ADC’s
ni.comni.com
Interval SamplingInterval Sampling
• Simulate simultaneous sampling for low-frequency signals
• Simulate simultaneous sampling for low-frequency signals
ni.comni.com
Continuous SamplingContinuous Sampling
• Sampling multiplexed channels at constant rate.
• Causes phase skew btw. Channels– Use only if time relation btw. Channels is not
important
• Sampling multiplexed channels at constant rate.
• Causes phase skew btw. Channels– Use only if time relation btw. Channels is not
important
ni.comni.com
Classic Multiplexed MIOClassic Multiplexed MIO
• Low cost/flexible– No anti-aliasing filters– Only one A/D converter for all channels
• Conflicts with some common requirements of many applications that require dynamic signal acquisition– Aliasing protection– Simultaneous sampling
• Low cost/flexible– No anti-aliasing filters– Only one A/D converter for all channels
• Conflicts with some common requirements of many applications that require dynamic signal acquisition– Aliasing protection– Simultaneous sampling
ni.comni.com
Multiplexing: Some DefinitionsMultiplexing: Some Definitions
• Channels – the actual number of input channels scanned by the board
• Scan clock – the output data rate for each channel
• Decimation factor (D) – the acquisition over-sampling factor for each channel
• A/D clock – the actual sample rate of the multiplexing A/D converter
A/D clock = channels * decimation * scan clock
• Channels – the actual number of input channels scanned by the board
• Scan clock – the output data rate for each channel
• Decimation factor (D) – the acquisition over-sampling factor for each channel
• A/D clock – the actual sample rate of the multiplexing A/D converter
A/D clock = channels * decimation * scan clock
ni.comni.com
Multiplexing Identical InputMultiplexing Identical Input
• 4 channels (same input signal on all channels)
• Scan clock = 1 kHz
• A/D clock = 4 kHz
• 4 channels (same input signal on all channels)
• Scan clock = 1 kHz
• A/D clock = 4 kHz
120
-120
-100
-80
-60
-40
-20
0
20
40
60
80
100
10m0 1m 2m 3m 4m 5m 6m 7m 8m 9m
Analog In
Chan. 0
Chan. 1
Chan. 2
Chan. 3
ni.comni.com
Resulting Delayed AcquisitionsResulting Delayed Acquisitions
• Our four channels appear to have different phases even though we input the same signal to each
• Scan clock = 1 kHz• A/D clock = 4 kHz
• Our four channels appear to have different phases even though we input the same signal to each
• Scan clock = 1 kHz• A/D clock = 4 kHz
120
-120
-100
-80
-60
-40
-20
0
20
40
60
80
100
10m0 1m 2m 3m 4m 5m 6m 7m 8m 9m
Analog In
Chan. 0
Chan. 1
Chan. 2
Chan. 3
ni.comni.com
Relative Phase Responses: SkewRelative Phase Responses: Skew
• 4 channels
• Scan clock = 1 kHz
• A/D clock = 16 kHz (over-sampled 4X)
• 4 channels
• Scan clock = 1 kHz
• A/D clock = 16 kHz (over-sampled 4X)
35
-5
0
5
10
15
20
25
30
5000 25 50 75 100 125 150 175 200 225 250 275 300 325 350 375 400 425 450 475
Chan. 0
Chan. 1
Chan. 2
Chan. 3
Hz
Degrees
ni.comni.com
Additional Time Domain ConsiderationsAdditional Time Domain Considerations
• analog to digital converter– High resolution– Built-in anti-aliasing filters– Suited for sound and vibration measurements
• Simultaneous sampling and triggering– Phase relationship between signals
• Programmable gain
• Overload detection
• analog to digital converter– High resolution– Built-in anti-aliasing filters– Suited for sound and vibration measurements
• Simultaneous sampling and triggering– Phase relationship between signals
• Programmable gain
• Overload detection
ni.comni.com
Time Domain ConsiderationsSmoothing WindowsTime Domain ConsiderationsSmoothing Windows
Nonintegral number of cyclesNonintegral number of cycles
• Reduces spectral leakage• Window selection depends on the application• PC Based instruments greatly facilitate transient
analysis
• Reduces spectral leakage• Window selection depends on the application• PC Based instruments greatly facilitate transient
analysis
No windowing
Windowing
Window
ni.comni.com
Time vs Frequency DomainTime vs Frequency Domain
ni.comni.com
Sample TimeDomain SignalSample Time
Domain Signal
FFTFFT
Anti-Alias Filter
Anti-Alias Filter
OctaveOctave
Acquire WaveformAcquire
Waveform
Basics of Frequency MeasurementsBasics of Frequency Measurements
SignalConditioning
SignalConditioning
FrequencyAnalysis
FrequencyAnalysis
ni.comni.com
Frequency Domain AnalysisFrequency Domain Analysis
• FFT analysis
• Octave analysis
• Swept sine analysis
• FFT analysis
• Octave analysis
• Swept sine analysis
ni.comni.com
FFT AnalysisFFT Analysis
• Time domain in discrete values Use Discrete Fourier Transform (DFT)
• Fast Fourier Transform (FFT)Optimized version of DFT
• Highest frequency that can be analyzed
• Frequency resolution
• Time domain in discrete values Use Discrete Fourier Transform (DFT)
• Fast Fourier Transform (FFT)Optimized version of DFT
• Highest frequency that can be analyzed
• Frequency resolution
2maxsfF fs : sampling frequencyfs : sampling frequency
N
f
Tf s
1 T : total acquisition time
N : FFT block size
T : total acquisition time
N : FFT block size
ni.comni.com
FFT AnalysisFFT Analysis
• FFT gives magnitude and phase information– Magnitude = sqrt(Real^2 + Imag^2)– Phase = Tan-1(Imag / Real)
• Power Spectrum reflects the energy content– Power Spectrum = Mag^2
• Applications• Vibration analysis• Structural dynamics testing• Preventative maintenance• Shock testing
• FFT gives magnitude and phase information– Magnitude = sqrt(Real^2 + Imag^2)– Phase = Tan-1(Imag / Real)
• Power Spectrum reflects the energy content– Power Spectrum = Mag^2
• Applications• Vibration analysis• Structural dynamics testing• Preventative maintenance• Shock testing
ni.comni.com
• Concentrates (“zooms”) FFT on a narrow band of frequencies
• Improves frequency resolution
• Distinguishes between closely-spaced frequencies
• Baseband analysis requires longer acquisition time for better resolution – requires more computation
• Concentrates (“zooms”) FFT on a narrow band of frequencies
• Improves frequency resolution
• Distinguishes between closely-spaced frequencies
• Baseband analysis requires longer acquisition time for better resolution – requires more computation
Zoom FFT AnalysisZoom FFT Analysis
ni.comni.com
Zoom FFT AnalysisZoom FFT Analysis
Baseband FFT AnalysisBaseband FFT Analysis
Zoom FFTAnalysis
Zoom FFTAnalysis
ni.comni.com
Octave AnalysisOctave Analysis
• Analysis performed through a parallel bank of bandpass filters– One octave corresponds to the doubling of the
frequency– Reference frequency is 1 kHz (audio domain)
• Analysis performed through a parallel bank of bandpass filters– One octave corresponds to the doubling of the
frequency– Reference frequency is 1 kHz (audio domain)
ff/2f/4 4 f2 f
1 octave
F
A
0220 Hz220 Hz 440 Hz440 Hz 880 Hz880 HzAA AAAA
ni.comni.com
Octave AnalysisOctave Analysis
• Octave analysis gives log-spaced frequency information– Similar to human perception of sound
– 1/1, 1/3, 1/12, and 1/24 octave analysis
• FFT gives linearly-spaced frequency information
• Applications – noise emissions testing
– acoustic intensity measurement
– sound power measurement
– audio equalization
• Octave analysis gives log-spaced frequency information– Similar to human perception of sound
– 1/1, 1/3, 1/12, and 1/24 octave analysis
• FFT gives linearly-spaced frequency information
• Applications – noise emissions testing
– acoustic intensity measurement
– sound power measurement
– audio equalization
ni.comni.com
Swept Sine AnalysisSwept Sine Analysis
• Source steps through a range of frequencies
• Analyzer measures frequency amplitude and phase at each step
• Non-FFT based
• Source steps through a range of frequencies
• Analyzer measures frequency amplitude and phase at each step
• Non-FFT based
Source
Device
Under Test
FrequencyResponse
ni.comni.com
Auto-ranging: dynamic range optimized at each frequency• Adjust source amplitude• Adjust input range• Both improve dynamic range at particular frequencies
– Can get 140 dB effective dynamic range
Auto-ranging: dynamic range optimized at each frequency• Adjust source amplitude• Adjust input range• Both improve dynamic range at particular frequencies
– Can get 140 dB effective dynamic range
Swept Sine AnalysisSwept Sine Analysis
Gain
Chan A
Gain
Chan BSource Channel B
Channel A
ni.comni.com
Swept Sine AnalysisSwept Sine Analysis
• Auto-resolution– Sweep optimized - more time at lower frequencies,
less time at higher– Increases frequency resolution on rapidly changing
responses
• Applications– Speaker testing– Cell phone testing– Electronic equipment characterization
• Auto-resolution– Sweep optimized - more time at lower frequencies,
less time at higher– Increases frequency resolution on rapidly changing
responses
• Applications– Speaker testing– Cell phone testing– Electronic equipment characterization
ni.comni.com
Comparison of Frequency Analysis MethodsComparison of Frequency Analysis Methods
• FFT analysis– Very fast– Linear frequency scale– Based on discrete Fourier transform
• Octave analysis– Logarithmic frequency scale– Set of filters dividing frequency into bands– Similar to how human ear perceives sound
• Swept sine analysis– Good dynamic range– Source and analyzer step across frequency range – Slower response
• FFT analysis– Very fast– Linear frequency scale– Based on discrete Fourier transform
• Octave analysis– Logarithmic frequency scale– Set of filters dividing frequency into bands– Similar to how human ear perceives sound
• Swept sine analysis– Good dynamic range– Source and analyzer step across frequency range – Slower response
ni.comni.com
Next LectureNext Lecture
• Output signals
• Servo-control systems
• Output signals
• Servo-control systems