Optimization of multiple input variable to a model
Mostrar comentarios más antiguos
Hello Community,
I am relatively new to matlab, I have a optimization problem detailed below;
- 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 comentarios
Alex Sha
el 20 de Ag. de 2021
Hi, if possible, post out all data please, including lp data.
Kabir Shariff
el 20 de Ag. de 2021
Respuestas (1)
Alan Weiss
el 22 de Ag. de 2021
0 votos
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
Categorías
Más información sobre Get Started with Curve Fitting Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!