Fitting a fermentation curve with Modified Gompertz
Microbial growth and fermentation data have a characteristic shape: a flat lag phase, an exponential ramp, and a plateau. The Modified Gompertz model is the standard three-parameter fit. Here is how to do it in Milimetrica end-to-end.
The model
Zwietering et al. reformulated the classical Gompertz function so that all three parameters have a direct biological meaning. The Modified Gompertz equation is:
y(t) = A · exp( -exp( (Rm·e / A) · (λ − t) + 1 ) )
Where:
- A — the asymptotic plateau value (carrying capacity for cell density, ultimate yield for cumulative biogas, etc.)
- Rm — the maximum specific growth rate; the slope of the curve at its inflection point
- λ (lambda) — the lag-phase duration; the x-intercept of the tangent at the inflection
- e — Euler's number (≈ 2.71828)
Reference: Zwietering, M. H., Jongenburger, I., Rombouts, F. M., & van 't Riet, K. (1990). Modeling of the bacterial growth curve. Applied and Environmental Microbiology, 56(6), 1875–1881. It remains one of the most-cited models for sigmoidal growth in food microbiology, biogas production, and bioprocess engineering.
Example data
A simplified cumulative biogas dataset — production volume vs. time:
time (h): 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 volume (mL): 0.1, 0.2, 0.5, 1.5, 3.5, 5.5, 6.8, 7.4, 7.7, 7.85, 7.9
Eye-balling the data: the plateau (A) sits around 7.9 mL; the inflection is around t ≈ 8 h; the steepest interval is between 6 h and 10 h at roughly 1 mL/h — so the lag (λ) projected by the steep tangent is somewhere between 3 and 4 h.
Plotting it
- Set paper width to
200 mmand height to140 mm. - Set the X scale to
5 h = 40 mmand label the axisTime (h). - Set the Y scale to
1 mL = 12 mmand label the axisVolume (mL). - Paste the X and Y values into the data section.
- In Connection, select Gompertz.
The fitted curve will trace the characteristic S-shape: nearly flat at the start (the lag), sweeping up through the inflection around t = 7–9 h, then easing into the plateau just below 8 mL.
How the fit works
Unlike linear regression, Modified Gompertz is non-linear in its parameters, so there is no closed-form solution. Milimetrica uses the Levenberg-Marquardt algorithm with a forward-difference numerical Jacobian:
- Seed parameters from the data:
A₀ = max(y),Rm₀ = max consecutive slope,λ₀ = min(x). - At each step, compute residuals
r = y − f(x; params)and the Jacobian by perturbing each parameter slightly. - Solve the damped normal equations
(JᵀJ + μ·diag(JᵀJ)) · δ = Jᵀrfor the stepδ. - If the new parameters reduce the sum of squared residuals, accept them and decrease
μ; otherwise reject and increaseμ(this is what makes LM more robust than pure Gauss-Newton for poorly conditioned problems).
Iteration stops when the relative improvement falls below ~10⁻¹⁰ or after 200 iterations. The fit returns null when the data is degenerate (fewer than 3 points, no variation, or divergence) and the curve simply isn't drawn — better than showing a misleading fit.
When to use which model
- Modified Gompertz — asymmetric S-curve, rises faster than it plateaus. Standard for bacterial growth with a lag phase, biogas / methane cumulative production, food microbiology shelf-life.
- Logistic (not in V1) — symmetric S-curve. Simpler, fewer biological assumptions. Used when the lag phase is short or absent.
- Monod / Michaelis-Menten (not in V1) — hyperbolic. Good for rate vs. substrate concentration, not time series.