ECE 403  HWb – Ver. 1.00 January 23, 2017  Spring 2017
Univ. of Illinois  Feb 7, Disc: Feb 14, Due: Feb 21  Prof. Allen

Topic of this homework: Experimental measurements of a 2-port network. The first objective is become familiar with the computer measurement system. This is a lab study where you will use the computer and Network analyzer (MU box) to measure the 2-port properties of two simple electrical networks.

Deliverable: Measure the circuits shown in the Fig. below. Using Matlab or Octave, show the four T(s) matrix elements, magnitude and phase. Explain how you measured and computed these functions. Also compute the four Z(s) matrix parameters. Explain how you measured them.

Make sure the plots look professional, have log-log scales, and restrict the results between 50 to 10^{4} [Hz], (i.e., the audio, audible, frequency range). Write a report (i.e., a few pages long) that outlines what you found and how you did the analysis.

I request a paper copy, with your name on it, stapled. No files.doc, no emailed homework. Due Date: If you hand it in late, you will get zero credit. Some credit is better than NO credit.

Notes:

• This homework will be discussed in class on Disc: Feb 14, so you may want to be there.

• You should work as a team to collect the raw data. But then each person is to do there own analysis and write-up. Obviously you can, and should, discuss how to do the analysis, as much as you wish, with your team (or others). However, you should not share computer files, including the final graphs. In other words, you need to process all the words you write through your eyes and your fingers. When ever you use material from someone else, give a citation.

1 ABCD Matrix method

We seek to demonstrate that the traditional methods of circuit analysis can require much more algebra than using the transmission matrix method, which is based on 2x2 matrix algebra.

Two circuits are shown In the figure below: Left: A) and Right: B).

L_{1}  L_{2} C_{2} C_{1}  U_{3} U_{1} P_{1} Z_{in}  P_{2}  P_{3} U_{2}^{x = 0 P_{1} U_{1}  P_{3} U_{3} = 0 P_{2}  x = L R_{1}  z_{l} U_{2}  z_{o}}

1. Analyze circuit A:

(a) Use a “traditional” analysis (define the impedances, and use formulas for series z = z_{1}+z_{2} and parallel z = z_{1}||z_{2} = \frac{z_{1}z_{2}}{z_{1}+z_{2}} combinations), to obtain the input impedance Z_{in}(s), where s is the complex frequency (s = σ + jω), as defined for the Laplace Transform. For example, the input impedance is

Z_{in} = sL_{1} + Z_{p}

where

Z_{p} = \frac{1}{sC_{1}} || (\frac{1}{sC_{2}} + sL_{2})

Write out the formula for Z_{in}(s) in terms of the component values L_{1}, C_{1}, etc.

(b) Next find the formula for H_{32} = P_{3}/P_{2} (the pressure transfer function)?

(c) Note that the related formula for H_{31} = P_{3}/P_{1} is more complicated. Comment on, or if you can, write out the formula.

(d) Use the ABCD (Transmission) matrix approach to find the transmission (ABCD) matrix for circuit A.

2. Analyize circuit B: This circuit represents a transmission line (TL), terminated at the far end x = L with impedance z_{l}(s). Every TL has four parameters: a length L [m], wave speed c = 345 [m/s], cross-sectional area A_{o} [m^{2}] and characteristic impedance z_{o} = ρ_{o}c/A_{o} [Rayls].

When sound enters the input, at x = 0, the wave travels at speed c, thus is therefore delayed by T = L/c [s]. At x = L the wave is reflected with a reflection coefficient

Γ = \frac{P^{−}}{P^{+}} = \frac{z_{o} − z_{l}}{z_{o} + z_{l}}  (1)

The reflected wave is again delayed by T as it travels back to the input (x = 0), giving a total delay of 2L/c.

When the TL is terminated with its characteristic impedance, namely when z_{l} = z_{o}, their are no reflections since Γ = 0. If L = ∞ there are no reflections, as the load at x = L is simply z_{o} To Do: Justify Eq. 1. The idea is to express the pressure and velocity as sums of the forward and backward traveling waves. Starting with the definition of the impedance

Z(x, s) = \frac{P (x, s)}{U(x, s)},

rewrite it in terms of the forward and backward plane waves (P = P^{+} + P^{−}, U = U^{+} − U^{−}). Recall the definition of z_{o} = P^{+}/U^{+}. Hint: Γ(s) is derived in the Reading assignment for Lec 8 of Feb 9 (i.e., “pp. 87-90: An Invitation”).

3. (a) Assuming z_{l} = z_{o}, find the input impedance Z_{in}(s):

(b) If the load impedance z_{l} = z_{o}, determine the transfer function.

2 2-port Network Measurements and Analysis

This assignment will require making measurements (Lab 2) on the two electrical 2-port networks shown below, and then performing a simple analysis. First you need to learn how to measure the response using the network analyizer tool. Second you need to analyze the resulting files using simple Matlab/Octave tool.

Your results need to be clearly explained in a short report, with figures and equations, that shows your analysis and explains your conclusions.^{1}

R_{1}  R_{2} I_{1} V_{1}  V_{2} C  I_{2}^{R C  C V_{1}  γC  γR γR I_{1}  V_{2} −I_{2}^{I_{a}}^{I_{c}}  ^{I_{d}}^{I_{b}}}

Figure 1: Left: This RC-lowpass circuit is intended to be trivial to analyze. Right: This parallel pair of 3-element (R and C) circuit is called a “Twin-T notch filter.” The values of C and R will be pick by the TA, and the circuit will be pre-configured for you. The constant γ is typically 2.

1. For the RC lowpass circuit (Fig. 1, Left), find the ABCD matrix, the input impedance Z_{1} = V_{1}/I_{2}, and the open circuit voltage transfer function

H_{21} = \frac{V_{1}}{I_{1}} |_{I_{2}=0} .

Compare the calculated results to the data collected in Lab 2. The resistors are in [kΩ]. Assume Z_{1} = 10 kΩ and C = 0.1 μFd. Note: An Matlab/Octave script that models this circuit is provide below, which is available on the website.

2. For the circuit on the right, the following method is used:

(a) Find the T matrix for the upper and lower circuits. Then convert them into an admittance matrix using the transformation given in the Vanvalkenberg handout

[\begin{matrix}I_{1} \\ I_{2} \end{matrix}] = \frac{1}{B} [\begin{matrix}D & −Δ_{T} \\ −1 & A \end{matrix} ] [\begin{matrix}V_{1} \\ V_{2} \end{matrix}]  (2)

Cal this matrix Y_{1}.

(b) Do the same for the lower circuit, and call this admittance matrix Y_{2}

[\begin{matrix}I_{a} \\ I_{c} \end{matrix}] = \frac{1}{B} [\begin{matrix}D & −Δ_{T} \\ −1 & A \end{matrix} ] [V_{1} V_{2}]  (3)

(c) The addinging the two matrix equations together, adds the currents, giving the desired result.

1This report should be part of your Final Report (i.e., due on May 5, 2017).

To Do:

1. Evaluate the impedance matrix and the ABCD matrix for the two circuits of Fig. 1. A Matlab/Octave script is provide below (and on line)^{2} to compute and display the solution, so you may verify your Lab 2 results.

2. For the two circuits: Using the network analyizer (MU-box) provided in the lab, measure the input impedance and transfer function, in both directions, and then from your measurements, compute the impedance matrix elements. This is the basis of Lab 2.

Matlab/Octave script to solve RC lowpass system (Left circuit of Fig. 1).

% Matlab code to evaluate the RC lowpass filter response of the first 2-port problem
% HWb, Feb 16, 2017, Section 2 Fig 1, left.
NFT=1024; NF=1+NFT/2;%number of non-negative frequencies
Fmax=1e4; Fs=2*Fmax; Fmin=Fs/NFT;
 f=0:Fmin:Fmax; %sweep frequency from 0 to Fmax [Hz] in steps of Fmin [Hz]
R1=1e4; R2=1e4; %in [Ohms]
C=0.1e-6; %[Farads]
T=zeros(NF,2,2); %Init output array
for k=1:NF;
s=2*pi*f(k)*1j; %Define complex frequency
%Define three matrices for the three elements in the network
T1=[1 R1;0 1];
T2=[1 0; s*C 1];
T3=[1 R2;0 1];
T(k,:,:)=T1*T2*T3; %avoid all the messy algebra
end %end for freq loop
%Save T matrix elements
kf=2:(NF-1); %freq limits; avoid ends
A=T(kf,1,1); B=T(kf,1,2);
C=T(kf,2,1); D=T(kf,2,2);
%compute Z matrix Z1, Z2, Z12
Z1=D./C; Z12=1./C;
Z2=A./C; Z21=12; % Assumes reciprocity

   2https://web.engr.illinois.edu/~jontalle/uploads/403/EvalResp.m

3 Laplace transforms

Given a Laplace transform (L) pair f(t) ↔ F (s), the time domain signal, f(t), is written in a lower case font, while the frequency domain representation F (s) is written in an upper-case font. The definition of the forward L, f(t) → F (s) is

F (s) = ∫_{0^{−}}^{∞} f(t)e^{−st}dt.

Here s = σ + jω is the complex Laplace radian frequency and t is time [s]. Note that the input time function must be causal [f(t < 0) = 0].

Displacement x(t) Mass M  Force f(t) Dash-Pot (resistance) R Spring compliance C

Figure 2: This three element mechanical resonant circuit consisting of a spring, mass and dash-pot (e.g., viscous fluid).

An example: Hooke’s Law for a spring states that the force f(t) is proportional to the displacement x(t), i.e., f(t) = Kx(t). The formula for a dash-pot is f(t) = Rv(t), and Newton’s famous formula for mass is f(t) = d[Mv(t)]/dt, which for constant M is f(t) = Mdv/dt (Newton’s second Law of motion).

The equation of motion for the mechanical oscillator in Fig. 2 is given by Newton’s third law.^{3} Namely, the sum of the reaction forces (those due to the mass, spring, dashpot load impedances) must exactly balance the driving force f(t):

M \frac{d^{2}}{dt^{2}} x(t) + R\frac{d}{dt}x(t) + Kx(t) = f(t).  (4)

These three constants, the mass M > 0, resistance R > 0 and stiffness K > 0 are all real (∈ ℝ), and positive.^{4} The dynamical variables are the driving force f(t) ↔ F (s), the position of the mass x(t) ↔ X(s) and its velocity v(t) ↔ V (s), with v(t) = dx(t)/dt ↔ V (s) = sX(s).

Newton’s second law (1687) is the mechanical equivalent of Kirchhoff’s (1845) voltage law (KCL), which states that the sum of the voltages around a loop must be zero. The gradient of the voltage results in a force on a charge (i.e., F = qE).

Equation 4 may be re-expressed in terms of impedances, the ratio of the force to velocity, once it is transformed into the Laplace frequency domain.

3.1 Impedance

For each of the three mechanical items, the Mass, the dash-pot and the spring, define an impedance [Mechanical Ohms], defined as the ratio of the force f(t) ↔ F (s) [N] over the velocity (v(t) ↔ V (s) = sX(s) [m/s]).

3It is useful to note that Newton’s laws of motion (c1687) are the same as Kirchhoff’s (1845) current and voltage laws of electricity.

4It is non–physical for these to be zero, with the interesting exception of a super-conductors, for which R = 0.

Later we shall learn about low–viscosity Ferric–fluids, widely used in loudspeakers, to concentrate the magnetic flux.

Residue form: Every impedance that can be written as the ratio of two polynomials, may be expressed in residue form, also know as a partial fraction expansion:

Z(s) = Ms + R + ∑_{k=1}^{K} \frac{c_{k}}{s − s_{k}} = Ms + R + \frac{N(s)}{D(s)}.  (5)

The factors N(s), D(s) and the roots s_{k} are known, leading to the following system of linear equations in the unknown residues c_{k}:

[\begin{matrix}D′(s_{1}) & … & \frac{D(s_{1})}{s_{1}−s_{2}} & \frac{D(s_{1})}{s_{1}−s_{K}} \\ \frac{D(s_{2})}{s_{2}−s_{1}} & D′(s_{2}) & … & \frac{D(s_{2})}{s_{2}−s_{K}} \\ ⋮ & ⋮ & ... \\ \frac{D(s_{K})}{s_{k}−s_{1}} & \frac{D(s_{K})}{s_{k}−s_{2}} & … & D′(s_{K}) \end{matrix}] [ c_{1} ; c_{2} ; ⋮ ; c_{K} ] = [ N(s_{1}) ; N(s_{2}) ; ⋮ ; N(s_{K})] .  (6)

Row k of the system of linear equations is obtained by cross-multiplying by D(s) and evaluating at s = s_{k}. The diagional terms must be reduced, by removing the common root s − s_{k}, denoted D′(s_{k}) = lim_{s→s_{k}} D(s_{k})/(s − s_{k}).

Note: The mass M and resistance R terms must be factored out of Z(s) before computing the residues c_{k}, which have a special role in the definition of the impedance and its L^{−1}. This is actually a very subtle point, which will be developed in a later homework.

Matlab/Octave [R,P,K]=resid(N,D) command is very useful in finding the residues, and in verifying that you understand the proceedure.^{5} It may also be used in reverse, to find N(s), D(s) given c_{k}, s_{k}.

To Do:

1. Find the L of the three force relations in terms of the force F (s) and the velocity V(s), along with the electrical equivalent impedance:

(a) Hooke’s Law f(t) = Kx(t).

(b) Dash-pot resistance f(t) = Rv(t).

(c) Newton’s Law for Mass f(t) = Mdv(t)/dt.

2. Take the L of Eq. 4, and find the total impedance Z(s) of the mechanical circuit.

3. What are D(s) and N(s) (Eq. 5) for the LT of Eq. 4

4. Find the roots of D(s)

5. Assuming that M = R = K = 1, find the residue form of the admittance Y (s) = 1/Z(s) (e.g. Eq. 5) in terms of the roots s_{±}. You may check your answer with the Matlab’s residue command.

6. Second form a partial fraction expansion (PFA) of Y (s).

7. By applying the CRT, find the inverse Laplace transform (L^{−1}) of Eq. 5, find the time–domain impedance z(t)

5https://www.mathworks.com/help/matlab/ref/residue.html

4 Transfer functions of a transmission line

In this problem, we will look at the transfer function of the two-port network shown in Fig. 3. We wish to model the dynamics of a freight-train having n = N such cars. The model of the train consists of masses connected by springs.

The velocity transfer function for this system is defined as the ratio of the output to the input velocity. Consider the engine on the left pulling the train at velocity V_{1} and each car responding with a velocity of V_{n}. Then

H(s) = \frac{V_{N}(s)}{V_{1}(s)}

is the frequency domain ratio of the last car having velocity V_{N} to V_{1}, the velocity of the engine, at the left most spring (i.e., coupler).

f_{1}  f_{2}  f_{3}  f_{4} v_{2}  v_{3}  v_{4} v_{1} ^{\frac{1}{2}M}  ^{\frac{1}{2}M}^{C}

Figure 3: Depiction of a train consisting of cars, treated as a mass M and linkages, treated as springs of stiffness K or compliance C = 1/K. Below it is the electrical equivalent circuit, for comparison. The mass is modeled as an inductor and the springs as capacitors to ground. The velocity is analogous to a current and the force f_{n}(t) to the voltage v_{n}(t).

At each node define the force f_{n}(t) ↔ F_{n}(ω) and the velocity v_{n}(t) ↔ V_{n}(ω) at junction n. Use the ABCD method to find the matrix representation of Fig. 3. Consistent with the figure, break the model into cells each consisting of three elements: a series inductor representing half the mass (L = M/2), a shunt capacitor representing the spring (C = 1/K), and another series inductor representing half the mass (L = M/2). The model a cascade of identical cells where each cell is spatially symmetric.

To do:

1. Write the ABCD matrix T for a single cell, composed of series mass M/2, shunt compliance C and series mass M/2, that relates the input node 1 to node 2 where

[\begin{matrix}F_{1} \\ V_{1} \end{matrix}] = T [\begin{matrix}F_{2}(ω) \\ −V_{2}(ω) \end{matrix}]

2. To start let N = 2 and F_{2} = 0 (two mass problem). Find the velocity transfer function

H_{21}(s) = \frac{V_{2}}{V_{1}} |_{F_{2}=0} .

3. Find h_{21}(t), the inverse Laplace transform of H_{21}(s).

4. What is the input impedance Z_{2} = F_{2}/V_{2} if F_{3} = −r_{0}V_{3}?

5. Simplify the expression for Z_{2} with N → ∞ by assuming that high-frequency (second order terms) may be ignored s^{2}MC << 1:

6. Finally assume that r_{0} = \sqrt{M/C}.

7. Summarize these findings in words.

8. State the ABCD matrix relationship between the first and Nth node, in terms of of the cell matrix.

9. Given a T (ABCD) transmission matrix, the eigenvalues are and vectors are given in Appendix C of the Notes (p. 143), repeated here.

Eigenvalues:

[\begin{matrix}λ_{+} \\ λ_{−} \end{matrix}] = \frac{1}{2} [\begin{matrix}(A + D) − \sqrt{(A − D)^{2} + 4BC} \\ (A + D) + \sqrt{(A − D)^{2} + 4BC} \end{matrix}]

Due to symmetry, A = D, this simplifies to λ_{±} = A ∓ \sqrt{BC} so that the eigen matrix is

Λ = [\begin{matrix}A − \sqrt{BC} & 0 \\ 0 & A + \sqrt{BC} \end{matrix}]

Eigenvectors: The eigenvectors simplifying even more

[E_{±}] = [\begin{matrix}\frac{1}{2C} & [(A − D) ∓ \sqrt{(A − D)^{2} + 4BC}] \\ & 1 \end{matrix}] = [\begin{matrix}∓\sqrt{\frac{B}{C}} \\ 1 \end{matrix} ]

Eigen-matrix:

E = [\begin{matrix}−\sqrt{\frac{B}{C}} & +\sqrt{\frac{B}{C}} \\ 1 & 1 \end{matrix} ] , E^{−1} = \frac{1}{2} [\begin{matrix}−\sqrt{\frac{C}{B}} & 1 \\ +\sqrt{\frac{C}{B}} & 1 \end{matrix}]

There are two important invariants for the transmission lines, the wave number k = \sqrt{BC} = s/c and the characteristic resistance r_{o} = \sqrt{B/C}.

Transfer functions of the transmission line: The velocity transfer function H_{N,1} = \frac{V_{N}}{V_{1}} is given by