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
- Run confirmation experiments at the predicted optimal settings to validate the model.
- Consider whether any fixed factors should be varied in a future study.
Experimental Setup
Factors
| Factor | Low | High | Unit |
upper_tension | 2 | 7 | dial |
stitch_length_mm | 1.5 | 4.0 | mm |
foot_pressure | 1 | 5 | level |
Fixed: machine = mechanical, fabric = cotton_twill
Responses
| Response | Direction | Unit |
stitch_quality | ↑ maximize | pts |
break_rate | ↓ minimize | per_m |
Configuration
{
"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.
| Run | upper_tension | stitch_length_mm | foot_pressure |
| 1 | 4.5 | 1.5 | 1 |
| 2 | 4.5 | 2.75 | 3 |
| 3 | 7 | 2.75 | 5 |
| 4 | 7 | 2.75 | 1 |
| 5 | 4.5 | 2.75 | 3 |
| 6 | 4.5 | 2.75 | 3 |
| 7 | 2 | 2.75 | 5 |
| 8 | 7 | 1.5 | 3 |
| 9 | 4.5 | 1.5 | 5 |
| 10 | 7 | 4 | 3 |
| 11 | 2 | 2.75 | 1 |
| 12 | 4.5 | 4 | 5 |
| 13 | 2 | 1.5 | 3 |
| 14 | 2 | 4 | 3 |
| 15 | 4.5 | 4 | 1 |
Step-by-Step Workflow
1
Preview the design
$ doe info --config use_cases/179_sewing_stitch_quality/config.json
2
Generate the runner script
$ 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
$ bash use_cases/179_sewing_stitch_quality/results/run.sh
4
Analyze results
$ doe analyze --config use_cases/179_sewing_stitch_quality/config.json
5
Get optimization recommendations
$ 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.
$ doe optimize --config use_cases/179_sewing_stitch_quality/config.json --multi
7
Generate the HTML report
$ doe report --config use_cases/179_sewing_stitch_quality/config.json \
--output use_cases/179_sewing_stitch_quality/results/report.html
Features Exercised
| Feature | Value |
| Design type | box_behnken |
| Factor types | continuous (all 3) |
| Arg style | double-dash |
| Responses | 2 (stitch_quality ↑, break_rate ↓) |
| Total runs | 15 |
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
| Source | DF | SS | MS | F | p-value |
| 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 |
| Pure | Error | 2 | 1.3400 | | |
| Error | 8 | 4.1503 | 0.6700 | | |
| Total | 14 | 6.2373 | 0.4455 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response: break_rate
Top factors: foot_pressure (49.6%), upper_tension (28.6%), stitch_length_mm (21.8%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| 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 |
| Pure | Error | 2 | 0.2483 | | |
| Error | 8 | 2.3287 | 0.1241 | | |
| Total | 14 | 3.9513 | 0.2822 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response Surface Plots
3D surfaces fitted with quadratic RSM. Red dots are observed data points.
break rate stitch length mm vs foot pressure
break rate upper tension vs foot pressure
break rate upper tension vs stitch length mm
stitch quality stitch length mm vs foot pressure
stitch quality upper tension vs foot pressure
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
| Response | Weight | Desirability | Predicted | Dir |
stitch_quality |
1.5 |
|
7.30 0.9545 7.30 pts |
↑ |
break_rate |
1.0 |
|
0.63 0.7136 0.63 per_m |
↓ |
Recommended Settings
| Factor | Value |
upper_tension | 7 dial |
stitch_length_mm | 1.5 mm |
foot_pressure | 3 level |
Source: from observed run #12
Trade-off Summary
Sacrifice = how much worse than single-objective best.
| Response | Predicted | Best Observed | Sacrifice |
break_rate | 0.63 | 0.10 | +0.53 |
Top 3 Runs by Desirability
| Run | D | Factor Settings |
| #6 | 0.7978 | upper_tension=2, stitch_length_mm=2.75, foot_pressure=1 |
| #2 | 0.7561 | upper_tension=7, stitch_length_mm=2.75, foot_pressure=5 |
Model Quality
| Response | R² | Type |
break_rate | 0.7337 | quadratic |
Full Multi-Objective Output
============================================================
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
=== 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
=== 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%)