Multi variable parameter estimation from data set

조회 수: 1 (최근 30일)
Kabir Shariff
Kabir Shariff 2022년 3월 29일
댓글: Kabir Shariff 2022년 3월 30일
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
Torsten
Torsten 2022년 3월 29일
편집: Torsten 2022년 3월 29일
And you have 36 data for I and x ? And all other parameters are unknown ?
Kabir Shariff
Kabir Shariff 2022년 3월 29일
No sir, I have a set of 36 numerical result
here is the data for clarification.
for K = [1 2 3] % This call file with different Ct values
if K == 1
Ct = 0.64; % the actual Ct used in the simulation
elseif K == 2
Ct = 0.89;
else
Ct = 0.98;
end
for DH = [20 40 60] % DH is R as mention above; It calls a file with selected Ct
for p = [5 10 15 20] % p is Ia, sorry for the different names!!
filename = sprintf('IaddK%dDH%dp%d.csv',K,DH,p); % file name in the form (IaddK2DH40p10.csv)
file = importdata(filename);
tag = file.data;
x = tag(:,1); Iobs = tag(:,2)*0.01;
Ia = 0.01*p; R = 0.01*DH; % convering percentage
figure
plot(x,Iobs)
end
end
end
For each of the 'filename', is a column for x and I(I_obs is the numerical data)
I want to develop a generalize model for all the sets of data, respecting the constraints.
I have tried to use Nonlinear Least-Squares, Problem-Based
but it gives the parameters for each data, I want to generalize it please,
Thank you very much

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

채택된 답변

Torsten
Torsten 2022년 3월 29일
편집: Torsten 2022년 3월 29일
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)
  댓글 수: 1
Kabir Shariff
Kabir Shariff 2022년 3월 30일
Hello, I was able to get a model from your explanation. Although the model gives almost the same parameters as defined in the 'ub'. And the accuracy of the model is not encouraging. Maybe I should use another model equation to have better results.
Thanks

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by