How can I protect the intellectual property of my Simulink model?

49 views (last 30 days)
I would like to distribute my Simulink model without exposing the underlying implementation to the third-party user receiving the model.
How can I protect the IP of my Simulink model? And what are the advantages and limitations of each of the methods?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 4 Feb 2024
Edited: MathWorks Support Team on 22 Nov 2023
You can use the following four approaches to protect the intellectual property of a Simulink model:
  1. Protected Model
  2. S-Function Target
  3. Shared Library
  4. Read/Write Access for Subsystems
Note that for approaches 1, 2 & 3, the receiving party must match the platform. For example, if a protected model has been created on Windows, it cannot be run by the third party if they use Linux or macOS.
1. Protected Model
The preferred way to share a Simulink model without revealing its contents is to use protected models. The third party receiving the protected model (.SLXP file) can reference it from their Simulink model, without being able to edit the contents. This feature is available from R2014a onwards. Note that creating a protected model requires a Simulink Coder license. For more information, see:
The protected model approach has many advantages:
  • Easy to use. The protected model offers a very familiar interface to someone that is used to working with model references.
  • AES-256 encryption can be applied to the file contents by enabling password protection.
  • If enabled by the author, the third party can generate code from the protected model.
  • The author can choose to share a read-only version (web view) of the protected model.
  • From R2018b onwards, protected models are forward compatible.
  • From R2020a onwards, you can attach a digital signature to a protected model.
2. S-Function Target
By using the S-Function target, you can generate S-Function code from your model or subsystem, and then build it into a MEX file. This used to be the preferred way to conceal model contents in R2013b and earlier. Note that generating such an S-Function also requires a Simulink Coder license. For more information, see:
The main drawback compared to protected models is that the S-Function target has no built-in option to apply encryption. However, if we don't consider encryption, both the protected model and the S-Function will provide the same level of protection.
3. Shared Library
Using the shared library system target file (ert_shrlib.tlc), you can generate a universal shared library (.DLL/.SO) for a model or subsystem. Note that creating a shared library requires an Embedded Coder license on top of a Simulink Coder license. For more information, see:
The main advantage of this approach is that a shared library can be run in a system simulation outside of Simulink.
4. Read/Write Access for Subsystems
This is the easiest of the methods listed and requires no additional license or matching platform. By setting the read/write permissions in the Subsystem block parameters to 'NoReadOrWrite', nothing will happen when a user double clicks on it. For more information, see the section "Control Access to Subsystems" on:
However, the permission can be changed by the user, so this is just a superficial level of protection and will not work if the contents need to stay protected.

    More Answers (0)

    Categories

    Find more on Model References in Help Center and File Exchange

    Products


    Release

    R2018a

    Community Treasure Hunt

    Find the treasures in MATLAB Central and discover how the community can help you!

    Start Hunting!