main content

circuit object -凯发k8网页登录

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

2-port rf elements, specified as character vectors. the possible elements are , , and

rf budget object, specified as an object handle.

properties

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: , , , , , , , and 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 or 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 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
group delay of s-parameter object or rf filter object or rf toolbox circuit object
insert circuit element or circuit object into circuit
delete circuit object and decouple its elements
set ports of circuit object
set terminals of circuit object
create copy of existing circuit element or circuit object
convert lumped element circuit to distributed element circuit using richards' transformation

examples

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

see also

| | |

网站地图