Meta-data and Model Based Design
Back in the summer of 2015 I wrote a blog post "A few thoughts on naming conventions" in which I recommended encoding relevant units into variable names; however with new features in MATLAB R2016b I am rethinking this position. Simulink now allows users to specify units at atomic boundaries and to perform unit conversion operations based on the specified units.
Having specified my inputs (In1 [feet-per-second], In2 [seconds]) and output (Out1 [miles]) I can easily that I have an error, e.g. the value calculated by the product block is in meters, not miles. This is corrected by changing the signal specification block to [miles-per-second] resulting in the desired output of miles.
Right now, that error is caught by visual inspection. So while this feature provides valuable insights it still has some distance to go. However this example got me thinking about meta-data in general.
Meta-Data, Model-Based Design and Data Dictionaries
It is an old concept, but a new noun; Meta-Data is defined as "data that describes and gives information about other data."
With the advent of computerized data bases that provide the ability to perform complex searches use of meta-data became a common in data-centric fields.
Initially Model-Based Design, as applied to Control Algorithms, leveraged meta-data primarily to method of documenting models (through comments) and assist in the generated code (through data type specification.) However as the units example shows Model-Based Design can now leverages meta-data for tasks related to the software verification and validation process. (Note these more advanced operations are made possible by leveraging Data Dictionary API's to inspect the data; having data in a query-able repository is the chief prerequisite.)
Using Meta-Data
Meta-data is most valuable when it is used in an automated fashion; e.g. the user does not need to inspect artifacts (such as the model or the generated code.) As an example if we consider the minimum and maximum values for a Simulnk.Signal object. With that data tools can derive the following bits of information.
- Fixed point scaling
- Error diagnostics for test vectors
- Derived test vectors
- Range of stability (control systems)
Meta-Data and humans
There is an obvious question of what types meta-data you should incorporate.
Adding meta-data takes time both in the initial definition and in the on-going maintenance. Failure to maintain meta-data when it is used for analysis can result in inconclusive, or worse, incorrect test procedures. For large databases then the issue comes down to four questions
- What is the effort to validate meta-data: manual verses automated processes?
- What is the utility of the meta-data: how is the meta-data used and is the information captured in another location?
- What is the source of meta-data: is this data human created or is it auto generated from a dependable source?
- Is there a process that requires the meta-data: for some Model-Based Design workflows meta-data is required for the validation process. For instance safety workflows may require requirement linkages.
BIO
Michael Burke is a consultant with The MathWorks and former coordinator for the MathWorks Automotive Advisory Board (MAAB). I currently focus on Model-Based Design Process Adoption projects. Views expressed in this article do not represent the views of The MathWorks.