algo-mfg-doe

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Design of Experiments (DOE)

实验设计(DOE)

Overview

概述

DOE systematically varies process factors to identify their effects on responses. Full factorial tests all combinations; fractional factorial tests a strategic subset. Identifies main effects and interactions. More efficient than one-factor-at-a-time (OFAT) which misses interactions. Uses ANOVA for analysis.
DOE通过系统性地改变过程因素来识别它们对响应变量的影响。全因子实验测试所有因素组合;部分因子实验测试经过筛选的子集。该方法可识别主效应和交互效应,比单次单因子(OFAT)实验更高效,因为OFAT会遗漏交互效应。分析时使用ANOVA方法。

When to Use

适用场景

Trigger conditions:
  • Identifying which process factors significantly affect quality/yield
  • Optimizing process settings for target performance
  • Screening many factors to find the vital few
When NOT to use:
  • When the process is not stable (stabilize with SPC first)
  • For observational data with no ability to manipulate factors
触发条件:
  • 识别哪些过程因素对质量/产量有显著影响
  • 优化流程设置以达成目标性能
  • 筛选大量因素,找出关键少数
不适用场景:
  • 流程不稳定时(需先用SPC稳定流程)
  • 仅能获取观测数据,无法操控因素时

Algorithm

算法

IRON LAW: One-Factor-At-A-Time (OFAT) MISSES Interactions
Changing one factor while holding others fixed cannot detect
interactions (where the effect of A depends on the level of B).
Full factorial or fractional factorial designs test ALL main effects
AND interactions in fewer runs than OFAT. A 2³ factorial (8 runs)
gives more information than 6 OFAT runs at lower cost.
IRON LAW: One-Factor-At-A-Time (OFAT) MISSES Interactions
Changing one factor while holding others fixed cannot detect
interactions (where the effect of A depends on the level of B).
Full factorial or fractional factorial designs test ALL main effects
AND interactions in fewer runs than OFAT. A 2³ factorial (8 runs)
gives more information than 6 OFAT runs at lower cost.

Phase 1: Input Validation

阶段1:输入验证

Define: response variable(s), factors (2-7 practical), levels per factor (usually 2 for screening, 3 for optimization), constraints, noise factors. Gate: Factors and levels defined, practical to run all experimental conditions.
定义:响应变量、因素(实际场景中2-7个)、每个因素的水平数(筛选实验通常为2个,优化实验通常为3个)、约束条件、噪声因素。 准入条件: 已明确因素和水平,可实际执行所有实验条件。

Phase 2: Core Algorithm

阶段2:核心算法

Screening (many factors): 2^(k-p) fractional factorial. Choose resolution III+ (main effects not confounded with each other).
Optimization (few factors): 2^k full factorial or central composite design (CCD) for response surface.
  1. Generate design matrix (run order, factor level assignments)
  2. Randomize run order (critical for validity)
  3. Execute experiments, record responses
  4. Analyze: ANOVA for factor significance, effect plots, interaction plots
  5. If optimizing: fit response surface model, find optimal settings
筛选实验(因素较多时): 2^(k-p)部分因子实验。选择分辨率III及以上(主效应之间互不混淆)。
优化实验(因素较少时): 2^k全因子实验或用于响应面分析的中心复合设计(CCD)。
  1. 生成设计矩阵(运行顺序、因素水平分配)
  2. 随机化运行顺序(对结果有效性至关重要)
  3. 执行实验,记录响应数据
  4. 分析:用ANOVA判断因素显著性,绘制效应图、交互效应图
  5. 若为优化实验:拟合响应面模型,找出最优设置

Phase 3: Verification

阶段3:验证

Check: R² of model is adequate, residuals are normally distributed and random. Confirmation runs at predicted optimal settings match prediction. Gate: Model is significant, residuals OK, confirmation runs pass.
检查:模型的R²是否足够,残差是否呈正态分布且随机。在预测的最优设置下进行验证实验,确认结果与预测一致。 准入条件: 模型显著,残差符合要求,验证实验通过。

Phase 4: Output

阶段4:输出

Return significant factors, effects, and optimal settings.
返回显著因素、效应值及最优设置。

Output Format

输出格式

json
{
  "significant_factors": [{"factor": "temperature", "effect": 12.5, "p_value": 0.001}, {"factor": "pressure", "effect": -8.2, "p_value": 0.008}],
  "interactions": [{"factors": "temperature×time", "effect": 5.1, "p_value": 0.03}],
  "optimal": {"temperature": 180, "pressure": 50, "time": 30, "predicted_response": 95.2},
  "metadata": {"design": "2^3_full_factorial", "runs": 8, "replicates": 2, "r_squared": 0.94}
}
json
{
  "significant_factors": [{"factor": "temperature", "effect": 12.5, "p_value": 0.001}, {"factor": "pressure", "effect": -8.2, "p_value": 0.008}],
  "interactions": [{"factors": "temperature×time", "effect": 5.1, "p_value": 0.03}],
  "optimal": {"temperature": 180, "pressure": 50, "time": 30, "predicted_response": 95.2},
  "metadata": {"design": "2^3_full_factorial", "runs": 8, "replicates": 2, "r_squared": 0.94}
}

Examples

示例

Sample I/O

输入输出示例

Input: 3 factors (temperature, pressure, time), each at 2 levels, response = yield Expected: 2³ = 8 runs + replicates. ANOVA reveals temperature and temp×pressure interaction are significant.
输入: 3个因素(温度、压力、时间),每个因素2个水平,响应变量为产量 预期结果: 2³=8次实验+重复实验。ANOVA分析显示温度及温度×压力的交互效应显著。

Edge Cases

边缘情况

InputExpectedWhy
7+ factorsFractional factorialFull factorial too expensive (2⁷=128 runs)
Factors with constraintsConstrained designSome factor combinations may be physically impossible
Non-linear responseCCD or Box-Behnken2-level designs only fit linear models
输入预期结果原因
7个及以上因素部分因子实验全因子实验成本过高(2⁷=128次实验)
因素存在约束条件约束性设计部分因素组合可能在物理上无法实现
响应呈非线性CCD或Box-Behnken设计2水平设计仅能拟合线性模型

Gotchas

注意事项

  • Randomization is critical: Without randomization, time-varying factors (operator fatigue, ambient temperature) confound results. ALWAYS randomize run order.
  • Replication vs repetition: Replication (re-setup and re-run) estimates error. Repetition (multiple measurements from one run) does not. Include true replicates.
  • Alias structure: Fractional factorials confound some effects. Know which effects are aliased (confounded) before interpreting results.
  • Center points: Adding center points to a 2-level design detects curvature (non-linearity) at minimal cost. Always include 3-5 center points.
  • Practical significance vs statistical significance: A factor can be statistically significant (p<0.05) but practically unimportant (tiny effect). Focus on effect SIZE, not just p-values.
  • 随机化至关重要:若不随机化,随时间变化的因素(如操作员疲劳、环境温度)会干扰结果。务必随机化运行顺序。
  • 重复实验 vs 重复测量:重复实验(重新设置并运行)可估算误差。重复测量(单次实验中多次测量)无法估算误差。需包含真正的重复实验。
  • 混淆结构:部分因子实验会混淆某些效应。解读结果前需明确哪些效应存在混淆。
  • 中心点:在2水平设计中添加中心点可低成本检测曲率(非线性)。务必添加3-5个中心点。
  • 实际显著性 vs 统计显著性:某个因素可能统计上显著(p<0.05)但实际影响极小。需关注效应的大小,而非仅看p值。

References

参考资料

  • For fractional factorial design tables, see
    references/fractional-tables.md
  • For response surface methodology (RSM), see
    references/rsm.md
  • 部分因子设计表格请参见
    references/fractional-tables.md
  • 响应面方法(RSM)请参见
    references/rsm.md