CHAPTER V Discrete Sampling and Analysis of Time Varying Signals

advertisement
Chapter V – Discrete Sampling and Analysis of Time Varying Signals
CHAPTER V
Discrete Sampling and Analysis of Time
Varying Signals
After acquiring a signal using a data acquisition card (A/D convertor), the signal is not
analog (continuous) anymore. Digitalizing the signal means that only discrete values of
the signal are known. The question is for a specific signal what is the minimum number
of points required to correctly represent the original signal?
V.1. Sampling rate theorem
Definition: The sampling rate is the rate at which measurements are made.
An inappropriate choice of the sampling rate may lead to a wrong representation of the
actual signal.
Figure 5.1. A 10 Hz sine wave.
Figure 5.2. A 10 Hz sine wave sampled at rate of 5 Hz (This is the case if the sampling rate is an integer
fraction of the base frequency (fm): fm; fm/2; fm/3, … ).
Instrumentation and Measurements \ LK\ 2009
40
Chapter V – Discrete Sampling and Analysis of Time Varying Signals
Figure 5.3. A 10 Hz sine wave sampled at a rate of 11 Hz (the resulting 1 Hz signal corresponds to 11 Hz –
10 Hz).
Figure 5.4. A 10 Hz sine wave sampled at a rate of 18 Hz (the resulting apparent frequency is 8 Hz).
Definition: Aliases are artifacts of sampling process leading to a false frequency representation of the input
signal.
Figure 5.5. A 10 Hz sine wave sampled at a rate of 20.1 Hz.
Instrumentation and Measurements \ LK\ 2009
41
Chapter V – Discrete Sampling and Analysis of Time Varying Signals
Sample rate theorem (Nyquist-Shannon theorem)
In order to reconstruct a signal correctly: “Sampling rate ( f s ) must be greater than twice the highest
frequency component ( f m ) of the original signal”
fs > 2 fm
The problem with a simple application of the sampling rate theorem is that the
representation of the original signal will not be unique. For example: the signal above (10
Hz sine wave) can be generated with a 30.1 Hz. This problem can be avoided by filtering
at frequencies higher than 2 f m .
- Folding diagram
A folding diagram can be used to determine the lowest alias frequency knowing the
sampled frequency ( f m ), the sampling frequency ( f s ) and the folding frequency
f
( f N = s ).
2
Figure 5.6. Folding diagram.
Example
Compute the lowest alias frequency for f m =100 Hz and f s =70 Hz.
Instrumentation and Measurements \ LK\ 2009
42
Chapter V – Discrete Sampling and Analysis of Time Varying Signals
V.2. Spectral analysis of time varying signals
Spectral analysis means determining all the frequencies that exist in a specific signal
(usually a complex signal).
Why do you need a
spectral analysis?
Before starting the
experiments
After getting the
results
- To determine the
sampling rate.
- Post-processing
data to get the
frequencies
that
characterize
the
system.
- To determine the
frequency response
of a transducer.
Spectral analysis using Fourier-series analysis
f (t ) = a0 + a1 cos ω0t + a2 cos 2ω0t + ... + an cos nω0t + b1 sin ω0t + b2 sin 2ω0t + ... + bn sin nω0t
Where ω0 is the angular frequency ( 2πf 0 ) corresponding to the fundamental or
harmonic frequency f 0 .
T
1
And a0 = ∫ f (t )dt ;
T0
T represents the period f 0 =
1
and a0 will give the average value.
T
T
2
an = ∫ f (t ) cos nω0t dt
T0
T
2
bn = ∫ f (t ) sin nω0t dt
T0
Instrumentation and Measurements \ LK\ 2009
43
Chapter V – Discrete Sampling and Analysis of Time Varying Signals
Figure 5.7. (left) Amplitude of harmonics for a sawtooth waveform; (right) Reconstruction of the signal
using 3 harmonics.
One apparent problem of spectral analysis using Fourier series is that it is only
applicable to period functions. This can be however avoided by duplicating the function.
Example
Find the Fourier series of the function:
f ( x) = x for − π < x < π
Instrumentation and Measurements \ LK\ 2009
44
Download