24小时热门版块排行榜    

查看: 1391  |  回复: 13
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

vs570588

木虫 (正式写手)

[求助] 求高手,拟合求参数

function M=Monod(c,Y)
M= -c(1).*Y./(Y+c(2))


Y=[255.55 246.44 237.28 228.36 136.08 114 99.16 82.33 69.4 56.94 42.31 0];
x=[-0.78 -2.2268 -5.2033 -6.1377 -8.6137 -8.6428 -8.4792 -8.1692 -7.7128 -7.11 -6.3608 -1.9];
x=x/214.63;
c0=[0.03 0.3];beta=nlinfit(Y,x ,’Monod’,c0);
为了参数c(1),c(2),这个小程序快把我折磨死了。现在出来NLINFIT did NOT converge. Returning results from last iteration.
beta =

    0.0271
   -8.1892
按道理,-8.1892不合理。出来的参数应该和我预估的差不多。大家看看,这是怎样回事?
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

vs570588

木虫 (正式写手)

引用回帖:
Originally posted by dbb627 at 2011-06-02 21:50:44:
计算的图见附件

你好,谢谢你了。你用maple做出的解析解。我matlab是个菜鸟,怎样用matlab实现,我不会。你能帮我看看吗?另外,这里还有几篇英文文献,处理类似的问题。
第一篇:
Non-linear least-square error minimization was used to estimate best-fit values for the kinetic parameters (Sa´ez and Rittmann, 1992). In this technique, the modeling equations are solved numerically, and parameters are selected to minimize the sum of the relative least-square residuals. The equations were solved by finite differences in a Microsoft Excel spreadsheet.
第二篇:
2.7.5. Data fitting
AQUASIM version 2.1f (Reichert, 1995) was used to fit kinetic parameters. AQUASIM estimates kinetic parameters by minimizing
the sum of the squares of the weighted deviations between actual data and results of the calculated model. The calculation step size was 0.01 days. The secant method was used with a maximum iteration number of 100.
第三篇:
The fitting method adopted is detailed as follows. Eqs. (1) and(8) were solved numerically by the finite-difference method with
a finite-difference of dt= 0.00625 h and with an initial guess of qmax and Ks. The optimal qmax and Ks were then obtained by
changing their values in Microsoft Excel Solver to reach the minimum SSE between the model-calculated and observed data.
我希望我出来的拟合图形不应该是折线图,而是如附件所示。我的数据和第三篇中的数据很像,也是一式三组试验,其中一组和另外两组数据有区别。第三篇拟合求参方法如上所示。
最后,还是要谢谢你。
9楼2011-06-04 18:32:27
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 14 个回答

lidaxue

木虫 (正式写手)

之乎者也

【答案】应助回帖


sunyang1988(金币+1): 谢谢交流 2011-06-01 18:34:14
楼主的函数文件里面,好像没有涉及到x的啊,还有你的x=x/214.63;啥意思?
Comeon!
2楼2011-05-31 10:06:39
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

vs570588

木虫 (正式写手)

引用回帖:
Originally posted by lidaxue at 2011-05-31 10:06:39:
楼主的函数文件里面,好像没有涉及到x的啊,还有你的x=x/214.63;啥意思?

谢谢你回复,这是我的问题,你看看,有啥办法能解决?ds/dt  =  -q*S*X/(k+S)这里未知参数是q和K, q是比最大降解速率,K是半饱和常数,X是污泥浓度214.63,这个值是定值。S是污染物的浓度, t肯定就是时间了。我具体试验是隔一段时间,取一个样品测出S,所以我最原始数据是
t=[0 2 7 9 19 22 24 26 28 30 32 40];
S=[255.55 246.44 237.28 228.36 136.08 114 99.16 82.33 69.4 56.94 42.31 0];
就那这一组数据来拟合出上面微分方程里中的未知参数。你看能用啥好办法?另外,我也看宋新山《matlab在环境科学中的应用》,上面也用个例子,但是有个例子直接给出了一系列ds/dt的值,并且这些值呈递增。但你也知道,实际试验不会出现这种理想情况。所以我求ds/dt值是用多项式拟合,求各个点的导数,肯定这样误差大。但我实在想不出好办法。也有人说用有限差分法,求出数值解,再代入,求最优化参数。
3楼2011-05-31 16:42:18
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

lidaxue

木虫 (正式写手)

之乎者也

【答案】应助回帖


sunyang1988(金币+1): 谢谢交流 2011-06-01 18:34:23
vs570588(金币+1): 谢谢你了 2011-06-05 20:54:19
楼主你好,看了你的问题,其实不是很难,请楼主参考我给你的ppt,里面有个问题和你的问题比较相似,时间挺紧,还请楼主多多努力!
Comeon!
4楼2011-05-31 18:47:03
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
信息提示
请填处理意见