← All Use Cases
🚗
Fractional Factorial Design

Windshield Defog Strategy

Fractional factorial of fan speed, temperature setting, AC mode, recirculation, and rear defrost to minimize defog time and energy use

Summary

This experiment investigates windshield defog strategy. Fractional factorial of fan speed, temperature setting, AC mode, recirculation, and rear defrost to minimize defog time and energy use.

The design varies 5 factors: fan speed (level), ranging from 1 to 5, temp setting (C), ranging from 18 to 30, ac on (bool), ranging from 0 to 1, recirc (bool), ranging from 0 to 1, and rear defrost (bool), ranging from 0 to 1. The goal is to optimize 2 responses: defog time sec (sec) (minimize) and energy watts (W) (minimize). Fixed conditions held constant across all runs include ambient temp = 2C, humidity = 85pct.

A fractional factorial design reduces the number of runs from 32 to 8 by deliberately confounding higher-order interactions. This is ideal for screening — identifying which of the 5 factors matter most before investing in a full study.

Key Findings

For defog time sec, the most influential factors were rear defrost (53.0%), fan speed (17.2%), temp setting (11.9%). The best observed value was 37.0 (at fan speed = 1, temp setting = 30, ac on = 1).

For energy watts, the most influential factors were rear defrost (38.7%), fan speed (30.9%), ac on (16.8%). The best observed value was 133.0 (at fan speed = 1, temp setting = 30, ac on = 0).

Recommended Next Steps

Experimental Setup

Factors

FactorLowHighUnit
fan_speed15level
temp_setting1830C
ac_on01bool
recirc01bool
rear_defrost01bool

Fixed: ambient_temp = 2C, humidity = 85pct

Responses

ResponseDirectionUnit
defog_time_sec↓ minimizesec
energy_watts↓ minimizeW

Configuration

use_cases/126_windshield_defog/config.json
{ "metadata": { "name": "Windshield Defog Strategy", "description": "Fractional factorial of fan speed, temperature setting, AC mode, recirculation, and rear defrost to minimize defog time and energy use" }, "factors": [ { "name": "fan_speed", "levels": [ "1", "5" ], "type": "continuous", "unit": "level" }, { "name": "temp_setting", "levels": [ "18", "30" ], "type": "continuous", "unit": "C" }, { "name": "ac_on", "levels": [ "0", "1" ], "type": "continuous", "unit": "bool" }, { "name": "recirc", "levels": [ "0", "1" ], "type": "continuous", "unit": "bool" }, { "name": "rear_defrost", "levels": [ "0", "1" ], "type": "continuous", "unit": "bool" } ], "fixed_factors": { "ambient_temp": "2C", "humidity": "85pct" }, "responses": [ { "name": "defog_time_sec", "optimize": "minimize", "unit": "sec" }, { "name": "energy_watts", "optimize": "minimize", "unit": "W" } ], "settings": { "operation": "fractional_factorial", "test_script": "use_cases/126_windshield_defog/sim.sh" } }

Experimental Matrix

The Fractional Factorial Design produces 8 runs. Each row is one experiment with specific factor settings.

Runfan_speedtemp_settingac_onrecircrear_defrost
1130100
2518000
3530010
4530111
5130001
6518101
7118011
8118110

Step-by-Step Workflow

1

Preview the design

Terminal
$ doe info --config use_cases/126_windshield_defog/config.json
2

Generate the runner script

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

Execute the experiments

Terminal
$ bash use_cases/126_windshield_defog/results/run.sh
4

Analyze results

Terminal
$ doe analyze --config use_cases/126_windshield_defog/config.json
5

Get optimization recommendations

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

Generate the HTML report

Terminal
$ doe report --config use_cases/126_windshield_defog/config.json \ --output use_cases/126_windshield_defog/results/report.html

Features Exercised

FeatureValue
Design typefractional_factorial
Factor typescontinuous (all 5)
Arg styledouble-dash
Responses2 (defog_time_sec ↓, energy_watts ↓)
Total runs8

Analysis Results

Generated from actual experiment runs using the DOE Helper Tool.

Response: defog_time_sec

Top factors: rear_defrost (53.0%), fan_speed (17.2%), temp_setting (11.9%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
fan_speed11540.12501540.12500.6670.4513
temp_setting1741.1250741.12500.3210.5956
ac_on1378.1250378.12500.1640.7025
recirc1465.1250465.12500.2010.6724
rear_defrost114706.125014706.12506.3660.0530
fan_speed*temp_setting1465.1250465.12500.2010.6724
fan_speed*ac_on114706.125014706.12506.3660.0530
fan_speed*recirc1741.1250741.12500.3210.5956
fan_speed*rear_defrost1378.1250378.12500.1640.7025
temp_setting*ac_on12775.12502775.12501.2010.3230
temp_setting*recirc11540.12501540.12500.6670.4513
temp_setting*rear_defrost12556.12502556.12501.1060.3410
ac_on*recirc12556.12502556.12501.1060.3410
ac_on*rear_defrost11540.12501540.12500.6670.4513
recirc*rear_defrost12775.12502775.12501.2010.3230
Error(LenthPSE)511550.93752310.1875
Total723161.87503308.8393

Pareto Chart

Pareto chart for defog_time_sec

Main Effects Plot

Main effects plot for defog_time_sec

Normal Probability Plot of Effects

Normal probability plot for defog_time_sec

Half-Normal Plot of Effects

Half-normal plot for defog_time_sec

Model Diagnostics

Model diagnostics for defog_time_sec

Response: energy_watts

Top factors: rear_defrost (38.7%), fan_speed (30.9%), ac_on (16.8%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
fan_speed174112.500074112.500017.5670.0086
temp_setting16962.00006962.00001.6500.2552
ac_on122050.000022050.00005.2270.0710
recirc11300.50001300.50000.3080.6027
rear_defrost1116644.5000116644.500027.6490.0033
fan_speed*temp_setting11300.50001300.50000.3080.6027
fan_speed*ac_on1116644.5000116644.500027.6490.0033
fan_speed*recirc16962.00006962.00001.6500.2552
fan_speed*rear_defrost122050.000022050.00005.2270.0710
temp_setting*ac_on12.00002.00000.0000.9835
temp_setting*recirc174112.500074112.500017.5670.0086
temp_setting*rear_defrost12812.50002812.50000.6670.4513
ac_on*recirc12812.50002812.50000.6670.4513
ac_on*rear_defrost174112.500074112.500017.5670.0086
recirc*rear_defrost12.00002.00000.0000.9835
Error(LenthPSE)521093.75004218.7500
Total7223884.000031983.4286

Pareto Chart

Pareto chart for energy_watts

Main Effects Plot

Main effects plot for energy_watts

Normal Probability Plot of Effects

Normal probability plot for energy_watts

Half-Normal Plot of Effects

Half-normal plot for energy_watts

Model Diagnostics

Model diagnostics for energy_watts

Response Surface Plots

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

defog time sec ac on vs rear defrost

RSM surface: defog time sec ac on vs rear defrost

defog time sec ac on vs recirc

RSM surface: defog time sec ac on vs recirc

defog time sec fan speed vs ac on

RSM surface: defog time sec fan speed vs ac on

defog time sec fan speed vs rear defrost

RSM surface: defog time sec fan speed vs rear defrost

defog time sec fan speed vs recirc

RSM surface: defog time sec fan speed vs recirc

defog time sec fan speed vs temp setting

RSM surface: defog time sec fan speed vs temp setting

defog time sec recirc vs rear defrost

RSM surface: defog time sec recirc vs rear defrost

defog time sec temp setting vs ac on

RSM surface: defog time sec temp setting vs ac on

defog time sec temp setting vs rear defrost

RSM surface: defog time sec temp setting vs rear defrost

defog time sec temp setting vs recirc

RSM surface: defog time sec temp setting vs recirc

energy watts ac on vs rear defrost

RSM surface: energy watts ac on vs rear defrost

energy watts ac on vs recirc

RSM surface: energy watts ac on vs recirc

energy watts fan speed vs ac on

RSM surface: energy watts fan speed vs ac on

energy watts fan speed vs rear defrost

RSM surface: energy watts fan speed vs rear defrost

energy watts fan speed vs recirc

RSM surface: energy watts fan speed vs recirc

energy watts fan speed vs temp setting

RSM surface: energy watts fan speed vs temp setting

energy watts recirc vs rear defrost

RSM surface: energy watts recirc vs rear defrost

energy watts temp setting vs ac on

RSM surface: energy watts temp setting vs ac on

energy watts temp setting vs rear defrost

RSM surface: energy watts temp setting vs rear defrost

energy watts temp setting vs recirc

RSM surface: energy watts temp setting vs recirc

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

Per-Response Desirability

ResponseWeightDesirabilityPredictedDir
defog_time_sec 1.5
0.8209
62.00 0.8209 62.00 sec
energy_watts 1.0
0.6344
308.00 0.6344 308.00 W

Recommended Settings

FactorValue
fan_speed1 level
temp_setting30 C
ac_on0 bool
recirc0 bool
rear_defrost1 bool

Source: from observed run #1

Trade-off Summary

Sacrifice = how much worse than single-objective best.

ResponsePredictedBest ObservedSacrifice
energy_watts308.00133.00+175.00

Top 3 Runs by Desirability

RunDFactor Settings
#20.6114fan_speed=1, temp_setting=18, ac_on=1, recirc=1, rear_defrost=0
#60.5732fan_speed=5, temp_setting=18, ac_on=1, recirc=0, rear_defrost=1

Model Quality

ResponseType
energy_watts0.7727linear

Full Multi-Objective Output

doe optimize --multi
============================================================ MULTI-OBJECTIVE OPTIMIZATION Method: Derringer-Suich Desirability Function ============================================================ Overall desirability: D = 0.7405 Response Weight Desirability Predicted Direction --------------------------------------------------------------------- defog_time_sec 1.5 0.8209 62.00 sec ↓ energy_watts 1.0 0.6344 308.00 W ↓ Recommended settings: fan_speed = 1 level temp_setting = 30 C ac_on = 0 bool recirc = 0 bool rear_defrost = 1 bool (from observed run #1) Trade-off summary: defog_time_sec: 62.00 (best observed: 37.00, sacrifice: +25.00) energy_watts: 308.00 (best observed: 133.00, sacrifice: +175.00) Model quality: defog_time_sec: R² = 0.8763 (linear) energy_watts: R² = 0.7727 (linear) Top 3 observed runs by overall desirability: 1. Run #1 (D=0.7405): fan_speed=1, temp_setting=30, ac_on=0, recirc=0, rear_defrost=1 2. Run #2 (D=0.6114): fan_speed=1, temp_setting=18, ac_on=1, recirc=1, rear_defrost=0 3. Run #6 (D=0.5732): fan_speed=5, temp_setting=18, ac_on=1, recirc=0, rear_defrost=1

Full Analysis Output

doe analyze
=== Main Effects: defog_time_sec === Factor Effect Std Error % Contribution -------------------------------------------------------------- rear_defrost -85.7500 20.3373 53.0% fan_speed 27.7500 20.3373 17.2% temp_setting -19.2500 20.3373 11.9% recirc 15.2500 20.3373 9.4% ac_on 13.7500 20.3373 8.5% === ANOVA Table: defog_time_sec === Source DF SS MS F p-value ----------------------------------------------------------------------------- fan_speed 1 1540.1250 1540.1250 0.667 0.4513 temp_setting 1 741.1250 741.1250 0.321 0.5956 ac_on 1 378.1250 378.1250 0.164 0.7025 recirc 1 465.1250 465.1250 0.201 0.6724 rear_defrost 1 14706.1250 14706.1250 6.366 0.0530 fan_speed*temp_setting 1 465.1250 465.1250 0.201 0.6724 fan_speed*ac_on 1 14706.1250 14706.1250 6.366 0.0530 fan_speed*recirc 1 741.1250 741.1250 0.321 0.5956 fan_speed*rear_defrost 1 378.1250 378.1250 0.164 0.7025 temp_setting*ac_on 1 2775.1250 2775.1250 1.201 0.3230 temp_setting*recirc 1 1540.1250 1540.1250 0.667 0.4513 temp_setting*rear_defrost 1 2556.1250 2556.1250 1.106 0.3410 ac_on*recirc 1 2556.1250 2556.1250 1.106 0.3410 ac_on*rear_defrost 1 1540.1250 1540.1250 0.667 0.4513 recirc*rear_defrost 1 2775.1250 2775.1250 1.201 0.3230 Error (Lenth PSE) 5 11550.9375 2310.1875 Total 7 23161.8750 3308.8393 Note: Error estimated using Lenth's pseudo-standard-error (unreplicated design) === Interaction Effects: defog_time_sec === Factor A Factor B Interaction % Contribution ------------------------------------------------------------------------ fan_speed ac_on -85.7500 25.6% temp_setting ac_on 37.2500 11.1% recirc rear_defrost 37.2500 11.1% temp_setting rear_defrost 35.7500 10.7% ac_on recirc 35.7500 10.7% temp_setting recirc 27.7500 8.3% ac_on rear_defrost 27.7500 8.3% fan_speed recirc -19.2500 5.7% fan_speed temp_setting 15.2500 4.5% fan_speed rear_defrost 13.7500 4.1% === Summary Statistics: defog_time_sec === fan_speed: Level N Mean Std Min Max ------------------------------------------------------------ 1 4 104.7500 60.8078 37.0000 171.0000 5 4 132.5000 59.2424 62.0000 207.0000 temp_setting: Level N Mean Std Min Max ------------------------------------------------------------ 18 4 128.2500 71.8117 62.0000 207.0000 30 4 109.0000 48.1318 37.0000 138.0000 ac_on: Level N Mean Std Min Max ------------------------------------------------------------ 0 4 111.7500 74.1502 37.0000 207.0000 1 4 125.5000 45.7857 62.0000 171.0000 recirc: Level N Mean Std Min Max ------------------------------------------------------------ 0 4 111.0000 77.0757 37.0000 207.0000 1 4 126.2500 40.3103 73.0000 171.0000 rear_defrost: Level N Mean Std Min Max ------------------------------------------------------------ 0 4 161.5000 35.1426 130.0000 207.0000 1 4 75.7500 39.7943 37.0000 131.0000 === Main Effects: energy_watts === Factor Effect Std Error % Contribution -------------------------------------------------------------- rear_defrost 241.5000 63.2292 38.7% fan_speed -192.5000 63.2292 30.9% ac_on -105.0000 63.2292 16.8% temp_setting -59.0000 63.2292 9.5% recirc 25.5000 63.2292 4.1% === ANOVA Table: energy_watts === Source DF SS MS F p-value ----------------------------------------------------------------------------- fan_speed 1 74112.5000 74112.5000 17.567 0.0086 temp_setting 1 6962.0000 6962.0000 1.650 0.2552 ac_on 1 22050.0000 22050.0000 5.227 0.0710 recirc 1 1300.5000 1300.5000 0.308 0.6027 rear_defrost 1 116644.5000 116644.5000 27.649 0.0033 fan_speed*temp_setting 1 1300.5000 1300.5000 0.308 0.6027 fan_speed*ac_on 1 116644.5000 116644.5000 27.649 0.0033 fan_speed*recirc 1 6962.0000 6962.0000 1.650 0.2552 fan_speed*rear_defrost 1 22050.0000 22050.0000 5.227 0.0710 temp_setting*ac_on 1 2.0000 2.0000 0.000 0.9835 temp_setting*recirc 1 74112.5000 74112.5000 17.567 0.0086 temp_setting*rear_defrost 1 2812.5000 2812.5000 0.667 0.4513 ac_on*recirc 1 2812.5000 2812.5000 0.667 0.4513 ac_on*rear_defrost 1 74112.5000 74112.5000 17.567 0.0086 recirc*rear_defrost 1 2.0000 2.0000 0.000 0.9835 Error (Lenth PSE) 5 21093.7500 4218.7500 Total 7 223884.0000 31983.4286 Note: Error estimated using Lenth's pseudo-standard-error (unreplicated design) === Interaction Effects: energy_watts === Factor A Factor B Interaction % Contribution ------------------------------------------------------------------------ fan_speed ac_on 241.5000 27.0% temp_setting recirc -192.5000 21.6% ac_on rear_defrost -192.5000 21.6% fan_speed rear_defrost -105.0000 11.8% fan_speed recirc -59.0000 6.6% temp_setting rear_defrost -37.5000 4.2% ac_on recirc -37.5000 4.2% fan_speed temp_setting 25.5000 2.9% temp_setting ac_on -1.0000 0.1% recirc rear_defrost -1.0000 0.1% === Summary Statistics: energy_watts === fan_speed: Level N Mean Std Min Max ------------------------------------------------------------ 1 4 396.2500 206.9901 199.0000 630.0000 5 4 203.7500 84.1363 133.0000 308.0000 temp_setting: Level N Mean Std Min Max ------------------------------------------------------------ 18 4 329.5000 213.0579 133.0000 630.0000 30 4 270.5000 164.0539 138.0000 509.0000 ac_on: Level N Mean Std Min Max ------------------------------------------------------------ 0 4 352.5000 255.4010 133.0000 630.0000 1 4 247.5000 45.2585 199.0000 308.0000 recirc: Level N Mean Std Min Max ------------------------------------------------------------ 0 4 287.2500 164.5041 133.0000 509.0000 1 4 312.7500 217.1012 138.0000 630.0000 rear_defrost: Level N Mean Std Min Max ------------------------------------------------------------ 0 4 179.2500 54.2241 133.0000 247.0000 1 4 420.7500 181.1250 236.0000 630.0000

Optimization Recommendations

doe optimize
=== Optimization: defog_time_sec === Direction: minimize Best observed run: #6 fan_speed = 1 temp_setting = 30 ac_on = 1 recirc = 0 rear_defrost = 0 Value: 37.0 RSM Model (linear, R² = 0.8514, Adj R² = 0.4798): Coefficients: intercept +118.6250 fan_speed +6.6250 temp_setting -9.6250 ac_on -15.8750 recirc -19.6250 rear_defrost +41.1250 Predicted optimum (from linear model, at observed points): fan_speed = 5 temp_setting = 18 ac_on = 1 recirc = 0 rear_defrost = 1 Predicted value: 179.7500 Surface optimum (via L-BFGS-B, linear model): fan_speed = 1 temp_setting = 30 ac_on = 1 recirc = 1 rear_defrost = 0 Predicted value: 25.7500 Model quality: Good fit — general trends are captured, some noise remains. Factor importance: 1. rear_defrost (effect: 82.2, contribution: 44.3%) 2. recirc (effect: -39.2, contribution: 21.1%) 3. ac_on (effect: -31.8, contribution: 17.1%) 4. temp_setting (effect: -19.2, contribution: 10.4%) 5. fan_speed (effect: 13.2, contribution: 7.1%) === Optimization: energy_watts === Direction: minimize Best observed run: #7 fan_speed = 1 temp_setting = 30 ac_on = 0 recirc = 0 rear_defrost = 1 Value: 133.0 RSM Model (linear, R² = 0.9466, Adj R² = 0.8130): Coefficients: intercept +300.0000 fan_speed -77.0000 temp_setting -28.0000 ac_on +81.0000 recirc +28.0000 rear_defrost -111.5000 Predicted optimum (from linear model, at observed points): fan_speed = 1 temp_setting = 18 ac_on = 1 recirc = 1 rear_defrost = 0 Predicted value: 625.5000 Surface optimum (via L-BFGS-B, linear model): fan_speed = 5 temp_setting = 30 ac_on = 0 recirc = 0 rear_defrost = 1 Predicted value: -25.5000 Model quality: Excellent fit — surface predictions are reliable. Factor importance: 1. rear_defrost (effect: -223.0, contribution: 34.3%) 2. ac_on (effect: 162.0, contribution: 24.9%) 3. fan_speed (effect: -154.0, contribution: 23.7%) 4. temp_setting (effect: -56.0, contribution: 8.6%) 5. recirc (effect: 56.0, contribution: 8.6%)
← All Use Cases Next: Solar Panel Tilt & Orientation →