1 | |
---|
2 | |
---|
3 | Recursive filters from poles and zeros files using MATLAB: |
---|
4 | |
---|
5 | - type the FFT filter file (e.g. GRSN_S+G_WWSSN_SP.FLF) |
---|
6 | ! file GRSN_S+G_WWSSN_SP.FLF |
---|
7 | ! ===================== |
---|
8 | ! |
---|
9 | ! version 1, 25-Nov-94 |
---|
10 | ! |
---|
11 | ! simulation filter for |
---|
12 | ! seismometer h1 (0.670000), T1 (1.250000) |
---|
13 | ! galvanometer h2 (0.840000), T2 (0.750000) |
---|
14 | ! recorded at instrument |
---|
15 | ! seismometer h0 (0.707000), T0 (120.900002) |
---|
16 | ! K. Stammler, 25-Nov-94 |
---|
17 | 1357913578 |
---|
18 | 1 |
---|
19 | 7.018386e+01 |
---|
20 | 2 |
---|
21 | (-3.674286e-02,-3.675396e-02) |
---|
22 | (-3.674286e-02,3.675396e-02) |
---|
23 | 4 |
---|
24 | (-3.367788e+00,-3.731514e+00) |
---|
25 | (-3.367788e+00,3.731514e+00) |
---|
26 | (-7.037168e+00,-4.545562e+00) |
---|
27 | (-7.037168e+00,4.545562e+00) |
---|
28 | |
---|
29 | - call MATLAB and define column vectors with complex zeros and poles: |
---|
30 | >> Z = [ |
---|
31 | -0.0367 - 0.0368i |
---|
32 | -0.0367 + 0.0368i |
---|
33 | ] |
---|
34 | >> P = [ |
---|
35 | -3.3678 - 3.7315i |
---|
36 | -3.3678 + 3.7315i |
---|
37 | -7.0372 - 4.5456i |
---|
38 | -7.0372 + 4.5456i |
---|
39 | ] |
---|
40 | |
---|
41 | - define gain K and sample frequency Fs |
---|
42 | K = 7.018386e+01 |
---|
43 | Fs = 20 |
---|
44 | |
---|
45 | - compute transfer function using zp2tf: |
---|
46 | [num,den] = zp2tf( Z, P, K ) |
---|
47 | |
---|
48 | - compute recursive coefficients using bilinear |
---|
49 | [NUMd,DENd] = bilinear( num, den, Fs ) |
---|
50 | |
---|
51 | - create FLR-file: |
---|
52 | 1. line '1357913578' |
---|
53 | 2. line '3' |
---|
54 | 3. line sample distance in s |
---|
55 | 4. line gain factor |
---|
56 | 5. line number of NUMd elements |
---|
57 | from 6. line: list NUMd elements |
---|
58 | N. line: number of DENd elements |
---|
59 | from N+1. line: list DENd elements |
---|