Nonlinear fit to multiple data sets with shared parameters

Hello All,
I need to fit a nonlinear model to three datasets simultaneously. The model has the same functional form for all sets. However, I have found a difficulty when I am using lsqcurvefit that I do not know how to solve. I have three different mass that depends on the time and temperatures (fixed temperatures for each dataset), with four shared parameters (the same for the three datasets) that must be optimized to fit the experimental values. The model has this form:
mass(time)=(1-(1./(((1/((n-1)+(A.*(p.^r).*time*exp(-Ea./R.*Temperature))).*(n-1)).^((1/(n-1))))))) where n,A,r,Ea are the same for the three datasets and Temperatures are known, being a vector=[525 550 635], and p and R are known values.
What I have tried so far:
% y_exp=TGA_exp(:);
% tf=60*size(TGA_exp,1);
% t=1:60:tf;
% time=[t;t;t]';
% Time_exp=time(:);
% R=8.314; p=(101325*16.6)/100;
% Temp_iso=[525+273 550+273 635+273]';
% identifier_T=repelem((1:3)',900);
% h = gscatter(Time_exp,y_exp,Temp_iso(identifier_T));
% Alpha=@(n,r,A,Ea,Time_exp)(1-(1./(((1/((n-1)+(A*(p.^r).*Time_exp*exp(-Ea./R*Temp_iso(identifier_T)))).*(n-1)).^((1/(n-1)))))));
% Alpha_param=@(params,Time_exp)Alpha(params(1),params(2),params(3),params(4),Time_exp);
% Initial_values=[0.5 0.5 50 80000]';
% x = lsqcurvefit(Alpha_param,Initial_values,Time_exp,y_exp);
The problem is that I do not know how to incorporated the known temperatures in the handle function for each data set. Therefore, I have really have three different functions with four shared parameters.
It would be really appreciated if someone can provide guidelines to achieved the solution.
Thank you very much in advance.
Cruz

Answers (0)

Products

Tags

Asked:

on 10 Apr 2018

Community Treasure Hunt

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

Start Hunting!