Using splines to find the Area Under the Curve

Using splines to find the Area Under the Curve - In these two worksheet the Area Under the Curve is found for a biomass batch reactor and a pulse - 消息

#1 已发布: 2023/5/15 20:34:26
Javier Ochoa

Javier Ochoa

3个赞,共26个帖子。

组: User

Hi,

These two examples solve the problem calculations for the total biomass formed in a batch bioreactor and the pattern flow of a reactor with a pulse of some tracer. The splines method and the Simpson integration formula found in the forum let me solve both problems.


Kind regards,


splines_integral_data.sm (30.28 KiB)已下载 1685 次。

splines_integral_data1.sm (31.52 KiB)已下载 1670 次。
1位用户喜欢此帖子
Oscar Campo 2023/5/26 07:10:00
#2 已发布: 2023/5/22 15:02:07
CBG

CBG

78个赞,共312个帖子。

组: User

Hello

Fitting Javier's data to the Gauss function by the Levenberg-Marquardt Algorithm

Fit_Javier_LMA.png

Javier_fit_CBG.sm (37.14 KiB)已下载 1662 次。


Best Regards

Carlos
1位用户喜欢此帖子
Javier Ochoa 2023/5/22 15:20:00
#3 已发布: 2023/5/22 15:56:44
Javier Ochoa

Javier Ochoa

3个赞,共26个帖子。

组: User

Hi Jean and Carlos,
These worksheets help me to better understand the problem which I tried to solve.

Thanks in advance,

#4 已发布: 2023/5/23 16:29:20
Javier Ochoa

Javier Ochoa

3个赞,共26个帖子。

组: User

Hi Jean and Carlos,

I am curious about your thoughts for the result I found using the al_nlqsolve routine from ALGLIB.

May be I was lucky to find a similar solution.

Kind regards,


LevenbergMarquardt_solver.sm (27.68 KiB)已下载 1702 次。
#5 已发布: 2023/5/24 00:30:27
CBG

CBG

78个赞,共312个帖子。

组: User

Wrote

Hi Jean and Carlos,

I am curious about your thoughts for the result I found using the al_nlqsolve routine from ALGLIB.

May be I was lucky to find a similar solution.

Kind regards,


LevenbergMarquardt_solver.sm (27.68 KiB)已下载 1702 次。



Hi Javier
As you can see in the graph, the green line is that of your solution,
and it is not correct, since it does not fit the data.

javier_fit2.png

It is always important to draw the curve

Javier fit.sm (24.31 KiB)已下载 1637 次。

Best Regards

Carlos

1位用户喜欢此帖子
Javier Ochoa 2023/5/24 09:31:00
#6 已发布: 2023/5/24 03:41:54
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

Hola Javier. Your Levenberg Marquardt algorithm works pretty well, but you choose a bad guess starting point, with a very high tolerance. BTW, I made some few modifications and use also other target function.

LevenbergMarquardt_solver.sm (32.85 KiB)已下载 1685 次。
LevenbergMarquardt_solver.pdf (233.35 KiB)已下载 1030 次。

Best regards.
Alvaro.
2位用户喜欢此帖子
Javier Ochoa 2023/5/24 09:31:00, Вячеслав Мезенцев 2023/5/24 04:21:00
#7 已发布: 2023/5/24 15:52:25
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

Wrote

Hi,

These two examples solve the problem calculations for the total biomass formed in a batch bioreactor and the pattern flow of a reactor with a pulse of some tracer. The splines method and the Simpson integration formula found in the forum let me solve both problems.


Kind regards,


splines_integral_data.sm (30.28 KiB)已下载 1685 次。

splines_integral_data1.sm (31.52 KiB)已下载 1670 次。



Hola Javier. You can also use this code for integrate and differentiate tabulated data.

Click to enlarge

splines_integral_data.sm (85.66 KiB)已下载 1677 次。

splines_integral_data.pdf (180.67 KiB)已下载 960 次。

Best regards.
Alvaro.
1位用户喜欢此帖子
Javier Ochoa 2023/5/29 09:25:00
#8 已发布: 2023/5/25 13:16:26
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

.. refreshed/augmented.
Cheers ... Jean.

Inst_Frechet GAUSSIAN.sm (92.39 KiB)已下载 1740 次。
1位用户喜欢此帖子
Javier Ochoa 2023/5/29 09:25:00
  • 有新帖
  • 无新帖