Thread Subject: how to use optimisation tools in Matlab

Subject: how to use optimisation tools in Matlab

From: Matthew

Date: 19 Nov, 2008 15:46:02

Message: 1 of 2

i am trying to optimise the CL value of an aerofoil by varing a rotation angle theta

theta is fed into a function i will call 'F' to firstly rotate the co-ordinate points of an aerofoil

this aerofoil data is then fed into an external programme by 'F'

the data from the external programme is then called back into my function 'F'

this data is then plotted by 'F'

what i am having problems with is using an optimisation technique such as fgoalattain (x=fgoalattain(fun,x0,goal....) or fminimax to have the variable 'x' as theta, but the 'goal' to be finding the correct CL value from my function 'F'.

what i ultimately want to do is input a Cl value and the optimiser to vary theta until my Cl input value is met.

i have been pouring over this now for 2 weeks
and i am pulling my hair out.

Subject: how to use optimisation tools in Matlab

From: Stuart Kozola

Date: 19 Nov, 2008 17:26:51

Message: 2 of 2

Your function F should return the value of CL. Then you can use
fgoalattain.

Try this:
x0 = 0; % intial guess at theta, 0 may not be the best choice
weight = 1.0; %With only one goal, this should be set to 1.0.
CLGOAL = %put your goal value here

optimCL = fgoalattain(@F,x0,CLGOAL,weight);

Note you need to pass the function F in as a function handle (@F)
And your F function should be defined to return CL, and only accept x, or in
this case, theta as inputs.

function CL = F(theta)
% run simulation
% return CL

Stu



"Matthew " <men5mjr@leeds.ac.uk> wrote in message
news:gg1cbq$9gm$1@fred.mathworks.com...
>i am trying to optimise the CL value of an aerofoil by varing a rotation
>angle theta
>
> theta is fed into a function i will call 'F' to firstly rotate the
> co-ordinate points of an aerofoil
>
> this aerofoil data is then fed into an external programme by 'F'
>
> the data from the external programme is then called back into my function
> 'F'
>
> this data is then plotted by 'F'
>
> what i am having problems with is using an optimisation technique such as
> fgoalattain (x=fgoalattain(fun,x0,goal....) or fminimax to have the
> variable 'x' as theta, but the 'goal' to be finding the correct CL value
> from my function 'F'.
>
> what i ultimately want to do is input a Cl value and the optimiser to vary
> theta until my Cl input value is met.
>
> i have been pouring over this now for 2 weeks
> and i am pulling my hair out.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com