Smoothing out data

  • Thread starter enigma
  • Start date
  • #1
enigma
Staff Emeritus
Science Advisor
Gold Member
1,747
10

Main Question or Discussion Point

Hi all,

I'm having a little difficulty processing my data, and I hope someone here will be able to help me out. (files are a matlab .m script and a .mat data file zipped up)

The data I have is the shape of a standard wing and the pressure coefficients along the top and bottom surfaces output from CFD code. Unfortunately, there is a minor dent in the surface where the two equations which generated the shape meet (this remains even after filtering). This inconsistancy will not show up in my experimental setup because it will be under the noise level after I sand the wing.

The problem I'm having is with the pressure coefficients returned from the CFD code. The divot causes the Navier Stokes equations to go whacky on that point and it looks like a 1/x term in the region about 0 is superimposed over the curves (running the code shows what I'm talking about... around c=0.15). I would like to smooth this curve out.

I have coded a method which a colleage called a Gaussian filter (looking online for more information has turned up very little... only things with image processing, so the name might not even be correct), which basically takes the secant between the points ahaid and behind the point to be modified, interpolates the value of the point in question which lies on the secant, and averages it with the original value (hope that makes sense). You then run that through for all points to be filtered, and then run the loop until you get clean enough data.

Unfortunately, this is not giving me a smooth enough slope either, even after 10 runs or more, and the improvement is quickly reaching diminishing returns. The code also illustrates this.

I'm considering coding something which will go out from the "asymptote" and find the first two points where the tangent to the curve intersects both of them, but I have a feeling that this will be computationally intensive as well.

I am wondering if there is a more elegant solution which I'm unaware of to solve this problem.

Thanks in advance for your time.
 

Attachments

Answers and Replies

  • #2
SGT
I used a 5th order Butterworth filter with cutoff frequency equal to 0.15 of your sampling frequency.
The .txt file is your .m file edited to implement the modification. I also changed the colors of the plot. In blue is your wing profile, in green the raw data and in red the filtered data.
There is a displacement in the filtered data, because the cutoff frequency is too low, in order to achive enough smoothing. If this displacement is undesirable, you can have less displacement with less smoothing by augmenting the cutoff frequency.
 

Attachments

Related Threads on Smoothing out data

  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
1K
Replies
4
Views
12K
Replies
28
Views
2K
  • Last Post
Replies
12
Views
1K
  • Last Post
Replies
7
Views
3K
Replies
15
Views
4K
Top