主要内容

cktconfig

Create circuit configuration object

Since R2026a

Description

Use the cktconfig object to create a circuit configuration object from a Simscape™ electrical diagram or subsystem, also called a Simscape model. You can use the object for subsequent circuit analysis such as operating point analysis, finding transfer functions, creating state-space models, and building Simulink® blocks. The object updates the base workspace with all of the information accumulated from previous function calls that used that object.

Creation

Description

circuit = cktconfig(schematic,Name=Value) creates a circuit configuration object from a Simscape model.

Input Arguments

expand all

Simscape electrical diagram or subsystem from which the function creates a circuit configuration object, specified as a schematic.

Name-Value Arguments

expand all

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: circuit = cktconfig(schematic,Ports={’cQ1’,’cQ2’,’cQ3’,’cQ4’,’Vin’,’Iload’,’Vout’}) creates a circuitConfiguration object with specified ports.

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.

Port names defined by the controlled voltage or current sources and voltage or current sensors in Simscape model, specified as a cell array of character vectors. The function places the ports specified in the Ports in order at the beginning of any list of ports. When constructing a block, the function places the input and output ports according to the ports list.

Option to display the resulting plots of the function, specified as true or false.

Designators of circuit elements used to tune the circuit response, specified as a cell array or string vector. The function uses the values of these variables to tune the response of the circuit, for example when tuning a control loop.

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:

ColumnDescription
NameThe circuit element designator.
EnabledOption 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 coefficientThe RMS amplitude of the noise source. If empty, the function uses Johnson/Nyquist noise value based on the value of the resistor.
Corner frequencyThe 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 noiseOption 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.
SeedAn 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.

Name of the primary output port for the operating point analysis, specified as a string.

Desired output values for the operating point analysis, specified as a real scalar or real-valued vector.

Constant input port values for the operating point analysis, specified as a n×2 cell array. The first row contains the designators for the input ports and the second row contains the real-valued inputs corresponding to the designators in the first row.

Control variable for operating point analysis, specified as "Duty cycle" or "Frequency".

Duty cycle value or range for the operating point analysis, specified as a real scalar or 2-element vector.

Switching frequency value or range for the operating point analysis, specified as a real scalar or 2-element vector.

Expression to evaluate the array of phase offsets for all of the control input signals in an operating point analysis, normalized to the switching period, specified as a string or character array. In the expression of phase offsets, the duty cycle and the switching frequency are denoted by the variables d and f, respectively. The function evaluates the expression to a scalar or a vector array.

Example: [0,d] specifies the phase offsets for the true and complement controls of a half bridge switching network.

Expression to evaluate the array of pulse durations for all of the control input signals in an operating point analysis, normalized to the switching period,, specified as a string or character array. In the expression of pulse durations, the duty cycle and the switching frequency are denoted by the variables d and f, respectively. The function evaluates the expression to a scalar or a vector array.

Example: [d-50e-9*1e5,1-d-50e-9*1e5] specifies the pulse durations, with a 50ns gate delay, for the true and complement controls of a half bridge switching network.

The number of uniformly spaced samples to output for the steady state switch cycle voltage or current waveforms produced by an operating point analysis, specified as a real positive integer.

Output Arguments

expand all

Circuit configuration object created from the schematic, returned as an object.

Object Functions

ckttblTable of circuit elements from circuit configuration object

Version History

Introduced in R2026a