Solving Data Smoothing Issue

  • Thread starter enigma
  • Start date
  • Tags
    Data
In summary, there is a problem with the pressure coefficients returned from the CFD code due to a minor dent in the surface of the wing. The speaker has tried using a Gaussian filter to smooth out the data but it is not providing a satisfactory solution. They are considering coding a solution that will find the first two points where the tangent to the curve intersects and are open to suggestions for a more elegant solution. A 5th order Butterworth filter has been used with a low cutoff frequency, causing a displacement in the filtered data. Adjusting the cutoff frequency may provide less displacement but also less smoothing.
  • #1

enigma

Staff Emeritus
Science Advisor
Gold Member
1,757
17
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

  • wingprocess.zip
    12 KB · Views: 187
Mathematics news on Phys.org
  • #2
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

  • cp23015aoa0.txt
    1.2 KB · Views: 379

Suggested for: Solving Data Smoothing Issue

Back
Top