Solving a non-linear least squares inverse problem
24 ビュー (過去 30 日間)
古いコメントを表示
I have written the following forward problem. My ultimate goal is to solve the inverse problem for the parameter K. The equation is temperature variation in the half-space due to a time-periodic surface temperature.
I am going to evaluate at a single depth (1.3 m) so z (y) will be a constant. I have real data but am initially just confirming with synthetic data this forward problem produces. My current specific question is in evaluating the least squares solution -- can do this simply in the solver-based optimization (https://www.mathworks.com/help/optim/ug/fmincon.html) but am having trouble conceptualizing how to apply it to my forward problem as written. My analytical forward problem is:
%%ANALYTICAL MODEL
%PARAMETERS
conductivity=.0033; %W m-1 K-1
heat_capacity=671.8; %J kg-1K-1
density=1300; %kgm-1^3
diffusivity=conductivity/(heat_capacity*density);
synodic_period=2.55024e6; %seconds
simulation_period=3*synodic_period;
synodic_frequency=(2*pi)/synodic_period;
T_av=250; %K
T_amp=150; %K
skin_depth=sqrt(2*diffusivity/synodic_frequency); %m
t_list=linspace(0,66162100,1000); %time frame over (S_P)
%t_list = 0:5:synodic_period;
z_list=linspace(0,1.5,1000); %depth
T_an=nan(length(t_list),length(z_list)); %output vector
T_an(:, 1) = T_av;
%calculate temperature
for t_index=1:length(t_list)
t=t_list(t_index);
for z_index=1:length(z_list)
z=z_list(z_index);
T_an(t_index,z_index)=T_av+T_amp*exp(-z*sqrt(synodic_frequency/(2*diffusivity)))*cos(synodic_frequency*t-z*sqrt(synodic_frequency/(2*diffusivity)));
end
end
Please let me know if I can provide any additional clarrification. Thank you!
0 件のコメント
回答 (1 件)
Sulaymon Eshkabilov
2019 年 5 月 8 日
Hi,
I would suggest to employ curve fit models: (linear least squares or non-linear least squares method)
OPTs = fitoptions( 'Method', 'NonlinearLeastSquares');
MODEL = fittype( MODEL, 'coeff', {'K'});
参考
カテゴリ
Help Center および File Exchange で Linear Least Squares についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!