GG313 Lecture 23 Nov 15, 2005 Spectral Analysis 1.

Slides:



Advertisements
Similar presentations
Computer Vision Lecture 7: The Fourier Transform
Advertisements

Lecture 7: Basis Functions & Fourier Series
Lecture 15 Orthogonal Functions Fourier Series. LGA mean daily temperature time series is there a global warming signal?
Techniques in Signal and Data Processing CSC 508 Frequency Domain Analysis.
Fourier Transform (Chapter 4)
Frequency Domain The frequency domain
GG 313 Lecture 25 Transform Pairs and Convolution 11/22/05.
1 Chapter 16 Fourier Analysis with MATLAB Fourier analysis is the process of representing a function in terms of sinusoidal components. It is widely employed.
DFT/FFT and Wavelets ● Additive Synthesis demonstration (wave addition) ● Standard Definitions ● Computing the DFT and FFT ● Sine and cosine wave multiplication.
Intro to Spectral Analysis and Matlab. Time domain Seismogram - particle position over time Time Amplitude.
Fourier Transform – Chapter 13. Image space Cameras (regardless of wave lengths) create images in the spatial domain Pixels represent features (intensity,
Math Review with Matlab:
Review of Frequency Domain
Computer Graphics Recitation 6. 2 Motivation – Image compression What linear combination of 8x8 basis signals produces an 8x8 block in the image?
Deconstructing periodic driving voltages (or any functions) into their sinusoidal components: It's easy to build a periodic functions by choosing coefficients.
Fourier Analysis D. Gordon E. Robertson, PhD, FCSB School of Human Kinetics University of Ottawa.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
SAMPLING & ALIASING. OVERVIEW Periodic sampling, the process of representing a continuous signal with a sequence of discrete data values, pervades the.
CH#3 Fourier Series and Transform
Chapter 25 Nonsinusoidal Waveforms. 2 Waveforms Used in electronics except for sinusoidal Any periodic waveform may be expressed as –Sum of a series of.
ELEC ENG 4035 Communications IV1 School of Electrical & Electronic Engineering 1 Section 2: Frequency Domain Analysis Contents 2.1 Fourier Series 2.2 Fourier.
Vibrationdata 1 Unit 5 The Fourier Transform. Vibrationdata 2 Courtesy of Professor Alan M. Nathan, University of Illinois at Urbana-Champaign.
Where we’re going Speed, Storage Issues Frequency Space.
Lecture 1 Signals in the Time and Frequency Domains
Pegasus Lectures, Inc. COPYRIGHT 2006 Volume I Companion Presentation Frank R. Miele Pegasus Lectures, Inc. Ultrasound Physics & Instrumentation 4 th Edition.
GG 313 Lecture 26 11/29/05 Sampling Theorem Transfer Functions.
Motivation Music as a combination of sounds at different frequencies
FOURIER SERIES §Jean-Baptiste Fourier (France, ) proved that almost any period function can be represented as the sum of sinusoids with integrally.
The Story of Wavelets.
Fourier series. The frequency domain It is sometimes preferable to work in the frequency domain rather than time –Some mathematical operations are easier.
Fundamentals of Electric Circuits Chapter 17
CISE315 SaS, L171/16 Lecture 8: Basis Functions & Fourier Series 3. Basis functions: Concept of basis function. Fourier series representation of time functions.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 19.
Lecture 2 Signals and Systems (I)
Image Processing © 2002 R. C. Gonzalez & R. E. Woods Lecture 4 Image Enhancement in the Frequency Domain Lecture 4 Image Enhancement.
Spectral Analysis AOE March 2011 Lowe 1. Announcements Lectures on both Monday, March 28 th, and Wednesday, March 30 th. – Fracture Testing –
Module 2 SPECTRAL ANALYSIS OF COMMUNICATION SIGNAL.
Wireless and Mobile Computing Transmission Fundamentals Lecture 2.
111 Lecture 2 Signals and Systems (II) Principles of Communications Fall 2008 NCTU EE Tzu-Hsien Sang.
Fourier Series. Introduction Decompose a periodic input signal into primitive periodic components. A periodic sequence T2T3T t f(t)f(t)
Chapter 15 AC Fundamentals.
Vibrationdata 1 Unit 5 The Fourier Transform. Vibrationdata 2 Courtesy of Professor Alan M. Nathan, University of Illinois at Urbana-Champaign.
Digital Image Processing Chapter 4 Image Enhancement in the Frequency Domain Part I.
October 29, 2013Computer Vision Lecture 13: Fourier Transform II 1 The Fourier Transform In the previous lecture, we discussed the Hough transform. There.
CT1037N Introduction to Communications Signal Representation & Spectral Analysis Er. Saroj Sharan Regmi Lecture 05.
Part 4 Chapter 16 Fourier Analysis PowerPoints organized by Prof. Steve Chapra, University All images copyright © The McGraw-Hill Companies, Inc. Permission.
Astronomical Data Analysis I
CH#3 Fourier Series and Transform
Vibrationdata 1 Unit 6a The Fourier Transform. Vibrationdata 2 Courtesy of Professor Alan M. Nathan, University of Illinois at Urbana-Champaign.
GG313 Lecture 24 11/17/05 Power Spectrum, Phase Spectrum, and Aliasing.
Sinusoid Seventeenth Meeting. Sine Wave: Amplitude The amplitude is the maximum displacement of the sine wave from its mean (average) position. Simulation.
Fourier series, Discrete Time Fourier Transform and Characteristic functions.
Chapter2 : SIGNALS 1st semester King Saud University
Fourier Transform.
Fourier Analyses Time series Sampling interval Total period Question: How perturbations with different frequencies contribute to the turbulent kinetic.
2 nd semester nalhareqi King Saud University College of Applied studies and Community Service 1301CT By: Nour Alhariqi.
The Fourier Transform.
CH#3 Fourier Series and Transform 1 st semester King Saud University College of Applied studies and Community Service 1301CT By: Nour Alhariqi.
Math for CS Fourier Transforms
Digital Image Processing Lecture 8: Fourier Transform Prof. Charlene Tsai.
Chapter 4 Dynamical Behavior of Processes Homework 6 Construct an s-Function model of the interacting tank-in-series system and compare its simulation.
Chapter 4 Dynamical Behavior of Processes Homework 6 Construct an s-Function model of the interacting tank-in-series system and compare its simulation.
CS 591 S1 – Computational Audio
MECH 373 Instrumentation and Measurements
Unit 5 The Fourier Transform.
Continuous-Time Signal Analysis
SAMPLING & ALIASING.
UNIT II Analysis of Continuous Time signal
Lecture 2: SIGNALS 2nd semester By: Elham Sunbu.
Fourier Analyses Time series Sampling interval Total period
Presentation transcript:

GG313 Lecture 23 Nov 15, 2005 Spectral Analysis 1

To date, we have been dealing with data, time series in particular, in the TIME DOMAIN. This just means that our information consists largely of parameters that change in amplitude with time or in space. So out independent variable has usually been time or distance. There is a whole other world out there where we instead study data where the independent variable is frequency, or how many cycles there are in a unit time, or in a unit distance. This is called the FREQUENCY DOMAIN. While we can gain considerable insight about the phenomena hidden in our data in the time domain, we can often learn much more - and apply different and important operations - in the frequency domain. The way we get back and forth between the time and frequency domains is the Fourier Transform, and that is the subject we will be discussing for the next 3+ weeks.

Subjects that are highly involved with spectral analysis in the frequency domain include: data compression - jpeg and mpeg differential calculus filtering extraction of signals from noise communications theory and many many others Geological applications include: mapping analysis of gravity and magnetic data seismic processing, and many others.

Many signal in geosciences vary with time and/or location as a result of modifications imposed by their passage through time and space. These modifications are caused by variations along the paths taken, and analysis of these signals can often lead to deductions about what these variations are. For example, changes mass within the earth cause changes in the gravitational acceleration which in turn cause satellites to change their orbits slightly. We can measure these changes and analysis leads to estimates of the variation of mass density within the earth. Lets start with the basic trigonometry. We need a good way to describe the variations of a signal, and for that we turn to the sine and cosine functions. We will try to describe our series of numbers in terms of sines and cosines. Think of a vector going around in a circle around the origin:

The vector r rotates around the origin with a frequency, f, cycles per sec (Hertz) or a period of T sec/cycle. f=1/T. The variation of x with time is given by x(t)= r cos(2 π f t) and the variation of y with time is given by y(t)=r sin(2 π f t). Instead of f, we can use angular frequency  =2 π f, where  has units of radians/time, so x(t) =A cos (  t). For spatial data, the independent variable is length, and angular frequency becomes the wave number k=2π/, where is the wavelength, with units of distance. The amplitude of the signal is r, the length of the rotating vector.

The value inside the parentheses of the sine and cosine is called the phase, measured in radians in most cases, or degrees. (This is slightly different from Paul’s definition). We can change the phase of a sine or cosine wave by adding a constant to to the phase: The new wave has the same shape and amplitude, but it is shifted in phase by .

A trig identity allows us to describe this ugly non-linear wave as the sum of two different linear waves: (5.51) (5.52) Signals generally are made up of a sum of many different sinusoids with different phases, periods, and amplitudes. We can represent any signal as a sum of sinusoids, the Fourier Series: (5.53)

Since the Fourier series is made up of an infinite number of k’s, solving it for the a’s and b’s is difficult…. but we take advantage of a fundamental characteristic of these series that concerns harmonics. A harmonic is a wavelength (or frequency) that fits an exact integral number of times in a finite-length time series. The fundamental frequency is the one lowest frequency where only one wavelength fits into the time series. If our time series is 20 seconds long, then the fundamental period is T=20 seconds. The fundamental period in this case is f f =1/T=0.05 Hz. If our time series is 20 km long, then the fundamental wavelength is 20 km, and the fundamental wave number is k=2π/20. The next higher frequency that fits integrally into the time series has a frequency of f=2f f. This is usually called the 2nd harmonic.

This chart shows the fundamental and first harmonic sine and cosine components for a 64-point series (k f =2π/64, y=sin(kj)). Adding together harmonics will always result in a function that is periodic with a period of the length of the series.

In the figure above, n is the length of the discrete time series. How many frequencies do we need to get an absolutely perfect reconstruction of those n points? Since there are n points, we might guess that we need n frequencies, but note that each frequency has two coefficients associated with it, a i and b i, so you might guess that we need n/2, which is almost correct. We will show later that we actually need n/2+1 if the points are evenly spaced, and T=n  t. We’d like to find the best-fit curve to our time series by adding up all the components and solving for the a i and b i. If n is even: (5.59)

We thus have an equation for each point in the series and thus n equations with n unknowns. We should thus be able to solve for each coefficient. We could do this by matrices in Matlab: (5.61) which is our standard Ax=b, but that could lead to some huge matrices and lots of compute time. Lucky for us, the properties of sines and cosines and harmonic functions lead to a much faster and analytic way to calculate the coefficients. The important property is that sines and cosines and all their harmonics are orthogonal, so we can calculate each coefficient individually since they are all independent.

The a 0 term is the “zero frequency” term, equal to the average of the whole time series, i.e. the mean. The last cosine term (for n even) is there because the sine term of the highest frequency (n even) is zero. Paul goes into the reason for this in his notes. Each frequency in our series is: (5.70) The HIGHEST frequency in our series is This is the Nyquist frequency, equal to half of the sampling frequency. It is very important and will be looked at later.

From the orthogonality relationships between sines and cosines, we can solve separately for the a i ’s and b i ’s: The Fourier series can be rewritten: (5.77) (5.94) (5.98) We can go back to y using eqn 5.59.

Example: Calculate the Fourier series for y=[ ] T with  t=1. For this series, n=8 and T=8 since  t=1. The Fourier frequencies = 2πj/T = 0, π/4, π/2, 3π/4, π The coefficients are (from the equations on the last slide): a 0 = a 1 = a 2 = a 3 = a 4 = b 1 = b 2 =0.625 b 3 = and our series is: y(t)= cos(πt/4) cos(πt/2) cos(3πt/4) cos(πt) sin(πt/4)+0.625sin (πt/2) sin (3πt/4) (red numbers are in error in Paul’s notes)

%FourierEx5_5 % %Fourier example 5.5 Wessel y=[ ]'; % This is the time series n=8; T=8; unit=ones(1,8); % unit vector time=[0:7]; % time vector ( delta t =1) omega=(2*pi/T)*[ ]; % frequency vector % get coefficients (eqns 5.94 and 5.98) for ii=1:n/2 a(ii)=(2/n)*(cos(omega(ii)*time)*y); b(ii)=(2/n)*(sin(omega(ii)*time)*y); end a b % divide the 0th and nth coef by 2 a0=(2/n)*(unit*y)/2 % this is the DC (average) value of y a(4)=a(4)/2

% calculate inverse to check y for ii=1:8 t=ii-1; y(ii)=a0 +a(1)*cos(omega(1)*t) +a(2)*cos(omega(2)*t)... +a(3)*cos(omega(3)*t)+a(4)*cos(omega(4)*t)... +b(1)*sin(omega(1)*t)+b(2)*sin(omega(2)*t)... +b(3)*sin(omega(3)*t); end y y comes out exactly what we started with.

There are several different ways of formulating the Fiurier series. The Matlab function “fft” (Fast Fourier Transform) does it in a different way. In Matlab, Y=fft(x) is the “forward” transform, and x=ifft(Y) is the inverse transform, and: In-Class exercise: If we apply these functions to the example, what do we get? y=[ ] Apply fft and follow with ifft to see if the original series is returned.

The transform series we get from fft doesn’t look anything like the coefficients in Paul’s notes. How are they related? >> fft(y) ans = i i i i i i There series is complex and symmetric around the center value, so there are only 8 independent values (as there should be). And the inverse transform returns the original series, as it should. How are these values and Paul’s related? next class…