Main Content

db_0144: Use of subsystems

Since R2020a

Guideline Publication

Control Algorithm Modeling Guidelines - Using MATLAB®, Simulink®, and Stateflow®

Sub ID Recommendations

  • NA-MAAB — a, b

  • JMAAB — a, b

MATLAB Versions

All

Rule

Sub ID a

Blocks in a Simulink diagram shall be grouped together into subsystems based on functional decomposition of the algorithm, or portion thereof, represented in the diagram. Blocks can also be grouped together based on behavioral variants or timing.

Avoid grouping blocks into subsystems primarily for the purpose of saving space in the diagram. Each subsystem in the diagram should represent a unit of functionality that is required to accomplish the purpose of the model or submodel.

When implementing a subsystem to alleviate readability issues, use a virtual subsystem.

Custom Parameter

Not Applicable

Example — Correct

Subsystems are divided by functional unit.

Example — Incorrect

Subsystems are not divided by functional unit.

Sub ID b

A virtual subsystem shall be used when processing order and code generation does not need to be taken into consideration.

Custom Parameter

Not Applicable

Rationale

Sub ID a:

  • Avoid grouping blocks into subsystems primarily for the purpose of saving space in the diagram.

  • It can be difficult to reuse the subsystem.

Sub ID b:

  • As atomic subsystems are considered a single process that influences processing order and code optimization, they can be misinterpreted when used other than as intended.

Verification

Adherence to this modeling guideline cannot be verified by using a Model Advisor check.

Last Changed

R2020a

See Also

Version History

Introduced in R2020a