Post-processing using Matlab (Advanced)!

Similar documents
Discrete Fourier Transform (DFT)

Fourier Signal Analysis

Fourier and Wavelets

Lab 8. Signal Analysis Using Matlab Simulink

The Discrete Fourier Transform. Claudia Feregrino-Uribe, Alicia Morales-Reyes Original material: Dr. René Cumplido

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

ME scope Application Note 01 The FFT, Leakage, and Windowing

EE 215 Semester Project SPECTRAL ANALYSIS USING FOURIER TRANSFORM

Signal segmentation and waveform characterization. Biosignal processing, S Autumn 2012

Chapter 5. Signal Analysis. 5.1 Denoising fiber optic sensor signal

Frequency Domain Representation of Signals

WAVELETS: BEYOND COMPARISON - D. L. FUGAL

Introduction to Wavelets. For sensor data processing

Removal of Line Noise Component from EEG Signal

Noise Measurements Using a Teledyne LeCroy Oscilloscope

Introduction to Wavelet Transform. Chapter 7 Instructor: Hossein Pourghassem

2.1 BASIC CONCEPTS Basic Operations on Signals Time Shifting. Figure 2.2 Time shifting of a signal. Time Reversal.

G(f ) = g(t) dt. e i2πft. = cos(2πf t) + i sin(2πf t)

Time Series/Data Processing and Analysis (MATH 587/GEOP 505)

2015 HBM ncode Products User Group Meeting

6.555 Lab1: The Electrocardiogram

Laboratory Experiment #1 Introduction to Spectral Analysis

Broadband Signal Enhancement of Seismic Array Data: Application to Long-period Surface Waves and High-frequency Wavefields

Fourier Methods of Spectral Estimation

Digital Image Processing

Spur Detection, Analysis and Removal Stable32 W.J. Riley Hamilton Technical Services

FFT 1 /n octave analysis wavelet

ARM BASED WAVELET TRANSFORM IMPLEMENTATION FOR EMBEDDED SYSTEM APPLİCATİONS

21/01/2014. Fundamentals of the analysis of neuronal oscillations. Separating sources

+ a(t) exp( 2πif t)dt (1.1) In order to go back to the independent variable t, we define the inverse transform as: + A(f) exp(2πif t)df (1.

(i) Understanding the basic concepts of signal modeling, correlation, maximum likelihood estimation, least squares and iterative numerical methods

EE 422G - Signals and Systems Laboratory

Understanding Digital Signal Processing

PART II Practical problems in the spectral analysis of speech signals

ELECTROMYOGRAPHY UNIT-4

Fourier Transform. Any signal can be expressed as a linear combination of a bunch of sine gratings of different frequency Amplitude Phase

Topic 6. The Digital Fourier Transform. (Based, in part, on The Scientist and Engineer's Guide to Digital Signal Processing by Steven Smith)

LABORATORY - FREQUENCY ANALYSIS OF DISCRETE-TIME SIGNALS

Ensemble Empirical Mode Decomposition: An adaptive method for noise reduction

Lecture 3 Complex Exponential Signals

Time-Frequency Analysis of Shock and Vibration Measurements Using Wavelet Transforms

WAVELET TRANSFORM BASED METHOD FOR EDDY CURRENT TESTING OF CLADDING TUBES

Introduction. Chapter Time-Varying Signals

International Journal of Digital Application & Contemporary research Website: (Volume 1, Issue 7, February 2013)

Wavelet Transform. From C. Valens article, A Really Friendly Guide to Wavelets, 1999

TRANSFORMS / WAVELETS

Vibroseis Correlation An Example of Digital Signal Processing (L. Braile, Purdue University, SAGE; April, 2001; revised August, 2004, May, 2007)

Enhancement of Speech Signal by Adaptation of Scales and Thresholds of Bionic Wavelet Transform Coefficients

Contents. Introduction 1 1 Suggested Reading 2 2 Equipment and Software Tools 2 3 Experiment 2

Forced Oscillation Detection Fundamentals Fundamentals of Forced Oscillation Detection

How to implement SRS test without data measured?

Wavelet Analysis of Crude Oil Futures. Collection Editor: Ian Akash Morrison

Introduction to Wavelets Michael Phipps Vallary Bhopatkar

Signal Processing. Naureen Ghani. December 9, 2017

Railscan: A Tool for the Detection and Quantification of Rail Corrugation

P. Robert, K. Kodera, S. Perraut, R. Gendrin, and C. de Villedary

Time-Frequency analysis of biophysical time series. Courtesy of Arnaud Delorme

Introduction to Signals and Systems Lecture #9 - Frequency Response. Guillaume Drion Academic year

Lecture notes on Waves/Spectra Noise, Correlations and.

The Scientist and Engineer's Guide to Digital Signal Processing By Steven W. Smith, Ph.D.

6 Sampling. Sampling. The principles of sampling, especially the benefits of coherent sampling

Discrete Fourier Transform, DFT Input: N time samples

Electrical & Computer Engineering Technology

Figure 1: The Penobscot Narrows Bridge in Maine, U.S.A. Figure 2: Arrangement of stay cables tested

Question 1 Draw a block diagram to illustrate how the data was acquired. Be sure to include important parameter values

DISCRETE FOURIER TRANSFORM AND FILTER DESIGN

Detection, localization, and classification of power quality disturbances using discrete wavelet transform technique

1. In the command window, type "help conv" and press [enter]. Read the information displayed.

EE 470 BIOMEDICAL SIGNALS AND SYSTEMS. Active Learning Exercises Part 2

Objectives. Abstract. This PRO Lesson will examine the Fast Fourier Transformation (FFT) as follows:

Presentation Outline. Advisors: Dr. In Soo Ahn Dr. Thomas L. Stewart. Team Members: Luke Vercimak Karl Weyeneth. Karl. Luke

Digital Signal Processing

Data Acquisition Systems. Signal DAQ System The Answer?

Aberehe Niguse Gebru ABSTRACT. Keywords Autocorrelation, MATLAB, Music education, Pitch Detection, Wavelet

APPLICATION OF DISCRETE WAVELET TRANSFORM TO FAULT DETECTION

N. Papadakis, N. Reynolds, C.Ramirez-Jimenez, M.Pharaoh

A Brief Introduction to the Discrete Fourier Transform and the Evaluation of System Transfer Functions

Original Research Articles

Coming to Grips with the Frequency Domain

SAMPLING THEORY. Representing continuous signals with discrete numbers

Implementation of SYMLET Wavelets to Removal of Gaussian Additive Noise from Speech Signal

ELT COMMUNICATION THEORY

CHAPTER 4 IMPLEMENTATION OF ADALINE IN MATLAB

Time-Frequency analysis of biophysical time series. Arnaud Delorme CERCO, CNRS, France & SCCN, UCSD, La Jolla, USA

Advanced Data Analysis Pattern Recognition & Neural Networks Software for Acoustic Emission Applications. Topic: Waveforms in Noesis

Performing the Spectrogram on the DSP Shield

Lab 4 Digital Scope and Spectrum Analyzer

Design of FIR Filter for Efficient Utilization of Speech Signal Akanksha. Raj 1 Arshiyanaz. Khateeb 2 Fakrunnisa.Balaganur 3

System analysis and signal processing

Reference: PMU Data Event Detection

Theory of Telecommunications Networks

Laboratory Assignment 4. Fourier Sound Synthesis

Analysis of Processing Parameters of GPS Signal Acquisition Scheme

Spectrum Analysis - Elektronikpraktikum

Efficacy of Wavelet Transform Techniques for. Denoising Polarized Target NMR Signals

ESA400 Electrochemical Signal Analyzer

Department of Electronic Engineering NED University of Engineering & Technology. LABORATORY WORKBOOK For the Course SIGNALS & SYSTEMS (TC-202)

Short-Time Fourier Transform and Its Inverse

WAVELET AND S-TRANSFORM BASED SPECTRUM SENSING IN COGNITIVE RADIO

EXPERIMENT 4 INTRODUCTION TO AMPLITUDE MODULATION SUBMITTED BY

Transcription:

OvGU! Vorlesung «Messtechnik»! Post-processing using Matlab (Advanced)! Dominique Thévenin! Lehrstuhl für Strömungsmechanik und Strömungstechnik (LSS)! thevenin@ovgu.de! 1

Noise filtering (1/2)! We have discussed the last time how to filter (random) noise! Execute again filternoise_demo.m! Considering a signal composed of the superposition of a sinus wave at frequency f1=1 Hz with amplitude A1, plus random noise with amplitude A2! Random noise is generated under Matlab using rand (value between 0 and 1)! 2

Noise filtering (2/2)! For random noise, something like h=h+a2*(rand(size (h))-0.5); Test different cut-off frequencies for your filter, from 50 down to 2 Hz for example! Test different amplitudes, for example! A1=2, A2=1: signal to noise amplitude = 4! A1=1, A2=2: signal to noise amplitude = 1 Observations?! 3

Understanding better filtering! Download and execute filter_demo.m Check the script to superpose signals with frequency of 1 Hz (f1) and 100 Hz (f2): Both frequencies are well separated (factor 100)! The signal looks like that: 4

Filtering (1/3)! One of the most useful application of FFT is filtering! You can decide freely which frequency domain should be filtered out!! Typically, you will use a low-pass filter, in order to remove «experimental noise». Noise is normally always located at high frequencies...! In our present example, we consider that «noise» is the signal at 100 Hz, while the signal at 1 Hz is the «information» that should be acquired...! 5

Filtering (2/3)! In order to filter the signal at a given frequency, it is necessary to set the corresponding part of the DFT H(f) to 0! But the DFT is imaginary...! Therefore, we must of course set to 0 both the real and the imaginary component!! Either separately (working on HR and HI)! or directly (working on H)! 6

Filtering (3/3)! low frequency! keep!! high frequency! suppress by filtering! 7

Script for filtering! Identify in your script the correct frequency domain (we decide: filtering everything from 50 Hz up to the Nyquist frequency)! Code the cut-off frequency in a flexible manner using a variable...! Set the corresponding part of the DFT to 0 (complex value)! Compute the inverse FFT using ifft, and look at the result, by comparison with the original signal!! 8

Energy Spectral Density (ESD)! The energy spectral density describes how the energy of a signal is distributed with frequency. It is nothing else than the square of the magnitude of the Fourier transform! 9

Power Spectral Density (PSD)! If the global mean value of a signal is not 0 and has not been removed, the ESD tends toward infinity for long sequences! Indeed, for such a case, it will become at some point even impossible to compute the DFT! As an alternative, it is still possible to compute the Power Spectral Density (PSD)! Physically, the computation of the PSD uses an overlapping segmentation of the original signal, followed by corresponding DFT computations and final re-assembling by averaging! 1! N! 10

Practical ESD/PSD computation! Relies on the complex script structure spectrum See help spectrum for more information! Several different methods have been coded to compute numerically a PSD! It will first be necessary to define an appropriate handle to receive the information, for example through! HWelch=spectrum.welch; Afterwards, the PSD of the time signal h(t) can be computed as! HPSD=psd(HWelch,h, Fs,f) PSD are only necessary for very long signals with a high level of noise: you should not encounter this too often at first...! 11

Practical PSD computation! h(t) h(kδt) h i (kδt) sampling segmentation DFT H i (kδf) 2 averaging PSD! 12

Script for PSD! Download and execute psd_demo.m! Considering a signal with a frequency of 10 Hz, plus noise! Code the cut-off frequency in a flexible manner using a variable. Choose then first for example 50 Hz.! Compare the efficiency of both methods (basic filtering, PSD determination)! Solution: psd_demo.m! 13

Where do we stand?! We know how to carry out frequency analysis and filtering Using DFT! Wavelet will be soon an alternative... But DFT can do even more! 14

Correlation! It is often essential to determine the correlation between two signals! This means: «how similar are the two signals, determined in a quantitative manner?»! The DFT can be used in an extremely efficient manner to determine this correlation based on a frequency analysis! This is in particular due to the mathematical property:! DFT(correlation between h(t) and g(t))=n H*(f) G(f)! Means: the DFT of the correlation is the product of the DFTs of the two signals, multiplied by the signal length (N)! As a consequence, it is sufficient to compute the individual DFTs to quantify the correlation!! 15

Normalizing the correlation! Obviously, the best possible correlation should be obtained for two identical signals! The general equation delivers in this case:! DFT(correlation between h(t) and h(t))=n H*(f) H(f)!!!!!= N H(f) 2! As a consequence, the definition of the normalized correlation (value between -1 and 1, with 0=no correlation at all) between a known, reference function h(t) and a test function g(t) becomes:! Cor(h(t),g(t))=iDFT(H*(f) G(f) / ( H(f) G(f) ))! 16

Script to compute correlation! Download and execute correl_demo.m! We will now introduce a second time signal g, identical in length and discretization to h, but containing different information! 17

Script to compute correlation! Test in particular:! g = h g = -h g = 2*h g = 2*h + 13 g = (5-2*h).^2 g = 1 g = h+a2*(rand(size(h))-0.5) with A2 from 0.005 to 0.5! Observations?! Solution: correl_demo.m! 18

Compute correlation in Matlab! As a direct alternative, Matlab allows also the computation of correlations using the function! corrcoef The information we need is contained outside of the diagonal! C(h1,h1) C(h2,h1)!C(h1,h2)!!C(h2,h2)! Implemented for comparison in your script (see help corrcoef for more information)! 19

Introducing Wavelets (1/2)! Wavelets have been defined in the 50s! as a complement to classical Fourier analysis! Why extend the Fourier analysis at all?! Drawback of FFT: by transformation, the time information is completely lost when obtaining the frequency spectrum! It is thus impossible to know at which time an event took place! A choice is needed: either time or frequency, not both!! 20

Introducing Wavelets (2/2)! If the signal does not change (in a statistical sense) with time, this is not a problem!! This was the case in all our examples up to now.! This covers also most simple applications, and 50% of more complex applications.! But when considering signals with drift, monotonous increase/decrease, abrupt changes, and near the boundaries of the time signal, changes in time become significant, and cannot be analyzed with FFT.! Time variations must then be taken into account!! 21

Short-time Fourier analysis! To solve this problem, D. Gabor introduced the short-time Fourier analysis! It is simply a DFT relying on windowing the signal! The window has a constant, user-defined size! We now have an analysis both in time and frequency! But using a constant-size window limits the possible resolution in both dimensions % 22

Wavelet analysis! As a final evolution, the wavelet analysis introduces windowing on variable-sized regions! Long window sizes are employed where accurate low-frequency information is required, shorter windows are used where highfrequency information is important.! We now have an analysis both in time and frequency (or scale)! With an optimally-adapted window size! 23

Advantage of Wavelet analysis! Wavelets can reveal aspects of data that DFT completely miss (trends, breakdown points, discontinuities, fractal nature...)! time point 100! wavelet fft time point 100! 24

Fourier analysis vs. Wavelet (1/2)! The Fourier analysis breaks up a signal into sine waves of various frequencies! The function «sin» is the basis function for decomposition! This function extends from - to +, and is thus not well suited for a local analysis! 25

Fourier analysis vs. Wavelet (2/2)! The Wavelet transform uses other basis functions, called wavelet functions! These wavelet functions are local in space! Different families of wavelet functions exist! The decomposition is then similar to FFT! 26

Scaling / shifting wavelet functions! Scaling! Shifting! 27

Understanding wavelet output! low f! Frequency=1/(time scale)! high f! Time-information is not lost!! 28

First hands-on: noisy signal! For this basic example, we use a pre-defined noisy signal of Matlab, comprising 1000 points with a sampling period of 1 («s»).! From Matlab, type! load noissin plot noissin 29

Wavelet analysis (1/2)! The wavelet analysis is realized with the instruction cwt (for Continuous Wavelet Transform)! From Matlab, type! c = cwt(noissin,1:48, db4 ) Wavelet basis function! (here Daubechies type 4)! scales to consider! signal to process! 30

Wavelet analysis (2/2)! The variable c contains the output of the wavelet analysis.! For a direct graphical representation, add a last flag! c = cwt(noissin,1:48, db4, plot ); 31

Choosing the scales! The choice of the scales is essential for the analysis! All scales must be real, positive, increasing and are bounded by the length of the signal. Try:! c = cwt(noissin,2:2:128, db4, plot ) Periodicity is now visible! (about 5 periods)! 32

Further 1D examples! Use the Wavelet GUI wavemenu Choose wavelet 1-D Load File/Example Analysis/Basic Signals Frequency Breakdown (2 different frequencies in time)! 33

Image processing! Use the Wavelet GUI wavemenu Choose SWT Denoising 2-D Load File/Example Analysis/Indexed Images Choose noisywoman Try to modify the parameters for a better result! 34