Main Content

circuit

Circuit object

Description

Use circuit object to build a circuit object which can contain elements like resistor, capacitor, and inductor.

Creation

Description

example

cktobj = circuit creates a circuit object cktobj with a default name.

cktobj = circuit(cktname) creates a circuit object cktobj with name of cktname.

example

cktobj = circuit([elem1,...,elemN]) creates a circuit object cktobj by cascading the specified 2-port elements.

cktobj = circuit([elem1,...,elemN],cktname) creates a cascaded circuit object cktobj with the name, cktname.

cktobj = circuit(rfb) creates a circuit object cktobj by cascading the elements in the RF object, rfb.

cktobj = circuit(rfb,cktname) creates a circuit object cktobj by cascading the elements in the RF object, rfb, using name, cktname.

Input Arguments

expand all

2-port RF elements, specified as character vectors. The possible elements are amplifier, nport, and modulator

RF budget object, specified as an object handle.

Properties

expand all

Name of circuit, specified as a character vector. Default name is 'unnamed'. Two circuit elements attached together or belonging to the same circuit cannot have the same name

Data Types: char | string

Heterogeneous array of elements present in the circuit, specified as any one of the following objects: amplifier, resistor, capacitor, inductor, lcladder, nport, modulator, and rffilter objects.

Data Types: char | string

Name of elements in the circuit, specified as a vector of cell vector. The possible elements here are resistor, capacitor, inductor, and circuit.

Data Types: char | string

Names of terminals in the circuit, specified as a cell vector. Use setports or setterminals function to define the terminals. The terminals of the circuit are only displayed once it is defined.

Data Types: char | string

Names of ports in a circuit specified as a character vector. Use setports function to define the ports. The ports of the circuit are only displayed once it is defined.

Data Types: char | string

List of nodes defined in the circuit, specified as a vector of integers. These nodes are created when a new element is attached to the circuit.

Data Types: double

Full path of parent circuit, specified as a character vector. This path appears only once the child circuit is added to the parent circuit.

Data Types: char | string

Nodes of parent circuit, specified as a vector of integers. This vector of integers is the same length as the Terminals property. This property is read-only and appears only after the child circuit is added to the parent circuit.

Data Types: double

Object Functions

sparametersCalculate S-parameters for RF data, network, circuit, and matching network objects
groupdelayGroup delay of S-parameter object or RF filter object or RF Toolbox circuit object
addInsert circuit element or circuit object into circuit
deleteDelete circuit object and decouple its elements
setportsSet ports of circuit object
setterminalsSet terminals of circuit object
cloneCreate copy of existing circuit element or circuit object
richardsConvert lumped element circuit to distributed element circuit using Richards' transformation

Examples

collapse all

Create a circuit called new_circuit. Add a resistor and capacitor to the circuit. Set the terminals and display the results.

hckt = circuit('new_circuit1');
hC1= add(hckt,[1 2],capacitor(3e-9));
hR1 = add(hckt,[2 3],resistor(100));
setterminals (hckt,[1 3]);
disp(hckt)
  circuit: Circuit element

    ElementNames: {'C'  'R'}
        Elements: [1x2 rf.internal.circuit.RLC]
           Nodes: [1 2 3]
            Name: 'new_circuit1'
       Terminals: {'t1'  't2'}

Create a circuit called new_circuit. Add a capacitor and inductor parallel to the circuit.

hckt = circuit('new_circuit');
hC = add(hckt,[1 2],capacitor(1e-12));
hL = add(hckt,[1 2],inductor(1e-9));
disp(hckt)
  circuit: Circuit element

    ElementNames: {'C'  'L'}
        Elements: [1x2 rf.internal.circuit.RLC]
           Nodes: [1 2]
            Name: 'new_circuit'

Version History

Introduced in R2013b

expand all