## Transmission line

Let's look at a system with really a lot of states. In this example there will be sixty-four states.

We can do this either in the mechanical domain or the electrical domain. In the mechanical domain it's a chain of springs and masses. Each spring contributes a state which is a displacement, and each mass contributes a state which is a velocity.

In the electrical domain it's a chain of inductors and capacitors. Each capacitor contributes a state that is a voltage, and each inductor contributes a state that is a current.

Nobody builds things like this! We're studying them because its a pretty good approximation to a continuous medium, known as a transmission line. The coaxial cable that TV uses is a transmission line. Here is a little bit of the end of that coaxial cable blown up and labelled:

Every infinitesimal length dl of coax cable has some inductance, and every dl has some capacitance to ground. The wire in the center is a continuous inductor, while the insulation material in between the wire and the ground is a continuous capacitor around the inductor. Although we can't model a continuous distribution of capacitance and inductance, we can make a lumped parameter approximation to it, by considering it to be an series of discrete capacitors and inductors. Hence, the series of inductors and capacitors above is representative of this coaxial cable. (There are ways to analyze continuous systems, we just won't do it in this course).

• To what continuous physical system does the chain of springs and masses correspond? Hint: every bit of it is a little stretchy and a little massive. answer
We'll choose as our state variables the currents through the inductors ik (which we could also label more precisely as iLk) and the voltages across the capacitors Vk. Note that the V1, V2, .... Vk in the figure are absolute potentials - voltages measured relative to ground. Thus, the voltage measured at a point (that, is, relative to ground) is also the voltage across the capacitor ... the common bottom line in the figure is ground. Note also that we have not labelled explicitly VL2 for example, which is the voltage across inductor L2.

Look at, for instance, inductor L2. The current in it is i2 and the voltage across it is V1-V2. So its constitutive law gives us our first state equation
 i'2 = (V1-V2) / L2 (2)
Now look at the node in between L2 and L3 - the node/junction rule (KCL) tells us that

i2 = i3 + iC2

Thus, charge accumulates in capacitor 2 according to
 q'2 = iC2 = i2 - i3 (3)
Since VC2 = V2, the constitutive law for the capacitor (V'C=q'C/C) and (3) give us a state equation:
 V'2 = ( i2 - i3) / C2 (4)
Generalizing to the other inductors and capacitors, our state equations are
 i'k= (Vk-1 - Vk) / Lk , for k = 1 ... 32 where we understand V0 will be dictated by an input that we impose V'k = (Ik - Ik+1) / Ck , for k = 1 ... 32 where we understand I33 = 0, since no current can go out the end

I've done the hard work on this one: the Matlab program tline.m (which calls idot.m and vdot.m) computes the solution to the state equations. This program was a little tricky, first because I has some trouble getting my apostrophes (') in the right places (for matrix transpose), and second because I have 64 states and the Student version of Matlab (which I was using last year) allows a matrix dimension of only 32. So I split my states up, with all the voltages in a matrix voltage(32,150) and all the currents in a matrix current(32,150). (150 is the number of time steps)

For input, I used a voltage V0 of 1.0 for the first 8 time steps, and zero thereafter. This is like putting a "pulse" into the transmission line.

This is mesh(voltage) with view(-45, 65), axis([0 32 0 125 0 1.5]). The 'lump' axis designates which capacitor, #1...32, we are looking at. Time is measured in steps, each corresponding to dt=0.5. The vertical axis is the voltage across a capacitor at that time.

Look at lump #1. The voltage rises immediately at t=0. Instead of a sharp square-topped pulse 8 steps wide, we see a rounded pulse. You can try widening the input pulse if you want to see it flat on top. The pulse propagates largely unchanged in shape down the line. When it reaches the far end (lump #32) it reflects and comes back. Note that the last capacitor is attached to ground: this means that capacitor 32 charges up when the voltage pulse comes through, then the current reverses and the capacitor discharges sending another positive voltage pulse back down the line towards the start. (In the next section, we will explore what happens when the pulse reaches the beginning of the line!)

Below I've plotted two cross sections through the data above, for capacitor #3 (yellow) and #23 (purple): plot(time, voltage(:,3), time, voltage(:,23)). This kind of plot is useful for timing how fast the pulse is progressing along the transmission line: you can easily see how many seconds elapsed between when the pulse arrived at capacitor #3 and when it arrived at capacitor #23. Notice that the time axis here is in seconds, whereas in the graph above it was in time steps (each 0.5 seconds)

The final figure (below) shows a different cross-section through the 3-d plot above. In this one the horizontal axis is the lump # (which capacitor), while the vertical axis is voltage (cyan 'o') or current (magenta '+'). This is an animated gif, sweeping along the time axis over the course of a few seconds.

You can look at a moving plot like the one below in Matlab, with a display program that makes one graph after another in quick succession:

```
for (i=1:120)```
```plot(1:32, voltage(i,:), 'co', 1:32, current(i,:), 'm+');
axis([0, 32, -2, 2]);
ylabel(int2str(i));```
`end`

Be sure you fully understand the relationship of these figures to one another.

• Why does the the voltage-vs-time curve have two peaks on each curve, while the voltage-vs.-lump animated graph has only one? answer

• Why is it better to measure the speed of the pulse in the voltage-vs-time curve than the voltage-vs.-lump ? answer

• Why is it difficult to measure pulse speed in the mesh plot? answer
While we're at it, here are two more cool ways to visualize the same 3-d dataset. As a contour plot with contour(voltage). Or as a pseudocolor plot, with pcolor(voltage)