Touchstone File Block

Block Selection Tree: Data ImportTOUCHSTONE block

 

This type of block implements the import of a Touchstone file with the extension '.s*p', where '*' gives the number of ports.

 

After the insertion, the number of internal ports is automatically set according to file's extension. Further information about the file's contents is given within a header line, which always begins with ’#’, for instance:

 

# GHz s ri r 50

 

The first string represents the frequency unit, the second one shows the type of information of the file. Files to import in CST DESIGN STUDIO™ must have the type description 'S'  (for S-Parameter contents), 'Y' (for Y-Parameter contents) or 'Z' (for Z-Parameter contents). The third string describes the format that the data is stored in. It can be either ’RI’ for a description of a complex number by its real and imaginary part, ’MA’ for magnitude for the representation by its absolute value and its phase in degrees (-180°<phase<180°), or ’DB’ for a logarithmic representation of the magnitude and the phase in degrees as in 'MA' . The information ’R 50’ defines the reference impedance 50 Ohms for all ports.

 

The header line is followed by the data lines. Pay attention to the fact that the sequence that the N-Port data is stored in depends on the number of ports. The data lines must be formatted as follows (sij_1 and sij_2 are real and imaginary part or respectively, magnitude and phase):

 

frequency

s11_1

s11_2

for one-port data

 

frequency

s11_1

s11_2

s21_1

s21_2

s12_1

s12_2

s22_1

s22_2

for two-port data

 

frequency_1

s11_1

s11_2

s12_1

s12_2

s13_1

s13_2

...

s1n_1

s1n_2

 

 

s21_1

s21_2

s22_1

s22_2

s23_1

s23_2

...

s2n_1

s2n_2

 

 

s31_1

s31_2

s32_1

s32_2

s33_1

s33_2

...

s3n_1

s3n_2

 

 

...

...

...

...

...

...

 

...

...

 

 

sn1_1

sn1_2

sn2_1

sn2_2

sn3_1

sn3_2

...

snn_1

snn_2

 

frequency_2

s11_1

s11_2

s12_1

s12_2

s13_1

s13_2

...

s1n_1

s1n_2

 

 

s21_1

s21_2

s22_1

s22_2

s23_1

s23_2

...

s2n_1

s2n_2

 

 

s31_1

s31_2

s32_1

s32_2

s33_1

s33_2

...

s3n_1

s3n_2

 

 

...

...

...

...

...

...

 

...

...

 

 

sn1_1

sn1_2

sn2_1

sn2_2

sn3_1

sn3_2

...

snn_1

snn_2

for n-port data

 

Please pay attention to the correct order for two-port data and the fact that always n lines must exist for n-port data. Please note that the classical TOUCHSTONE format limits the number of data sets per line to four, so for n > 4 each line must be further divided. This limitation does not exist in CST DESIGN STUDIO™.

 

You may insert an arbitrary number of comment lines which always start with '!'. Furthermore, CST DESIGN STUDIO™ accepts files containing empty lines, which are not allowed in the classical TOUCHSTONE format.

 

A Touchstone file block is always frequency bounded. As usual, the limits are displayed on the Block Properties - General page. Furthermore, the file that the block refers to is displayed there. The block offers the usual features of File Blocks like browsing for a new file, editing the referenced project, choice of relative or absolute paths, updating file references and recovery of lost files.

 

The reference impedance Zref is part of the definition of S-parameters. In case of Z- or Y-parameters it is a simple normalization: The Touchstone file contains normalized data zij or yij.The unnormalized data is given by Zij = zij * Zref or Yij = yij / Zref, respectively.

If the file contains S-parameters and a zero reference impedance, no fixed impedance is associated with the block, and the S-Parameters will be interpreted as if they were normalized to the impedances of the connected blocks. This feature is useful, because some software products export Touchstone files without renormalizing the S-parameters to the characteristic impedance that is specified in the header line. Such a file may be used in CST DESIGN STUDIO™ if the reference impedance in the header line is set to zero, and it is connected to blocks with matching impedance and/or external ports.

 

If a Touchstone file block is used in a transient simulation, it is necessary to specify whether the given data characterizes a passive or an active device. Otherwise you may obtain inaccurate results.  Passivation of the S-parameters in transient simulation will be omitted, if the S-parameters have been specified as active. You can do this in the "Edit Properties... - General" dialog box.

 

In the same dialog, the interpolation method can be specified by the "Higher-order interpolation" checkbox . If it is checked, a rational fit interpolation will be applied on the S-parameter data of the Touchstone file, otherwise, a linear interpolation will be applied. Linear interpolation is recommended, if the data is noisy, e.g.,  this might be the case for measured data.  Rational fit interpolation is recommended, if the data is smooth, e.g., this might be the case for properly converged simulated data.

 

See also

Block Overview, File Blocks