# Port (circuit theory)

In electrical circuit theory, a port is a pair of terminals connecting an electrical network or circuit to an external circuit, as a point of entry or exit for electrical energy. A port consists of two nodes (terminals) connected to an outside circuit which meets the port condition – the currents flowing into the two nodes must be equal and opposite.
The use of ports helps to reduce the complexity of circuit analysis. Many common electronic devices and circuit blocks, such as transistors, transformers, electronic filters, and amplifiers, are analyzed in terms of ports. In multiport network analysis, the circuit is regarded as a "black box" connected to the outside world through its ports. The ports are points where input signals are applied or output signals taken. Its behavior is completely specified by a matrix of parameters relating the voltage and current at its ports, so the internal makeup or design of the circuit need not be considered, or even known, in determining the circuit's response to applied signals.
The concept of ports can be extended to waveguides, but the definition in terms of current is not appropriate and the possible existence of multiple waveguide modes must be accounted for.

## Port condition

Any node of a circuit that is available for connection to an external circuit is called a pole (or terminal if it is a physical object). The port condition is that a pair of poles of a circuit is considered a port if and only if the current flowing into one pole from outside the circuit is equal to the current flowing out of the other pole into the external circuit. Equivalently, the algebraic sum of the currents flowing into the two poles from the external circuit must be zero.
It cannot be determined if a pair of nodes meets the port condition by analysing the internal properties of the circuit itself. The port condition is dependent entirely on the external connections of the circuit. What are ports under one set of external circumstances may well not be ports under another. Consider the circuit of four resistors in the figure for example. If generators are connected to the pole pairs (1, 2) and (3, 4) then those two pairs are ports and the circuit is a box attenuator. On the other hand, if generators are connected to pole pairs (1, 4) and (2, 3) then those pairs are ports, the pairs (1, 2) and (3, 4) are no longer ports, and the circuit is a bridge circuit.
It is even possible to arrange the inputs so that no pair of poles meets the port condition. However, it is possible to deal with such a circuit by splitting one or more poles into a number of separate poles joined to the same node. If only one external generator terminal is connected to each pole (whether a split pole or otherwise) then the circuit can again be analysed in terms of ports. The most common arrangement of this type is to designate one pole of an n-pole circuit as the common and split it into n−1 poles. This latter form is especially useful for unbalanced circuit topologies and the resulting circuit has n−1 ports.
In the most general case, it is possible to have a generator connected to every pair of poles, that is, $^n$C$_2$ generators, then every pole must be split into n−1 poles. For instance, in the figure example (c), if the poles 2 and 4 are each split into two poles each then the circuit can be described as a 3-port. However, it is also possible to connect generators to pole pairs (1, 3), (1, 4), and (3, 2) making $^4$C$_2$ = 6 generators in all and the circuit has to be treated as a 6-port.

## One-ports

Any two-pole circuit is guaranteed to meet the port condition by virtue of Kirchhoff's current law and they are therefore one-ports unconditionally. All of the basic electrical elements (inductors, resistors, capacitors, voltage sources, current sources) are one-port devices.
Study of one-ports is an important part of the foundation of network synthesis, most especially in filter design. Two-element one-ports (that is RC, RL and LC circuits) are easier to synthesise than the general case. For a two-element one-port Foster's canonical form or Cauer's canonical form can be used. In particular, LC circuits are studied since these are lossless and are commonly used in filter design.

## Two-ports

Linear two port networks have been widely studied and a large number of ways of representing them have been developed. One of these representations is the z-parameters which can be described in matrix form by;
    ${\begin{bmatrix}V_{1}\\V_{2}\end{bmatrix}}={\begin{bmatrix}z_{11}&z_{12}\\z_{21}&z_{22}\end{bmatrix}}{\begin{bmatrix}I_{1}\\I_{2}\end{bmatrix}}$
where V$_n$ and I$_n$ are the voltages and currents respectively at port n. Most of the other descriptions of two-ports can likewise be described with a similar matrix but with a different arrangement of the voltage and current column vectors.
Common circuit blocks which are two-ports include amplifiers, attenuators and filters.

## Multiports

In general, a circuit can consist of any number of ports—a multiport. Some, but not all, of the two-port parameter representations can be extended to arbitrary multiports. Of the voltage and current based matrices, the ones that can be extended are z-parameters and y-parameters. Neither of these are suitable for use at microwave frequencies because voltages and currents are not convenient to measure in formats using conductors and are not relevant at all in waveguide formats. Instead, s-parameters are used at these frequencies and these too can be extended to an arbitrary number of ports.
Circuit blocks which have more than two ports include directional couplers, power splitters, circulators, diplexers, duplexers, multiplexers, hybrids and directional filters.

## RF and microwave

RF and microwave circuit topologies are commonly unbalanced circuit topologies such as coaxial or microstrip. In these formats, one pole of each port in a circuit is connected to a common node such as a ground plane. It is assumed in the circuit analysis that all these commoned poles are at the same potential and that current is sourced to or sunk into the ground plane that is equal and opposite to that going into the other pole of any port. In this topology a port is treated as being just a single pole. The corresponding balancing pole is imagined to be incorporated into the ground plane.
The one-pole representation of a port will start to fail if there are significant ground plane loop currents. The assumption in the model is that the ground plane is perfectly conducting and that there is no potential difference between two locations on the ground plane. In reality, the ground plane is not perfectly conducting and loop currents in it will cause potential differences. If there is a potential difference between the commoned poles of two ports then the port condition is broken and the model is invalid.

## Waveguide

The idea of ports can be (and is) extended to waveguide devices, but a port can no longer be defined in terms of circuit poles because in waveguides the electromagnetic waves are not guided by electrical conductors. They are, instead guided by the walls of the waveguide. Thus, the concept of a circuit conductor pole does not exist in this format. Ports in waveguides consist of an aperture or break in the waveguide through which the electromagnetic waves can pass. The bounded plane through which the wave passes is the definition of the port.
Waveguides have an additional complication in port analysis in that it is possible (and sometimes desirable) for more than one waveguide mode to exist at the same time. In such cases, for each physical port, a separate port must be added to the analysis model for each of the modes present at that physical port.

## Other energy domains

The concept of ports can be extended into other energy domains. The generalised definition of a port is a place where energy can flow from one element or subsystem to another element or subsystem. This generalised view of the port concept helps to explain why the port condition is so defined in electrical analysis. If the algebraic sum of the currents is not zero, such as in example diagram (c), then the energy delivered from an external generator is not equal to the energy entering the pair of circuit poles. The energy transfer at that place is thus more complex than a simple flow from one subsystem to another and does not meet the generalised definition of a port.
The port concept is particularly useful where multiple energy domains are involved in the same system and a unified, coherent analysis is required such as with mechanical–electrical analogies or bond graph analysis. Connection between energy domains is by means of transducers. A transducer may be a one-port as viewed by the electrical domain, but with the more generalised definition of port it is a two-port. For instance, a mechanical actuator has one port in the electrical domain and one port in the mechanical domain. Transducers can be analysed as two-port networks in the same way as electrical two-ports. That is, by means of a pair of linear algebraic equations or a 2×2 transfer function matrix. However, the variables at the two ports will be different and the two-port parameters will be a mixture of two energy domains. For instance, in the actuator example, the z-parameters will include one electrical impedance, one mechanical impedance, and two transimpedances that are ratios of one electrical and one mechanical variable.