Вы находитесь на странице: 1из 104

..

-
-

2003

621.372(075.8)+004.92(075.8)
474

:

-
()
- . , . .. (),
. . , . .. ()

()

..
474 -: . .
: - , 2003. 104 .
ISBN 5-7782-0405-1
( 1),
- ( 2) , ( 3) . , . Wavelet Toolbox MATLAB 6.
, , , ,
,
.
621.372(075.8)+004.92(075.8)
ISBN 5-7782-0405-1


, 2003
. . , 2003
2

50- ()

, ,
- (),
.
(wavelet)
(Grossmann) (Morlet) 80- XX
.
,
(Dobechies), (Meyer), (Mallat),
(Farge), (Chui) .
()
(t x), (/).
.
- () ()
,
. ,
( ) .
, ,
, , , , 3

, ,
, , , ,
, .

. ,
.
,
(), Mathcad,
MATLAB, Mathematica. JPEC-200,
MPEG-4 Corel DRAW
9/10 ,
,
, , . , Analog Devices ADV6xx (ADV601,
ADV601LC, ADV611, ADV612),
.

.
[15, 19, 20, 26].
.
[13], [4],
.
[5] . [6], [1014]. ( 100
300 ), .

,
.
[7], ..
.. 2002 . ( 5000 .,
38 .., 160 .),
. , MATLAB
4

6.0/6.1. [8] ( 3000, 28 ..,


270 .) , ,
Wavelet Toolbox, Wavelet Extension Pack Wavelet Explorer,
() MATLAB 6.0/6.1, Mathcad 2001 Mathematica 4.
, .. 20012002 .
- ,
Wavelet Seminar
() . - , -,
.
, [22, 25].
, . ,

, .

.

, (, , ) .
, , , , , ,
,
.
-
. . .. . . . .
.. ,
..
MATLAB.
5

-
1.1.
[13, 14], S (t ) ,
t2

[ S (t )]

dt < ,

(1.1)

t1


{n (t )} , ..

S (t ) = C0 0 (t ) + .... + Cn n (t ) + ... =

Cnn (t ) ,

(1.2)

n=0


Cn =

t2

1
n

S (t )n (t )dt ,

(1.3)

t1

t2

|| n ||2 = n2 (t )dt

(1.4)

t1

, n (t ) .
,
6

[t1 , t2 ]
t2
|| ||2 , k = n,
(1.5)
k (t )n (t )dt = 0n , k n.

t
1

n (t ) ,
( || n ||2 = 1 ), (),
{n (t )} . , .
(1.2), Cn
(1.3), .
Cn n (t ) , (1.2), S (t ) , {C0 ,.., Cn ,..}
. {C0 ,.., Cn ,..} , ,
Cn
(. 1.1).

S (t ) - C C1 C2 Ci
0
Cn ( ) (1.3).
0
i
1 2
n
(1.2)
. 1.1
() N

S(t ) = C0 0 (t ) + ... + C N N (t ) =

Cn n (t ) .

(1.2)

n =0


: {n (t )}
N (),
,
2

t2

t2
N
2

= S (t ) S(t ) dt = S (t ) Cn n (t ) dt .
n =0

t1
t1

(1.6)

, N . (1.2) .

= / ,

(1.7)

( 1 ), S (t ) , ..
= S

t2

= [ S (t )]2 dt .

(1.8)

t1

(1.8) (1.2)
=

t2

t1

n =0

2
2
[ S (t )] dt = Cn

(1.9)


{n (t )}
=

Cn2 .

n=0

, T = t2 t1

Pp =

1
=

t2

[ S (t )]

t1

dt =

1
Cn n
n =0

(1.10)

(1.9) (1.10)
.
. .
, ,
. -,

; .
-, .
, [13, 14].
8


,
.
, , , .

- , , [14].
[13, 14].

, .

1.2. .
wavelet ( ondelette)
() . : , , , .
- ()

ab (t ) =

1 t b

,
a a

(1.11)

() (t ) ,

( b ) ( a )
(. 1.2). 1/ a a .
, a b
ab (t ) ,
(t ) .
. 1.2 () ().
ab (t )
( ~ 1/ a ), a
9

. 1.2

ab (t ) , ..
(t ) .
, () 0
, .. ; 0
a .
, ,
.

1
2

3
b

b0

. 1.3

( )
( ) ab (t ) (
. 1.3) . , - ( b / a = = const ) t.
10

, ()

. , ( ) .
, . ,
S (t ) ( S ( x) ).

1.3.
, , .
, ,
. .
. :

(t ) dt < .

(1.12)

. ,
. , :

(t ) C (1 + t )1 S () C (1 + ) 1 , > 0 . (1.13)
, - (t )
.
. ( )
(. . 1.2)

(t )dt = 0 .

(1.14)

.
11

(t ) , .. , , - S ()
= 0 . a
.
,
, n

(t ) dt = 0 .

(1.15)

n - () ,
.
.
. ab (t )
,
(t ) ,
( a ) ( b ).

1.4.
, , . 1.1.

( g 0 (t ) = exp( t 2 / 2)) . ,

, .
. 1.4
. n = 1
, WAVE-
. n = 2 MHAT-, (mexican hat ). .
, WAVE-.
[13].
[30] ,
12

g1 g 4 .
1.1


(t )
()

:
,
WAVE-,
,
MHAT- c
mexican hat),
n- ,

DOG difference of
gaussians
LP-Littlewood & Paley

HAAR-
FHAT-,

(French hat
)
(Morlet)

(Paul)
(
n,
)

t exp(t 2 / 2)

(i) 2 exp(2 / 2)

(1 t 2 )exp(t 2 / 2)

(i)2 2 exp( 2 / 2)

(1) n

dn
exp(t 2 / 2) (1) n (i) n 2 exp(2 / 2)

dt n

e t

0,5e t

2 (e

/8

(t ) 1 (sin 2t sin t )

ei0t e t

(n + 1)

/2

in
(1 n) n +1

e 2

1/ 2
, t 2,
(2)

0,


1, 0 t 1/ 2,

1, 1/ 2 t 1,
0, t < 0, t > 0.

1, t 1/ 3,

1/ 2, 1/ 3 t 1,

0, t > 1.

/2

iei / 2

sin 2 / 4
/ 4

4 sin 3 / 3
3 / 3

() 2 e(0 )

/2

() 2 () n e


HAAR-.
t-,
13

2
g1(t)

Sg1()

g2(t)

Sg2()

g3(t)

Sg3()

g4(t)

Sg4()

2
3

4 3 2 1 0 1 2 3 4

6
5.5
5
4.5
4
3.5
3
2.5
2
1.5
1
0.5
0

0 0.5 1 1.5 2 2.5 3 3.5 4

tt

. 1.4

, 1/ .
LR , , , -, .
, .
0 . (t ) - .
, .
, , .
(Daubechies), (db4)
Mathcad.
.
Wavelet Toolbox 2.0/2.1 (MATLAB 6) ;
.
-
MATLAB waveinfo
(type), . wavemenu
Wavelet Display.
, : ,
( Name) .
14

. .1 Wavelet Display
db4.
[8, . 2.9].
( ) . ,
.
.

1.5.
-
() -
( WT continuous wavelet transform).
ab (t ) ( a ) ( b )
(t ) a b (1.11).
() ()
H (.. ) S (t ) :
Ws (a, b) = ( S (t ), ab (t ) ) =
1
S (t ) =
C

t b
S (t )
dt ,
a
a

Ws (a, b) ab (t )

dadb
a2

(1.16)
(1.17)

C
=

()

d < ,

(, ) ,
() - (t ) . C = 1.
15

(1.16) , - Ws (a, b) (wavelet spectrum, time-scale-spectrum - )


- (single spectrum)
: ( ) , .. , b
.
, Ws (b, a0 )
( a = a0 ), Ws (a, b0 ) (
b = b0 ).
S (t ) u , t = t0 , - a = u , b = t0 .
() Ws (a, b)
. Ws (a, b) (. . 1.5).
ab (. 1.6), ()
( b ). , , (sceleton),
.

1.6. -

.
,
, .
.
. (1.16):
W [S1 (t ) + S2 (t )] = W1 (a, b) + W2 (a, b) .
16

. b0
- b0 :

W [ S (t b0 )] = W [a, b b0 ] .
. ()
() W (a, b) :

W [ S (t a0 )] =

1 a b
W , .
a0 a0 a0

:
W [dtm S ] = (1) m

S (t )dtm [ ab (t )]dt ,

dtm = d m [...]/ dt m , m 1 . , , ,
S (t ) , .
, , , .
- . ,
- .
( a - ab (t ) ) (),

.
, () ,
(
) .
- . 17

. b , a , , ,
.

(., , [1]).

1.7.
-
. , - ()

(), , , , .

.

1.7.1. -

Mathcad

(1.11), (1.16), (1.17).
Mathcad
.
. .
,
a b ;
, ,
, . a b , -
.
18

1.1.

s (t ) = A sin(t ) ,
A = 1 , = 2 / T = 2 / 50 , = 0 .

:
N := 256 , MHAT (t ) :=

( a , b, t ) =

d2
dt

exp(t 2 / 2) .

1
t b
MHAT
.
a
a

-:
N

a := 1..30 ,

b := 0..50 ,

W (a, b) :=

(a, b, t )s(t )dt ,

N ab := W (a, b)

N ab = W ( a, b) . 1.5
, . 1.6
(a,b). , W (a, b)
a = a0 s(t ) ;
a0 : 1/ . W (a, b0 )
b = b0 .

. 1.5
19

. 1.6
1.2.
: s (t ) := A1 sin(1t ) + A2 sin(2t ) ,
A1 = A2 = 1 , 1 = 2 /T1 , 2 = 2 /T2 , T1 = 50 , T2 = 10 .
2
1.5
1
0.5
0
s ( t)
0.5
1
1.5
2 2
2

25

50

75

100

125

150

175

200

225

MHAT (t ) :=

d 2 t 2 / 2
e
,

dt 2

250
250

N:=256,
N

t b
(a, b, t ) := MHAT
,
a

W (a, b) :=

(a, b, t ) f (t )dt ,

a := 130, b : = 050,
N ab := W (a, b) .
W (a, b) . 1.7
, . 1.8
(a,b).

. 1.7

20

. 1.8
. 1.9, -
.
a , .. a1 = 2 ( a1 : 1/ 2 ),
, () . a [(t b) / a ] , , , .. . a2 = 15 ( a2 : 1/ 1 )
. a ( a > 25 ), .

. 1.9
21

1.9, - W (a, b) ,
b1 = 13 b2 = 17 .
, , (. 1.1) a ( a : 1..3 ), , .. A2 sin(2t ) .
1.3.
U := 5
s ( t) :=

t0 := 20 := 60

U if t0 t t0 +
0 otherwise

t2

exp
MHAT ( t) :=
2
2
dt
d2

s ( t)

N :=128

6
5
4
3
2
1
0
1

20

40

60

80 100 120

t b
(a, b, t ) := MHAT
,
a
a := 1..50 , b := 0..100 ,

W (a, b) :=

(a, b, t ) f (t )dt ,

Nba := W (a, b) .

. 1.10
22

- . 1.10.
. 1.10, - b = 20 b = 80 ( a : 1..5 ).

,
Mathcad . .
Intel Celeron (667
128 ) 5 .
MATLAB.

1.7.2. - MATLAB
Wavelet Toolbox MATLAB
- .
- ;

( ),
, a , .
-.
Continuous Wavelet 1-D Complex Continuous
Wavelet 1-D Wavelet Toolbox .
. 1.11 -
, .
:
( )
, . ( ).

cwt,
(..2.2), :
COEF = cwt(S, SCALES, wname PLOTMODE, XLIM),
S , SKALES a , wname () ,
23

. 1.11

PLOTMODE : lvl , glb , absvil


lvlabs
, XLIM
.
1.4.
function garm
t = 0:0.00001:0.0004; A1 = 1; F1 = 10000; a1 = 45;
s = A1*soc(2*pi*F1*t+a1);
figure (1); plot(t,s); axis([0 0.0004 -3 3]); grid on;
subplot(211), plot(t,s); title(' S(t)')
subplot(212), c = cwt(s, 1:2:32, 'mexh', 'abs1vl', [0 10]);
title('- '); xlabel(' , b');
ylabel(' , a');
end

,
. 1.12, ,
( ) (
).
24

. 1.12
1.5.
S (t )
:

function binar
t = 0:0.000001:0.0004;
A1 = 1; A2 = 1; F1 = 10000; F2 = 2*F1; a = 90; b = 90;
a1 = a*0.0174533; a2 = b*0.0174533;
s = A1*sin(2*pi*F1*t-a1) + A2*sin(2*pi*F2*t-a2);
figure (1); plot(t,s); axis([0 0.0004 -3 3]); grid on;
subplot(211), plot(t,s); title(' S(t)')

. 1.13
25

subplot(212), c = cwt(s,1:2:50,'mexh','abs1v',[0 1]);


title('- S(t)');
xlabel(' , b');
ylabel(' , a');
end
S (t ) W (a, b)
. 1.13. , a ;
,
.
1.6.
x(t ) S (t )
n(t ) m = 0 g .

function bigarm_rauch
t = 0:0.000001:0.001;
A1 = 1; A2 = 1; F1 = 10000; F2 = 2*F1; a = 90; b = 90;
a1 = a*0.0174533; a2 = b*0.0174533;
s1(1:200) = 0; t2 = 0.0002:0.000001:0.0007;
s2 = A1*sin(2*pi*F1*t2-a1) + A2*sin(2*pi*F2*t2-a2);
s3(1:300) = 0; s = [s1 s2 s3];
randn('state',0); g = 0.5; n =g *randn(size(t)); x = s+n;
figure (1); subplot(211), plot(t,x,'k'); t
itle(' x(t)'); grid on;
gtext('F=10,
1=2=1,
g=0.5 B');

. 1.14
26

subplot(212), c = cwt(x,1:124,'mexh','absglb',[0 50]);


title('- W(a,b)'); xlabel(' , b');
ylabel(' , a');
end
. 1.14 . -
( a : 1 5 ), a
, ;
. -
, .
1.7.
function pr_rauch_wav
t = 0:0.000001:0.000300; A1 = 2; F1 = 0; s1(1:75) = 0;
t2 = 0.000075:0.000001:0.000175; s2 = A1*cos(2*pi*F1*t2);
s3(1:125) = 0; s = [s1 s2 s3];
randn('state',0); g = 0.5; n = g*randn(size(t));
x = s + n; figure (1);
subplot(211), plot(t,x,'k'); title(' x(t)'); grid on;
subplot(212), c = cwt(x,1:27,'mexh','absglb',[0 10]);
title('-'); xlabel(' , b');
ylabel(' , a');
end

(. 1.15) , ( a > 20 )
.
()
.

. 1.15
27

1.8.
mtlb 200 :
function ss
load mtlb; v=mtlb(1:200); lv = length(v);
subplot(211), plot(v); title(' ');
set(gca, 'Xlim',[0 200]); [c,l] = wavedec(v,5,'sym2');
cfd = zeros(5,lv); subplot(212) ccfs = cwt(v,1:128,'sym4','plot');
title('-') colormap(pink(32)); xlabel(' , b');
ylabel(' ,a');
end

. 1.16
- (. 1.16)
:
, ( , ).

, ( , , ..).

28

1.8.

() . .
.

. ,
. ,
, .
, , + . ,
.
(, , ..) ,
, , .
- . ,
, . , , .
:
S (, b) =

S (t ) w(t b)e jt dt ,


S (t ) w(t b) ; (, , ..
w(t ) = 1 0 t w(t ) = 0 t < 0 t > ), t (. 1.17) 29

b . , ..
- .
s+t

W(tb)

b+

. 1.17

, . 1.17,
( ) S (t ) ,

. ,
. 1.18, .

, 2 / .
, , , ( ) . ( = const )

, . ( )
(
).
,
, , (. 1.18, ), .

. -
,
(. 1.18, ): a
,
.
30

.
- , .
.
f

f
ab(t)
t
t
t

. 1.18

:
. -
,
,
.
, , , ,
, , , , . ,

.
.

31

2


2.1. -
a b - . ab (t ) .

. ,
, [13]:
1 t b
1
m
a = 2m , b = k 2m , mk (t ) =

= m (2 t k ) , (2.1)
a a
2
m k . a, b m, k . m
.
.

(dyadic) .
. 2.1 a, b . m
. m 1
. m mk (t ) b = k 2m , m ,
m = 0 .
32

30(t)
0

10(t)

21(t)

20(t)
0

11(t)

(t)

01(t)

13(t)

07(t)

1.

1.

. 2.1

:
cmk = ( S (t ), mk (t ) ) =

S (t ) mk (t )dt ,

(2.2)

S (t ) = cmk mk (t ) .
m,k

33

(2.3)

,
cmk (2.3)
Ws (a, b)

cmk = W 2m , k 2m .

(2.4)

(2.2) (2.4), , - cmk


, m, k (); m k
.
(2.3) , S (t )
cmk . (2.3)
, ,
. ,
.
. , , .. [8],
:
, .
e.

a , b

a = 1/ 2 j , b = k / 2 j , jk (t ) = 2 j (2 j t k ) ,

(2.1)

.. j a ,
jk (t ) . (2.1) m

a , .. mk (t ) .
. , . -
( a = 2m ), . , , ,
. (). ,
.

34

2.2.
, ,

, - ( DWT). a
b , .
( )
S (t ) ,
f m , {Si } , i = 0,1, ..., N 1 , t :
t = 1/ 2 f m , f = 1/ t = 2 f m ,
(2.5)
t f () .
, t
:
S (t ) = {Si } =

N 1

S (it )(t it ),

(2.6)

i =1

(t ) -.
N = 2n0 ,
m (2.1) n0 1 .

k m : k = 2n0 m 1 . , m = 0 (.. a = 1) k -

2n0 1 = N 1 ; m (1, 2, ) mk (t ) ,
k . m = mmax , n0 1 , k = 0 , .. mmax 0 (t )
(. 2.1; N = 8 ).
- cmk ( c jk )
,
- [13, 19, 25, 29]. . 2.4. , ,
, . 35

, -.

,
, , .

2.3.
- ()
2.3.1. Mathcad
Mathcad
.
( Mathcad 8)
db4 ( DB4).
(.. ) , .
Mathcad :
wave(x) ;
iwave(w) .
x - w
N = 2n0 ( n0 ). wave(x) , - cmk .
2.1.
x(t )
x(t ) = S (t ) + n(t )
S (t )
(. 2.2):
U = 5 (), t0 = 40 (), = 60 ()
s(t):= U ift 0 t t 0 +
0 otherwise

n(t )

(), () .
36

xi

7
6
5
4
3
2
1
0
1
2

0
0

20

40

60

80

100 120 140 160 180 200 220 240 260


i
260

. 2.2
:
n0 = 8 , N = 2n0 , N = 256 , i := 0..N 1 , si := s (i )

:= 0,3

ni := 2ln(rnd (1)) sin(2 rnd (1)) , xi := si + ni

-, .. :
i := 0..N 1 y := x w := wave( y )
level

coeffs (level ) := submatrix( w, 2

level +1

,2

z := n0 1 z := 7 m := 1, 2..z

1,0,0) ci , z m := coeffs (m)

flor
N
m
2

-
. 2.3, . 2.4.
m

. (c )i i
N 0 N1, m
, - cmk ,
(2.2). , m k (
-) ( a = 2m ) (b = k 2m ) .

m k 2n0 m 0 2n0 m 1 .
, m = 0 ( a = 1 ) 0 k ( x) N (
0

), .. k cmk i (c )i . m = 1
1k ( x) 0 k ( x)
; k i . ,
m = n0 1 ( 7), k = 0 7,0 ( x)
; (c
c7,0 i 0 N 1.
37

)i

2.5

( c 0 ) i
( c 1 ) i

1.

(c

0
0

50

0
0

50

0
0

50

100

150

200

150

200

250
256

)i

( c 3 ) i

( c 4 ) i

6.

20

(c )i
5

( c 6 ) i
( c 7 ) i

5
100
i

250
256

20
10
0
10

15

100

150
i

. 2.3

. 2.4
38

200

250
256

m := 0
7
xi
x1i
2

7
6
5
4
3
2
1
0
1
2

7
6
5
4
3
2
1
0
1
2

7
x1i

7
x1i

7
x1i

0
0

0
0

7
6
5
4
3
2
1
0
1
2

40

60

80 100 120 140 160 180 200 220 240 260


i
260

m := 1

20

40

60

80

100 120 140 160 180 200 220 240 260


i
260

m := 3

0
0

7
6
5
4
3
2
1
0
1
2

20

0
0

20

40

60

80

100 120 140 160 180 200 220 240 260


i
260

m := 4

20

40

60

80

100 120 140 160 180 200 220 240 260


i
260

. 2.5
-, .. . :
x1i := iwave( w) .

39

cmk
() (2.3):
j := 2 z m... N 1

w j := 0 .

. 2.5. , m = 0 xi x1i
.
m -,
, ,
; () .
2.2. -

[38]
x(t ) = n(t ) + s (t ) ,

n(t )
mn = 0 ; s (t )
()
s (t ) = A1 sin[2F1t 1(t )] + A2 sin[2F2t 2 (t )] , t < t < t + ,
A1, A2 F1 = F
F2 = 2 F , 1 (t ), 2 (t ) , , t .
: s (t ) , (t ) = 21 (t ) 2 (t ) ,
t < t < t + . n(t ) (t ) .
s (t ) n(t ) . ( . 2.6).
y (t )

x(t )

(t )

. 2.6
x(t ) , ,
(t ) Mathcad (2001).
Mathcad db 4 : wave(x) , iwave(w)
40

. x(t ) ( 2.1) ,
cmk
()
(2.3): yi := iwave( w) , j := 2 z m..N 1 , w j := 0 .
. 2.7 x(t ) y (t ) . A1 = A2 = 1 , F = 10 , 1 (t ) = 2 (t ) = = 90 ,
= 0,5 , t = 0, 2 , = 0,6 , n0 = 10 (z = 9), N = 1024 .
m : % ,
y ,
%
%
= = 2 =

.
. 2.1.
m = 0 ()
y1 xi . m ( . 2.7 m = 3 ) , , ( y ).

. 2.7

2.1
2
3

y ,

0.493

0.327

0.198

0.125

0.105

0.078

0.05

5.73

5.35

5.01

4.24

4 .84

6.91

120.

14.87

14.81

18.47

14.08

14.54

18.8

116

, mopt ,
, , -

41

. m > mopt
,
. , ( = 0 ) (.. = 0 = 0 ).

2.3.2. Matlab
, , GUI (.1).
wavemenu.
Wavelet 1-D, File Demo Analys
32 -.
MATLAB 6.0/6.1 Wavelet Toolbox
2/2.1 (. 2, .2.2), ,
coef = detcoef(C,L,M).
wavelet [C, L];
, , 1 M MMAX ,
MMAX = length( L) 2 . [, L] = wavedec(S, M, 'wname')
wavelet ,
( wname).
2.3.
2.2.
-:
function binar_rauch_wav_1
t = 0:0.000001:0.001; A1 = 1; A2 = 1; F1 = 10000; F2 = 2*F1; a1 = 0; a2 = 0;
s1(1:200) = 0; t2 = 0.0002:0.000001:0.0008;
s2 = A1*sin(2*pi*F1*t2 + a1) + A2*sin(2*pi*F2*t2+a2);
s3(1:200) = 0; s = [s1 s2 s3]; randn('state',0); g = 0.5; n = g*randn(size(t));
x = s + n; figure (1); subplot(311), plot(t,x,'k'); title(' x(t)'); grid on;
gtext('F=10, 1=2=1, g=0.5 B');
subplot(312), c = cwt(x,1:64,'mexh','absglb',[0 400]);
title('-'); xlabel(' , b');
ylabel(' ,a'); set(gca,'Xlim',[0 1000]);
[c,l] = wavedec(s,6,'db4');
for m = 1:6
d = detcoef(c,l,m); d = d(ones(1,2^m),:);
cfd(m,:) = wkeep(d(:)',1000);
end

42

cfd = cfd(:); I = find(abs(cfd)<sqrt(eps));


cfd(I) = zeros(size(I)); cfd = reshape(cfd,6,1000);
subplot(313), colormap(pink(16));
img = image(flipud(wcodemat(cfd,64,'row')));
set(get(img,'parent'), 'YtickLabel',[]);
title(' ');
ylabel(', m'); xlabel(' , b'); end

. 2.8
. 2.8 .
1.6. , , .
2.4.
mtlb 200 (.
1.7)
:
function ss_cd
load mtlb; v = mtlb(1:200)', lv = length(v);
subplot(311), plot(v); title(' ');
set(gca, 'Xlim',[0 200]); [c,l] = wavedec(v,6,'sym2');
cfd = zeros(6,lv); subplot(312), ccfs = cwt(v,4:127,'sym2','plot');
title(' '), colormap(pink(32));
ylabel(' ,a'); xlabel(' , b');

43

for m = 1:6
d = detcoef(c,l,m); d = d(ones(1,2^m),:);
cfd(m,:) = wkeep(d(:)',lv);
end
cfd=cfd(:); I = find(abs(cfd)<sqrt(eps));
cfd(I) = zeros(size(I)); cfd = reshape(cfd,6,lv);
subplot(313), colormap(pink(32));
img = image(flipud(wcodemat(cfd,64,'row')));
set(get(img,'parent'), 'YtickLabel',[]);
title(' ');
ylabel(''); xlabel(' , b');
end

. 2.9.

. 2.9
,
S (t ) ,
. ,
.
. (DWT)
. ,
[8]. , ,
(. . 2.6).
44

2.4. -

() Am (t ) ()
Dm (t )
m

S (t ) = Am ( t ) + D j ( t ) ,

(2.7)

j =1

.
a m (.. m ) () () .
,
.
(). . 3 .
. 2.3, .

. .
S (t ) V0 .
S ak , S (t ) 0 k (t ) :
S (t ) = A0 (t ) = a0 k 0 k (t ) ,

(2.8)

a0 k = ak = ( S (t ), 0 k (t ))
m = 0 .
S (t ) ( V1 W1 ):
S (t ) = A1 (t ) + D1 (t ) = a1k 1k (t ) + d1k 1k (t ) .
(2.9)
k

, a1k
d1k . , a1k d1k 45

a0 k . A1 (t ) ( V2
W2 ). S (t ) m amk d mk .
amk d mk - (t ) (t ) .
. 3, hl :
(t ) = 2 hl (2t l ) ,

(2.10)

(t ) = 2 (1)l h1l (2t l ) = 2 gl (2t l ) ,

(2.11)

hl = ((t ), (2t l ) ,

(2.12)

gl = (1)l h2 n 1l ,

(2.13)

l = 0,1,..., lo = 2n 1 , n . n-
2n 1 2n hl .
(2.10) (2.11) :
amk = ( S (t ), mk (t )) = hl 2 k ((t ), m 1,l (t )) = hl 2 k al ,m1 ,
l

(2.14)

d mk = ( S (t ), mk (t )) = gl 2k ((t ), m 1,l (t )) = gl 2k al ,m1 .


l

(2.15)
- .
(
n0 ) N
( N = 2n0 ). ( m = 0 , a = 2m = 1 )
a0 k Si S (t ) , .. a0 k = Si ,
46

k = i , i = 0, 1,..., N 1 . m
m + 1 -
:
am +1,k = hl 2k aml , d m +1,k = gl 2 k aml .
(2.16)
l


m = MMAX , ( N )
( l ) hl .
() -
am 1,k = (hk 2l aml + g k 2l d ml ) ,
(2.17)
l

(2.10) (2.11).
()
2 LN , L = 2n [29].
. ,
4 LN , ( ) ( N log 2 N ).
,
hl ,
.
Wavelet Toolbox . . 2.10: - -.
S

A1

A2

D1
D2

m=M

. 2.10
47

m=0

S = {Si}

m=1

S = A1 + D1

m=2

S = A2 + D2+D1

S = AM + DM+DM1,,+D1

. 2.11 , wavedemo.
am ,
d m ( m 1 5). , , . cfs.

, :
A = appcoef (C , L,' wname ', M ) ,
(2.18)

D = det coef (C , L, M )
- [C , L] , ' wname '
, , M

,
,

1 M MMAX ,

MMAX = length( L) 2 .

. 2.11
48

-
(2.19)
[C , L] = wavedec( X , N , ' wname ')
- X
N ; C L .
() S [C , L] waverec:
S = waverec(C , L,' wname ') .
(2.20)

2.5.
, , .
, , hl .
,
(t ) (t ) , (2.11).
,
hl , .. ,
. ,
,
Wavelet Toolbox, , (dbN), (sumN), (coifN), (haar)
.; [7, 8].
. . N (dbN)
2N1 2N hl gl . N = 1 (
, ), (t ) (t ) .
(2.11) [5, 8]:
n = 2 ( ):

h0 = (1 + 3) /(4 2) = 0.482963, h1 = (3 + 3) /(4 2) = 0.836516,


h2 = (3 3) /(4 2) = 0.224144, h3 = (1 3) /(4 2) = 0.129409,
g0 = h3 ,

g1 = h2 ,

g 2 = h1 ,
49

g3 = h0 ;

n = 3 ( ):

h0 = 0.332670,

h1 = 0.806891,

h2 = 0.459877,

h3 = 0.135011,

h4 = 0.085441,

h5 = 0.035227.

n = 4 ( ):

h0 = 0.230377,

h1 = 0.714847,

h2 = 0.630881,

h3 = 0.027984,

h4 = 0.187035,

h5 = 0.030841,

h6 = 0.032883,

h7 = 0.010597.

. 2.12 (t ) ( )
(t ) , , .
2.0
1.5
1.0
0.5
0
-0.5
-1.0
-1.5

0.2

n=2

n=3

0.1

0.2

-0.1

-0.1
4

n=4

0.1

. 2.12

, ( n = 3 n = 4)
db 2 ; n n . . .1.3 ,
(.. ),
.
-,
Mathcad, db 4 .

2.6.

.
. .
50

& () (t )

, / 2 , ..
.
. 2.13. S ( )
Lo _ D Hi _ D .
( ) :
y (k ) =

2 n 1

S (l ) q ( k l ) ,

(2.21)

l =0

2n q ()
.
(2.21) (2.7)
:

D1 = y H (k ) , A1 = yL ( k ) .

()

D%1

cD1

y H (k )

S (k )


()

Hi _ D

S% (n )

Hi _ R

SH ( z)

S ( z)
Lo _ D

yL ( k )

c A1
2

Lo _ R

A%1

SL ( z)

. 2.13

(2.21) (2.16) ,
amk d mk ( m = 1 )
h(l ) = hl g (l ) = gl
( ), .. hl
g l . .
, . 51

2 , ..
(- 2 k (2.16)):
cD1 = d1k , cA1 = a1k .
. 2.13 .
Lo _ R
Hi _ R . 2 , 2 ,
. ( A%1 D%1 ), Lo _ R Hi _ R , S% (k ) ,
S (k ) , ..
.
( m = 2)
a1k .. m = MMAX .
. 2.14, ()
() , (Mallat).
512
( N = 2n0 , n0 = 9 ).
cDm 2 Hi _ R
Hi _ D 2 cDm
S
(+)
m
cAm 2 Lo _ R
Lo _ D 2 cAm

()
()
512

2
D1

CD1

2
A1

128

cA1
L

CD1

256

2
128

. 2.14
52

S%

S% (k

,
,
,
.
,
, , (2.18)(2.20),
(wname)
: Lo _ D , Hi _ D , Lo _ R , Hi _ R .
Wavelet Toolbox . 2.
( ) wavemenu
Wavelet Display. , , , wname, ( Lo _ D low-pass, Hi _ D
high-pass) ( Lo _ R , Hi _ R ). . .1
db 4 .
, load , wname, length (
), sum ( ), norm (
) . ,
load db 4 , :
>> load db4
>> db4
db4 = 0.1629
>> length (db4)
ans = 8
>>sum(db4)
ans = 1.0000
>>norm(db4)
ans = 0.7071

0.5055 0.4461 0.0198 0.1323 0.0218 0.0233 0.0075

. -

1/ 2 .

hl -

load db 4 ,
- hl (. 2.16):
function db4
load db4; w = db4; iter = 10; wav = 'db4';
[phi,psi,xval] = wavefun(wav,iter);
subplot(321); plot(xval,psi); title('Wavelet');
53

. 2.15
subplot(322); stem(w); title('Original scaling filter');
[Lo_D, Hi_D, Lo_R, Hi_R] = orthfilt(w);
subplot(323); stem(Lo_D); title('Decomposition low-pass filter');
subplot(324); stem(Hi_D); title('Decomposition high-pass filter');
subplot(325); stem(Lo_R); title('Reconstruction low-pass filter');
subplot(326); stem(Hi_R); title('Reconstruction high-pass filter');
end

2.7.
-

(splitting) . ,
, .
(. 2.10 ). ,
.
54

. .
, ,
. ( ) ,
. 2.16, .

2
S

S
A1
AA2
AAA3

(2,0)
DAA3

(0,0)

D1

(1,0)
AD2

DA2
(2,1)

(2,2)

DD2
(2,3)
DDD3

(0,0) D1

A1

(1,1)
AA2

(1,0)

ADA3

DA2

(2,1)

DDA3

. 2.16


, , , . , , -
.
. 2.17 db 4 .
- ,
,
.

(. 2.16, ) (. 2.16, ). ,
, .
.
.
55

. 2.17

. , , (Shannon)
E = Si2 log( Si2 ) ,

(2.22)

E = log( Si2 ) .
i


; ,
.
() .
. , .
, , . . 56

[8].
.

. 2.18

. 2.18 () , (. 2.4):
Function ss_tree
load mtlb; x = mtlb(1:200); wpt = wpdec(x,3,'db1');
wpt = wpsplt(wpt, [3 0]); plot(wpt)
bst = besttree(wpt); plot(bst);

.
(0,0).

.
[7, 8],
() , . - [1, 3, 7, 8].
- Wavelet Toolbox.
- , ,
. 2 (.2.5).

57

2.8.

.
2.2 2.3.
, . ,
. (. . 2.7).
:
(. 2.19).
: , , .
,
.
() .

, De-noise Compression GUI.
Wavelet Toolbox
(. . .2.7). .
2.5.
y = wtresh( X , SORN , T ) . ythard ( SORN = ' h ') ytsoft ( SORN = ' s ')
( thersold ) T X .

y = linspace(-1,1,100); thr = 0.4;


ythard = wthresh(y,'h',thr); ytsoft = wthresh(y,'s',thr);
subplot(131), plot(y); title('No thersold')
subplot(132), plot(ythard); title('thard thersold')
subplot(133), plot(ytsoft); title('tsoft thersold')
. 2.19 y = f ( x) ,
y = wtresh( X , SORN , T ) , , .
58

. 2.19
2.6.
wdencmp
. noismima
wdencmp (. .2.7). [xd, cxd, lxd, perf0,
perfl2] = wdencmp ('lvd',c,l,wname,lev,thr,'h')
XC , X ( ,
) THR . [CXD, LXD] - XC . PERFO
PERFL 2
L2 .
PERFL 2 = 100 * ( norm(C C ) / norm(C ))2 , norm ; 2

PERFL 2 = 100 XC / X . N -. SORH ( ' s ' ' h ' ) .


:
1) lev. wavedec(x, lev, wname);
.
2) . . , [thr,nkeep] = wdcbm(c,l,alpha,m),
thr nkeep. alpha 1.5 3.0 .
3) -. wdencmp(.).
,
(. 2.20 ):
function noismima
load noismima; x = noismima;
wname = 'db4'; lev = 5; [c,l] = wavedec(x,lev,wname), alpha = 2; m = 2*l(1);
59

[thr,nkeep] = wdcbm(c,l,alpha,m);
[xd,cxd,lxd,perf0,perfl2] = wdencmp('lvd',c,l,wname,lev,thr,'h');
subplot(211), plot(x), title('Original signal'); axis([0,500,-10,10])
subplot(212), plot(xd), title('Compressed signal'); axis([0,500,-10,10])
xlab1 = ['2-norm rec.: ',num2str(perfl2)];
xlab2 = ['% - zero cfs: ',num2str(perf0),'%'];
xlabel([xlab1 xlab2])
end

. 2.20
, , lev, alpha m, .
2.7.
, 2.2.
1) . , -
.
besttree ( )
:

function binar_tree
t = 0:0.000001:0.001024;
A1 = 1; A2 = 1; F1 = 10000; F2 = 2*F1; a = 90; b = 90;
s1(1:200) = 0; a1 = a*0.0174533; a2 = b*0.0174533;
t2 = 0.0002:0.000001:0.0008;
s2 = A1*sin(2*pi*F1*t2-a1) + A2*sin(2*pi*F2*t2-a2);
s3(1:224) = 0; s = [s1 s2 s3];
randn('state',0); g = 0.5; n = g*randn(size(t)); x = s + n;
60

wpt = wpdec(x,3,'db4');
wpt = wpsplt(wpt, [3 0]); plot(wpt)
bst = besttree(wpt); plot(bst); end
. 2.21, ; . (0,0).
. (1,0) (1,1) , . , ,
- ( ) . . 2.21, , (2,0) (4,0), ..
. ()
.
( 4 16 ).

(0,0)
(1,1)

(1,0)
(2,0)
(3,0)

(2,1) (2,2) (2,3)


(3,1)

(4,0) (4,1)
a

. 2.21
() ( ) ,
, .. .
61

2) .
wpdencmp (. . .2.6)
THR , wpbmpen
- [13]:

function binar_de_noise
t = 0:0.000001:0.001; A1 = 1; A2 = 1; F1 = 10000; F2 = 2*F1;
a1 = 0; a2 = 0; s1(1:200) = 0; t2 = 0.0002:0.000001:0.0008;
s2 = A1*sin(2*pi*F1*t2-a1) + A2*sin(2*pi*F2*t2-a2);
s3(1:200) = 0; s = [s1 s2 s3];
randn('state',0); g = 0.5; n = g*randn(size(t)); x = s + n;
wname = 'db4'; lev = 4; tree = wpdec(x,lev,wname);
det1 = wpcoef(tree,2); sigma = median(abs(det1))/0.6745;
alpha = 2; thr = wpbmpen(tree,sigma,alpha);
keepapp = 1; xd = wpdencmp(tree,'s','nobest',thr,keepapp);
subplot(311), plot(s), title(' '); axis([0,1000,-3,3])
subplot(312), plot(x), title(' '); axis([0,1000,-3,3])
subplot(313), plot(xd), title(' '); axis([0,1000,-3,3])
end
. 2.22.

. 2.22
62

, , lev, alpha
sigma, / .
. 2.2 lev y
, % (. 2.2).
2.2
1

y ,

0.307

0.208

0.128

0.108

0.087

5.346

5.050

4.901

4.657

9.449

14.81

14.79

14.09

13.78

18.25

lev

, lev ( levopt = 4 ), . lev > levopt


, .
2.8.
wden(.). (. . .2.7). ' SORH ' ( ' s ' ' h ' ) TPTR : ' rigrsure '
, ' heursure '
, ' sqtwo log' , 'min i max i ' .
function mtlb1_noise
load mtlb; s = mtlb(501:1000);
subplot(411), plot(s); title(' ');
axis([0,500,-3,3]); t=(0:0.000001:0.000499);
randn('state',0); g = 0.6; n = g*randn(size(t))'; x = s + n;
subplot(412), plot(x); title(' ');
axis([0,500,-3,3]); lev = 3;
xdm = wden(x, 'minimaxi', 's', 'sln', lev, 'db4');
subplot (413), plot(xdm), title('Minimax'); axis([0,500,-3,3])
xdr = wden(x, 'rigrsure', 'h', 'sln', lev, 'db4');
subplot (414), plot(xdr), title('Rigrsure'); axis([0,500,-3,3]); end
. 2.23 minimax rigrsure. 63

. 2.23
: , lev , (s h) ( ' rigrsure ' ,
' heursure ' , ' sqtwo log' , 'min i max i ' ).

64

-.

3.1.
.
S ( x, y ) . , , V = {x, y} R 2 , x y .
- (1.11)

x b1 x b2

,
,
a2
a1a2 a1
1

(3.1)

a1 a2 , b1 b2 a b .
:
a = 2m , b = k 2m = ka ,
m,k = 2 m / 2 (2 m V k ) ,

m,k = 2 m / 2 (2 m V k ) . (3.2)

.
65


[ 3].
. ,
,
. :
( x, y ) = ( x)( y ) ,
(3.3)

LH ( x, y ) = ( x)( y ) , HL ( x, y ) = ( x)( y ) ,
HH ( x, y ) = ( x) ( y ) ,

(3.4)

H L
.
:
2 m (2 m x k )(2m y l ), 2 m (2 m x k ) (2m y l ),
(3.5)
2 m (2 m x k )(2m y l ), 2 m (2 m x k ) (2m y l ).
,
,
.
()
.
[1].

3.2.
, (3.5),
-
, Wavelet Toolbox.
, . 2.6,
.
, N N
(. 3.1, ). N
() () () . N N / 2 (. 3.1, ). ,
N / 2 N / 2 (. 3.1, ): 66

(1), (1),
(1)
(1).
() (. 3.1, ) ..

N N

N N /2

N N /2

. 3.1

. 3.2 ()
-, ..
( , ): 1, 1, 1 1.

. 3.2

67

,
GUI Wavelet Toolbox, Wavelet-2D.

. 3.3

. 3.3 : (); - (dwt2) 2;


(idwt2); (
Visualize; Full Sitze Reconstruct ).

. . 3.4 .
: ( ), ( ), (1,0) ( ) ( ). 68

, (), .
(0,0)

(1,0)

(1,1)

(2,1)

(2,2)

. 3.4

(. .8 .9) . .1. ,
, . 2
(.2.4 .2.6).

3.3.


(. .2.8).
.
, .
69

.3.5. ,
GUI (Wavelet
2-D). ,
. , , . db2.
.

. 3.5


MATLAB .
3.1.
, neissi2d. wpbmpen ( ) wpdencmp ( ) (. . .2.7):
load noissi2d; nbc = size(map,1); wname = 'db8';
lev = 2; tree = wpdec2(X,lev,wname);
det1 = [wpcoef(tree,2) wpcoef(tree,3) wpcoef(tree,4)];
sigma = median(abs(det1(:)))/0.6745; alpha = 1.1;

70

thr = wpbmpen(tree,sigma,alpha); keepapp = 1;


xd = wpdencmp(tree,'s','nobest',thr,keepapp);
colormap(pink(nbc));
subplot(221), image(wcodemat(X,nbc)); title(' ')
subplot(222), image(wcodemat(xd,nbc)); title(' ')

end

. 3.6 () ()
, .

. 3.6
. ,
.
3.2. -
.
,
, .
, ( wdcbm 2 )
( wdencmp ):
function detfingr
load detfingr; nbc = size(map,1); wname = 'sym4'; lev = 3;
[c,s] = wavedec2(X,lev,wname); alpha =1.5; m = 2.7*prod(s(1,:));
[thr,nkeep] = wdcbm2(c,s,alpha,m);
[xd,cxd,sxd,perf0,perfl2] = wdencmp('lvd',c,s,wname,lev,thr,'h');
colormap(pink(nbc)); subplot(221), image(wcodemat(X,nbc)),
title(' '); subplot (222),image(wcodemat(xd,nbc)),
title(' '); xlabl = ['2-norm rec. :', num2str(perfl2)];
xlab2 = [' % - zero cfs: ',num2str(perf0), '%']; xlabel([xlabl xlabl2])
end

. 3.7 ; 94 % , 98 %
. , 71

, . .

. 3.7
, ,
.


. , ,
, - ..
, ,
. , 512512 768 , 25 ,
188 /.
, 3.2, , .
, ( ) , .
( 3 5). .
, ,
, ,

72

.
, .
( ) [24]. ,
,
, [19].
,
JPEG ,
, JPEG , .
-,
. , -.

3.4. ADV6XX
Analog Devices

. (. . 3.1 [1]).

-, (. 3.8).
-

-.
(Y, Gr, Gb) ( 2 )
() , 14 .
42 (), .
:

,
.

73

ADV601
10

ADV601LC
8

RS-

160
120

0 +70
0 +70


(evaluation board)
VideoLab

VideoPipe

ADV611
8

3.1
ADV612
8

120

120

0 +70

25 +85

CCTVPIPE CCTVPIPE

42 . , , 2:1 5:1.

:
- ;
-

. 3.8


. , 42 , ,
. 42 ,
.
74

350:1,
ADV611 ADV612 7500:1.
,
, ,
.
ADV601 .
ADV611 ADV612 -,

.
(), .

[1] Analog Devies:
http//www.analog.com.
, -
.

, -
(), .
. () .
. , ,
1998, 8.
,

.

- .
,
75

.
,
, .
, , ,
, : [14, 7, 8, 13, 14, 1921, 2432, 3638];
[15, 16, 19, 20, 31]; [17]; - [33, 38]; [4, 19]; [12, 22], [15], [19] .

[1, 21, 24, 28] , , , . - .
, - [1, 3, 710, 19,
24, 28, 35, 38]. ,
MPEG-4, JPEG-2000, Corel,
Analog Devices,
.
[9].

[19, 23, 36]. ,

.

[4, 3].
,
.

. ( ), .
,
, ..
[15]. 76

, ,
, , , ( , ) . :
[19], -
[8].
,
[26].
,
. . ,
. ,
,
.

.
.. ..
[1], ,
-,
, ADV6xx,
. .. [8],
, , Wavelet Toolbox,
Wavelet Extension Pack, Wavelet Explorer, MATLAB
6.0/6.1, Mathcad-2001 Mathematica 4.
,
.
-,
.

77

1.
.., .. . .: - , 1999. 208 .
2. .. - . . .
.: - 000 , 1999. 152 .
3. .. . .: -
, 1999. 132 .
4. .., .., .. wavelets : . : - . .
-, 2000. 188 .
5. . . -: , 2001. 464 .
6. .. . .: , 2001. 412 .
7. .., .. MATLAB.
. . .: . 2002. 608 .
8. .. . . .: -,
2002. 446 .
9. C ., ., . .
. : ,
2002. 272 .


10. .., .. . . . , 1999. . 1, . 12
. . 127150.
11. .., .. . .: . . 7 . . 244296.
12. .. : . . ,
1999. . II, . 6 . . 71
108.
13. .. . .: , 2000. 2, . 2.6. -. . 6568.
14. . : . /
.., .. , .. , .. , .. ,
.. / . . .. . : , 2002.
. 16 - . . 287307. 13 - .
. 331340.

, ,
15. .. -: // . 1998. . 166. 11. . 11451170.
16. .., .., .. - -
// . 1999. 11. . 4044.
78

17. .., .., .., .. - // , 2000. 4. . 5158.


18. .., .. // . . -, , , , 1997. . 4.
5. . 6266.
19. .., .., .. // , 2001. . 171. 5. . 465501.
20. .., .., ..
- // , 2000. 6. . 1315.
21. .. - // , 1997. . 355. 5. . 592596.
22. .. - : . . .-. .
, 1997. 84 .
23. .., .. -
/ . . . .-. . . , 2000. . 2. . 187189.
24. ..
/ . . . .-. . . . , 1999. . 3839.
25. .
wavelet. . . . . . ., 2000. 16 .
26. ..., .. Wavelet- // , 1996. 4. . 320.
27. .., .. // , 2000. . 36. . 2.
. 2737.
28. .., .., ..
// , 1998. . 34. . 2. . 7785.
29. .. // , 2000. . 10. 3. . 7076.
30. .. - // -, 1999. . 9. 2. . 3037.
31. .., .. -
/ . . - .
, 1997. 22 ., -11-97-347.
32. .., .. -
- / 6- . .-. . , , . , 2000. . 1. . 157163.
33. .. //
. 1996. . 350. 3. . 393396.
34. .. // , 1997. . 188. 1. . 147160.
35. .. -
// . . , 2001. 5. . 8694.
36. .. // /
79

. . - . ., 1999. . 21-37. . , 27.04.1999, 2145 . 99.


37. .., .., .. -. , . .
-, 2001, 15 . . 07.06.2001, 14192001.
38. .. - // . .-. . . -2002. ,
2002. . 4. . 4752.

-
. -,
. :
http://www.wavelet.org.
, , , .
http://www.mathsoft.com/wavelet.html
.
http://playfair.stanford.edu/~wavelab MATHLAB, .
http://www.math.spbu.ru/~dmp -
, .
http://www.wavelet.narod.ru _ ; , .
- [1].
, , www.rambler.ru, www.aport.ru,
-, , ;
( ) .

80

1

Wavelet Toolbox MATLAB

GUI

-
, GUI
(Graphic User Interfice). - (), - ( , ().

1.1. GUI
GUI wavemenu .
.
,
Wavelet Toolbox.
1 2.
Wavelet Display . , , , .
.1 db4.
(t ) (t ) (.. )
( Lo _ D, Hi _ D Lo _ R, Hi _ R ). . :
(Wavelet), (Refiniment),
(Display),
Name (Name wavelets), (Wavelets).
View Axes. , . - .
( ) .
Wavelet Packet Display (haar, db, sym,
coif, dmey), .
phi W0 , W2 , W4 ,... psi W1, W3 , W5 ,...
..
Continuous Wavelet 1-D . File, Demo Analysis, 15 .
: . .2 .
: (Analyzed Signal),
(Coefficients Ca,b),
81

. .1

. .2
82

a (Coefficients Line Ca,b for scale a = ) (Local


Maxima Lines). -.
Selected Axes, , , .
Complex Continuous Wavelet 1-D ( omplex Gaussian cdau, Shannon shau,
Frequecy Bspline fbsp, Complex Morlet cmor). ,
, : (Analyzed Signal), (Moduls) ( Angle) , , . 7 .
Wavelet 1-D . File, Demo
Analysis, 32 . . .3 - (Electrical consumption).
, ,
(haar, db, coif, bior, rbio, dmey), (level
1 11) . Analyze (s), (an) (dn,,d1) .
Analyze , : Statistics , Histograms ,
Compress , De-noise .

..3
83

Statistics.
.
: (Original signal),
(Synthesized signal), (Approximation), (Deteil).
level. . .4 ( . .3)
.
.

. .4
Histograms.
-.
ompress. ()
: (Global
thresholding ) c (By level thresholding . .6)
. (..5)
(Select thresholing): Scarce high-Scarce medion Scarce Low Belance sparsitynrm Remore near 0. (. .6)
( ) . d 4 ,... , d1 ( . .6)
. Sparsity .

84

. .5

. .6

85

De-noise.
( ). ,
. hard, soft.
( ).
Wavelet Packets 1-D
. 17 . . .7
mishmash. 4 : (Decomposition Tree); a3 (3.0) (Packet:
(3,0)), ;
(Analyzed Signal); (Colored Coefficient ).
(shannon, threshold, norm, log energy, sure, user), (
Initial, Wavelet, Best, Best
Level), (Analized), (Compress)
(De-noise).

. .7
Wavelet 2-D . 17 . . .8
.
, (dwt) . , (idwt).

86

. .8

. .9

87

, Visualize. Full Size


Reconstruct .
Wavelet 1-D.
Wavelet Packet 2-D . (. .9)
Wa-velet Packet 1-D.
.
, , ,
. .
, (Colored Coefficient ).

.1.2.
wavedemo. (. .10, ),
:

Command line mode ,

GUI mode GUI , ,

Short 1D scenario
,

Close .

. .10
88

Command line mode ,


(. .10, ). ,
GUI. Wavelet 1-D. , , -
Electrical consumption.
. .11 . ca1 cd1 ,
.. . . -
, ,
-.
Short 1D scenario ( Electrical consumption ).

, -. , .

. .11

89

2

Wavelet Toolbox
.2.1.
Esc ;
clc ;
Ins / ;
load fname... fname.m
, ;
load (' fname ') fname.m ;
diare file _ name ;
% . ;
Delug Run ;
Edit Copy Figure (, Word);
wavemngr (' read ') -, ;
wavemngr (' read ',1) ;
wave inf o(' tipe ') ;
15 ,
;
wavemenu
GUI (Graphic User Interfice);
wavedemo .

.2.2. ()
cwt ()
-
( 1-D);
COEFS = cwt ( S , SCALES ,' wname ') S SCALES , ' wname ' ;
COEFS = cwt ( S , SCALES ," wname ',' plot ') -;
COEFS = cwt ( S , SCALES ," wname ',' PLOTMODE ') ,
, PLOTMODE : ' lvl '
90

, 'glb' ,
' abslvl ' ' lvlabs ' , ' abs glb' 'glb abs '
.

.2.3.
- ()
wavedec() - ();
[C , L] = wavedec( X , N ,' wname ') C L X
N ( );
[C , L] = wavedec( X , N , Lo _ D, Hi _ D )
;
[ Lo _ D, Hi _ D, Lo _ R, Hi _ R ] = wname( DF , RF ) ( ),
;
waverec() -;
X = waverec(C , L ' wname ') ()
[C , L] ;
X = waverec(C , L, Lo _ R, Hi _ R) , ' wname '
Lo _ R, Hi _ R ;
appcoef () ;
A = appcoef (C , L,' wname ', N )
N [C , L] ; N
. 0 N NMAX = length( L) 2 ;
L = w max lev( S ,' wname ')
( ) S ' wname ' ;
A = appcoef (C , L,' wname ') ( NMAX = length( L) 2 ) [C , L] ;
A = appcoef (C , L, Lo R, Hi _ R ) ,
();
det coef () ;
D = det coef (C , L, N ) N
[C , L] ;
D = det coef (C , L)
;
[ D1,..., D p ] = det coef (C , L,[(1),..., N ( p)])
[ N (1),..., N ( p )] ;
dwt () ;
91

[cA, cD] = dwt ( X ,' wname ') ,


cA cD ;
[cA, cD] = dwt ( X , Lo _ D, Hi _ D ) , ' wname '
Lo _ D Hi _ D ;
idwt () ;
X = idwt (cA, cD,' wname ') , cA cD ;
X = idwt (cA, cD, Lo _ R, Hi _ R) , Lo _ R Hi _ R ;
upcoef () -;
Y = upcoef (0, X ,' wname ', N )
N X; 0 = ' a ' , ; 0 = ' d ' , ;
Y = upcoef (0, X , Lo _ R, Hi _ R, N ) , .

.2.4.
, , 2, .
.
appcoef 2() ;
A = appcoef 2(C , S ,' wname ',[, N ]) N -
[C , S ] ' wname ' .
N: 0 N size( S , l ) 2 ;
A = appcoef 2(C , S , Lo _ R, Hi _ R, N ) ,
;
det coef 2() ;
D = det coef 2(O, C , S , N ) D
N - [C , S ] , 0 = ' h ', ' v ', ' d ' ;
[ H ,V , D] = det coef 2(' all ', C , S , N ) (, ) ;
dwt 2() ;

92

[cA, cH , cV , cD] = dwt 2( X ,' wname ') cA , cH , cV cD ;


[cA, cH , cV , cD] = dwt 2( X , Lo _ D, Hi _ D ) , .
,
.

.2.5. -
bestlev() , - , ;
T = bestlevt (T ) , ;
[T , E ] = bestlevt (T ) T
; j 1
E ( j ) ;
besttree() T ;
;
T = besttree(T ) T ,
;
[T , E ] = besttree(T ) , ;
[T , E , N ] = besttree(T ) N ,
;
wentropy () ;
E = wentropy ( X , T , P ) E X . T , : ' shannon ' ,
' threshold ' , ' norm ' , ' sure ' 'log energy ' , ' user ' . P , T : P , ' norm '
P ( P 1 ), T = ' user ' , P
m -
X ;
wp 2 wtree() - ;
T = wp 2 wtree(T ) T ;
wpcoef () -;
X = wpcoef (T , N ) , N T ;
X = wpcoef (T ) X = wpcoef (T ,0) ;

93

wpcutree() ;
T = wpcutree(T , L) T L ;
[T , RN ] = wpcutree(T , L) RN , ;
wpdec() -;
T = wpdec ( X , N ,' wname ', E , P ) T , X N ' wname ' . E , P . E T T P
E = wentropy ( X , T , P ) ;
T = wpdec( X , N ,' wname ') T = wpdec( X , N ,' wname ',' shannon ') ;
wpdec 2() -;
T = wpdec 2( X , N ,' wname ', E , P) - X N , E , P ;
wpfun() -;
[WPWS , X ] = wpfun(' wname ', NUM , PREC )
2 PREC ; WPWS W 0 NUM , [W0 ,W1,...,WNUM ] , X ,
;
wpcoef () ;
X = wpcoef (T , N ) N - T ;
X = wpcoef (T ) X = wpcoef (T ,0) ;
X = wpcoef 2(T ) X , T .

.2.6.
.
swt () ;
SWC = swt ( X , N ,' wname ') - X N ( X = 2 N ) ' wname ' ;
SWC = swt ( X , N , Lo _ D, Hi _ D) ;
1 i N , SWC (i,:)
i , SWC ( N + 1,:) N ;

94

[ SWA, SWD] = swt ( )


SWA SWD ; ;
iswt () ;
X = iswt ( SWC ,' wname ') , X = iswt ( SWA, SWD,' wname ')
X = iswt ( SWA,(end ,:), SWD,' wname ') X
SWC [ SWA, SWD] ;
X = iswt ( SWC , Lo _ R, Hi _ R ) , X = iswt ( SWA, SWD, Lo _ R, Hi _ R )
X = iswt ( SWA,(end ,:), SWD, Lo _ R, Hi _ R ) ,
;
swt 2() ,
, swt () ;
iswt 2() ;
X = iswt 2( SWC ,' wname ') , X = iswt 2( A, H ,V , D,' wname ')
X = iswt 2( A(:,:, end ), H ,V , D,' wname ') SWC [ A, H ,V , D] ;
' wname ' Lo _ R Hi _ R ,
X .

.2.7.

ddencmp () ;
[THR, SORN , KEEPAPP, CRIT ] = ddencmp ( IN1, IN 2, X )
( ) . X . :
THR , SORH ,
KEEPAPP , , CRIT . IN1 :
' den ' ' cmp ' . IN 2 ' wv ' ' wp ' ;
thselect () ;
THR = thselect ( X , TPTR ) X TPTR :
' rigrsure ' , ' heursure ' , 'min i max' ,
' sqtwo log' sqrt (2 * log(length( X ))) . y = f (t ) + e , e N (0,1) ;
wbmpen() ;
95

THR = wbmpen(C , L, SIGMA, ALPHA) Birge-Massart ,


[C , L] , SIGMA
, ALPHA
;
wdcbm() ;
[THR, NKEEP] = wdcbm(C , L, ALPHA, M ) THR
NKEEP
, [C , L] -
j = length( L) 2 , ALPHA M
1, THR(i ) i . j , M ALPHA : ) j + 1 , ) i = 1 j , ni ni = M ( j + 2 i ) ALPHA . ALPHA = 1,5
ALPHA = 3 .
M = L(1) , M L (1) 2 * L(1) ;
wdcbm 2() ;
[THR, NKEEP] = wdcbm2(C , S , ALPHA, M ) , , THR 3 j , THR(:, i )
i : , . M = prod ( S (1,:)) ,
prod ( S (1,:)) 6 prod ( S (1,:)) ;
wden() ;
[ XD, CXD, LXD] = wden( X , TPTR , SORN , SCAL, N ,' wname ') XD ,
X , [CXD, LXD] - XD , TPTR
: ' rigrsure '
, ' heursure ' , ' sqtwo log' , 'min i max i ' , ' SORH ' ( ' s ' ) ( ' h ' ) .
SCAL = ' one ' , s (n) = f (n) + e(n) , e( n)
[0,1] . SCAL : ' one ' , ' s ln'
( [0,1] )
,
' m ln'
' wname ' ;

96

[ XD, CXD, LXD] = wden(C , L, TPTR, SORN , SCAL, N ,' wname ') , [C , L] N .
wdencmp () ;
[ XC , CXC , LXC , PERFO, PERFL 2] = wdencmp(' gbl ', X ,' wname ', lev, THR,
SORH , KEEPAPP) XC , X ( , )
THR .
[CXD, LXD] - XC . PERFO
PERFL 2 L2 .
PERFL 2 = 100 * ( norm(C C ) / norm(C ))2 , norm ;
2

PERFL 2 = 100 XC / X

. N

-. SORH ( ' s ' ' h ' ) . STDC = wnoisest (C , L, S )


-, S
; [C , L] -;
THR = wpbmpen(T , SIGMA, ALPHA) ()
, T , SIGMA , ALPHA ;
wpdencmp ()
, wden() wdencmp () ;
[ XD, TREED, PERFO, PERFL2] = wpdencmp(TREE , SORH , CRIT , PAR, KEEPAPP)
wdencmp () , TREE .
wpthcoef () ;
NT = wpthcoef (T , KEEPAPP, SORH , THR ) NT ,
T , THR ;
wthcoef () -;
NC = wthcoef (' d ', C , L, N , P ) [C , L] N - , N P ,
N , 1 N length( L) 2 , P
,
;
NC = wthcoef (' d ', C , L, N ) , N ;

97

NC = wthcoef (' t ', C , L, N , T , SORH ) ( SORH = ' s ' ) ( SORH = ' h ' ) ,
N T ;
wthcoef 2() -;
NC = wthcoef 2(' type ', C , S , N , T , SORH ) , [C , S ]
( SORH = ' s ' ) ( SORH = ' h ' ) , N T , N (i ) size( S ,1) 2 ;
wthresh() ;
Y = wthresh( X , SORH , T )
-.
ytsoft ( SORH = ' h ' ) ythard ( SORH = ' h ' ) T
X ;
wthrmngr () ;
THR = wthrmngr (OPTION , METHOD,VARARGIN ) OPTION . VARARGIN
OPTION METHOD .

.2.8.
X = wnoise( FUN , N ) ,
FUN , 2 N [0,1]; : 1) FUN = 1 ' blocks ' , 2) FUN = 2 ' bumps ' ,
3) FUN = 3 ' heavy sin e ' , 4) FUN = 4 ' doppler ' , 5) FUN = 5
' quadchirp ' , 6) FUN = 6 ' mishmash ' .
[ X , XN ] = wnoise( FUN , N , SORT _ SNR ) X , ; std ( X ) = SORT _ SNR , XN ,
,
N (0,1) .
(. .12):
ind = linspace(0,1,2^8);
for i = 1:6
x = wnoise(i, 8);
subplot(6,1,i), plot(ind,x)
end

98

. .12

99

3

(2.7)
.
f (t ) L2 ( R ) . , L2 ( R ) a = 2m Vm ,
f (t ) = Am (t ) (. - (2.7)).
(), , .
1.
V
Vm , L2 ( R ) ,
..
... V2 V1 V0 V1 V2 ...

I Vm = {0} ,

U Vm = L2 ( R) .

(.1)

mZ

m=Z

2.
Am (t ) Vm Am 1 (t )
Vm 1 .
(t ) V0 ,
3.
ok (t ) = (t k ), k Z .

(.2)

V0 . (t )

(t )dt = 1

(.3)

() .
. .13 .
ok (t )
V0 ,
{0}

Vm

Vm1

L2(R)

mk (t ) = 2 m / 2 (2 m t k )

(.4)


Vm .

. .13
100

. Am (t ) f (t ) Vm :

Am (t ) = (mk (t ), f (t ))mk (t )

(.5)

m , Am (t ) f (t ) .
m , .
, S (t ) = f (t ) L2 ( R)
Am (t ) Vm :
S (t ) = lim Am (t ) .

(.6)

Vo V1 , 1k (t ) V1 ,
:
(t ) = oo (t ) = 2 h(l )1,l (t ) = 2 h(l )(2t l ) ,
(.7)
l

hl = h(l ) = ((t ), (2t l ))

(.8)

( ). hl (t ) , .. .
. .13 , L2 ( R)
,
. Wm
Vm Vm 1 :
Vm 1 = Vm Wm ,

I Wm = {0} , U Wm = L2 ( R) .

m=Z

(.9)

mZ

. .14 Vm 1 Vm
Wm , .
(t ) = oo (t ) ( ) W0 .
, W0 V1 ,
Vm +1
Vm 1
Vm
oo (t ) = (t )
, (.7):
Wm +1
Wm
oo (t ) = (t ) = 2 g (l )1,l (t ) =
. .14
l

101

= 2 g (l )(2t l ) ,

(.10)

gl = g (l ) = ( (t ),

(2t l ))

(.11)

, .. .
Wm
(t ) :
mk (t ) = 2 m (2 m t k ) .
(.12)
mk (t ) 2.1 [ (2.1)].
, hl gl .
Wm Vm , (t ) (t )
, (.7) (.10) ,

0 = ((t ), (t )) = 2 hl g p (1l (t ),
l

1 p (t )) = 2 hl gl

(.13)

gl = (1)l h2 n 1l .
(.14)
l = 0,1,..., lo = 2n 1 , n .
(.10) , (t ) (t ) , (.7) hl .
S (t ) L2 ( R)
Wj , j R :

S (t ) =

(S (t ), jk (t )) jk (t ) = d jk jk (t ) .

j = k

(.15)

j = k

m = 0 (..
a = 2m = 1 ). (t )
( ), aok
aok = ak = ( f o (t ), ok (t k ))
f o (t ) .
S (t ) m ,
.. (.15),
:
S (t ) = Am (t ) +

D j (t )
j =1

amk mk (t ) + d jk jk (t ) ,
k

amk = ( S (t ), mk (t )) d jk = ( S (t ), jk (t ))

102

(.16)

j =1 k

(.17)


.........................................................................................................
1. - ................................
1.1. ......................................................................
1.2. . ..............................................................
1.3. ................................................................
1.4. ......................................................
1.5. - ..............................................
1.6. - ...................................................................
1.7. - .............................
1.8. .........................................
2. .......................
2.1. - ......................................................
2.2. ...............................................................

3
6
6
9
11
12
15
16
18
29
32
32
35

2.3. - () ...................
2.4. - .........................................................
2.5. ..........................................................................
2.6. ......................................................................
2.7. - .......................................
2.8. ................
3. -. ...............................................................................................
3.1. ...........................................................................
3.2. ...................................................................................
3.3. ...................................
3.4. ADV6XX .....................................................
....................................................................................................
.........................................................................................
1. GUI Wavelet
Toolbox MATLAB ...............................................................
2. Wavelet Toolbox ...................
3. .................................................

36
45
49
50
54
58

103

65
65
66
69
73
75
78
81
90
100

. .
. .
06.02.2003. 60 84 1/16.
100 . .-. . 6,25. . . 6,5. . 5. 64.

.
.



630092, . , . . , 20

104