Accepted Manuscript Frequency domain Walsh functions and sequences: An introduction Ashkan Ashrafi
PII: DOI: Reference:
S1063-5203(13)00068-7 10.1016/j.acha.2013.07.005 YACHA 931
To appear in:
Applied and Computational Harmonic Analysis
Received date: 28 February 2013 Accepted date: 27 July 2013
Please cite this article in press as: A. Ashrafi, Frequency domain Walsh functions and sequences: An introduction, Appl. Comput. Harmon. Anal. (2013), http://dx.doi.org/10.1016/j.acha.2013.07.005
This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.
Frequency Domain Walsh Functions and Sequences: An Introduction Ashkan Ashrafi Department of Electrical and Computer Engineering, San Diego State University, 5500 Campanile Dr., San Diego, CA 92182 USA
Abstract In this letter, a new set of orthogonal band-limited basis functions is introduced. This set of basis functions is derived from the inverse Fourier transform of the frequency domain Walsh functions. The Fourier transforms of the Walsh functions were calculated by Siemens and Kitai in 1973 but they have been overlooked in the literature. Some of the properties of these functions are studied in this paper. Moreover, the orthogonal discrete version of these functions is obtained by truncation, sampling and orthogonaliztion utilizing the orthogonal Procrustes problem. Keywords: Walsh Functions, Orthogonal bandlimited functions, Shift invariant Hilbert space, Orthogonal Procrustes Problem 1. Introduction The most well-known band-limited orthogonal function set is the basis functions for the shift-invariant Hilbert space of the sampling process. This Hilbert space is defined as H = span{φn (t) = φ(t − n)}n∈Z . Shannon, in his seminal paper [1], showed that the generating function of this orthogonal basis function set (φ0 (t)) is the sinc function. The orthogonal projection of a band-limited function f (t) on this Hilbert space (cn ) is, in fact, a sampled version of the function or f (n). Several other sampling paradigms based on shift-invariant and wavelet spaces are also introduced [2]. Orthogonal decomposition of band-limited functions can also be performed by generalization of the concept behind the sinc function. The Hilbert transform of the sinc function Email address:
[email protected] (Ashkan Ashrafi)
Preprint submitted to Elsevier
July 31, 2013
can be easily derived as (1 − cos(πt))/(πt) and it is called the cosc function [3] or cosinc function [4]. The cosc function is obviously an odd function but its magnitude Fourier transform is the same as that of the sinc function. A combination of these two function creates a basis function that spans the band-limited functions in L2 (Paley-Wiener space). This band-limited orthogonal basis function set is used in speech coding [5] and Ultra-wide Band pulse generation [6]. In this letter a new orthogonal band-limited function set is introduced, which is derived from the inverse Fourier transform of Walsh functions. We call these functions frequency domain Walsh functions (FDWF). The Walsh orthogonal function set was introduced by J. L. Walsh in 1923 [7] and it has been extensively used in different applications. The Fourier transforms of these functions were found in 1973 by Siemens and Kitai [8] but they have been completely overlooked in both mathematics and engineering until now. To find the discrete version of the FDWFs, we can sample and truncate them. Simple orthogonalization can produce discrete version of the orthogonal FDWFs. To make them as close as possible to FDWFs, we can use the orthogonal Procrustes problem. The resultant functions are called frequency domain Walsh sequences (FDWS). 2. Frequency-Domain Walsh Functions (FDWF) If we consider the Walsh functions in the frequency domain, we will have a set of orthogonal functions whose Fourier transforms are Walsh functions. To the extent of our knowledge, Walsh functions have always been used in the time domain (e.g., [9, 10] ) and no one has ever used them in the frequency domain. Walsh functions are derived by a recursive formula or by using Haar functions [9]. In [11], a non-recursive formula for deriving Walsh functions is introduced. Based on this nonrecursive formula, the Fourier transform of Walsh functions is found in [8]. We can use the duality of the Fourier transform to derive the inverse Fourier transform of the Walsh functions when they are defined in the frequency domain. The following Fourier transform pair is the result of this derivation: φm (t) ⇔ Φm (ω), 2
ωc (−1)g0 φm (t) = π
M −1 k=0
cos
ωc t πgk − k+1 2 2
sinc
ωc t π2M
,
Φm (ω) = (j)α (−1)m Wm (ω),
(1)
where φm (t) are the FDWFs, Wm (ω) is the Walsh function of order m, M is the number of bits representing m, G = gM −1 gM −2 . . . g1 g0 is the Gray code representation of m, gk is the k th bit of G, ωc is the bandwidth of the functions and α is the number of Gray code bits of value ONE in G. In Fig. 1, the even FDWFs of order 0, 4, 8, 12 and the odd FDWFs of order 1, 5, 9, and 13 are depicted. Since Walsh functions construct a complete orthogonal function set [7], the FDWFs also construct a complete orthogonal function set. The dimension of this set is infinite; thus, we can obtain an infinite number of orthogonal bandlimited functions. Some of the properties of FDWFs are studied in the next section. 3. Properties of the FDWFs 3.1. Symmetry It is obvious that φ2k (t) and φ2k+1 (t) for k = 0, 1, 2, . . . are, respectively, even and odd functions. It is worth noting that φ0 (t) and φ1 (t) are respectively the sinc and cosc functions or φ0 (t) =
ωc sinc(ωc t/π) π
and φ1 (t) =
ωc cosc(ωc t/π). π
3.2. Behavior at the Origin Theorem 1. If φm (t) is the mth order FDWF, φm (0) = δmm , where δm is the Kronecker’s delta. Proof. If m = 0, at least one of the bits of the Gray code representation of m will not be zero. This means at least one of the cosine terms in the product of cosines in (2) when t = 0 will be cos(−π/2) = 0, which is sufficient to annihilate the equation. On the other hand, when m = 0, φ0 (t) is a sinc function; thus, φ0 (0) = 1. Theorem 2. The first derivative of the FDWF of order m at the origin is zero if the order of the function is not 2M − 1, where M is the number of bits representing the order m.
3
Proof. By considering the fact that the first derivative of the sinc function at t = 0 is zero, we can find the first derivative of φm (t) (2) at t = 0 as ⎡ ⎤ M −1 −1 πg M πg dφm (t) ωc2 (−1)g0 ⎢ 1 k ⎥ = sin cos ⎣ +1 ⎦. dt t=0 π 2 2 2 =0 k=0
(2)
k=
It can be seen in (2) that if there is only one gk bit whose value is ONE, one of the terms of the summation will remain nonzero, thus the first derivative of φm (t) is not zero at t = 0. Otherwise, if there is more than one gk bit whose values are ONE, there will be at least one cosine term in the product of the term of (2) whose angle is
π 2
in each terms of the
summation in (2). This means that every term of the summation is certainly annihilated, thus the first derivative of φm (t) is zero at t = 0. According to the Gray code structure, the numbers whose Gray codes have only one bit of value ONE are m = 1, 3, 7, 15, . . . or m = 2M − 1, where M is the number of bits representing the order m. 3.3. Zero Crossings Theorem 3. The zeros of the FDWSs (φm (t)) occur at t =
π2M ωc
and t =
(2+1+gk )π2k ωc
for
∈ Z and k = 0, 1, 2, . . . , M − 1. Proof. Since the function φm (t) is a product of several terms, the zeros of each term can also be the zero of the function. The sinc term of (2) gives us the following zeros t=
π2M , ∈ Z. ωc
(3)
The cosine terms of (2) give us the following zeros (2 + 1 + gk )π2k t= , ∈ Z, k = 0, 1, 2, . . . , M − 1. ωc
(4)
In (4), if k = M − 1 and gk = 1 the zeros coincide with the ones given by (3). 3.4. Orthogonality 3.4.1. Mutual Orthogonality According to the Parseval’s theorem and the fact that the Walsh functions are mutually orthogonal, one can easily show that the FDWF’s are also mutually orthogonal +∞ +ωc ∗ φm (t)φk (t)dt = Φm (ω)Φ∗k (ω)dω = 2ωc δmk −∞
−ωc
where δmk is the Kronecker’s delta. 4
(5)
3.4.2. Orthogonality Between φp (t) and φq (t − nT ) To prove this, we need the following lemmas. Lemma 1. If Wp (ω) and Wq (ω) are respectively the Walsh functions of orders p and q, then Wp (ω)Wq (ω) = Wm (ω), where m = p ⊕ q and “⊕” is the bitwise XOR operator. Proof. The proof of this lemma is given in [12]. Lemma 2. If Φp (ω) and Φq (ω) are respectively the Fourier transforms of the functions φp (t) and φp (t), then Φm (ω) = ±Φp (ω)Φ∗q (ω) where m = p ⊕ q. The positive and negative signs occur when p + q + αq is an even or odd integer, respectively. The parameter αq is the number of bits of value ONE in the Gray code representation of q. Proof. By using (2) and Lemma 1 we have Φp (ω)Φ∗q (ω) = (j)αp (−1)p Wp (ω)(−j)αq (−1)q Wq (ω)
(6)
= (j)αp +αq (−1)(p+q+αq ) Wp (ω)Wq (ω) = (j)(αp +αq ) (−1)(p+q+αq ) Wm (ω). But αp + αq = αm because the number of bits of value ONE of the bit XOR of two numbers is the sum of the bits of value of ONE of those numbers. This is based on the fact that the XOR operation of two bits results in “1” when either of the operands is “1”. Therefore, we have Φp (ω)Φ∗q (ω) = (−1)(p+q+αq ) (j)αm Wm (ω) = ±Φm (ω).
(7)
If the value of (p + q + αq ) is even or odd, the sign of the result will be positive or negative, respectively. Theorem 4. The functions φp (t) and φq (t − nT ) are orthogonal if nT coincides with the zeros of φm (t) where m = p ⊕ q. Proof. The inner product of φp (t) and φq (t − nT ) or φp (t), φq (t − nT ) can be written using the Parseval’s theorem
φp (t), φq (t − nT ) =
+∞ −∞
1 = 2π 5
φp (t)φq (t − nT )dt +ωc
−ωc
Φp (ω)Φ∗q (ω)ejnT ω dω.
(8)
According to Lemma 2 we can write 1 φp (t), φq (t − nT ) = ± 2π
+ωc −ωc
Φm (ω)ejnT ω dω.
(9)
This is obviously the inverse Fourier transform of Φm (ω), thus φp (t), φq (t − nT ) = ±φm (nT ).
(10)
If nT coincides with the zeros of φm (t) then φp (t) and φq (t−nT ) are orthogonal. For example, if T = 2π/(Kωc ) and g0 = 1 for the given m (m = 2, 6, 10, . . . ) then according to (4) the zeros of φm (t) will be at t = K( + 1)T or n = K( + 1) for ∈ Z and K ∈ Z+ . 3.4.3. Basis For the Shift Invariant Hilbert Spaces We would like to know which one of φm (t) constructs a shift-invariant Hilbert space Hm , i.e., Hm = span{φm (t − nT )}n∈Z . This can be established as the following corollary to Theorem 4 Corollary 1. The function φm (t) defined in (2) spans the shift invariant Hilbert space, i.e., Hm = span{φm (t − nT )}n∈Z , where T = π/ωc , if and only if, m is an even positive integer number. Proof. According to Theorem 4, if p = q = m, then p ⊕ q = 0. Consequently, φm (t), φm (t − nT ) = ±φ0 (nT ), which means the orthogonality is established at the zero-crossings of φ0 (nT ). Since φ0 (t) is a sinc function with the bandwidth of ωc , its zero-crossings are at t = nπ/ωc . Therefore, the basis function is orthogonal for T = π/ωc . This property is a strong requirement for an admissible generating function of a generalized sampling process. Normally, the generating function should form a Riesz basis for the space H, which is a weaker condition [2]. The other requirement for the generating function is the partition of unity condition or φm (t + n) = 1, ∀t ∈ R. (11) n∈Z
This is equivalent to Φm (2πn) = δn [2], which means Φm (0) = 1. This only happens when m = 2 is an even number because the Walsh function of even orders have unity value at the origin. Therefore, we can conclude that the functions φ2 (t), ∈ Z+ are admissible generating functions of shift-invariant Hilbert spaces. 6
Based on Corollary 1, we can define infinite number of shift invariant Hilbert spaces. Each of these spaces can be considered as a separate sampling space. Obviously, φ0 (t) = sinc(t) is the generating function of the orthogonal basis of the Shannon’s sampling space [2]. 3.5. Parting Extrema Another important feature of the FDWFs that can be seen by looking at Fig. 1 is the relationship between the order of the functions and the time index of their global extrema (or simply extrema). Obviously, each FDWF has two extrema (except φ0 (t) that has only one extrema, which can be considered as a double extrema at zero). The extrema part from each other by increasing the order of the functions. Conjecture 1. The global extrema of the FDWFs are given by tm = ±
0.50475πk , ωc
(12)
where tm is the time index of the extrema, k is the order of the FDWFs and ωc is the bandwidth of the functions. 4. The Frequency Domain Walsh Sequences (FDWS) Suppose that the columns of matrix A ∈ RN ×N are the sampled version of the truncated FDWFs (sampling frequency is ωs ) and the columns of matrix B ∈ RN ×N are the orthogonalized version of A, which can be found by B = A(AT A)−1/2 . Now the goal is rotating the subspace spanned by the columns of B to the subspace spanned by the columns of A. This can be done by orthogonal Procrustes algorithm which is the solution to the following optimization problem minimize ||A − BX||F , subject to XT X = I,
(13)
where ||.||F is the Frobenius norm, matrix X ∈ RN ×N is the solution to the problem and I ∈ RN ×N is an identity matrix [13]. The solution X is an orthogonal matrix according to the optimization problem (13). By using the Lagrange multipliers method, we can easily show that the solution to (13) is given by X = WPT . The matrices W, P ∈ RN ×N are obtained by singular value decomposition of the matrix BT A i.e., BT A = WSPT , where 7
S is a diagonal matrix containing the singular values [14]. The FDWSs are the columns of the matrix C = BX. Since both B and X are orthogonal matrices, the product is also an orthogonal matrix; therefore, the final solution is a set of orthogonal sequences. On the other hand, the matrix BX is the closest matrix to A in the Frobnius norm sense, then we can conclude that the FDWSs are the closest orthogonal sequences to the truncated FDWFs (the columns of the matrix A). The dimension of the space spanned by sequences with normalized bandwidth of W = ωc /ωs is r 2N W , thus only the first r columns of C are orthogonal [15]. Fig. 2 illustrates the Fourier transform of the first four FDWSs for N = 256, W = 1/8. 5. Conclusions In this paper a new set of orthogonal functions called frequency domain Walsh functions (FDWF) is introduced. Some of the properties of these functions are shown. The functions with even orders in this set can construct a shift invariant Hilbert space that can be used to define new sampling paradigms. This concept is the extension of the Shannon’s sampling theorem because the generating function of Shannon’s theorem (the sinc function) is the FDWF of order zero. It is also shown that the shifted FDWFs with different orders are also mutually orthogonal if the amount of shift coincides with the zeros of another FDWF with the order related to the order of the original functions. In addition to the new function set, a new orthogonal sequence set is also introduced in this paper. The frequency domain Walsh sequences (FDWS) are obtained by using the orthogonalized version of the truncated FDWFs. Then the subspace spanned by this orthogonalized set is rotated by orthogonal Procrustes problem technique to obtain another subspace whose basis sequences are the closest to the truncated FDWFs in the Frobnius norm sense. [1] C. E. Shannon, Communication in the presence of noise, Proc. IRE 37 (1) (1949) 10–21. [2] M. Unser, Sampling-50 years after shannon, Proc. IEEE 88 (4) (2000) 569–587. [3] R. A. Sukkar, J. L. LoCicero, J. W. Picone, Decomposition of the LPC excitation using
8
the zinc basis functions, IEEE Trans. Acoust., Speech, Signal Processing 37 (9) (1989) 1329–1341. [4] R. Abromson, The sinc and cosinc transform, IEEE Trans. Electromagn. Compat. EMC19 (2) (1977) 88 –94. [5] F. Brooks, L. Hanzo, A multiband excited waveform-interpolated 2.35-kbps speech codec for bandlimited channels, IEEE Trans. Veh. Technol. 49 (3) (2000) 766 –777. [6] P. Chaurasiya, A. Ashrafi, S. Nagaraj, Novel spectrally efficient UWB pulses using zinc and frequency-domain walsh basis functions, The ETRI JournalTo appear. [7] J. L. Walsh, A closed set of normal orthogonal functions, Amer. J. Math. 45 (1923) 5 –24. [8] K. H. Siemens, R. Kitai, A nonrecursive equation for the Fourier transform of a walsh function, IEEE Trans. Electromagn. Compat. EMC-15 (2) (1973) 81–83. [9] K. G. Beauchamp, Walsh functions and their applications, Academic Press, New York, New York, 1975. [10] M. Nielsen, Walsh-type wavelet packet expansions, App. and Comput. Harmon. Analysis 9 (2000) 265–285. [11] R. Kitai, K. H. Siemens, Comments on ”a simplified definition of walsh functions”, IEEE Trans. Comput. C-21 (5) (1972) 512–512. [12] N. M. Blachman, Sonusoids versus Walsh functions, Proceedings of IEEE 62 (3) (1974) 346–354. [13] S.-C. Pei, M.-H. Yeh, C.-C. Tseng, Discrete fractional Fourier transform based on orthogonal projections, Signal Processing, IEEE Transactions on 47 (5) (1999) 1335 –1348. [14] G. H. Golub, C. F. Van Loan, Matrix Computations, 3rd Edition, The Johns Hopkins University Press, Baltimore, MD, 1996.
9
[15] D. Slepian, Prolate spheroidal wave functions, fourier analysis, and uncertainty - V: The discrete case, The Bell System Technical Journal 54 (5) (1978) 1371–1429.
10
0.1
0.02 φ4(t)
φ0(t)
0 0.05
−0.02 −0.04
0
−0.06 −5
0 5 Time (msec)
−5
0 5 Time (msec)
−5
0 5 Time (msec)
−5
0 5 Time (msec)
−5
0 5 Time (msec)
0.02 0.02 φ12(t)
φ8(t)
0 −0.02 −0.04
0 −0.02 −0.04
−0.06 −5
0 5 Time (msec)
(a) 0.05 φ5(t)
φ1(t)
0.05 0 −0.05
0
−0.05 −5
0 5 Time (msec)
0.05
0.04 φ13(t)
φ9(t)
0.02 0
0 −0.02
−0.05
−0.04 −5
0 5 Time (msec)
(b) Figure 1: (a) The even FDWFs of order 0, 4, 8, 12 for ωc = 2π × 1000 Hz. (b) The odd FDWFs of order 1, 5, 9, 13 for ωc = 2π × 1000 Hz.
11
1
0.5
0.5
Φ2
Φ1
1
0 −0.5
−0.5
−1
−1 −0.1
0
ω / ωs
0.1
−0.1
1
1
0.5
0.5
Φ4
Φ3
0
0
−0.5
−1
−1 0
ω / ωs
0.1
0.1
0
0.1
ω / ωs
0
−0.5 −0.1
0
−0.1
ω / ωs
Figure 2: The spectrum of the first four DFWSs for N = 256, W = 1/8. The odd numbered graphs are imaginary functions and the even numbered graphs are real functions of the frequency.
12