Exercise 30

As with all of the exercises you will complete in this course, you will be expected to turn your *.nb file in to the course TA before the next lecture.  Please do so by e-mailing your completed exercise file to Lan Yu (ece329.uiuc@gmail.com), make sure you name the file using the following notation: “Exn_Last_First.nb”, where n is the Exercise number (in this case, 30), and First and Last would be your first and last name.  So my submission to Lan for this exercise would be titled “Ex30_Wasserman_Dan.nb”.  You will receive full credit for your exercise if it turned in before the next lecture (Lecture n+1).  No late submissions will be accepted.

Objective/Overview:

Today in class we discussed the impulse response of multi-transmission lines with source and load resistors.  This required a slight change to our bounce diagrams, since we now have multiple segments of tranmission lines. Ultimately, the physics of the systems doesn’t change much, we just have to be much more careful in our accounting.  In the first part of today’s exercise we are going to animate these multi-segment transmission lines.  Hopefully we can get through this quickly, because I would like to spend the majority of the Exercise looking at harmonic waves on TL circuits, which is going to be incredibly important for the next few weeks.

Multi-Segment Transmission Lines

As you have probably surmised from Lecture, these multi-segment TLs can get pretty tricky pretty quickly if we do not have an impedence-matched load resistance.  This is because signals can be back-reflected at the load, and then can go back into earlier segments of the TL.  Because of this, we generally consider systems where the Load is impedance matched to the last segment of the TL system: (Subscript[Z, 2])=(Subscript[R, L]). Even then, things can get tricky.  For the following, let’s assume our signal f(t)=t*rect(t/1μs), and (Subscript[Z, 2])=(Subscript[R, L]).  The inputs into our function are then going to be (Subscript[R, g]), (Subscript[v, 1]), (Subscript[Z, 1]), (Subscript[v, 2]), (Subscript[Z, 2]), (Subscript[l, 1]), and  (Subscript[l, 2]) .

Let’s steal from our previous class exercise to get the basic framework and adjust from there... 
We need to make sure we write the expression for our f(t) correctly.  In time, the function starts at t=-0.5μs with a value of -1, it then increases linearly for 1μs and ends with a value of +1.  On the line, this will look like a pulse that is injected at  t=-0.5μs with a negative leading edge.
Let’s start with the first propagation to the end of the line

vmulti[v1_,z1_,v2_,z2_,rG_,tlL1_,tlL2_,n_]:=(tauG1=z1/(z1+rG);
gam12=(z2-z1)/(z1+z2);gamG1=(rG-z1)/(rG+z1);tau12=gam12+1;tlL=tlL1+tlL2;
vmulti1=-tauG1*((t-z/v1)*(HeavisideTheta[t-0.5-z/v1]-HeavisideTheta[t+0.5-z/v1])+gam12*(t+z/v1-2*tlL1/v1)*(HeavisideTheta[t-0.5+z/v1-2*tlL1/v1]-HeavisideTheta[t+0.5+z/v1-2*tlL1/v1]));
vmulti2=-tauG1*tau12*((t-(z-tlL1)/v2-tlL1/v1)*(HeavisideTheta[t-0.5-(z-tlL1)/v2-tlL1/v1]-HeavisideTheta[t+0.5-(z-tlL1)/v2-tlL1/v1]));
Animate[{Plot[vmulti1/.{t->to},{z,0,tlL1}, PlotRange->{-1,1}],Plot[vmulti2/.{t->to},{z,tlL1,tlL}, PlotRange->{-1,1}]},{to,0,2*tlL1/v1},AnimationRepetitions->1, AnimationRate->1])

vmulti[150,50,300,75,25,1200,1200,1]

I plotted the two segments of the line seperately here, but you could use an If statement in vmulti1 and vmulti2 to determine the region of interest...
Let’s try this first, and then add some more bounces...

vmultia[v1_,z1_,v2_,z2_,rG_,tlL1_,tlL2_,n_]:=(tauG1=z1/(z1+rG);
gam12=(z2-z1)/(z1+z2);gamG1=(rG-z1)/(rG+z1);tau12=gam12+1;tlL=tlL1+tlL2;
vmulti1=If[0<z<tlL1,-tauG1*((t-z/v1)*(HeavisideTheta[t-0.5-z/v1]-HeavisideTheta[t+0.5-z/v1])+gam12*(t+z/v1-2*tlL1/v1)*(HeavisideTheta[t-0.5+z/v1-2*tlL1/v1]-HeavisideTheta[t+0.5+z/v1-2*tlL1/v1])),0];
vmulti2=If[tlL1<z<tlL,-tauG1*tau12*((t-(z-tlL1)/v2-tlL1/v1)*(HeavisideTheta[t-0.5-(z-tlL1)/v2-tlL1/v1]-HeavisideTheta[t+0.5-(z-tlL1)/v2-tlL1/v1])),0];
Animate[Plot[{vmulti1+vmulti2}/.{t->to},{z,0,tlL}, PlotRange->{-1,1},PlotLabel->{tauG1,tau12,gam12,to}],{to,0,2*tlL1/v1},AnimationRepetitions->1, AnimationRate->2])

vmultia[150,50,300,100,25,1200,1200,1]

Now modify your code to add multiple bounces...You will probably want to use the Sum command we used in earlier exercises...just beware, because your order of operations should be If[Sum[...]].

vmultib[v1_,z1_,v2_,z2_,rG_,tlL1_,tlL2_,n_]:=(tauG1=z1/(z1+rG);
gam12=(z2-z1)/(z1+z2);gamG1=(rG-z1)/(rG+z1);tau12=gam12+1;tlL=tlL1+tlL2;
vmulti1=If[0<z<tlL1,Sum[,{i,0,n}],0];
vmulti2=If[tlL1<z<tlL,Sum[,{i,0,n}],0];
Animate[Plot[{vmulti1+vmulti2}/.{t->to},{z,0,tlL}, PlotRange->{-.5,.5},PlotLabel->{tauG1,gam12,tau12,gamG1, to}],{to,0,2*(n+1)*tlL1/v1},AnimationRepetitions->1, AnimationRate->3])

vmultib[150,50,300,100,25,1200,1200,2]

Harmonic WaveForms

What happens if we go back to our single-element TL system and launch a harmonic wave on the TL?  So we are looking at the system below, with f(t)=HeavisideTheta(t)*Sin(ωt).


Let’s start by plotting just the first bounce of our TL.  We can take the code you wrote before, and easily adapt it...and we don’t even have to worry about the second line, so it should be pretty straightforward.  Our inputs will be v (velocity), (Subscript[Z, o]) (TL characteristic impedance), (Subscript[R, L]), (Subscript[R, g]), tlLo, and ω:

vharm[v_,zo_,rG_,rL_,tlLo_,omega_]:=(tauG1=zo/(zo+rG);
gamG1=(rG-zo)/(rG+zo);gamL1=(rL-zo)/(rL+zo);
vharm1=tauG1*((1-HeavisideTheta[z-v*t])*Sin[omega*(t-z/v)]+gamL1*HeavisideTheta[z+v*t-2*tlLo]*Sin[omega*(t+z/v-tlLo/v)]);
Animate[Plot[vharm1/.{t->to},{z,0,tlLo}, PlotRange->{-2,2},PlotLabel->{tauG1,gamL1,gamG1, to}],{to,0,2*tlLo/v},AnimationRepetitions->1, AnimationRate->1])

vharm[300,50,25,0,1200,5]

Now add multiple reflections

vharmn[v_,zo_,rG_,rL_,tlLo_,omega_,n_]:=(tauG1=zo/(zo+rG);
gamG1=(rG-zo)/(rG+zo);gamL1=(rL-zo)/(rL+zo);
vharm2=Sum[If[i==0,,],{i,0,n}];
Animate[Plot[vharm2/.{t->to},{z,0,tlLo}, PlotRange->{-2,2},PlotLabel->{tauG1,gamL1,gamG1, to}],{to,0,2*n*tlLo/v},AnimationRepetitions->1, AnimationRate->1])

vharmn[300,50,100,100,1200,5,3]