Download presentation

Presentation is loading. Please wait.

Published byAryan Cinnamon Modified about 1 year ago

1
Transform Techniques 1 Mark Stamp

2
Intro Signal can be viewed in… o Time domain usual view, raw signal o Frequency domain transformed view Many types of transformations o Fourier transform most well-known o Wavelet transform some advantages Transform Techniques 2

3
Intro Fourier and wavelet transforms are reversible o From time domain representation to frequency domain, and vice versa Fourier transform is in terms of functions sin(nx) and cos(nx) Wavelet can use a wide variety of different “basis” functions Transform Techniques 3

4
Fourier Series Generally, we can write f(x) in terms of series of sin(nx) and cos(nx) o Exact, but generally need infinite series o Finite sum usually just an approximation Coefficients on sin(nx) and cos(nx) tell us “how much” of that frequency o May not be obvious from function o Can be very useful information Transform Techniques 4

5
Fourier Series For example, consider sawtooth function: s(x) = x / π The graph is… Transform Techniques 5

6
Sawtooth Function 1 term of Fourier series 2 terms Transform Techniques 6 3 terms 4 terms 5 terms

7
Fourier Transform A function f(x) is usually viewed in the “time domain” Transform allows us to also view it in “frequency domain” What does this mean? o See next slide… Why might this be useful? o Again, reveals non-obvious structure Transform Techniques 7

8
Time vs Frequency Function f(x) written as sums of functions a n sin(nx) and b n cos(nx) Coefficients (amplitudes) a n and b n o Tell us “how much” of each frequency Transform Techniques 8

9
Time vs Frequency Frequency domain view gives us info about the function o More complicated the signal, less obvious the frequency perspective may be Transform Techniques 9 Time domain Frequency domain

10
Time vs Frequency Time domain in red o Frequency domain in blue What does blue tell us? o Dominant low frequency o Some high frequencies Note that blue tells us nothing about time… o I.e., we do not know where frequencies occur Transform Techniques 10

11
Speech Example Frequency domain info used to extract important characteristics Transform Techniques 11 Time domain signal Sonogram

12
Fourier Transform Many different transforms exist So, why is Fourier so popular? o Fast, efficient algorithms o Fast Fourier Transform (FFT) Apply transform to entire function? o May not be too informative, since we lose track of where frequencies occur o Usually, want to understand local behavior Transform Techniques 12

13
Global vs Local Function can change a lot over time… Global frequency info not so useful Local frequency info is much better Transform Techniques 13

14
Global vs Local Use Short Time Fourier Transform (STFT) for each window o Note that windows can overlap Transform Techniques 14

15
Window Size How big should the window be? o Small? May not have enough freq info o Big? May not have useful time info Transform Techniques 15 about right too smalltoo big

16
Window Size Looks like ideal case would be windows that match frequency o Bigger windows for low frequency areas o Smaller windows for high frequency The bottom line? o Too big of window gives good frequency resolution, but poor time resolution o Too small of window gives good time resolution, but poor frequency resolution Transform Techniques 16

17
Uncertainty Principle Cannot have accurate frequency and time resolution simultaneously o Form of Heisenberg Uncertainty Principle So, this is something we must deal with o Since it’s the law! (of physics…) Is there any alternative to STFT? o Yes, “multiresolution analysis” What the … ? Transform Techniques 17

18
Windowing Revisited Window in STFT is really a function o Selects f(x) within current window o “Window function” is essentially 1 within current window, 0 outside of it For wavelets, “windows” much fancier o Like Windows 95 vs Windows 7… o Effect is to filter based on frequencies o Can mitigate some of the problems inherent in the uncertainty principle Transform Techniques 18

19
Fourier Transform In Fourier transform, frequency resolution, but no time resolution Transform Techniques 19 frequency time

20
Short Time Fourier Trans. In STFT, time resolution via windowing Transform Techniques 20 frequency time

21
Wavelet Transform Time resolution based on frequency Transform Techniques 21 frequency time

22
Wavelet Recall that Fourier analysis is based on sin(nx) and cos(nx) functions Wavelet analysis based on wavelets o Duh! But, what is a wavelet? o A small wave, of course… o “Wave”, so it oscillates (integrates to 0) o “Small”, meaning acts like finite window Transform Techniques 22

23
Wavelets Many different wavelet functions to choose from o Select a “mother” wavelet or basis o Form translations and dilations of basis Examples include o Haar wavelets (piecewise constant) o Daubechies wavelets o …and many others Transform Techniques 23

24
Haar: Translation & Dilation Transform Techniques

25
Advantages of Wavelets Wavelet basis is local o Unlike Fourier basis of sine and cosine o Local, implies better time resolution Basis functions all mutually orthogonal o Makes computations fast o Fourier basis also orthogonal, but requires “extreme cancellation” outside window o In effect, “windowing” built in to wavelet basis Wavelets faster to compute than FFT o A recursive paradise… Transform Techniques 25

26
Disadvantage of Wavelets Approximation with Haar functions… o For example, sine function is trivial in Fourier analysis, not so easy with Haar Transform Techniques 26

27
Wavelets: Bottom Line Fourier ideal wrt frequency resolution o But sine/cosine bad wrt time resolution Wavelets excels at time resolution o Since basis functions finite (compact) support, and employ translation/dilation o In effect, filters by frequency and time Complicated mathematics o But fairly easy to implement and use Transform Techniques 27

28
Discrete Transforms In practice, apply transforms to discrete time series, a 0,a 1,a 2,… o We assume a i = f(x i ) for unknown f(x) Discrete transforms are very fast o FFT is O(n log n) o Fast wavelet transform is O(n) Discrete transforms based on some fancy linear algebra Transform Techniques 28

29
Transform Uses Speech processing o Construct sonogram (spectrogram) o Speech recognition Image/video processing o Remove noise, sharpen images, etc., etc. Compression And many, many more… Transform Techniques 29

30
What About Malware Detection? We measure some characteristic of a exe file to obtain series a 0,a 1,a 2,… Compute wavelet transform and… o Filter out high frequency “noise” (i.e., insignificant variations) o And segment file based on where the significant changes occur Ironically, transform used to pinpoint significant changes wrt time Transform Techniques 30

31
Malware Detection Example 1. Compute entropy measurement using a i = entropy(B i ) for i = 0,1,2,…,n o Where B i is block of i consecutive bytes o Computed on (overlapping) “windows” o “Window” here not same as in transform 2. Apply discrete transform to a 0,a 1,… 3. Find significant changes in entropy 4. Use resulting sequence for scoring Transform Techniques 31

32
References R. Polikar, The wavelet tutorialThe wavelet tutorial A. J. Jerri, Introduction to WaveletsIntroduction to Wavelets G. Strang, Wavelet transforms versus Fourier transforms, Bulletin of the American Mathematical Society, 28: , 1993Wavelet transforms versus Fourier transforms Transform Techniques 32

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google