← All Use Cases
🧵
Box-Behnken Design

Sewing Machine Stitch Quality

Box-Behnken design to maximize stitch quality and minimize thread breakage by tuning upper tension, stitch length, and presser foot pressure

Summary

This experiment investigates sewing machine stitch quality. Box-Behnken design to maximize stitch quality and minimize thread breakage by tuning upper tension, stitch length, and presser foot pressure.

The design varies 3 factors: upper tension (dial), ranging from 2 to 7, stitch length mm (mm), ranging from 1.5 to 4.0, and foot pressure (level), ranging from 1 to 5. The goal is to optimize 2 responses: stitch quality (pts) (maximize) and break rate (per_m) (minimize). Fixed conditions held constant across all runs include machine = mechanical, fabric = cotton_twill.

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 stitch quality, the most influential factors were upper tension (44.0%), stitch length mm (35.8%), foot pressure (20.2%). The best observed value was 7.3 (at upper tension = 2, stitch length mm = 2.75, foot pressure = 5).

For break rate, the most influential factors were foot pressure (49.6%), upper tension (28.6%), stitch length mm (21.8%). The best observed value was 0.1 (at upper tension = 7, stitch length mm = 1.5, foot pressure = 3).

Recommended Next Steps

Experimental Setup

Factors

FactorLowHighUnit
upper_tension27dial
stitch_length_mm1.54.0mm
foot_pressure15level

Fixed: machine = mechanical, fabric = cotton_twill

Responses

ResponseDirectionUnit
stitch_quality↑ maximizepts
break_rate↓ minimizeper_m

Configuration

use_cases/179_sewing_stitch_quality/config.json
{ "metadata": { "name": "Sewing Machine Stitch Quality", "description": "Box-Behnken design to maximize stitch quality and minimize thread breakage by tuning upper tension, stitch length, and presser foot pressure" }, "factors": [ { "name": "upper_tension", "levels": [ "2", "7" ], "type": "continuous", "unit": "dial" }, { "name": "stitch_length_mm", "levels": [ "1.5", "4.0" ], "type": "continuous", "unit": "mm" }, { "name": "foot_pressure", "levels": [ "1", "5" ], "type": "continuous", "unit": "level" } ], "fixed_factors": { "machine": "mechanical", "fabric": "cotton_twill" }, "responses": [ { "name": "stitch_quality", "optimize": "maximize", "unit": "pts" }, { "name": "break_rate", "optimize": "minimize", "unit": "per_m" } ], "settings": { "operation": "box_behnken", "test_script": "use_cases/179_sewing_stitch_quality/sim.sh" } }

Experimental Matrix

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

Runupper_tensionstitch_length_mmfoot_pressure
14.51.51
24.52.753
372.755
472.751
54.52.753
64.52.753
722.755
871.53
94.51.55
10743
1122.751
124.545
1321.53
14243
154.541

Step-by-Step Workflow

1

Preview the design

Terminal
$ doe info --config use_cases/179_sewing_stitch_quality/config.json
2

Generate the runner script

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

Execute the experiments

Terminal
$ bash use_cases/179_sewing_stitch_quality/results/run.sh
4

Analyze results

Terminal
$ doe analyze --config use_cases/179_sewing_stitch_quality/config.json
5

Get optimization recommendations

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

Generate the HTML report

Terminal
$ doe report --config use_cases/179_sewing_stitch_quality/config.json \ --output use_cases/179_sewing_stitch_quality/results/report.html

Features Exercised

FeatureValue
Design typebox_behnken
Factor typescontinuous (all 3)
Arg styledouble-dash
Responses2 (stitch_quality ↑, break_rate ↓)
Total runs15

Analysis Results

Generated from actual experiment runs using the DOE Helper Tool.

Response: stitch_quality

Top factors: upper_tension (44.0%), stitch_length_mm (35.8%), foot_pressure (20.2%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
upper_tension21.16800.58400.8720.4545
stitch_length_mm20.72520.36260.5410.6020
foot_pressure20.19380.09690.1450.8676
LackofFit62.81030.4684
PureError21.3400
Error84.15030.6700
Total146.23730.4455

Pareto Chart

Pareto chart for stitch_quality

Main Effects Plot

Main effects plot for stitch_quality

Normal Probability Plot of Effects

Normal probability plot for stitch_quality

Half-Normal Plot of Effects

Half-normal plot for stitch_quality

Model Diagnostics

Model diagnostics for stitch_quality

Response: break_rate

Top factors: foot_pressure (49.6%), upper_tension (28.6%), stitch_length_mm (21.8%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
upper_tension20.26990.13491.0870.3823
stitch_length_mm20.20200.10100.8140.4768
foot_pressure21.15080.57544.6350.0460
LackofFit62.08040.3467
PureError20.2483
Error82.32870.1241
Total143.95130.2822

Pareto Chart

Pareto chart for break_rate

Main Effects Plot

Main effects plot for break_rate

Normal Probability Plot of Effects

Normal probability plot for break_rate

Half-Normal Plot of Effects

Half-normal plot for break_rate

Model Diagnostics

Model diagnostics for break_rate

Response Surface Plots

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

break rate stitch length mm vs foot pressure

RSM surface: break rate stitch length mm vs foot pressure

break rate upper tension vs foot pressure

RSM surface: break rate upper tension vs foot pressure

break rate upper tension vs stitch length mm

RSM surface: break rate upper tension vs stitch length mm

stitch quality stitch length mm vs foot pressure

RSM surface: stitch quality stitch length mm vs foot pressure

stitch quality upper tension vs foot pressure

RSM surface: stitch quality upper tension vs foot pressure

stitch quality upper tension vs stitch length mm

RSM surface: stitch quality upper tension vs stitch length 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.8497

Per-Response Desirability

ResponseWeightDesirabilityPredictedDir
stitch_quality 1.5
0.9545
7.30 0.9545 7.30 pts
break_rate 1.0
0.7136
0.63 0.7136 0.63 per_m

Recommended Settings

FactorValue
upper_tension7 dial
stitch_length_mm1.5 mm
foot_pressure3 level

Source: from observed run #12

Trade-off Summary

Sacrifice = how much worse than single-objective best.

ResponsePredictedBest ObservedSacrifice
break_rate0.630.10+0.53

Top 3 Runs by Desirability

RunDFactor Settings
#60.7978upper_tension=2, stitch_length_mm=2.75, foot_pressure=1
#20.7561upper_tension=7, stitch_length_mm=2.75, foot_pressure=5

Model Quality

ResponseType
break_rate0.7337quadratic

Full Multi-Objective Output

doe optimize --multi
============================================================ MULTI-OBJECTIVE OPTIMIZATION Method: Derringer-Suich Desirability Function ============================================================ Overall desirability: D = 0.8497 Response Weight Desirability Predicted Direction --------------------------------------------------------------------- stitch_quality 1.5 0.9545 7.30 pts ↑ break_rate 1.0 0.7136 0.63 per_m ↓ Recommended settings: upper_tension = 7 dial stitch_length_mm = 1.5 mm foot_pressure = 3 level (from observed run #12) Trade-off summary: stitch_quality: 7.30 (best observed: 7.30, sacrifice: +0.00) break_rate: 0.63 (best observed: 0.10, sacrifice: +0.53) Model quality: stitch_quality: R² = 0.2200 (linear) break_rate: R² = 0.7337 (quadratic) Top 3 observed runs by overall desirability: 1. Run #12 (D=0.8497): upper_tension=7, stitch_length_mm=1.5, foot_pressure=3 2. Run #6 (D=0.7978): upper_tension=2, stitch_length_mm=2.75, foot_pressure=1 3. Run #2 (D=0.7561): upper_tension=7, stitch_length_mm=2.75, foot_pressure=5

Full Analysis Output

doe analyze
=== Main Effects: stitch_quality === Factor Effect Std Error % Contribution -------------------------------------------------------------- upper_tension 0.6536 0.1723 44.0% stitch_length_mm 0.5321 0.1723 35.8% foot_pressure 0.3000 0.1723 20.2% === ANOVA Table: stitch_quality === Source DF SS MS F p-value ----------------------------------------------------------------------------- upper_tension 2 1.1680 0.5840 0.872 0.4545 stitch_length_mm 2 0.7252 0.3626 0.541 0.6020 foot_pressure 2 0.1938 0.0969 0.145 0.8676 Lack of Fit 6 2.8103 0.4684 0.699 0.6895 Pure Error 2 1.3400 0.6700 Error 8 4.1503 0.6700 Total 14 6.2373 0.4455 === Summary Statistics: stitch_quality === upper_tension: Level N Mean Std Min Max ------------------------------------------------------------ 2 4 6.3750 0.6344 5.5000 7.0000 4.5 7 5.9714 0.6157 5.3000 6.9000 7 4 6.6250 0.7274 5.6000 7.3000 stitch_length_mm: Level N Mean Std Min Max ------------------------------------------------------------ 1.5 4 5.9250 0.9251 5.3000 7.3000 2.75 7 6.4571 0.5503 5.3000 6.9000 4 4 6.2250 0.6131 5.6000 7.0000 foot_pressure: Level N Mean Std Min Max ------------------------------------------------------------ 1 4 6.3750 0.5560 5.6000 6.9000 3 7 6.2857 0.8153 5.3000 7.3000 5 4 6.0750 0.6131 5.3000 6.7000 === Main Effects: break_rate === Factor Effect Std Error % Contribution -------------------------------------------------------------- foot_pressure 0.6325 0.1372 49.6% upper_tension 0.3650 0.1372 28.6% stitch_length_mm 0.2779 0.1372 21.8% === ANOVA Table: break_rate === Source DF SS MS F p-value ----------------------------------------------------------------------------- upper_tension 2 0.2699 0.1349 1.087 0.3823 stitch_length_mm 2 0.2020 0.1010 0.814 0.4768 foot_pressure 2 1.1508 0.5754 4.635 0.0460 Lack of Fit 6 2.0804 0.3467 2.793 0.2870 Pure Error 2 0.2483 0.1241 Error 8 2.3287 0.1241 Total 14 3.9513 0.2822 === Summary Statistics: break_rate === upper_tension: Level N Mean Std Min Max ------------------------------------------------------------ 2 4 0.5850 0.3740 0.2500 1.1200 4.5 7 0.7371 0.4987 0.1000 1.5300 7 4 0.9500 0.7681 0.5200 2.1000 stitch_length_mm: Level N Mean Std Min Max ------------------------------------------------------------ 1.5 4 0.7850 0.5016 0.4600 1.5300 2.75 7 0.8429 0.6440 0.2500 2.1000 4 4 0.5650 0.4106 0.1000 1.1000 foot_pressure: Level N Mean Std Min Max ------------------------------------------------------------ 1 4 1.2125 0.8435 0.1000 2.1000 3 7 0.5800 0.2163 0.3100 1.0100 5 4 0.5975 0.3584 0.2500 1.1000

Optimization Recommendations

doe optimize
=== Optimization: stitch_quality === Direction: maximize Best observed run: #12 upper_tension = 2 stitch_length_mm = 2.75 foot_pressure = 5 Value: 7.3 RSM Model (linear, R² = 0.3082, Adj R² = 0.1196): Coefficients: intercept +6.2533 upper_tension -0.3625 stitch_length_mm +0.2625 foot_pressure -0.2000 RSM Model (quadratic, R² = 0.7933, Adj R² = 0.4213): Coefficients: intercept +5.8333 upper_tension -0.3625 stitch_length_mm +0.2625 foot_pressure -0.2000 upper_tension*stitch_length_mm -0.5250 upper_tension*foot_pressure -0.4000 stitch_length_mm*foot_pressure +0.2500 upper_tension^2 +0.2208 stitch_length_mm^2 +0.0708 foot_pressure^2 +0.4958 Curvature analysis: foot_pressure coef=+0.4958 convex (has a minimum) upper_tension coef=+0.2208 convex (has a minimum) stitch_length_mm coef=+0.0708 negligible curvature Notable interactions: upper_tension*stitch_length_mm coef=-0.5250 (antagonistic) upper_tension*foot_pressure coef=-0.4000 (antagonistic) Predicted optimum (from quadratic model, at observed points): upper_tension = 2 stitch_length_mm = 4 foot_pressure = 3 Predicted value: 7.2750 Surface optimum (via L-BFGS-B, quadratic model): upper_tension = 2 stitch_length_mm = 4 foot_pressure = 5 Predicted value: 8.2208 Model quality: Good fit — general trends are captured, some noise remains. Factor importance: 1. upper_tension (effect: 0.7, contribution: 37.7%) 2. foot_pressure (effect: 0.7, contribution: 35.1%) 3. stitch_length_mm (effect: 0.5, contribution: 27.3%) === Optimization: break_rate === Direction: minimize Best observed run: #15 upper_tension = 7 stitch_length_mm = 1.5 foot_pressure = 3 Value: 0.1 RSM Model (linear, R² = 0.1759, Adj R² = -0.0489): Coefficients: intercept +0.7533 upper_tension -0.0687 stitch_length_mm +0.2450 foot_pressure +0.1487 RSM Model (quadratic, R² = 0.4894, Adj R² = -0.4297): Coefficients: intercept +1.0000 upper_tension -0.0688 stitch_length_mm +0.2450 foot_pressure +0.1487 upper_tension*stitch_length_mm +0.2325 upper_tension*foot_pressure -0.1700 stitch_length_mm*foot_pressure +0.3825 upper_tension^2 -0.2550 stitch_length_mm^2 -0.1675 foot_pressure^2 -0.0400 Curvature analysis: upper_tension coef=-0.2550 concave (has a maximum) stitch_length_mm coef=-0.1675 concave (has a maximum) foot_pressure coef=-0.0400 negligible curvature Notable interactions: stitch_length_mm*foot_pressure coef=+0.3825 (synergistic) Predicted optimum (from linear model, at observed points): upper_tension = 4.5 stitch_length_mm = 4 foot_pressure = 5 Predicted value: 1.1471 Surface optimum (via L-BFGS-B, linear model): upper_tension = 7 stitch_length_mm = 1.5 foot_pressure = 1 Predicted value: 0.2908 Model quality: Weak fit — consider adding center points or using a different design. Factor importance: 1. stitch_length_mm (effect: 0.5, contribution: 44.7%) 2. upper_tension (effect: 0.3, contribution: 28.2%) 3. foot_pressure (effect: 0.3, contribution: 27.1%)
← Previous: Knitting Gauge & Tension Next: Leather Tanning Process →