inductor class

Inductor object

Syntax

lobj = inductor(lvalue)
lobj = inductor(lvalue,lname)

Description

Use inductor class to create an inductor object that you can add to an existing circuit.

lobj = inductor(lvalue) creates a inductor object, lobj, with a inductance of lvalue and default name, L. lvalue must be a numeric non-negative scalar.

lobj = inductor(lvalue,lname) creates a inductor object, lobj, with a inductance of lvalue and name lname. lname must be a string.

Properties

expand all

InductanceObject valuescalar

Inductance, in henrys, of the inductor object.

NameObject namestring

Read-only string that contains the name of the inductor object. Default name is L. Two elements in the same circuit cannot have the same name.

Terminalsnames of terminals.cell vector

Read-only cell vector that contains the names of the two terminals of the inductor object. These names are always p and n.

ParentPathfull path of inductor.string

Full path of the circuit to which the inductor object belongs. This path appears only after the inductor is added to the circuit.

ParentNodesCircuit nodesvector of integers.

The term ParentNodes describes the nodes in the parent circuit that are connected to the inductor terminals. This property appears only after the inductor is added to a circuit.

Examples

Create and Display an Inductor

hL1 = inductor(3e-9);
disp(hL1)
 inductor: Inductor element

    Inductance: 3.0000e-09
          Name: 'L'
     Terminals: {'p'  'n'}

Create and Extract S-parameters of an Inductor

hL2 = inductor(3e-9,'L3nh');
hcktind2 = circuit('example2');
add(hcktind2,[1 2],hL2)
setports(hcktind2, [1 0],[2 0])
freq = linspace(1e3,2e3,100);
S = sparameters(hcktind2,freq);
disp(S)
 sparameters: S-parameters object

       NumPorts: 2
    Frequencies: [100x1 double]
     Parameters: [2x2x100 double]
      Impedance: 50

  rfparam(obj,i,j) returns S-parameter Sij

Add a Inductor to a Circuit to Display ParentPath and ParentNodes

hL3 = inductor(3e-9,'L3n9');
hckt3 = circuit('example3');
add(hckt3,[1 2],hL3)
setports(hckt3, [1 0],[2 0])
disp(hL3)
  inductor: Inductor element

     Inductance: 3.0000e-09
           Name: 'L3n9'
      Terminals: {'p'  'n'}
    ParentNodes: [1 2]
     ParentPath: 'example3'
Was this topic helpful?