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 - Messages

#1 Posted: 5/15/2023 8:34:26 PM
Javier Ochoa

Javier Ochoa

3 likes in 26 posts.

Group: 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 KiB) downloaded 52 time(s).

splines_integral_data1.sm (31 KiB) downloaded 48 time(s).
1 users liked this post
Oscar Campo 5/26/2023 7:10:00 AM
#2 Posted: 5/22/2023 3:02:07 PM
CBG

CBG

77 likes in 312 posts.

Group: User

Hello

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

Fit_Javier_LMA.png

Javier_fit_CBG.sm (37 KiB) downloaded 35 time(s).


Best Regards

Carlos
1 users liked this post
Javier Ochoa 5/22/2023 3:20:00 PM
#3 Posted: 5/22/2023 3:56:44 PM
Javier Ochoa

Javier Ochoa

3 likes in 26 posts.

Group: User

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

Thanks in advance,

#4 Posted: 5/23/2023 4:29:20 PM
Javier Ochoa

Javier Ochoa

3 likes in 26 posts.

Group: 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 KiB) downloaded 34 time(s).
#5 Posted: 5/24/2023 12:30:27 AM
CBG

CBG

77 likes in 312 posts.

Group: 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 KiB) downloaded 34 time(s).



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 KiB) downloaded 28 time(s).

Best Regards

Carlos

1 users liked this post
Javier Ochoa 5/24/2023 9:31:00 AM
#6 Posted: 5/24/2023 3:41:54 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: 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 KiB) downloaded 35 time(s).
LevenbergMarquardt_solver.pdf (233 KiB) downloaded 31 time(s).

Best regards.
Alvaro.
2 users liked this post
Javier Ochoa 5/24/2023 9:31:00 AM, Вячеслав Мезенцев 5/24/2023 4:21:00 AM
#7 Posted: 5/24/2023 3:52:25 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: 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 KiB) downloaded 52 time(s).

splines_integral_data1.sm (31 KiB) downloaded 48 time(s).



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

Click to enlarge

splines_integral_data.sm (85 KiB) downloaded 38 time(s).

splines_integral_data.pdf (180 KiB) downloaded 32 time(s).

Best regards.
Alvaro.
1 users liked this post
Javier Ochoa 5/29/2023 9:25:00 AM
#8 Posted: 5/25/2023 1:16:26 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

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

Inst_Frechet GAUSSIAN.sm (92 KiB) downloaded 34 time(s).
1 users liked this post
Javier Ochoa 5/29/2023 9:25:00 AM
  • New Posts New Posts
  • No New Posts No New Posts