You are on page 1of 49

# Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

Introduction Digital Signals: Sampling, Digitizing, ADC, Multiplexer Fourier Transform, FFT
Aliasing Leakage Windowing Averaging

Coherence Correlation
2

## Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

## The Fourier Transform

The transformation from the time domain to the frequency domain is based on forward Fourier Transform
X ( ) =

x(t )e it dt

and back again to time domain from the frequency domain is based on inverse Fourier Transform
1 x(t ) = 2

X ( )e it d
6

## Discrete Fourier Transform

To compute Fourier Transform digitally Instead of getting continuous function, we get discrete values of the FT
continuous discrete
j 2ft

Sx ( f ) =

x(t )e

dt

T Sx(mf ) = N

n =0

N 1

x(nt )e
2nk N

2mn N

x(t ) =

S x ( f )e j 2ft d

x ( n) =

k =0

N 1

F ( k )e

where, m = 0, 1, 2, 3,.

## Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

Digitization
N2 Multipln Vs N log2 N

FT / FFT requires digitized samples of the input for its digital calculations

HOW MANY NUMBER OF LINES?? FFT Transforms these N equally spaced samples to N/2 equally spaced lines in 9 the Frequency Domain

## Spacing of lines ???

Maximum measurable frequency

f max =

## N 1 * 2 Period of Time Record 1

Period of Time Record

= f

## This f is also the spacing between the lines of frequency spectrum

To increase the frequency range of our measurement, sample at faster rate, so that for same number of lines (N), shorter period of time record

fs fi = i N

where, i=0,1,2,,N/2

e.g., if sampling frequency fs is 5000Hz, for time record of N=4096 samples, frequency lines are at 10 0Hz, 1.22Hz, 2.44Hz, 3.66Hz,..,2500Hz

Digitizing
Processing FFT Processor Software (eg. LabView)

## Sampler & ADC Input Voltage

Display

High Resolution and Linearity For 70dB dynamic range, 12 bit resolution required

11

## Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

12

Resolution

The resolution of Data Acquisition Board with n-bit resolution is Resolution = Range/2n e.g. for 5Volts range with 12-bit system, we get a resolution of 10/212=2.44mV, whereas with 16-bit boards, for the same range, we get a resolution of 0.1528mV

13

## Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

14

## Sampling and Digitization

ADC Multiplexer (MUX) Input Analog Signal Programmable Gain Amplifier (PGA) Sample ADC Conversion & Hold Circuitry Output Circuitry Digital Signal

Digitization conversion rate depends on Channel switching time for the multiplexer (single/multichannel rate) Gain value of the PGA Time required at ADC for conversion
15

Problems of Sampling

Two signals are said to alias if the difference of their frequencies fall in the frequency range of interest

16

Effect of Undersampling

17

## Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

18

## How to take care of Aliasing

If input frequency in signal fin is higher than sampling frequency fs, a low alias frequency (= fin- fs) is generated

19

## Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

20

Anti-Alias Filter
In practice, input signal may contain some spurious unknown frequencies that are greater than fs A low pass filter (Anti-Alias Filter) after the sampler that filters all f above fmax followed by sampling @ fs>2*fmax, will avoid aliasing Minimum Sample Rate requirement is called Nyquist Criterion that is stated as, fs2*fmax

21

22

Time Record

23

Time Record

24

## Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

25

Windowing

Windowing helps FFT ignore the discontinuities at the ends and concentrate at the middle

26

27

## Types of Windowing Function

Hanning Window
Commonly used for most signals (periodic and random)

Uniform Window
Weighs all of the time record uniformly Used for transient signals

Flattop Window
To take care of rounded top of the Hanning window Used where accurate amplitude is essential But at the cost of frequency resolution

28

## Other Windowing Function

Hamming Blackman Extra Blackman Blackman Harris Triangle Cosine Tapered , etc

29

## Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

30

Averaging In practice, signals are mix of deterministic component and noise component Desired signal is to be separated/extracted from significant level of noise Averaging: RMS Averaging, Linear Averaging
RMS Averaging:
x RMS 1 2 = x (t )dt T 0
31
T

Linear Averaging
Synchronizing signal reqd.
Several time records added to reduce noise effects The more averages we take, the closer the noise comes to zero and we keep improving the signal to noise ratio

32

## Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

33

## Real Time Bandwidth Real Time Operation:

Time Record 1 Time Record 2 Time Record 3

FFT 1

FFT 2

Recall that

f max =

## N 1 * 2 Period of Time Record

34

The frequency span where the time record is equal to the FFT computation time is called Real Time Bandwidth

## Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

35

Coherence
Measure of Linearity

Measures power in the response that is caused by the power in the input/reference It is the output power that is coherent with input power Coherence value ranges between 0 and 1 1 : All the o/p power at a freq. is caused by the input 0 : no o/p power is due to input

(f)=
2 xy

Gxy ( f )

Gxx ( f )G yy ( f )

## Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

37

Correlation Coefficient

38

Correlation
Correlation is a measure of the similarity between two quantities (vibration waveforms/signals)
correlation coefficient is a normalized measure of the strength of the linear Autocorrelation: similarity between a relationship between two variables. signal and time-shifted version of itself

Rxx ( ) = Lim

1 T T

f x (t ) f x (t + )dt

* Rxx ( ) = F 1 S x ( f ) S x ( f )

39

## Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

40

Auto Correlation

## Autocorrelation Function as a function of time shift

41

Correlation
Detection of periodicity (mostly desired signal) buried in Noise.

Noise

Sine Wave

Important difference between autocorrelation and averaging is that synchronizing trigger is not required for the former Hence useful in Signal identification problems like Radio astronomy and passive 42 sonar

## Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

43

## Cross Correlation Cross Correlation Function

To determine to what extent a signal measured at one point originates from a particular source, and with what time delay. To detect the existence of a signal (not necessarily periodic) buried in extraneous noise

## Cross Power Spectrum

frequency transform of the cross correlation function Used for measurement of Transfer Function

Gxy ( f ) = F ( Rxy ( ) ) = S x ( f ) S * ( f ) y
44

Cross Correlation
Measure of similarity between two different non-identical signals is cross correlation function The cross correlation can be used to detect the presence of one signal in another signal. If the same signal is buried in both the waveforms, it will be reinforced in the cross correlation function, whereas the noise which is uncorrelated will be reduced Practical Examples: Radar, Active Sonar, Room Acoustics, Transmission Path Delays, in which input stimulus can be measured and used to remove contaminating noise from the response by cross correlation The frequency transform of the cross correlation function is Cross Power Spectrum 45

Cross Correlation

46

## Digital Signal Processing

Topics: Introduction Conversion form Time to Frequency Domain Typical Spectrum Examples The Fourier Transform Discrete Fourier Transform Digitization Spacing of Lines Resolution Sampling and Digitization Problems of Sampling Effect of Undersampling How to take care of Aliasing Anti-Alias Filter Windowing Averaging Real Time Bandwidth Coherence Correlation Coefficient Auto Correlation Cross Correlation Transfer Function

47

Transfer Function

Defined as the complex ratio of the output to the input of the system as a function of frequency
* S y ( f ) S x ( f ) G yx ( f ) H( f ) = = * * = S x ( f ) S x ( f ) S x ( f ) Gxx ( f )

Sy ( f )

Impulse Response
h(t ) = F
1

[ H ( f )]
48

Acknowledgements

Contents for some of the slides of the presentation have been taken from HP Application Notes from M/s Hewlett Packard

49