← All Use Cases
🧪
Central Composite Design

Crystal Growth Optimization

Central composite design to maximize crystal size and purity by tuning cooling rate, supersaturation, and seed crystal size

Summary

This experiment investigates crystal growth optimization. Central composite design to maximize crystal size and purity by tuning cooling rate, supersaturation, and seed crystal size.

The design varies 3 factors: cool rate c hr (C/hr), ranging from 0.5 to 5.0, supersaturation (ratio), ranging from 1.1 to 1.5, and seed mm (mm), ranging from 0.1 to 2.0. The goal is to optimize 2 responses: crystal size mm (mm) (maximize) and purity pct (%) (maximize). Fixed conditions held constant across all runs include solvent = water, compound = copper_sulfate.

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 crystal size mm, the most influential factors were cool rate c hr (40.7%), supersaturation (35.6%), seed mm (23.8%). The best observed value was 10.3 (at cool rate c hr = -1.35792, supersaturation = 1.3, seed mm = 1.05).

For purity pct, the most influential factors were cool rate c hr (40.3%), supersaturation (31.1%), seed mm (28.6%). The best observed value was 99.9 (at cool rate c hr = 2.75, supersaturation = 1.3, seed mm = 1.05).

Recommended Next Steps

Experimental Setup

Factors

FactorLowHighUnit
cool_rate_c_hr0.55.0C/hr
supersaturation1.11.5ratio
seed_mm0.12.0mm

Fixed: solvent = water, compound = copper_sulfate

Responses

ResponseDirectionUnit
crystal_size_mm↑ maximizemm
purity_pct↑ maximize%

Configuration

use_cases/188_crystallization/config.json
{ "metadata": { "name": "Crystal Growth Optimization", "description": "Central composite design to maximize crystal size and purity by tuning cooling rate, supersaturation, and seed crystal size" }, "factors": [ { "name": "cool_rate_c_hr", "levels": [ "0.5", "5.0" ], "type": "continuous", "unit": "C/hr" }, { "name": "supersaturation", "levels": [ "1.1", "1.5" ], "type": "continuous", "unit": "ratio" }, { "name": "seed_mm", "levels": [ "0.1", "2.0" ], "type": "continuous", "unit": "mm" } ], "fixed_factors": { "solvent": "water", "compound": "copper_sulfate" }, "responses": [ { "name": "crystal_size_mm", "optimize": "maximize", "unit": "mm" }, { "name": "purity_pct", "optimize": "maximize", "unit": "%" } ], "settings": { "operation": "central_composite", "test_script": "use_cases/188_crystallization/sim.sh" } }

Experimental Matrix

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

Runcool_rate_c_hrsupersaturationseed_mm
12.751.31.05
251.12
30.51.50.1
42.751.665151.05
52.751.31.05
6-1.357921.31.05
72.751.3-0.684455
82.751.31.05
951.50.1
106.857921.31.05
112.751.31.05
122.750.9348521.05
132.751.31.05
140.51.12
152.751.31.05
1651.10.1
172.751.32.78445
1851.52
192.751.31.05
200.51.10.1
210.51.52
222.751.31.05

Step-by-Step Workflow

1

Preview the design

Terminal
$ doe info --config use_cases/188_crystallization/config.json
2

Generate the runner script

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

Execute the experiments

Terminal
$ bash use_cases/188_crystallization/results/run.sh
4

Analyze results

Terminal
$ doe analyze --config use_cases/188_crystallization/config.json
5

Get optimization recommendations

Terminal
$ doe optimize --config use_cases/188_crystallization/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/188_crystallization/config.json --multi
7

Generate the HTML report

Terminal
$ doe report --config use_cases/188_crystallization/config.json \ --output use_cases/188_crystallization/results/report.html

Features Exercised

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

Analysis Results

Generated from actual experiment runs using the DOE Helper Tool.

Response: crystal_size_mm

Top factors: cool_rate_c_hr (40.7%), supersaturation (35.6%), seed_mm (23.8%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
cool_rate_c_hr432.70798.17701.5440.2696
supersaturation423.38455.84611.1040.4115
seed_mm410.59702.64930.5000.7367
LackofFit26.90513.4525
PureError737.0600
Error943.96515.2943
Total21110.65455.2693

Pareto Chart

Pareto chart for crystal_size_mm

Main Effects Plot

Main effects plot for crystal_size_mm

Normal Probability Plot of Effects

Normal probability plot for crystal_size_mm

Half-Normal Plot of Effects

Half-normal plot for crystal_size_mm

Model Diagnostics

Model diagnostics for crystal_size_mm

Response: purity_pct

Top factors: cool_rate_c_hr (40.3%), supersaturation (31.1%), seed_mm (28.6%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
cool_rate_c_hr450.166512.54161.1980.3754
supersaturation433.82158.45540.8080.5504
seed_mm434.80078.70020.8310.5380
LackofFit20.00000.0000
PureError773.2688
Error960.929510.4670
Total21179.71828.5580

Pareto Chart

Pareto chart for purity_pct

Main Effects Plot

Main effects plot for purity_pct

Normal Probability Plot of Effects

Normal probability plot for purity_pct

Half-Normal Plot of Effects

Half-normal plot for purity_pct

Model Diagnostics

Model diagnostics for purity_pct

Response Surface Plots

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

crystal size mm cool rate c hr vs seed mm

RSM surface: crystal size mm cool rate c hr vs seed mm

crystal size mm cool rate c hr vs supersaturation

RSM surface: crystal size mm cool rate c hr vs supersaturation

crystal size mm supersaturation vs seed mm

RSM surface: crystal size mm supersaturation vs seed mm

purity pct cool rate c hr vs seed mm

RSM surface: purity pct cool rate c hr vs seed mm

purity pct cool rate c hr vs supersaturation

RSM surface: purity pct cool rate c hr vs supersaturation

purity pct supersaturation vs seed mm

RSM surface: purity pct supersaturation vs seed mm

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.7350

Per-Response Desirability

ResponseWeightDesirabilityPredictedDir
crystal_size_mm 1.0
0.6136
6.70 0.6136 6.70 mm
purity_pct 2.0
0.8043
98.00 0.8043 98.00 %

Recommended Settings

FactorValue
cool_rate_c_hr2.75 C/hr
supersaturation1.3 ratio
seed_mm1.05 mm

Source: from observed run #14

Trade-off Summary

Sacrifice = how much worse than single-objective best.

ResponsePredictedBest ObservedSacrifice
purity_pct98.0099.90+1.90

Top 3 Runs by Desirability

RunDFactor Settings
#170.6501cool_rate_c_hr=2.75, supersaturation=1.66515, seed_mm=1.05
#180.5944cool_rate_c_hr=0.5, supersaturation=1.1, seed_mm=2

Model Quality

ResponseType
purity_pct0.6417quadratic

Full Multi-Objective Output

doe optimize --multi
============================================================ MULTI-OBJECTIVE OPTIMIZATION Method: Derringer-Suich Desirability Function ============================================================ Overall desirability: D = 0.7350 Response Weight Desirability Predicted Direction --------------------------------------------------------------------- crystal_size_mm 1.0 0.6136 6.70 mm ↑ purity_pct 2.0 0.8043 98.00 % ↑ Recommended settings: cool_rate_c_hr = 2.75 C/hr supersaturation = 1.3 ratio seed_mm = 1.05 mm (from observed run #14) Trade-off summary: crystal_size_mm: 6.70 (best observed: 10.30, sacrifice: +3.60) purity_pct: 98.00 (best observed: 99.90, sacrifice: +1.90) Model quality: crystal_size_mm: R² = 0.6151 (quadratic) purity_pct: R² = 0.6417 (quadratic) Top 3 observed runs by overall desirability: 1. Run #14 (D=0.7350): cool_rate_c_hr=2.75, supersaturation=1.3, seed_mm=1.05 2. Run #17 (D=0.6501): cool_rate_c_hr=2.75, supersaturation=1.66515, seed_mm=1.05 3. Run #18 (D=0.5944): cool_rate_c_hr=0.5, supersaturation=1.1, seed_mm=2

Full Analysis Output

doe analyze
=== Main Effects: crystal_size_mm === Factor Effect Std Error % Contribution -------------------------------------------------------------- cool_rate_c_hr 5.8583 0.4894 40.7% supersaturation 5.1250 0.4894 35.6% seed_mm 3.4250 0.4894 23.8% === ANOVA Table: crystal_size_mm === Source DF SS MS F p-value ----------------------------------------------------------------------------- cool_rate_c_hr 4 32.7079 8.1770 1.544 0.2696 supersaturation 4 23.3845 5.8461 1.104 0.4115 seed_mm 4 10.5970 2.6493 0.500 0.7367 Lack of Fit 2 6.9051 3.4525 0.652 0.5499 Pure Error 7 37.0600 5.2943 Error 9 43.9651 5.2943 Total 21 110.6545 5.2693 === Summary Statistics: crystal_size_mm === cool_rate_c_hr: Level N Mean Std Min Max ------------------------------------------------------------ -1.35792 1 5.1000 0.0000 5.1000 5.1000 0.5 4 5.1750 1.4500 3.3000 6.7000 2.75 12 4.4417 2.3846 0.7000 8.9000 5 4 5.4500 1.7407 3.8000 7.9000 6.85792 1 10.3000 0.0000 10.3000 10.3000 supersaturation: Level N Mean Std Min Max ------------------------------------------------------------ 0.934852 1 0.7000 0.0000 0.7000 0.7000 1.1 4 4.8000 1.0677 3.3000 5.8000 1.3 12 5.3250 2.5906 0.8000 10.3000 1.5 4 5.8250 1.8283 3.8000 7.9000 1.66515 1 4.1000 0.0000 4.1000 4.1000 seed_mm: Level N Mean Std Min Max ------------------------------------------------------------ -0.684455 1 5.0000 0.0000 5.0000 5.0000 0.1 4 5.3250 1.9085 3.3000 7.9000 1.05 12 5.1500 2.7718 0.7000 10.3000 2 4 5.3000 1.2410 3.8000 6.7000 2.78445 1 1.9000 0.0000 1.9000 1.9000 === Main Effects: purity_pct === Factor Effect Std Error % Contribution -------------------------------------------------------------- cool_rate_c_hr 7.7750 0.6237 40.3% supersaturation 6.0000 0.6237 31.1% seed_mm 5.5250 0.6237 28.6% === ANOVA Table: purity_pct === Source DF SS MS F p-value ----------------------------------------------------------------------------- cool_rate_c_hr 4 50.1665 12.5416 1.198 0.3754 supersaturation 4 33.8215 8.4554 0.808 0.5504 seed_mm 4 34.8007 8.7002 0.831 0.5380 Lack of Fit 2 0.0000 0.0000 0.000 1.0000 Pure Error 7 73.2688 10.4670 Error 9 60.9295 10.4670 Total 21 179.7182 8.5580 === Summary Statistics: purity_pct === cool_rate_c_hr: Level N Mean Std Min Max ------------------------------------------------------------ -1.35792 1 95.2000 0.0000 95.2000 95.2000 0.5 4 96.1750 1.2606 95.1000 98.0000 2.75 12 95.1833 3.3553 89.3000 99.9000 5 4 95.4750 0.5620 94.9000 96.2000 6.85792 1 88.4000 0.0000 88.4000 88.4000 supersaturation: Level N Mean Std Min Max ------------------------------------------------------------ 0.934852 1 99.7000 0.0000 99.7000 99.7000 1.1 4 95.7500 0.4123 95.2000 96.2000 1.3 12 94.3667 3.5579 88.4000 99.9000 1.5 4 95.9000 1.4306 94.9000 98.0000 1.66515 1 93.7000 0.0000 93.7000 93.7000 seed_mm: Level N Mean Std Min Max ------------------------------------------------------------ -0.684455 1 94.7000 0.0000 94.7000 94.7000 0.1 4 95.6750 0.4573 95.1000 96.2000 1.05 12 94.2750 3.5471 88.4000 99.9000 2 4 95.9750 1.4009 94.9000 98.0000 2.78445 1 99.8000 0.0000 99.8000 99.8000

Optimization Recommendations

doe optimize
=== Optimization: crystal_size_mm === Direction: maximize Best observed run: #6 cool_rate_c_hr = -1.35792 supersaturation = 1.3 seed_mm = 1.05 Value: 10.3 RSM Model (linear, R² = 0.1617, Adj R² = 0.0219): Coefficients: intercept +5.0545 cool_rate_c_hr -0.8306 supersaturation -0.5934 seed_mm +0.4215 RSM Model (quadratic, R² = 0.5671, Adj R² = 0.2424): Coefficients: intercept +4.0203 cool_rate_c_hr -0.8306 supersaturation -0.5934 seed_mm +0.4215 cool_rate_c_hr*supersaturation +0.1000 cool_rate_c_hr*seed_mm +0.6500 supersaturation*seed_mm -0.0750 cool_rate_c_hr^2 +1.4171 supersaturation^2 -0.0679 seed_mm^2 +0.2021 Curvature analysis: cool_rate_c_hr coef=+1.4171 convex (has a minimum) seed_mm coef=+0.2021 convex (has a minimum) supersaturation coef=-0.0679 negligible curvature Notable interactions: cool_rate_c_hr*seed_mm coef=+0.6500 (synergistic) Predicted optimum (from quadratic model, at observed points): cool_rate_c_hr = -1.35792 supersaturation = 1.3 seed_mm = 1.05 Predicted value: 10.2604 Surface optimum (via L-BFGS-B, quadratic model): cool_rate_c_hr = 0.5 supersaturation = 1.1 seed_mm = 0.1 Predicted value: 7.2491 Model quality: Moderate fit — use predictions directionally, not precisely. Factor importance: 1. cool_rate_c_hr (effect: 6.1, contribution: 59.2%) 2. supersaturation (effect: 2.7, contribution: 26.1%) 3. seed_mm (effect: 1.5, contribution: 14.6%) === Optimization: purity_pct === Direction: maximize Best observed run: #16 cool_rate_c_hr = 2.75 supersaturation = 1.3 seed_mm = 1.05 Value: 99.9 RSM Model (linear, R² = 0.3627, Adj R² = 0.2565): Coefficients: intercept +95.1091 cool_rate_c_hr +2.0417 supersaturation +0.5164 seed_mm -0.0955 RSM Model (quadratic, R² = 0.6584, Adj R² = 0.4022): Coefficients: intercept +96.2933 cool_rate_c_hr +2.0417 supersaturation +0.5164 seed_mm -0.0955 cool_rate_c_hr*supersaturation +1.2750 cool_rate_c_hr*seed_mm -0.1500 supersaturation*seed_mm +1.1500 cool_rate_c_hr^2 -1.1771 supersaturation^2 -0.2321 seed_mm^2 -0.3671 Curvature analysis: cool_rate_c_hr coef=-1.1771 concave (has a maximum) seed_mm coef=-0.3671 concave (has a maximum) supersaturation coef=-0.2321 concave (has a maximum) Notable interactions: cool_rate_c_hr*supersaturation coef=+1.2750 (synergistic) supersaturation*seed_mm coef=+1.1500 (synergistic) Predicted optimum (from quadratic model, at observed points): cool_rate_c_hr = 5 supersaturation = 1.5 seed_mm = 2 Predicted value: 99.2546 Surface optimum (via L-BFGS-B, quadratic model): cool_rate_c_hr = 5 supersaturation = 1.5 seed_mm = 2 Predicted value: 99.2546 Model quality: Moderate fit — use predictions directionally, not precisely. Factor importance: 1. cool_rate_c_hr (effect: 8.5, contribution: 78.5%) 2. supersaturation (effect: 1.6, contribution: 15.0%) 3. seed_mm (effect: 0.7, contribution: 6.6%)
← Previous: Titration Accuracy Optimization All Use Cases →