Next: -combine: Build scattering matrices
Up: gd1.pp
Previous: -wakes: longitudinal and transverse
  Contents
This section allows the combination of scattering parameters in fri-files
to touchstone files.
The section -sparameter may be used to generate the fri-files.
##############################################################################
# Flags: nomenu, noprompt, nomessage, #
##############################################################################
# section: -totouchstone #
##############################################################################
# outfile= ./s-matrix.sXp #
# ports= 2 #
# normalise= yes #
# #
# ij= (1,1) -- Index of S-Parameter #
# file= -none-
# -- filename of s-parameter #
# factor= 1.0 -- factor to apply #
# ### #
# already specified files: #
# ij: (1,1), factor: 1.0 #
# file: -none-
# ij: (1,2), factor: 1.0 #
# file: -none-
# ij: (2,1), factor: 1.0 #
# file: -none-
# ij: (2,2), factor: 1.0 #
# file: -none-
##############################################################################
# clear, doit, ?, return, end, help, ls #
##############################################################################
outfile= VALID-FILENAME:
The name of the touchstone-file to be generated.
If the file exists, it will be overwritten.
ports= NN:
The order of the scattering matrix to write to the touchstone file.
If the order is N, N*N scattering parameters have to be specified as
fri-files.
ij= (I, J):
The indices of the scattering parameter to be specified as a fri-file.
file= NAME-OF-A-FRI-FILE:
The name of the fri file which contains the data of the scattering parameter
with indices (I, J).
factor= NUMBER:
The data in the fri-file will be multiplied by NUMBER before it is written
to the TouchStone-file.
- doit
The scattering parameters are read from the specified files and are written
to the TouchStone-file.
Note:
All fri-files must have the same frequency resolution (use wantdf= DF),
and must have the same frequency range.
Example
The following shell-script computes the four rows of the scattering matrix
of a four-port device, by exciting four times a different port.
The computed scattering parameters are stored as fri-files and are combined to
one TouchStone-file.
#!/bin/sh
#
# First Step:
# Computation of the four rows of the scattering matrix.
# The results of each computation are stored in a different file.
#
# In the inputfile "arndt.00.x.gdf", the outfile is defined as
# outfile= /tmp/bruw1931/garbage/arndt-excitation-at-PEXC
#
#
# At each computation, a different port is excited.
#
# In the inputfile, the excitation is defined via:
# -pexcitation
# port= PEXC,
# mode= 1, amplitude= 1, frequency= 17e9, bandwidth= 20e9,
#
for PEXC in xlow1 xhigh1 xlow2 xhigh2
do
gd1 -DPEXC=$PEXC < arndt.00.x.gdf | tee out-excitation=$PEXC
done
#
# Fouriertransform, and generating fri-files.
# The names of the fri-files are defined via
#
# -general, scratch= /tmp/bruw1931/garbage/exc-at-$PEXC-
#
# Frequency resolution is 10 MHz (wantdf= 10e6)
#
for PEXC in xlow1 xhigh1 xlow2 xhigh2
do
gd1.pp << EOF
-general
infile= /tmp/bruw1931/garbage/arndt-excitation-at-$PEXC
scratch= /tmp/bruw1931/garbage/exc-at-$PEXC-
-sparameter
window= yes, edgeofwindow= 0.7
wantdf= 10e6
flow= 5e9, fhigh= 25e9
timedata= no, fsumpower= no, magnitude= no, phase= no, smithplot= no
fri= yes
onlyplotfiles= yes
doit
EOF
done
#
# Second step.
# Combining the rows of the scattering matrix to one TouchStone-file.
#
gd1.pp << EOF
-totouchstone
clear # file= - undefined -
ports= 4
sdefine(BASE, /tmp/bruw1931/garbage/exc-at)
sdefine(P1, xlow1) sdefine(P2, xhigh1)
sdefine(P3, xlow2) sdefine(P4, xhigh2)
ij= (1,1), file= [BASE]-[P1]-[P1]_out_1.fri
ij= (1,2), file= [BASE]-[P1]-[P2]_out_1.fri
ij= (1,3), file= [BASE]-[P1]-[P3]_out_1.fri
ij= (1,4), file= [BASE]-[P1]-[P4]_out_1.fri
ij= (2,1), file= [BASE]-[P2]-[P1]_out_1.fri
ij= (2,2), file= [BASE]-[P2]-[P2]_out_1.fri
ij= (2,3), file= [BASE]-[P2]-[P3]_out_1.fri
ij= (2,4), file= [BASE]-[P2]-[P4]_out_1.fri
ij= (3,1), file= [BASE]-[P3]-[P1]_out_1.fri
ij= (3,2), file= [BASE]-[P3]-[P2]_out_1.fri
ij= (3,3), file= [BASE]-[P3]-[P3]_out_1.fri
ij= (3,4), file= [BASE]-[P3]-[P4]_out_1.fri
ij= (4,1), file= [BASE]-[P4]-[P1]_out_1.fri
ij= (4,2), file= [BASE]-[P4]-[P2]_out_1.fri
ij= (4,3), file= [BASE]-[P4]-[P3]_out_1.fri
ij= (4,4), file= [BASE]-[P4]-[P4]_out_1.fri
outfile= /tmp/bruw1931/garbage/touchstone.s4p
doit
EOF
##############
Next: -combine: Build scattering matrices
Up: gd1.pp
Previous: -wakes: longitudinal and transverse
  Contents