Skip to content

linsim_tok_zctrl.m

Basic Information

  USAGE:       [out_data] = linsim_tok_zctrl(tok_system,tau_ps,T_ps,Vvec, ...
            Vlims,Kpvec,Kdvec,taupd,iplot,zdisp0,tmax,zmax, ...
            Gpsweep,Gdsweep,idxacsw)

  PURPOSE: Function to simulate linear vertical control with standard
        tau_ps, T_ps power supply definition. Called by script
        sim_iter_zctrl.m. Simulates response to zdisp0 initial
        condition

  INPUTS:
    tok_system = structure gen. by build_* script containing system data
    tau_ps = power supply time constant [s]
    T_ps = power supply delay time (in addition to one-pole tau_ps) [s]
    Vvec = vector specifying active coils (entries: 0=not active,
        +/-1 = active positive(negative) voltage/current
    Vlims = vector giving voltage saturation levels [V]
    Kpvec   = vector giving proportional gain [V/m]
    Kdvec   = vector giving derivative gain [V/m/s]
    taupd  = time constant for 1-pole filter on PD operation [s]
    iplot = (opt) flag to select plotting (1=plot, 0=don't(default))
    zdisp0 = (opt) specific value to calculate displacement trajectory for
          and plot (if selected)
    tmax = (opt) max time for simulation (def=1.0 sec)
    zmax = (opt) max z for plotting (def = 0.9 m)
    Gpsweep = vector with Gpmin, Gpmax, ngp
    Gdsweep = vector with Gdmin, Gdmax, ngd
    idxacsw = idx scalar for selected active coil to plot contours
        (this must be idx of coil whose peak I, V are negative,
         since code finds min of time history for contouring)

  OUTPUTS:
    out_data = structure that includes histories
    + plots (if selected)

  RESTRICTIONS:

  METHOD:

Dependencies