Debian Codegraph @

doc/source/examples/interactive/Interact Transmission Lines.ipynb

raw
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Interactive Matching System\n",
8 "This example illustrate a matching system made of an open stub in series with a delay load. The length of both transmission lines can be tuned, with a direct view of the resulting Smith chart. "
9 ]
10 },
11 {
12 "cell_type": "code",
13 "execution_count": null,
14 "metadata": {},
15 "outputs": [],
16 "source": [
17 "%matplotlib inline\n",
18 "\n",
19 "import matplotlib.pyplot as plt\n",
20 "from ipywidgets import interact\n",
21 "\n",
22 "import skrf as rf\n",
23 "from skrf import Frequency\n",
24 "from skrf.media import DistributedCircuit\n",
25 "\n",
26 "rf.stylely()\n",
27 "# define a frequency object\n",
28 "freq = Frequency(0.01, 10, 201, 'GHz')\n",
29 "\n",
30 "# create a Media object for RG-58, based on distributed ckt values\n",
31 "rg58 = DistributedCircuit(frequency = freq,\n",
32 " C =93.5e-12,#F/m\n",
33 " I =273e-9, #H/m\n",
34 " R =0,#53e-3, #Ohm/m\n",
35 " G =0, #S/m\n",
36 " z0_port = 50\n",
37 " )\n",
38 "\n",
39 "\n",
40 "load = rg58.load(.5)\n",
41 "def func(d1=180, d2=180):\n",
42 " l1 = rg58.line(d=d1, unit='deg')\n",
43 " l2 = rg58.shunt_delay_open(d=d2, unit='deg')\n",
44 " ntwk = l2**l1**load\n",
45 " ntwk.plot_s_smith(0,0)\n",
46 " plt.draw()\n",
47 " plt.show()\n",
48 "\n",
49 "a=interact(func, d1= (0,360,10),d2= (0,360,10),embed=True);"
50 ]
51 },
52 {
53 "cell_type": "code",
54 "execution_count": null,
55 "metadata": {},
56 "outputs": [],
57 "source": []
58 }
59 ],
60 "metadata": {
61 "anaconda-cloud": {},
62 "kernelspec": {
63 "display_name": "Python 3 (ipykernel)",
64 "language": "python",
65 "name": "python3"
66 },
67 "language_info": {
68 "codemirror_mode": {
69 "name": "ipython",
70 "version": 3
71 },
72 "file_extension": ".py",
73 "mimetype": "text/x-python",
74 "name": "python",
75 "nbconvert_exporter": "python",
76 "pygments_lexer": "ipython3",
77 "version": "3.8.10"
78 }
79 },
80 "nbformat": 4,
81 "nbformat_minor": 4
82 }