What is data and how is it used in a model centered development process? We start by talking about different types of data.
Types of data
- Algorithmic data: data that is used or created by the algorithms.
- Constants: data values that are used in calculations that are fixed; for example, pi.
- Parameters: data values that are used in calculations but can be tuned, or c by the engineer; for example a gain value for a PID controller.
- Calculated values (signals): signals are the result of the calculations in the system
- State: state data is a special case of signal data, it is the calculated data from previous time steps
- System specification data: data that configures the system
- Configuration: Unique to Model Based Design configuration data specifies some of the base functionality of the models calculations. This includes things such as integration methods, sample times, and code formatting.
- Instance specification: meta data that specifies which set of algorithmic data is used to instantiate a given instance of the model(1).
- Variant: data that configures which blocks of code execute; these are distinct from execution control as they are either compile time or start up controlled. For example compiler #define options.
- Verification and validation data: data that is used or created by the models and system for testing.
- Input data: inputs to the system used to drive the tests
- Expected outputs: results based on inputs and the test configuration
- Test configuration: data that configures the model (through selection of algorithmic and system specification data) for an instance of a given test.
All data has attributes that define how that data is interpreted by the system(2). Some modeling environment explicitly exposes all attributes (Simulink, UML) while others (C, C++) require users to have an external database to associate attributes.
Let’s focus on the attributes that all modeling languages share in common for algorithmic data; they are
- Data type: double, single, int, struct, enum…
- Dimension: scalar, vector, matrix…
- Storage class: Where the data is instantiated
Ideally, within the development workflow the attributes, such as minimum and maximum values, are used by verification and validation tools to ensure the correct behavior of the model.
In the next post I will look at how the data is used to configure models and model behavior.
(1) The initial values of the state data may be included in this configuration set. Initial values for state data is a subset of the parameter data.
(2) The specific attributes for a given class of data will differ.
6 thoughts on “Understanding data usage in Model-Based Design Part I”