Skip to content

sysconnect.m

Basic Information

  SYNTAX:  [systot,ierr] = sysconnect(system_defns, sys1, sys2, ...)

  PURPOSE:  Connect together multiple systems in Control Toolbox format. Note
    that Control Toolbox functions tend to produce poorly conditioned
    system matrices.  Use remove_algebraic.m to improve conditioning.

  INPUT:
    sys_defns=  structure containing definitions of system to build.
        Structure must contain at least the fields: systemnames,
        inputvar, outputvar and "input_to_"... for each
        system listed in systemnames. Format is the same as
        for sysic in the muSYN toolbox.
    sys1, sys2, ... = systems defined in "systemnames" - must be in the
        same order as listed in systemnames

    Example:
      sys_defns = struct('systemnames','DIIID1 ip_feedback',  ...
               'inputvar','[choppers(18); dist(4)]', ...
               'outputvar','[DIIID1]', ...
               'input_to_DIIID1','[ip_feedback; choppers; dist]', ...
               'input_to_ip_feedback','[DIIID1(46)]');
      (then, for arguments, sys1 = DIIID1, sys2 = ip_feedback)

  OUTPUT:
    systot = connected together system
    ierr = error code, different from 0 if error prevented systot from
        being successfully built

  SEE ALSO: sysmult, sysinfo

  RESTRICTIONS:  Cannot handle arithmetic operations inside the string
    (e.g. sys1+sys2, 2*sys3, etc.) like sysic can.

Dependencies