Talk:CalcPort

function [port] = calcPort( port, SimDir, f, varargin)

Calculate: - voltages and currents - the propagation constant and the characteristic impedance (if applicable)

The port has to be created by e.g. AddMSLPort, AddLumpedPort, AddCurvePort, AddRectWaveGuidePort, AddCoaxialPort, etc.

input: port:      return value of add port function used SimDir:    directory, where the simulation files are f:         frequency vector for DFT

variable input: 'RefImpedance': - use a given reference impedance to calculate inc and ref voltages and currents - default is given port or calculated line impedance 'RefPlaneShift':    for transmission lines only, See also calcTLPort for more details 'SwitchDirection':  0/1, switch assumed direction of propagation 'SignalType':      'pulse' (default) or 'periodic'

output: % output signals/values in time domain (TD): port.ut.tot    total voltage (time-domain) port.ut.time   voltage time vector port.it.tot    total current (time-domain) port.it.time   current time vector

% output signals/values in frequency domain (FD): port.f                 the given frequency vector port.uf.tot/inc/ref    total, incident and reflected voltage port.if.tot/inc/ref    total, incident and reflected current port.ZL_ref            used reference impedance

port.P_inc             incident power port.P_ref             reflected power port.P_acc             accepted power (incoming minus reflected, may be negative for passive ports) if port is a transmission line port: port.beta:             propagation constant port.ZL:               characteristic line impedance

example: port = calcPort(port, Sim_Path, f, 'RefImpedance', 50);