L1 Instructions L2 Computing and plotting instrument response, I(ω)

advertisement
Lab: Instrument response
GEOS 626: Applied Seismology, Carl Tape
Last compiled: March 30, 2016
L1
Instructions
• You will use lab response.m (see Appendix A). The example station is CAN, which is in
Canberra, Australia, and featured in Park et al. (2005, Figure 1).
• Background reading on instrument response and Fourier analysis:
Stein and Wysession (2003, Ch. 6)
• This lab and the associated problem set utilize the GISMO (“GI Seismology”) Waveform
Suite for Matlab developed by Celso Reyes and Michael West (Reyes and West, 2011). This
is installed on the network and will not be available off the network computers (unless you
install it yourself). For information, see
http://www.giseis.alaska.edu/input/celso/matlabweb/waveform_suite/waveform.html
In Matlab, type methods waveform to see the main functions in the toolbox.
• There are different tools in seismology for deconvolving instrument responses and for processing seismic waveforms. We are using Matlab and GISMO, but alternative tools include
ObsPy (Beyreuther et al., 2010) and SAC (Goldstein et al., 2003). Do not get bogged
down in the details of the functions we are using; at some level, we have to use
certain functions as black boxes. Our goal is to understand how to use these tools.
• There are no formal exercises for this lab. Your goal is to understand how an instrument
response is defined (e.g., as a set of poles and zeros of a complex function), how it is
plotted (e.g., as phase and amplitude, each varying with frequency), and how it depends
on displacement, velocity, and acceleration.
L2
Computing and plotting instrument response, I(ω)
Run lab response.m, which produces Matlab figures 1–5.
• Figure 1 (Figure L1) is generated with two commands
res0 = response_get_from_db(station,channel,startTime,f,dbname);
response_plot(res0);
This uses utilities within GISMO to read the instrument response within the Antelope
database. What is needed to get the instrument response is the station (CAN), then channel
(LHZ), a time, a vector of frequencies, and the name of the database. The time (startTime)
is needed because the instrument response may change as a function of time, based on
changes made at the station, either from in-person visits or from remote interaction. The
1
instrument response file could change because, for example, maybe the sensor is replaced,
or it is reoriented, or the response is updated from what the manufacturer provided.
The plot shows φ(ω) and A(ω), where
I(ω) = A(ω)eiφ(ω)
(L1)
For most theoretical derivations, ω = 2πf tends to simplify the notation. However, for
interpretation purposes, f (or period, T = 1/f ) is a more intuitive quantity. Most of our
plots will use f , not ω.
The instrument response here is not just the response of the instrument; it also includes
the digitizer. The sample rate for this channel is 1 sample per second (∆t = 1 s), so the
Nyquist frequency
fNyq = 1/(2∆t)
(L2)
is fNyq = 0.5 Hz. For f > fNyq we see that the phase response is quite complicated (this is
the FIR filter), and the amplitude response declines to 10−5 .
As a general rule, you need to be very careful if you are looking at signals with frequencies
above fNyq .
• Figure 2 (Figure L1) matches Figure 1 and shows that the instrument response plot is the
same when you read the response file STRECKEISEN_STS1.5 directly, rather than getting
the response from an antelope database.
• Figure 3 (Figure L2) shows what the instrument response looks like when the digitizer+FIR
filters are ignored. This is the classical “simple” plot of a pole-zero response.
• Figure 4 (Figure L2) matches Figure 3 and shows that you get the same result when you
read a pole-zero file. This pole-zero file looks like this:
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
**********************************
NETWORK
(KNETWK): G
STATION
(KSTNM): CAN
LOCATION
(KHOLE):
CHANNEL
(KCMPNM): LHZ
CREATED
: 2012-03-26T22:39:01
START
: 1989-06-02T00:00:00
END
: 2006-12-10T02:60:60
DESCRIPTION
: Canberra, Australia
LATITUDE
: -35.321000
LONGITUDE
: 148.999000
ELEVATION
: 650.0
DEPTH
: 0.0
DIP
: 0.0
AZIMUTH
: 0.0
SAMPLE RATE
: 1.0
INPUT UNIT
: M
OUTPUT UNIT
: COUNTS
INSTTYPE
: STRECKEISEN STS1
2
* INSTGAIN
: 2.252000e+03 (M/S)
* COMMENT
: N/A
* SENSITIVITY
: 1.844840e+09 (M/S)
* A0
: 3.727650e+12
* **********************************
ZEROS 3
+0.000000e+00 +0.000000e+00
+0.000000e+00 +0.000000e+00
+0.000000e+00 +0.000000e+00
POLES 10
-1.233947e-02 +1.234318e-02
-1.233947e-02 -1.234318e-02
-3.917563e+01 +4.912335e+01
-3.917563e+01 -4.912335e+01
-3.034990e+01 +7.868112e+00
-3.034990e+01 -7.868112e+00
-2.220727e+01 +2.208852e+01
-2.220727e+01 -2.208852e+01
-8.135964e+00 +3.016618e+01
-8.135964e+00 -3.016618e+01
CONSTANT +6.876917e+21
QUESTION: What are the input and output units for this instrument response?
QUESTION: What is the time interval over which this instrument response is valid?
• Figure 5 (Figure L3) shows the instrument response Id (ω) to displacement, velocity Iv (ω),
and acceleration Ia (ω). We will see in the homework that
Xv (ω) = (iω)Xd (ω)
Xa (ω) = (iω)Xv (ω)
where Xd , Xv , and Xa are the Fourier transforms of displacement xd (t), velocity xv (t), and
acceleration xa (t).
We also have the relationship between ground motion, instrument response, and the output
from a seismometer:
xa (t) ∗ ia (t) = c(t)
(L3)
Xa (ω)Ia (ω) = C(ω)
(L4)
Here we have assumed that the the instrument response is described with respect to acceleration. But we could alternatively consider the instrument response with respect to
velocity or displacement; the key point is that what comes out of the seismometer,
C(ω), is fixed. But we can describe the input ground motion as displacement, velocity, or
3
acceleration. Showing all three together and omitting explicit ω dependence, we have
C = Xa Ia = Xv Iv = Xd Id
(L5)
= (iω)Xv Ia = (iω)Xd Iv = Xd Id
2
= (iω) Xd Ia = (iω)Xd Iv = Xd Id
(L6)
(L7)
Iv = Id /(iω)
(L8)
Ia = Iv /(iω)
(L9)
It turns out that the effect of differentiation in the time domain leads to an increase by a
factor of one in the slope of the amplitude spectrum, |H(ω)|, in log-log space, for example,
by changing from Xd (ω) to Xv (ω). But when we are looking at the instrument response,
the slope will decrease by a factor of one when changing from, say, Id (ω) to Iv (ω).
We see this in Figure L3. Consider the flat segment in Iv (ω). Change to Ia (ω) and the
slope decreases; change to Id (ω) and the slope increases.
QUESTION: What is meant by a “broadband” seismometer?
L3
Deconvolve instrument response for a seismogram
FUTURE PART OF THE LAB (see also lab_sumatra.pdf):
otime = 2004-12-26 00:58:50 = 732307.040856 [matlab days]
station CAN.G
duration = 10 days
start time: t1 = otime - duration - 1
end time: t2 = t1 + duration
channels: LHZ, LHE, LHN
Deconvolve instrument response on all three components.
Plot the amplitude spectrum over 0.2--1.0 mHz to show the gravest mode peaks.
Show what the main arrival looks like at bandpass 50-500s with and without decon.
Rotate to R and T to isolate SH waves.
[Having the previous 10 days allows for the noise analysis in hw_sumatraA.pdf]
4
References
Beyreuther, M., R. Barsch, L. Krischer, T. Megies, Y. Behr, and J. Wassermann (2010), ObsPy:
A Python toolbox for seismology, Seis. Res. Lett., 81 (3), 530–533, doi:10.1785/gssrl.81.3.530.
Goldstein, P., D. Dodge, M. Firpo, and L. Minner (2003), SAC2000: Signal processing and
analysis tools for seismologists and engineers, in International Handbook of Earthquake and
Engineering Seismology, International Geophysics Series, vol. 81B, edited by W. H. K. Lee,
H. Kanamori, P. C. Jennings, and C. Kisslinger, pp. 1613–1614, Academic Press.
Park, J., et al. (2005), Earth’s free oscillations excited by the 26 December 2004 Sumatra Andaman earthquake, Science, 308, 1139–1144.
Reyes, C. G., and M. E. West (2011), The Waveform Suite: A robust platform for manipulating
waveforms in MATLAB, Seis. Res. Lett., 82, 104–110, doi:10.1785/gssrl.82.1.104.
Stein, S., and M. Wysession (2003), An Introduction to Seismology, Earthquakes, and Earth
Structure, Blackwell, Malden, Mass., USA.
A
Matlab script lab response.m
clear, close all, clc
deg = 180/pi;
spdy = 86400;
% seconds per day
% print figures to files
iprint = 0;
pdir = ’./’;
% test file is the 2004 Sumatra earthquake recorded at CAN.G,
% featured in Figure 1 of Park et al. 2005 (Science)
ddir = ’/home/admin/databases/SUMATRA/data/’;
tdir = [ddir ’CAN_test/’];
dbname = [ddir ’sumatra’];
station = ’CAN’;
netwk = ’G’;
% note: the network is not added to ’waveform’ (get(w,’network’))
channel = ’LHZ’;
stlab = [station ’_’ netwk ’_’ channel];
pzfile = [tdir ’SAC_PZs_G_CAN_LHZ__1989.153.00.00.00.0000_2006.344.02.60.60.99999’];
% waveform time interval
% note: start time needed to access response file
startTime0 = datenum(2004,12,25,12,58,50);
endTime0 = datenum(2005,1,4,12,58,50);
% pick times to get the entire waveform that is in the database
startTime = startTime0 - 1;
endTime = endTime0 + 1;
dlabs = {’m to counts’,’m/s to counts’,’m/s^2 to counts’};
%==========================================================================
5
% specify frequencies
fmin = 1e-4;
fmax = 1e2;
numf = 100;
f = logspace(log10(fmin),log10(fmax),numf)’;
omega = 2*pi*f;
% note: Although f=0 is an allowable frequency for FFT, you will crash the
%
functions below if you have f=0 included. In our homework problems,
%
the frequency vector will be provided when the fft operation is
%
applied.
aran = 10.^[-20 1.5];
% default option: get instrument response from antelope database
% FIGURE 1
res0 = response_get_from_db(station,channel,startTime,f,dbname);
response_plot(res0,[fmin fmax]); ylim(aran);
title(’response_get_from_db.m’,’interpreter’,’none’);
if iprint==1, print(gcf,’-depsc’,sprintf(’%sCAN_response_fig1’,pdir)); end
if 0==1
% res0 is a matlab structure
% note: the amplitude of abs(res0.values) is NORMALIZED to 1 (by calib)
res0
res0.calib
res0.units
Ivcheck = res0.values / (res0.calib*1e-9); % to match results below
figure;
subplot(2,1,1); semilogx(res0.frequencies,angle(Ivcheck));
subplot(2,1,2); loglog(res0.frequencies,abs(Ivcheck));
break
end
% Here we create a response object by directly specifying the response file.
% For one file we manually removed the FIR filters in order to show that it
% would then match the response obtained from the converted-to-velocity
% sac pole-zero file.
% FIGURES 2 and 3
for kk=1:2
if kk==1
rfile0 = ’STRECKEISEN_STS1.5’;
else
rfile0 = ’STRECKEISEN_STS1.5_noFIR’;
end
rfile = [tdir rfile0];
respObject = dbresponse(rfile);
response.values = eval_response(respObject,omega);
response.frequencies = f;
response_plot(response,[fmin fmax]);
ylim(aran);
title(rfile0,’interpreter’,’none’);
if iprint==1, print(gcf,’-depsc’,sprintf(’%sCAN_response_fig%i’,pdir,kk+1)); end
end
% compare CAN response in antelope database (no FIR) with PZs from sac file
% FIGURE 4 (should match Figure 3)
6
ideriv = 1;
% response to VELOCITY
listfile = true;
[p,z,c,A0,k] = read_pzfile(pzfile,ideriv,listfile);
polezero.poles = p;
polezero.zeros = z;
polezero.normalization = A0;
% A0 (not c) needed to match normalization
res = response_get_from_polezero(f,polezero);
response_plot(res,[fmin fmax]); ylim(aran);
title([’sac pole-zero file: ’ dlabs{ideriv+1}]);
if iprint==1, print(gcf,’-depsc’,sprintf(’%sCAN_response_fig4’,pdir)); end
% relationship between PZ constants (sac) and calib (antelope)
% note: c = A0*k <==> CONSTANT = A0*SENSITIVITY
res0.calib*1e-9, 1/k
%----------------------% compare displacement, velocity, and acceleration spectra
% Note that all response plots are normalized such that the
% VELOCITY RESPONSE = 1 at some calibration period.
% FIGURE 5
% first: use read_pzfile.m (add one pole=0 per differentiation)
xf = 5; % figure index
figure(xf); nr=3; nc=2;
for kk=1:3
ideriv = kk-1;
[p,z,c,A0,k] = read_pzfile(pzfile,ideriv);
% c = A0*k
polezero.poles = p;
polezero.zeros = z;
polezero.normalization = c;
% note c, not A0
res = response_get_from_polezero(f,polezero);
% complex instrument response to either displacement, velocity, or acceleration
Ix = res.values;
% phase response
subplot(nr,nc,2*kk-1); semilogx(f,angle(Ix)*deg); axis([fmin fmax -180 180]);
xlabel(’frequency, Hz’); ylabel(’phase, deg’);
% amplitude response
subplot(nr,nc,2*kk); loglog(f,abs(Ix)); xlim([fmin fmax]);
xlabel(’frequency, Hz’); ylabel(’amplitude’);
[maxI,imax] = max(abs(Ix));
title({sprintf(’sac pole-zero file (%s)’,dlabs{kk})...
sprintf(’max = %.3e at %.3e Hz’,maxI,f(imax)) });
end
% THIS IS ONLY A CHECK
% second: check this operation by dividing by i*omega for each operation
%
(here we plot in dashed red lines on Figure 10 to show an exact match)
% note: FFT[ f’(t) ] = i*w*FFT[ f(t) ]
[p,z,c,A0,k] = read_pzfile(pzfile,0); % displacement
polezero.poles = p;
polezero.zeros = z;
polezero.normalization = c;
res = response_get_from_polezero(f,polezero);
Id = res.values;
% displacement
figure(xf); subplot(nr,nc,1); hold on; plot(f,angle(Id)*deg,’r--’); grid on;
figure(xf); subplot(nr,nc,2); hold on; plot(f,abs(Id),’r--’); axis(10.^[-4 2 -5 12]); grid on;
Iv = Id./(1i*omega);
% velocity
7
figure(xf); subplot(nr,nc,3); hold on; plot(f,angle(Iv)*deg,’r--’); grid on;
figure(xf); subplot(nr,nc,4); hold on; plot(f,abs(Iv),’r--’); axis(10.^[-4 2 -5 12]); grid on;
Ia = Id./(-omega.^2); % acceleration
figure(xf); subplot(nr,nc,5); hold on; plot(f,angle(Ia)*deg,’r--’); grid on;
figure(xf); subplot(nr,nc,6); hold on; plot(f,abs(Ia),’r--’); axis(10.^[-4 2 -5 12]); grid on;
if iprint==1, orient tall; print(gcf,’-depsc’,sprintf(’%sCAN_response_fig%i’,pdir,xf)); end
8
180
135
Phase (degrees)
90
45
0
−45
−90
−135
−180 −4
10
−3
10
−2
−1
10
10
0
10
1
10
2
10
response_get_from_db.m
0
Normalized amplitude
10
−5
10
−10
10
−15
10
−20
10
−4
10
−3
10
−2
10
−1
10
Frequency (Hz)
0
10
1
10
2
10
Figure L1: Figure 1 output from lab response.m. Note that the amplitudes are normalized by
the maximum value.
9
180
135
Phase (degrees)
90
45
0
−45
−90
−135
−180 −4
10
−3
10
−2
−1
10
10
0
10
1
10
2
10
STRECKEISEN_STS1.5_noFIR
0
Normalized amplitude
10
−5
10
−10
10
−15
10
−20
10
−4
10
−3
10
−2
10
−1
10
Frequency (Hz)
0
10
1
10
2
10
Figure L2: Figure 3 output from lab response.m. Note that the amplitudes are normalized by
the maximum value.
10
sac pole−zero file (m to counts)
max = 4.601e+10 at 4.037e+00 Hz
150
10
10
50
amplitude
phase, deg
100
0
−50
5
10
0
10
−100
−150
−5
−4
10
−2
0
10
10
frequency, Hz
10
2
−4
10
10
−2
0
10
10
frequency, Hz
2
10
sac pole−zero file (m/s to counts)
max = 1.874e+09 at 3.054e+00 Hz
150
10
10
50
amplitude
phase, deg
100
0
−50
5
10
0
10
−100
−150
−5
−4
10
−2
0
10
10
frequency, Hz
10
2
−4
10
10
−2
0
10
10
frequency, Hz
2
10
sac pole−zero file (m/s2 to counts)
max = 7.493e+10 at 2.848e−03 Hz
150
10
10
50
amplitude
phase, deg
100
0
−50
5
10
0
10
−100
−150
−5
−4
10
−2
0
10
10
frequency, Hz
10
2
10
−4
10
−2
0
10
10
frequency, Hz
2
10
Figure L3: Figure 5 output from lab response.m. The dashed red lines are plotted on top of
the blue lines as a check.
11
Download