Periodic Diagonal Matrices Form of the matrix

advertisement
Periodic Diagonal Matrices
Form of the matrix
Start with a diagonal matrix of the form
AM,N=A[M-N]
A[m] = {7×10-8,2.310-7,…,0.75,1,0.75,…, 1.310-7, 10-8}
[m]
-4, -3, …, -1 , 0, 1, … ,
3,
4

1
0.75
1.3  107
108

1
0.75
1.3  107
 0.55
(1)
AM , N  
0.55
1
0.75
2.3  107
0.55
1
0.75

 7  108 2.3  107
0.55
1
Extend this - Extending R.doc – to a form in which every element appears on each line
1
0.75
1.3  107
108
7  108 2.3  107
0.55
1
0.75
1.3  107
108
7  108 2.3  107
0.55
1
0.75
1.3  107
108
7  108
2.3  107
0.55
1
0.75
1.3  107
108
7  108 2.3  107
0.55
1
0.75
1.3  107
108
7  108 2.3  107
0.55
1
0.75
7
8
8
7
1.3  10
10
7  10
2.3  10
0.55
1
0.75
7
8
8
7
1.3  10
10
7  10
2.3  10
0.55
1
7
8
8
7
0.75
1.3  10
10
7  10
2.3  10
0.55
(2)
Then extend the matrix to infinity by defining A[j+kM]=A[j] where in this case M=9.
It is possible to make the elements of this matrix  0 at the edges so that
AM,N=H[m]H[N]A[M-N] Diagonal Matrices 3.doc. Unfortunately the small size of H
ends up in the denominator of the inverse and does not seem to give any real advantages.
Defining the inverse
The inverse is defined by
M / 2 1

n  M / 2
Am1,n An , j   m , j
(3)
Assume that A-1, like A is a function of the coordinate differences, so that (3) becomes
M / 2 1

n  M / 2
A1  m  n  A  n  j    j ,m
(4)
Define the transform pair of A over M points as
0.55
2.3  107
7  108
108
1.3  107
0.75
1
iT
m
; fm 
M
T
M / 2 1
1
a i  
 A  m exp   j 2 f m ti  (5)
T m  M / 2
T M / 21
A  m 
 a i  exp  j 2 f m ti 
N i  M / 2
This implies that the M values of A in (5) 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 (6)



N
N
M 2 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

  k M / 2   
  exp  j 2  i  k  n    j ,m (7)
N n M / 2
M 2 i  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


For a-1[i]=1/(T2 a[i]), this is satisfied.
ti 
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  
(8)
(9)
m  N / 2
Or




1
1

 exp  j 2 f m t j 
(10)
A1  f m  

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