FAQ 054: Using Simulink Protected Models
Question
Is it possible to hide technical implementations (modeling design) by using Simulink protected models?
Solution
Simulink protected models provide a simple and convenient way to hide technical implementation details. The Simulink model itself is not contained in the protected model when generated as described in this FAQ. However, the approach presented here uses obfuscated source code so that constants can still be retrieved from the protected model, for example.
Note
Before forwarding a protected model, examine its contents to make sure the level of protection is sufficient for your intellectual property.
Protected models are a feature of Simulink. From a technical point of view, protected models are referenced models with digital rights management (DRM) protection.
Note the limitations for protected models in the MATLAB/Simulink documentation. In particular, protected models must not contain non-inlined S-functions.
A protected model can be created as follows:
- Place the part to be protected in a subsystem.
- Make the subsystem atomic: Right-click it and select ‘Block Parameters’ from the context menu. Select the ‘Treat as atomic unit’ checkbox.
- Generate a referenced model from the subsystem. To do this, follow these steps::
- Go to ‘Model Configuration Parameters – Diagnostics – Data Validity’ in the model and set ‘Signal resolution’ to ‘None’ or ‘Explicit only’.
- Right-click the subsystem and select ‘Subsystem & Model Reference – Create Referenced Model’ from the context menu.
- Generate a protected model from the referenced model. To do this, follow these steps:
- Right-click the model block and select ‘Subsystem & Model Reference’ – ‘Create Protected Model …’ from the context menu.
- Select the ‘Use generated code’ checkbox.
- Set the content type to ‘Obfuscated source code’.
- Replace the referenced model with the protected model in the model block.
- You can now provide the protected model (SLXP file) to a third party.
- The protected model can be used in a similar way as regular referenced models.
General Recommendations
- The main model and the protected model have to be created with the same tool chain, including dSPACE and MATLAB software. This includes RCP and HIL software, MATLAB, and the selected target file.
- We recommend using the base encoding "US-ASCII" when creating protected models. This avoids potential compatibility issues between the models involved with different encoding methods (especially when using special characters).
- Note that the TRC file generation changed with MATLAB R2015b. These changes also affect referenced and protected models. If you want to take advantage of these changes, use dSPACE Release 2015-B and MALTAB R2015b or later.
Required Software
- We recommend at least MATLAB R2013b when working with protected models.
- The first supported version is MATLAB R2013a but there are known issues with this version.
- SCALEXIO requires MATLAB R2014a or later.
- Protected models require dSPACE Release 2014-A or later.
- For SCALEXIO, dSPACE Release 2015-B or later is required.
Tags
| Date | 2026-03-11 |
| Software Type | Implementation Software |
| Product | ConfigurationDesk, RTI (Real-Time Interface) |
| Information Type | Frequently Asked Questions |
| Information Category | Working with |