cktblock
R2026bDescription
creates a linear circuit or switched circuit Simulink® block from a Simscape™ electrical diagram or subsystem or a circuit configuration object.blockpath = cktblock(circuit,model,Name=Value)
Note
If the named block already exists in the Simulink model, the function updates the contents of the block.
Input Arguments
Simscape electrical diagram or subsystem or a circuit configuration object used to
create the Simulink block, specified either as a schematic or as an object. For more
information, see cktconfig.
The library path of the Simulink model in which the function creates and inserts the newly constructed block.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: blockpath = cktblock(circuit,model,BlockName='Power Train');
creates a Power Train block in the specified Simulink model.
Name on the icon if the function builds a Simulink block, specified as a string.
Name of the block instance in the Simulink model, specified as a string.
Device noise sources in the circuit, specified as an
n×6 cell array. The function uses resistors to
model the device noise sources. The cell array contains the following
information:
| Column | Description |
|---|---|
| Name | The circuit element designator. |
| Enabled | Option to indicate if the noise source is active, specified as
true or false. Set the value
to true to indicate that the noise source is
active. |
| Noise coefficient | The RMS amplitude of the noise source. If empty, the function uses Johnson/Nyquist noise value based on the value of the resistor. |
| Corner frequency | The frequency below which the flicker noise has a higher amplitude than the white Gaussian noise. This value may equal zero to indicate an absence of flicker noise. |
| Independent noise | Option to indicate if the device noise is correlated with other noise
sources, specified as true or
false. Set the value to true
to indicate the device noise is independent off other noise
sources. |
| Seed | An integer used to select the sequence of random samples. A value of
0 indicates an independent noise source. For
multiple device noise outputs, set the value to the same non-zero
integer value for all noise sources that share the same source. |
The average temperature of the circuit, specified as a real scalar in degrees Celsius.
Option to estimate and report switch losses in switched circuits. By default, this option is disabled.
Workspace variable names for switch loss parameters, specified as a table. This argument supplies the switch loss parameters as part of the part number or identifier string.
The expected switch loss parameters are:
| Parameter Name | Unit | Description |
|---|---|---|
Part | The device part number or other identification string. | |
Coss | pF | Output capacitance.µ |
tr | ns | Rise time. |
tf | ns | Fall time. |
VSD | V | Diode forward voltage. |
trr | ns | Diode reverse recovery time. |
Qrr | nC | Diode reverse recovery charge. |
dir_dt | A/µs | Current rate of change for stated reverse recovery parameters. |
Map of the device designators to the corresponding part numbers or identification strings in a switch loss file, specified as a string matrix.
The first column must contain the designator for the switch device and the second column must contain the part number or identification string for the switch loss parameters of the device.
Example: cktobj =
cktconfig(circuit,SwitchLossTable=“LossParameters”,SwitchLossMap=[“Q1” “BSC0904NSI”;
“D1” “FX2000A”]) maps the device designators Q1 and
D1 to the corresponding part numbers as defined in the switch
loss file LossParameters.
Output Arguments
The path to the constructed block, returned as a string.
Version History
Introduced in R2026aYou can now estimate and report switch losses in switched circuits.
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)