Import from 2021a to 2020b unsuccessful for simscape electrical blocks

20 views (last 30 days)
I am trying to import a 2021a model to a previous year model so that I can eventually run with OPAL-RT. I tried 2020b and 2019a by save -> import to previous year, but for both, the blocks are 'not found' in the previous versions. These are simple blocks such as powergui, three phase AC source etc which are present in my 2020b simulink installation if I add them directly.
The error message in my 2021a command promt when I try the import is below. It is followed by the 'ver' command from 2021a and 2020b, respectively, for confirmation of successful installation of required libraries. Also a snapshot of the unsuccessfully imported file in 2020b.
Also note that some of the examples from which my model is made can run successfully when I open them from 2020b command prompt (eg power_OLTCregtransformer), but my model can't.
How can I fix this?
Error: Export to previous version does not support Specialized Power Systems blocks from Simscape Electrical. (physmod:powersys:library:ExportToPreviousVersion)
C:\Program Files\MATLAB\R2021a\toolbox\physmod\powersys\library\+slexportprevious\+preprocess\SimscapeElectricalSPSBlocks.m,13
C:\Program Files\MATLAB\R2021a\toolbox\simulink\slexportprevious\+slexportprevious\+internal\CallbackDispatcher.p >CallbackDispatcher.runCallbacks,0
C:\Program Files\MATLAB\R2021a\toolbox\simulink\slexportprevious\+slexportprevious\+internal\@PreprocessHelper\PreprocessHelper.p >PreprocessHelper.runPreprocessFunctions,0
C:\Program Files\MATLAB\R2021a\toolbox\simulink\slexportprevious\+slexportprevious\+internal\@PreprocessHelper\PreprocessHelper.p >PreprocessHelper.doPreprocess,0
C:\Program Files\MATLAB\R2021a\toolbox\simulink\slexportprevious\+slexportprevious\+internal\@PreprocessHelper\PreprocessHelper.p >PreprocessHelper.run,0
C:\Program Files\MATLAB\R2021a\toolbox\simulink\slexportprevious\+slexportprevious\+internal\@ExportController\run.p >i_run,0
C:\Program Files\MATLAB\R2021a\toolbox\simulink\slexportprevious\+slexportprevious\+internal\@ExportController\run.p,0
C:\Program Files\MATLAB\R2021a\toolbox\simulink\slexportprevious\+slexportprevious\+internal\exportToVersion.p,0
C:\Program Files\MATLAB\R2021a\toolbox\simulink\slexportprevious\+Simulink\exportToVersion.p,0
C:\Program Files\MATLAB\R2021a\toolbox\simulink\core\general\+Simulink\ExportModel.p,0
C:\Program Files\MATLAB\R2021a\toolbox\simulink\ui\studio\config\m\+SLStudio\FileMenu.p,0
%%%%%%%%%%%%%%%%%%%%%%%%
ver command
%%%%%%%%%%%%%%%%%%%%%%%%
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.10.0.1602886 (R2021a)
MATLAB License Number: 621625
Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 18363)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.10 (R2021a)
Simulink Version 10.3 (R2021a)
Deep Learning Toolbox Version 14.2 (R2021a)
Reinforcement Learning Toolbox Version 2.0 (R2021a)
Simscape Version 5.1 (R2021a)
Simscape Electrical Version 7.5 (R2021a)
Statistics and Machine Learning Toolbox Version 12.1 (R2021a)
Symbolic Math Toolbox Version 8.7 (R2021a)
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.9.0.1592791 (R2020b) Update 5
MATLAB License Number: 621625
Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 18363)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.9 (R2020b)
Simulink Version 10.2 (R2020b)
Simscape Version 5.0 (R2020b)
Simscape Electrical Version 7.4 (R2020b)
  1 Comment
Priya Thekkumparambathmana
A follow up example to the question above, even a very simple model with the powergui block is not getting imported from 2021a to 2020b.

Sign in to comment.

Accepted Answer

Joel Van Sickel
Joel Van Sickel on 3 Aug 2021
Hello Priya,
unfortunately this is not a bug. Exporting specialized power systems modesl backwards in matlab versions is not supported. You will either have to repair the models by replacing the broken library blocks with the equivalent 2020b versions or continue to work in 21a.
Regards,
Joel
  2 Comments
Joel Van Sickel
Joel Van Sickel on 3 Aug 2021
This is specific to specialized power systems being merged into simscape electrical (2020b) . I cannot speak to future direction of the product in regard to this feature.

Sign in to comment.

More Answers (1)

Souarv De
Souarv De on 10 Oct 2021
Yes priya, I completly agree with you. This is really very unfortuate for the users to use R2021a. Same problem happening with me also. If I know this major problem beforehand, I no longer download thsi and recommand others to install the higher version than R2020.

Community Treasure Hunt

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

Start Hunting!

Translated by