add summing junction + implicit signal interconnection by murrayrm · Pull Request #517 · python-control/python-control

This PR addresses the enhancement describe in issue #516 where signals with the same name are automatically interconnected by the interconnect function. It also defines a new function summation_block that addresses the request in issue #493. Together, these capabilities allow the following code to work for setting up a simple feedback system:

P = ct.ss2io(
    ct.rss(2, 1, 1, strictly_proper=True),
    inputs='u', outputs='y', name='P')
kp = ct.tf(random.uniform(1, 10), [1])
ki = ct.tf(random.uniform(1, 10), [1, 0])
C = ct.tf2io(kp + ki, inputs='e', outputs='u', name='C')
sumblk = ct.summation_block(inputs=['r', '-y'], output='e', name="sum")
Tio_sum = ct.interconnect(
    (C, P, sumblk), inplist=['r'], outlist=['y'])