Importing SPICE model of COOLSiC MOSFET into Simulink
7 views (last 30 days)
Show older comments
I'm trying to import the SPICE models of CoolSiC MOSFET to Simulink for use in simulaitons as part of a larger system.
Of the three models, I was able to generate the .ssc files (2 files) for only the L0 model (basic one).
The L1 and L3 models are temperature dependent and errors regarding "parsing", curly brackets and many more mismatches were thrown by the subcircuit2ssc command. Depsite trying to match as much as possible and correct the conditional statements, newer errors came up. Hence, I'm trying to build the .ssc files generated for the L0 model at least.
However, sscbuild generates the following error:
>> ssc_build
Generating Simulink library 'mySiclibrary_lib' in the MATLAB package parent directory 'D:\WORK FOLDER\...\work1\Infineon_SiC_Pspice_Models' ...
Failed to generate 'mySiclibrary_lib'
Caused by:
Error using ne_parselibrarypackage
Error: File: D:\WORK FOLDER\.......\work1\Infineon_SiC_Pspice_Models\+mySiclibrary\tech_sicmos_l0.ssc Line:
107 Column: 49 Illegal use of cell array syntax in declarative construct. Only unit expressions {expression,
'character vector'} may use the '{}' syntax in declarative constructs.
I'm attaching the two .ssc files for reference. They are .ssc files, but uploaded them as .txt files, as .ssc file couldn't be attached here.
Any help would be appreciated.
Thanks!
2 Comments
Answers (1)
Ankita
on 12 Sep 2025
Hi,
I understand that you are trying to import CoolSiC MOSFET SPICE models into Simulink (Simscape) where you are using “subcircuit2ssc” command and you are facing multiple errors while converting L1 and L3 models and hence your sscbuild fails.
Looking at the error message shared.
It indicates that the “subcircuit2ssc” command has some syntax requirements which are not being met by what you have used in your SPICE file syntax. It denotes while declaring PARAMS it is expecting some different syntax.
Here are some documentations you can consider looking at to understand the conversion of SPICE Models to Simscape syntax better.
1)https://www.mathworks.com/help/sps/ug/MOSFET-subckt.html Shows how the syntax of SPICE Models should look like which is compatible to be converted to Simscape.
2) https://www.mathworks.com/help/sps/ug/converting-a-spice-netlist-to-simscape-blocks.html shows how to declare commands and their syntax compatible with “subcircuit2ssc” command.
3) https://www.mathworks.com/help/sps/ref/subcircuit2ssc.html you should look at this main documentation of “subcircuit2ssc” where it mentions while doing sscbuild you should “Netlist converted. Review files and make manual edits for any unsupported items before building the Simscape library located at: +mylibrary.“
I hope this will be helpful!
See Also
Categories
Find more on Choose and Parameterize Blocks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!