# 41.1 Create instrument response files, RESP

Introduction

The purpose of this program is to (1) Make Seisan or GSE2 response files, (2) Provide the engineer maintaining seismic instrumentation with a practical tool for calculating and checking response functions of the most common elements of a seismic system. The program can calculate response functions of velocity transducers, accelerometers, filters and amplifiers, input poles and zeros or tabulated values and multiply the combinations together to get complete system response functions. The program produces a table with the response function and a simple graphical expression of the response curve. For the purpose of checking measured values, a file with these values can be used as input and will be plotted together with the theoretical values. The program can calculate, acceleration, velocity or displacement response. Program PR_ RESP can make a table of many response files.

The instrument response

The seismic recording system can consist of seismic sensor, analog-digital converter, amplifier and filters. For a detailed discussion the user is referred to Scherbaum [1996]. The combined response can be given in the frequency domain as frequency response function or in the Laplace domain as transfer function. The frequency response is given in pairs of frequency amplitude phase (FAP), while the transfer function is given as poles and zeros (PAZ). The combined frequency response is obtained through multiplication of the response from the individual components, while the transfer function is obtained by combing the PAZ from the components. Amplifiers and accelerometers are specified simply by a constant gain. Filters are assumed to be Butterworth. RESP can be used to write finite impulse response (FIR) coefficients [Scherbaum, 1996] that are used as anti-alias filters in most modern digitizers if GSE is used as output format. SEISAN has no capability to read the FIR filters or to correct for them. However, the FIR filters are part of a full description of the instrument response and should be at least included for information if possible.

The electrodynamic seismometer is assumed to have the following velocity frequency response:

which corresponds to the transfer function:

where , is the angular frequency in Hz, the resonance frequency of the seismometer, and the damping (normally around 0.7).

NOTE: In the equation for the frequency response, the sign "+ 2*i*h.." was "-" before March 2000, so old parameter files may have to be regenerated. The sign depends on the definition of the signs in the Fourier transform and therefore may be different in different text books. It may even be wrong although it looks right, if a wrong Ansatz is done. Due to the wrong sign, the FAP values in the SEISAN response files were wrong, however the programs use the constants given in the files and the correct response is generated. If you have the instrument constants in your old response files and not just FAP, the old response files can be used.

The transformation from displacement to velocity or back is done by multiplying with i*..

In addition to or instead of using the equation above, values can also be entered as discrete values or as poles and zeros.

The SEISAN response function is calculated for 60 frequencies between 0.01 and 100 Hz and the steps between the frequencies are approximately logarithmic. The response function is normalised at 1.0 Hz ( see Table 1) and the gain at 1.0 Hz is given separately.

NOTE: ALL UNITS ARE IN METERS, SECONDS OR G (9.8ms-2)

NOTE: It seems that although the GSE format is clearly defined, there has been different interpretations. This has also led to changes in SEISAN since the GSE response was introduced with SEISAN. For more details, see Appendix C.

Which format to use

SEISAN, since version 7.1, supports the GSE2 calibration format in addition to the SEISAN response file format. We recommend that you use the GSE2 format, since it presents one of the most widely used calibration formats. Storage of the response in terms of PAZ is recommended over FAP, since the PAZ representation describes the continuous transfer function. You may continue using existing SEISAN response files and add new files in GSE2 format, or replace the old SEISAN response files with new GSE2 files.

How to run the program

The program has quite a few options, which easily may lead to confusion. Before you start you should know which format you want to use (GSE2 or SEISAN) and whether you want to describe the response in terms of FAP or PAZ. The recommended choice is to use GSE2 and PAZ.

Type RESP to start the program. You will then get a series of questions as indicated below in upper case letters. All input is format free. A sample run is shown below.

CHOSE OUTPUT FORMAT:  0: NO OUTPUT FILE
 1: SEISAN FAP
 2: SEISAN PAZ
 3: GSE2 FAP
 4: GSE2 PAZ

Answer with 0-4, options 1-4 will create respective response files in selected format, option 0 will only calculate and show the response on the screen. SEISAN PAZ can only be used if number of poles and number of zeros are less than 38. If more are input, a table will be generated automatically in FAP format. A format with poles and zeros MUST BE USED if a mechnical displacment sensor is selectedor an accelerometer is selected which does not have first character A in component name (see later).

TYPE OF SENSOR:  1: NONE
 2: SEISMOMETER
 3: ACCELEROMETER  4: MECHANICAL DISPLACEMENT SEISMOMETER

Answer with 1, 2, 3 or 4. Number 1 is used when only calculation of filters or amplifiers are desired, 2 is a standard velocity transduceri, 3 a standard accelerometer and 4 is a mechnical diplacement sensor (normally a digitized record of a paper seismogram). If a seismic sensor is used, you will get additional questions on the constants of the sensor. If a seismometer is chosen, the following questions must be answered:

SEISMOMETER NATURAL PERIOD ?

This is measured in seconds. For most short period systems the value would be 1.0 second.

SEISMOMETER DAMPING RATIO ?

The damping ratio should ideally be 0.7. This depends on the damping resistance.

For both the electrodynamic seismometer and accelerometer, the following question is given:

SENSOR LOADED GENERATOR CONSTANT (V/M/S OR V/G) ?

This is the generator constant of the sensor in terms of volt per unit of of ground motion (meter/second or g). It is important to note that this is the loaded constant, which means the effective output of the sensor taking into account amplifier input and damping resistances.

For the mechanical sensor, the question is

SEISMOGRAPH GAIN in TIMES GAIN (M/M) ?

which is simply the mechnical gain.

Now comes questions about amplifier, filter and recording unit.

RECORDING MEDIA GAIN (COUNT/V OR M/V) ?

If you have a recording media, the gain can be given here, otherwise just enter 1.0

If the output format is GSE, the response is always calculated in displacement units, while for SEISAN output and seismometer or accelerometer, the following options appear:

TYPE OF RESPONSE:  1: DISPLACEMENT
 2: VELOCITY
 3: ACCELERATION

Normally for a seismometer, one wants to calculate the displacement response and for an accelerometer, the acceleration response. However it might sometimes be interesting to look at e.g. the velocity response for a seismometer (after all, the seismometer is normally a velocity transducer !!). Enter the appropriate number.

AMPLIFIER GAIN (DB) ?

This is the amplifier gain in dB. Since this question is only asked once, this gain must include gain of all units except the recorder (asked below). This could e.g. include gain of the VCO system.

NUMBER OF FILTERS (0-10), RETURN FOR NONE ?

Up to 10 filters can be specified. If you answer 0, no filters are used and no more questions on filters will appear. Otherwise one line of input must be given for each filter as follows:

FREQUENCY AND NUMBER OF POLES FOR EACH FILTER,
POLES NEGATIVE FOR HIGH PASS

Each line requires two numbers, the corner frequency of the filter and the number of poles. A high pass filter is given by letting number of poles be negative. It is not always easy to know whether a filter is e.g. one 2 pole or two 1 pole filters, the user needs to experiment with this.

FILE NAME FOR FILE WITH POLES AND ZEROS, RETURN FOR NO FILE

Here a file with poles and zeros can be entered. If seismometer constants have been chosen above, the values calculated with poles and zeros are multiplied with the values previously calculated. The free format file contains:

1. line: NP: Number of poles, NZ: Number of zeros, Norm: Normalization constant
Following NP lines contain one pair each of real and imaginary poles
Following NZ lines contain one pair each of real and imaginary zeros

NOTE: The unit of frequency is radian/s so if in Hz, multiply with and normalization constant in .

The next 2 options are only shown if the output file is selected to be FAP:

FILE NAME FOR TABULATED VALUES, RETURN FOR NO FILE

Here a file with tabulated values are entered. If seismometer constants or poles and zeros have been chosen above, the tabulated values will be interpolated and multiplied with the values previously calculated for from above. The free format file contains:

1. line: N: Number of tabulated values, Norm: Normalization constant
Following N lines contain one each frequancy, amplitude and phase(deg)

GIVE FILE NAME FOR MEASURED VALUES, RETURN FOR NONE

Give file name for measured values. In most cases you have none so just make a return. The format of the input file is as follows:

frequency, amplitude, phase
frequency, amplitude, phase
etc.

e.g.

0.2,0.7,200
0.7,0.8,100
10.0,0.1,33

The file has no blank lines and can contain up to 60 data sets. It is important to note that the amplitude values should be NORMALIZED at 1.0 Hz.

Now there is no more input to the response parameters, and the output is:

GAIN FACTOR AT 1.0 HZ: 12345.6

This is the gain of the system at 1.0 Hz and is also the value for normalizing the response curve, that is, all calculated values are divided by this number. There is no unit for gain of an amplifier and for displacement response using a seismometer and drum recording. If the recording is digital, the unit would be counts/meter and for a velocity response counts/meter/second etc. If a file with poles and zeros is used without any other information, the normalization constant must have the unit of count/m, similar for the tabulated input.

Further output is given in a file called resp.out, see Table 1 for an example.

The response curves (amplitude and phase) are now printed/plotted on the screen. First comes the amplitude response (amplitude in db versus log frequency). By pushing return, the phase response is shown (phase shift (deg) versus log frequency). After the plots, the SEISAN calibration file can optionally be made, follow instructions, see example below. The response file MUST be calculated for the displacement response, and all calculation in SEISAN assume that response is calculated in counts/m.

After the SEISAN response file is made, the current parameters will be displayed and one or several can be changed without entering all again. Like if the gain has changed at a certain date, only change date and gain. This feature (new in SEISAN7.2) has been put in to be able to quickly make many similar response files, like when all files have to be put in for a network.

Comments to data for response files

Station and channel codes
It is important that the station and channel codes are made exactly as they appear in the waveform files. If not, SEISAN is not able to identify the channel.

Date
The date given here corresponds to the date from which the calibration information is valid. The SEISAN system will always look for the most recent calibration file relative to the date of the earthquake.

Latitude, longitude and elevation
These data are for information only, it is not used anywhere in SEISAN, so it does not have to be entered, however there is room for it in the SEISAN waveform file headers.

Comment
No information used by the system.

Plot
After the response file has been written out, a plot is made with PRESP of the file. There will also be a plotfile, presp.eps, which can be sent to the printer. The response file can store the response in different ways:

1. Parameters used for calculating the response: Generator constant, filters etc. In addition, the response (amplitude and phase) at 30 frequencies are listed. In this case the response is calculated from the parameters.
2. Incomplete set of parameters or no parameters and the response at 30 frequencies. In this case the response is calculated by interpolation of the 30 values.
3. Poles and zeros: No discrete values are given and the response is calculated directly from the poles and zeros.

See also Appendix B for the SEISAN waveform file format and section 5.2.2.

IMPORTANT: PUT RESPONSE FILE IN CAL DIRECTORY OR ONE OF ITS STATION SUBDIRECTORIES. Response files can also be in working directory but this is not advisable except for testing.

Example of running the program:

oxygen-(larso)23: resp

RESP - PROGRAM TO CREATE RESPONSE FILES IN SEISAN
OR GSE FORMAT. THE RESPONSE CAN BE CREATED
AS POLES AND ZEROS (PAZ) OR FREQUENCY
AMPLITUDE AND PHASE (FAP). THE SAME
TRANSFER FUNCTION AND FILTERS ARE USED
IN BOTH CASES.

CHOSE OUTPUT FORMAT: 0: NO OUTPUT FILE
1: SEISAN FAP
2: SEISAN PAZ
3: GSE2 FAP
4: GSE2 PAZ
4
TYPE OF SENSOR:       1: NONE
2: SEISMOMETER
3: ACCELEROMETER
2
SEISMOMETER NATURAL PERIOD ?
1
SEISMOMETER DAMPING RATIO ?
.7
SENSOR LOADED GENERATOR CONSTANT (V/M/S OR V/G) ?
300
RECORDING MEDIA GAIN (COUNT/V OR M/V) ?
2048
AMPLIFIER GAIN (DB) ?
40
NUMBER OF FILTERS (0-10), RETURN FOR NONE ?
1
FREQUENCY AND NUMBER OF POLES FOR EACH FILTER,
POLES NEGATIVE FOR HIGH PASS
10 2
FILE NAME FOR FILE WITH POLES AND ZEROS, RETURN FOR NO FILE

FILE NAME FOR MEASURED VALUES, RETURN FOR NO FILE

AMPLITUDE RESPONSE   SEISMOMETER       DISPLACEMENT
AMPL      ---------------------------------------------------------------
9.88     I.         .         .         .         . ++++++++++        .I
3.66     I                                    ++++++          ++++++   I
1.36     I.         .         .         .  +++    .         .       +++I
0.504     I                             + ++                            I
0.187     I. . . . . . . . . . . . . .++ . . . . . . . . . . . . . . . .I
0.694E-01 I                         ++                                  I
0.257E-01 I.         .         .  ++     .         .         .         .I
0.955E-02 I                     ++                                      I
0.354E-02 I.         .        ++         .         .         .         .I
0.131E-02 I. . . . . . . . .++ . . . . . . . . . . . . . . . . . . . . .I
0.488E-03 I.         .    ++   .         .         .         .         .I
0.181E-03 I             ++                                              I
0.671E-04 I.         .++       .         .         .         .         .I
0.249E-04 I         ++                                                  I
0.924E-05 I. . . .++ . . . . . . . . . . . . . . . . . . . . . . . . . .I
0.343E-05 I     ++                                                      I
0.127E-05 I.  ++     .         .         .         .         .         .I
0.472E-06 I ++                                                          I
0.175E-06 I+         .         .         .         .         .         .I
---------------------------------------------------------------
FREQ      0.01      0.03      0.14      0.71      3.68     19.19    100.00
GAIN FACTOR AT 1 HZ: 0.276E+09     RETURN FOR PHASE RESPONSE

PHASE RESPONSE   SEISMOMETER       DISPLACEMENT
PHAS DEG  ---------------------------------------------------------------
163.     I.         .         .         .  +      .         .         .I
144.     I                                  ++                         I
125.     I.         .         .         .     +   .         .         .I
106.     I                                     ++                      I
87.1     I. . . . . . . . . . . . . . . . . . . .++ . . . . . . . . . .I
68.0     I                                         ++                  I
49.0     I.         .         .         .         .  ++     .         .I
29.9     I                                             +               I
10.8     I.         .         .         .         .     +   .         .I
-8.21     I. . . . . . . . . . . . . . . . . . . . . . . .++ . . . . . .I
-27.3     I.         .         .         .         .        +.         .I
-46.3     I                                                  +++        I
-65.4     I.         .         .         .         .         .  ++++   .I
-84.4     I++++++++++++++                                           ++++I
-103.     I. . . . . . . ++++++++++. . . . . . . . . . . . . . . . . . .I
-123.     I                        +++                                  I
-142.     I.         .         .      ++ .         .         .         .I
-161.     I                             + +                             I
-180.     I.         .         .         . +       .         .         .I
---------------------------------------------------------------
FREQ      0.01      0.03      0.14      0.71      3.68     19.19    100.00
GSE RESPONSE FILE (Y/N=default)?y
Enter station code. e.g. BERGE, max 5 chars
TEST
Enter component (4 chars) e.g. SH Z
First character is type, should be one of the following:
E, S, H, B, M, L, U
Second character is instrument code, should be one of the following:
H, L, G, M, N
Third character is not used, leave blank
Last character is orientation, must be Z,N or E
S  Z
Enter date as YYYYMMDDHHMMSS, at least up to the day  (e.g. 19880123):20000101
Latitude (Up to 4 decimal places and - for south), return for none:
Longitude (Up to 4 decimal places and - for west), return for none:
Enter elevation in meters (integer), return for none:
Enter comments, one line. e.g. amp type, sensor type return for none

Response file name is: TEST_S__Z.2000-01-01-0000_GSE

RESPONSE CURVE IS IN FILE resp.out



Problem: The response file naming has not changed according to the SEED convention so location and network code cannot be entered using RESP, however they can be entered manually in response file (see response file format). This menas that e.g. SHZ must be entered as SH Z since only 3 of the 4 character are used. For older data in SEISAN format, all 4 characters can be used.

Examples of response files is given in Appendix C.

Peter Voss : Fri Nov 12 10:33:10 UTC 2021