Skip to content

model_from_netlist.m

Basic Information

  SYNTAX: model = model_from_netlist(netlist,Mmat,Rvec,Iout,Vout,verbose)

  PURPOSE:
   Produces model that is generalization of that produced by the simpler
   tokamak/plasma modeling schemes, of the form:
       Mhat*dx/dt + Rhat*x = Vhat*u + What*du/dt
                         y = Chat*x + Dhat*u + DWhat*du/dt
   where the generalized state and input vectors are:
    x = [i_inductors; v_capacitors],
    u = [Vsource; Isource]
    y = [current_outputs; voltage_outputs]

  INPUT:
    netlist = netlist specification of circuit connections
    Mmat = mutual inductance matrix for all "M" type elements in netlist
    Rvec = resistance vector for all "M" type elements in netlist
     (Values of netlist for "M" objects are indices into these objects.)
    Iout = array of strings defining branches for which to output currents
        (optional, default = no current outputs)
    Vout = n x 2 matrix, each row containing node numbers [N1 N2], with
        voltage output defined as V(N1)-V(N2)
        (optional, default = no voltage outputs)
    verbose = set to >0 to print model-building diagnostics to terminal
        (optional, default = 0)

  OUTPUT: (in structure "model")
    model = structure containing model objects; see descriptions field for
        description of contents of each field

  RESTRICTIONS:
       (1) Does not yet handle circuits containing capacitors or current sources.
    (2) Right now it can't handle outputs Vout if circuit is not specified as
        a connected graph (i.e. no floating potentials).

  METHOD: Described in: M.L.Walker, A General Purpose Circuit Modeling Code
     for Tokamak Plasma Magnetic Control, Engineering Physics Memo
     EPM070120a, January 20, 2007