advertisement
Periodic Diagonal Matrices
Form of the matrix
Start with a matrix of the form
(1.1)
CM , N   AML BLN
L
Suppose that both B-1 and A-1 are known. Then try
1 1
(1.2)
CN1, K   BNJ
AJK
J
Multiply CM,N by the assumed inverse and sum on N
 CM , N  BNJ1 AJK1   AML BLN  BNJ1 AJK1   AML AJK1  BLN BNJ1
N
J
N
L
J
  AML A  LJ   AML A
1
JK
L
J
1
LK
L
  M ,K
J
N
(1.3)
L
Q.E.D
Next note that
1
AMN  PM  MN   AMK  KN  AKN
PK  KN  (1.4)
K
So that for a penalty function PM, the form of B is
1
BKN  1  AKK
PK   KN
(1.5)
With inverse
1
BKN

 KN
1  A
1
KK
PK 
(1.6)
Inverse of AML
Define
If P(M)  ∞ as |M| becomes large, the inverse of B as given by (1.6) becomes zero in
this limit. This means that for all practical purposes an array of the form
 1  P20
0.75
1.3  107
108
7  108 2.3  10 7
0.55

1  P19
0.75
1.3  107
108
7  108 2.3  10 7
 0.55


7
0.55
1  P1
0.75
1.3  107
108
7  10
2.3  10

8
7
7
A  P   7  10
2.3  10
0.55
1  P0
0.75
1.3  10
10 8
 108
7  108 2.3  107
0.55
1  P1
0.75
1.3  1



1.3  107
108
7  108 2.3  107
0.55
1  P19
0.75

7
8
8
7
 0.75
1.3  10
10
7  10
2.3  10
0.55
1 P
(2.1)
Can be written with
AML  A  M  L   7  108 , 2.3  107 , , 0.55,1, 0.75, ,1.3  10 7 ,10 8  (2.2)
And
1
AML  PM  ML   A  M  K   1  A0,0
PK   KL
(2.3)
K
The inverse of this matrix is
 A  P KN
1
 A
1
 K  L
L
 LN
1  A1 0 PL

A1  K  N 
1  A1 0 PN
Defining the inverse of A[m-n]
The inverse is defined by
M / 2 1

n  M / 2
Am1,n An , j   m , j
(2.4)
Assume that A-1, like A is a function of the coordinate differences, so that (2.4) becomes
M / 2 1

n  M / 2
A1  m  n  A  n  j    j ,m
(2.5)
Define the transform pair of A over M points as
iT
m
ti 
; fm 
M
T
M / 2 1
1
a i  
 A  m exp   j 2 f m ti  (2.6)
T m  M / 2
T M / 21
 a i  exp  j 2 f m ti 
N i  M / 2
This implies that the M values of A in (2.6) extend as A[m+M]=A[m]. Then


 m  n  i  M / 21
n  j  k 
T 2 M / 21 M / 21 1
a
i
exp

j
2




  a  k  exp   j 2
   j ,m (2.7)


2
N
N
M n M / 2 i  M / 2
k

M
/
2




Evaluate the sum over n first
T 2 M / 21 1 M / 21
jk  mi  M / 21

a
i
a
k
exp
j
2








  exp  j 2  i  k  n    j ,m (2.8)
N n M / 2
M 2 i  M / 2

k  M / 2
The sum on n is Mi,k
T 2 M / 21 1 M / 21
jk  mi 

a i   a  k  exp  j 2

  i ,k   j ,m
M i  M / 2
N 

k  M / 2
So that the sum on k is easy to evaluate, leading to

 j  m i 
T 2 M / 21 1
a i a i  exp  j 2
   j ,m

M i  M / 2
N


-1
2
For a [i]=1/(T a[i]), this is satisfied.
A  m 
This is the equation used to test the inversion in MatInvFFT.doc
The –T/2 to T/2 range is treated in ..\..\Fourier\Symmetric range.doc htm The zip
../../Fourier/for/symfft.zip contains the relevant fft code. This code is modified here to
have input from an unformatted file and output to an unformatted file.
Operations required
Using
1 N / 21
 A  f m  exp   j 2 f m t j 
T m  N / 2
1
a 1  t j   N / 21
T  A  f m  exp   j 2 f m t j 
a t j  
(2.9)
(2.10)
m  N / 2
Or




1
1
1

 exp  j 2 f m t j 
(2.11)
A  fm  

M j  M / 2  N / 21

  A  f m  exp   j 2 f m t j  
 m N / 2

This is an FFT from A to a, then a division and finally an FFT from a-1 to A-1. The time
required goes as 2Mlog(M)
M / 2 1
Testing
The specific test of interest is to generate a set of N values in the time domain. These are
then transformed to N frequency values. The frequency values are truncated to M values.
This truncation leaves Time alone, but there are now only M points. The original time
spacing of Time/N goes to  Time/M with fewer points. A transform over these fewer
points is periodic in M, rather than N.
for/DiagMat.wpj diagmat2p.zip
Af linear
-0.108108E+00
0.229049E+01
0.000000E+00 The matrix of 16 values in time is
truncated to 8 in frequency. Note
-0.810811E-01
0.276179E+01 -0.290837E-16
that the frequency does not go to zero
at the ends
-0.540541E-01
0.317146E+01
0.641848E-16
-0.270270E-01
0.345038E+01 -0.691992E-16
0.000000E+00
0.354932E+01
0.000000E+00
0.270270E-01
0.345038E+01 -0.131378E-15
0.540541E-01
0.317146E+01
0.000000E+00
0.810811E-01
0.276179E+01 -0.912627E-16
Afinv(f)
-0.108108E+00 -0.199833E+01 -0.126535E-14 The inverse matrix is small indicating
that more terms could have been
-0.810811E-01
0.106351E+01
0.728372E-15
used. Definitely not diagonal.
-0.540541E-01 -0.153619E-01 -0.374458E-15
-0.270270E-01 -0.186530E-01
0.279078E-15
0.000000E+00 -0.200229E-01 -0.256948E-15
0.270270E-01 -0.186530E-01
0.920926E-15
0.540541E-01 -0.153619E-01 -0.140141E-14
0.810811E-01
0.106351E+01
0.137022E-14
Afinv * AF
F -0.108E+00-0.811E-01-0.541E-01-0.270E-01 0.000E+00 0.270E-01 0.541E-01 0.811E-01
R 0.100E+01 0.749E-15-0.430E-15 0.312E-15-0.138E-14-0.104E-15-0.583E-15 0.319E-15
I 0.369E-15 0.109E-17 0.201E-15-0.484E-16-0.369E-15-0.109E-17-0.201E-15 0.484E-16
F -0.108E+00-0.811E-01-0.541E-01-0.270E-01 0.000E+00 0.270E-01 0.541E-01 0.811E-01
R 0.576E-15 0.100E+01 0.541E-15-0.430E-15 0.104E-15-0.139E-14 0.132E-15-0.749E-15
I 0.484E-16 0.369E-15 0.109E-17 0.201E-15-0.484E-16-0.369E-15-0.109E-17-0.201E-15
F -0.108E+00-0.811E-01-0.541E-01-0.270E-01 0.000E+00 0.270E-01 0.541E-01 0.811E-01
R -0.888E-15 0.444E-15 0.100E+01 0.444E-15-0.444E-15 0.000E+00-0.178E-14 0.000E+00
I -0.201E-15 0.484E-16 0.369E-15 0.109E-17 0.201E-15-0.484E-16-0.369E-15-0.109E-17
F -0.108E+00-0.811E-01-0.541E-01-0.270E-01 0.000E+00 0.270E-01 0.541E-01 0.811E-01
R -0.888E-15-0.888E-15 0.000E+00 0.100E+01 0.888E-15 0.000E+00 0.000E+00-0.178E-14
I -0.109E-17-0.201E-15 0.484E-16 0.369E-15 0.109E-17 0.201E-15-0.484E-16-0.369E-15
F -0.108E+00-0.811E-01-0.541E-01-0.270E-01 0.000E+00 0.270E-01 0.541E-01 0.811E-01
R -0.178E-14-0.444E-15-0.888E-15 0.444E-15 0.100E+01 0.444E-15-0.444E-15 0.000E+00
I -0.369E-15-0.109E-17-0.201E-15 0.484E-16 0.369E-15 0.109E-17 0.201E-15-0.484E-16
F -0.108E+00-0.811E-01-0.541E-01-0.270E-01 0.000E+00 0.270E-01 0.541E-01 0.811E-01
R 0.194E-15-0.154E-14 0.833E-16-0.687E-15 0.569E-15 0.100E+01 0.687E-15-0.576E-15
I -0.484E-16-0.369E-15-0.109E-17-0.201E-15 0.484E-16 0.369E-15 0.109E-17 0.201E-15
F -0.108E+00-0.811E-01-0.541E-01-0.270E-01 0.000E+00 0.270E-01 0.541E-01 0.811E-01
R -0.597E-15 0.298E-15-0.172E-14 0.298E-15-0.666E-15 0.756E-15 0.100E+01 0.805E-15
I 0.201E-15-0.484E-16-0.369E-15-0.109E-17-0.201E-15 0.484E-16 0.369E-15 0.109E-17
F -0.108E+00-0.811E-01-0.541E-01-0.270E-01 0.000E+00 0.270E-01 0.541E-01 0.811E-01
R 0.486E-15-0.527E-15 0.416E-16-0.173E-14 0.763E-16-0.680E-15 0.486E-15 0.100E+01
I 0.109E-17 0.201E-15-0.484E-16-0.369E-15-0.109E-17-0.201E-15 0.484E-16 0.369E-15
Download