Filtering Surface Profiles - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Filtering Surface Profiles

Description:

... 3 Different stages of the analysis process RawProfile is ... just smooth enough to not see the small wiggles, but not smooth enough to miss the long waves ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 25
Provided by: bala
Category:

less

Transcript and Presenter's Notes

Title: Filtering Surface Profiles


1
Filtering Surface Profiles
  • Bala Muralikrishnan
  • Dept. of MEES
  • UNCC

2
(No Transcript)
3
Primary output from filtering
Another output
4
Filtering
  • Appears to be some sort of a smoothing
    operation
  • We took in a very rough profile with lot of
    high frequency information and produced a
    smoother version of the same
  • It is just smooth enough to not see the small
    wiggles, but not smooth enough to miss the long
    waves

5
Averaging
  • Have a bunch of numbers that vary over time
    stock market fluctuations, may be
  • How to tag a price to it by averaging
  • We do the same here, we try to do some sort of
    average to the rough profile

6
Moving Average
7
Moving Average
  • Two inputs
  • Pprofile
  • Window function (or the filter)
  • The window function has two pieces of info
  • The weights to be used for averaging this is
    automatically determined by specifying a certain
    shape
  • The width how large a window this is what we
    can decide this is related to cutoff, larger
    the width means greater averaging or more
    smoothing

8
1/N
0.8 mm (cutoff)
-0.8 mm
If there are N points, the weights are all equal
to 1/N. The sum of all weights in a window is 1
9
a
0.8 mm (cutoff)
-0.8 mm
Triangular window (area under triangle 1.
Thisgives value for a)
10
-0.8
0.8
Gaussian weighting function
11
profile
window
12
Convolution
  • Moving average is also called convolution
  • If input profile has length n, window has length
    m, output has length nm-1
  • In surface metrology, the input is the Pprofile
    and a filter (say, Gaussian), then output is the
    waviness profile W

13
Convolution
  • In our examples, the Pprofile will have, say 8000
    points spaced at 0.001 mm between each point
  • Filter is typically 1601 points long, also spaced
    at 0.001 mm
  • Then, output waviness profile has 80001601-1
    points.
  • Then, from this output, we extract the central
    portion of the 8000 points, by throwing away the
    first and last 800 points.

14
Matlab
  • Matlab has a conv function to do convolution
  • help conv

15
How to specify filter
  • Gaussian filter
  • Input spacing between points
  • Specify filter shape filter equation does this
  • Specify width - cutoff

16
Gaussian Filter
  • cutoff 0.8 spc 0.001
  • x (-cutoffspccutoff)
  • const cutoff sqrt(log(2)/pi)
  • b exp(-pi(x/const).2) / const
  • b b/sum(b)
  • plot(x,b)

17
Putting it all together
  • load a data file
  • RawProfile load('PaperProfile.dat')
  • n length(RawProfile)
  • spacing 0.001 spacing is in mm
  • X (01n-1)spacing
  • plot(X,RawProfile)
  • PProfile detrend(RawProfile)
  • plot(X,PProfile,'r')
  • Generate the filter
  • cutoff 0.8 spc 0.001
  • x (-cutoffspccutoff)
  • const cutoff sqrt(log(2)/pi)
  • b exp(-pi(x/const).2) / const
  • b b/sum(b)
  • plot(x,b)
  • perform filtering
  • m (length(b)-1)/2
  • n length(PProfile )
  • W conv(PProfile ,b)
  • W W(m1mn)
  • X (01n-1)spacing
  • plot(X, PProfile ,r,X,W,b)
  • R Pprofile W
  • plot(X,R)

18
Exercise
  • Re-write this using functions this will be very
    useful for the first - computational lab
  • Function 1 to load and detrend data
  • input argument file name and spacing
  • Output argument X and Pprofile
  • Function 2 to generate filter
  • Input arguments are spacing and cutoff
  • Output argument is filter points b
  • Function 3 to perform convolution
  • Inputs are Pprofile and filter b
  • Output is waviness profile W and roughness R

19
How to call your functions
  • X, Pprofile myLoadData(paperprofile.dat,
    0.001)
  • B myGaussian(0.8,0.001)
  • R,W myFilter(Pprofile,B)

20
  • Load the profile paperprofile.dat
  • The spacing between points is 0.001 mm
  • Filter using the functions you have just written
    select two different cutoffs as inputs 0.25
    mm and 0.8 mm and observe the roughness and
    waviness plots

21
Summary
  • Filtering is the process of smoothing the profile
  • We do this by performing a moving average
  • For this, we need a weight array called the
    filter window, the filter or the weighting
    function
  • The moving average is also called convolution

22
Some questions
  • A surface is typically viewed as comprising a
    range of surface wavelengths
  • Roughness comprises high frequency or small
    wavelengths
  • Waviness has larger wavelengths
  • Form has even longer wavelengths
  • So, in what we have done does far we did use a
    cutoff term for the filter that sort of relates
    to wavelengths
  • But we never quite explicitly looked at a
    profile as being composed of different sinusoids
    that can separated into bands!

23
  • So, Instead of looking at filtering as simply an
    averaging process, we will look at a surface as
    being composed of many sinusoids that can be
    filtered into high frequency, medium frequency
    and small frequency bands
  • Welcome to the world of the Fourier Transform

24
  • Step 1 Preprocessing
  • Step 2 Filtering
  • Still some unfinished business here!
  • Step 3 Parameters
Write a Comment
User Comments (0)
About PowerShow.com