Computer Lab 12: Lecture 35

In our computer lab lectures we will work together through concepts and challanges we have discussed over the week in class.  As with your after-class Exercises, you will be expected to turn in your computer lab notebooks before the nect lecture. Please do so by e-mailing your completed *nb 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 Lecture number (in this case, 35), and First and Last would be your first and last name.  So my submission to Lan for this computer lab would be titled “Ex35_Wasserman_Dan.nb”.  You will receive full credit for your computer lab if it turned in before the next lecture (Lecture n+1).  No late submissions will be accepted.

Objective/Overview:

Our last lecture introduced the concept of the Smith Chart, and in the following exercise, we showed that we could solve simple TL problems using either an analytical approach or graphically, using a Smith Chart.  Today we are going to continue with our development of the Smith Chart, and will start to tackle more complicated Smith Chart problems.

Overview

In our previous lecture we decided we could write the voltage and current on a TL as a combination of forward and backward propagating waves:
V(d)=(SuperPlus[V])(e^(jβd))(1+(Subscript[Γ, L])(e^(-2jβd))) and I(d)=(((SuperPlus[V])/(Subscript[Z, o])))(SuperPlus[V])(e^(jβd))(1-(Subscript[Γ, L])(e^(-2jβd)))
where Γ(d)=(Subscript[Γ, L])(e^(-2jβd)) is the Generalized Reflection Coefficient, where |(Subscript[Γ, L])|=|Γ(d)|
The line impedance of our TL is then just the ratio of V and I at any point on the line Z(d)=V(d)/I(d), and we define the normalized line impedance as
z=((Z(d))/(Subscript[Z, o]))=((1+Γ(d))/(1-Γ(d)))
We can go in the other direction, and define our generalized reflection coefficient in terms of z(d):
Γ(d)=((Z(d)-(Subscript[Z, o]))/(Z(d)+(Subscript[Z, o])))=((z(d)-1)/(z(d)+1))
the line admittance is simply the inverse of the impedance
y=((Subscript[Z, o])/(Z(d)))=(1/z)=((1-Γ(d))/(1+Γ(d)))=((1+(-Γ(d)))/(1-(-Γ(d))))
What does this mean?  Why do we care?
Well, if you know z(d) at one point d on your TL, then you can basically find z,Γ at any point on your TL with a Smith Chart. A logical extension of that is that you can replace the entire TL with an input z, simplifying how you model and understand a TL segment in a larger circuit.

Let’s load up our Smith Chart from the previous exercise:

p1=Graphics[Table[Circle[{r/(r+1),0},(1/(r+1))],{r,{0,.25,.5,1,2,5}}]];
p2=Graphics[Table[Circle[{1,1/x},Abs[1/x]],{x,{5,2,1,.5,.25,.001,-5,-2,-1,-.5,-.25,-.001}}]];
smith1=Show[p1,p2, Axes->True ,AxesLabel-> {(Subscript[Γ, r]),(Subscript[Γ, i])},PlotRange->{{-1,1},{-1,1}}]

Example 1

Suppose we have a TL with (Subscript[Z, L])=100+j50Ω, (Subscript[Z, o])=50Ω, let’s write a program that calculates (Subscript[Z, IN]), (Subscript[Y, IN]) for any TL length “tlL”.
Like we did in the exercise, we can write a program that takes in (Subscript[Z, L]), (Subscript[Z, o]) and outputs an impedance for any distance “d” from the load.  Since we will use this as the basis for the rest of the class, let’s make sure we understand what we are doing step by step.
We are going to write this as a function

smith2[zo_,zL_,d_]:=(
zLn=zL/zo;(*This is our normalized load impedance*)
gamL=(zL-zo)/(zL+zo); (*This is our load reflection coefficient*)
(*Both of the above describe the SAME point on our Smith Chart, it's just that one is in ((Subscript[Γ, r]),(Subscript[Γ, i])) coordinates, the other in (r,x) *)
p3=Graphics[{Red,Circle[{0,0},Abs[gamL]]}];  (*This plots the \[LeftBracketingBar](Subscript[Γ, L])\[RightBracketingBar] circle in complex space *)
p4=Graphics[{PointSize[Large],Red,Point[{Re[gamL],Im[gamL]}]}]; (*Because MMA plots in cartesian coords, we use ((Subscript[Γ, r]),(Subscript[Γ, i])) to plot our (Subscript[Γ, L]) on the Smith Chart *)
gamd= gamL*Exp[-2*I*2*Pi*d];  (*This gives us the generalized reflection coefficient at any point d on our TL, and corresponds to a rotation around the \[LeftBracketingBar](Subscript[Γ, L])\[RightBracketingBar] circle in complex space, clockwise, of 2βd=4πd/λ *)
zd=(1+gamd)/(1-gamd);  (*This is the normalized impedance at position d *)
yd=1/zd; (*This is the normalized admittance at position d *)
p5=Graphics[{PointSize[Large],Blue,Point[{Re[gamd],Im[gamd]}]}];  (*This plots the point corresponding to our normalized impedance at point d on our TL*)
p6=Graphics[{PointSize[Large],Green,Point[{Re[-gamd],Im[-gamd]}]}];  (*And this is our normalized admittance*)
Show[p1,p2,p3,p4,p5,p6, Axes->True, AxesLabel-> {(Subscript[Γ, r]),(Subscript[Γ, i])},PlotRange->{{-1,1},{-1,1}}, PlotLabel->{"zL=",zLn, "zd=",zd,"yd=",yd}])

smith2[50,100+I*50,.125]

What if we have a shunt resistor (Subscript[R, s])=100Ω at the input of our TL, at d=0.4λ?  How do we find the total input impedance of the TL?


As the figure above shows, once we have ‘compressed’ our TL so that it can be described by an input impedance, we can treat the combination of our TL and shunt resistor simply as parallel impedances.
So we can easily find the total (shunt + TL) impedance of the system:

zshunt1n=100/50;  (*normalized shunt imnpedance*)
yshunt1n=1/zshunt1n;  (*normalized shunt admittance*)

smith2[50,100+I*50,.4]

ytotn=0.749913-0.8291*I+yshunt1n  (*total admittance of system is sum of parallel admittances*)

ztotn=1/ytotn  (*total normalized impedance is inverse of total normalized admittance *)

ztot=ztotn*50  (*total impedance is simple (Subscript[Z, o])*ztot*)

ytot=1/ztot  (*total admittance is inverse of total impedance *)

It is probably worth noting, at this point, that the Smith Chart is a graphical tool for describing very real effects.  Remember, we can write our Voltage on the line as V(d)=(SuperPlus[V])(e^(jβd))(1+(Subscript[Γ, L])(e^(-2jβd))).  If we know (Subscript[Γ, L]) then we can actually plot the Voltage on the line.  If we know (Subscript[Z, o]), then we can also plot current.  Let’s assume (SuperPlus[V])=1V, and that we input our d in terms of wavelengths, so that d=1/2 would mean d=λ/2.  To animate, we need to know ω and v, so let’s assume that v=c=300m/μs, and ω=2π Mrad/s.

vplot[zo_,zL_,lTL_]:=(
gamL=(zL-zo)/(zL+zo); (*This is our load reflection coefficient*)
vphas=Exp[I*2*Pi*d]*(1+gamL*Exp[-I*4*Pi*d]);(*This is our voltage phasor expression*)
vzt=Re[vphas*Exp[I*2*Pi*t]];
Animate[Plot[vzt/.{t->to},{d,0,lTL}, PlotRange->{-2,2}],{to,0,4},AnimationRepetitions->1, AnimationRate->.1])

vplot[50,50+50*I,.25]

iplot[zo_,zL_,lTL_]:=(
gamL=(zL-zo)/(zL+zo); (*This is our load reflection coefficient*)
iphas=(1/zo)*Exp[I*2*Pi*d]*(1-gamL*Exp[-I*4*Pi*d]);(*This is our current phasor expression*)
izt=Re[iphas*Exp[I*2*Pi*t]];
Animate[Plot[izt/.{t->to},{d,0,lTL}, PlotRange->{-2/zo,2/zo}],{to,0,4},AnimationRepetitions->1, AnimationRate->.5])

iplot[50,50+I*50,.5]

Example 2

Suppose we have the same TL with (Subscript[Z, L])=100+j50Ω, (Subscript[Z, o])=50Ω, and (Subscript[Z, S])=100Ω, and we attach this to a circuit with a harmonic voltage source and a source impedance (Subscript[Z, g])=25Ω.  Can we calculate the Power dissipated in the shunt (Subscript[⟨P⟩, S]) and load (Subscript[⟨P⟩, L]) if (Subscript[V, g])=100∠0V?

zg=25

We know that the total input impedance/admittance of the TL +Shunt is given by

yinshunttl=ytot

zinshunttl=ztot

Adding the source impedance gives us a voltage divider, and allows us to calculate the (Subscript[V, IN ]) as:

vinshunttl=100*zinshunttl/(zinshunttl+zg)

The current into the TL+Shunt is simply (Subscript[V, IN])/(Subscript[Z, IN])

iinshunttl=vinshunttl/zinshunttl

So the time averaged power is

pinshunttl=0.5*Re[vinshunttl*Conjugate[iinshunttl]]

If we know the voltage at the shunt, and of course we know the shunt impedance ((Subscript[Z, S])=100Ω), then we can calculate the power dropped over the shunt

ishunt=vinshunttl/100

pshunt=0.5*Re[vinshunttl*Conjugate[ishunt]]

So the remainder of our power must be dropping over the load

pload1=pinshunttl-pshunt

Alternatively, we can calculate the current into the TL, knowing that the input impedance of the TL without the shunt is (Subscript[z, in])=0.6+j0.66

itl=vinshunttl/(50*(0.6+0.6634*I))

ptl=0.5*Re[vinshunttl*Conjugate[itl]]

Ta-da!!!

Example 3

Suppose we have a TL with (Subscript[Z, IN])=50+j50Ω, (Subscript[Z, o])=50Ω, and l=0.3λ.  Can we adjust our code above to find (Subscript[Z, L])?  


Remember, if we know ANY impedance on a TL, we can move to any other position on the TL. We just have to remember that if we are moving TOWARDS to load, we are rotating now in the COUNTER-CLOCKWISE direction...

smith3[zo_,zIN_,d_]:=(
zINn=zIN/zo;(*This is our normalized input impedance*)
gamIN=(zIN-zo)/(zIN+zo); (*This is our input reflection coefficient*)
(*Both of the above describe the SAME point on our Smith Chart, it's just that one is in ((Subscript[Γ, r]),(Subscript[Γ, i])) coordinates, the other in (r,x) *)
p3=Graphics[{Red,Circle[{0,0},Abs[gamIN]]}];  (*This plots the \[LeftBracketingBar](Subscript[Γ, IN])\[RightBracketingBar] circle in complex space *)
p4=Graphics[{PointSize[Large],Red,Point[{Re[gamIN],Im[gamIN]}]}]; (*Because MMA plots in cartesian coords, we use ((Subscript[Γ, r]),(Subscript[Γ, i])) to plot our (Subscript[Γ, L]) on the Smith Chart *)
gamL= gamIN*Exp[2*I*2*Pi*d];  (*This gives us the reflection coefficient at our load, and corresponds to a COUNTER-CLOCKWISE rotation around the \[LeftBracketingBar](Subscript[Γ, IN])\[RightBracketingBar] circle in complex space, of 2βd=4πd/λ *)
zl=(1+gamL)/(1-gamL);  (*This is the normalized impedance at position d *)
yl=1/zl; (*This is the normalized admittance at position d *)
p5=Graphics[{PointSize[Large],Blue,Point[{Re[gamL],Im[gamL]}]}];  (*This plots the point corresponding to our normalized impedance at point d on our TL*)
p6=Graphics[{PointSize[Large],Green,Point[{Re[-gamL],Im[-gamL]}]}];  (*And this is our normalized admittance*)
Show[p1,p2,p3,p4,p5,p6, Axes->True, AxesLabel-> {(Subscript[Γ, r]),(Subscript[Γ, i])},PlotRange->{{-1,1},{-1,1}}, PlotLabel->{ "zin=",zIN,"zL=",zl*zo,"yl=",yl/zo}])

smith3[50,50+I*50,0.3]

Example 4

Now it’s your turn.  Suppose we have the following TL system, can we find (Subscript[Z, IN])?  


I know, it looks complicated, but really it’s pretty straightforward.  You already have all the tools you need.
Try to use our smith2 and smith3 functions as a framework.  You will need to divide the problem into three parts:
1) Calculate the impedance/admittance of the first portion of TL1 at d=0.2λ, and 
2) the impedance/admittance of the TL2 at d=0.3λ, where it is connected to TL1
3)  These should combine to give a total “load” impedance for the last portion of TL1.  So you can use this to calculate (Subscript[Z, IN])
Make sure you plot each step on the same Smith Chart.

smith4[zo_,gL1_,gL2_,l1_,l2_,l3_]:=(
p3=Graphics[{Red,Circle[{0,0},Abs[gL1]]}];  (*This plots the \[LeftBracketingBar](Subscript[Γ, L1])\[RightBracketingBar] circle in complex space *)
p4=Graphics[{PointSize[Medium],Red,Point[{Re[gL1],Im[gL1]}]}]; (*Because MMA plots in cartesian coords, we use ((Subscript[Γ, r]),(Subscript[Γ, i])) to plot our (Subscript[Γ, L1]) circle on the Smith Chart *)
gd1=;  (*This gives us the generalized reflection coefficient at point d=l1 on our TL1, and corresponds to a rotation around the \[LeftBracketingBar](Subscript[Γ, L1])\[RightBracketingBar] circle in complex space, clockwise, of 2βd=4πl1/λ *)
p5=Graphics[{PointSize[Large],Red,Point[{Re[gd1],Im[gd1]}]}]; (*after rotation on \[LeftBracketingBar](Subscript[Γ, L1])\[RightBracketingBar] circle *)
zd1=;  (*This is the normalized impedance at position d=l1 *)
yd1=; (*This is the normalized admittance at position d=l1 *)
p6=Graphics[{Blue,Circle[{0,0},Abs[gL2]]}];  (*This plots the \[LeftBracketingBar](Subscript[Γ, L1])\[RightBracketingBar] circle in complex space *)
p7=Graphics[{PointSize[Medium],Blue,Point[{Re[gL2],Im[gL2]}]}]; (*Because MMA plots in cartesian coords, we use ((Subscript[Γ, r]),(Subscript[Γ, i])) to plot our (Subscript[Γ, L2]) circle on the Smith Chart *)
gd2= ;  (*This gives us the generalized reflection coefficient at point d=l2 on our TL2, and corresponds to a rotation around the \[LeftBracketingBar](Subscript[Γ, L2])\[RightBracketingBar] circle in complex space, clockwise, of 2βd=4πl2/λ *)
zd2=;  (*This is the normalized impedance at position d=l2 on TL2*)
yd2=; (*This is the normalized admittance at position d=l2 on TL2 *)
yL3=; (*The input admittances of TL1 and TL2 add, since the TLs are in parallel*)
zL3=;  (*This is the total impedance of the TL1 and TL3 TLs, and serves as the Load Impedance for TL3*)
gL3=; (*Load reflection coefficient for TL3, consisting of combined impedances of TL's 1 and 2*)
p8=Graphics[{Green,Circle[{0,0},Abs[gL3]]}];  (*This plots the \[LeftBracketingBar](Subscript[Γ, L3])\[RightBracketingBar] circle in complex space *)
p9=Graphics[{PointSize[Medium],Green,Point[{Re[gL3],Im[gL3]}]}]; 
gd3= ;  (*This gives us the generalized reflection coefficient at point d=l3 on our TL3, and corresponds to a rotation around the \[LeftBracketingBar](Subscript[Γ, L3])\[RightBracketingBar] circle in complex space, clockwise, of 2βd=4πl3/λ *)
p10=Graphics[{PointSize[Large],Green,Point[{Re[gd3],Im[gd3]}]}];  (*This plots the point corresponding to our normalized impedance at point d on our TL3*)
p11=Graphics[{PointSize[Large],Green,Point[{Re[-gd3],Im[-gd3]}]}];  (*And this is our normalized admittance*)
zd3=;  (*This is the normalized impedance at position d=l3 on TL3, this is our INPUT IMPEDANCE*)
yd3=; (*This is the normalized admittance at position d=l3 on TL3 *)
Show[p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11, Axes->True, AxesLabel-> {(Subscript[Γ, r]),(Subscript[Γ, i])},PlotRange->{{-1,1},{-1,1}}, PlotLabel->{"zd1=",zd1,"zd2=",zd2, "zL3=",zL3,"zIN=",zd3,"yIN=",yd3}])

smith4[]

Your final answer should be:
(Subscript[z, IN])=3.38-j*0.69
(Subscript[Z, IN])=169-j*34.4