← All Use Cases
🧵
Central Composite Design

Knitting Gauge & Tension

Central composite design to achieve target gauge and maximize fabric drape by tuning needle size, yarn weight, and tension setting

Summary

This experiment investigates knitting gauge & tension. Central composite design to achieve target gauge and maximize fabric drape by tuning needle size, yarn weight, and tension setting.

The design varies 3 factors: needle mm (mm), ranging from 3.0 to 6.0, yarn weight (category), ranging from 1 to 5, and tension setting (dial), ranging from 3 to 9. The goal is to optimize 2 responses: gauge sts 10cm (sts/10cm) (maximize) and drape score (pts) (maximize). Fixed conditions held constant across all runs include fiber = merino_wool, stitch pattern = stockinette.

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 gauge sts 10cm, the most influential factors were needle mm (40.6%), tension setting (34.8%), yarn weight (24.6%). The best observed value was 33.0 (at needle mm = 6, yarn weight = 5, tension setting = 9).

For drape score, the most influential factors were tension setting (51.0%), yarn weight (35.6%), needle mm (13.5%). The best observed value was 7.5 (at needle mm = 4.5, yarn weight = 3, tension setting = 6).

Recommended Next Steps

Experimental Setup

Factors

FactorLowHighUnit
needle_mm3.06.0mm
yarn_weight15category
tension_setting39dial

Fixed: fiber = merino_wool, stitch_pattern = stockinette

Responses

ResponseDirectionUnit
gauge_sts_10cm↑ maximizests/10cm
drape_score↑ maximizepts

Configuration

use_cases/178_knitting_tension/config.json
{ "metadata": { "name": "Knitting Gauge & Tension", "description": "Central composite design to achieve target gauge and maximize fabric drape by tuning needle size, yarn weight, and tension setting" }, "factors": [ { "name": "needle_mm", "levels": [ "3.0", "6.0" ], "type": "continuous", "unit": "mm" }, { "name": "yarn_weight", "levels": [ "1", "5" ], "type": "continuous", "unit": "category" }, { "name": "tension_setting", "levels": [ "3", "9" ], "type": "continuous", "unit": "dial" } ], "fixed_factors": { "fiber": "merino_wool", "stitch_pattern": "stockinette" }, "responses": [ { "name": "gauge_sts_10cm", "optimize": "maximize", "unit": "sts/10cm" }, { "name": "drape_score", "optimize": "maximize", "unit": "pts" } ], "settings": { "operation": "central_composite", "test_script": "use_cases/178_knitting_tension/sim.sh" } }

Experimental Matrix

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

Runneedle_mmyarn_weighttension_setting
14.536
2619
3353
44.56.651486
54.536
61.7613936
74.530.522774
84.536
9653
107.2386136
114.536
124.5-0.6514846
134.536
14319
154.536
16613
174.5311.4772
18659
194.536
20313
21359
224.536

Step-by-Step Workflow

1

Preview the design

Terminal
$ doe info --config use_cases/178_knitting_tension/config.json
2

Generate the runner script

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

Execute the experiments

Terminal
$ bash use_cases/178_knitting_tension/results/run.sh
4

Analyze results

Terminal
$ doe analyze --config use_cases/178_knitting_tension/config.json
5

Get optimization recommendations

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

Generate the HTML report

Terminal
$ doe report --config use_cases/178_knitting_tension/config.json \ --output use_cases/178_knitting_tension/results/report.html

Features Exercised

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

Analysis Results

Generated from actual experiment runs using the DOE Helper Tool.

Response: gauge_sts_10cm

Top factors: needle_mm (40.6%), tension_setting (34.8%), yarn_weight (24.6%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
needle_mm449.583312.39580.4300.7840
yarn_weight443.583310.89580.3780.8191
tension_setting431.00007.75000.2690.8908
LackofFit2137.958368.9792
PureError7201.8750
Error9339.833328.8393
Total21464.000022.0952

Pareto Chart

Pareto chart for gauge_sts_10cm

Main Effects Plot

Main effects plot for gauge_sts_10cm

Normal Probability Plot of Effects

Normal probability plot for gauge_sts_10cm

Half-Normal Plot of Effects

Half-normal plot for gauge_sts_10cm

Model Diagnostics

Model diagnostics for gauge_sts_10cm

Response: drape_score

Top factors: tension_setting (51.0%), yarn_weight (35.6%), needle_mm (13.5%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
needle_mm40.28520.07130.0420.9960
yarn_weight42.35610.58900.3490.8385
tension_setting41.48520.37130.2200.9206
LackofFit23.86751.9337
PureError711.8187
Error915.68621.6884
Total2119.81270.9435

Pareto Chart

Pareto chart for drape_score

Main Effects Plot

Main effects plot for drape_score

Normal Probability Plot of Effects

Normal probability plot for drape_score

Half-Normal Plot of Effects

Half-normal plot for drape_score

Model Diagnostics

Model diagnostics for drape_score

Response Surface Plots

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

drape score needle mm vs tension setting

RSM surface: drape score needle mm vs tension setting

drape score needle mm vs yarn weight

RSM surface: drape score needle mm vs yarn weight

drape score yarn weight vs tension setting

RSM surface: drape score yarn weight vs tension setting

gauge sts 10cm needle mm vs tension setting

RSM surface: gauge sts 10cm needle mm vs tension setting

gauge sts 10cm needle mm vs yarn weight

RSM surface: gauge sts 10cm needle mm vs yarn weight

gauge sts 10cm yarn weight vs tension setting

RSM surface: gauge sts 10cm yarn weight vs tension setting

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

Per-Response Desirability

ResponseWeightDesirabilityPredictedDir
gauge_sts_10cm 1.0
0.7525
29.00 0.7525 29.00 sts/10cm
drape_score 1.5
0.6515
6.10 0.6515 6.10 pts

Recommended Settings

FactorValue
needle_mm4.5 mm
yarn_weight3 category
tension_setting6 dial

Source: from observed run #12

Trade-off Summary

Sacrifice = how much worse than single-objective best.

ResponsePredictedBest ObservedSacrifice
drape_score6.107.50+1.40

Top 3 Runs by Desirability

RunDFactor Settings
#200.5888needle_mm=3, yarn_weight=1, tension_setting=3
#130.5837needle_mm=4.5, yarn_weight=3, tension_setting=6

Model Quality

ResponseType
drape_score0.1680linear

Full Multi-Objective Output

doe optimize --multi
============================================================ MULTI-OBJECTIVE OPTIMIZATION Method: Derringer-Suich Desirability Function ============================================================ Overall desirability: D = 0.6902 Response Weight Desirability Predicted Direction --------------------------------------------------------------------- gauge_sts_10cm 1.0 0.7525 29.00 sts/10cm ↑ drape_score 1.5 0.6515 6.10 pts ↑ Recommended settings: needle_mm = 4.5 mm yarn_weight = 3 category tension_setting = 6 dial (from observed run #12) Trade-off summary: gauge_sts_10cm: 29.00 (best observed: 33.00, sacrifice: +4.00) drape_score: 6.10 (best observed: 7.50, sacrifice: +1.40) Model quality: gauge_sts_10cm: R² = 0.1295 (linear) drape_score: R² = 0.1680 (linear) Top 3 observed runs by overall desirability: 1. Run #12 (D=0.6902): needle_mm=4.5, yarn_weight=3, tension_setting=6 2. Run #20 (D=0.5888): needle_mm=3, yarn_weight=1, tension_setting=3 3. Run #13 (D=0.5837): needle_mm=4.5, yarn_weight=3, tension_setting=6

Full Analysis Output

doe analyze
=== Main Effects: gauge_sts_10cm === Factor Effect Std Error % Contribution -------------------------------------------------------------- needle_mm 7.0000 1.0022 40.6% tension_setting 6.0000 1.0022 34.8% yarn_weight 4.2500 1.0022 24.6% === ANOVA Table: gauge_sts_10cm === Source DF SS MS F p-value ----------------------------------------------------------------------------- needle_mm 4 49.5833 12.3958 0.430 0.7840 yarn_weight 4 43.5833 10.8958 0.378 0.8191 tension_setting 4 31.0000 7.7500 0.269 0.8908 Lack of Fit 2 137.9583 68.9792 2.392 0.1616 Pure Error 7 201.8750 28.8393 Error 9 339.8333 28.8393 Total 21 464.0000 22.0952 === Summary Statistics: gauge_sts_10cm === needle_mm: Level N Mean Std Min Max ------------------------------------------------------------ 1.76139 1 22.0000 0.0000 22.0000 22.0000 3 4 24.2500 6.3443 18.0000 33.0000 4.5 12 22.3333 4.5594 15.0000 33.0000 6 4 22.5000 4.6547 18.0000 29.0000 7.23861 1 29.0000 0.0000 29.0000 29.0000 yarn_weight: Level N Mean Std Min Max ------------------------------------------------------------ -0.651484 1 22.0000 0.0000 22.0000 22.0000 1 4 21.2500 2.5000 18.0000 24.0000 3 12 22.6667 4.9052 15.0000 33.0000 5 4 25.5000 6.7577 18.0000 33.0000 6.65148 1 25.0000 0.0000 25.0000 25.0000 tension_setting: Level N Mean Std Min Max ------------------------------------------------------------ 0.522774 1 18.0000 0.0000 18.0000 18.0000 11.4772 1 22.0000 0.0000 22.0000 22.0000 3 4 22.7500 7.0887 18.0000 33.0000 6 12 23.2500 4.7122 15.0000 33.0000 9 4 24.0000 3.5590 21.0000 29.0000 === Main Effects: drape_score === Factor Effect Std Error % Contribution -------------------------------------------------------------- tension_setting 1.3250 0.2071 51.0% yarn_weight 0.9250 0.2071 35.6% needle_mm 0.3500 0.2071 13.5% === ANOVA Table: drape_score === Source DF SS MS F p-value ----------------------------------------------------------------------------- needle_mm 4 0.2852 0.0713 0.042 0.9960 yarn_weight 4 2.3561 0.5890 0.349 0.8385 tension_setting 4 1.4852 0.3713 0.220 0.9206 Lack of Fit 2 3.8675 1.9337 1.145 0.3713 Pure Error 7 11.8187 1.6884 Error 9 15.6862 1.6884 Total 21 19.8127 0.9435 === Summary Statistics: drape_score === needle_mm: Level N Mean Std Min Max ------------------------------------------------------------ 1.76139 1 6.0000 0.0000 6.0000 6.0000 3 4 5.7500 1.3699 3.8000 7.0000 4.5 12 6.0500 1.1058 3.3000 7.5000 6 4 5.9750 0.3862 5.4000 6.2000 7.23861 1 6.1000 0.0000 6.1000 6.1000 yarn_weight: Level N Mean Std Min Max ------------------------------------------------------------ -0.651484 1 6.2000 0.0000 6.2000 6.2000 1 4 6.3250 0.4573 6.0000 7.0000 3 12 6.0917 1.0867 3.3000 7.5000 5 4 5.4000 1.1314 3.8000 6.2000 6.65148 1 5.4000 0.0000 5.4000 5.4000 tension_setting: Level N Mean Std Min Max ------------------------------------------------------------ 0.522774 1 7.1000 0.0000 7.1000 7.1000 11.4772 1 6.2000 0.0000 6.2000 6.2000 3 4 5.7750 1.3769 3.8000 7.0000 6 12 5.9500 1.0536 3.3000 7.5000 9 4 5.9500 0.3786 5.4000 6.2000

Optimization Recommendations

doe optimize
=== Optimization: gauge_sts_10cm === Direction: maximize Best observed run: #6 needle_mm = 6 yarn_weight = 5 tension_setting = 9 Value: 33.0 RSM Model (linear, R² = 0.1016, Adj R² = -0.0481): Coefficients: intercept +23.0000 needle_mm +0.2045 yarn_weight -0.0031 tension_setting +1.7815 RSM Model (quadratic, R² = 0.4891, Adj R² = 0.1059): Coefficients: intercept +20.5658 needle_mm +0.2045 yarn_weight -0.0031 tension_setting +1.7815 needle_mm*yarn_weight +3.1250 needle_mm*tension_setting +1.1250 yarn_weight*tension_setting -0.1250 needle_mm^2 +0.6671 yarn_weight^2 +1.8671 tension_setting^2 +1.1171 Curvature analysis: yarn_weight coef=+1.8671 convex (has a minimum) tension_setting coef=+1.1171 convex (has a minimum) needle_mm coef=+0.6671 convex (has a minimum) Notable interactions: needle_mm*yarn_weight coef=+3.1250 (synergistic) needle_mm*tension_setting coef=+1.1250 (synergistic) Predicted optimum (from quadratic model, at observed points): needle_mm = 6 yarn_weight = 5 tension_setting = 9 Predicted value: 30.3251 Surface optimum (via L-BFGS-B, quadratic model): needle_mm = 6 yarn_weight = 5 tension_setting = 9 Predicted value: 30.3251 Model quality: Weak fit — consider adding center points or using a different design. Factor importance: 1. yarn_weight (effect: 7.8, contribution: 45.4%) 2. tension_setting (effect: 6.0, contribution: 35.1%) 3. needle_mm (effect: 3.3, contribution: 19.5%) === Optimization: drape_score === Direction: maximize Best observed run: #9 needle_mm = 4.5 yarn_weight = 3 tension_setting = 6 Value: 7.5 RSM Model (linear, R² = 0.1601, Adj R² = 0.0201): Coefficients: intercept +5.9818 needle_mm -0.0397 yarn_weight +0.0682 tension_setting -0.4583 RSM Model (quadratic, R² = 0.6223, Adj R² = 0.3391): Coefficients: intercept +6.4371 needle_mm -0.0397 yarn_weight +0.0682 tension_setting -0.4583 needle_mm*yarn_weight -0.8250 needle_mm*tension_setting -0.3250 yarn_weight*tension_setting -0.0000 needle_mm^2 -0.1776 yarn_weight^2 -0.1926 tension_setting^2 -0.3126 Curvature analysis: tension_setting coef=-0.3126 concave (has a maximum) yarn_weight coef=-0.1926 concave (has a maximum) needle_mm coef=-0.1776 concave (has a maximum) Notable interactions: needle_mm*yarn_weight coef=-0.8250 (antagonistic) needle_mm*tension_setting coef=-0.3250 (antagonistic) Predicted optimum (from quadratic model, at observed points): needle_mm = 6 yarn_weight = 1 tension_setting = 3 Predicted value: 7.2545 Surface optimum (via L-BFGS-B, quadratic model): needle_mm = 6 yarn_weight = 1 tension_setting = 3 Predicted value: 7.2545 Model quality: Moderate fit — use predictions directionally, not precisely. Factor importance: 1. tension_setting (effect: 1.6, contribution: 48.0%) 2. yarn_weight (effect: 0.9, contribution: 27.3%) 3. needle_mm (effect: 0.8, contribution: 24.7%)
← Previous: Natural Fabric Dyeing Next: Sewing Machine Stitch Quality →