touchstone file could not be processed in matlab
古いコメントを表示
Hello , I have created a touchstone in cadence virtuoso of two port system(i have renamed it in txt so i could upload it here) but Matlab is not recocnising it.
i tried to import the file into matlab as shown in the code bellow, i get the following error.
Where did i go wrong?
Thanks.
S = sparameters('touchstone_file.s2p');
disp(S)
***************************ERROR MASSAGE********************
S = sparameters('Error using rf.file.touchstone.Data/createoptionlist
Invalid option line for the Touchstone format:
# Hz S RI R 33.755800 50.000000
Error in rf.file.touchstone.Data/read
Error in rf.file.touchstone.Data
Error in rf.internal.netparams.AllParameters/readRFFile
Error in rf.internal.netparams.AllParameters
Error in rf.internal.netparams.ScatteringParameters
Error in sparameters (line 75)
obj = obj@rf.internal.netparams.ScatteringParameters(varargin{:});
3 件のコメント
Know idea what a Touchstone format valid option line would be, but looking at the Touchstone File Spec document I don't see a case of more than one value for the reference resistance documented...altho can see for a 2-port analyzer needing one for each channel.
Just for grins, try changing that line to
# Hz S RI R 33.755800
and retry to see if works then.
After that, dunno what else to tell you either if it does or doesn't but will be interesting to know result.
dpb
2020 年 4 月 22 日
[Answer moved to comment...dpb]
correct its working only for 50 ohm ports.
S = sparameters('spp4');
disp(S);
rfplot(S);
dpb
2020 年 4 月 22 日
Well, that confirms the suspicion I had from the Standard document -- I don't know whether it is that that link is outdated or whether it is a vendor extension beyond the file spec in the particular instrument you're using.
I don't have necessary toolbox so can't look at the code to see how it is implemented; the format is pretty simple such that if it is m-code it should be pretty easy to create a version that will handle the other inputs.
Or, for just the two-port case, doesn't look like would be very hard to just read the file format directly with low-level i/o functions like textscan and/or fscanf and friends...
採用された回答
その他の回答 (1 件)
Mark
2024 年 11 月 15 日
Now that RF Toolbox is using the official Touchstone 2.0 reader, the following works.
S = sparameters('touchstone_file.txt')
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!