Module 4/5 · Weeks 10–12 · 36 h

Testing and evaluation

UAT 491 Unmanned Aircraft Systems and Automation Technology Capstone Project

About 90 minDraft, awaiting reviewLast updated 29 September 2026

Lesson

By the end of this module you will be able to

  1. Design a 2 × 2 factorial experiment and compute main effects and the interaction
  2. Compare two options with a Welch t-test and report the effect size with Cohen's d
  3. Work out the number of test flights needed before testing starts
  4. Log tests so that they can be traced back to the code version, parameters and log files

Prerequisites: Module 3 integrated system · UAT 106 Statistics and Data Analytics for Technology

Why this matters

The test readiness review in week 11 opens the way to collecting evidence in the air, but flight time is limited: batteries can only be charged a few times a day and the weather changes daily. Good testing extracts the most information from the fewest flights and answers the requirements written in module 2 directly. This lesson continues the rain-gutter inspection drone from module 3. All figures are hypothetical.

Design experiments instead of changing one factor at a time

The team wants to know how stand-off distance and flight speed affect recall (the fraction of real blockages that are detected). The usual approach is to change one factor at a time while holding the others fixed, but Box, Hunter and Hunter show in Statistics for Experimenters that a factorial design, which runs every combination of factor levels, uses the same number of runs yet yields more information, and also reveals interaction: when the effect of one factor depends on the level of another.

  • Factors: stand-off distance at 6 m and 10 m, and speed at 1 m/s and 2 m/s
  • Response: recall on 40 blockages placed in a real gutter
  • Randomise the flight order so that wind that changes during the day or batteries that warm up do not get mixed into the factor effects

The main effect of a factor is the average at its high level minus the average at its low level.

Example 1 A 2 × 2 factorial of distance and speed

TARGETS = 40                                          # blockages placed per test run
found = {("6 m", "1 m/s"): 37, ("10 m", "1 m/s"): 34,  # number detected
         ("6 m", "2 m/s"): 33, ("10 m", "2 m/s"): 24}
r = {k: v / TARGETS * 100 for k, v in found.items()}
for (d, s), v in r.items():
    print(f"distance {d:>4}, speed {s}: recall {v:5.1f}%")
near1, far1, near2, far2 = r[("6 m", "1 m/s")], r[("10 m", "1 m/s")], r[("6 m", "2 m/s")], r[("10 m", "2 m/s")]
print(f"effect of distance 6->10 m : {(far1 + far2 - near1 - near2) / 2:+.1f} points")
print(f"effect of speed 1->2 m/s   : {(near2 + far2 - near1 - far1) / 2:+.1f} points")
print(f"interaction                : {(near1 + far2 - far1 - near2) / 2:+.1f} points")
distance  6 m, speed 1 m/s: recall  92.5%
distance 10 m, speed 1 m/s: recall  85.0%
distance  6 m, speed 2 m/s: recall  82.5%
distance 10 m, speed 2 m/s: recall  60.0%
effect of distance 6->10 m : -15.0 points
effect of speed 1->2 m/s   : -17.5 points
interaction                : -7.5 points

Both factors reduce recall, and the interaction is negative: the faster the flight, the more it hurts to stand further back. At 10 m and 2 m/s, motion blur and a smaller object combine and recall falls to 60%. Only 6 m at 1 m/s clearly meets the 85% criterion. The 10 m, 1 m/s combination sits exactly on 85.0%, which a single flight cannot settle.

Two-by-two table of recall with columns for distance 6 m and 10 m and rows for speed 1 m/s and 2 m/s: 6 m at 1 m/s 92.5 percent in green, 10 m at 1 m/s 85.0 percent in green, 6 m at 2 m/s 82.5 percent in gold, 10 m at 2 m/s 60.0 percent in pink
Figure 1 Results of the 2 × 2 factorial experiment. Green meets the criterion of at least 85% recall, gold is just below it and pink is well below it
Line chart with speed 1 and 2 m/s on the horizontal axis and recall from 50 to 100 percent on the vertical axis. A blue line for 6 m falls from 92.5 to 82.5. A pink line for 10 m falls from 85.0 to 60.0, more steeply than the blue line. A dashed gold horizontal line marks 85 percent.
Figure 2 Interaction plot: the lines are not parallel, so the effect of speed depends on the stand-off distance

These results must go back to the budgets in module 2. Flying at 1 m/s doubles the capture time, and moving in to 6 m makes each photo cover a shorter length of gutter, so more photos and more flights are needed. The next worthwhile step is to replicate the 10 m, 1 m/s run and try a centre point at 8 m and 1.5 m/s before deciding.

Comparing two options with a t-test

Another question is whether a new propeller really gives longer flights. The two-sample t-test, described in the NIST/SEMATECH e-Handbook of Statistical Methods, compares the means of two groups; if you are not sure the two variances are equal, use Welch’s version. The p-value only says the difference is unlikely to be chance, not how large it is, so also report the effect size. Cohen (1988) suggested rough benchmarks for : 0.2 small, 0.5 medium and 0.8 large.

Before flying, work out how many flights you need. Montgomery and Runger give the sample size per group for detecting a difference at significance level and power :

Example 2 Propeller A versus propeller B

The team flew six flights with each propeller on the same mission, measuring flight time until the battery reached 20%.

import math
from statistics import mean, stdev
from scipy import stats
prop_a = [18.6, 19.1, 18.9, 19.4, 18.7, 19.0]   # flight time (min), propeller A
prop_b = [19.8, 20.1, 19.5, 20.4, 19.9, 20.2]   # propeller B

t, p = stats.ttest_ind(prop_b, prop_a, equal_var=False)   # Welch
s_pooled = math.sqrt((stdev(prop_a) ** 2 + stdev(prop_b) ** 2) / 2)
d = (mean(prop_b) - mean(prop_a)) / s_pooled
print(f"means {mean(prop_a):.2f} vs {mean(prop_b):.2f} min, difference {mean(prop_b) - mean(prop_a):.2f} min")
print(f"Welch t = {t:.2f}, p = {p:.5f}, Cohen d = {d:.1f}")

sigma, delta = 0.3, 0.5                            # expected SD and difference to detect (min)
z = stats.norm.ppf(0.975) + stats.norm.ppf(0.80)   # alpha 0.05 two-sided, power 80%
n = 2 * z ** 2 * sigma ** 2 / delta ** 2
print(f"flights per propeller to detect {delta} min: {n:.2f} -> {math.ceil(n)}")
means 18.95 vs 19.98 min, difference 1.03 min
Welch t = 5.89, p = 0.00016, Cohen d = 3.4
flights per propeller to detect 0.5 min: 5.65 -> 6

Propeller B flies about 1 minute longer, the p-value is very small and the effect size is large. Six flights per propeller were enough to detect half a minute, as computed in advance. Still, the team must report the test conditions, such as temperature and wind, because the result only holds within the conditions tested.

Logging tests so they can be traced

A test without a record is as good as no test. One test card per run should contain:

FieldExample
Requirement being verifiedR1, recall at least 85%
Factor settings and randomised orderRun 3 of 4: 10 m, 1 m/s
Software versiontag flight-test-2026-10-14
Parameter and model filesFile names and hashes
EnvironmentTime, wind, temperature, light
Log filesFlight-controller and companion-computer log file names
Result and recorder34 of 40 detected, signed by the recorder

Flight-controller logs can be opened with tools such as PX4 Flight Review or the ArduPilot log viewers. The team should look at the logs after every flight, not only when something seems wrong. All of this evidence feeds the requirement verification table in the module 5 report.

Module lab

Lab: a test campaign

  1. Choose two factors expected to affect a key requirement, design a 2 × 2 factorial and randomise the flight order.
  2. Place simulated blockages at known positions in the gutter, fly the plan and compute the effects as in Example 1.
  3. Work out the flights needed before comparing two options, then test as in Example 2.
  4. Fill in a test card for every run, keep the log files and review them after each flight.
  5. Summarise the results against every requirement: pass, fail or not yet conclusive.

Common mistakes

Watch out

  • Changing one factor at a time, so interactions stay hidden
  • Flying in a convenient order instead of a random one, mixing time and battery effects into the factor effects
  • Drawing conclusions from a single flight when the result is close to the criterion
  • Reporting only the p-value without the size of the difference
  • Not recording the software version and environment, so the test cannot be repeated

Summary

  • A 2 × 2 factorial uses four runs to show the main effects of two factors and their interaction.
  • A main effect is the average at the high level minus the average at the low level.
  • A Welch t-test says a difference is unlikely to be chance; Cohen’s d says how large it is.
  • Work out the number of flights before testing, and keep test cards that can be traced.

Check your understanding

  1. A 2 × 2 factorial gives (low, low) = 90, (high, low) = 80, (low, high) = 70 and (high, high) = 60. What are the main effects of factor A (the first), factor B and the interaction?
  2. Two group means differ by 0.6 minutes with minutes. What is Cohen’s d and how large is it?
  3. To detect a 0.5-minute difference with minutes, and 80% power, how many flights per group are needed?
  4. Why randomise the order of test flights?
  5. p = 0.001 but the flight times differ by only 0.1 minutes. What should you conclude?
Answers
  1. A · B · AB , no interaction
  2. , large (above 0.8)
  3. , rounded up to 11 flights per group
  4. So that things that change over time, such as wind, light and battery temperature, do not get mixed into the effects of the factors being studied
  5. The difference is statistically significant but too small to matter in practice

Key formulas

Main effect of a factor
Effect size, Cohen d
Sample size per group

Key references

  1. Box, G. E. P., Hunter, J. S., & Hunter, W. G. (2005). Statistics for experimenters: Design, innovation, and discovery (2nd ed.). Wiley. link
  2. Montgomery, D. C., & Runger, G. C. (2018). Applied statistics and probability for engineers (7th ed.). Wiley. link
  3. NIST/SEMATECH. Two-sample t-test for equal means (section 1.3.5.3). e-Handbook of statistical methods. link
  4. Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum Associates. link
  5. NIST/SEMATECH. e-Handbook of statistical methods. National Institute of Standards and Technology. link

Further reading

Study the assigned knowledge units in advance, review media and take the module quiz

In class / field

Team project work, advisor meetings and progress presentations

Learning evidence: Project milestone deliverables

Module quiz

This is a formative self-check, not a graded exam

Knowledge domain: Mathematics, physics and statistics · Installation, maintenance and testing · Mission planning, flight and simulation