How can I calculate unknown parameters in a integration with given boundary conditions

3 visualizaciones (últimos 30 días)
Hi I am trying to calculate unknown parameters in a integration with given boundary conditions. The integration and boundary conditions are shown below:
a11-a23 are the six unknown parameters to be calculated. z1 is a known vector when t=1 (I can give z2, z3... if needed).
The x could be discretized and thus the z1 can be a known vector constant.
I am trying to use integration (int in matlab) to represent z(x,t) for a given x (e.g. x=-1.5:0.1:1.5) and then use fmincon to find a11-a23 to make modulus of (Z(x,t)-z1) the minimum. However, the calculation of the integration is super time-consuming.
c=0.011;
syms x t a1 a2 a3 a4 a5 a6
a=[a1 a2 a3 a4 a5 a6];
x=-1.5:0.1:1.5;
Er=@(t)-(a(1)+a(2)*exp(-t./a(3))).*(1-x.^2./(a(4)+a(5).*t-a(6).*t.^2).^2).^c;
intE=int(@(t)Er(t),t,0,1);
tt=1;% integration time
FEr=Er(x,t,a)
fun=@(t,a)(norm(int(Er,t,0,tt)-z1));
a0=zeros(6,1);
A=[];
b=[];
Aeq=[];
beq=[];
lb=[0,0,0,0,0,0];
ub=[1,1,10,1,1,1];
aa=fmincon(@(a)fun,a0,A,b,Aeq,beq,lb,ub);
Any ideas appreciated. Thank you in advance!
  2 comentarios
Walter Roberson
Walter Roberson el 11 de Mayo de 2020
x is continuous, which would imply that Z(x,1) takes on an infinite number of values, not a finite vector of values. Unless, that is, z1 is a scalar constant ? But for that to be the case, the first term of the integral, independant of x, would have to work out as 0 which would require a11 = 0, a12 = 0, and a13 not negative infinity.
john zhang
john zhang el 11 de Mayo de 2020
Hi Walter, many thanks for your prompt comments. In my problem, x can be discretized so that z1 can be a vector constant, i.e. for each discreted x along -1.5 to 1.5, I will have a know z for this x when t=1.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 11 de Mayo de 2020
Probably the easiest way is to use the CurveFitting Toolbox with 'fittype' being an anonymous function with 6 model parameters. See https://www.mathworks.com/help/curvefit/fittype.html#btpaend-8

Categorías

Más información sobre Systems of Nonlinear Equations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by