Multi variable parameter estimation from data set
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Kabir Shariff
am 29 Mär. 2022
Kommentiert: Kabir Shariff
am 30 Mär. 2022
Hello,
I have a set of data from numerical simulation (36 simulations), I want to obtained a generalize empirical relation from the data.
Normally I can use the curve fitting toolbox to find the relation using a specific model equation for one variable, but
My data set is multi variable function that depends on three variables,
The model equation is of the from:
I = a/(b +x);
with a,b =f (Ct,Ia,and R)
0.64 < Ct < 0.98,
0.05 < Ia < 0.2
0.2 < R < 0.6
The empirical relation I want to finnaly obtained can be expressed as

where A, alpha, beta and zeta are constant
6 Kommentare
Akzeptierte Antwort
Torsten
am 29 Mär. 2022
Bearbeitet: Torsten
am 29 Mär. 2022
Ok.
Form one big matrix M with the data of all your Excel sheets.
First column: x
Second column: I
Third column: Ct corresponding to x and I
Fourth column: Ia corresponding to x and I
Fifth column: R corresponding to x and I
Then you can use the following code:
M = your big matrix
% Initial values for the parameters
% You might choose better guesses if you know better
A_0 = 1.0;
alpha1_0 = 0.81;
alpha2_0 = 0.81;
beta1_0 = 0.125;
beta2_0 = 0.125;
zeta1_0 = 0.4;
zeta2_0 = 0.4;
x0 = [A_0;alpha1_0;alpha2_0;beta1_0;beta2_0;zeta1_0;zeta2_0];
lb = [-Inf,0.64;0.64;0.05;0.05;0.2;0.2];
ub = [Inf;0.98;0.98;0.2;0.2;0.6;0.6];
fun = @(p) M(:,2) - (p(1)*M(:,3).^p(2).*M(:,4).^p(4).*M(:,5).^p(6))./...
(p(1)*M(:,3).^p(3).*M(:,4).^p(5).*M(:,5).^p(7) - M(:,1));
x = lsqnonlin(fun,x0,lb,ub];
A = x(1)
alpha1 = x(2)
alpha2 = x(3)
beta1 = x(4)
beta2 = x(5)
zeta1 = x(6)
zeta2 = x(7)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!