Main Content

Linear Circuit Wizard

Generate or modify linear circuit

Since R2020b

  • Linear Circuit Wizard block

Libraries:
Mixed-Signal Blockset / Utilities

Description

Use the Linear Circuit Wizard block to create or modify a linear, time-invariant circuit such as a custom-design filter or a circuit with extracted parasitics. Using this block, you can parse a SPICE netlist file that describes the circuit elements and the circuit nodes. You can then use the block parameter dialog box to refine the input and output ports and to model device noise. You can review the port and device noise definitions from a base workspace output structure.

The Linear Circuit Wizard block sets up and solves linear circuit equations to produce a set of Laplace domain transfer functions. You can review these transfer functions either through magnitude vs. frequency plots or through pole-zero location reports.

The Linear Circuit Wizard block creates and configures a MATLAB System block to represent your circuit as a new block, which is independent of the Linear Circuit Wizard block, in a Simulink® model. This MATLAB System block is configured using the port and device noise definitions and the results of the circuit analysis. When you start the simulation, the MATLAB System block uses fixed-step discrete sample time to convert the Laplace domain transfer functions into recursive digital filter coefficients for execution during the simulation.

The Linear Circuit Wizard block can generate:

  • a linear circuit block,

  • a switched circuit block,

  • or a Control System Toolbox™ tunable object.

Parameters

expand all

Circuit Definition

Name of the circuit that is displayed on the block icon, specified as a character vector or string scalar.

Programmatic Use

Block parameter: CircuitDesignName
Type: character vector
Value: character string
Default: 'Linear Circuit'

Instance name to be displayed under the block icon, specified as a character vector or string scalar.

Programmatic Use

Block parameter: BlockName
Type: character vector
Value: character string
Default: 'Linear Circuit'

Name of the netlist file (SPICE syntax) that defines the linear circuit, specified as a character vector or string scalar.

Programmatic Use

Block parameter: NetlistFileName
Type: character vector
Value: character string

Name of the configuration file, specified as a character vector or string scalar. You can save your current configuration to a file.

Programmatic Use

Block parameter: ConfigurationName
Type: character vector
Value: character string

Click to parse the named netlist file. This action redefines the existing ports according to the new SPICE syntax. For more information, see Model Linear Circuit Response from SPICE Netlist.

Click to save the current circuit configuration to a file whose name is specified in the Configuration name.

Click to load the current circuit configuration from the file whose name is specified in the Configuration name parameter.

Select to attach the selected configuration file to the Simulink block when it is built by the Linear Circuit Wizard block.

Click to create a Simulink block or object to model the circuit defined by SPICE netlist.

If switch states have been defined for the circuit, the constructed block will be a switched circuit block. Otherwise it will be a linear circuit block.

Linear Analysis

Select to add a structure containing the pole-zero report to the base workspace when the linear circuit is analyzed.

Select to plot all transfer functions of the linear circuit when the linear circuit is analyzed.

Select to add a structure containing the matrices for the control system differential equations to the base workspace when the linear circuit is analyzed.

Click to analyze the linear circuit and produce the selected outputs.

Operating Point Analysis

Select the output port for the primary output value from a drop-down menu. The drop-down menu remains empty until you parse the netlist to define the ports.

Desired primary output value(s), specified as a scalar or a vector.

Programmatic Use

Block parameter: OutputValues
Type: character vector
Value: scalar | vector
Default: 0

The variable the block uses to regulate the output. Choose between Duty Cycle or Frequency.

Programmatic Use

Block parameter: ControlVariable
Type: character vector
Value: Duty cycle | Frequency
Default: Duty cycle

Control duty cycle, defined on a scale from 0 to 1. You can specify a scalar to be applied to all analyses, or you can specify the minimum and maximum of a range of control duty cycles as a 2-element vector thus producing a plot of output value as a function of control duty cycle.

Programmatic Use

Block parameter: DutyCycle
Type: character vector
Value: scalar | 2-element vector
Default: 0

Control signal frequency. You can specify a scalar to be applied to all analyses, or you can specify the minimum and maximum of a range of frequencies as a 2-element vector thus producing a plot of output value as a function of control signal frequency.

Programmatic Use

Block parameter: Frequency
Type: character vector
Value: scalar | 2-element vector
Default: 0

Phase of the rising edge of the control signal(s) as a fraction of control cycle (0,1), specified as a scalar (single control signal) or vector (multiple control signals).

You can use the variable d to represent the control duty cycle or f to represent the switching frequency.

Programmatic Use

Block parameter: PhaseOffsets
Type: character vector
Value: scalar | vector
Default: 0

Pulse duration of the control signals as a function of the control cycle (0,1), specified as a scalar (single control signal) or vector (multiple control signals).

You can use the variable d to represent the control duty cycle or f to represent the switching frequency.

Programmatic Use

Block parameter: PulseDuration
Type: character vector
Value: scalar | vector
Default: 0

Number of samples in a single steady state switching cycle output wave, specified as a positive integer scalar.

Programmatic Use

Block parameter: WaveSamples
Type: character vector
Value: scalar
Default: 1024

Click to perform the switched-mode power train operating point analysis of the switched circuit.

More About

expand all

Version History

Introduced in R2020b