24小时热门版块排行榜    

查看: 7257  |  回复: 20
本帖产生 1 个 计算强帖 ,点击这里进行查看
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

glazio

铁虫 (小有名气)

[求助] 求教origin拟合简单的渗流方程(又称逾渗方程),做复合材料的应该会遇到吧

自己试了好多次,origin还是给出无法拟合的结果,因此在此求教高人们。

1. 公式
渗流公式为y=A*(x-xc)^p
其中x为自变量,y为因变量,A、xc和p均为常数。

2. 数据
为了测试模拟,设定A=18.5,xc=0.095,p=-2.3,得到以下数据

x                y
------------------------------
0.1001        3.5E+06
0.1002        3.3E+06
0.11        2.9E+05
0.12        9.0E+04
0.15        1.5E+04
0.2        3.3E+03
0.3        7.1E+02
0.4        2.8E+02
0.5        1.5E+02
0.6        8.9E+01

3. 我的origin(Pro V8.5)拟合过程
选取Nonlinear Curve Fit,Category选取Power,Function选取Power1,该方程形式为y=A|x-xc|^p。
在参数bounds中设定p<0,0
考虑到y值变动较大,又在NLCF-Settings-Data Selection中将y值权重设为“Variance~y^2”后,显示Chi-Square为1.42513,现在执行“1 Iteration”,但系统仍然显示“Fit did not converge - reason unknown.”



以上为问题和步骤陈述,请问我的拟合问题在哪里,如何解决呢?

[ Last edited by glazio on 2011-11-25 at 09:33 ]
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

glazio(金币+10): dbb627版主不愧是matlab神人,所有问题都得到回答,非常感谢! 2011-11-30 08:57:21
cenwanglai(计算强帖+1): 你的回复都挺好。不过我不熟悉,没有仔细看明白。就这里给一个EPI吧~ 2011-12-22 20:09:16
引用回帖:
13楼: Originally posted by glazio at 2011-11-29 22:38:41:
你给的帖子里的情况好像并不是我说的共享参数拟合。下面举个例子说明一下。

假如说在数据图中有两组实验数据集Y1和Y2,可以用某个含有三个参数a,b,c的方程y=f(x)描述。普通的拟合一般是用F(x)对数据集Y1和Y2 ...

这个没有问题
matlab可以做的
见下面的例子
CODE:
x=rand(1,7);
y1=2*x+3*sin(x)+6*x.^2;
y2=2*x+3*cos(x)+2*x.^2;%参数 2 3 6 2前面2 3共用
F=@(p,x)[p(1)*x+p(2)*sin(x)+p(3)*x.^2;p(1)*x+p(2)*cos(x)+p(4)*x.^2];
p = lsqcurvefit(F, [1 1 1 1], x,[y1;y2])

Local minimum found.

Optimization completed because the size of the gradient is less than
the default value of the function tolerance.




p =

    2.0000    3.0000    6.0000    2.0000
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
14楼2011-11-30 00:26:50
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 21 个回答

seaharrier

铁杆木虫 (知名作家)

帝国空军中将

【答案】应助回帖

我也不会,
试了一下,选择Power2可以拟合,但是系数跟你给的不一样,
可以参考一下看看是否可行。
Patienceisbitter,butitsfruitissweet.
2楼2011-11-25 13:02:45
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

★ ★ ★
cenwanglai(金币+3): ~~ 2011-12-22 20:07:18
origin不常用,matlab可以拟合出较好的结果
代码如下
CODE:
A=[0.1001       3.5e06
0.1002       3.3e06
0.11         2.9e05
0.12        9.0e04
0.15        1.5e04
0.2        3.3e03
0.3        7.1e02
0.4        2.8e02
0.5        1.5e02
0.6        8.9e01];
x=A(:,1);y=A(:,2);
st_ = [18.5 0.095 -2.3];
ft_ = fittype('A*(x-xc).^p','dependent',{'y'},'independent',{'x'},'coefficients',{'A', 'xc','p'});
[cf_,good]= fit(x,y,ft_ ,'Startpoint',st_)
h_ = plot(cf_,'fit',0.95);
legend off;  % turn off legend from plot method call
set(h_(1),'Color',[1 0 0],...
     'LineStyle','-', 'LineWidth',2,...
     'Marker','none', 'MarkerSize',6);
hold on,plot(x,y,'*')

cf_ =

     General model:
     cf_(x) = A*(x-xc).^p
     Coefficients (with 95% confidence bounds):
       A =       111.5  (11.4, 211.6)
       xc =     0.09683  (0.09604, 0.09762)
       p =      -1.809  (-2.04, -1.578)

good =

           sse: 3.8499e+008
       rsquare: 1.0000
           dfe: 7
    adjrsquare: 1.0000
          rmse: 7.4161e+003
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
3楼2011-11-25 20:14:26
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

图如下


The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
4楼2011-11-25 20:18:15
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
信息提示
请填处理意见