Ports

'''Note: This page is under construction. If you have experience with openEMS, please consider to create an account and help improve this page.'''

Overview
Ports are macro function that combine e.g. current and voltage probes, field excitations and other necessary properties and primitives.

General layout (example):

with the following parameters:
 * CSX: The original CSX structure (in & out)
 * prio: priority for all contained primitives
 * port_number: number of this port (must be unique)

return values:
 * CSX: The manipulated CSXCAD structure
 * port: A new port structure containing all necessary information to use with calcPort for post-processing purposes

Defining Multiple Ports
In many cases you may want to create more than one port, e.g. to calculate the reflection and transmission parameters. In this case it is a good idea to create a cell array of port structures. Example:

Note: Keep in mind that in order to calculate a reflection and transmission, only one port at a time can be active.

Concentrated Ports
Concentrated ports such as the lumped or curve port are supposed to be very small and compact ports. Their size should be much smaller than the wavelength.

Lumped Port
A lumped port is a 1D, 2D or 3D box containing a feeding resistance (e.g. 50 Ohms) and a current and voltage probe measuring the current through and the voltage along this resistance. As any port it can be active/include an excitation or not.

Example of an active 1D port with 50 Ohm:

The vector argument indicates that the direction of the port is z. The value "true" indicates that this port is active.

See also: Simple Patch Antenna Tutorial

Transmission Line Ports
Transmission line ports are the most complex ports available in openEMS.

The FDTD mesh must be already defined for this type of port!

Microstrip Port
General layout (example):

with the following additional parameters:
 * materialname: is the metal or conducting sheet property name used for the metallic property
 * start/stop: the start/stop coordinates of a box defining the outer boundary of the port. The order of start/stop does matter in this case as the wave is assumed to travel from start to stop. Ensure that the box covers at least 2 grid cells in the direction of the excitation vector.
 * dir: direction of propagation (0,1 or 2 for x-, y- or z-direction)
 * evec: excitation vector, which defines the direction of the e-field

optional/variable parameters as key/values:
 * ExcitePort: true/false to make the port an active feeding port (default is false)
 * FeedShift: shift the port from start by a given distance in drawing units. Default is 0. Only used if port is active!
 * Feed_R: Specify a lumped port resistance. Default is no lumped port resistance --> port has to start in an absorbing boundary such as a PML.
 * MeasPlaneShift: Shift the measurement plane from start in propagation direction to a given distance in drawing units. Default is the middle of start/stop.

Example:

See also: Microstip Notch Filter Tutorial, CRLH Parameter Extraction Tutorial

Circular Waveguide Ports
Circular waveguide ports are set up with the following command:

with the following parameters:
 * CSX: The original CSX structure (in & out)
 * prio: priority for all contained primitives
 * port_number: number of this port (must be unique)
 * start: start coordinates of waveguide port box
 * stop: stop coordinates of waveguide port box
 * radius: circular waveguide radius in metres
 * mode_name: mode name, e.g. 'TE11' or 'TM21'
 * pol_ang: polarization angle (e.g. 0 = horizontal, pi/2 = vertical)
 * exc_amp:   excitation amplitude (set 0 to be passive)

Return values:
 * CSX: The manipulated CSXCAD structure
 * port: A new port structure containing all necessary information to use with calcPort for post-processing purposes

Note that the excitation will be located at the start position and the voltage and current probes will be located at the stop position.

The stop coordinate of the port box defines the reference plane for the port.

An example using a cylindrical coordinate system (cartesian coordinates also work in a similar manner):

Rectangular Waveguide Ports
Rectangular waveguide ports are set up with the following command:

with the following parameters:


 * CSX:       complete CSX structure (must contain a mesh)
 * prio:      priority of primitives
 * start:     start coordinates of waveguide port box
 * stop:      stop  coordinates of waveguide port box
 * dir:       direction of port (0/1/2 or 'x'/'y'/'z'-direction)
 * a,b:       rectangular waveguide width and height (in metre)
 * mode_name: mode name, e.g. 'TE11' or 'TM21'
 * exc_amp:   excitation amplitude (set 0 to be passive)

Return values:


 * CSX:       modified CSX structure
 * port:      port structure to use with calcPort

Ports are in the form of a box with the excitation plane located at the start position and the voltage and current probes located at the stop position.

The stop coordinate of the port box defines the reference plane for the port.

An example of an active port directed along the z-direction:

Time Domain Currents and Voltages Data
After calling  one can obtain the time-domain voltages and currents for ports i=1,2,3 ...:


 * Time values:
 * Voltage values:
 * Current values:

Example of plotting out an input (port{1}) and output (port{2}) voltage and current are shown below

Frequency Domain Data
After calling  one can obtain the frequency-domain parameters for ports i=1,2,3 ...:


 * Incident voltage:
 * Reflected voltage:
 * Total voltage:
 * Incident current:
 * Reflected current:
 * Total current:

Example of calculating s-parameters: