Professional Documents
Culture Documents
2013 5 20
ii
MATLAB
cnki
MATLAB2012
1.2012.12.15~2013.2.22
2.2013.2.22~2013.4.30
3.2013.4.30~2013.5.15
4.2013.5.15~2013.5.24 ppt
II
iii
1 2 3
3
1
2012.9.15~2012.12.15
MATLAB
MATLAB
cnki
2
2013.12.20~2013.3.20
MATLAB
iii
iv
3
2013.3.30~2013.4.30
4
2013.5.10
1
2
3
4
IV
vi
VI
vii
[]
()(N )
LSQR
MARTLAB
[]MATLAB
vii
viii
[Abstract]
Spectral Inversion is a method that can, by inversing the seismogram, identify
the thin-bed whose thickness is below the limiting resolution.
Nowadays, oil and gas are of great importance. However, as much of them had
been mined, remains are getting harder to be explored. Technology needs to catch up
with it in order to improve the efficiency of mining. Spectral Inversion is a new method
among many useful ones. Theoretically, it can identify thin-bed with thickness less than
limiting resolution which might largely contains oil and gas.
In the first place, we discussed the basic theory of Spectral Inversion.
Demonstrated the relative theory of Mathematics, Physics and Seismology and derived
formulas from them. They are disciplines of frequency spectral analysis, characteristics
of Fourier Transform, convolution model of seismogram, reflectivity and odd-even
decomposition.
In addition, we derived the objective function of Spectral Inversion. Then we
derived a matrix from the objective function which would be used for programming.
We discussed the ill-posed possibilities of Spectral Inversion and described the LSQR
algorithm used for calculating the objective function.
In the end, based on MATLAB, we practiced the theory and discussed the
influence factors as well as the differences between theories and practical conditions.
[Key words]: Seismic inversion, Spectral Inversion, Reflectivity, Objective Function
MATLAB Simulation
VIII
ix
........................................................................................................................... 1
1.1
..................................... 1
1.2
................................... 2
1.3
..................................... 3
..................................................................................................... 5
2.0
2.1
................................. 5
2.0.1
................................................ 6
2.0.2
............................ 9
.......................................... 12
2.1.1
............................................. 13
2.1.2
............................................. 14
2.1.3
............................................. 17
2.1.4
..................................... 18
2.2
...................................... 19
2.3
............................................ 20
.............................................................................................. 22
3.1
.............................. 22
3.1.1
............................. 22
3.1.2
............................. 26
3.2
............................................ 29
3.3
.................................. 32
.............................................................................................................. 36
4.1 ........................................... 36
4.2
............................................ 38
4.3
........................................ 39
4.3.1
LSQR .............................. 39
4.3.2
LSQR .................................. 39
ix
.................................................................................... 41
5.1
........................................ 41
5.1.1 LSQR ................... 43
5.2
5.3
5.4
........................................ 48
5.2.1
........................... 48
5.2.2
................. 49
.................................... 50
5.3.1
............................... 51
5.3.2
................................... 53
.................... 55
.............................................................................................................................................. 56
............................................................................................................................... 57
.............................................................................................................................................. 58
.............................................................................................................................................. 59
A MATLAB .............................. 59
1......................................... 59
2............................... 60
3............................. 60
420 ........................ 64
6................................... 66
1.1
1993
2
[1]
30Hz
3000 Widess(1973) 25
25
10
[11]
1.2
80
2004 Partyka
2
[11]
2009 Sanyi Yuan
[19]
2009 Satinder.Chopra John P.Castagna
[79]
1.3
LSQR
4
MATLAB
20
-----
2.0
(2.0-1)
Dirichlet
5
(2.0-1),
Dirichlet [15]:
1
2
3
[2]
2.0.1
(2.0.1-1)
u(t) = A cos( + )
A
2(2.0.1-1)
u(t) = A [cos cos sin sin]
(2.0.1-2)
= cos + sin
= A cos = A sin
(2.0.1-2)
3 Euler
u(t) = + +
1
(2.0.1-3)
+ = 2 ( + ) , = 2 ( )
T, =
6
u(t)
nu(t)
u(t)
u(t) =
=0 cos( + )
(2.0.1-4)
=
=0 cos() + sin( )
(2.0.1-5)
= +
)
=(
(2.0.1-6)
= 2 + 2
= () cos()
(n = 0,1,2, ),
= 2 () sin()
(n = 0,1,2, ),
= tan1 ( ),
= |
| | = 2 + 2
u(t)
(2.0.1-6)
u(t)(2.0.1-2)
(2.0.1-2) 2006
(2.0.1-2)a| |
= tan1 ( )
(2.0.1-3)A =440Hz
7
= 440()
Dirichlet
+ 1
u(t) =
()
(2.0.1-7)
(2.0.1-6)()
u(t)
+
() = u(t)
(2.0.1-8)
u(t) ()(2.0.1-7)(2.0.1-8)
1u(t)
t2
u(t)()()
8
()
(2.0.1-4) () 2006
(2.0.1-4)1
(1 + ),1 , (1 + )
11 + tan1 (1 )
(2.0.18)
1
2
=
1
2
|(1 )| = |(1 )|
(2.0.1-9)
|(1 )|1 =
()[2]
2.0.2
2.0.2.1
()u(t)u(t)
()()u(t)
u(t) ()
10
2.0.2.2
u(t) ()u(t/a) ()a
t1 = 1 = ,dt1 =
+
u(t/a) =
u(t1 ) 1 1 =
u(t1 ) 1 1 1 = (1 )
= ()
2.0.2.2-1
:
2.0.2.3
u(t) ()
u(t ) ()
10
(2.0.2.3-1)
11
t1 = t
+
u(t ) = u(t1 ) (1 ) (1 )
+
u(t1 ) 1 (1 ) = ()
2.0.2.4
u1 () 1 ()
u2 () 2 ()
u1 ()u2 (t ) = 1 () 2 ()
(2.0.2.4)
[ u1 ()u2 (t )] = [ u2 (t ) ] u1 ()
(2.0.2.3-1)
+
u2 (t ) = 2 ()
[ u1 ()u2 (t )] = 2 () u1 () =
+
2 () u1 () = 2 () 1 ()
(2.0.2.4)u1 ()u2 ()
u1 ()u2 ()
+
u1 () u2 () = u1 ()u2 (t ) = 1 () 2 ()
[2,13]
11
12
2.1
(2.1-1)
-----
(1)
A A (t)(t)
(2.1-1)(a)
x (t) 2.1(c)
x(t) = 1 ( 1 ) + 2 ( 2 ) + + ( ) +
(2.1-1)
(2.1-1)(2.1-1)
(t)
x(t)(t)
(2)
12
13
(2.1-2)(t)
(2.1-2)(a)(2.12)(b)(2.1-2)(c)
[8]
(2.1-2)
2.1.1
,
[5],
, ,,
[4]
[6]
30Hz Ricker ( 2.1.1-1)
13
14
w(t) = [1 2( ) ] 2( )
(2.1.1-1)
Ricker
(2.1.1-1)
2.1.2
2.1.2.1
xxy
u 0y
u(x, t)xt
,F = ma,dxdx
14
15
2 (,)
2
(2.1.2.1-1)
(,)
2 (,)
) =
(2.1.2.1-2)
u(x,t)
2 u(x,t)
x2
(,)
2 u(x,t)
x2
)=
2 (,)
2
(2.1.2.1-3)
2 u(x,t)
x2
1 2 (,)
2
(2.1.2.1-4)
2
()
2.1.2.1-5
2
()
(2.1.2.1-1)
2.1.2.2
(2.1.2.1-4)f(x vt)
15
(2.1.2.2-2)
16
2.1.2.3
2.1.2.3-1
x = 01 1 ,
2 2 x = 0
u1 (, ) = (1 ) + (+1 )
(2.1.2.3-1)
+xx
16
17
+x
u2 (, ) = (2 )
(2.1.2.3-2)
x = 0
x = 0
u1 (0, ) = 2 (0, ),
+ =
(2.1.2.3-3)
(2.1.2.3-3)
2.1.2.3-4
+ =
yx = 0
u1 (0,)
x
u2 (0,)
x
2.1.2.3-5
k1 ( ) = 2
(2.1.2.3-6)
v = ( )2 , = /v , (2.1.2.3-6)
1 v1 (A B) = 2 v2
(2.1.2.3-7)
2.1.2.3-4(2.1.2.3-7),
B
12 = A =
1 v1 2 v2
1 v1 +2 v2
2.1.2.3-8
T12 = A=
21 v1
1 v1 +2 v2
2.1.2.3-9
2.1.2.3-8
2.1.2.3-9
v v [3]
2.1.3
17
18
2.1.3-1
s(t)w(t)r(t)
2.1.3-1 Ricker
2.1.3-1reflection coefficient
Ricker seismogram
2.1.4
+
2.0.2.4 u1 ()u2 (t ) = 1 () 2 ()
(s(t)w(t)r(t)s(t) = w(t)
+
() = s(t) 2 )(u(t ) () )
() = s(t) 2
+
= w(t) r(t) 2
+
= ()( ) 2
18
19
= + ( ) 2 ()
+
= + () 2 ()
+
= () + 2 ()
2.1.4-1
= () ()
() = () ()
2.1.4-2
()s(t)()w(t)()
r(t)
s(t)w(t)r(t)
()()()[9]
[10]()()()
() = [()] + [()]
2.1.4-3
() = [()] + [()]
2.1.4-4
() = [()] + [()]
2.1.4-5
()()()
2.2
f(x)o(x)e(x)
2.2-1
(2.2-2)
(2.2-3)
(2.2-3)
f(x) = o(x) + e(x)
19
(2.2-4)
20
o(x) =
e(x) =
f(x) f(x)
(2.2-5)
2
f(x)+ f(x)
(2.2-6)
r(t)r (t)
r (t)[11]
r(t) = r (t) + r (t)r (t) =
r(t)r(t)
r(t)+r(t)
r (t) =
2.2-7
2.2-1
1 , 2 Even part
Odd part2.2-1
+ =
{ = 1
2.2-8
2.2-8
{
2 = 1 +2
2 = 1 2
2.2-9
2.3
Puryear and Castagna2008
[11]
2.2-1
20
21
2.2-1
(2.2-1)(2.2-2)
[( )] = [( )] [( )] [( )] [( )]
(2.2-1)
[( )] = [( )] [( )] + [( )] [( )]
(2.2-2)
21
22
3.1
3.1.1
3.1.1-1t1 t 2
r1 r2 T
[12](t):
+
(t)dt = 1
{
(t) = 0, (t 0)
(3.1.1-1)
(t)[13]
1() = 0
() (t 0 )= (0 ) (t 0 )
2() = 0
22
3.1.1-2
23
3.1.1-3
(t)()dt = (0)
(t) = 0, (t 0)
+
+0
3.1.1-4
0
(t 0 )()dt = (0 ) (t)dt = (0 )
0
3.1.1-5
r(t)[14](t = 0):
g(t)= r1 (t 1 ) + r2 (t 2 ) = r1 (t 1 ) + r2 (t 1 )(3.1.1-6)
(3.1.1-6)
+
R(f) = r1 (t 1 ) 2 + r2 (t 1 ) 2
(3.1.1-7)
3.1.1-5
+
R(f) = r1 (t 1 ) 2 + r2 (t 1 ) 2
+
= r1 (t 1 ) 2 + r2 (t 1 ) 2
= r1 21 + r2 2(1 +)
(3.1.1-8)
(t = 0)
t = 0
(3.1.1-9)
g(t) = r1 (t + 2) + r2 (t 2)
(3.1.1-6) (3.1.1-8)
(3.1.1-9)
+
R(f) = r1 (t + ) 2 + r2 (t ) 2 (3.1.1-10)
2
3.1.1-5
+
R(f) = r1 (t + 2) 2 + r2 (t 2) 2
+
= r1 (t + 2) 2 + r2 (t 2) 2
= r1 2(2 ) + r2 2(2 ) = r1 2 2 + r2 2 2
23
(3.1.1-11)
24
R(f) = r1 2 2 + r2 2 2
2 = 1 +2
2 = 1 2
(3.1.1-13)
12 12
Re[R(f)] = 2 cos()
Im[R(f)] = 2 sin()
(3.1.1-14)
t = (t1 + 2)
t = 0
g ((t1 + 2))(3.1.12(a))(3.1.1-2(b))
(3.1.1-2(a))
24
25
g ((t1 + 2))
(3.1.1-2(b))
2.0.2.3
u(t) ()
u(t ) ()
(2.0.2.3-1)
g(t t)
g(t t)
R(f) 2t
(3.1.1-15)
(3.1.1-13)
R(f) 2t =(2 cos() + 2 sin()) (cos(2t) jsin( 2t))
= 2 (cos() cos(2t) jcos() sin(2t)) +
2 ( sin() cos(2t) + sin() sin(2t))
= [2 (cos() cos(2t) + 2 sin() sin(2t)] +
25
26
(3.1.1-16)
g(t t)
R(f) 2t
Re[R(f) 2t ]
=2 (cos() cos(2t) + 2 sin() sin(2t)
(3.1.1-17)
Im[R(f) 2t ]
=2 sin() cos(2t) 2 cos(t) sin(2t)
(3.1.1-18)
3.1.2
NN(3.1.2-1)
N + 1NN
(3.1.2-1)
(N + 1)Nr1 r2 r3 r
26
27
Nt1 t 2 t 3 t
T1 1 N
T2 2 (N 1)
,T 2 ( 2 + 1)
tt = 0
r1 r tr2 r(1) t,
g(t)
[14]
:
T()
T()
T1
T2
2
g(t) = r1 (t + ) + r2 (t + ) + + r() (t +
) + r(+1) (t 2 )
2
2
2
2
2
2
+ + r(1) (t
2
1
) + r() (t )
2
2
(3.1.2-1)
(3.1.2-1)
2
g(t) = =1
[r (t + 2 ) + r(+1) (t 2 )]
(3.1.2-2)
(3.1.2-2)
R(f) =
+
=1 r (t
= =1 r
+ 2)
T
2( )
2
+ =1 r(+1) (t 2 ) 2
+ =1 r(+1) 2( 2 )
2
2
= =1
r 2( 2 ) + =1
r(+1) 2( 2 )
2
= =1
[r 2( 2 ) + r(+1) 2( 2 ) ]
(3.1.2-2)
( e = cos +
sin ) (3.1.2-2)
2
R(f) = =1
{[r [cos (2 ( 2 )) + sin(2 ( 2 ))] +
2
= =1
[(r + r(+1) ) cos(T ) + (r r(+1) ) sin(T )](3.1.2-3)
27
28
2r(,+1) = r + r(+1)
2r(,+1) = r r(+1)
(3.1.2-4)
2
R(f) = =1
[2r(,+1) cos(T ) + 2r(,+1) sin(T )]
(3.1.2-5)
(3.1.2-6)
2
Im[R(f)] = =1
2r(,+1) sin(T )
(3.1.2-7)
t(s)
t = (t + 2 )(t = 0)
:
[cos(2t) jsin(2t)]
(3.1.2-8)
(3.1.2-8)
28
29
Re[R(f)] =
(3.1.2-11)
Im[R(f)] =
(3.1.2-12)
3.2
2.1.4 (2.1.4-2)() = () ()
(2.1.4-2)
() =
()
()
(3.2-1)
[11]
29
30
()r r T
( )
O(r , r , T ) = a {Re [
] Re[R( )]}
( )
=1
( )
+ a {Im [
] Im[R( )]}
( )
=1
(3.2-2)
a a
(3.2-2)
s(t),w(t),
r(t),
()()R()
() =
()
()
(3.2-2)( )( )R( )
()
()()
-----
(3.2-2)
a + jb +
= 2
+ 2
2
+ +
+ 2
(3.2-3)
( )
( )
(3.2-3)Re [( )]Im [( )]
( )
[( )] [( )] + [( )] [( )]
Re [
]=
( )
[( )]2 + [( )]2
(3.2-4)
30
31
( )
[( )] [( )] [( )] [( )]
Im [
]=
( )
[( )]2 + [( )]2
(3.2-5)
(3.2-2)
O(r , r , T ) = a {
=1
[( )] [( )] + [( )] [( )]
[( )]2 + [( )]2
Re[R( )]}
+ a {
=1
[( )] [( )] [( )] [( )]
[( )]2 + [( )]2
Im[R( )]}
(3.2-6)
(3.2-2)( )
[9]
(3.2-1)
() = () ()
(3.2-7)
(3.2-8)
(3.2-8)Re[( ) ( )]Im[( ) ( )]
Re[( ) ( )] = [( )][( )] [( )][( )]
(3.2-9)
(3.2-10)
(3.2-11)
31
32
3.3
(3.2-11) 3.1.2
N
(3.1.2-11)(3.1.2-12)
3.1.2
Re[R()] =
(3.1.2-11)
Im[R()] =
(3.1.2-12)
(3.1.2-11)(3.1.2-12)f
Re[R( )]
(3.3-1)
Im[R( )]
32
33
(3.3-3)
(3.3-2)
Im[R( )]
(3.3-4)
(3.3-3)
2 2
2 2
(3.3-5)
(3.3-5)
Re[R( )]=
=1
=1
=1
(3.3-6)
(3.3-6)
r(1,)
=1
2 2
1
2
r(1,)
2
2
( , +1)
2
=1
2 2
1
2
(3.3-7)
(3.3-7) ,Re[R()]
33
34
Re[R()]
2 sin(m1,1 ) sin(n1 )
2 sin(m,1 ) sin (n )
2cos(m,1 ) cos (n )
r(1,)
[
]
r(,+1)
1
2
2 2
2 2
2cos(m1,1 ) cos(n1 )
+
2cos(m, ) cos (n )
2 2
2 ]
r(1,)
[
]
r(,+1)
2 2
2 2
1
2
(3.3-8)
Im[R()]
2 sin(m1,1 ) cos(n1 )
r(1,)
[
]
r(,+1)
2 2
1
2
2 2
2cos(m1,1 ) sin(n1 )
[
2cos(m,1 ) sin(n )
2
2cos(m1, ) sin(n1 )
2cos(m, ) sin(n )
2 2
2 2
r(1,)
[
]
r(,+1)
2 2
1
2
(3.3-9)
(3.2-11)
(3.2-11)
[()]
]
[ ]
=[
]
1
[()] 1
(3.2-12)
34
35
,(1, )
2
r(1,)
= [
]
r(,+1)
2 2
r(1,)
= [
]
r(,+1)
2 2
1
2
1
2
Re[(1 )]
[()] = [
]
Re [ ( )]
2
1
2
Im[(1 )]
[()] = [
]
Im [ ( )]
2
1
2
(3.2-12)
=
(3.2-13)
35
36
4.1
Moho
(4.1-1)
(4.1-1) 2003
Herglotz-Wiechert
36
37
Herglotz-Wiechert
m d m~,
,
=+(4.1-2)
(4.1-2) 2003
[16]
37
38
4.2
Hadamard(1923),
:l)2)3)
, [17]
4.1
(2009)[19]
38
39
4.3
(LSQR)
LSQR
LSQR [9]
4.3.1 LSQR
Paige,Saunders(1982) Golub Kahan LSQR
=
(Conjugate Gradients)
[20]
Paige,Saunders(1982)
LSQR (CG)LSQR
LSQR
4.3.2 LSQR
(3.2-13)
1 = 1
(4.3.2-1)
1
1
LSQR
(1)LSQR
= , 0
0 = 0 2 = 2
=1
0 = 0
0 =
39
0
0
40
0 = 0
0 = 0 2 = 2
=1
0 = 0
0
0 =
0
0 = 0
0
0 =
0
(2) LSQR
+1 =
+1 = +1 2
+1 =
+1
+1
+1 = +1 +1
+1 = +1 2
+1
+1 =
+1
(3) LSQR
= 2 + +1 2
2
+1 +1
= +1 +1
2
+1 = +1
+1
+1 =
+ = +
+1
LSQR MATLAB
40
41
(5.0-1)
(5.0-1)
5.1
(5.1-1):
41
42
(5.1-1)
30Hz (5.1-2)
(5.1-2)
(5.1-3)
(5.1-3)
(5.1-3)
widess 8
[21]
(5.1-4)
(5.1-4)
5.1-5)
42
43
5.1-5)
5.1.1 LSQR
103 1.2129e-16
1 2 5 10 20 50
60 70 80 103 5.1.115.1.1-10
5.1.1-1 1
43
44
5.1.1-2 2
5.1.1-3 5
5.1.1-4 10
44
45
5.1.1-5 20
5.1.1-6 50
5.1.1-7 60
45
46
5.1.1-8 70
5.1.1-9 80
5.1.1-10 103
70 0.0035
70 10-3 10-8
70 80 103 50
46
47
(5.1.1-11) 0 20
1 103
1
2
5
10
20
50
60
70
80
103
0.3728
0.1835
0.0697
0.0299
0.0126
0.0023
0.0010
2.2893e-08
1.7590e-11
1.2129e-16
0.4778
0.3214
0.2443
0.1675
0.1058
0.0310
0.0157
0.0035
0.0035
0.0035
(5.1.1-1)
0.6
0.5
0.4
0.3
0.2
0.1
0
0
20
40
60
80
100
120
(5.1.1-11)
47
48
5.2
()
5.2.1
(5.2.1-1)
(5.2.1-1)
0.8 0.6 20
120 2(ms) 2(ms)
30Hz
(5.2.1-2)
(5.2.1-2)
= 2.6
48
(5.2.1-1)
49
()
, 2
( 30Hz)
12.82(ms)(5.2.1-2) 7 8
((5.2.1-2)(
))
(5.2.1-3)
(5.2.1-3)
5.2.2
(5.2.2-1)
49
50
(5.2.2-1)
0.8 0.6-0.6
20 120 2(ms)
2(ms)
(5.2.2-2)
30Hz
(5.2.2-2)
15
(5.2.2-3)
(
)
5.3
50
51
5.3.1
15Hz20Hz25Hz30Hz35Hz40Hz45Hz50Hz
55Hz ((5.3.1-1))
1(ms)300 45
(5.3.1-1) 30Hz
(5.3.1-2)15Hz 55Hz
30Hz
15Hz
51
52
15Hz (5.3.1-3)
52
53
5.3.2
(5.1-2)
1%5%10%
(5.1-2)
(5.3.2-1)(5.3.2-3) 1%5%10%
(5.3.2-1)(a) (5.1-2) 1%
(5.3.2-1)(b) (5.1-2) 1%
(5.3.2-2)(a) (5.1-2) 5%
53
54
(5.3.2-2)(b) (5.1-2) 5%
1%
5% 10%
54
55
5.4
(
)
[5]
1)
2)
55
56
----
56
57
[1].[D].(),2009.
[2].[M]..:,2006:1-9,61-84.
[3]Seth Stein, Michael Wysession. An Introduction to Seismology, Earthquakes, and Earth Stru
cture[M].Blackwell Publishing Ltd,2003:29-34.
[4].[M].,1996,189.
[5].[J].,2008,43(1):123-128.
[6].[J].:,2000,24(1):77-84.
[7].[D].:,2012.
[8].[D].(),2011.
[9]. LSQR [D].(),2012.
[10].[M].:,2005:1-19,149-179.
[11]Charles I. Puryear1 and John P. Castagna1. Layer-thickness determination and stratigraph
ic interpretation using spectral inversion: Theory and application[J].Geophysics,2008, VOL.7
3,NO.2,P.R37R48.
[12] []. MATLAB [M].:,2002:101-228.
[13] [].[M].,2007:1-12,112-231,296-337.
[14]K. J. Marfurt, R. L. Kirlin.Narrow-band spectral analysis and thin-bed tuning[J].Geophys
ics,2001,VOL. 66, NO. 4, P.12741283.
[15] [].[M].:,2007:1-34.
[16].[M].:,2003:1-12.
[17] Mario Bertero, Tomaso A. Pogcio, Vincent Torre. Ill-Posed Problems in Early Vision[J].
PROCEEDINGS OF THE IEEE,1988,VOL.76,NO.8.
~~
[DB/OL]. books.google.com.2003.
[19]Yuan S. Y.et al.Ill-posed analysis for spectral inversion[J].Expanded Abstracts of 79
th
57
58
word
58
59
A MATLAB
1
f1=sym('sin(pi/2*t)')
subplot(5,2,3)
ezplot(f1,[-4,4])
hold
f2=sym('sin(pi/2*t*2)')
subplot(5,2,4)
ezplot(f2,[-4,4])
hold
f3=sym('sin(pi/2*t*3)')
subplot(5,2,5)
ezplot(f3,[-4,4])
hold
f4=sym('sin(pi/2*t*4)')
subplot(5,2,6)
ezplot(f4,[-4,4])
hold
f5=sym('sin(pi/2*t*5)')
subplot(5,2,7)
ezplot(f5,[-4,4])
hold
f6=sym('sin(pi/2*t*6)')
subplot(5,2,8)
ezplot(f6,[-4,4])
hold
f7=sym('sin(pi/2*t*7)')
subplot(5,2,9)
ezplot(f7,[-4,4])
hold
f8=sym('sin(pi/2*t*8)')
subplot(5,2,10)
ezplot(f8,[-4,4])
hold
f12345678=f1+f2+f3+f4+f5+f6+f7+f8
subplot(5,1,1)
ezplot(f12345678,[-4,4])
axis([-4 4 -8 8])
59
60
2
fm=30;%
dt=0.001;%
number=100;%
t=-number/2+1:number/2;
a=(1-2*(pi*fm*t*0.001).^2).*exp(-(pi*fm*t*0.001).^2);
subplot(3,1,1);
plot(t,a);
title('Ricker-');
xlabel(' tms');
ylabel(' A');
for i=1:100
f(i)=10*(i-1);%
end
Y=abs(fft(a));%fourier
subplot(3,1,2)
plot(f,Y);
title('Ricker ');
axis([0 100 0 16])
xlabel(' fhz');
ylabel('');
% 0.001s 100 0.1s
10hz
3
clear
dt=0.004;
nt=120;%nt 1
flag=1;
for j=1:nt
r(j)=rand()*(-1)^j*0.1;
r(j)=0;
end
example=2;
if(example==1)
r(20)=1; r(19)=-0.5;r(21)=-0.5;
r(30)=-0.5;r(31)=0.5;
60
61
r(50)=0.8;r(51)=-0.6;r(52)=-0.5;
r(80)=0.7;r(79)=-0.6;r(81)=-0.6;
r(100)=0.68;r(101)=-0.5;r(99)=-0.5;
end
if(example==2)
r(20)=0.71;r(22)=0.71;
r(40)=-0.5;r(42)=-0.5;
r(60)=0.8;r(63)=0.8;
r(80)=-0.7;r(82)=0.7;
r(100)=-0.65;r(101)=-0.65;
end
[w,tw] = ricker_chg(nt,dt,30);%
seis=conv(r,w);%
%noise=randn(1,239)*0.04;
%seis=seis+noise;
mm=round((max(size(seis))-nt)/2);seis=seis([mm:mm+nt-1]);
nf=nt;df=1/(nt)/dt;
t1=[1:nt]*dt;
if(flag==1)
figure;
subplot(411);plot(t1,r);axis tight;title('');xlabel(' t(s)');ylabel('');
subplot(412);plot(tw,w);title('ricker ');axis tight;xlabel(' t(s)');ylabel('');
subplot(413); plot(t1,seis);title('');axis tight;xlabel(' t(s)');ylabel('');
subplot(414);plot(t1,r,t1,seis);title(' ');axis tight;xlabel('
t(s)');ylabel('');
end
cr=fft(r);creal=real(cr);cimage=imag(cr);cabs=abs(cr);cangle=angle(cr);
nn=ceil(max(size(cr))/2);n=0:nn-1;f=n*df;
if(flag==1)
figure;
subplot(411);plot(f,creal(1:nn));title('');axis tight;
subplot(412);plot(f,cimage(1:nn));title('');axis tight;
subplot(413);plot(f,cabs(1:nn));title('');axis tight;
subplot(414);plot(f,cangle(1:nn));title('');axis tight;
end
cw=fft(w);cwreal=real(cw);cwimage=imag(cw);cwabs=abs(cw);cwang=angle(cw);
nb=ceil(max(size(cw))/2);n=0:nb-1; df1=1/(max(size(w)))/dt;fa=n*df1;
if(flag==1)
61
62
figure;
subplot(411);plot(fa,cwreal(1:nb));title('');
subplot(412);plot(fa,cwimage(1:nb));title('');
subplot(413);plot(fa,cwabs(1:nb));title('');
subplot(414);plot(fa,cwang(1:nb));title('');
end
cseis=fft(seis);csreal=real(cseis);csimage=imag(cseis);csabs=abs(cseis);csang=angle(cseis);
nse=ceil(max(size(cseis))/2);n=0:nse-1;fse=n*df;
if(flag==1)
figure;
subplot(411);plot(fse,csreal(1:nse));title('');axis tight;
subplot(412);plot(fse,csimage(1:nse));title('');axis tight;
subplot(413);plot(fse,csabs(1:nse));title('');axis tight;
subplot(414);plot(fse,csang(1:nse));title('');axis tight;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% size(cw),size(cseis)
%ir=ifft(cw);
%figure;plot(tw,ir);title('');
%cxr=cseis./cw;xr=ifft(cxr);figure;plot(t1,abs(xr));title('');
nb=ceil(max(size(cw))/2);n=0:nb-1; df1=1/(max(size(cw))-1)/dt;fa=n*df1;
nt2=nt/2;
b=[csreal(1:nt2)';csimage(1:nt2)'];
dw=(nt-1)*dt/2;
for i1=1:nt2
fi=df*(i1-1);
for j=1:nt2
tj=(nt-1-2*(j-1))*dt;
mij=pi*fi*tj;
ni=2*pi*fi*dw;
sinm=sin(mij); cosm=cos(mij);
cosn=cos(ni);
sin_sin=sinm*sinn;
sin_cos=sinm*cosn;
cos_cos=cosm*cosn;
cos_sin=cosm*sinn;
a11(i1,j)=cwreal(i1)*sin_sin-cwimage(i1)*sin_cos;
a12(i1,j)=cwreal(i1)*cos_cos+cwimage(i1)*cos_sin;
a21(i1,j)=cwreal(i1)*sin_cos+cwimage(i1)*sin_sin;
a22(i1,j)=cwimage(i1)*cos_cos-cwreal(i1)*cos_sin;
end
end
a=[a11,a12;a21,a22]*2;
%figure;imshow(a);colorbar;pause;
62
sinn=sin(ni);
63
%cond(a,inf),cond(a,1),cond(a,2),cond(a,'fro'),pause;
tol=1e-19;
maxit=105;
m1=[];m2=[];
[x,sign0,residual,iter]=lsqr(a,b,tol,maxit,m1,m2);%lsqr
%[x,sign0]=lsqr(a,b,tol,maxit);
residual,iter,
if(sign0==0)
disp(' LSQR converged to the desired tolerance TOL within MAXIT iterations.');
end
if(sign0==1)
disp('LSQR iterated MAXIT times but did not converge.');
end
if(sign0==2)
disp(' preconditioner M was ill-conditioned.');
end
if(sign0==3)
disp('LSQR stagnated (two consecutive iterates were the same).');
end
if(sign0==4)
disp('one of the scalar quantities calculated during LSQR became too small or too large to
continue computing.');
end
ro=x(1:nt/2);re=x(nt/2+1:nt);
r1=(ro+re);r2=flipud((re-ro));
%figure;plot(t1(1:nt/2),r1);
%figure;plot(t1(nt/2+1:nt),r2);
rt=[r2',r1']';
r=r(1,1:119);
r=[0 r];
diff=r-rt';
figure;
subplot(311);plot(t1,r);axis tight;title('');xlabel(' t(s)');ylabel('');
subplot(312);plot(t1,rt);title('');xlabel(' t(s)');ylabel('');axis tight; %set(gca,
'YTick',[0,0.24,0.48] );
subplot(313); plot(t1,diff);title('');axis([0 0.48 -0.7 0.7]);xlabel(' t(s)');ylabel('');
63
64
420
clear
dt=0.002;
nt=120;%nt 1
flag=0;
nx=20;
r=zeros(nt,nx);
example=2;
if(example==1)
for ix=1:nx
r(20,ix)=0.8;
r(20+ix,ix)=0.6;
end
end
if(example==2)
for ix=1:nx
r(30,ix)=0.8;
r(30+ix,ix)=0.8
r(30+ix*2,ix)=-0.6;
end
end
ft=0;
[w,tw] = ricker_chg(nt,dt,20);%
for ix=1:nx
seis(:,ix)=conv(r(:,ix),w);%
mm=round((max(size(seis(:,ix)))-nt)/2);
seis(1:nt,ix)=seis([mm:mm+nt-1],ix);
end
seis=seis(1:nt,:);
nf=nt;df=1/(nt)/dt;
t1=[1:nt]*dt;
if(flag==1)
figure1;
subplot(311);wigb(r,1,[1:1:nx],[ft:1:ft+nt-1]*dt);title('');
subplot(312);plot(tw,w);title('ricker ');axis tight;
subplot(313);wigb(seis,1,[1:1:nx],[ft:1:ft+nt-1]*dt);title('');
end
cr=fft(r);creal=real(cr);cimage=imag(cr);cabs=abs(cr);cangle=angle(cr);
64
65
nn=ceil(max(size(cr))/2);n=0:nn-1;f=n*df;
cw=fft(w);cwreal=real(cw);cwimage=imag(cw);cwabs=abs(cw);cwang=angle(cw);
nb=ceil(max(size(cw))/2);n=0:nb-1; df1=1/(max(size(w)))/dt;fa=n*df1;
if(flag==1)
figure;
subplot(411);plot(fa,cwreal(1:nb));title('');axis([0 125 -4 4]);
subplot(412);plot(fa,cwimage(1:nb));title(''); axis([0 125 -4 4]);
subplot(413);plot(fa,cwabs(1:nb));title('');axis([0 125 -4 4]);
subplot(414);plot(fa,cwang(1:nb));title('');axis([0 125 -4 4]);
end
cseis=fft(seis);csreal=real(cseis);csimage=imag(cseis);csabs=abs(cseis);csang=angle(cseis);
nse=ceil(max(size(cseis))/2);n=0:nse-1;fse=n*df;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nb=ceil(max(size(cw))/2);n=0:nb-1; df1=1/(max(size(cw))-1)/dt;fa=n*df1;
nt2=nt/2;dw=(nt-1)*dt/2;
for i1=1:nt2
fi=df*(i1-1);
for j=1:nt2
tj=(nt-1-2*(j-1))*dt;
mij=pi*fi*tj;
ni=2*pi*fi*dw;
sinm=sin(mij); cosm=cos(mij);
cosn=cos(ni);
sin_sin=sinm*sinn;
sin_cos=sinm*cosn;
cos_cos=cosm*cosn;
cos_sin=cosm*sinn;
a11(i1,j)=cwreal(i1)*sin_sin-cwimage(i1)*sin_cos;
a12(i1,j)=cwreal(i1)*cos_cos+cwimage(i1)*cos_sin;
a21(i1,j)=cwreal(i1)*sin_cos+cwimage(i1)*sin_sin;
a22(i1,j)=cwimage(i1)*cos_cos-cwreal(i1)*cos_sin;
end
end
a=[a11,a12;a21,a22]*2;
%figure;imshow(a);colorbar;pause;
%cond(a,inf),cond(a,1),cond(a,2),cond(a,'fro'),pause;
tol=1e-19;
maxit=5000;
m1=[];m2=[];
65
sinn=sin(ni);
66
for ix=1:nx
b=[csreal(1:nt2,ix);csimage(1:nt2,ix)];
[x,sign0,residual,iter]=lsqr(a,b,tol,maxit,m1,m2);%lsqr
% residual,iter,
if(flag==1)
if(sign0==0)
disp(' LSQR converged to the desired tolerance TOL within MAXIT iterations.');
end
if(sign0==1)
disp('LSQR iterated MAXIT times but did not converge.');
end
if(sign0==2)
disp(' preconditioner M was ill-conditioned.');
end
if(sign0==3)
disp('LSQR stagnated (two consecutive iterates were the same).');
end
if(sign0==4)
disp('one of the scalar quantities calculated during LSQR became too small or too
large to continue computing.');
end
end
ro=x(1:nt/2);re=x(nt/2+1:nt);
r1=(ro+re);r2=flipud((re-ro));
%figure;plot(t1(1:nt/2),r1);
%figure;plot(t1(nt/2+1:nt),r2);
rt(:,ix)=[r2',r1']';
end
figure;
subplot(311);wigb(r,1,[1:1:nx],[ft:1:ft+nt-1]*dt);title('');axis tight;xlabel('
');ylabel(' t(s)');
subplot(312);wigb(rt,1,[1:1:nx],[ft:1:ft+nt-1]*dt);title('');axis tight; xlabel('
');ylabel(' t(s)');
subplot(313);wigb(seis,1,[1:1:nx],[ft:1:ft+nt-1]*dt);title('');axis tight;xlabel('
');ylabel(' t(s)');
noise=randn(1,239)*0.04;%0.04
seis=seis+noise;
4 29
66