Importing SPICE model of COOLSiC MOSFET into Simulink

7 views (last 30 days)
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
SUHANYA M S
SUHANYA M S on 11 Sep 2025
Thanks for the response!
I managed to convert the L0 model and import to Simulink library. However, the L1 model is a better fit that retains important non-linear aspects of the device. The L0 model is a very basic switch, which is not useful.
In the L1 file, there is a .SUBCKT that has a very long equation involving many parantheses. The error stems from this line for now.
I'm attaching the SPICE file for the L1 model.
Any help will be geat. Thanks!

Sign in to comment.

Answers (1)

Ankita
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 librarylocated at: +mylibrary.“
I hope this will be helpful!
  1 Comment
SUHANYA M S
SUHANYA M S on 12 Sep 2025
Thanks for the response.
I have followed the documentation and debugged for the L0 SPICE netlist.
However, the L1 model's SPICE netlist has one very long equation involving a lot of parantheses and arithmetic operations. This line within .SUBCKT MF throws parsing error how much ever I try to change it.
I'm actually out of ideas to debug further. Any inputs would be helpful....

Sign in to comment.

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!