Plotting vs Fitting, why is different?
Afficher commentaires plus anciens
Hello, I want to follow up another problem regarding my previous question ( link here ). So, I have tried fitting the graph to the experimental data and also plot the model, both with the exact same parameters, however the results are different. I expect the plot to be similar looking, but they are not.
(left figure is for fitting, right figure is for plotting the model)
Here is the reference of what I actually want to achieve from the fitting and plotting the graph:

I have attach both of the files. Can you help me with this? Why are my fitting and plotting have different result? And maybe does anyone know how to do fitting like the reference I send above? I feel like it needs a different code (probably like a discontinue method or something, it seems like that to me because the reference's model is not a smooth curve). Thank you so much for your attention, any advices and answers are super welcomed!
7 commentaires
Cris LaPierre
le 3 Jan 2022
Look at your blue Y-axis values in the plot on the right. They start at -45. This suggests that your model for Substrat is not very good, meaning it does not do a good job modeling the data. Try seeing if you can improve the fit of that model.
Regina Maria
le 3 Jan 2022
Cris LaPierre
le 3 Jan 2022
Modifié(e) : Cris LaPierre
le 3 Jan 2022
You're not really fitting if you are using ode45. How did you come up with the parameters for your differential equations?
- Miumax,Ks,Kxi,KXI,CXm,CPm,Miupx,YPX,KPS,Kpi,KPI,KP,Miusx,YXS,YPS
Cris LaPierre
le 4 Jan 2022
How did you determine the values of the experimental data (matrix c)?
How did you come up with your equation for dCx/dt: dCdt(1,:) = mu*C(1);
I used your equations to try to recreate figures 3 and 4 in the linked paper, which I figured would be easier, and got nothing close.
Regina Maria
le 4 Jan 2022
Cris LaPierre
le 4 Jan 2022
Modifié(e) : Cris LaPierre
le 4 Jan 2022
A couple other things to look into. First, consider adding a 'NonNegative' contraint on the solution. Your bioreactor cannot create negative concentrations.
opts = odeset('NonNegative',1:3);
Second, verify the units. The paper appears to be quite careless about this. For example,
has units mg/L, and
has units of g/L, yet somehow
works. I'm even more concerned about light intensity with units
. For example, in equation 4 (μ), part of the calculation is
yet
has units g/L. Then somehow the resulting unit of the entire calculation is 1/day. Where did
and
go?
Star Strider
le 8 Jan 2022
Please check the coding for the differential equations (specifically ‘miu’ and all the ‘dcdt’), since I suspect there may be problems.
I ran this optimisation for two days (with occasional interruptions and re-starts when the integration crashed) using the ga (genetic algorithm) function (that is in my esperience extremely robust), and could not get it to converge on a solution.
.
Réponses (0)
Catégories
En savoir plus sur Get Started with Curve Fitting Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!