004_dot_lin_sim : AC analysis
Requires: SmartSpice & Smartview
Minimum Versions: SMARTSPICE 3.16.12.R
This example shows how to use the .LIN analysis in a input deck to calculate S-parameter data in Real-Imaginary (RI) format and export simulated data into a Touchstone-file . You can also look at the Admitance and Impedance at the 2 ports of the circuit.
To run the simulation, Source the deck and press the green run button.
Input Files
2PORT_LIN.in
* BAND PASS FILTER .options post=2 dcstep=1 nomod C1 IN 2 3.166pF L1 2 3 203nH C2 3 0 3.76pF C3 3 4 1.75pF C4 4 0 9.1pF L2 4 0 36.81nH C5 4 5 1.07pF C6 5 0 3.13pF L3 5 6 233.17nH C7 6 7 5.92pF C8 7 0 4.51pF C9 7 8 1.568pF C10 8 0 8.866pF L4 8 0 35.71nH C11 8 9 2.06pF C12 9 0 4.3pF L5 9 10 200.97nH C13 10 OUT 2.97pF RX OUT 0 1.e+14 VIN IN 0 AC 1 ******** LIN analysis .AC LIN 101 200meg 300meg .LIN sparcalc=1 modelname=my_custom_model + filename="mydesign_2port_lin" format=touchstone + dataformat=ri Pin IN gnd port=1 z0=50 Pout OUT gnd port=2 z0=75 ******* LIN analysis post-processing .PROBE AC S(1,1) S(1,2) S(2,1) S(2,2) .PROBE AC K_STABILITY_FACTOR MU_STABILITY_FACTOR .PROBE AC G_MAX G_MSG G_TUMAX .PROBE AC VSWR(1) VSWR(2) ZIN(1) ZIN(2) YIN(1) YIN(2) ******* LIN analysis post-processing .MEASURE AC ms11_1 when s11(m)=0.4 cross=1 .MEASURE AC ms12_1 when s12(m)=0.8 cross=1 .MEASURE AC my11_1 when y11(m)=1 cross=1 .MEASURE AC my11_2 when y11(m)=1 cross=2 .MEASURE AC K_maximum MAX K_STABILITY_FACTOR .MEASURE AC K_Minimum MIN K_STABILITY_FACTOR .END
mydesign_2port_lin.s2p
! NPort=2 DATA=101 COMPLEX_DATAFORMAT=RI ! ! .MODEL my_custom_model S TSTONEFILE=mydesign_2port_lin.s2p TYPE=S ! ! # Hz S RI R 50 75 2e+008 0.730763 -0.682615 0.00302897 0.00118154 0.00369654 0.00286544 0.479576 -0.876697 2.01e+008 0.716991 -0.697062 0.00356832 0.00147867 0.0042468 0.0031404 0.457122 -0.888602 2.02e+008 0.7022 -0.711955 0.00420101 0.00180122 0.00489074 0.00343994 0.433377 -0.900412 2.03e+008 0.686284 -0.727302 0.00494517 0.00215011 0.00564649 0.00376488 0.408245 -0.91207 2.04e+008 0.669124 -0.74311 0.0058229 0.00252556 0.00653616 0.00411533 0.381624 -0.923514 2.05e+008 0.650586 -0.759382 0.00686126 0.00292676 0.00758681 0.00449033 0.3534 -0.934664 2.06e+008 0.630514 -0.776113 0.00809347 0.00335122 0.00883163 0.00488725 0.32345 -0.945429 2.07e+008 0.608729 -0.793293 0.0095605 0.00379403 0.0103116 0.00530098 0.291639 -0.955701 2.08e+008 0.585027 -0.810904 0.0113131 0.00424656 0.0120774 0.00572271 0.257821 -0.965348 2.09e+008 0.559168 -0.82891 0.0134143 0.00469474 0.014192 0.00613809 0.221834 -0.974215 2.1e+008 0.530873 -0.847261 0.0159428 0.00511642 0.0167342 0.00652471 0.1835 -0.982115 2.11e+008 0.499816 -0.865878 0.0189974 0.00547753 0.0198025 0.00684814 0.142624 -0.98882 2.12e+008 0.465611 -0.884649 0.0227022 0.00572633 0.0235209 0.00705623 0.098993 -0.994057 2.13e+008 0.427799 -0.903411 0.0272137 0.00578479 0.0280458 0.00707047 0.052371 -0.997488 2.14e+008 0.385833 -0.921933 0.0327302 0.00553558 0.033575 0.00677292 0.00249987 -0.998697 2.15e+008 0.339053 -0.939882 0.0395025 0.00480201 0.040359 0.00598615 -0.0509021 -0.997166 2.16e+008 0.286663 -0.956782 0.0478473 0.00331703 0.048714 0.00444225 -0.10814 -0.992238 2.17e+008 0.227697 -0.971939 0.0581625 0.000674503 0.0590369 0.00173401 -0.169536 -0.983072 2.18e+008 0.160981 -0.984337 0.07094 -0.00374831 0.0718181 -0.00276265 -0.235418 -0.968568 2.19e+008 0.0850987 -0.99246 0.0867687 -0.0109156 0.0876448 -0.0100135 -0.306082 -0.947264 2.2e+008 -0.00161779 -0.994006 0.106307 -0.0223355 0.107172 -0.0215284 -0.381721 -0.91717 2.21e+008 -0.101025 -0.985421 0.130168 -0.0403887 0.131008 -0.0396902 -0.462255 -0.875532 2.22e+008 -0.21488 -0.961125 0.158595 -0.0688492 0.15939 -0.0682741 -0.546957 -0.81847 2.23e+008 -0.34395 -0.91229 0.190615 -0.113646 0.191332 -0.113209 -0.633638 -0.740537 2.24e+008 -0.485643 -0.825206 0.221995 -0.18371 0.222582 -0.183421 -0.716878 -0.634408 2.25e+008 -0.628224 -0.680251 0.240708 -0.290787 0.241092 -0.290635 -0.784507 -0.491792 2.26e+008 -0.739286 -0.456534 0.218941 -0.443987 0.219023 -0.443917 -0.812287 -0.308966 2.27e+008 -0.753725 -0.155881 0.107901 -0.62944 0.107594 -0.629304 -0.763168 -0.103311 2.28e+008 -0.598623 0.147209 -0.134817 -0.776082 -0.135484 -0.775644 -0.613788 0.0648287 2.29e+008 -0.296184 0.308397 -0.466581 -0.774695 -0.467381 -0.773771 -0.411542 0.119451 2.3e+008 -0.000372203 0.264103 -0.755964 -0.599538 -0.756602 -0.598167 -0.25744 0.0624558 2.31e+008 0.168025 0.103709 -0.920784 -0.337153 -0.921103 -0.335532 -0.195625 -0.0273316 2.32e+008 0.208755 -0.0624565 -0.973483 -0.0714036 -0.973478 -0.0697201 -0.197719 -0.0902 2.33e+008 0.171123 -0.183138 -0.953778 0.165685 -0.953511 0.167316 -0.223034 -0.112607 2.34e+008 0.0981413 -0.248984 -0.889077 0.370954 -0.888616 0.372473 -0.245964 -0.103336 2.35e+008 0.0172462 -0.266272 -0.792514 0.547859 -0.791921 0.549239 -0.254924 -0.0759947 2.36e+008 -0.0550544 -0.245365 -0.669694 0.698181 -0.66902 0.699412 -0.24696 -0.0430464 2.37e+008 -0.108961 -0.197426 -0.52396 0.820721 -0.523246 0.821805 -0.224299 -0.0142479 2.38e+008 -0.139377 -0.133617 -0.359281 0.912376 -0.358561 0.913321 -0.192308 0.00394078 2.39e+008 -0.145123 -0.0645154 -0.181357 0.969821 -0.180658 0.970639 -0.15783 0.00869045 2.4e+008 -0.128369 0.000697387 0.0025433 0.991015 0.00320039 0.991721 -0.127565 0.000706557 2.41e+008 -0.0938014 0.0550602 0.184497 0.976072 0.185097 0.976683 -0.106642 -0.0164814 2.42e+008 -0.0474947 0.0943003 0.357054 0.927359 0.357588 0.927891 -0.0977229 -0.0377342 2.43e+008 0.0042429 0.116782 0.514106 0.84898 0.514569 0.849448 -0.10082 -0.057667 2.44e+008 0.0557596 0.123017 0.65127 0.745972 0.651658 0.746391 -0.113727 -0.071788 2.45e+008 0.10255 0.114975 0.765818 0.623564 0.766132 0.623944 -0.132809 -0.077195 2.46e+008 0.141373 0.0954209 0.856341 0.48666 0.85658 0.48701 -0.153867 -0.0728158 2.47e+008 0.170129 0.0674165 0.922307 0.339604 0.922473 0.339933 -0.172888 -0.0592941 2.48e+008 0.187633 0.0340177 0.963683 0.186162 0.963775 0.186477 -0.186609 -0.0386615 2.49e+008 0.193384 -0.00185504 0.980644 0.0296365 0.980664 0.0299439 -0.192878 -0.0139021 2.5e+008 0.187399 -0.0374349 0.973418 -0.126944 0.973367 -0.126638 -0.190845 0.0115183 2.51e+008 0.170132 -0.0700713 0.942231 -0.280629 0.942108 -0.280318 -0.181004 0.0341234 2.52e+008 0.142476 -0.0971885 0.887351 -0.428352 0.887156 -0.428029 -0.165107 0.0508778 2.53e+008 0.105838 -0.116286 0.809225 -0.566791 0.808958 -0.566447 -0.145945 0.0595995 2.54e+008 0.0622565 -0.125019 0.708684 -0.692282 0.708346 -0.691911 -0.127013 0.0593086 2.55e+008 0.0145128 -0.121381 0.587212 -0.800857 0.586805 -0.800447 -0.112033 0.0504664 2.56e+008 -0.0338258 -0.104006 0.447216 -0.88841 0.446743 -0.887952 -0.104373 0.0350441 2.57e+008 -0.0785067 -0.0725439 0.292231 -0.951037 0.291698 -0.950519 -0.106416 0.0163513 2.58e+008 -0.114892 -0.0280433 0.126959 -0.985498 0.126373 -0.984908 -0.118994 -0.00142275 2.59e+008 -0.138471 0.0267811 -0.0429524 -0.98972 -0.0435803 -0.989045 -0.141026 -0.013937 2.6e+008 -0.145505 0.087509 -0.211403 -0.963164 -0.212058 -0.962394 -0.169519 -0.0175839 2.61e+008 -0.133679 0.148259 -0.372519 -0.906901 -0.373182 -0.906027 -0.199988 -0.0103342 2.62e+008 -0.102602 0.202163 -0.521312 -0.823273 -0.521962 -0.822289 -0.227223 0.00766572 2.63e+008 -0.054081 0.241916 -0.654086 -0.715186 -0.654698 -0.714089 -0.24624 0.0338656 2.64e+008 0.00771937 0.260227 -0.768353 -0.585176 -0.768897 -0.583968 -0.253221 0.0634204 2.65e+008 0.0759943 0.25012 -0.862115 -0.434503 -0.862559 -0.433194 -0.24638 0.0894917 2.66e+008 0.140483 0.205306 -0.932372 -0.262593 -0.932679 -0.261199 -0.226932 0.103627 2.67e+008 0.185786 0.121418 -0.972697 -0.0674172 -0.972825 -0.0659716 -0.200582 0.096411 2.68e+008 0.189158 -0.000138487 -0.970004 0.151817 -0.969913 0.153258 -0.179908 0.0593827 2.69e+008 0.120845 -0.143181 -0.902498 0.387235 -0.902164 0.388581 -0.186776 -0.00942407 2.7e+008 -0.0439572 -0.263667 -0.746146 0.609309 -0.745595 0.610438 -0.249307 -0.0941548 2.71e+008 -0.292408 -0.290838 -0.500353 0.760915 -0.499697 0.761718 -0.382594 -0.151669 2.72e+008 -0.547663 -0.174175 -0.217863 0.788548 -0.217276 0.788999 -0.558979 -0.130337 2.73e+008 -0.71359 0.0566114 0.0183025 0.69783 0.018669 0.698023 -0.715087 -0.0182347 2.74e+008 -0.755527 0.316058 0.162722 0.550173 0.162816 0.550253 -0.805555 0.145944 2.75e+008 -0.703946 0.539 0.22536 0.403924 0.225212 0.404003 -0.828524 0.315275 2.76e+008 -0.604421 0.70507 0.237175 0.285264 0.236842 0.285407 -0.804496 0.463994 2.77e+008 -0.489006 0.819688 0.223898 0.19741 0.223434 0.197641 -0.754072 0.58538 2.78e+008 -0.374369 0.895241 0.200785 0.134946 0.200235 0.13527 -0.691089 0.681514 2.79e+008 -0.267569 0.943089 0.17551 0.0912313 0.174903 0.0916433 -0.623481 0.756889 2.8e+008 -0.170826 0.971756 0.151491 0.0607654 0.150849 0.0612568 -0.555459 0.815884 2.81e+008 -0.0842088 0.987203 0.130021 0.0395167 0.129359 0.0400787 -0.489147 0.862085 2.82e+008 -0.00693556 0.993505 0.111397 0.0246639 0.110724 0.0252879 -0.425549 0.898259 2.83e+008 0.0620289 0.993449 0.0954858 0.014264 0.0948099 0.0149421 -0.365081 0.926508 2.84e+008 0.123725 0.988949 0.0819933 0.00698194 0.0813188 0.00770764 -0.30785 0.948425 2.85e+008 0.179102 0.981339 0.0705863 0.00189707 0.0699166 0.00266447 -0.253807 0.965231 2.86e+008 0.228989 0.97156 0.0609469 -0.00163018 0.0602842 -0.000826101 -0.202825 0.977873 2.87e+008 0.274101 0.960281 0.0527924 -0.0040475 0.0521384 -0.00321107 -0.154744 0.987092 2.88e+008 0.315045 0.947986 0.0458803 -0.00567086 0.0452361 -0.00480581 -0.109388 0.99348 2.89e+008 0.352337 0.935027 0.0400063 -0.00672497 0.0393724 -0.00583453 -0.0665826 0.997511 2.9e+008 0.386415 0.921662 0.035 -0.00737073 0.0343769 -0.00645772 -0.0261596 0.999572 2.91e+008 0.417655 0.908081 0.0307201 -0.0077241 0.0301081 -0.00679096 0.012041 0.999978 2.92e+008 0.446377 0.894427 0.0270497 -0.00786904 0.0264489 -0.00691792 0.0481693 0.998992 2.93e+008 0.472857 0.880804 0.023892 -0.00786661 0.0233023 -0.00689942 0.0823647 0.996833 2.94e+008 0.497332 0.867289 0.0211669 -0.00776136 0.0205882 -0.00677976 0.114757 0.993684 2.95e+008 0.520009 0.85394 0.0188077 -0.00758583 0.0182399 -0.00659131 0.145465 0.9897 2.96e+008 0.541068 0.840798 0.0167592 -0.00736381 0.0162021 -0.00635769 0.1746 0.985012 2.97e+008 0.560666 0.827894 0.0149752 -0.00711266 0.0144286 -0.00609611 0.202264 0.979731 2.98e+008 0.578941 0.815247 0.013417 -0.00684501 0.0128806 -0.00581909 0.228552 0.973954 2.99e+008 0.596013 0.802873 0.0120522 -0.00656998 0.0115259 -0.00553564 0.253552 0.967761 3e+008 0.611992 0.790779 0.0108537 -0.00629414 0.0103371 -0.00525224 0.277343 0.961224
004_dot_lin_sim
[an error occurred while processing this directive]
Graphics