model reduction from a database created with xfoil
5 views (last 30 days)
Show older comments
Hello community,
i have created a database with xfoil (2d airfoil panel code with an boundary solver).
The database is saved in this format:
% L lift
% D drag
% al angle of attack
% thick thickness of the airfoil
% camber camber of the airfoil
% Ma Mach number
% Re Reynolds number
L = db_L(al, thick, camber, Ma, Re);
D = db_D(al, thick, camber, Ma, Re);
The easiest way is a lookup-table, but i am looking for a more sophisticated approach like a POD (proper orthogonal decompositon) to identify e.g. how sensitive the thickness affect the lift.
if every input variable consist of 16 values, the database has 16^5 entries, and i could create Matrix of 1024 x1024 for the POD analysis.
but how could i compare the results of the modes with the data base? e.g. the deviation of the lift for a specific case.
PS: is there an application or something in Matlab which could help me?
best regards
emjay
0 Comments
Answers (1)
William Rose
on 25 Sep 2024
I do not think proper orthogonal decomposition or principal component analysis will be useful for this problem. To do proper orthogonal decomposition on this data, you could reshape L into a 1024x1024 matrix, but the values of the predictor variables would vary in a wierd way across the rows and columns, and I don't think you would get useful results.
Let's consider lift (L) only. The same analysis can be applied to drag. You have computed lift for 2^20 combinations of 5 predictor variables (16 values per predictor). You are seeking a simplified model that predicts lift based on the values of the 5 variables, without using a look-up table. I would try regression models. The regression model may have a lot of terms, but it will still be small compared to 2^20. For example:
Model 1: Linear regression along each predictor (5 terms), plus all multiplicative interaction terms (5*4/2=10 terms) + intercept = 16 possible model coefficients.
Model 2: Quadratic regression along each predictor (10 terms) plus multiplicative interactions (10 terms) + intercept = 21 possible model coefficients.
Use fitlm() or stepwiselm() to find the coefficients and to identify which ones are significant.
Extract the data from your database to create an array X (size 2^20 x 5) of all combinations of predictor variables, and vector L=lift (size 2^20 x 1) for each row of X.
If you include quadratic or higher order regression terms, I recommend centering the predictor values, so the mean value for each predictor is 0.
Example script is attached. Part 1 of the script creates and populates array X and vector L. The second part of the script fits the lift data using Model 1 and using Model 2. It uses stepwiselm() to fit the model. The script takes about 2 minutes to run on my old notebook machine.
0 Comments
See Also
Categories
Find more on Guidance, Navigation, and Control (GNC) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!