← All Use Cases
🍺
Central Composite Design

Hard Cider Fermentation

Central composite design to maximize flavor clarity and target ABV by tuning yeast pitch rate, fermentation temperature, and sugar addition

Summary

This experiment investigates hard cider fermentation. Central composite design to maximize flavor clarity and target ABV by tuning yeast pitch rate, fermentation temperature, and sugar addition.

The design varies 3 factors: pitch rate g L (g/L), ranging from 0.5 to 2.0, ferm temp c (C), ranging from 12 to 22, and sugar add g L (g/L), ranging from 0 to 50. The goal is to optimize 2 responses: flavor clarity (pts) (maximize) and abv pct (%) (maximize). Fixed conditions held constant across all runs include apple variety = mixed_cider, yeast = champagne.

A Central Composite Design (CCD) was selected to fit a full quadratic response surface model, including curvature and interaction effects. With 3 factors this produces 22 runs including center points and axial (star) points that extend beyond the factorial range.

Quadratic response surface models were fitted to capture potential curvature and factor interactions. The RSM contour plots below visualize how pairs of factors jointly affect each response.

Key Findings

For flavor clarity, the most influential factors were pitch rate g L (46.2%), sugar add g L (31.6%), ferm temp c (22.2%). The best observed value was 8.9 (at pitch rate g L = 2.61931, ferm temp c = 17, sugar add g L = 25).

For abv pct, the most influential factors were ferm temp c (53.2%), sugar add g L (24.9%), pitch rate g L (22.0%). The best observed value was 8.8 (at pitch rate g L = 1.25, ferm temp c = 17, sugar add g L = 25).

Recommended Next Steps

Experimental Setup

Factors

FactorLowHighUnit
pitch_rate_g_L0.52.0g/L
ferm_temp_c1222C
sugar_add_g_L050g/L

Fixed: apple_variety = mixed_cider, yeast = champagne

Responses

ResponseDirectionUnit
flavor_clarity↑ maximizepts
abv_pct↑ maximize%

Configuration

use_cases/240_cider_making/config.json
{ "metadata": { "name": "Hard Cider Fermentation", "description": "Central composite design to maximize flavor clarity and target ABV by tuning yeast pitch rate, fermentation temperature, and sugar addition" }, "factors": [ { "name": "pitch_rate_g_L", "levels": [ "0.5", "2.0" ], "type": "continuous", "unit": "g/L" }, { "name": "ferm_temp_c", "levels": [ "12", "22" ], "type": "continuous", "unit": "C" }, { "name": "sugar_add_g_L", "levels": [ "0", "50" ], "type": "continuous", "unit": "g/L" } ], "fixed_factors": { "apple_variety": "mixed_cider", "yeast": "champagne" }, "responses": [ { "name": "flavor_clarity", "optimize": "maximize", "unit": "pts" }, { "name": "abv_pct", "optimize": "maximize", "unit": "%" } ], "settings": { "operation": "central_composite", "test_script": "use_cases/240_cider_making/sim.sh" } }

Experimental Matrix

The Central Composite Design produces 22 runs. Each row is one experiment with specific factor settings.

Runpitch_rate_g_Lferm_temp_csugar_add_g_L
11.251725
221250
30.5220
41.2526.128725
51.251725
6-0.1193061725
71.2517-20.6435
81.251725
92220
102.619311725
111.251725
121.257.8712925
131.251725
140.51250
151.251725
162120
171.251770.6435
1822250
191.251725
200.5120
210.52250
221.251725

Step-by-Step Workflow

1

Preview the design

Terminal
$ doe info --config use_cases/240_cider_making/config.json
2

Generate the runner script

Terminal
$ doe generate --config use_cases/240_cider_making/config.json \ --output use_cases/240_cider_making/results/run.sh --seed 42
3

Execute the experiments

Terminal
$ bash use_cases/240_cider_making/results/run.sh
4

Analyze results

Terminal
$ doe analyze --config use_cases/240_cider_making/config.json
5

Get optimization recommendations

Terminal
$ doe optimize --config use_cases/240_cider_making/config.json
6

Multi-objective optimization

With 2 competing responses, use --multi to find the best compromise via Derringer–Suich desirability.

Terminal
$ doe optimize --config use_cases/240_cider_making/config.json --multi
7

Generate the HTML report

Terminal
$ doe report --config use_cases/240_cider_making/config.json \ --output use_cases/240_cider_making/results/report.html

Features Exercised

FeatureValue
Design typecentral_composite
Factor typescontinuous (all 3)
Arg styledouble-dash
Responses2 (flavor_clarity ↑, abv_pct ↑)
Total runs22

Analysis Results

Generated from actual experiment runs using the DOE Helper Tool.

Response: flavor_clarity

Top factors: pitch_rate_g_L (46.2%), sugar_add_g_L (31.6%), ferm_temp_c (22.2%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
pitch_rate_g_L44.13791.03451.7240.2282
ferm_temp_c42.63200.65801.0970.4145
sugar_add_g_L46.08541.52132.5360.1134
LackofFit20.00000.0000
PureError74.2000
Error91.85420.6000
Total2114.70950.7005

Pareto Chart

Pareto chart for flavor_clarity

Main Effects Plot

Main effects plot for flavor_clarity

Normal Probability Plot of Effects

Normal probability plot for flavor_clarity

Half-Normal Plot of Effects

Half-normal plot for flavor_clarity

Model Diagnostics

Model diagnostics for flavor_clarity

Response: abv_pct

Top factors: ferm_temp_c (53.2%), sugar_add_g_L (24.9%), pitch_rate_g_L (22.0%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
pitch_rate_g_L43.62820.90700.5480.7057
ferm_temp_c412.67403.16851.9130.1925
sugar_add_g_L44.01401.00350.6060.6685
LackofFit24.70202.3510
PureError711.5950
Error916.29701.6564
Total2136.61321.7435

Pareto Chart

Pareto chart for abv_pct

Main Effects Plot

Main effects plot for abv_pct

Normal Probability Plot of Effects

Normal probability plot for abv_pct

Half-Normal Plot of Effects

Half-normal plot for abv_pct

Model Diagnostics

Model diagnostics for abv_pct

Response Surface Plots

3D surfaces fitted with quadratic RSM. Red dots are observed data points.

abv pct ferm temp c vs sugar add g L

RSM surface: abv pct ferm temp c vs sugar add g L

abv pct pitch rate g L vs ferm temp c

RSM surface: abv pct pitch rate g L vs ferm temp c

abv pct pitch rate g L vs sugar add g L

RSM surface: abv pct pitch rate g L vs sugar add g L

flavor clarity ferm temp c vs sugar add g L

RSM surface: flavor clarity ferm temp c vs sugar add g L

flavor clarity pitch rate g L vs ferm temp c

RSM surface: flavor clarity pitch rate g L vs ferm temp c

flavor clarity pitch rate g L vs sugar add g L

RSM surface: flavor clarity pitch rate g L vs sugar add g L

Multi-Objective Optimization

When responses compete, Derringer–Suich desirability finds the best compromise. Each response is scaled to a 0–1 desirability, then combined via a weighted geometric mean.

Overall Desirability
D = 0.6758

Per-Response Desirability

ResponseWeightDesirabilityPredictedDir
flavor_clarity 1.5
0.6364
7.50 0.6364 7.50 pts
abv_pct 1.0
0.7397
7.50 0.7397 7.50 %

Recommended Settings

FactorValue
pitch_rate_g_L1.25 g/L
ferm_temp_c17 C
sugar_add_g_L25 g/L

Source: from observed run #2

Trade-off Summary

Sacrifice = how much worse than single-objective best.

ResponsePredictedBest ObservedSacrifice
abv_pct7.508.80+1.30

Top 3 Runs by Desirability

RunDFactor Settings
#120.6214pitch_rate_g_L=1.25, ferm_temp_c=17, sugar_add_g_L=-20.6435
#140.5504pitch_rate_g_L=1.25, ferm_temp_c=17, sugar_add_g_L=25

Model Quality

ResponseType
abv_pct0.6389quadratic

Full Multi-Objective Output

doe optimize --multi
============================================================ MULTI-OBJECTIVE OPTIMIZATION Method: Derringer-Suich Desirability Function ============================================================ Overall desirability: D = 0.6758 Response Weight Desirability Predicted Direction --------------------------------------------------------------------- flavor_clarity 1.5 0.6364 7.50 pts ↑ abv_pct 1.0 0.7397 7.50 % ↑ Recommended settings: pitch_rate_g_L = 1.25 g/L ferm_temp_c = 17 C sugar_add_g_L = 25 g/L (from observed run #2) Trade-off summary: flavor_clarity: 7.50 (best observed: 8.90, sacrifice: +1.40) abv_pct: 7.50 (best observed: 8.80, sacrifice: +1.30) Model quality: flavor_clarity: R² = 0.5962 (quadratic) abv_pct: R² = 0.6389 (quadratic) Top 3 observed runs by overall desirability: 1. Run #2 (D=0.6758): pitch_rate_g_L=1.25, ferm_temp_c=17, sugar_add_g_L=25 2. Run #12 (D=0.6214): pitch_rate_g_L=1.25, ferm_temp_c=17, sugar_add_g_L=-20.6435 3. Run #14 (D=0.5504): pitch_rate_g_L=1.25, ferm_temp_c=17, sugar_add_g_L=25

Full Analysis Output

doe analyze
=== Main Effects: flavor_clarity === Factor Effect Std Error % Contribution -------------------------------------------------------------- pitch_rate_g_L 1.9250 0.1784 46.2% sugar_add_g_L 1.3167 0.1784 31.6% ferm_temp_c 0.9250 0.1784 22.2% === ANOVA Table: flavor_clarity === Source DF SS MS F p-value ----------------------------------------------------------------------------- pitch_rate_g_L 4 4.1379 1.0345 1.724 0.2282 ferm_temp_c 4 2.6320 0.6580 1.097 0.4145 sugar_add_g_L 4 6.0854 1.5213 2.536 0.1134 Lack of Fit 2 0.0000 0.0000 0.000 1.0000 Pure Error 7 4.2000 0.6000 Error 9 1.8542 0.6000 Total 21 14.7095 0.7005 === Summary Statistics: flavor_clarity === pitch_rate_g_L: Level N Mean Std Min Max ------------------------------------------------------------ -0.119306 1 6.0000 0.0000 6.0000 6.0000 0.5 4 7.0250 0.2217 6.8000 7.3000 1.25 12 6.5833 0.7234 4.9000 7.5000 2 4 7.2250 1.2473 5.9000 8.9000 2.61931 1 5.3000 0.0000 5.3000 5.3000 ferm_temp_c: Level N Mean Std Min Max ------------------------------------------------------------ 12 4 7.2250 1.2580 5.9000 8.9000 17 12 6.4250 0.8125 4.9000 7.5000 22 4 7.0250 0.1500 6.9000 7.2000 26.1287 1 6.3000 0.0000 6.3000 6.3000 7.87129 1 6.9000 0.0000 6.9000 6.9000 sugar_add_g_L: Level N Mean Std Min Max ------------------------------------------------------------ -20.6435 1 7.5000 0.0000 7.5000 7.5000 0 4 6.6250 0.4856 5.9000 6.9000 25 12 6.3083 0.7217 4.9000 7.1000 50 4 7.6250 0.8539 7.1000 8.9000 70.6435 1 7.1000 0.0000 7.1000 7.1000 === Main Effects: abv_pct === Factor Effect Std Error % Contribution -------------------------------------------------------------- ferm_temp_c 4.6000 0.2815 53.2% sugar_add_g_L 2.1500 0.2815 24.9% pitch_rate_g_L 1.9000 0.2815 22.0% === ANOVA Table: abv_pct === Source DF SS MS F p-value ----------------------------------------------------------------------------- pitch_rate_g_L 4 3.6282 0.9070 0.548 0.7057 ferm_temp_c 4 12.6740 3.1685 1.913 0.1925 sugar_add_g_L 4 4.0140 1.0035 0.606 0.6685 Lack of Fit 2 4.7020 2.3510 1.419 0.3038 Pure Error 7 11.5950 1.6564 Error 9 16.2970 1.6564 Total 21 36.6132 1.7435 === Summary Statistics: abv_pct === pitch_rate_g_L: Level N Mean Std Min Max ------------------------------------------------------------ -0.119306 1 5.9000 0.0000 5.9000 5.9000 0.5 4 5.1750 1.1325 3.5000 6.0000 1.25 12 5.7500 1.5826 3.3000 8.8000 2 4 5.6750 0.7274 5.0000 6.7000 2.61931 1 4.0000 0.0000 4.0000 4.0000 ferm_temp_c: Level N Mean Std Min Max ------------------------------------------------------------ 12 4 5.3000 1.3880 3.5000 6.7000 17 12 5.4917 1.2838 3.3000 7.6000 22 4 5.5500 0.1000 5.4000 5.6000 26.1287 1 8.8000 0.0000 8.8000 8.8000 7.87129 1 4.2000 0.0000 4.2000 4.2000 sugar_add_g_L: Level N Mean Std Min Max ------------------------------------------------------------ -20.6435 1 7.5000 0.0000 7.5000 7.5000 0 4 5.3500 1.3379 3.5000 6.7000 25 12 5.4917 1.5582 3.3000 8.8000 50 4 5.5000 0.4163 5.0000 6.0000 70.6435 1 5.5000 0.0000 5.5000 5.5000

Optimization Recommendations

doe optimize
=== Optimization: flavor_clarity === Direction: maximize Best observed run: #12 pitch_rate_g_L = 2.61931 ferm_temp_c = 17 sugar_add_g_L = 25 Value: 8.9 RSM Model (linear, R² = 0.0244, Adj R² = -0.1382): Coefficients: intercept +6.6955 pitch_rate_g_L -0.0884 ferm_temp_c +0.0397 sugar_add_g_L +0.1227 RSM Model (quadratic, R² = 0.3220, Adj R² = -0.1865): Coefficients: intercept +6.8112 pitch_rate_g_L -0.0884 ferm_temp_c +0.0397 sugar_add_g_L +0.1227 pitch_rate_g_L*ferm_temp_c -0.2250 pitch_rate_g_L*sugar_add_g_L +0.1500 ferm_temp_c*sugar_add_g_L -0.4500 pitch_rate_g_L^2 +0.1871 ferm_temp_c^2 -0.1729 sugar_add_g_L^2 -0.1879 Curvature analysis: sugar_add_g_L coef=-0.1879 concave (has a maximum) pitch_rate_g_L coef=+0.1871 convex (has a minimum) ferm_temp_c coef=-0.1729 concave (has a maximum) Notable interactions: ferm_temp_c*sugar_add_g_L coef=-0.4500 (antagonistic) Predicted optimum (from linear model, at observed points): pitch_rate_g_L = 0.5 ferm_temp_c = 22 sugar_add_g_L = 50 Predicted value: 6.9463 Surface optimum (via L-BFGS-B, linear model): pitch_rate_g_L = 0.5 ferm_temp_c = 22 sugar_add_g_L = 50 Predicted value: 6.9463 Model quality: Weak fit — consider adding center points or using a different design. Factor importance: 1. pitch_rate_g_L (effect: 3.3, contribution: 60.9%) 2. sugar_add_g_L (effect: 1.2, contribution: 21.2%) 3. ferm_temp_c (effect: 1.0, contribution: 17.9%) === Optimization: abv_pct === Direction: maximize Best observed run: #17 pitch_rate_g_L = 1.25 ferm_temp_c = 17 sugar_add_g_L = 25 Value: 8.8 RSM Model (linear, R² = 0.0804, Adj R² = -0.0728): Coefficients: intercept +5.5591 pitch_rate_g_L -0.2816 ferm_temp_c -0.3356 sugar_add_g_L +0.0943 RSM Model (quadratic, R² = 0.5977, Adj R² = 0.2960): Coefficients: intercept +6.3749 pitch_rate_g_L -0.2816 ferm_temp_c -0.3356 sugar_add_g_L +0.0943 pitch_rate_g_L*ferm_temp_c -0.4250 pitch_rate_g_L*sugar_add_g_L +0.8000 ferm_temp_c*sugar_add_g_L -0.3000 pitch_rate_g_L^2 -0.3079 ferm_temp_c^2 -0.7129 sugar_add_g_L^2 -0.2029 Curvature analysis: ferm_temp_c coef=-0.7129 concave (has a maximum) pitch_rate_g_L coef=-0.3079 concave (has a maximum) sugar_add_g_L coef=-0.2029 concave (has a maximum) Notable interactions: pitch_rate_g_L*sugar_add_g_L coef=+0.8000 (synergistic) pitch_rate_g_L*ferm_temp_c coef=-0.4250 (antagonistic) Predicted optimum (from quadratic model, at observed points): pitch_rate_g_L = 2 ferm_temp_c = 12 sugar_add_g_L = 50 Predicted value: 6.8244 Surface optimum (via L-BFGS-B, quadratic model): pitch_rate_g_L = 0.5 ferm_temp_c = 18.3656 sugar_add_g_L = 0 Predicted value: 6.9046 Model quality: Moderate fit — use predictions directionally, not precisely. Factor importance: 1. ferm_temp_c (effect: 2.5, contribution: 61.7%) 2. pitch_rate_g_L (effect: 1.0, contribution: 23.2%) 3. sugar_add_g_L (effect: 0.6, contribution: 15.1%)
← Previous: Kombucha Brewing Balance Next: Mead (Honey Wine) Production →