← All Use Cases
🔌
Box-Behnken Design

Wire Gauge & Run Length

Box-Behnken design to minimize voltage drop and maximize cost efficiency by tuning wire gauge, run length, and conduit fill ratio

Summary

This experiment investigates wire gauge & run length. Box-Behnken design to minimize voltage drop and maximize cost efficiency by tuning wire gauge, run length, and conduit fill ratio.

The design varies 3 factors: awg (AWG), ranging from 10 to 18, run m (m), ranging from 5 to 30, and fill pct (%), ranging from 20 to 60. The goal is to optimize 2 responses: voltage drop pct (%) (minimize) and cost per m (USD/m) (minimize). Fixed conditions held constant across all runs include circuit = 20A_120V, conductor = copper.

A Box-Behnken design was chosen because it efficiently fits quadratic models with 3 continuous factors while avoiding extreme corner combinations — requiring only 15 runs instead of the 8 needed for a full factorial at two levels.

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 voltage drop pct, the most influential factors were fill pct (75.4%), awg (15.7%), run m (9.0%). The best observed value was 1.1 (at awg = 10, run m = 17.5, fill pct = 60).

For cost per m, the most influential factors were run m (57.9%), fill pct (34.7%), awg (7.4%). The best observed value was 1.43 (at awg = 14, run m = 17.5, fill pct = 40).

Recommended Next Steps

Experimental Setup

Factors

FactorLowHighUnit
awg1018AWG
run_m530m
fill_pct2060%

Fixed: circuit = 20A_120V, conductor = copper

Responses

ResponseDirectionUnit
voltage_drop_pct↓ minimize%
cost_per_m↓ minimizeUSD/m

Configuration

use_cases/277_wire_gauge_selection/config.json
{ "metadata": { "name": "Wire Gauge & Run Length", "description": "Box-Behnken design to minimize voltage drop and maximize cost efficiency by tuning wire gauge, run length, and conduit fill ratio" }, "factors": [ { "name": "awg", "levels": [ "10", "18" ], "type": "continuous", "unit": "AWG" }, { "name": "run_m", "levels": [ "5", "30" ], "type": "continuous", "unit": "m" }, { "name": "fill_pct", "levels": [ "20", "60" ], "type": "continuous", "unit": "%" } ], "fixed_factors": { "circuit": "20A_120V", "conductor": "copper" }, "responses": [ { "name": "voltage_drop_pct", "optimize": "minimize", "unit": "%" }, { "name": "cost_per_m", "optimize": "minimize", "unit": "USD/m" } ], "settings": { "operation": "box_behnken", "test_script": "use_cases/277_wire_gauge_selection/sim.sh" } }

Experimental Matrix

The Box-Behnken Design produces 15 runs. Each row is one experiment with specific factor settings.

Runawgrun_mfill_pct
114520
21417.540
31817.560
41817.520
51417.540
61417.540
71017.560
818540
914560
10183040
111017.520
12143060
1310540
14103040
15143020

Step-by-Step Workflow

1

Preview the design

Terminal
$ doe info --config use_cases/277_wire_gauge_selection/config.json
2

Generate the runner script

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

Execute the experiments

Terminal
$ bash use_cases/277_wire_gauge_selection/results/run.sh
4

Analyze results

Terminal
$ doe analyze --config use_cases/277_wire_gauge_selection/config.json
5

Get optimization recommendations

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

Generate the HTML report

Terminal
$ doe report --config use_cases/277_wire_gauge_selection/config.json \ --output use_cases/277_wire_gauge_selection/results/report.html

Features Exercised

FeatureValue
Design typebox_behnken
Factor typescontinuous (all 3)
Arg styledouble-dash
Responses2 (voltage_drop_pct ↓, cost_per_m ↓)
Total runs15

Analysis Results

Generated from actual experiment runs using the DOE Helper Tool.

Response: voltage_drop_pct

Top factors: fill_pct (75.4%), awg (15.7%), run_m (9.0%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
awg20.45890.22940.0620.9406
run_m20.13420.06710.0180.9822
fill_pct28.07994.04001.0860.3826
LackofFit614.50302.4172
PureError27.4400
Error821.94303.7200
Total1430.61602.1869

Pareto Chart

Pareto chart for voltage_drop_pct

Main Effects Plot

Main effects plot for voltage_drop_pct

Normal Probability Plot of Effects

Normal probability plot for voltage_drop_pct

Half-Normal Plot of Effects

Half-normal plot for voltage_drop_pct

Model Diagnostics

Model diagnostics for voltage_drop_pct

Response: cost_per_m

Top factors: run_m (57.9%), fill_pct (34.7%), awg (7.4%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
awg20.01590.00790.0140.9859
run_m21.10730.55360.9940.4117
fill_pct20.36460.18230.3270.7302
LackofFit62.89540.4826
PureError21.1145
Error84.00990.5572
Total145.49760.3927

Pareto Chart

Pareto chart for cost_per_m

Main Effects Plot

Main effects plot for cost_per_m

Normal Probability Plot of Effects

Normal probability plot for cost_per_m

Half-Normal Plot of Effects

Half-normal plot for cost_per_m

Model Diagnostics

Model diagnostics for cost_per_m

Response Surface Plots

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

cost per m awg vs fill pct

RSM surface: cost per m awg vs fill pct

cost per m awg vs run m

RSM surface: cost per m awg vs run m

cost per m run m vs fill pct

RSM surface: cost per m run m vs fill pct

voltage drop pct awg vs fill pct

RSM surface: voltage drop pct awg vs fill pct

voltage drop pct awg vs run m

RSM surface: voltage drop pct awg vs run m

voltage drop pct run m vs fill pct

RSM surface: voltage drop pct run m vs fill pct

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

Per-Response Desirability

ResponseWeightDesirabilityPredictedDir
voltage_drop_pct 1.5
0.8674
1.61 0.8674 1.61 %
cost_per_m 1.0
0.8069
1.72 0.8069 1.72 USD/m

Recommended Settings

FactorValue
awg10 AWG
run_m5 m
fill_pct60 %

Source: from RSM model prediction

Trade-off Summary

Sacrifice = how much worse than single-objective best.

ResponsePredictedBest ObservedSacrifice
cost_per_m1.721.43+0.29

Top 3 Runs by Desirability

RunDFactor Settings
#90.7112awg=18, run_m=17.5, fill_pct=60
#80.6674awg=10, run_m=5, fill_pct=40

Model Quality

ResponseType
cost_per_m0.6350quadratic

Full Multi-Objective Output

doe optimize --multi
============================================================ MULTI-OBJECTIVE OPTIMIZATION Method: Derringer-Suich Desirability Function ============================================================ Overall desirability: D = 0.8426 Response Weight Desirability Predicted Direction --------------------------------------------------------------------- voltage_drop_pct 1.5 0.8674 1.61 % ↓ cost_per_m 1.0 0.8069 1.72 USD/m ↓ Recommended settings: awg = 10 AWG run_m = 5 m fill_pct = 60 % (from RSM model prediction) Trade-off summary: voltage_drop_pct: 1.61 (best observed: 1.10, sacrifice: +0.51) cost_per_m: 1.72 (best observed: 1.43, sacrifice: +0.29) Model quality: voltage_drop_pct: R² = 0.6757 (quadratic) cost_per_m: R² = 0.6350 (quadratic) Top 3 observed runs by overall desirability: 1. Run #1 (D=0.7965): awg=18, run_m=17.5, fill_pct=20 2. Run #9 (D=0.7112): awg=18, run_m=17.5, fill_pct=60 3. Run #8 (D=0.6674): awg=10, run_m=5, fill_pct=40

Full Analysis Output

doe analyze
=== Main Effects: voltage_drop_pct === Factor Effect Std Error % Contribution -------------------------------------------------------------- fill_pct 1.9250 0.3818 75.4% awg 0.4000 0.3818 15.7% run_m 0.2286 0.3818 9.0% === ANOVA Table: voltage_drop_pct === Source DF SS MS F p-value ----------------------------------------------------------------------------- awg 2 0.4589 0.2294 0.062 0.9406 run_m 2 0.1342 0.0671 0.018 0.9822 fill_pct 2 8.0799 4.0400 1.086 0.3826 Lack of Fit 6 14.5030 2.4172 0.650 0.7113 Pure Error 2 7.4400 3.7200 Error 8 21.9430 3.7200 Total 14 30.6160 2.1869 === Summary Statistics: voltage_drop_pct === awg: Level N Mean Std Min Max ------------------------------------------------------------ 10 4 3.5500 2.0290 1.6000 6.4000 14 7 3.1571 1.4808 1.1000 4.9000 18 4 3.1500 1.2450 2.0000 4.7000 run_m: Level N Mean Std Min Max ------------------------------------------------------------ 17.5 7 3.1714 1.9371 1.1000 6.4000 30 4 3.2750 1.3696 1.6000 4.9000 5 4 3.4000 0.8832 2.8000 4.7000 fill_pct: Level N Mean Std Min Max ------------------------------------------------------------ 20 4 4.0250 2.0006 2.0000 6.4000 40 7 3.4857 1.2482 1.1000 4.7000 60 4 2.1000 0.6272 1.6000 2.9000 === Main Effects: cost_per_m === Factor Effect Std Error % Contribution -------------------------------------------------------------- run_m 0.6182 0.1618 57.9% fill_pct 0.3707 0.1618 34.7% awg 0.0786 0.1618 7.4% === ANOVA Table: cost_per_m === Source DF SS MS F p-value ----------------------------------------------------------------------------- awg 2 0.0159 0.0079 0.014 0.9859 run_m 2 1.1073 0.5536 0.994 0.4117 fill_pct 2 0.3646 0.1823 0.327 0.7302 Lack of Fit 6 2.8954 0.4826 0.866 0.6235 Pure Error 2 1.1145 0.5572 Error 8 4.0099 0.5572 Total 14 5.4976 0.3927 === Summary Statistics: cost_per_m === awg: Level N Mean Std Min Max ------------------------------------------------------------ 10 4 2.1625 0.5812 1.6700 3.0000 14 7 2.1414 0.6856 1.4500 3.2100 18 4 2.2200 0.7413 1.4300 3.2100 run_m: Level N Mean Std Min Max ------------------------------------------------------------ 17.5 7 2.3357 0.7035 1.4700 3.2100 30 4 1.7175 0.3249 1.4300 2.0600 5 4 2.3250 0.6068 1.9200 3.2100 fill_pct: Level N Mean Std Min Max ------------------------------------------------------------ 20 4 2.3850 0.9569 1.4500 3.2100 40 7 2.0143 0.5118 1.4300 2.9500 60 4 2.2200 0.5212 1.9300 3.0000

Optimization Recommendations

doe optimize
=== Optimization: voltage_drop_pct === Direction: minimize Best observed run: #13 awg = 10 run_m = 17.5 fill_pct = 60 Value: 1.1 RSM Model (linear, R² = 0.1637, Adj R² = -0.0644): Coefficients: intercept +3.2600 awg -0.6000 run_m -0.5125 fill_pct -0.0625 RSM Model (quadratic, R² = 0.5993, Adj R² = -0.1221): Coefficients: intercept +4.1333 awg -0.6000 run_m -0.5125 fill_pct -0.0625 awg*run_m +0.4500 awg*fill_pct +1.4000 run_m*fill_pct -0.4250 awg^2 -0.2292 run_m^2 -0.4542 fill_pct^2 -0.9542 Curvature analysis: fill_pct coef=-0.9542 concave (has a maximum) run_m coef=-0.4542 concave (has a maximum) awg coef=-0.2292 concave (has a maximum) Notable interactions: awg*fill_pct coef=+1.4000 (synergistic) awg*run_m coef=+0.4500 (synergistic) run_m*fill_pct coef=-0.4250 (antagonistic) Predicted optimum (from linear model, at observed points): awg = 10 run_m = 5 fill_pct = 40 Predicted value: 4.3725 Surface optimum (via L-BFGS-B, linear model): awg = 18 run_m = 30 fill_pct = 60 Predicted value: 2.0850 Model quality: Weak fit — consider adding center points or using a different design. Factor importance: 1. awg (effect: 1.2, contribution: 37.6%) 2. run_m (effect: 1.0, contribution: 32.1%) 3. fill_pct (effect: 1.0, contribution: 30.3%) === Optimization: cost_per_m === Direction: minimize Best observed run: #8 awg = 14 run_m = 17.5 fill_pct = 40 Value: 1.43 RSM Model (linear, R² = 0.0147, Adj R² = -0.2541): Coefficients: intercept +2.1680 awg -0.0250 run_m +0.0675 fill_pct -0.0700 RSM Model (quadratic, R² = 0.6939, Adj R² = 0.1430): Coefficients: intercept +1.6467 awg -0.0250 run_m +0.0675 fill_pct -0.0700 awg*run_m -0.4350 awg*fill_pct -0.6200 run_m*fill_pct +0.2250 awg^2 +0.3192 run_m^2 +0.1642 fill_pct^2 +0.4942 Curvature analysis: fill_pct coef=+0.4942 convex (has a minimum) awg coef=+0.3192 convex (has a minimum) run_m coef=+0.1642 convex (has a minimum) Notable interactions: awg*fill_pct coef=-0.6200 (antagonistic) awg*run_m coef=-0.4350 (antagonistic) Predicted optimum (from quadratic model, at observed points): awg = 18 run_m = 17.5 fill_pct = 20 Predicted value: 3.1250 Surface optimum (via L-BFGS-B, quadratic model): awg = 10.3922 run_m = 5 fill_pct = 34.6535 Predicted value: 1.5979 Model quality: Moderate fit — use predictions directionally, not precisely. Factor importance: 1. fill_pct (effect: 0.5, contribution: 52.9%) 2. awg (effect: 0.3, contribution: 29.7%) 3. run_m (effect: 0.2, contribution: 17.4%)
← All Use Cases Next: DC Motor Speed Control →