Convert SPICE subcircuit to custom Simscape components
subcircuit2ssc(
reads the SPICE netlist specified by filename
,target
)filename
and converts
every subcircuit into one or more Simscape™ files in the folder specified by target
.
The function lists SPICE commands not supported by the conversion process in the comments of the corresponding Simscape files. After conversion, review the generated Simscape files and make manual edits for any unsupported items. You can also obtain a list of unsupported commands by using an optional output argument, described below.
For a detailed explanation of supported conversions, see Converting a SPICE Netlist to Simscape Blocks.
subcircuit2ssc(___,
converts only the subcircuits with the specified names.subcircuit1,...,subcircuitN
)
returns an array of objects containing the subcircuit information.subcircuitArray
= subcircuit2ssc(___)
[
returns an array of objects containing the subcircuit information and a
subcircuitArray
,unsupportedCommands
] = subcircuit2ssc(___)struct
array containing the subcircuit names and SPICE
commands found in the converted subcircuits that are not supported by the conversion
process.
The netlist must be written in Cadence® PSpice format and be syntactically correct. The conversion assistant does not check for proper PSpice syntax.
Only a subset of the PSpice netlist language is supported. However, unsupported PSpice commands are identified at the top of the corresponding Simscape component file to facilitate manual conversion.
To build generated Simscape components into Simscape blocks, parameter values must conform to Simscape constraints. For example, capacitance of a fundamental capacitor and inductance of a fundamental inductor must be nonzero.