5.3 Amplifier Design Stages
219
5.4 Writing and Importing S-parameter files
Sometimes you may find a set of S-parameter files in a book or an exercise and you would
like to use these in the simulator. The best way to make use of S-parameters provided in this way is
to type them into a specific type of file which is used to store 2-port S-parameters. One of the most
popular format for this type of files is the Touchstone format which is a simple text-file with
extension ".s2p". Files of this type may be provided by device manufacturers or copied from
measurement kit.
The syntax of these files is really quite simple.
Each comment line starts with an exclamation mark '!' . For example we could start with the
line shown below
! Example GaAs FET 6 GHZ VDS 4V IDS=0.5Idss
And all the text would simply be ignored by the simulator.
We then need to specify the format of the data before we start typing it in. This is done by
starting the line with the hash character '#'. This line must follow the format shown below
#
Where:
= Units of the frequency data. Options are GHz, MHz, KHz, or Hz.
= Type of file data. Options are: S, Y, Z, G, or H for S2P components
= S-parameter format. Options are: DB for dB-angle, MA for magnitude angle, RI for real-
imaginary
= Reference resistance in ohms, where n is a positive number. This is the impedance which the
S-parameters were normalized to.
For example, to specify that the frequency of our data is in GHz, that the parameter type is
S-parameters expressed in Magnitude and Angle and normalised to 50 Ω, we would type
# GHz S MA R 50
This line may then be followed by the actual S-Parameter Data. Each line represents the set of S-
parameter relative to a specific frequency and will be in one of the formats shown below
|S11| Re{S11} Im{S11} Re{S21} Im{S21} Re{S12} Im{S12} Re{S22} Im{S22} (for Real Imaginary)
20log10|S11|