Michael Thomas Flanagan's Java Scientific LibraryTwoWireLine Class:      Two Wire Transmission Line

Last update: 7 April 2008                                                                                                                              Main Page of Michael Thomas Flanagan's Java Library

This class provides, for a two wire transmission line with
 distributed resistance, R ohms/metre distributed inductance, L henrys/metre distributed conductance, G siemens/metre distributed capacitance, C farads/metre terminating load of impedance Zload ohms length, l metres wire radius, a metres, a<
the methods for obtaining:

 Characteristic impedance, Zo Input impedance, Zi Shorted line impedance, Zload = 0 Open line impedance, Zload = ∞ Quater-wave line impedance Half-wave line impedance Wavelength, λ Transmission matrix (ABCD matrix) Distributed impedance, R + jωL Distributed admittance, G + jωC Reflection coefficient, ρ Standing-wave ratio Attenuation constant, α Phase constant, β Propagation constant, γ = α + jβ Phase velocity, vp Group velocity, vg
for
 a generalised line, as depicted above right (R > 0, G > 0) an ideal line (R = 0, G = 0) a low loss line (R/ωL << 1, G/ωC << 1)
where ω is the radial frequency of a cosinusoidal signal of frequency f Hz. The symbol, j, is used on this page to represent the square root of minus one.

This class, TwoWireLine, is a subclass of the superclass TransmissionLine.
The methods for the calculation of standard component impedances and for combining impedances may be found in the class Impedance and methods of their phasor representation and manipulation may be found in the class Phasor.

 import statement: import flanagan.circuits.TwoWireLine;
Related classes

### SUMMARY OF CONSTRUCTORS AND METHODS

 Constructors public void TwoWireLine() public void TwoWireLine(String title) Wire radius, a public void setWireRadius(double radius) Wire separation, b public void setWireSeparation(double separation) Relative electrical permittivity, εr public void setRelativePermittivity(double epsilonR) Relative magnetic permeability, μr public void setRelativePermeability(double muR)

The following methods are all inherited from the superclass TransmissionLine.

 Instance title public void setTitle(String title) public String getTitle() Frequency, f public void setFrequency(double frequency) public double getFrequency() public double getRadialFrequency() Load impedance, Zload public void setLoadImpedance(double impedance) public void setLoadImpedance(Complex impedance) public Complex getLoadImpedance() Line length, l public void setLineLength(double length) public double getLineLength() Distributed resistance, R public void setDistributedResistance(double resistance) public double getDistributedResistance() Distributed conductance, G public void setDistributedConductance(double conductance) public double getDistributedConductance() Distributed inductance, L public double getDistributedInductance() Distributed capacitance, C public double getDistributedCapacitance() Distributed impedance, R + jωL public Complex getDistributedImpedance() Distributed admittance, G + jωC public Complex getDistributedAdmittance() Characteristic impedance, Zo public Complex getCharacteristicImpedance() public Complex getIdealCharacteristicImpedance() public double getIdealCharacteristicImpedanceAsReal() public Complex getLowLossCharacteristicImpedance() Input impedance, Zi public Complex getInputImpedance() public Complex getIdealInputImpedance() public Complex getLowLossInputImpedance() Shorted line impedance, Zload = 0 public Complex getShortedLineImpedance() public Complex getIdealShortedLineImpedance() public Complex getLowLossShortedLineImpedance() Open line impedance, Zload = ∞ public Complex getOpenLineImpedance() public Complex getIdealOpenLineImpedance() public Complex getLowLossOpenLineImpedance() Line signal wavelength, λ public double getWavelength() public double getIdealWavelength() public double getLowLossWavelength() Quarter-wave line impedance public Complex getQuarterWaveLineImpedance() public Complex getIdealQuarterWaveLineImpedance() public Complex getLowLossQuarterWaveLineImpedance() Half-wave line impedance public Complex getHalfWaveLineImpedance() public Complex getIdealHalfWaveLineImpedance() public Complex getLowLossHalfWaveLineImpedance() Reflection coefficient public Complex getReflectionCoefficient() public Complex getIdealReflectionCoefficient() public Complex getLowLossReflectionCoefficient() Standing-wave ratio public double getStandingWaveRatio() public double getIdealStandingWaveRatio() public double getLowLossStandingWaveRatio() Attenuation constant, α public double getAttenuationConstant() public double getIdealAttenuationConstant() public double getLowLossAttenuationConstant() Phase constant, β public double getPhaseConstant() public double getIdealPhaseConstant() public double getLowLossPhaseConstant() Propagation constant, γ = α + jβ public Complex getPropagationConstant() public Complex getIdealPropagationConstant() public Complex getLowLossPropagationConstant() Phase velocity, vp public double getPhaseVelocity() public double getIdealPhaseVelocity() public double getLowLossPhaseVelocity() Group velocity, vg public double getGroupVelocity() public void setDelta(double delta) public double getGroupPhaseVelocity() public double getLowLossGroupVelocity() Transmission matrix(ABCD matrix) public ComplexMatrix getABCDmatrix() public ComplexMatrix getIdealABCDmatrix() public ComplexMatrix getLowLossABCDmatrix() Segment length public void setSegmentLength(double segLength) Segment output voltage public void setOutputVoltage(Phasor voltage) public void setOutputVoltage(Complex voltage) public void setOutputVoltage(double magnitude, double phase) Segment output current public void setOutputCurrent(Phasor current) public void setOutputCurrent(Complex current) public void setOutputCurrent(double magnitude, double phase) Segment input voltage and current public Phasor[] getInputVandIasPhasor() public Phasor[] getInputVandIasPhasor(double segmentLength) public Complex[] getInputVandIasComplex() public Complex[] getInputVandIasComplex(double segmentLength) public double[] getInputVandIasReal() public double[] getInputVandIasReal(double segmentLength) public double[] getInputVandIasMagnitudeAndPhase() public double[] getInputVandIasMagnitudeAndPhase(double segmentLength) Segment input voltage public Phasor getInputVoltageAsPhasor() public Complex getInputVoltageAsComplex() public double getInputVoltageAsReal() public double[] getInputVoltageAsMagnitudeAndPhase() Segment input current public Phasor getInputCurrentAsPhasor() public Complex getInputCurrentAsComplex() public double getInputCurrentAsReal() public double[] getInputCurrentAsMagnitudeAndPhase() Deep Copy public TwoWireLine copy() public Object clone()

### CONSTRUCTORS

public TwoWireLine()
Usage:                      TwoWireLine twtl = new TwoWireLine();
Creates an instance of TwoWireLine with a default title, "Two Wire Line".

public TwoWireLine(String title)
Usage:                      TwoWireLine twtl = new TwoWireLine(title);
Creates an instance of TwoWireLine with a user supplied title through the argument title.

A method for entering the radii of the two wires, a, of the two wire line. The radii of the two wires are assumed to be identical and much smaller than the separation distance between the wires. The radius [argument radius] is measured, in metres, from the wire centre to the outer surface of wire (see figure at top of page left).

### WIRE SEPARATION, b

public void setWireSeparation(double separation)
Usage:                      twtl.setWireSeparation(separation);
A method for entering the separation distance, b, between the two wires of the two wire line. This distance is assumed to be much larger than the radii of the wires. The separation [argument separation] is measured, in metres, between the centres of the two wires (see figure at top of page left).

### RELATIVE ELECTRICAL PERMITTIVITY, εr

public void setRelativePermittivity(double epsilonR)
Usage:                      twtl.setRelativePermittivity(epsilonR);
A method for entering the relative electrical permittivity, εr, of the insulator surrounding conducting wires. The default value, if no user value is entered, is 1.0.

### RELATIVE MAGNETIC PERMEABILITY, μr

public void setRelativePermeability(double muR)
Usage:                      twtl.setRelativePermeability(muR);
A method for entering the relative electrical permeability, μr, of the insulator surrounding conducting wires. The default value, if no user value is entered, is 1.0.

The following methods are all inherited from the superclass TransmissionLine.

### INSTANCE TITLE

public void setTitle(String title)
Usage:                      twtl.setTitle(title);
Resets the title of the instance, twtl, of TwoWireLine to a user supplied title through the argument title. The default title is "Two Wire Line".

public String getTitle()
Usage:                      title = twtl.getTitle();
Returns the title of the instance of TwoWireLine, twtl.

### FREQUENCY, f

public void setFrequency(double frequency)
Usage:                      twtl.setFrequency(frequency);
A method for entering the frequency of the signal [frequency], f, in Hz. This method also calculates the radial frequency, ω = 2πf.

public double getFrequency()
Usage:                      freq = twtl.getFrequency();
Returns the frequency, f, in Hz.

Returns the radial frequency, ω [2πf].

A method for entering the impedance of the load [impedance], Zload, in ohms. The impedance may be entered as real (pure resistance) or as Complex (complex impedance).

Usage:                      freq = twtl.getFrequency();

### LINE LENGTH, l

public void setLineLength(double length)
Usage:                      twtl.setLineLength(length);
A method for entering the length of the line [length], l, in metres.

public Complex getLineLength()
Usage:                      length = twtl.getLineLength();
Returns the length of the line, l, in metres.

### DISTRIBUTED RESISTANCE, R

public void setDistributedResistance(double resistance)
Usage:                      twtl.setDistributedResistance(resistance);
A method for entering the distributed resistance [resistance], R, in ohms per metre. The default value is zero.

Methods that return the resistance of wires or plates of metals and alloys commonly used in electrical and electronic engineering may found in the class Impedance. The present list is
 aluminium antimony brass cobalt constantan copper - annealed copper - hard drawn German silver gold iron lead magnesium managanin mercury molybdenum - drawn Monel metal Nichrome™ nickel palladium phosphor bronze platinum silver steel: B B steel: E B B steel: manganese steel: Siemens-Martin tantalum Therlo™ tin tungsten - drawn zinc
public Complex getDistributedResistance()
Usage:                      dres = twtl.getDistributedResistance();
Returns the distributed resistance, R, in ohms per metre.

### DISTRIBUTED CONDUCTANCE, G

public void setDistributedConductance(double conductance)
Usage:                      twtl.setDistributedConductance(conductance);
A method for entering the distributed inductance [conductance], R, in siemens per metre. The default value is zero.

public Complex getDistributedConductance()
Usage:                      dcon = twtl.getDistributedConductance();
Returns the distributed conductance, G, in siemens per metre.

### DISTRIBUTED INDUCTANCE, L

public Complex getDistributedInductance()
Usage:                      dind = twtl.getDistributedInductance();
Returns the distributed inductance, L, in henrys per metre. See Impedance for details of the methods that this class, TwoWireLine, uses in the calculation of the impedance of an inductor.

### DISTRIBUTED CAPACITANCE, C

public Complex getDistributedCapacitance()
Usage:                      dcap = twtl.getDistributedCapacitance();
Returns the distributed capacitance, C, in farads per metre. See Impedance for details of the methods that this class, TwoWireLine, uses in the calculation of the impedance of a capacitor.

### DISTRIBUTED IMPEDANCE, R + jωL

public Complex getDistributedImpudence()
Usage:                      dimp = twtl.getDistributedImpedance();
Returns the distributed impedance, R + jωL, in ohms per metre.

### DISTRIBUTED ADMITTANCE, G + jωC

Returns the distributed admittance, G + jωC, in siemens per metre.

### CHARACTERISTIC IMPEDANCE, Zo

General Line
public Complex getCharacteristicImpedance()
Usage:                      zed0 = twtl.getcharacteristicImpedance();
Returns the characteristic impedance, Zo, in ohms, for the generalised transmission line depicted at the top of this page:

Ideal Line
public Complex getIdealCharacteristicImpedance()
Usage:                      zed0 = twtl.getIdealCharacteristicImpedance();
Returns the characteristic impedance, Zo, in ohms, for an ideal transmission line:

public double getIdealCharacteristicImpedanceAsReal()
Usage:                      zed0 = tl.getIdealCharacteristicImpedanceAsReal();
Returns the characteristic impedance, Zo, in ohms, for an ideal transmission line:

as a real number [double].

Low Loss Line
public Complex getLowLossCharacteisticImpedance()
Usage:                      zed0 = twtl.getLowLossCharacteristicImpedance();
Returns the characteristic impedance, Zo, in ohms, for a low loss transmission line:

### INPUT IMPEDANCE, Zi

General Line
public Complex getInputImpedance()
Usage:                      zedi = twtl.getInputImpedance();
Returns the input impedance, Zi, in ohms, for the generalised transmission line depicted at the top of this page:

Ideal Line
public Complex getIdealInputImpedance()
Usage:                      zedi = twtl.getIdealInputImpedance();
Returns the input impedance, Zi, in ohms, for an ideal transmission line:

Low Loss Line
public Complex getLowLossInputImpedance()
Usage:                      zedi = twtl.getLowLossInputImpedance();
Returns the input impedance, Zi, in ohms, for a low loss transmission line:

### SHORTED LINE IMPEDANCE, Zload = 0

General Line
public Complex getShortedLineImpedance()
Usage:                      zedShort = twtl.getShortedLineImpedance();
Returns the shorted line impedance, in ohms, for the generalised transmission line depicted at the top of this page:
Zotanh(γl)

Ideal Line
public Complex getIdealShortedLineImpedance()
Usage:                      zedShort = twtl.getIdealShortedLineImpedance();
Returns the shorted line impedance, in ohms, for an ideal transmission line:
jZotan(βl)

Low Loss Line
public Complex getLowLossShortedLineImpedance()
Usage:                      zedShort = twtl.getLowLossShortedLineImpedance();
Returns the shorted line impedance, in ohms, for a low loss transmission line:

### OPEN LINE IMPEDANCE, Zload = ∞

General Line
public Complex getOpenLineImpedance()
Usage:                      zedOpen = twtl.getOpenLineImpedance();
Returns the open line impedance, in ohms, for the generalised transmission line depicted at the top of this page:
Zocoth(γl)

Ideal Line
public Complex getIdealOpenLineImpedance()
Usage:                      zedOpen = twtl.getIdealOpenLineImpedance();
Returns the open line impedance, in ohms, for an ideal transmission line:
jZocot(βl)

Low Loss Line
public Complex getLowLossOpenLineImpedance()
Usage:                      zedOpen = twtl.getLowLossOpenLineImpedance();
Returns the open line impedance, in ohms, for a low loss transmission line:

### WAVELENGTH, λ

General Line
public Complex getWavelength()
Usage:                      lambda = twtl.getWavelength();
Returns the wavelength, λ = 2π /β, in metres, of a cosinusoidal signal of radial frequency, ω, on the generalised transmission line depicted at the top of this page:

Ideal Line
public Complex getIdealOpenLineImpedance()
Usage:                      lambda = twtl.getIdealWavelength();
Returns the wavelength, λ = 2π /β, in metres, of a cosinusoidal signal of radial frequency, ω, on an ideal transmission line:

Low Loss Line
public Complex getLowLossOpenLineImpedance()
Usage:                      lambda = twtl.getLowLossWavelength();
Returns the wavelength, λ = 2π /β, in metres, of a cosinusoidal signal of radial frequency, ω, on a low loss transmission line:

### QUARTER−WAVE LINE IMPEDANCE

General Line
public Complex getQuarterWaveLineImpedance()
Usage:                      zedQuarterWave = twtl.getQuarterWaveLineImpedance();
Returns the impedance of a quarter-wave line, in ohms, for the generalised transmission line depicted at the top of this page:

Ideal Line
public Complex getIdealQuarterWaveLineImpedance()
Usage:                      zedQuarterWave = twtl.getIdealQuarterWaveLineImpedance();
Returns the impedance of a quarter-wave line, in ohms, for an ideal transmission line:

Low Loss Line
public Complex getLowLossQuarterWaveLineImpedance()
Usage:                      zedQuarterWave = twtl.getLowLossQuarterWaveLineImpedance();
Returns the impedance of a quarter-wave line, in ohms, for a low loss transmission line:

### HALF−WAVE LINE IMPEDANCE

General Line
public Complex getHalfWaveLineImpedance()
Usage:                      zedHalfWave = twtl.getHalfWaveLineImpedance();
Returns the impedance of a half-wave line, in ohms, for the generalised transmission line depicted at the top of this page:

Ideal Line
public Complex getIdealHalfWaveLineImpedance()
Usage:                      zedHalfWave = twtl.getIdealHalfWaveLineImpedance();
Returns the impedance of a half-wave line, in ohms, for an ideal transmission line:

Low Loss Line
public Complex getLowLossHalfWaveLineImpedance()
Usage:                      zedHalfWave = twtl.getLowLossHalfWaveLineImpedance();
Returns the impedance of a half-wave line, in ohms, for a low loss transmission line:

### REFLECTION COEFFICIENT, ρ

General Line
public Complex getReflectionCoefficient()
Usage:                      reflCoeff = twtl.getReflectionCoefficient();
Returns the reflection coefficient, ρ, for the generalised transmission line depicted at the top of this page:

Ideal Line
public Complex getIdealReflectionCoefficient()
Usage:                      reflCoeff = twtl.getIdealReflectionCoefficient();
Returns the reflection coefficient, ρ, for an ideal transmission line:

Low Loss Line
public Complex getLowLossReflectionCoefficient()
Usage:                      reflCoeff = twtl.getLowLossReflectionCoefficient();
Returns the reflection coefficient, ρ, for a low loss transmission line:

### STANDING−WAVE RATIO

General Line
public Complex getStandingWaveRatio()
Usage:                      swr = twtl.getStandingWaveRatio();
Returns the standing-wave ratio, ρ, for the generalised transmission line depicted at the top of this page:

Ideal Line
public Complex getIdealStandingWaveRatio()
Usage:                      swr = twtl.getIdealStandingWaveRatio();
Returns the standing-wave ratio, ρ, for an ideal transmission line:

Low Loss Line
public Complex getLowLossStandingWaveRatio()
Usage:                      swr = twtl.getLowLossStandingWaveRatio();
Returns the standing-wave ratio, ρ, for a low loss transmission line:

### ATTENUATION CONSTANT, α

General Line
public Complex getAttenuationConstant()
Usage:                      alpha = twtl.getAttenuationConstant();
Returns the attenuation constant, α, for the generalised transmission line depicted at the top of this page:

Ideal Line
public Complex getIdealAttenuationConstant()
Usage:                      alpha = twtl.getIdealAttenuationConstant();
Returns the attenuation constant, α, for an ideal transmission line:
α = 0

Low Loss Line
public Complex getLowLossAttenuationConstant()
Usage:                      alpha = twtl.getLowLossAttenuationConstant();
Returns the attenuation constant, α, for a low loss transmission line:

### PHASE CONSTANT, β

General Line
public double getPhaseConstant()
Usage:                      beta = twtl.getPhaseConstant();
Returns the phase constant, β, for the generalised transmission line depicted at the top of this page:

Ideal Line
public double getIdealPhaseConstant()
Usage:                      alpha = twtl.getIdealPhaseConstant();
Returns the phase constant, β, for an ideal transmission line:

Low Loss Line
public double getLowLossPhaseConstant()
Usage:                      beta = twtl.getLowLossPhaseConstant();
Returns the phase constant, β, for a low loss transmission line:

### PROPAGATION CONSTANT, γ = α + jβ

General Line
public Complex getPropagationConstant()
Usage:                      gamma = twtl.getPropagationConstant();
Returns the propagation constant, γ, for the generalised transmission line depicted at the top of this page:

Ideal Line
public Complex getIdealPropagationConstant()
Usage:                      gamma = twtl.getIdealPropagationConstant();
Returns the propagation constant, γ, for an ideal transmission line:

Low Loss Line
public Complex getLowLossPropagationConstant()
Usage:                      gamma = twtl.getLowLossPropagationConstant();
Returns the propagation constant, γ, for a low loss transmission line:

### PHASE VELOCITY, vp

General Line
public double getPhaseVelocity()
Usage:                      vp = twtl.getPhaseVelocity();
Returns the phase velocity, vp in metres per second, for the generalised transmission line depicted at the top of this page:

Ideal Line
public double getIdealPhaseVelocity()
Usage:                      vp = twtl.getIdealPhaseVelocity();
Returns the phase velocity, vp in metres per second, for an ideal transmission line:

where εo is the electical permittivity of free space, μo is the magnetic permeability of free space and vlight is the velocity of light in free space (2.99792458x108 m s-1).

Low Loss Line
public double getLowLossPhaseVelocity()
Usage:                      vp = twtl.getLowLossPhaseVelocity();
Returns the phase velocity, vp in metres per second, for a low loss transmission line:

### GROUP VELOCITY, vg

General Line
public double getPhaseVelocity()
Usage:                      vg = tl.getGroupVelocity();
Returns the group velocity, vg in metres per second, for the generalised transmission line depicted at the top of this page:

If the distributed resistance, R, and the distributed conductance, G, are equal to zero (an ideal line) the group velocity is evaluated as

otherwise an approximation, using numerically differentiation, is evaluated as

where βω(1 − δ) and βω(1 + δ) are the values of the phase constant, β, evaluated at ω(1 − δ) and ω(1 + δ) respectively. The default value of the numerical incremental factor, δ, is 0.001 but this may be reset using the method, setDelta, described below.

public void setDelta(double delta)
Usage:                      tl.setDelta(delta);
A method that allows the incremental factor, δ, used in the numerical approximation of the group velocity on a general line (see above), to be reset. The default value is 0.001.

Ideal Line
public double getIdealGroupVelocity()
Usage:                      vg = tl.getIdealGroupVelocity();
Returns the group velocity, vg in metres per second, for an ideal transmission line:

Low Loss Line
public double getLowLossGroupVelocity()
Usage:                      vg = tl.getLowLossGroupVelocity();
Returns the group velocity, vg in metres per second, for a low loss transmission line:

### TRANSMISSION (ABCD) MATRIX

details of complex matrix manipulations, e.g. multiplication, using theComplexMatrix class.

General Line
public ComplexMatrix getABCDmatrix()
Usage:                      ComplexMatrix abcd = tl.getABCDmatrix();
Returns the transmission matrix (ABCD matrix) for the generalised transmission line depicted at the top of this page:

where Zo is the characteristic impedance, γ is the propagation constant and Λ is the length of segment to which the transmission matrix is applied.

Ideal Line
public ComplexMatrix getIdealABCDmatrix()
Usage:                      ComplexMatrix abcd = tl.getIdealABCDmatrix();
Returns the transmission matrix (ABCD matrix) for an ideal transmission line:

where Zo is the characteristic impedance, β is the phase constant and Λ is the length of segment to which the transmission matrix is applied.

Low Loss Line
public ComplexMatrix getLowLossABCDmatrix()
Usage:                      ComplexMatrix abcd = tl.getLowLossABCDmatrix();
Returns the transmission matrix (ABCD matrix) for a low loss transmission line:

where Zo is the characteristic impedance, γ is the propagation constant and Λ is the length of segment to which the transmission matrix is applied.

### SEGMENT LENGTH, Λ

public void setSegmentLength(double length)
Usage:                      tl.setSegmentLength(length);
A method for entering the length of a line segment [length], Λ, in metres. The ABCD matrix methods require a segment length.

### SEGMENT INPUT VOLTAGE AND INPUT CURRENT

These methods all calculate and return the input voltage, Vo, and current, Io, to a segment of line, of length Λ, with an output voltage, VΛ, and an output current, IΛ, using the relationship

or, if the distributed resistance, R, and the distributed conductance, G, are both equal to zero,

where γ is the propagation constant and β is the phase constant. The methods require the output voltage, VΛ, the output current, IΛ, and, if it is not the method's argument, the segment length, Λ, to have been previously entered.

public Phasor[] getInputVandIasPhasor()
Usage:                     Phasor[] vAndI = tl.getInputVandIasPhasor();
public Phasor[] getInputVandIasPhasor(double segmentLength)
Usage:                     Phasor[] vAndI = tl.getInputVandIasPhasor(segmentLength);
Returns the input voltage Vo as a phasor (magnitude∠phase) [Phasor] vAndI[0] and the input current Io as a phasor vAndI[1].

public Complex[] getInputVandIasComplex()
Usage:                     Complex[] vAndI = tl.getInputVandIasComplex();
public Complex[] getInputVandIasComplex(double segmentLength)
Usage:                     Complex[] vAndI = tl.getInputVandIasComplex(segmentLength);
Returns the input voltage Vo in rectangular complex form (magnitude.cos(phase) + j.magnitude.sin(phase)) [Complex] vAndI[0] and the input current Io as the complex number vAndI[1].

public double[] getInputVandIasReal()
Usage:                     double[] vAndI = tl.getInputVandIasReal();
public double []getInputVandIasReal(double segmentLength)
Usage:                     double[] vAndI = tl.getInputVandIasReal(segmentLength);
Returns the input voltage Vo as real, i.e. as magnitude.cos(phase), in vAndI[0] and the input current Io as real in vAndI[1].

public double[] getInputVandIasMagnitudeAndPhase()
Usage:                     double[] vAndI = tl.getInputVandIasReal();
public double[] getInputVandIasMagnitudeAndPhase(double segmentLength)
Usage:                     double[] vAndI = tl.getInputVandIasReal(segmentLength);
Returns the magnitude and phase of the input voltage Vo in vAndI[0] and vAndI[1] and the magnitude and phase of the input current in vAndI[2] and vAndI[3].

### SEGMENT INPUT VOLTAGE

These methods all calculate and return the input voltage, Vo, to a segment of line, of length Λ, with an output voltage, VΛ, and an output current, IΛ, using the relationship

or, if the distributed resistance, R, and the distributed conductance, G, are both equal to zero,

where γ is the propagation constant and β is the phase constant. The methods require the output voltage, VΛ, the output current, IΛ, and the segment length, Λ, to have been previously entered.

public Phasor getInputVoltageAsPhasor()
Usage:                     Phasor voltage = tl.getInputVoltageAsPhasor();
public Phasor getInputVoltageAsPhasor(double segmentLength)
Returns the input voltage Vo as a phasor (magnitude∠phase) [Phasor].

public Complex getInputVoltageAsComplex()
Usage:                     Complex voltage = tl.getInputVoltageAsComplex();
public Complex getInputVoltageAsComplex(double segmentLength)
Returns the input voltage Vo in rectangular complex form (magnitude.cos(phase) + j.magnitude.sin(phase)) [Complex].

public double getInputVoltageAsReal()
Usage:                     double voltage = tl.getInputVoltageAsReal();
public double getInputVoltageAsReal(double segmentLength)
Returns the input voltage Vo as real, i.e. as magnitude.cos(phase).

public double[] getInputVoltageAsMagnitudeAndPhase()
Usage:                     double voltage[] = tl.getInputVoltageAsReal();
Returns the magnitude and phase of the input voltage Vo in voltage[0] and voltage[1].

### SEGMENT INPUT CURRENT

These methods all calculate and return the input current, Io, to a segment of line, of length Λ, with an output voltage, VΛ, and an output current, IΛ, using the relationship

or, if the distributed resistance, R, and the distributed conductance, G, are both equal to zero,

where γ is the propagation constant and β is the phase constant. The methods require that the output voltage, VΛ, the output current, IΛ, and the segment length, Λ, to have been previously entered.

public Phasor getInputCurrentAsPhasor()
Usage:                     Phasor current = tl.getInputCurrentAsPhasor();
public Phasor getInputCurrentAsPhasor(double segmentLength)
Returns the input current Io as a phasor (magnitude∠phase) [Phasor].

public Complex getInputCurrentAsComplex()
Usage:                     Complex current = tl.getInputCurrentAsComplex();
public Complex getInputCurrentAsComplex(double segmentLength)
Returns the input current Io in rectangular complex form (magnitude.cos(phase) + j.magnitude.sin(phase)) [Complex].

public double getInputCurrentAsReal()
Usage:                     double current = tl.getInputCurrentAsReal();
public double getInputCurrentAsReal(double segmentLength)
Returns the input current Io as real, i.e. as magnitude.cos(phase).

public double[] getInputCurrentAsMagnitudeAndPhase()
Usage:                     double current[] = tl.getInputCurrentAsReal();
Returns the magnitude and phase of the input current Io in current[0] and current[1.

### SEGMENT OUTPUT VOLTAGE

public void setOutputVoltage(Phasor voltage)
public void setOutputVoltage(Complex voltage)
public void setOutputVoltage(double magnitude, double phase)
Usage:                      tl.setOutputVoltage(voltage);
A method for entering the output voltage of a line segment to which the ABCD matrix is to be applied. The voltage [voltage] may be entered as a Phasor (magnitude∠phase), a Complex (magnitude.cos(phase)+j.magnitude.cos(phase)) or as the magnitude and phase.

### SEGMENT OUTPUT CURRENT

public void setOutputCurrent(Phasor current)
public void setOutputCurrent(Complex current)
public void setOutputCurrent(double magnitude, double phase)
Usage:                      tl.setOutputCurrent(current);
A method for entering the output current of a line segment to which the ABCD matrix is to be applied. The current [current] may be entered as a Phasor (magnitude∠phase), a Complex (magnitude.cos(phase)+j.magnitude.cos(phase)) or as the magnitude and phase.

### DEEP COPY

public TwoWireLine copy()
public Object clone()

Copy a TwoWireLine
Usage:                      aa = bb.copy();
A deep copy of TwoWireLine, bb, is returned as aa. This method overrides the super-class TransmissionLine copy method.

Clone a TwoWireLine
Usage:                      aa = bb.clone();
A deep copy of TwoWireLine, bb, is returned as aa cast as Object. This method overrides java.lang.Object.clone() and the super-class TransmissionLine clone method.

### OTHER CLASSES USED BY THIS CLASS

This class uses the following classes in this library: