Kate Allstadt s final project for ESS522 June 10, The Hilbert transform is the convolution of the function f(t) with the kernel (- πt) - 1.

Similar documents
Principles of Communications ECS 332

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

Lecture 3, Multirate Signal Processing

Section 5.2 Graphs of the Sine and Cosine Functions

Lecture 3 Complex Exponential Signals

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

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

Problem Set 1 (Solutions are due Mon )

EE 215 Semester Project SPECTRAL ANALYSIS USING FOURIER TRANSFORM

DFT: Discrete Fourier Transform & Linear Signal Processing

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

Sinusoids. Lecture #2 Chapter 2. BME 310 Biomedical Computing - J.Schesser

Chapter 3: Analog Modulation Cengage Learning Engineering. All Rights Reserved.

CHAPTER 6 INTRODUCTION TO SYSTEM IDENTIFICATION

ENSC327 Communication Systems Fall 2011 Assignment #1 Due Wednesday, Sept. 28, 4:00 pm

DIGITAL SIGNAL PROCESSING CCC-INAOE AUTUMN 2015

Frequency Division Multiplexing Spring 2011 Lecture #14. Sinusoids and LTI Systems. Periodic Sequences. x[n] = x[n + N]

ESE 150 Lab 04: The Discrete Fourier Transform (DFT)

LABORATORY - FREQUENCY ANALYSIS OF DISCRETE-TIME SIGNALS

Fourier and Wavelets

Lecture notes on Waves/Spectra Noise, Correlations and.

Fourier Signal Analysis

Discrete Fourier Transform (DFT)

ESE 150 Lab 04: The Discrete Fourier Transform (DFT)

Phase demodulation using the Hilbert transform in the frequency domain

Lab S-7: Spectrograms of AM and FM Signals. 2. Study the frequency resolution of the spectrogram for two closely spaced sinusoids.

Lecture 2: SIGNALS. 1 st semester By: Elham Sunbu

Understanding Digital Signal Processing

5.3-The Graphs of the Sine and Cosine Functions

Signals. Periodic vs. Aperiodic. Signals

Phase demodulation using the Hilbert transform in the frequency domain

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering. EIE2106 Signal and System Analysis Lab 2 Fourier series

ECE 201: Introduction to Signal Analysis

Algebra and Trig. I. The graph of

Armstrong Atlantic State University Engineering Studies MATLAB Marina Sound Processing Primer

+ 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.

Topic 2. Signal Processing Review. (Some slides are adapted from Bryan Pardo s course slides on Machine Perception of Music)

DSP First. Laboratory Exercise #7. Everyday Sinusoidal Signals

Laboratory Assignment 4. Fourier Sound Synthesis

TRANSFORMS / WAVELETS

Project: Yukti Aggarwal

ELECTRONOTES APPLICATION NOTE NO Hanshaw Road Ithaca, NY Nov 7, 2014 MORE CONCERNING NON-FLAT RANDOM FFT

Communication Engineering Prof. Surendra Prasad Department of Electrical Engineering Indian Institute of Technology, Delhi

How to Graph Trigonometric Functions

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

THE SINUSOIDAL WAVEFORM

Complex Sounds. Reading: Yost Ch. 4

Lab 8. Signal Analysis Using Matlab Simulink

INDEX TO SERIES OF TUTORIALS TO WAVELET TRANSFORM BY ROBI POLIKAR THE ENGINEER'S ULTIMATE GUIDE TO WAVELET ANALYSIS ROBI POLIKAR

Final Exam Practice Questions for Music 421, with Solutions

Introduction to Wavelets Michael Phipps Vallary Bhopatkar

Digital Processing of Continuous-Time Signals

Figure 1: Block diagram of Digital signal processing

Digital Processing of

ELT COMMUNICATION THEORY

FFT analysis in practice

Reading: Johnson Ch , Ch.5.5 (today); Liljencrants & Lindblom; Stevens (Tues) reminder: no class on Thursday.

Low wavenumber reflectors

6.02 Practice Problems: Modulation & Demodulation

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Signal Processing. Introduction

Chapter 7 Repetitive Change: Cyclic Functions

Instruction Manual for Concept Simulators. Signals and Systems. M. J. Roberts

Other Modulation Techniques - CAP, QAM, DMT

3/15/2010. Distance Distance along the ground (km) Time, (sec)

Signal Analysis. Young Won Lim 2/10/18

Log Booklet for EE2 Experiments

FIR/Convolution. Visulalizing the convolution sum. Convolution

Lab P-4: AM and FM Sinusoidal Signals. We have spent a lot of time learning about the properties of sinusoidal waveforms of the form: ) X

Timbral Distortion in Inverse FFT Synthesis

Reference Manual SPECTRUM. Signal Processing for Experimental Chemistry Teaching and Research / University of Maryland

FIR/Convolution. Visulalizing the convolution sum. Frequency-Domain (Fast) Convolution

CS 591 S1 Midterm Exam Solution

SIGNALS AND SYSTEMS LABORATORY 13: Digital Communication

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

EECE 301 Signals & Systems Prof. Mark Fowler

Reference: PMU Data Event Detection

Swedish College of Engineering and Technology Rahim Yar Khan

College of information Technology Department of Information Networks Telecommunication & Networking I Chapter DATA AND SIGNALS 1 من 42

Fourier transforms, SIM

EEL 4350 Principles of Communication Project 2 Due Tuesday, February 10 at the Beginning of Class

Basic Signals and Systems

Time-Frequency analysis of biophysical time series

ECEGR Lab #8: Introduction to Simulink

DSP First Lab 03: AM and FM Sinusoidal Signals. We have spent a lot of time learning about the properties of sinusoidal waveforms of the form: k=1

Signal Analysis. Young Won Lim 2/9/18

Sound synthesis with Pure Data

Sampling and Reconstruction of Analog Signals

WP 33 Geophysikalische Datenanalyse

5.1 Graphing Sine and Cosine Functions.notebook. Chapter 5: Trigonometric Functions and Graphs

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems.

A Dissertation Presented for the Doctor of Philosophy Degree. The University of Memphis

Digital Video and Audio Processing. Winter term 2002/ 2003 Computer-based exercises

Theory of Telecommunications Networks

THE CITADEL THE MILITARY COLLEGE OF SOUTH CAROLINA. Department of Electrical and Computer Engineering. ELEC 423 Digital Signal Processing

2009 A-level Maths Tutor All Rights Reserved

Chapter 2 Channel Equalization

Section 5.2 Graphs of the Sine and Cosine Functions

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

06: Thinking in Frequencies. CS 5840: Computer Vision Instructor: Jonathan Ventura

Transcription:

Hilbert Transforms Signal envelopes, Instantaneous amplitude and instantaneous frequency! Kate Allstadt s final project for ESS522 June 10, 2010 The Hilbert transform is a useful way of looking at an evenly sampled signal. It is used to obtain the analytic signal - a complex signal from which the negative frequencies have been removed. The advantage of using this complex analytic signal over the original signal is that it separates the amplitude information from the frequency information. The amplitude information is represented by the signal envelope, which gives the overall shape of a signal. The frequency portion gives the instantaneous frequency at any given time, this is essentially the mean frequency at that point. The math The Hilbert transform is the convolution of the function f(t) with the kernel (- πt) - 1. This can be written as: H[ f (t)] = 1 πt * f (t) = 1 π f (τ)dτ τ t (because convolution is c(t) = a(t) * b(t) = a(τ)b(t τ)dτ and it is communative.) Because (- πt) - 1 goes to infinity at t=0, this integral is not solvable for a finite value this can be solved by removing an infinitesimal slice of the function centered at the singularity by using the Cauchy principal value, denoted by P: [ ] = 1 π P f (τ)dτ H f (t) Since convolution in the time domain is multiplication in the frequency domain, an easier way to grasp this is to go to the frequency domain. The fourier transform of the kernel function (- πt) - 1 is the signum (sgn) function times I = isgn(f). This is equal to +i for negative frequencies and i for negative frequencies. See Figure 2: τ t Figure 1 Showing the Kernel function (-π x) -1 at left, and its fourier transform, i* the signum function From Bracewell (1965). 1

The amplitude of the signal in the frequency domain is not changed by this because the signum is just multiplying by 1. The phase, on the other hand, is shifted by π/2 for positive frequencies, and - π/2 for negative frequencies. The shift is π/2 because the i*sgn(s) function flips the signal a quarter of the way around the imaginary axis. This means that two Hilbert transforms will recover the negative of the original signal (because phase was shifted by ± π), and four Hilbert transforms will recover the original signal (because phase is shifted by ± 2π ). This is illustrated in the figure below from Bracewell (1965): Figure 2 The column at left is in the time domain, at right in frequency domain. Each successive plot downwards is a Hilbert transform Bracewell (1965). The analytic signal The important part of all this is that the Hilbert transform is used to compute the analytic signal from a real signal. The analytic signal is computed by subtracting i times the Hilbert transform of the function f(t) from the function itself: f a (t) = f (t) ih [ f (t)] The analytic signal fa(t) is a complex helical sequence with a real part - the original data - and an imaginary part - the Hilbert transform. Again, the Hilbert transform is simply the real signal with a 90- degree phase shift. This means that if the real part of the signal is sine, the imaginary part becomes cosine and vice versa. The analytic signal fa(t) can be used to get the envelope (instantaneous amplitude), the phase and the instantaneous frequency by the following formulas: 2

envelope = Re( f a (t)) 2 + Im( f a (t)) 2 phase = arctan(im( f a (t)) /Re( f a (t))) inst.freq = phase t The envelope will give the overall shape of the signal, only touching at maxima. It is representing the combined amplitude of all frequencies involved but removes the frequency information. The formula above will give the upper envelope, the negative of that formula will give the lower envelope. This is different from just taking the absolute value the absolute value will only give the envelope at maxima or minima, while the envelope obtained from the analytic signal will give the envelope at all times. We will explore this in the exercise. The phase will be a value that is always increasing (except if there are jumps in frequency content). Changes in slope represent changes in frequency. Sometimes this can be a clearer way to see changes than the instantaneous frequency, which will vary rapidly due to small changes in the phase. The instantaneous frequency will represent the mean frequency contained in the signal at a given time (in radians per time unit it must be adjusted to obtain Hz). The advantage of this over a spectrogram is that is gives a single value - in a spectrogram it is easier to see how frequency is changing with time, but it is difficult to quantify and takes longer to compute. The instantaneous frequency often must be smoothed to be clear because a tiny sharp jump in phase will cause a huge jump in instantaneous frequency, even if it is from an insignificant small magnitude portion of the signal, like in the noise before an earthquake. How to do this for discrete signals Matlab uses FFT to move into the frequency domain, sets the second half of fft(x) (not including the nyquist) equal to zero (which is essentially removing the redundant negative frequency information). It then doubles the positive frequency and takes the IFFT of that to get the complex analytic signal. To get the envelope (instantaneous amplitude) we just need to take the magnitude of this signal sqrt(re^2+im^2). To get the phase, we just need to take the angle of the signal and unwrap it. The slope of the phase is the instantaneous frequency which can be obtained using the diff function. The reason that the analytic signal is equivalent to removing the negative frequencies and doubling the positive frequencies is illustrated on the last page of these notes. Examples Now we ll look at different types of seismic signals using the Hilbert transform. The following figures show what instantaneous amplitude, phase, and instantaneous frequency look like for different types of seismic events. Each plot also includes a spectrogram so we can better understand what the plots are showing us: 3

Figure 3 Broadband recording (horizonal component) in Washington state of the M8.8 Chile earthquake on Feb 27, 2010. Note the rapid change in phase when the P-waves arrive (~1050sec), and a lowering of the instantaneous frequency when the S-waves (~2800sec) and surface waves arrive (~2100sec Rayleigh, ~2600 Love?). Note that the inst. Freq. gradually increases again after the surface waves arrive, this is because surface waves are dispersive, lower frequencies arrive sooner than higher frequencies. 4

Figure 4 Local earthquake, M3.4 near Bellevue on May 25, 2010. Note that sudden high amplitude arrival of waves. This recording is from so close that the P and S waves are not distinguishable on this time scale. The slope of phase, and thus instantaneous frequency both decrease here showing that the earthquake has a lower average frequency than the ambient noise, particularly in the coda. 5

Figure 5 Mt Redoubt (near Anchorage, Alaska) volcanic eruption March 28, 2009. The actual eruption is the blast at about 3300 seconds, the noise before that is volcanic tremor which in this case had a strong fundamental frequency and higher modes and these actually increased in frequency approaching the eruption (gliding spectral lines their cause is still being investigated). This is apparent in the phase, which swoops upwards as the average frequency increases. This is represented as a linear increase in instantaneous frequency. Then, right before the eruption, frequency rapidly increases, then all is quiet for a few seconds the inst frequency drops way down, (very noticeable on the envelope) and then the blast occurs at lower frequencies. 6

Figure 6 Main event of Nile Valley Landslide near Naches, WA, Oct 11, 2009. This signal was recorded 12km away from the slide so it is not very strong, but the increase in noise between 0 and 10Hz is noticeable, particularly at 5Hz, which is probably due to a site amplification where the station is located. Note that the envelope shows that this event has an emergent onset, unlike the earthquakes which had sudden arrivals. This entire signal is dominated by the 5Hz amplification, so the instantaneous frequency is rather flat at 5Hz. As the amplitude of the 5Hz signal increases around 700seconds as the landsliding intensifies, the instantaneous frequency is more dominated by 5Hz. The higher frequency blip is due to local noise on the station, not due to the landslide, it clearly stands out in the instantaneous frequency. 7

Exercise (exercisek.m) A) What is the envelope of a sine wave? What do phase and instantaneous frequency look like? Construct a sine wave with a frequency of 1Hz that lasts for 5 seconds with a sample interval of 0.01 seconds: t=0:0.01:5-0.01; %subtract one sample so there is no jump xr=sin(1*2*pi*t); %1Hz sine wave plot(t,xr) hold on get the analytic signal (use function hilbert if have signal processing toolbox, otherwise follow these steps) xf=fft(xr); %take fft of sine wave half=ceil(length(xf)/2); %find the halfway point of the vector xf(half+1:end)=0; %set repeated part of FT to zero xf=2*xf; %double the amplitude of the freq. domain signal x=ifft(xf); take ifft to go back to time domain Now plot the envelope (a.k.a. instantaneous amplitude), what is the envelope of a sine? hilbx=sqrt(real(x).^2+imag(x).^2); %take magnitude of signal to get envelope plot(t,hilbx,'r'); %upper envelope hold off Now plot the phase phase1=unwrap(angle(x)); %get phase angle and unwrap so it plots as always increasing instead of repeating every 2pi plot(t,phase1) ylabel('radians') title('phase') Take the derivative of the phase to get the instantaneous frequency normalize by the sample interval and 2*pi to get to Hz (because the slope is in units of radians per sample). deriv=(diff(phase1)/0.01)/(2*pi); plot(t(1:end-1),deriv,'k') B) Same thing but with a real signal. How is envelope different from absolute value of signal? Now we will work with a real signal composed of ambient noise recorded at a seismometer. This is saved as signal.mat, it has a sampling rate of 100Hz. 8

First plot the signal and its upper and lower envelopes. Zoom in and look around. Also plot the phase and instantaneous frequency. Apply a lowpass filter to the instantaneous frequency to eliminate outlying spikes. Now replot the original signal, but this time take the absolute value. Plot the upper envelope over this, zoom in and look around and comment on the differences. The end. References Bracewell, R. (1965). The Fourier Transform and Its Applications. McGrawHill: New York, p.268-272. Farnbach, J.S. (1975). The Complex Envelope in Seismic Signal Analysis. Bull. of Seis. Soc. of America: v.65, p951-962. King, F. (2009). Hilbert Transforms, Volume I. Cambridge University Press: Cambridge. p.??? Matlab help section 9