Renormalizing S-parameters

This example demonstrates how to use skrf to renormalize a Network’s s-parameters to new port impedances. Although trivial, this example creates a matched load in 50ohms and then re-normalizes to a 25ohm environment, producing a reflection coefficient of 1/3.

Ok lets do it

[1]:
import skrf as rf
%matplotlib inline
from pylab import *
rf.stylely()


# this is just for plotting junk
kw = dict(draw_labels=True, marker = 'o', markersize = 10)
/home/docs/checkouts/readthedocs.org/user_builds/scikit-rf/conda/latest/lib/python3.5/site-packages/matplotlib/style/core.py:51: UserWarning: Style includes a parameter, 'interactive', that is not related to style.  Ignoring
  "to style.  Ignoring".format(key))

Create a one-port ideal match Network, (using the premade media class wr10 as a dummy)

[2]:
match_at_50 = rf.wr10.match()

Note that the z0 for this Network defaults to a constant 50ohm

[3]:
match_at_50
[3]:
1-Port Network: '',  75.0-110.0 GHz, 1001 pts, z0=[50.+0.j]

Plotting its reflection coefficient on the smith chart, shows its a match

[4]:
match_at_50.plot_s_smith(**kw)
../../_images/examples_networktheory_Renormalizing_S-parameters_9_0.png

Now, renormalize the port impedance from 50 -> 25, thus the previous 50ohm load now produces a reflection coefficient of

\[\Gamma^{'} = \frac{50-25}{50+25} = \frac{25}{75} = .333\]

Plotting the renormalized response on the Smith Chart

[5]:
match_at_50.renormalize(25)
match_at_50.plot_s_smith(**kw)
../../_images/examples_networktheory_Renormalizing_S-parameters_11_0.png

You could also renormalize to a complex port impedance if you’re crazy

[6]:
match_at_50 = rf.wr10.match()
match_at_50.renormalize(50j)
match_at_50.plot_s_smith(**kw)
../../_images/examples_networktheory_Renormalizing_S-parameters_13_0.png

Complex Impedances

[7]:
minusj_at_50 = rf.wr10.load(-1j, z0 = 50)
minusj_at_50.renormalize(20+20j)
minusj_at_50.plot_s_smith(r=2,**kw)

../../_images/examples_networktheory_Renormalizing_S-parameters_15_0.png
[8]:
Zl= 1j
z0_imag,z0_real  = mgrid[-1:1:101j,-1:1:101j]
z0 = z0_real + 1j*z0_imag
s = (Zl+z0)/(Zl-z0)
/home/docs/checkouts/readthedocs.org/user_builds/scikit-rf/conda/latest/lib/python3.5/site-packages/ipykernel_launcher.py:4: RuntimeWarning: divide by zero encountered in true_divide
  after removing the cwd from sys.path.
/home/docs/checkouts/readthedocs.org/user_builds/scikit-rf/conda/latest/lib/python3.5/site-packages/ipykernel_launcher.py:4: RuntimeWarning: invalid value encountered in true_divide
  after removing the cwd from sys.path.