Periodic Diagonal Matrices  

advertisement

Periodic Diagonal Matrices

A

MN

Diagonal means that the matrix is of the form p

[

N ]

  e dm cm bm a bp cp dp

(1.1)

4, 3, 2, 1, 0, 1, 2, 3

Or without e

A

 

 a bp cp dp bm a bp cp cm bm a bp

(1.2)

 dm cm bm a

This is made periodic by extending it to an 8×8 array of the form

 a bp cp dp e dm cm bm bm a bp cp dp e dm cm cm bm a bp cp dp e dm

A p

 dm cm bm a bp cp dp e

 e dm cm bm a bp cp dp dp cp e dp dm e cm dm bm cm a bm bp a cp bp bp cp dp e dm cm bm a

(1.3)

This allows the matrix A p

to be defined as a periodic array with period 8 such that

A[12]=A[12-8]=A[4]

This extension defines matrix multiplications of the form

C

MN

  

MN

L

3 



4

B A

ML LN

L

3 



4

B

ML

 

L

4 N

3 (1.4)

To be specific

C

4,3

B

4, 4

A

4,3

B

4, 3

A

3,3

B

4, 2

B

A

4,1 1,3

B

A

4,2 2,3

B

A

4,3 3,3

A

2,3

B

4, 1

A

1,3

B bm

B cm

B dm

B e

B

4,0 dp

B

4,1 cp

B

4,2 bp

B

A a

4,3 3,3

B

4,0

A

0,3

(1.5)

According to (1.1) A

-4,3

= A[7] = A[7-8]=A[-1] =bm

A

-3,3

= A[6] = A[-2]=cm

A

-2,3

= A[5] = A[-3]=dm

A

-1,3

= A[4] = A[-4]=e

A

0,3

= A[3] = dp

A

1,3

= A[2] = cp

A

2,3

= A[1] = bp

A

3,3

= A[0] = a

Note that the order of N and L in (1.4) are important.

Defining the inverse of A[j-n]

The inverse is defined by

M  n



M / 2

A

1

A

, ,

 

(2.1)

Assume that A

-1

, like A is a function of the coordinate differences, so that (2.1) becomes

M  n



M / 2

    n

 m

  

(2.2)

Define the transform pair of A over M points as t i

 iT

;

M f m

 m

T

1

T

M  m



M / 2

  exp

  j 2

 f t m i

(2.3)

T

N

M  i



M / 2

  exp

 j 2

 f t m i

This implies that the M values of A in (2.3) extend as A[m+M]=A[m]. Then

T

M

2

2

M M   n



M /2 i



M /2 a

1

  exp

 j 2

 n

M

 

M



M /2 a

  exp

 j 2

 k

 n

M

 

 

Evaluate the sum over n first

T

M

2

2

M



M  

M / 2 i



M / 2 a

1

    exp

 j 2

T

T

M

M

2

2

2

M

M



 i



M / 2 a

M  

M / 2 i



M

1

/ 2 a

1

   

    exp

 j 2

 exp

 j 2

 k

 

M

For a

-1

[i]=1/(T

2

a[i]), this is satisfied. k

 mi

M k

 mi

M

 

M 

 n



M / 2 exp

 j 2

 n

M

, i

 

  i

M

 

(2.4)

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.

O

PERATIONS REQUIRED

Using

  j

T

1 N  m



N / 2 a

1

 

T

N  m



N / 2

Or exp

 j 2

 f t m j

1 exp

 j 2

 f t m j

(2.5)

(2.6)

A

1

  

1 M  j



M / 2

1 exp

 j 2

 f t m j

 exp

 j 2

 f t m j

(2.7)

M

N  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)

T

ESTING

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

-0.540541E-01 -0.153619E-01 -0.374458E-15

used. Definitely not diagonal.

-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