2.9.5 TwoPort Parameters
TwoPort Representations
It is easy to extend the analysis procedures for computing transfer functions to twoport parameter analysis because twoport or, more generally, nport matrices can be regarded as transfer functions in several dimensions. Indeed, every single coefficient in a twoport matrix is a transfer function from one port current or voltage to another, so we could obtain the four coefficients of a twoport matrix by means of four separate transfer function analyses. However, we will apply a more efficient strategy which allows for calculating complete nport matrices in only one step.
Figure 9.8: Twoport current and voltage reference directions
Figure 9.8 shows the voltages and currents at the terminals of a two port. The relation between the port quantities , , , and is generally given as a linear mapping of two equations in four variables:
Solving these equations for any combination of twoport voltages or currents yields one of six possible twoport representations known as the admittance, impedance, hybrid I and II, and cascade I and II forms. For example, solving for and in terms of and results in the admittance, or Ymatrix, representation
whose coefficients are known as the Yparameters of the two port. Similarly, solving for and in terms of and yields the impedance, or Zmatrix, representation:
Stimulus Sources for TwoPort Calculations
A particular twoport matrix can be computed by connecting appropriate stimulus sources to the ports and solving for the opposite port quantities. For instance, if we want to compute a Zmatrix we must connect current sources to the ports, set up circuit equations and solve for the corresponding port voltages. Likewise, a Ymatrix is obtained by connecting voltage sources V1 and V2 to the ports and determining the port currents I$V1 and I$V2 in terms of these voltages.
Figure 9.9: Voltage source excitation for Ymatrix calculation
Note that a straightforward combination of the twoport circuit and the excitation sources as shown in Figure 9.9 will not yield an entirely correct result. The resulting Yparameters would have a wrong sign because the positive reference directions for the branch currents of the voltage sources are not oriented according to the reference directions for twoport terminal currents.
Remember that the positive reference direction for the current and voltage in a circuit branch is always determined by the order of the nodes in the corresponding netlist entry (see Chapter 2.2).
The reference direction for the port currents can be aligned with the twoport terminal current directions by reversing the order of the nodes in the netlist entries belonging to the stimulus sources. However, the voltage reference directions, whose initial settings were correct, are changed by this operation as well. Hence, to compensate this unwanted effect, the voltages must be given negative values in the netlist (see Figure 9.10).
Figure 9.10: Correct voltage source excitation for computing Yparameters
Computing YParameters
Let's demonstrate the procedure for twoport analysis by calculating the Ymatrix of the circuit shown in Figure 9.11.
Figure 9.11: Twoport circuit
As discussed in the preceding subsection we must connect stimulus voltage sources to the circuit as shown in Figure 9.12 and write the corresponding netlist. If you want to calculate twoport parameters of a circuit whose netlist was read by ReadNetlist, you can use DeleteElements and AddElements to edit the netlist.
Figure 9.12: Correct voltage source excitation for computing Yparameters
In[24]:= twoport = Netlist[ {V1, {0, 1}, V1}, {V2, {0, 2}, V2}, {RB, {1, 0}, RB}, {CM, {1, 2}, CM}, {VC1, {1, 0, 2, 0}, gm}, {RO, {2, 0}, RO} ]
Out[26]=
Next, we set up a system of circuit equations and compute the port currents I$V1 and I$V2 as functions of the stimulus voltages V1 and V2.
In[25]:= twoportmna = CircuitEquations[twoport]; DisplayForm[twoportmna]
Out[28]//DisplayForm=
In[26]:= ypar = Solve[twoportmna, {I$V1, I$V2}]
Out[29]=
The Yparameters of the twoport circuit are given by the coefficients of V1 and V2 on the righthand sides of the solutions.
In[27]:= yrhs = {I$V1, I$V2} /. First[ypar]; MatrixForm[yrhs]
Out[31]//MatrixForm=
To set up the Ymatrix we must extract the coefficient matrix from these two linear expressions, for example by computing the Jacobian with respect to V1 and V2.
In[28]:= JacobianMatrix[eqs_, vars_] := Outer[D, eqs, vars]
In[29]:= ymatrix = JacobianMatrix[yrhs, {V1, V2}]; MatrixForm[ymatrix]
Out[34]//MatrixForm=
