Trying to protect a simulink subsystem containing controlled current and voltage source blocks

6 views (last 30 days)
I am trying to protect a subsystem containing some controlled current source and controlled voltage source. These elements look not compatible with the SSC conversion functionality of the Simscape model and, at the same time, do not allow the utilization of the protected model reference functionality. Is there any way to generate a protected subsystem containing these blocks?

Answers (1)

Spoorthy Kannur
Spoorthy Kannur on 11 Nov 2025 at 5:56
Hi Costantino,
You may try the following steps to resolve the issue:
  1. Convert the pure Simscape portion of the subsystem into a textual composite component using “subsystem2ssc”. That function converts a subsystem composed only of Simscape blocks into one or more SSC component files (note: blocks from the Simscape Utilities library such as Solver Configuration, Simulink-PS/PS-Simulink converters, and some utility blocks are not convertible) (https://www.mathworks.com/help/simscape/ref/subsystem2ssc.html)
  2. Protect the generated Simscape source with the Simscape protect tool (sscprotect/ssc_protect/sscmirror workflows). This produces encrypted/protected Simscape files (SSCP) or a protected mirror of a namespace that you can distribute without revealing source. Use “sscprotect” (or “sscmirror” when protecting a whole namespace/library) to produce protected library artifacts.(https://www.mathworks.com/help/simscape/ref/sscprotect.html, https://www.mathworks.com/help/simscape/ref/sscmirror.html)
  3. Re-use the protected Simscape component in your Simulink model via the Simscape Component block or by building a custom Simscape library from the protected files and including that library in your model. This keeps the Simulink side separate and lets you share the Simscape IP as an opaque component. (https://www.mathworks.com/help/simscape/simscape-file-deployment.html, https://www.mathworks.com/help/simscape/composite-components.html)
  4. Model reference/protection and certain code-generation features have explicit limitations when models contain Simscape physical network elements — those workflows expect referenceable Simulink content and do not support partitioning arbitrary physical networks across protected model boundaries. You may find this useful: https://www.mathworks.com/help/simulink/ug/model-referencing-limitations.html
​​If this does resolve the issue, kindly reach out to MathWorks Technical Support for more help (https://www.mathworks.com/support/contact_us.html)

Categories

Find more on Foundation and Custom Domains in Help Center and File Exchange

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!