• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. RF Design
  3. extracting s2p file

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 63
  • Views 26809
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

extracting s2p file

robert 21
robert 21 over 5 years ago

Hello, i managed to extract my S-param data into vcsv file,however i need a standart S2P file

i have this table displayed, as shown bellow.
is there a way to extract s2p file in cadence virtuoso?
Thanks.

  • Cancel
  • Tawna
    Tawna over 5 years ago

    Hi Robert21,

    What is your end goal?   Why are you putting your S-param data into a vcvs file?  

    Are you trying to get s-parameter data from a Spectre simulation?   If so, run an sp analysis.  Before launching the simulation, open the s-parameter options form.  In the Output section, enter the filename for the sp file to be generated.  e.g. myfilter.s2p.   You can specify touchstone, touchstone2, etc. format.   When running the sp simulation, be sure to start low in frequency (e.g. 1 Hz) and go high enough in frequency (I recommend 3X higher than the highest harmonic of interest).   See the article on support.cadence.com "7 Habits of Highly Successful S-Parameters"

    best regards,

    Tawna

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Tawna

    The same question also came up less than two weeks ago in this post.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • robert 21
    robert 21 over 5 years ago in reply to Andrew Beckett

    Hello Andrew, I have created a touchstone file by option as shown bellow.(i have renamed it in txt so i could upload it here) but Matlab is not recocnising it. How can i make a touchstone S2p file so Matlab will recognise it?

    Thanks.

    S = sparameters('touchstone_file');
    disp(S)

    Fullscreen touchstone_file.txt Download
    ! Touchstone Ver. 1.0 
    ! Number of ports is 2
    # Hz	S	RI	R	33.755800	50.000000	
    ! SCATTERING PARAMETERS  :
    5.00000000e+09      0.9998370462737904   0.01561915647365997    -0.1019809531889976  0.004779853015226476   3.057239895107492e-05  0.001938201498904779     0.8242296392549995   -0.0383190935138942  
    5.20000000e+09      0.9998497256974158   0.01455847058550708     -0.101951792786102  0.005056455838290084   3.47586563089242e-05   0.00201526932422235     0.8240575409954747   -0.0398355592187962  
    5.40000000e+09      0.9998603067266405   0.01355985421811079    -0.1019268863159635  0.005330061805777769   3.910823878138454e-05  0.002092394159076744     0.8238788793022065  -0.04135017501904945  
    5.60000000e+09      0.9998690612280682   0.01261650200788977    -0.1019054325787475  0.005601013170019022   4.362145236270438e-05  0.002169569281036344     0.8236936931297953  -0.04286288063602711  
    5.80000000e+09      0.9998762140838179   0.01172257408596655    -0.1018867786205584  0.005869601939464925   4.829853707628607e-05  0.002246788806075985     0.8235020222150982  -0.04437361712844012  
    6.00000000e+09      0.9998819526463931   0.01087302974962978    -0.1018703887369651  0.006136078784211563   5.313967958185998e-05  0.002324047545317055     0.8233039070437083  -0.04588232689115371  
    6.20000000e+09      0.9998864340379372    0.0100634945449708    -0.1018558206894649  0.006400660093289565   5.814502281462316e-05  0.002401340890319995     0.8230993888117761  -0.04738895365434533  
    6.40000000e+09      0.9998897908395908  0.009290153150346869    -0.1018427072915015   0.00666353361911674   6.331467341971952e-05  0.002478664720476263     0.8228885093845819  -0.04889344248237476  
    6.60000000e+09      0.9998921355655948  0.008549662376414413    -0.1018307420322601  0.006924863030553965   6.864870753238419e-05  0.002556015327668843     0.8226713112529609  -0.05039573977192442  
    6.80000000e+09      0.9998935642108666  0.007839079991248998    -0.1018196677653324  0.007184791614663727   7.414717530493347e-05    0.0026333893545457     0.8224478374883157  -0.05189579324909063  
    7.00000000e+09      0.9998941590856577  0.007155806098073425    -0.1018092677441661  0.007443445308463445   7.981010447626245e-05  0.002710783743612804     0.8222181316968168  -0.05339355196521067  
    7.20000000e+09      0.9998939910968913  0.006497534546979655    -0.1017993584691587  0.007700935198942724   8.563750320387735e-05  0.002788195694992432     0.8219822379733188  -0.05488896629128472  
    7.40000000e+09      0.9998931215965843  0.005862212425338797    -0.1017897839439883  0.007957359597788753   9.16293623237001e-05  0.002865622631170848     0.8217402008552909  -0.05638198791090099  
    7.60000000e+09      0.9998916038889967  0.005248006096688408    -0.1017804110360363  0.008212805773480655   9.778565716287209e-05  0.002943062167421599     0.8214920652771128  -0.05787256981162291  
    7.80000000e+09      0.9998894844668497  0.004653272581385703    -0.1017711257076571  0.008467351405468379   0.0001041063490011706  0.003020512086866271     0.8212378765249304  -0.05936066627482132  
    8.00000000e+09      0.9998868040309954  0.004076535320714725    -0.1017618299386928  0.008721065811490143   0.0001105913862546417  0.003097970319347064     0.8209776801923372  -0.06084623286397193  
    8.20000000e+09      0.9998835983359299  0.003516463558252192    -0.1017524392009466  0.008974010988591952   0.0001172407054384919  0.003175434923449699     0.8207115221369667  -0.06232922641144407  
    8.40000000e+09      0.9998798988944197  0.002971854722063183    -0.1017428803758917   0.00922624250029707   0.0001240542319537729  0.003252904071143797     0.8204394484381845  -0.06380960500383413  
    8.60000000e+09      0.9998757335674879  0.002441619308815258     -0.101733090030207  0.009477810236045228   0.0001310318807328025  0.003330376034608705     0.8201615053559987  -0.06528732796590628  
    8.80000000e+09      0.9998711270606393  0.001924767863728749    -0.1017230129816468  0.009728759064052649   0.0001381735567709882  0.003407849174892489     0.8198777392912194   -0.0667623558432044  
    9.00000000e+09      0.9998661013430123  0.001420399724134436    -0.1017126011016158  0.009979129394818223   0.000145479155566942  0.003485321932115626      0.819588196747042  -0.06823465038342269  
    9.20000000e+09       0.999860676002864  0.0009276932533491822    -0.1017018123115996   0.01022895766937866   0.0001529485634884709  0.003562792816981604     0.8192929242920358  -0.06970417451661025  
    9.40000000e+09      0.9998548685502222  0.0004458973390972787    -0.1016906097390438   0.01047827678391693   0.0001605816580784895  0.003640260403397663     0.8189919685246252  -0.07117089233430081  
    9.60000000e+09       0.999848694675515  -2.567603098047044e-05    -0.1016789610049237   0.01072711646032064   0.0001683783083121905  0.003717723322042302     0.8186853760391057  -0.07263476906765655  
    9.80000000e+09      0.9998421684713528  -0.0004876582729957946    -0.1016668376204964   0.01097550357065796   0.0001763383748146858  0.003795180254742811     0.8183731933932195  -0.07409577106471836  
    1.00000000e+10      0.9998353026233591  -0.0009406299204920421    -0.1016542144749192   0.01122346242222147   0.0001844617100465433  0.003872629929548521     0.8180554670773119  -0.07555386576685302  
    1.02000000e+10      0.9998281085748906  -0.001385125658118214    -0.1016410693987495   0.01147101500870876   0.000192748158463369  0.003950071116403262      0.817732243485076  -0.07700902168448961  
    1.04000000e+10      0.9998205966696586  -0.001821638768065292     -0.101627382791035   0.01171818123222364   0.0002011975566543904  0.004027502623335741     0.8174035688859227  -0.07846120837223941  
    1.06000000e+10      0.9998127762755913  -0.002250625067812595    -0.1016131372998576   0.01196497910004932   0.0002098097334640881  0.004104923293098629     0.8170694893989063  -0.07991039640348117  
    1.08000000e+10      0.9998046558926946  -0.002672506405974717    -0.1015983175479564    0.0122114248995469   0.0002185845101003408  0.004182332000197842     0.8167300509682975   -0.0813565573445105  
    1.10000000e+10      0.9997962432472469  -0.003087673773112698    -0.1015829098964711    0.0124575333540222   0.0002275217002317572  0.004259727648261633     0.8163852993406928  -0.08279966372832867  
    1.12000000e+10      0.9997875453742628  -0.003496490076215553    -0.1015669022410171   0.01270331776199266   0.0002366211100765792  0.004337109167706641     0.8160352800437134  -0.08423968902816091  
    1.14000000e+10      0.9997785686898795  -0.00389929261856714    -0.1015502838352532   0.01294879012192869   0.0002458825384849181  0.004414475513663989      0.815680038366233  -0.08567660763078047  
    1.16000000e+10      0.9997693190550436  -0.004296395320964486    -0.1015330451378895   0.01319396124425647   0.0002553057770160539  0.004491825664133615     0.8153196193401158  -0.08711039480971533  
    1.18000000e+10      0.9997598018316768  -0.004688090715227245    -0.1015151776797258   0.01343884085215219   0.0002648906100119213  0.004569158618339347     0.8149540677234535  -0.08854102669841471  
    1.20000000e+10      0.9997500219323198  -0.005074651736867386    -0.1014966739478506   0.01368343767245684   0.0002746368146680111  0.004646473395260891     0.8145834279852202  -0.08996848026343823  
    1.22000000e+10      0.9997399838641088  -0.005456333340124075    -0.1014775272845735   0.01392775951785376   0.0002845441611023709  0.004723769032322136     0.8142077442913691   -0.0913927332777416  
    1.24000000e+10      0.9997296917678098  -0.005833373955639876    -0.1014577317990332   0.01417181336130703   0.0002946124124236324  0.004801044584217625     0.8138270604922679  -0.09281376429411391  
    1.26000000e+10      0.9997191494525361  -0.006205996808381521    -0.1014372822897373    0.0144156054036243   0.0003048413247985223  0.004878299121861653     0.8134414201114986  -0.09423155261883352  
    1.28000000e+10      0.9997083604266954  -0.006574411111208599     -0.101416174176541   0.01465914113489743   0.000315230647519312  0.004955531731445998     0.8130508663358975  -0.09564607828558604  
    1.30000000e+10      0.9996973279256045  -0.006938813147607137    -0.1013944034408006   0.01490242539048408   0.0003257801230717423  0.005032741513594399     0.8126554420068592  -0.09705732202970598  
    1.32000000e+10      0.9996860549362165  -0.007299387255423229    -0.1013719665726155   0.01514546240210454   0.000336489487203565   0.00510992758260319     0.8122551896128218  -0.09846526526278247  
    1.34000000e+10      0.9996745442192532  -0.007656306721985363    -0.1013488605242218   0.01538825584456259   0.0003473584689940178  0.005187089065758557     0.8118501512828868  -0.09986989004767405  
    1.36000000e+10      0.9996627983290844  -0.008009734599855435    -0.1013250826687478   0.01563080887853842   0.0003583867909244825  0.005264225102722424     0.8114403687815447   -0.1012711790739735  
    1.38000000e+10      0.9996508196316025  -0.008359824451240727    -0.1013006307636342   0.01587312418984339   0.0003695741689502506   0.00534133484497945     0.8110258835044052   -0.1026691156339517  
    1.40000000e+10      0.9996386103203116  -0.008706721028325259    -0.1012755029181332   0.01611520402549022   0.0003809203125738083  0.005418417455338919     0.8106067364749618   -0.1040636835990248  
    1.42000000e+10      0.9996261724308457  -0.009050560895804249    -0.1012496975643691   0.01635705022688089   0.0003924249249194208  0.005495472107485582     0.8101829683422559   -0.1054548673967595  
    1.44000000e+10      0.9996135078540807  -0.009391473001326256    -0.1012232134315209   0.01659866426039079   0.0004040877028092309  0.005572497985574555     0.8097546193794571   -0.1068426519884513  
    1.46000000e+10      0.9996006183479964  -0.009729579198835436     -0.101196049522739   0.01684004724558803   0.000415908336840785  0.005649494283865584     0.8093217294832604   -0.1082270228472939  
    1.48000000e+10      0.9995875055484228  -0.01006499472930566    -0.1011682050944677   0.01708119998130725   0.0004278865114660616   0.00572646020639276     0.8088843381740796   -0.1096079659371579  
    1.50000000e+10      0.9995741709787899  -0.01039782866286165    -0.1011396796378772   0.01732212296976966   0.0004400219050719165  0.005803394966666026     0.8084424845969764   -0.1109854676919952  
    

    In Untitledd (line 1)
    Error using rf.file.touchstone.Data/createoptionlist
    Invalid option line for the Touchstone format:
    # Hz S RI R 33.755800 50.000000

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to robert 21

    I can't test this because I don't currently have a MATLAB RF Toolbox license, so can't use the sparameters function. However, the file being produced is a standard Touchstone format, so you should ask The Mathworks about this. Maybe it will accept it if you pick one of the other datatype values (e.g. magphase). Either way, it looks like a bug with the reader in MATLAB. Perhaps it can't cope with the fact that there are different impedances for each port?

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 5 years ago in reply to robert 21

    The problem is that you have two numbers after the R in the option line, probably because your ports have different impedances. This is not allowed by the specification, see http://www.ibis.org/touchstone_ver2.0/touchstone_ver2_0.pdf

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Frank Wiedmann

    Frank,

    I think the issue was that only Touchstone 2.0 officially supports multiple reference impedances (that is described in the document  you reference). However, given that Touchstone 1.0 is much more commonly used, this is a fairly common extension to the original format (despite not being covered in the spec; the trouble with ASCII formats is that they are rather easy to extend!). Spectre can also write Touchstone 2.0 (on newer versions of the form it offers the datafmt choice of touchstone2). However, the MATLAB documentation specifically says that the sparameters function doesn't support Touchstone 2.0 so that won't help either, unfortunately!

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • robert 21
    robert 21 over 5 years ago in reply to Andrew Beckett

    Hello Andrew, Yes when i switched to 50 ohm ports only it worked great.
    So we cant use different impedance ports  touchstone in matlab.
    Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information