Linear Circuit Wizard
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
Circuit Definition
Circuit design name — Name of circuit displayed on block icon
'Linear Circuit'
(default) | character vector | string scalar
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' |
Block name — Instance name displayed under block icon
'Linear Circuit'
(default) | character vector | string scalar
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' |
Netlist file name — Name of netlist file that defines circuit
character vector | string scalar
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 |
Configuration name — Name of configuration file
character vector | string scalar
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 |
Parse netlist file and start new configuration — Parse named netlist file
button
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.
Save configuration — Save current configuration to file
button
Click to save the current circuit configuration to a file whose name is specified in the Configuration name.
Load configuration — Load existing configuration file
button
Click to load the current circuit configuration from the file whose name is specified in the Configuration name parameter.
Attach configuration to block — Attach selected configuration file to Simulink block
on (default) | off
Select to attach the selected configuration file to the Simulink block when it is built by the Linear Circuit Wizard block.
Build Simulink block — Create Simulink block or object to model circuit defined by netlist
button
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
Pole/zero report — Add pole -zero report to base workspace
on (default) | off
Select to add a structure containing the pole-zero report to the base workspace when the linear circuit is analyzed.
Transfer function plot — Plot transfer functions
on (default) | off
Select to plot all transfer functions of the linear circuit when the linear circuit is analyzed.
Linear control system — Add matrices for control system differential equations to base workspace
on (default) | off
Select to add a structure containing the matrices for the control system differential equations to the base workspace when the linear circuit is analyzed.
Analyze — Analyze linear circuit to produce selected outputs
button
Click to analyze the linear circuit and produce the selected outputs.
Operating Point Analysis
Output port — Outport port for primary output value
drop-down menu created from port definitions
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.
Steady state output value(s) — Desired primary output value(s)
0
(default) | scalar
| vector
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 |
Primary control variable — Variable used to regulate output
Duty cycle (default) | Frequency
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 |
Duty cycle value [min,max] — Minimum control duty cycle
0
(default) | scalar | 2-element vector
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 |
Frequency [min,max] — Minimum control frequency
0
(default) | scalar | 2-element vector
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 offset(s) — Phase of rising edge of control signal as fraction of control cycle
0
(default) | scalar | vector
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(s) — Pulse duration of control signal as function of control cycle
0
(default) | scalar | vector
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 |
Samples per waveform — Number of samples in single switching cycle output wave
1024
(default) | positive integer scalar
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 |
Analyze operating point — Operating point analysis of switched circuit
button
Click to perform the switched-mode power train operating point analysis of the switched circuit.
More About
SPICE Netlist
The Linear Circuit Wizard block solves a linear, time-invariant circuit described by a SPICE netlist. The block supports a limited set of SPICE circuit elements and netlist statement syntaxes. For more information about supported circuit elements and netlist statement syntaxes, see Model Linear Circuit Response from SPICE Netlist.
Ports
The ports in the Linear Circuit Wizard block are initially parsed from the SPICE netlist. Once the ports are defined, you can add, delete, or modify the order of the ports from the Linear Circuit Wizard block parameter dialog.. The supported ports can either be input or output, and either be voltage or current.
Note
The signals at both the input and output ports must use a fixed step discrete sample time equal to the block’s sample time.
The most common interface definition for an analog circuit is a set of voltages and currents defined at circuit nodes. To create the interface to digital logic and behavioral models from the interface to analog circuits requires some conversion. The Linear Circuit Wizard block constructs the conversion between ports and analog circuit nodes based on the ports definitions that you supply. This enables the Linear Circuit Wizard block to produce a block in your Simulink model that can be connected directly to other types of blocks. For more information, see Ports Supported in Linear Circuit Wizard.
Device Noise
The Linear Circuit Wizard block can model the noise generated by the transistors and resistors in the analog circuit. The spectral density of the device noise can include accurate modeling of flicker noise. The circuit model includes the transfer function from the device noise source to the circuit ports. For more information, see Define Device Noise Using Linear Circuit Wizard.
Results
The Linear Circuit Wizard block outputs a linear circuit block that can be added to the Simulink model. This block is a MATLAB System block with all the input and output ports defined in the Linear Circuit Wizard block parameter dialog box. The generated block requires a fixed-step discrete sample time, which the block either inherits from the surrounding model or defines for itself. For more information, see MATLAB Systems Generated from Linear Circuit Wizard.
The Linear Circuit Wizard block can generate multiple MATLAB System blocks that represent different linear circuit blocks. Once generated, the MATLAB System blocks are independent of their respective Linear Circuit Wizard blocks.
Independent of the generation of MATLAB System blocks, the Linear Circuit Wizard block can also generate a report for ports of the generated block, a report for poles and zeroes of the entire linear circuit, and plot the transfer functions between the input and output ports. For more information, see Verify MATLAB System Block Configuration.
Version History
Introduced in R2020b
See Also
Topics
- Circuit Design Details Affect PLL Performance
- Analyze T-Coil Circuit
- Feedback Amplifier Design for Voltage-Mode Boost Converter
- Boost Power Train Operating Point Analysis
- Model Linear Circuit Response from SPICE Netlist
- Define Device Noise Using Linear Circuit Wizard
- Ports Supported in Linear Circuit Wizard
- MATLAB Systems Generated from Linear Circuit Wizard
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)