control.summing_junction(inputs=None, output=None, dimension=None, name=None, prefix='u', **kwargs)

Create a summing junction as an input/output system.

This function creates a static input/output system that outputs the sum of the inputs, potentially with a change in sign for each individual input. The input/output system that is created by this function can be used as a component in the interconnect() function.

  • inputs (int, string or list of strings) – Description of the inputs to the summing junction. This can be given as an integer count, a string, or a list of strings. If an integer count is specified, the names of the input signals will be of the form u[i].

  • output (string, optional) – Name of the system output. If not specified, the output will be ‘y’.

  • dimension (int, optional) – The dimension of the summing junction. If the dimension is set to a positive integer, a multi-input, multi-output summing junction will be created. The input and output signal names will be of the form <signal>[i] where signal is the input/output signal name specified by the inputs and output keywords. Default value is None.

  • name (string, optional) – System name (used for specifying signals). If unspecified, a generic name <sys[id]> is generated with a unique integer id.

  • prefix (string, optional) – If inputs is an integer, create the names of the states using the given prefix (default = ‘u’). The names of the input will be of the form prefix[i].


sys – Linear input/output system object with no states and only a direct term that implements the summing junction.

Return type

static LinearIOSystem


>>> P = control.tf2io(, [1, 0]), input='u', output='y')
>>> C = control.tf2io(, [1, 1]), input='e', output='u')
>>> sumblk = control.summing_junction(inputs=['r', '-y'], output='e')
>>> T = control.interconnect((P, C, sumblk), input='r', output='y')