Desk summary
- 01A specification model states software high-level requirements — functional, performance, interface or safety characteristics — without prescribing internal data structures, data flow or control flow.
- 02A design model prescribes internal structure: it holds low-level requirements and/or architecture. Any model that expresses design data — including every model used to generate code — is a design model.
- 03A model is one or the other for a given component, never both. Because there must always be requirements above a model, model-based software always has at least two requirement levels.
- 04DO-331 Table MB.1-1 shows five model usage examples, from ‘textual HLR above a design model’ (the most common) to ‘design model developed in the system process’.
- 05Guidance for HLR applies to specification models; guidance for LLR and architecture applies to design models — so the classification decides your whole verification plan.
Intuition
The contract and the recipe
A specification model is the contract: ‘the voted pitch attitude shall be the middle of three valid sources, the average of two, or the single remaining one’. A design model is the recipe: which comparisons, in which order, with which data types, inside which subsystem, executed at what rate. A contract that dictates the recipe is no longer a contract; a recipe cannot be checked without a contract. That is why DO-331 forbids one model from being both.
The specification model
DO-331 (MB.1.6.2) describes a specification model as an abstract representation of software HLR. It should carry only the detail needed to understand the required behaviour and should not prescribe an implementation or architecture — except where a design constraint is justified. In particular it does not define internal data structures, internal data flow or internal control flow. A specification model therefore can express HLR but neither LLR nor architecture.
- —Good fits: required mode transitions of an autopilot (a state machine of what modes exist and which pilot actions or conditions move between them); a required input/output relationship expressed as a reference filter response; interface definitions with ranges and units; a safety property such as ‘the autothrottle shall not command thrust above the limit’.
- —Typical verification: the HLR objectives — compliance with system requirements, accuracy and consistency, compatibility with target, verifiability, conformance to standards, traceability, algorithm accuracy — performed by review, analysis and possibly simulation (Table MB.A-3).
- —Not covered by model coverage analysis: DO-331’s model coverage guidance targets design models; a specification model is checked for completeness by its own reviews, traceability and simulation.
The design model
A design model prescribes the component’s internal data structures, data flow and/or control flow; it contains LLR and/or software architecture. DO-331 adds a decisive rule: when a model expresses software design data — whatever else it also contains — it is classified as a design model, and this includes models used to produce code. In practice nearly every model fed to a code generator is a design model, because a generator needs exactly the data types, execution order and decomposition that define design.
Side by side
Specification model
Design model
Worked example
Classifying the AHRS triplex voter
Textual HLR say: with three valid attitude sources, use the middle value per parameter; with two, their average; with one, that source; with none, flag invalid. A model whose subsystems are named Mid_Value, Avg_Value and Single_Value, whose signals are typed single-precision, that runs at a fixed step and selects between branches with a switch on the valid count, prescribes internal data flow and control flow. It is a design model — even though, read from far away, it looks like it ‘just restates the requirement’.
Why one model cannot be both
Verification works by comparing an artifact with the one above it. If a single model were both the HLR and the LLR of a component, the design would be verified against itself: compliance with HLR becomes a tautology, and any error in the model is simultaneously a requirements error that no review can detect by comparison. DO-331 therefore states that a model cannot be classified as both a specification model and a design model for the same component. You may have a specification model and a separate design model (usage example 2), but not one model playing both roles.
Pitfall
The ‘specification model’ that generates code
A common finding: a team labels its model a specification model (hoping to treat it as HLR and avoid writing textual requirements), then feeds it to the code generator. The moment it generates code it is a design model, so the team is left with no HLR at all, and nothing above the model to verify it against. Decide the classification before modeling, and write it in the PSAC.
Note
Existing models rarely separate cleanly
Rierson observes that most legacy models mix what and how, and that modeling notations encourage equations and algorithms. Separating them is a real cultural change. A practical approach for a legacy control law is to write (or extract) textual HLR stating the required closed-loop behaviour, limits and modes, then treat the existing model as the design model and verify it against those HLR.
Requirements above the model
Whatever level a model enters at, DO-331 requires requirements outside and above it — the ‘requirements from which the model is developed’. They state the purpose, the required behaviour, the constraints and the assumptions that the model alone cannot justify. They are what the model is reviewed and simulated against, what model coverage measures against, and what tests are ultimately derived from. Because they always exist, a model-based component always has at least two levels of requirements.
- —They must be verifiable on their own: ‘the pitch rate command shall be limited to ±12 deg/s’ is; ‘implement the pitch control law per the model’ is not.
- —They must be complete enough to make model coverage meaningful: an uncovered model branch should map either to a missing test or to a missing requirement, not to ‘everything is in the model anyway’.
- —They carry the rationale: why the gain schedule breakpoints sit where they do, why the integrator is clamped, what the voter assumes about sensor failure modes.
- —They are traced to the system requirements and, downward, to model elements — see Traceability Through Models.
What the auditor looks for
The ‘one requirement’ test
Reviewers count requirements per model and look at what they say. A large model with a handful of vague parents (Rierson describes a 98-page model whose single parent amounted to ‘there shall be a model’) signals that the model is acting as its own requirement. Expect to be asked to show, for a sample of model branches, which parent requirement each one satisfies.
The five model usage examples (Table MB.1-1)
DO-331 MB.1.6.3 illustrates, in Table MB.1-1, five ways models can be placed across the system requirements/design, software requirements and software design processes. They are examples, not an exhaustive list. In every example the coding process produces source code from the lowest-level artifact.
DO-331 model usage examples (paraphrased from Table MB.1-1)
| Example | System requirements & design processes | Software requirements process | Software design process | Typical use |
|---|---|---|---|---|
| MB Example 1 | Requirements allocated to software | Textual HLR (the requirements from which the model is developed) | Design model | The most common avionics pattern: text above, generated code below. Used by the reference helicopter FCC project. |
| MB Example 2 | Requirements from which the model is developed | Specification model | Design model | Two model levels: an HLR-level model refined into a design model; both verified separately. |
| MB Example 3 | Requirements from which the model is developed | Specification model | Textual LLR / design description | Model used for HLR only; design and code done traditionally (e.g. hand-coded). |
| MB Example 4 | Requirements from which the model is developed | Design model (spanning requirements and design processes) | (same design model) | Software team builds a design model directly from system-level requirements, which then play the HLR role. |
| MB Example 5 | Requirements from which the model is developed, plus a design model produced in the system process | (design model received from systems) | (same design model) | Systems or control engineers own the design model; software takes it as its LLR/architecture. |
Pitfall
Examples 4 and 5: the system requirements become your HLR
When a design model is developed straight from system-level requirements, those requirements stand in the HLR position, so the HLR objectives (accuracy, verifiability, traceability, testing against them) fall on them. System requirements written for an aircraft-level audience are often too coarse to verify a design model against. Either refine them (moving toward example 1) or accept that systems engineering must produce DO-178C-quality requirements and that software verification will test against them.
Model-based development
Who owns the model matters (example 5)
Rierson warns that when systems engineering owns the model, development-assurance habits that software teams take for granted — standards conformance, documented reviews, requirements-based testing, coverage — may be missing. Example 5 projects should embed experienced software/verification engineers with the systems modelers and put the systems model under the software CM and QA processes.
Choosing a pattern
Deciding how to use models on a component
Ask what the model is for
If it will generate code, it is a design model. If it only expresses required behaviour (for analysis, simulation or customer review), it can be a specification model.
Identify the requirements above it
Decide whether textual HLR will be written (example 1), whether a specification model sits above (example 2), or whether system requirements serve directly (examples 4 and 5) — and check they are verifiable at that level.
Check the verification consequences
Specification model → Table MB.A-3 objectives. Design model → Table MB.A-4 objectives plus model coverage. Every level adds reviews, traceability and possibly simulation evidence.
Decide where hand code lives
Drivers, schedulers and complex algorithms not suited to the modeling language stay under DO-178C; define their interfaces with the generated code.
Write it down
Record per component: model type, usage example, requirements above, standard, generator, simulation credit sought — in the PSAC/SDP.
Worked example
Pitch-axis control law, example 1
System requirement: ‘the FCS shall provide pitch-rate command / attitude hold in normal law’. Textual HLR: commanded pitch rate per stick deflection with a defined shaping, rate limit ±12 deg/s, attitude hold engaged below a stick deadband, integrator limit, surface command limits and fault response. Design model: gain-scheduled PI with feed-forward, typed signals, 80 Hz fixed step, anti-windup by clamping, subsystems for command shaping, feedback, limiting. Verification: design model reviewed and simulated against the HLR; model coverage closes gaps; code generated; HLR-based tests rerun on the target.
Self-check
A systems team hands software a Stateflow-style autopilot mode logic chart and asks that it be used to generate code. There are no software HLR, only aircraft-level system requirements. Which DO-331 usage example is this, and what is the main consequence?