The Linear Circuit Wizard block uses the port definitions you supply either through the SPICE netlist or the Linear Circuit Wizard’s parameter dialog to supply ports on the blocks it produces that are compatible with signals from other Simulink® blocks.
The input ports on the blocks that the Linear Circuit Wizard produces accept input signals that represent either a voltage or a current. Similarly, the output ports produce signals which represent either a voltage or a current. Both input and output signals must use a fixed step discrete sample time equal to the block’s sample time.
There are five types of ports.
|Port Type||Port Circuit Definition||Definition from Netlist|
|Voltage input||The input signal is the node voltage of a positive circuit node minus the node voltage of a negative circuit node.||Independent voltage source|
|Current input||The input signal is a current flowing into a positive circuit node and back out through a negative circuit node.||Independent current source|
|Voltage output||The output signal is the node voltage of a positive circuit node minus the node voltage of a negative circuit node.||V(<node> <node>) clause in .print or .plot statement|
|Current output||The output signal is the current flowing through a voltage source from the positive output node to the negative output node. The voltage source must be defined in the SPICE netlist.||I(<voltage source>) clause in .print or .plot statement|
|Device noise source||The input signal is a device noise current that is assumed to be flowing through a resistor or controlled current source in the circuit. The device must be defined in the SPICE netlist. The goal is to make it easier for you to apply your own device noise model to the circuit.|
Through the mask parameter dialog of the Linear Circuit Wizard, you can add or delete ports and define the order in which the ports are listed.
The parameter dialog displays the type, name, and nodes of a single port, along with an indication of that port’s position in the list of ports. If no ports have been defined yet, then the type, name, and nodes are blank and require your input. Choose a port from the port list, modify the port definition as desired, and then choose an action.
Port list: Each entry in the port list is a number representing the position in the list, followed by the port name.
Port type: Choose one of the five port types described in the table above.
Port name: The port name is a character array obtained
by applying the
eval function to the parameter value that you specify.
You can specify either a literal character array by enclosing the name in single quotes (for
'port1') or the name of a workspace variable.
Port nodes: Select the port nodes from a list. The contents of the list are derived from the netlist, and depend on the port type you have selected.
For the Voltage input, Current input, and Voltage output port types, the list contains the names of circuit nodes.
For the Current output port type, the list contains the names of voltage sources.
For the Device noise source port type, the list contains the designators of circuit elements that could be sources of device noise.
Actions: The actions enabled depend on the content of the port list.
Create: Add a new port to the list, based on the port definition currently displayed.
Save: Save the currently displayed port definition to its current location in the port list.
Delete: Remove the currently displayed port from the port list.
Move up: Move the currently displayed port up one position in the port list.
Move down: Move the currently displayed port down one position in the port list.
You can obtain a table displaying the ports you’ve defined by clicking the Report ports button. This creates the struct array
LinearCircuitWizardPorts in your base workspace. Display or inspect
this struct array to see your port definitions in a table.