Problem using nlinfit for multiple non-linear regression - poor fit

3 views (last 30 days)
Dear all,
I am tryng to validate a model for an electrochemical cell potential using experimental data for different operating conditions (Temperature, Current density, Concentrations).
My model equation (Vnum) contains several terms: quadratic + logaritmic + asinh including exponentials and exponentials + constant.
I have tried to use the nlifit function for multiple non-linear regression:
%Experimental Voltage [V]
Vexp_800_1 = [1.3012, 1.2767, 1.2426, 1.2398, 1.1977, 1.1351, 0.878];
Vexp_850 = [1.2069, 1.1773, 1.1443, 1.1431, 1.1074, 1.0677, 0.859];
Vexp_750 = [1.3814, 1.3649, 1.3369, 1.3344,1.2723, 1.2285, 0.897];
Vexp_800_2 = [1.31, 1.2871, 1.2526, 1.2514, 1.2093, 1.148, 0.878];
Vexp_800_3 = [1.2947, 1.2679, 1.2349, 1.2334, 1.1889, 1.1663, 0.878];
beta1= [Aan Eact_an Bcat Eact_cat Rcc]; %Guess fitting parameters (from literature)
x=[Idens_test, Texp_test, H2_exp_test, H2O_exp_test, O2_exp_test];
Vnum=@(beta0,x)(((244800-49.18*x(:,2)-0.00272*x(:,2).^2)/(Z*F)+R*x(:,2)/(Z*F).*log(x(:,3)./x(:,4).*x(:,5).^0.5*P^0.5) ...
+R*x(:,2)/F.*asinh(x(:,1)./(beta0(1)*exp(-beta0(2)./(R*x(:,2)))))+R*x(:,2)/F.*asinh(x(:,1)./(beta0(3)*exp(-beta0(4)./(R*x(:,2)))))+x(:,1).*(1./(69200*exp(-9681./x(:,2))*0.01))*S_SSZ+beta0(5)));
beta=nlinfit(x,Vexp_test,Vnum,beta1);
But i receive the following warning:
Warning: Some columns of the Jacobian are effectively zero at the solution, indicating that the model
is insensitive to some of its parameters. That may be because those parameters are not present in
the model, or otherwise do not affect the predicted values. It may also be due to numerical
underflow in the model function, which can sometimes be avoided by choosing better initial parameter
values, or by rescaling or recentering. Parameter estimates may be unreliable.
I am struggling in understanding the error. I have checked my model equation and I do not see parameters that are not present in the model. I have already tried to change better initial parameters from literature. Is this issue related to rescaling or recentering of Jacobian?
I do not know if this could help, but I noticed that reducing fitting terms deleting one of the asinh terms message error disappears. Unfortunately I need both terms in my model.
beta2= [Aan Eact_an Rcc]; %Guess fitting parameters (from literature)
Vnum=@(beta0,x)(((244800-49.18*x(:,2)-0.00272*x(:,2).^2)/(Z*F)+R*x(:,2)/(Z*F).*log(x(:,3)./x(:,4).*x(:,5).^0.5*P^0.5) ...
+R*x(:,2)/F.*asinh(x(:,1)./(beta0(1)*exp(-beta0(2)./(R*x(:,2)))))+x(:,1).*(1./(69200*exp(-9681./x(:,2))*0.01))*S_SSZ+beta0(3)));
I attach the full code so you could have a closer view on the problem.
Thank you in advance
  1 Comment
Torsten
Torsten on 26 Apr 2023
You don't use the fourth and fifth parameter in your model function. Thus you should remove the two parameters from your initial guess vector.

Sign in to comment.

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!