Optimization of multiple input variable to a model

조회 수: 3 (최근 30일)
Kabir Shariff
Kabir Shariff 2021년 8월 19일
답변: Alan Weiss 2021년 8월 22일
Hello Community,
I am relatively new to matlab, I have a optimization problem detailed below;
  1. the aim is to develop an analytical model for a measured data for a range of thrust coeffict Ct and ambient turbulence Iamb
My measured data 'Ip' depends on both Ct and Iamb along x.
Ct = [0.64 0.89 0.98];
Iamb = [0.08 0.15 0.2 0.23];
2. For a Ct, say Ct =0.64, I have I have 4 sets of data for Ip corresponding to Iamb.
In total I have 12 sets for data
3. I use a cftool to fit the data, using a custom model equation
Ip = a*exp(-b*x) +c;
This model equation fits all the data as shown below
4. My question: How can I the extract the dependence of Ct and Iamb in the constant a,b,c?
I want to have a generalize model equation of the form say,
Ip = a1*Iamb* exp(-b1*x) + c1;
for 0.08<Iamb<0.23 and 0.64 < Ct < 0.98
where a1, b1 and c1 are function of Iamb and Ct
5. What optimization tool is suited for this application?, I tried fmincon as follows but not getting the the correct model
c0 = [ 1 1 1 ]; % initiaal values
Ip = @(c) *c(1)*exp(-c(2)*x) +c(3) % optimization func
obj = @(c) sum(((Ip(c) - Im)./Im).^2); % obj func
copt = fmincon(obj,c0)
resulting to the values a1,b1, & c1
how can I develop Ct and Iamb relation from the set of values (a,b,c)?
6. Thank you for your assistance, I can provide more clarification if needed
  댓글 수: 2
Alex Sha
Alex Sha 2021년 8월 20일
Hi, if possible, post out all data please, including lp data.
Kabir Shariff
Kabir Shariff 2021년 8월 20일
Hi Alex,
Please find attached the data. I combine it into a single file for easy access.
If needed, I can provide my working code also.
Thanks

댓글을 달려면 로그인하십시오.

답변 (1개)

Alan Weiss
Alan Weiss 2021년 8월 22일
Usually you should use a least-squares solver for nonlinear fitting. See Nonlinear Data-Fitting and Nonlinear Least -Squares, Problem-Based for examples.
Alan Weiss
MATLAB mathematical toolbox documentation

카테고리

Help CenterFile Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by