3. Full factorial and fractional factorial designs
Factorial designs are the backbone of screening and characterization experiments in CAE. When you need to know not only which input parameters matter but also how they interact, a full factorial or a carefully chosen fractional factorial is usually the right starting point. This section covers how these designs are constructed, what aliasing means, how resolution quantifies design quality, and how to build them in Python with pyDOE2.
Full Factorial Designs
A full factorial design runs every combination of every factor at every level. For k factors each at two levels, the design has 2k runs. With three factors (A, B, C) at low (−1) and high (+1) levels, the eight runs are:
Run A B C
1 -1 -1 -1
2 +1 -1 -1
3 -1 +1 -1
4 +1 +1 -1
5 -1 -1 +1
6 +1 -1 +1
7 -1 +1 +1
8 +1 +1 +1
The key property of a full factorial is that every main effect and every interaction — up to the k-factor interaction — is estimable independently. No effect is confounded with any other. This is why full factorials are the gold standard for small k. The cost, however, grows exponentially: 27 = 128 runs, 210 = 1024 runs. For CAE simulations where each run may take hours, this quickly becomes impractical.
Full factorials also support more than two levels. A 3k design uses three levels per factor and can capture curvature in the response. The trade-off is even faster growth: 34 = 81 runs. In practice, two-level full factorials are used for screening, and higher-level designs are reserved for response surface work on a small number of factors.
Fractional Factorial Designs and Aliasing
A fractional factorial runs a carefully selected subset of the full factorial. A 2k−p design uses k factors but only 2k−p runs, where p is the number of generators that define which fraction to use. For example, a 23−1 design has 4 runs instead of 8.
The price of this economy is aliasing (also called confounding): some effects become indistinguishable from others. In a 23−1 design with generator C = AB, the defining relation is I = ABC. This means:
- A is aliased with BC
- B is aliased with AC
- C is aliased with AB
When you estimate the effect of A, you are actually estimating A + BC. If the BC interaction is negligible, the estimate is fine. If it is not, your conclusion about A is contaminated. This is the central engineering judgment in fractional factorial design: you must be willing to assume that certain high-order interactions are negligible.
The defining relation is the set of words (products of factors) that equal the identity column I. For a 23−1 design with I = ABC, the full alias structure is obtained by multiplying each effect by the defining relation. The resolution of a design is the length of the shortest word in its defining relation.
Resolution: Quantifying Design Quality
Resolution is the single most important summary of a fractional factorial's capability:
| Resolution | Shortest word length | What it means |
|---|---|---|
| III | 3 | Main effects are aliased with two-factor interactions. Use only for screening when interactions are assumed negligible. |
| IV | 4 | Main effects are clear of two-factor interactions, but two-factor interactions are aliased with each other. Good for screening with some interaction awareness. |
| V | 5 | Main effects and two-factor interactions are clear of each other. Two-factor interactions are aliased only with three-factor interactions. Excellent for most CAE screening. |
A Resolution IV design is often the sweet spot for CAE screening: it protects main effects from two-factor interaction contamination, which is the most common failure mode in practice. Resolution V is preferred when you need clean two-factor interaction estimates but can still tolerate aliasing among three-factor and higher terms.
Constructing Designs with pyDOE2
pyDOE2 is a maintained fork of the original pyDOE library and provides direct functions for both full and fractional factorial designs. Install it with:
pip install pyDOE2
The two primary functions are fullfact and fracfact. Here is a complete example that builds a 23 full factorial and a 24−1 Resolution IV fractional factorial:
import numpy as np
from pyDOE2 import fullfact, fracfact
# Full factorial: 3 factors, 2 levels each -> 8 runs
ff = fullfact([2, 2, 2])
print("Full factorial 2^3:")
print(ff)
# Output: 8x3 array of -1/+1 values
# Fractional factorial: 4 factors, 8 runs, Resolution IV
# Generator: D = ABC
ff_frac = fracfact("a b c abc")
print("\nFractional factorial 2^(4-1), Resolution IV:")
print(ff_frac)
print("Shape:", ff_frac.shape) # (8, 4)
The string "a b c abc" tells fracfact to use A, B, and C as base factors and generate D as the product ABC. This produces a 24−1 design with defining relation I = ABCD, which has resolution IV because the shortest word is ABCD (length 4).
To verify the alias structure, you can inspect the design matrix. In a Resolution IV design, main effects are orthogonal to all two-factor interactions, but two-factor interactions are aliased in pairs. For example, AB is aliased with CD, AC with BD, and AD with BC.
Practical Workflow for CAE Screening
A typical CAE screening workflow using these designs looks like this:
- Define factors and levels. Choose the input parameters you want to screen (e.g., mesh density, material modulus, load magnitude, boundary condition stiffness) and set low/high values based on engineering judgment or prior simulation data.
- Select design type. If k ≤ 4 and runs are cheap, use a full factorial. If k ≥ 5 or runs are expensive, use a fractional factorial with Resolution IV or V.
- Generate the design matrix with
pyDOE2and map the coded −1/+1 values to actual parameter values. - Run the simulations and record the response (e.g., maximum stress, displacement, temperature).
- Analyze effects using main effect plots, Pareto charts, or ANOVA. Be aware of the alias structure when interpreting interaction terms.
Visualizing the Design Space and Alias Structure
The SVG below illustrates the relationship between a full factorial and a fractional factorial for four factors, showing how the fractional design selects a subset of runs and how the alias structure links effects.
The left panel shows all 16 runs of a 24 full factorial. The right panel shows the 8 runs selected by the 24−1 fractional design with generator D = ABC. The alias structure box lists which effects are confounded. Notice that main effects are aliased only with three-factor interactions (Resolution IV), while two-factor interactions are aliased in pairs. This is the defining characteristic of a Resolution IV design: main effects are safe, but interaction interpretation requires care.
Choosing Between Full and Fractional Designs
The decision comes down to a cost-benefit analysis. Full factorials give you complete information but scale exponentially. Fractional factorials give you a controlled amount of information at a fraction of the cost, provided you accept the aliasing assumptions. In CAE, where a single simulation can take minutes to hours, fractional factorials are often the only feasible option for k ≥ 5.
A practical strategy is to start with a Resolution IV fractional factorial for screening, identify the important main effects and any strong two-factor interactions, then follow up with a small full factorial or response surface design on the reduced set of critical factors. This sequential approach — screen broadly, then characterize narrowly — is standard practice in both physical and simulation-based experimentation.
When using pyDOE2, always verify the resolution and alias structure before running simulations. The fracfact function accepts a generator string, and you can derive the defining relation from it. For a generator like "a b c abc", the defining relation is I = ABCD, giving Resolution IV. For "a b c d abcd", the defining relation is I = ABCDE, giving Resolution V. Understanding this relationship lets you design experiments that answer the questions you actually care about.