S-Parameter Files

SysCalc is capable of using frequency dependent S-Parameter data in conjunction with the Gain component. The data could represent vendor published device data, or perhaps the multi-port performance of another circuit. You must first place the data in an ASCII file, which can then be referenced by as many components as desired. The data files can be created and/or modified using Notepad (supplied with Windows) or with some other text editor. All components referencing the same data file will in fact be addressing a common database. SysCalc can directly read industry compatible 2-port data files (typically having the extension, .S2P) provided the file has a header as described below.

Data File Structure

The first non-blank/non-comment line of the file contains a header describing the format of the remaining data lines and is as follows:

# FREQ PARAMETER FORMAT R IMPED

where

FREQ = a scalar for the frequency data and must be one of the following mnemonics: HZ, KHZ, MHZ, GHZ

PARAMETER = S for S-parameters

FORMAT = the format of each supplied complex data pair. The following table shows the effect of each possible FORMAT keyword on the program's interpretation of data:

 

Keyword

Complex Number Pair

 

1st #

2nd #

DB

20*LOG(MAG)

Angle (Degrees)

MA

Magnitude

Angle (Degrees)

RI

Real

Imaginary

IMPED = the impedance to which the data has been normalized. S-parameters are always normalized to an impedance, typically 50 ohms.

Example

An example of the first line found in a data file might be

# MHZ S MA R 50

which would cause

  1. each frequency to be multiplied by 1e6

  2. each data pair to be interpreted as magnitude and angle

  3. normalization to 50 ohms.

The remaining lines of the file contain the blackbox data, Cij. In the following discussion Cij represents the complex data pair having the format previously discussed. The i and j refer to standard matrix row and column notation; thus, C21 would actually mean MAG(S21) ANG(S21) for the example above.

2-PORT data format

FREQ1 C11 C21 C12 C22

FREQ2 C11 C21 C12 C22

  ...

  ...

A complete example of a 2-port S-parameter data file is shown below

# MHZ S MA R 50 REV

100 .12 -22 .024 13 18.8 47 .56 -33 ! Low end of data

200 .22 -16 .035 21 17.7 45 .49 -40

Comments may be placed anywhere in the file by prefixing the line with a '!'.

When using formats requiring angular input (MA, DB), the difference between adjacent angles must be less than 180 degrees for reliable interpolation.