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
- Run confirmation experiments at the predicted optimal settings to validate the model.
- Consider whether any fixed factors should be varied in a future study.
Experimental Setup
Factors
| Factor | Low | High | Unit |
pitch_rate_g_L | 0.5 | 2.0 | g/L |
ferm_temp_c | 12 | 22 | C |
sugar_add_g_L | 0 | 50 | g/L |
Fixed: apple_variety = mixed_cider, yeast = champagne
Responses
| Response | Direction | Unit |
flavor_clarity | ↑ maximize | pts |
abv_pct | ↑ maximize | % |
Configuration
{
"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.
| Run | pitch_rate_g_L | ferm_temp_c | sugar_add_g_L |
| 1 | 1.25 | 17 | 25 |
| 2 | 2 | 12 | 50 |
| 3 | 0.5 | 22 | 0 |
| 4 | 1.25 | 26.1287 | 25 |
| 5 | 1.25 | 17 | 25 |
| 6 | -0.119306 | 17 | 25 |
| 7 | 1.25 | 17 | -20.6435 |
| 8 | 1.25 | 17 | 25 |
| 9 | 2 | 22 | 0 |
| 10 | 2.61931 | 17 | 25 |
| 11 | 1.25 | 17 | 25 |
| 12 | 1.25 | 7.87129 | 25 |
| 13 | 1.25 | 17 | 25 |
| 14 | 0.5 | 12 | 50 |
| 15 | 1.25 | 17 | 25 |
| 16 | 2 | 12 | 0 |
| 17 | 1.25 | 17 | 70.6435 |
| 18 | 2 | 22 | 50 |
| 19 | 1.25 | 17 | 25 |
| 20 | 0.5 | 12 | 0 |
| 21 | 0.5 | 22 | 50 |
| 22 | 1.25 | 17 | 25 |
Step-by-Step Workflow
1
Preview the design
$ doe info --config use_cases/240_cider_making/config.json
2
Generate the runner script
$ 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
$ bash use_cases/240_cider_making/results/run.sh
4
Analyze results
$ doe analyze --config use_cases/240_cider_making/config.json
5
Get optimization recommendations
$ 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.
$ doe optimize --config use_cases/240_cider_making/config.json --multi
7
Generate the HTML report
$ doe report --config use_cases/240_cider_making/config.json \
--output use_cases/240_cider_making/results/report.html
Features Exercised
| Feature | Value |
| Design type | central_composite |
| Factor types | continuous (all 3) |
| Arg style | double-dash |
| Responses | 2 (flavor_clarity ↑, abv_pct ↑) |
| Total runs | 22 |
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
| Source | DF | SS | MS | F | p-value |
| 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 |
| Pure | Error | 7 | 4.2000 | | |
| Error | 9 | 1.8542 | 0.6000 | | |
| Total | 21 | 14.7095 | 0.7005 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response: abv_pct
Top factors: ferm_temp_c (53.2%), sugar_add_g_L (24.9%), pitch_rate_g_L (22.0%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| 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 |
| Pure | Error | 7 | 11.5950 | | |
| Error | 9 | 16.2970 | 1.6564 | | |
| Total | 21 | 36.6132 | 1.7435 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
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
abv pct pitch rate g L vs ferm temp c
abv pct pitch rate g L vs sugar add g L
flavor clarity ferm temp c vs sugar add g L
flavor clarity pitch rate g L vs ferm temp c
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
| Response | Weight | Desirability | Predicted | Dir |
flavor_clarity |
1.5 |
|
7.50 0.6364 7.50 pts |
↑ |
abv_pct |
1.0 |
|
7.50 0.7397 7.50 % |
↑ |
Recommended Settings
| Factor | Value |
pitch_rate_g_L | 1.25 g/L |
ferm_temp_c | 17 C |
sugar_add_g_L | 25 g/L |
Source: from observed run #2
Trade-off Summary
Sacrifice = how much worse than single-objective best.
| Response | Predicted | Best Observed | Sacrifice |
abv_pct | 7.50 | 8.80 | +1.30 |
Top 3 Runs by Desirability
| Run | D | Factor Settings |
| #12 | 0.6214 | pitch_rate_g_L=1.25, ferm_temp_c=17, sugar_add_g_L=-20.6435 |
| #14 | 0.5504 | pitch_rate_g_L=1.25, ferm_temp_c=17, sugar_add_g_L=25 |
Model Quality
| Response | R² | Type |
abv_pct | 0.6389 | quadratic |
Full Multi-Objective Output
============================================================
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
=== 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
=== 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%)