How far has the sugar fermented, and at which gravity do the 1/3 and 1/2 sugar breaks fall?
D = max(OG − FG, ΔSGmin)pct = clamp(100 · (OG − SG) / D, 0, 100)SG⅓ = OG − D · p⅓ / 100; SG½ = OG − D · p½ / 100sugar break SGb = OG − (OG − FG) / 3, rounded to 0.001
Results
- pct (%)
- SG⅓ (SG)
- SG½ (SG)
- SGb (SG)
Constants
- ΔSGmin
- MeadBrew calibration
- p⅓
- 33.33%
- p½
- MeadBrew calibration
Sources
- Moutela S., TOSNA (Tailored Organic Staggered Nutrient Additions): nutrient additions up to the one-third sugar break
Not modelled yet
- Sugar added after pitching when there is no forecast
- Noise in gravity readings
Should the next reading be taken with a hydrometer or a refractometer?
before pitch: both instruments until a WCF is calibrated, then eitherpackaged, backsweetened or stabilised: hydrometergravity flat: every reading since the last sugar addition within δ of SGlast over ≥ hflat hours and OG − SGlast > δ → hydrometerrefractometer reading outside the alcohol-correction valid range → hydrometerfermentable sugar added after pitch → bothtransfer step due within dfg days → hydrometerwhole fruit in primary: refractometer until pitch + dfruit daysotherwise: refractometer
Constants
- δ
- MeadBrew calibration
- hflat
- MeadBrew calibration
- dfg
- MeadBrew calibration
- dfruit
- MeadBrew calibration
Not modelled yet
- The precision of each instrument model
- Degassing the sample
When will the 1/3 sugar break come, and when should the pH and the final gravity be checked?
SG_break = OG − (OG − FG) × F_breakt_break = first hour with SG(t) ≤ OG_c − (OG_c − FG) × F_break on the predicted curve, t_fallback without a curve; an observed reading at or below SG_break turns it into a due additionFG_exp = max(FG, min SG(t))t_pH = first hour with SG(t) ≤ OG_c − (OG_c − FG_exp) × F_pH, cleared by a pH reading after t_pH − L_pHt_FG = (first hour with SG(t) ≤ FG_exp + δ_FG) + D_FG, cleared by a manual gravity reading after t_FG − L_FG
Inputs
- OG (SG)
- FG (SG)
- OG_c (SG)
- SG(t) (SG)
Results
- SG_break (SG)
- t_break (h)
- FG_exp (SG)
- t_pH (h)
- t_FG (h)
Constants
- F_break
- 0.3333333333333333
- t_fallback
- MeadBrew calibration
- F_pH
- MeadBrew calibration
- L_pH
- MeadBrew calibration
- δ_FG
- MeadBrew calibration
- D_FG
- MeadBrew calibration
- L_FG
- MeadBrew calibration
Sources
- Moutela S., TOSNA 2.0 (Tailored Organic Staggered Nutrient Additions), Mead Made Right: YAN target = °Bx × SG × 10 × nitrogen demand multiplier, organic additions staggered up to the 1/3 sugar break, Fermaid O with GO-FERM rehydration counted at 160 ppm YAN per g/L
- MeadBrew's own model
Valid for
- OG from 1 SG to 1.2 SG
- FG from 0.98 SG to 1.1 SG
Not modelled yet
- Reading noise
- Sensor offset calibration
- Rescheduling after a stall
When do pH and temperature readings raise an alert during fermentation?
r_pH = −ΔpH ÷ Δt and r_T = ΔT ÷ Δt over the last two readings, used only when Δt ≥ Δt_minalert = acid_crash_risk if pH < pH_crashalert = rapid_ph_drop if no buffer row, r_pH ≥ r_pH_max and pH < pH_ratealert = temperature_stress if T < T_min or T > T_maxalert = temperature_swing if |r_T| ≥ r_T_maxalert = finished_ph_high for mead and cider if pH > pH_finished
Inputs
- pH
- T (°C)
- Δt (h)
- T_min (°C)
- T_max (°C)
Constants
- Δt_min
- MeadBrew calibration
- pH_crash
- MeadBrew calibration
- pH_rate
- MeadBrew calibration
- r_pH_max
- MeadBrew calibration
- r_T_max
- MeadBrew calibration
- pH_finished
- MeadBrew calibration
Valid for
- pH from 2 to 5
- Δt from 0 h
Not modelled yet
- Sensor drift
- The difference between room and must temperature
- The buffer capacity of each honey
Where does a step-fed mead finish once every feed has fermented?
ρ_i = honey density from moisture for honey, SG_sucrose × 1000 × ρ_w for sucrose, solution or sweetener density otherwiseV_s = V_0 + Σ m_i ÷ ρ_iOG_s = (V_0 × OG + Σ m_i ÷ (1000 × ρ_w)) ÷ V_sOG_f = OG_s − SPFG_app = OG_f − (OG_f − 1) × A ÷ 100 + SPFG_dex = max(FG_tol, max(1, OG_f − (OG_f − 1) × min(100, A_yeast) ÷ 100) + SP), A_yeast = A_default when the yeast has no attenuationFG = max(FG_model, SG_stop) when fermentation is arrested at SG_stop
Inputs
- OG (SG)
- V_0 (L)
- m_i (g)
- SP
- A (%)
- A_yeast (%)
- FG_tol (SG)
- FG_model (SG)
- SG_stop (SG)
Results
- ρ_i (g/L)
- V_s (L)
- OG_s (SG)
- OG_f (SG)
- FG_app (SG)
- FG_dex (SG)
- FG (SG)
Constants
- ρ_w
- 0.998203
- SG_sucrose
- 1.587SG
- A_default
- MeadBrew calibration
Sources
- Rumble J. R. (ed.), CRC Handbook of Chemistry and Physics: dissociation constant of benzoic acid (pKa 4.20 at 25 °C), density of water at 20 °C and of sucrose
- MeadBrew's own model
Valid for
- OG from 1 SG to 1.2 SG
- V_0 from 0 L
- A from 0 % to 100 %
- A_yeast from 0 % to 100 %
Not modelled yet
- The effect of temperature on attenuation
- The effect of nutrient status on the final gravity
- Step feed timing
How will the gravity and the pH change day by day before any reading is logged?
S₀ = 1000·(OG − 1), S_fg = 1000·(FG − 1), X₀ = x₀, E₀ = 0, N₀ = max(YAN_nat, N_min)t_lag = L(OG) + t_nb when the must is not boiled, r_max = R(OG) (piecewise-linear calibration tables over OG)g(t) = 1 / (1 + exp(−k_g·(t − t_lag)))N_eff = m_org·N when no DAP is dosed, else N; f_N = N_eff / (K_N + N_eff)E_max = y_ABV·ABV_tol, or E_def without a yeast tolerance; f_E = max(0, 1 − (min(E / E_max, 1))^α)f_S = (S − S_fg) / (K_S + (S − S_fg))c = c_pH when the must is unbuffered and pH < pH_crit, else 1P_j(t) = sin(π·(t − t_j)) for 0 ≤ t − t_j ≤ 1, else 0; nutrient additions N_j at days t_j from the TOSNA scheduledS/dt = −r_max·X·g·f_E·c·f_S·(1 + β_N·Σ P_j(t))dX/dt = μ_X·g·f_N·f_E·X·(1 − X)dE/dt = −y_E·dS/dtdN/dt = −q_N·max(dX/dt, 0) + Σ N_j·(π/2)·P_j(t)pH_floor = pH_buf when buffered, else max(2.6, pH₀ − Δ_fruit) with fruit or max(2.6, pH₀ − Δ_plain) withoutdpH/dt = −k_a·g·exp(−max(t − t_lag, 0) / τ_pH)·max(pH − pH_floor, 0)SG(t) = 1 + S(t)/1000 and pH(t), integrated with fourth-order Runge-Kutta from day 0
Inputs
- OG (SG)
- FG (SG)
- YAN_nat (ppm)
- ABV_tol (%)
- pH₀
- N_j (ppm)
- t_j (d)
- t (d)
Constants
- x₀
- MeadBrew calibration
- N_min
- MeadBrew calibration
- t_nb
- MeadBrew calibration
- k_g
- MeadBrew calibration
- m_org
- MeadBrew calibration
- K_N
- MeadBrew calibration
- y_ABV
- MeadBrew calibration
- E_def
- MeadBrew calibration
- α
- MeadBrew calibration
- K_S
- MeadBrew calibration
- c_pH
- MeadBrew calibration
- pH_crit
- MeadBrew calibration
- β_N
- MeadBrew calibration
- μ_X
- MeadBrew calibration
- y_E
- MeadBrew calibration
- q_N
- MeadBrew calibration
- pH_buf
- MeadBrew calibration
- Δ_fruit
- MeadBrew calibration
- Δ_plain
- MeadBrew calibration
- k_a
- MeadBrew calibration
- τ_pH
- MeadBrew calibration
Sources
- Monod J (1949) The growth of bacterial cultures. Annual Review of Microbiology 3:371-394
- Luong JHT (1985) Kinetics of ethanol inhibition in alcohol fermentation. Biotechnology and Bioengineering 27(3):280-285
- MeadBrew's own model
Valid for
- OG from 1 SG to 1.22 SG
- t from 0 d
Not modelled yet
- Temperature
- Dissolved oxygen
- Pitch rate
- Inhibition by sulfite
- Fermentation speed of each strain
- Carbon dioxide leaving the must
Which final gravity, rate and lag does the forecast assume before your readings?
FG₀ = FG_target when set, else min(max(OG − A·(OG − 1), FG_floor), OG − Δ_min)λ₀ = λ_def, μ₀ = (OG − FG₀)·C(f_c) / (e·max(D − λ₀, 1)), C(f) = 1 − ln(−ln f)with a predicted recipe curve, (FG₀, μ₀, λ₀) is the Gompertz fit to that curve insteadFG_max = min(OG − Δ_min, FG₀ + max(u_fg, u_frac·(OG − FG₀))), FG_min = min(max(FG_abs, FG₀ − d_fg, min(FG_floor, FG₀)), FG_max)μ ∈ [μ_lo, μ_hi], λ ∈ [0, λ_hi]σ_FG = clamp(s_fg·(OG − FG₀), σ_fg,lo, σ_fg,hi)σ_μ = clamp(s_mu·μ₀, σ_mu,lo, σ_mu,hi)σ_λ = clamp(s_lam·λ₀, σ_lam,lo, σ_lam,hi)golden batch (at least n_gold milestones): SG_i' = OG − (SG_start − SG_i)·(OG − 1)/(SG_start − 1), σ_i = max(σ_hyd, σ_gold / √n_batches_i), fitted to the Gompertz curve with the generic prior
Inputs
- OG (SG)
- FG_target (SG)
- SG_i (SG)
- SG_start (SG)
- n_batches_i
Results
- FG₀ (SG)
- μ₀ (SG/d)
- λ₀ (d)
- σ_FG (SG)
- σ_μ (SG/d)
- σ_λ (d)
- FG_max (SG)
- FG_min (SG)
Constants
- A
- MeadBrew calibration
- FG_floor
- MeadBrew calibration
- λ_def
- MeadBrew calibration
- D
- MeadBrew calibration
- μ_lo
- MeadBrew calibration
- μ_hi
- MeadBrew calibration
- λ_hi
- MeadBrew calibration
- f_c
- MeadBrew calibration
- Δ_min
- MeadBrew calibration
- u_fg
- MeadBrew calibration
- u_frac
- MeadBrew calibration
- d_fg
- MeadBrew calibration
- FG_abs
- MeadBrew calibration
- s_fg
- MeadBrew calibration
- σ_fg,lo
- MeadBrew calibration
- σ_fg,hi
- MeadBrew calibration
- s_mu
- MeadBrew calibration
- σ_mu,lo
- MeadBrew calibration
- σ_mu,hi
- MeadBrew calibration
- s_lam
- MeadBrew calibration
- σ_lam,lo
- MeadBrew calibration
- σ_lam,hi
- MeadBrew calibration
- n_gold
- MeadBrew calibration
- σ_gold
- MeadBrew calibration
- σ_hyd
- MeadBrew calibration
Sources
- Zwietering MH, Jongenburger I, Rombouts FM, van 't Riet K (1990) Modeling of the bacterial growth curve. Applied and Environmental Microbiology 56(6):1875-1881
- MeadBrew's own model
Valid for
- OG from 1 SG to 1.2 SG
- n_batches_i from 1
Not modelled yet
- Temperature
- Fermentation speed of each strain
- Pitch rate
- Honey that differs from batch to batch
How much weight does each hydrometer, refractometer or sensor reading get?
σ_i = σ_hyd for a hydrometer reading and for the OG anchor at day 0σ_i = σ_ref for a refractometer reading, σ_unk for an unknown instrumentσ_i = σ_sen·√(n_d / n_ref) for sensor readings when n_d > n_ref, else σ_senn_d = (number of hourly sensor medians − 1) / sensor span in days
Constants
- σ_hyd
- MeadBrew calibration
- σ_ref
- MeadBrew calibration
- σ_unk
- MeadBrew calibration
- σ_sen
- MeadBrew calibration
- n_ref
- MeadBrew calibration
Not modelled yet
- Instrument calibration offset
- Error in the temperature correction
- Sensor drift
Where will this batch finish, fitted to the readings you have logged?
SG(t) = OG − (OG − FG)·exp(−exp(μ·e/(OG − FG)·(λ − t) + 1))z_i = (SG_i − SG(t_i)) / σ_i, ρ(z) = z²/2 when |z| ≤ k, else k·(|z| − k/2)(FG, μ, λ) = argmin Σ ρ(z_i) + Σ ((θ_j − θ₀_j) / σθ_j)² / 2, solved by Levenberg-Marquardt inside the prior boundsw_i = 1 when |z_i| ≤ k, else k/|z_i|d_eff = clamp(tr((F + Σθ⁻¹)⁻¹·F), 0, 3), F = Σ w_i·J_iᵀJ_i/σ_i²β = max(1, Σ w_i·(SG_i − SG(t_i))²/σ_i² / max(1, Σ w_i − d_eff)) when n ≥ n_B, else 1Σ_post = (F/β + Σθ⁻¹)⁻¹wrms = √(Σ w_i·(SG_i − SG(t_i))² / Σ w_i)
Inputs
- OG (SG)
- t_i (d)
- SG_i (SG)
- σ_i (SG)
- θ₀_j
- σθ_j
- n
- t (d)
Results
- FG (SG)
- μ (SG/d)
- λ (d)
- SG(t) (SG)
- w_i
- d_eff
- β
- Σ_post
- wrms (SG)
Constants
- k
- 1.345
- n_B
- MeadBrew calibration
Sources
- Zwietering MH, Jongenburger I, Rombouts FM, van 't Riet K (1990) Modeling of the bacterial growth curve. Applied and Environmental Microbiology 56(6):1875-1881
- Huber PJ (1964) Robust estimation of a location parameter. Annals of Mathematical Statistics 35(1):73-101
- Holland PW, Welsch RE (1977) Robust regression using iteratively reweighted least-squares. Communications in Statistics - Theory and Methods 6(9):813-827
- Marquardt DW (1963) An algorithm for least-squares estimation of nonlinear parameters. Journal of the Society for Industrial and Applied Mathematics 11(2):431-441
- Birge RT (1932) The calculation of errors by the method of least squares. Physical Review 40(2):207-227
Valid for
- OG from 1 SG to 1.2 SG
- σ_i from 0 SG
Not modelled yet
- Temperature
- Fermentation in several phases
- Errors shared between readings
- Yeast dying off
On which day will fermentation finish, and how sure is that date?
C = 1 − ln(−ln f_c)t_f = λ + (OG − FG)/(μ·e)·Ct_r: the day after the inflection where |dSG/dt| = μ·e·u·exp(−u) falls to r_stop, u = exp(μ·e/(OG − FG)·(λ − t) + 1)ETA = max(t_f, t_r), kept at or after the last reading while the batch is still activeg = (−C/(μ·e), −(OG − FG)·C/(μ²·e), 1)h = clamp(z·√(gᵀ·Σ_post·g), h_min, h_max)band = [ETA − h, ETA + h]
Inputs
- OG (SG)
- FG (SG)
- μ (SG/d)
- λ (d)
- Σ_post
Results
- t_f (d)
- t_r (d)
- ETA (d)
- h (d)
Constants
- f_c
- MeadBrew calibration
- r_stop
- MeadBrew calibration
- z
- 1.645
- h_min
- MeadBrew calibration
- h_max
- MeadBrew calibration
Sources
- Zwietering MH, Jongenburger I, Rombouts FM, van 't Riet K (1990) Modeling of the bacterial growth curve. Applied and Environmental Microbiology 56(6):1875-1881
- Abramowitz M, Stegun IA (1964) Handbook of Mathematical Functions, National Bureau of Standards Applied Mathematics Series 55, chapter 26 (normal probability function)
Not modelled yet
- Uncertainty that is not normally distributed
- Temperature
- Interventions during the process
How far can the forecast be trusted so far?
p = clamp((OG − SG_min) / max(OG − FG, 0.0001), 0, 1)a = 1 − exp(−n_eff / n_s)b = p_0 + (1 − p_0)·pq = exp(−(wrms / w_s)²) when n_eff > 0, else 1v = 1 / (1 + h / max(t_f, t_min))confidence = clamp(c_min + c_span·a·b·q·v, c_min, c_max)
Inputs
- OG (SG)
- FG (SG)
- SG_min (SG)
- n_eff
- wrms (SG)
- h (d)
- t_f (d)
Constants
- c_min
- MeadBrew calibration
- c_max
- MeadBrew calibration
- c_span
- MeadBrew calibration
- n_s
- MeadBrew calibration
- p_0
- MeadBrew calibration
- w_s
- MeadBrew calibration
- t_min
- MeadBrew calibration
Valid for
- n_eff from 0
- confidence from 15 % to 98 %
Not modelled yet
- A calibrated probability
- Instrument bias
Has fermentation started yet?
Δ_crit = max(z_lag·√2·σ, Δ_lag, f_lag·(OG − FG₀))active when OG − SG_last ≥ Δ_crit; the exit day is λ of the fit (enough readings) or the linear crossing of Δ_critotherwise status = lag_stalled when t_last > max(t_stall, λ₀ + k_stall·σ_λ)status = lag_extended when t_last > max(t_ext, λ₀ + k_ext·σ_λ), else status = in_lag
Inputs
- OG (SG)
- FG₀ (SG)
- σ (SG)
- SG_last (SG)
- t_last (d)
- λ₀ (d)
- σ_λ (d)
Constants
- z_lag
- MeadBrew calibration
- Δ_lag
- MeadBrew calibration
- f_lag
- MeadBrew calibration
- t_stall
- MeadBrew calibration
- k_stall
- MeadBrew calibration
- t_ext
- MeadBrew calibration
- k_ext
- MeadBrew calibration
Not modelled yet
- Temperature
- Yeast viability
- Airlock activity
Is fermentation slower than it should be at this point?
Δt = t_last − t_prev ≥ Δt_slug, R = SG_last − FG₀ > max(R_min, f_R·(OG − FG₀)), lag exitedp = clamp((OG − SG_last) / (OG − FG₀), p_min, p_max)r_exp = μ₀·e·p·(−ln p)r_obs = (SG_prev − SG_last) / Δt, ρ = r_obs / r_expstall when Δt ≥ Δt_stall and r_obs < r_stall and ρ < ρ_stallotherwise sluggish when r_obs < r_slug and ρ < ρ_slug
Inputs
- OG (SG)
- FG₀ (SG)
- μ₀ (SG/d)
- SG_prev (SG)
- t_prev (d)
- SG_last (SG)
- t_last (d)
Results
- R (SG)
- r_exp (SG/d)
- r_obs (SG/d)
- ρ
Constants
- Δt_slug
- MeadBrew calibration
- R_min
- MeadBrew calibration
- f_R
- MeadBrew calibration
- p_min
- MeadBrew calibration
- p_max
- MeadBrew calibration
- Δt_stall
- MeadBrew calibration
- r_stall
- MeadBrew calibration
- ρ_stall
- MeadBrew calibration
- r_slug
- MeadBrew calibration
- ρ_slug
- MeadBrew calibration
Sources
- Zwietering MH, Jongenburger I, Rombouts FM, van 't Riet K (1990) Modeling of the bacterial growth curve. Applied and Environmental Microbiology 56(6):1875-1881
- MeadBrew's own model
Not modelled yet
- Temperature
- Yeast viability
- Nutrient status
- The cause of a stall
Did the gravity rise because sugar was added?
T = max(ΔSG_min, k_σ·max(σ_prev, σ_cur))J = SG_cur − SG_path(t_cur), SG_path fitted to the readings before t_curstep feed at t_cur when SG_cur − SG_prev > T and J > Tand SG_next − SG_path(t_next) ≥ f_conf·J and the rise is not an uncorrected refractometer readingrecorded sugar additions are charged from their gravity points instead; readings after a feed are shifted down by J
Inputs
- SG_prev (SG)
- SG_cur (SG)
- SG_next (SG)
- σ_prev (SG)
- σ_cur (SG)
- SG_path (SG)
- t_cur (d)
- t_next (d)
Constants
- ΔSG_min
- MeadBrew calibration
- k_σ
- MeadBrew calibration
- f_conf
- MeadBrew calibration
Not modelled yet
- The type of sugar in a feed
- The volume a feed adds
- Time for an addition to mix in
Was a refractometer reading logged without the alcohol correction?
B: the Brix whose alcohol-corrected refractometer gravity for OG equals SG_fit(t)SG_u = SG(B), the gravity an uncorrected refractometer would showflag a refractometer or unknown-instrument reading after lag exit when SG_obs − SG_fit(t) > r_min and |SG_obs − SG_u| ≤ toltol = tol_high when OG > OG_high, else tol_low; the last reading is skipped while there are at most n_amb readings
Inputs
- OG (SG)
- SG_obs (SG)
- SG_fit(t) (SG)
Constants
- r_min
- MeadBrew calibration
- tol_low
- MeadBrew calibration
- tol_high
- MeadBrew calibration
- OG_high
- MeadBrew calibration
- n_amb
- MeadBrew calibration
Not modelled yet
- Refractometer calibration offset
- A wort correction factor for each instrument
How does this batch track against the average of your past batches?
golden curve: past batches' milestone averages (day, SG) linearly interpolated per daya(t) = (OG − SG(t)) / (OG − FG_target), made non-decreasing after a moving-median filterlive and golden curves are aligned in the attenuation domain: lag offset, time stretch from the ratio of peak attenuation rates, then dynamic time warping on attenuation and rateSG_warp(t): the warped golden curve, non-increasing, linearly interpolatedrmse = √(mean over live readings of (SG_live − SG_warp(t))²)se = max(se_min, (t_done − t_last)·(1 − c_align)·f_se)
Inputs
- OG (SG)
- FG_target (SG)
- SG_live (SG)
- t_last (d)
- t_done (d)
- c_align
Results
- a(t)
- SG_warp(t) (SG)
- rmse (SG)
- se (d)
Constants
- se_min
- MeadBrew calibration
- f_se
- MeadBrew calibration
Not modelled yet
- Temperature
- Different yeast or nutrients from batch to batch
How are your past batches and the readings of this batch combined into one finish date?
D = rmse_align / max(rmse_fit, rmse_floor)φ = exp(−max(0, D − D_max)²)P_align = φ / max(se_align², v_min), P_fit = 1 / max(se_fit², v_min)w = P_align / (P_align + P_fit)ETA = w·ETA_align + (1 − w)·ETA_fitse² = w·(se_align² + (ETA_align − ETA)²) + (1 − w)·(se_fit² + (ETA_fit − ETA)²)h = clamp(z·se, h_min, h_max)mode = align_dominant when w ≥ w_hi, adaptive when w ≤ w_lo, else blended; diverged when φ < φ_min
Inputs
- rmse_align (SG)
- rmse_fit (SG)
- ETA_align (d)
- ETA_fit (d)
- se_align (d)
- se_fit (d)
Constants
- rmse_floor
- MeadBrew calibration
- D_max
- MeadBrew calibration
- v_min
- MeadBrew calibration
- z
- 1.645
- h_min
- MeadBrew calibration
- h_max
- MeadBrew calibration
- w_hi
- MeadBrew calibration
- w_lo
- MeadBrew calibration
- φ_min
- MeadBrew calibration
Sources
- Abramowitz M, Stegun IA (1964) Handbook of Mathematical Functions, National Bureau of Standards Applied Mathematics Series 55, chapter 26 (normal probability function)
- MeadBrew's own model
Valid for
- se_align from 0 d
- se_fit from 0 d
Not modelled yet
- Correlation between the two forecasts