Begin with a causal filter response ct and its associated C(Z).
The Z-transform C(Z) could be evaluated,
giving a complex value for each real .This complex value could be exponentiated to get another value, say
![]() |
(13) |
First notice that if C(Z) has no negative powers of Z, then C(Z)2 does not either. Likewise for the third power or any positive integer power, or sum of positive integer powers. Now recall the basic power-series definition of the exponential function:
![]() |
(14) |
![]() |
(15) |
Putting one polynomial into another or one infinite series
into another is an onerous task, even if it does lead to a wavelet
that is exactly causal.
In practice we do operations that are conceptually the same,
but for speed we do them with discrete Fourier transforms.
The disadvantage is periodicity,
i.e., negative times are represented computationally like
negative frequencies.
Negative times are the last half of the elements of a vector,
so there can be some blurring of late times into negative ones.
The subroutine we will use for Fourier transformation is fts()
module fft { # complex fourier transform.
contains
subroutine fts( signi, rr ) {
# if (signi>0) scale = 1; else scale=1/nx
#
# nx signi*2*pi*i*(j-1)*(k-1)/nx
# rr(k) = scale * sum rr(j) * e
# j=1 for k=1,2,...,nx=2**integer
#
integer signi, nx, i, j, k, m, istep
real arg
complex rr(:), cw, cdel, ct
nx = size (rr); if( nx != pad2(nx) ) call erexit('fts: nx not a power of 2')
if( signi < 0) rr = rr / nx
j = 1; k = 1
do i= 1, nx {
if (i<=j) { ct = rr(j); rr(j) = rr(i); rr(i) = ct }
m = nx/2
do while (j>m .and. m>1) { j = j-m; m = m/2 }
j = j+m
}
do {
istep = 2*k; cw = 1.; arg = signi*3.14159265/k
cdel = cmplx( cos(arg), sin(arg))
do m= 1, k {
do i= m, nx, istep
{ ct=cw*rr(i+k); rr(i+k)=rr(i)-ct; rr(i)=rr(i)+ct }
cw = cw * cdel
}
k = istep
if(k>=nx) exit
}
}
integer function pad2( n ) {
integer n
pad2 = 1
do while( pad2 < n )
pad2 = pad2 * 2
}
}