國立臺灣大學電機資訊學院電信工程學研究所 博士論文
Graduate Institute of Communication Engineering College of Electrical Engineering and Computer Science
National Taiwan University Doctoral Dissertation
拉瑪努江和於信號處理及週期偵測之應用
Ramanujan’s Sum and Its Application to Signal Processing and Period Estimation
張國韋
Kuo-Wei Chang
指導教授:貝蘇章博士
Advisor: Soo-Chang Pei, Ph.D.
中華民國 107 年 5 月 May, 2018
誌謝
感謝真主,感謝我的父母,感謝貝老師,感謝中華電信的主管和同 事們,感謝 530 實驗室的學長姐與學弟妹。這篇論文獻給所有幫助我 的人。
Acknowledgements
Thanks everyone who supports me.
摘要
本論文利用拉瑪努江和 (Ramanujan’s sum) 的特性,舉出兩種 信號處理上的應用。其一為建構零自相關的整數序列 (Integer zero autocorrleation sequence),這在通訊系統上有廣泛的應用。他的 原理是利用傅立葉轉換,把建構零自相關序列的數論問題,轉換成建 構一個固定振幅信號 (constant amplitude) 的問題,這裡巧妙用上 拉瑪努江和整數的特性。另一個應用是一維與二維的信號週期偵測。
利用拉瑪努江和週期以及整數的特性,週期信號可以被分解成一個個 因數的週期,往後便可以針對不同的週期進行不同的處理,如同以前 的濾波器組 (filter bank)。最後我們針對拉瑪努江和只能找出因數週 期的缺點,採用全相位快速傅立葉 (all phase FFT) 演算法來改進。
全相位快速傅立葉演算法為利用相位的差,求出非整數的頻率,改進 了以往頻率只能在整數上的缺點,可以幫助我們進行週期偵測。我們 也順帶提到全相位快速傅立葉演算法的一些其他應用,包含唧聲信號 (chirp signal) 的頻率追蹤、快速二維頻率偵測等等。
Abstract
This thesis presents two applications of Ramanujan’s sum in the domain of signal processing. The first one is integer zero autocorrelation sequence construction, which is useful in modern communication system. The concept is to transform this number theoretic problem into a constant amplitude sig- nal construction problem, by Fourier transform and the inte- ger property of Ramanujan’s sum. The second application is 1D and 2D period estimation. The periodic signal is separated into sub-period signals, just like filter bank. Each sub-period is a factor of the length. Finally we use all phase FFT to enhance the period estimation. All phase FFT use phase information to estimate frequency. The advantage is the frequency is non in- teger. Finally we propose some other applications of all phase FFT, such as chirp signal pitch tracking and fast 2D frequency estimation.
Contents
誌謝 iii
Acknowledgements v
摘要 vii
Abstract ix
1 Introduction 1
1.1 Definition and Properties of Ramanujan’s Sum . . . 1 1.2 Preliminary . . . 3
2 First Application: Integer and Gaussian Integer Zero Au-
tocorrelation Sequences 5
2.1 Motivation . . . 5 2.2 Related Works . . . 7 2.2.1 Time domain method I: Making extra constraints . . 8 2.2.2 Time domain method II:Linear equation method . . . 9 2.2.3 Frequency domain method I:The Geometric sequence
method . . . 11 2.2.4 Frequency domain method I:Legendre sequence method 15 2.3 Generate IZAC using Ramanujan’s Sum . . . 21 2.4 Discussion . . . 25
3 Second Application:Period Estimation 27
3.1 Motivation . . . 27
3.2 1D Period Estimation . . . 29
3.2.1 1D period filterbank . . . 29
3.2.2 1D Impulse Train and Möbius Inversion . . . 31
3.3 2D Period Estimation . . . 36
3.3.1 2D Ramanujan’s Sum and period filterbank . . . 40
3.3.2 2D LCM for Period Detection . . . 48
3.3.3 2D Period Detection Examples . . . 53
3.3.4 Discussion on Möbius Inversion in 2D . . . 63
4 All phase FFT 71 4.1 Motivation . . . 71
4.2 Definition and Properties . . . 72
4.3 Applications of apFFT . . . 76
4.3.1 Determine the proper frequency for period estimation 76 4.3.2 1D/2D frequency estimation . . . 79
4.3.3 Chirp rate tracking . . . 81
4.3.4 Sparse FFT and Signal reconstruction . . . 83
5 Conclusion 87
Bibliography 89
List of Figures
3.1 The spectrum of 𝑥, where 𝑥 is defined in Equation (3.1). . . 28 3.2 Relations of gcd-delta, Ramanujan’s sum and impulse train 36 3.3 The original 2D Pattern . . . 57 3.4 Some random removal from Figure 3.3 . . . 57 3.5 Spectrum obtained from Figure 3.4 . . . 58 3.6 The image is a combination of Chinese characters and En-
glish letters. The width is 60 pixels and the height is 20 pixels. The meaning of those two Chinese characters is National Taiwan University (NTU) . . . 60 3.7 The 240x240 image repeating the Figure 3.6. The period-
icity matrix is given in the text. The red box indicates the basic pattern and the direction of period . . . 60 3.8 A 240x240 noisy image with the pattern in Figure 3.6. The
added noise is white Gaussian with SNR=3db . . . 61 3.9 The spectrum from Figure 3.8. The first peak (DC) is not
shown because the value is too large. . . 61 3.10Pegasus, by M.C. Escher 1959. The image is cropped and
downsampled to 192 × 192. The red box indicates the ap- proximated basic pattern. . . 63 3.11The spectrum from Figure 3.10. The first peak (DC) is not
shown because the value is too large. . . 63
4.1 The real part of 𝑥 in Equation (4.8) . . . 74
4.2 The power spectrum of 𝑥 in Equation (4.8), where window is not performed. . . 75 4.3 The power spectrum of 𝑥 in Equation (4.8), where window
is performed. . . 75 4.4 The step function with noise . . . 78 4.5 2D signal with two frequencies . . . 80 4.6 Signal with two chirp rate, represented in time-frequency
plane by all phase FFT. Red:𝛼1 = 0.01,Blue:𝛼2 = −0.01 Details are referred to the text. . . 82 4.7 Signal with two chirp rate, represented in time-frequency
plane by all phase FFT. Red:𝛼1 = 0.1,Blue:𝛼2 = −0.05. The red chirp is affected when blue is near. . . 82 4.8 Absolute value of 𝑥, where 𝑥 is given in Equation (4.10),̂
𝑓 = 855.77. The decay is very fast near 850. . . 86
List of Tables
3.1 Similarity and difference between ideal filter and gcd-delta func- tion . . . 29
Chapter 1
Introduction
1.1 Definition and Properties of Ramanujan’s Sum
A special sum of the roots of unity called Ramanujan’s sum[1]
𝑐𝑞(𝑛) =
𝑞
∑
𝑎=1,(𝑎,𝑞)=1
𝑒2𝜋𝑖𝑎𝑞𝑛 (1.1)
where (𝑎, 𝑞) = 1 means that 𝑎 only takes on values coprime to 𝑞. For example,
𝑐3(𝑛) = [2, −1, −1, 2, −1, −1, 2, −1, ...] (1.2) 𝑐6(𝑛) = [2, 1, −1, −2, −1, 1, 2, 1, −1, ...] (1.3) 𝑐7(𝑛) = [6, −1, −1, −1, −1, −1, −1, 6, −1, −1, ...] (1.4)
The sums have many good properties. First of all, they are all integer.
This is amazing because the roots of unity are complex number. The summation over complex is in general also complex, but the Ramanu- jan’s Sum is real and more surprisingly, integer. Secondly, the sums are
periodic,
𝑐𝑞(𝑛 + 𝑞) = 𝑐𝑞(𝑛) (1.5)
Additionally, since 𝑐𝑞(𝑛) is real, we have
𝑐𝑞(𝑛) = 𝑐∗𝑞(𝑛) =
𝑞
∑
𝑎=1,(𝑎,𝑞)=1
𝑒−2𝜋𝑖𝑎𝑞𝑛 = 𝑐𝑞(−𝑛) (1.6)
where 𝑥∗ is the complex conjugate of 𝑥. In other words, 𝑐𝑞 is an even function.
Moreover, when signal length 𝑁 is a multiple of 𝑞, Ramanujan’s sum can be viewed as discrete Fourier transform (DFT) of a binary sequence.
For instance, let 𝑁 = 6
⎡⎢
⎢⎢
⎢⎢
⎢⎢
⎢⎢
⎣ 0 1 0 0 0 1
⎤⎥
⎥⎥
⎥⎥
⎥⎥
⎥⎥
⎦
−−→DFT
⎡⎢
⎢⎢
⎢⎢
⎢⎢
⎢⎢
⎣ 2 1
−1
−2
−1 1
⎤⎥
⎥⎥
⎥⎥
⎥⎥
⎥⎥
⎦ ,
⎡⎢
⎢⎢
⎢⎢
⎢⎢
⎢⎢
⎣ 0 0 1 0 1 0
⎤⎥
⎥⎥
⎥⎥
⎥⎥
⎥⎥
⎦
−−→DFT
⎡⎢
⎢⎢
⎢⎢
⎢⎢
⎢⎢
⎣ 2
−1
−1 2
−1
−1
⎤⎥
⎥⎥
⎥⎥
⎥⎥
⎥⎥
⎦
(1.7)
As we can see, 𝑐6(𝑛) and 𝑐3(𝑛), 𝑛 = 0, 1, ..., 5 are constructed by 6-point DFT. Furthermore, since the binary sequences are orthogonal, the Ra- manujan’s sum 𝑐6 and 𝑐3 are also orthogonal. In general, if 𝑞1 and 𝑞2 are two different factors of 𝑁 , then 𝑐𝑞1(𝑛) and 𝑐𝑞2(𝑛), 𝑛 = 0, 1, ..., 𝑁 − 1 are orthogonal.
Based on those good properies, the Ramanujan’s sum can be fur- ther used in analyzing long period time sequences such as stock price, DNA and protein coding[2, 3, 4]. In this thesis, we will introduce two applications in signal processing. The first is to construct integer zero autocorrelation sequences, and the second is period estimation. We
define some useful functions and notations in the next section.
1.2 Preliminary
Unless otherwise specified, any signal or sequence 𝑥 in this thesis is pe- riodic with length 𝑁 , and the index is 𝑛 with module 𝑁 , 𝑛 = 0, 1, 2, ..., 𝑁 −1.
In other words, 𝑥(−𝑛) = 𝑥(𝑁 −𝑛) and 𝑥(𝑁 +𝑛) = 𝑥(𝑛). The discrete Fourier transform (DFT) of 𝑥 is defined as
̂
𝑥(𝑘) = 𝐹 {𝑥} =
𝑁−1
∑
𝑛=0
𝑥(𝑛)𝑊𝑁𝑛𝑘 (1.8)
where 𝑊𝑁 = 𝑒−2𝜋𝑖/𝑁, 𝑖 =√
−1. If there is no ambiguity, 𝑊 is used instead of 𝑊𝑁 for convenience.
The delta function is
𝛿(𝑛) =
⎧{
⎨{
⎩
1 𝑛 = 0 0 otherwise
(1.9)
The autocorrelation of signal is defined as
𝑅𝑥𝑥(𝑘) =
𝑁−1
∑
𝑛=0
𝑥∗(𝑛 − 𝑘)𝑥(𝑛) (1.10)
where 𝑥∗ is the complex conjugate of 𝑥. And a signal 𝑥 is called zero- autocorrelation (ZAC) if 𝑅𝑥𝑥(𝑘) = 𝐶𝛿(𝑘) for some nonzero constant 𝐶.
Some number theoretic definitions are given as follows. Let 𝑎 and 𝑏 be two integers, 𝑎|𝑏 means 𝑎 is a factor of 𝑏. The greatest common divisor (gcd) 𝑑 them is denoted as 𝑑 = gcd(𝑎, 𝑏) or simply 𝑑 = (𝑎, 𝑏). They are called coprime if (𝑎, 𝑏) = 1. The least common multiple of them is denoted as lcm(𝑎, 𝑏). The number in the form of 𝑎 + 𝑏𝑖 is called Gaussian integer. For a positive integer 𝑛, two integers 𝑎 and 𝑏 are said to be
congruent modulo 𝑛, written:
𝑎 ≡ 𝑏 (mod 𝑛) (1.11)
if their difference 𝑎 − 𝑏 is a multiple of 𝑛.
We define the set I𝑘 = {𝑖|1 ≤ 𝑖 ≤ 𝑘, gcd(𝑖, 𝑘) = 1} to indicate all number between 1 and 𝑘 which is relatively prime to 𝑘.
2D signal is represented in capital letter like 𝑋, the default size is 𝑁 × 𝑁 and the index is given by 𝑋(𝑛1, 𝑛2). Two dimensional discrete Fourier transform (2DDFT) is defined as
̂𝑋(𝑘1, 𝑘2) = ∑
𝑛1
∑
𝑛2
𝑋(𝑛1, 𝑛2)𝑊𝑛1𝑘1+𝑛2𝑘2 (1.12)
Chapter 2
First Application: Integer and Gaussian Integer Zero
Autocorrelation Sequences
2.1 Motivation
Zero autocorrelation(ZAC) sequences have been extensively used in communication engineering, such as synchronization, CDMA [5, 6] and OFDM[7] system. They have also been applied to cryptography for con- structing pseudo random sequences. In this work a special kind of ZAC sequences is considered, that is, integer ZAC (IZAC), because integer has the following advantages comparing to complex floating point num- ber.
1) Integer requires less memory, for both saving and sending.
2) Arithmetic operations can be done faster and error-free.
3) The system can be implemented on hardware easily.
There are some trivial IZAC . The most obvious one is
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎝ 1 0 0
⋮ 0 0
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎠
The second one, although less known, is still in simple form
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎝
𝑁 − 2
−2
−2
⋮
−2
−2
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎠
where 𝑁 is the signal length. For example, 𝑁 = 5 and 𝑁 = 6
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜
⎝ 3
−2
−2
−2
−2
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟
⎠ and
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎝ 4
−2
−2
−2
−2
−2
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎠
When 𝑁 is a composite number, constructing integer-valued ZAC from its factor by zero-padding is not difficult to think of. Let say 𝑁 = 15 = 3×5, by the examples given above, we can organize signals like
(3, 0, 0, −2, 0, 0, −2, 0, 0, −2, 0, 0, −2, 0, 0)
or
(1, 0, 0, 0, 0, −2, 0, 0, 0, 0, −2, 0, 0, 0, 0)
One natural question is, are there any non-trivial integer-valued ZAC?
The answer is yes, such as
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎝ 2
−1
−1 2
−1 5
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎠
Similarly, non-trivial Gaussian integer ZAC can also be found. In the following, we will introduce how to construct those sequences.
2.2 Related Works
There are two types of construction method for IZAC. The first type is solving equation directly. The other is by generating a constant ampli- tude (CA) sequence in frequency domain such that its discrete Fourier transform is integer. A constant amplitude sequence 𝑥(𝑛) is defined as
|𝑥(𝑛)| = 𝐶 (2.1)
for some constant 𝐶. The reason behind the second method is by the following theorem.
Theorem 2.2.1. A sequence 𝑥 is CA if and only if its DFT 𝑥 is ZAC.̂ Similarly, a sequence 𝑥 is ZAC if and only if its DFT ̂𝑥 is CA.
Proof. See [8]
For convenience, we call the first method time domain method and the other frequency domain method. As we will see, time domain meth- ods usually have to deal with non-linear equations, while frequency do- main methods have to guarantee its DFT is integer. Both of them have some issues to conquer, but frequency domain methods are more sys- tematic and easier to solve.
2.2.1 Time domain method I: Making extra constraints
Consider 𝑁 = 5, the construction of IZAC is solving a five-variable equa- tion.
𝑥(0)𝑥(1) + 𝑥(1)𝑥(2) + 𝑥(2)𝑥(3) + 𝑥(3)𝑥(4) + 𝑥(4)𝑥(0) = 0 (2.2) 𝑥(0)𝑥(2) + 𝑥(1)𝑥(3) + 𝑥(2)𝑥(4) + 𝑥(3)𝑥(0) + 𝑥(4)𝑥(1) = 0 (2.3) 𝑥(0)𝑥(3) + 𝑥(1)𝑥(4) + 𝑥(2)𝑥(0) + 𝑥(3)𝑥(1) + 𝑥(4)𝑥(2) = 0 (2.4) 𝑥(0)𝑥(4) + 𝑥(1)𝑥(0) + 𝑥(2)𝑥(1) + 𝑥(3)𝑥(2) + 𝑥(4)𝑥(3) = 0 (2.5)
where 𝑥(𝑛) ∈ ℤ. We can notice that eq. (2.4) is equivalent to eq. (2.3) and eq. (2.5) is equivalent to eq. (2.2). Thus, there are actually only two non-linear equations here. To solve this directly seems impossible, an alternative way is making more constraints. In particular, let 𝑥(0) = 𝑥(1) = 1, eq. (2.2) and eq. (2.3) become
1 + 𝑥(2) + 𝑥(2)𝑥(3) + 𝑥(3)𝑥(4) + 𝑥(4) = 0 (2.6) 𝑥(2) + 𝑥(3) + 𝑥(2)𝑥(4) + 𝑥(3) + 𝑥(4) = 0 (2.7)
Let 𝑥(3) = 𝑎 we can find
𝑥(2) + 𝑥(4) = −1
𝑎 + 1 (2.8)
𝑥(2)𝑥(4) = −2𝑎 + 1
𝑎 + 1 (2.9)
⇒ (𝑥(2) − 𝑥(4))2 = 1
(𝑎 + 1)2 + 8𝑎 − 4 𝑎 + 1
= 8𝑎3+ 16𝑎2+ 4𝑎 − 3
(𝑎 + 1)2 (2.10)
Since 𝑥(2), 𝑥(3) = 𝑎, and 𝑥(4) are all rational (which can be modified into integer easily by multiplying the denominators), eq. (2.10) means there are two rational numbers 𝑦 and 𝑎, where 𝑦 = (𝑥(2) − 𝑥(4))(𝑎 + 1), such that
𝑦2 = 8𝑎3+ 16𝑎2+ 4𝑎 − 3
This is exactly a well-known rational Elliptic Curves problem[9, 10]. El- lipitic Curves problem has been studied a lot for the past few decades, and its main application is cryptography[11]. In short, if there are two non-trivial rational points (𝑦, 𝑎) on the Elliptic curve, then there are in- finite rational points on it [9]. In this case, since we already know the answer [−3, 2, 2, 2, 2] is integer ZAC, so when 𝑥(0) = 𝑥(1) = 1, 𝑥(3) = 𝑎 has two choices 1, −3/2. By finding the next point we can get 𝑎 = −7/8 and the new integer ZAC is
[8, 8, −12, −7, −52]
and the next is
[22, 22, 142, 462, −143]
and so on.
In general, making extra constraints can reduce the problem, and we have found a interesting connection to elliptic curve. However, the method is ad hoc and difficult to find a solution for arbitrary 𝑁 .
2.2.2 Time domain method II:Linear equation method
Another way to generate ZAC is given in [12]. This method only works for Gaussian integer and signal length 𝑁 = 𝑝𝑘where 𝑝 is a prime number.
It also reduces the problem by making more constraints. In the following we summarize this method by setting 𝑁 = 9.
The first constraint is called grouping. The index 𝑛 = 0, 1, 2, ..., 𝑁 − 1 is divided into several groups, and 𝑥(𝑛) is the same if 𝑛 is in the same group. For 𝑁 = 9, we have 3 groups
𝑥(0) (2.11)
𝑥(3) = 𝑥(6) (2.12)
𝑥(1) = 𝑥(2) = 𝑥(4) = 𝑥(5) = 𝑥(7) = 𝑥(8) (2.13)
One can notice that the index 𝑛 is divided by gcd(𝑛, 𝑁 ). In other words, if gcd(𝑛1, 𝑁 ) = gcd(𝑛2, 𝑁 ), then 𝑛1 and 𝑛2 are in the same group. The varibles in this problem is reduced from 9 to 3. Moreover, the number of equations for ZAC is reduced into 2.
𝑥∗[0]𝑥(1) + 𝑥∗(1)𝑥(0) + 3|𝑥(1)|2+ 2(𝑥∗(3)𝑥(1) + 𝑥∗(1)𝑥(3)) = 0 (2.14) 𝑥∗[0]𝑥(3) + |𝑥(3)|2+ 𝑥∗(3)𝑥(0) + 6|𝑥(1)|2 = 0 (2.15)
Since 𝑥 is Gaussian integer, let 𝑥(𝑛) = 𝑥𝑛+ 𝑖𝑦𝑛 and rewrite the above
2(𝑥0𝑥1+ 𝑦0𝑦1) + 3(𝑥21+ 𝑦21) + 4(𝑥1𝑥3+ 𝑦1𝑦3) = 0 (2.16) 2(𝑥0𝑥3+ 𝑦0𝑦3) + (𝑥23+ 𝑦23) + 6(𝑥21+ 𝑦21) = 0 (2.17)
Next, Equation (2.17) subtracts Equation (2.16).
(𝑥3− 𝑥1)(2𝑥0− 3𝑥1+ 𝑥3) + (𝑦3− 𝑦1)(2𝑦0− 3𝑦1+ 𝑦3) = 0 (2.18)
Here comes the second constraint. Although Equation (2.18) is still a non-linear equation like Equation (2.2), we can use two linear equations
to approximate it.
𝑥3− 𝑥1 = −𝑦3− 𝑦1 (2.19)
2𝑥0− 3𝑥1+ 𝑥3 = 2𝑦0− 3𝑦1+ 𝑦3 (2.20)
Note that the equations above can only represent part of the solutions in Equation (2.18). For instance,
𝑥3− 𝑥1 = 6 (2.21)
2𝑥0− 3𝑥1+ 𝑥3 = 2 (2.22)
𝑦3− 𝑦1 = −4 (2.23)
2𝑦0− 3𝑦1+ 𝑦3 = 3 (2.24)
may be a solution of Equation (2.18), but it is not a solution of Equa- tions (2.19) and (2.20). To summarize, time domain methods face the non-linear equations directly. It is a hard problem without making extra constraints. In the following, we will introduce some frequency domain methods. By the Theorem 2.2.1, this number theoretic problem can be solved easily by Fourier transform.
2.2.3 Frequency domain method I:The Geometric se- quence method
The method in this section has been submitted to Eusipco 2018.
For any length 𝑁 , there are two trivial ZAC integer sequences[13]
𝑥(𝑛) = [1, 0, 0, 0, ..., 0] (2.25) 𝑥(𝑛) = [𝑁 − 2, −2, −2, −2, ..., −2] (2.26)
Moreover, if 𝑁 is even, the following sequence is also a ZAC integer
sequence.
𝑥(𝑛) =
⎧{
⎨{
⎩
𝑁−22 𝑛 = 0 (−1)𝑛−1 𝑛 ≠ 0
(2.27)
Observe Equations (2.25) to (2.27), we can find two interest things. The first is that only the element 𝑥(0) is different from the others. The sec- ond is that each 𝑥(𝑛), 𝑛 ≠ 0 forms a geometric series. In Equation (2.25), [0, 0, ..., 0] can be viewed as geometric series with any ratio 𝑟. In Equa- tion (2.26), the ratio 𝑟 = 1 while in Equation (2.27), the ratio 𝑟 = −1.
Another example can be found in 𝑁 = 4. The closed form solution for perfect integer sequence is
[−𝑏, 𝑎, 𝑏,𝑏2
𝑎 ] (2.28)
where 𝑎, 𝑏,𝑏𝑎2 are integers. This is solved by brute force. The last three terms [𝑎, 𝑏,𝑏𝑎2] can also be viewed as geometric series, with ratio 𝑟 = 𝑎𝑏.
From the observation above, a natural assumption is that any geo- metric series can be used to generate perfect integer sequence. With some calculation the assumption can be proved. The result is given as follows. Let 𝑟 be an integer. A closed form perfect integer sequences is given as
𝑥(𝑛) =
⎧{
⎨{
⎩
−𝑁−1∑
𝑘=2
𝑟𝑘 𝑛 = 0 (1 + 𝑟)𝑟𝑛 𝑛 ≠ 0
(2.29)
Note that 𝑥(𝑛) is a geometric series from 𝑛 = 1 to 𝑁 − 1. Since 𝑟 = 0 or 𝑟 = ±1 gives only trivial result, from now on only the cases 𝑟 ≠ 0, ±1 are discussed. For a concrete example, let 𝑁 = 5 and 𝑟 = 2
𝑥(𝑛) = [−(22+ 23+ 24), 3 ⋅ 21, 3 ⋅ 22, 3 ⋅ 23, 3 ⋅ 24] (2.30)
= [−28, 6, 12, 24, 48] (2.31)
For another example, let 𝑁 = 6 and 𝑟 = −3
𝑥(𝑛) =
⎡⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎢
⎣
− ∑5𝑘=2(−3)𝑘 (−2) ⋅ (−3)1 (−2) ⋅ (−3)2 (−2) ⋅ (−3)3 (−2) ⋅ (−3)4 (−2) ⋅ (−3)5
⎤⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎥
⎦
(2.32)
= [180, 6, −18, 54, −162, 486] (2.33)
The two examples above illustrate that both prime length 𝑁 = 5 and composite length 𝑁 = 6 can be used. In fact, there is no limitation on signal length. To prove Equation (2.29), by Theorem 2.2.1 we should check that ̂𝑥 is CA. By definition,
̂
𝑥(𝑚) =
𝑁−1
∑
𝑛=0
𝑥(𝑛)𝑊𝑁𝑛𝑚 (2.34)
= −
𝑁−1
∑
𝑘=2
𝑟𝑘+
𝑁−1
∑
𝑛=1
(1 + 𝑟)𝑟𝑛𝑊𝑁𝑛𝑚 (2.35)
= (−
𝑁−1
∑
𝑘=2
𝑟𝑘) − (1 + 𝑟) + (1 + 𝑟)
+ (1 + 𝑟)
𝑁−1
∑
𝑛=1
𝑟𝑛𝑊𝑁𝑛𝑚 (2.36)
= −
𝑁−1
∑
𝑘=0
𝑟𝑘+ (1 + 𝑟)
𝑁−1
∑
𝑛=0
𝑟𝑛𝑊𝑁𝑛𝑚 (2.37)
= −1 − 𝑟𝑁
1 − 𝑟 + (1 + 𝑟)1 − (𝑟𝑊𝑁𝑚)𝑁
1 − 𝑟𝑊𝑁𝑚 (2.38)
= −1 − 𝑟𝑁
1 − 𝑟 + (1 + 𝑟) 1 − 𝑟𝑁
1 − 𝑟𝑊𝑁𝑚 (2.39)
= (1 + 𝑟)(1 − 𝑟𝑁) ( 1
1 − 𝑟𝑊𝑁𝑚 − 1
1 − 𝑟2) (2.40)
To prove ̂𝑥 is CA, the following lemma is needed.
Lemma 2.2.2. For any complex number 𝑧 = 𝑟𝑒𝑖𝜃, where 𝑟 = |𝑧| ≠ 1,
∣ 1
1 − 𝑧 − 1
1 − 𝑟2∣ = ∣ 𝑟
1 − 𝑟2∣ (2.41)
In other words, the magnitude of 1−𝑧1 − 1−𝑟12 only depends on 𝑟 and is independent from 𝜃.
Proof.
1
1 − 𝑟𝑒𝑖𝜃 − 1
1 − 𝑟2 = 1
1 − 𝑟 cos(𝜃) + 𝑖𝑟 sin(𝜃) − 1
1 − 𝑟2 (2.42)
= 1 − 𝑟 cos(𝜃) − 𝑖𝑟 sin(𝜃)
(1 − 𝑟 cos(𝜃))2+ 𝑟2sin2(𝜃)− 1
1 − 𝑟2 (2.43)
= ( 1 − 𝑟 cos(𝜃)
1 − 2𝑟 cos(𝜃) + 𝑟2 − 1
1 − 𝑟2) − 𝑖 𝑟 sin(𝜃)
1 − 2𝑟 cos(𝜃) + 𝑟2 (2.44)
Thus, let 𝑄 = 1 − 2𝑟 cos(𝜃) + 𝑟2
∣ 1
1 − 𝑟𝑒𝑖𝜃 − 1 1 − 𝑟2∣
2
(2.45)
= (1 − 𝑟 cos(𝜃)
𝑄 − 1
1 − 𝑟2)
2
+ (𝑟 sin(𝜃)
𝑄 )
2
(2.46)
=(1 − 𝑟 cos(𝜃))2
𝑄2 − 21 − 𝑟 cos(𝜃)
𝑄(1 − 𝑟2) + 1
(1 − 𝑟2)2 +𝑟2sin2(𝜃)
𝑄2 (2.47)
Note that (1 − 𝑟 cos(𝜃))2+ 𝑟2sin2(𝜃) = 𝑄
∣ 1
1 − 𝑟𝑒𝑖𝜃 − 1 1 − 𝑟2∣
2
(2.48)
=𝑄
𝑄2 − 21 − 𝑟 cos(𝜃)
𝑄(1 − 𝑟2) + 1
(1 − 𝑟2)2 (2.49)
= 1 − 𝑟2
𝑄(1 − 𝑟2)− 21 − 𝑟 cos(𝜃)
𝑄(1 − 𝑟2) + 1
(1 − 𝑟2)2 (2.50)
=−1 + 2𝑟 cos(𝜃) − 𝑟2
𝑄(1 − 𝑟2) + 1
(1 − 𝑟2)2 (2.51)
= −𝑄
𝑄(1 − 𝑟2)+ 1
(1 − 𝑟2)2 = 1 − (1 − 𝑟2)
(1 − 𝑟2)2 = ( 𝑟 (1 − 𝑟2))
2
(2.52)
which completes the proof.
We can now prove 𝑥(𝑛) in Equation (2.29) is ZAC. By (2.40) and Lemma 2.2.2,
| ̂𝑥(𝑚)| = ∣(1 + 𝑟)(1 − 𝑟𝑁) ( 1
1 − 𝑟𝑊𝑁𝑚 − 1
1 − 𝑟2)∣ (2.53)
= |(1 + 𝑟)(1 − 𝑟𝑁)| ⋅ ∣ 1
1 − 𝑟𝑊𝑁𝑚 − 1
1 − 𝑟2∣ (2.54)
= ∣𝑟(1 + 𝑟)(1 − 𝑟𝑁)
1 − 𝑟2 ∣ = ∣𝑟(1 − 𝑟𝑁)
1 − 𝑟 ∣ (2.55)
in other words, | ̂𝑥| is constant when 𝑟 is fixed. Thus, 𝑥 is CA and bŷ Theorem 2.2.1, 𝑥 is ZAC.
This method looks like a time domain method, because the power series is used in time domain. However, the ZAC property is proved by Theorem 2.2.1, so it is actually a frequency domain method. This construction of ZAC works for Gaussian integer as well, by set 𝑟 = 𝑎 + 𝑏𝑖.
The main drawback of this method is that the dynamic range is too large. If 𝑟 = 2 and 𝑁 = 100, the max value of the ZAC sequence will be about 2100 ≈ 1030, although it is still integer.
2.2.4 Frequency domain method I:Legendre sequence method
The methods in this section have been published in [14].
Using Legendre sequence and Gauss sum when 𝑁 is prime
Recall that when 𝑁 is prime, Legendre symbol is defined as
(𝑛 𝑁) =
⎧{ {
⎨{ {⎩
1, if 𝑛 ≡ 𝑥2(mod 𝑁 ), for some 𝑥 0, 𝑛 ≡ 0(mod 𝑁 )
−1, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒.
And the Gauss sum is defined as
𝐺(𝑘) =
𝑁−1
∑
𝑛=0
(𝑛
𝑁) 𝑒−2𝜋𝑖𝑘𝑛/𝑁
A well known result[15] is that
𝐺(𝑘) =
⎧{
⎨{
⎩
(𝑁𝑘)√
𝑁 , 𝑁 ≡ 1(mod 4)
− (𝑁𝑘) 𝑖√
𝑁 , 𝑁 ≡ 3(mod 4)
In other words, the Fourier transform of Legendre Sequences is almost CA, with the only exception on 𝑘 = 0, the first point. The amplitude is
√𝑁 thus our goal is to find a Gaussian integer 𝑎 and some integers 𝑏, and 𝑐 such that
|𝑎|2 = 𝑏2+ 𝑁 𝑐2 (2.56)
Then a sequence that
𝑓(𝑛) =
⎧{
⎨{
⎩
𝑎, 𝑛 = 0
(𝑁𝑛)√
𝑁 𝑐 + 𝑏𝑖, 𝑛 ≠ 0
(2.57)
is CA, and the DFT of 𝑓(𝑛) is ZAC in Gaussian integer. Before we prove this let’s see some tiny examples of 𝑁 = 3 and 𝑁 = 5
Example 2.2.1. For 𝑁 = 3, the most trivial value we can choose is 𝑎 = 2, 𝑏 = 1,and 𝑐 = 1. Thus
𝑓(𝑛) = [2, 1𝑖 +√
3, 1𝑖 −√ 3}
̂𝑓(𝑘) = 𝐹 {𝑓(𝑛)} = {2 + 2𝑖, 2 − 4𝑖, 2 + 2𝑖]
As we can see, 𝑓(𝑛) is CA and 𝑓(𝑘) is with Gaussian integer value.̂ This example shows us 𝑎 does not necessary to be complex.
Example 2.2.2. N=3. Let’s try a non-trivial value c=2,b=5,a=6+1i
𝑓(𝑛) = [6 + 1𝑖, 5𝑖 + 2√
3, 5𝑖 − 2√ 3}
̂𝑓(𝑘) = {6 + 11𝑖, 6 − 10𝑖, 6 + 2𝑖]
From this example we can get a very different result from the previ- ous one. Note that 𝑎 has three alternatives 6 − 1𝑖, 1 + 6𝑖, and 1 − 6𝑖. They all give us different ZAC sequences.
Example 2.2.3. 𝑁 = 5, 𝑐 = 1, 𝑏 = 0, 𝑎 = 2 + 1𝑖
𝑓(𝑛) = [2 + 1𝑖,√ 5, −√
5, −√ 5,√
5}
̂𝑓(𝑘) = {2 + 1𝑖, 7 + 1𝑖, −3 + 1𝑖, −3 + 1𝑖, 7 + 1𝑖]
There are various ways to construct infinite triples (𝑎, 𝑏, 𝑐) satisfied (2.56). Let 𝑎 = 𝑎𝑟 + 𝑖𝑎𝑖, where 𝑎𝑟, 𝑎𝑖 are integers. If we choose 𝑐 = 0, clearly the (2.56) will reduce to 𝑎2𝑟+ 𝑎2𝑖 = 𝑏2, and it has infinite solutions.
If 𝑁 is odd, we can choose any odd 𝑐 and any even 𝑎𝑟. Now (2.56) becomes
𝑎2𝑟+ 𝑎2𝑖 = 𝑏2+ 𝑁 𝑐2
⇒𝑎2𝑖 − 𝑏2 = 𝑁 𝑐2− 𝑎2𝑟
Since 𝑁 and 𝑐 are odd and 𝑎𝑟is even, 𝑁 𝑐2−𝑎2𝑟 must be odd. Let 𝑁 𝑐2−𝑎2𝑟= 2𝑘 + 1, then we can use 𝑎𝑖 = 𝑘 + 1 and 𝑏 = 𝑘. Similarly, for any even 𝑐 and odd 𝑎𝑟, we can find proper 𝑎𝑖 and 𝑏 by the same trick.
We complete this subsection by proving the claim that 𝑓(𝑘) is ZAĈ with Gaussian integer value.
Proof. Since 𝑓(𝑛) is CA by definition, thus𝑓(𝑘) is ZAC by Theorem 2.2.1.̂ To prove they are all Gaussian integer, we actually give 𝑓(𝑘) a closed̂
form. If 𝑁 ≡ 1(mod 4)
̂𝑓(𝑘) =
⎧{ {
⎨{ {⎩
𝑎 + (𝑁 − 1)𝑏𝑖, 𝑘 = 0
𝑎 + (𝑁𝑘) 𝑁 𝑐 − 𝑏𝑖, 𝑘 ≠ 0
If 𝑁 ≡ 3(mod 4)
̂𝑓(𝑘) =
⎧{ {
⎨{ {⎩
𝑎 + (𝑁 − 1)𝑏𝑖, 𝑘 = 0
𝑎 − (𝑁𝑘) 𝑁 𝑐𝑖 − 𝑏𝑖, 𝑘 ≠ 0
Either case the 𝑓(𝑘) is in Gaussian integer value since 𝑎 is Gaussian̂ integer and 𝑏, 𝑐 are integers.
Using GLS when 𝑁 is 4𝑘 + 1 prime
When 𝑁 is 4𝑘 + 1 prime, there is another way to increase the degree of freedom by using Generalized Legendre Sequences (GLS)[16, 17, 18]. GLS are originally applied to construct the eigenvectors of dis- crete Fourier transform (DFT) and generate a complete 𝑁 -dimensional orthogonal basis[18], because they have the property that their Fourier transform is their conjugate multiply a constant whose absolute value is √
𝑁 . All the values except the first one of GLS lies on unit circle, and when 𝑁 = 4𝑘 + 1 we can choose the ones which only contains [1, 𝑖, −1, −𝑖], in order to bound the sequences in gaussian integer. The detail steps is described as follows:
1)Choose a GLS 𝑥 where the first value is 0 and the rest only contain [1, 𝑖, −1, −𝑖].
2)Take DFT of 𝑥. Now we have a sequence 𝑦 that the first value is still 0, but the absolute value of rest all equal to√
𝑁 .
3)The first value of 𝑦 can then be chosen by a Gaussian integer 𝑎 + 𝑏𝑖 satisfying 𝑎2 + 𝑏2 = 𝑁 , which always exists by Fermat’s theorem. Now
the sequence is constant amplitude.
4) The DFT of y is a ZAC with Gaussian integer.
It is easy to prove this sequence is really in Gaussian integer. In fact, the sequence is actually
𝐹 {𝐹 {𝑥(𝑛)} + (𝑎 + 𝑏𝑖)𝛿(𝑛)} = 𝑁 𝑥(𝑁 − 𝑛) + 𝑎 + 𝑏𝑖
where 𝑁 , 𝑎, 𝑏, and all value in 𝑥 are with Gaussian integer, so will be the sequence.
As a concrete example, assume 𝑁 = 13 and we choose a GLS 𝑥
𝑥 = [0, 1, −𝑖, 1, −1, −𝑖, −𝑖, 𝑖, 𝑖, 1, −1, 𝑖, −1]
And we choose 𝑎 + 𝑏𝑖 = 3 + 2𝑖 since 32+ 22 = 13. Thus the ZAC sequence is
𝑁 𝑥(𝑁 − 𝑛) + 𝑎 + 𝑏𝑖 =
13 [0, −1, 𝑖, −1, 1, 𝑖, 𝑖, −𝑖, −𝑖, −1, 1, −𝑖, 1] + 3 + 2𝑖
= [3 + 2𝑖, −10 + 2𝑖, 3 + 15𝑖, −10 + 2𝑖,
16 + 2𝑖, 3 + 15𝑖, 3 + 15𝑖, 3 − 11𝑖, 3 − 11𝑖, −10 + 2𝑖, 16 + 2𝑖, 3 − 11𝑖, 16 + 2𝑖]
This idea of this method can be extended by multiplying an integer or a Gaussian integer in step 2, and then we can have more choices in step 3. Let the length 𝑁 = 𝑎2 + 𝑏2, then we can find an integer or a Gaussian integer 𝑠, satisfying |𝑠| = √
𝑐2+ 𝑑2 with some integer 𝑐 and 𝑑, and multiply this number to the GLS. The choices in step 3 can be doubled because
(𝑎2+ 𝑏2)(𝑐2+ 𝑑2) = (𝑎𝑑 + 𝑏𝑐)2+ (𝑎𝑐 − 𝑏𝑑)2 = (𝑎𝑑 − 𝑏𝑐)2+ (𝑎𝑐 + 𝑏𝑑)2
Thus by multiply different 𝑐 + 𝑑𝑖 we can get different ZAC sequences.
This gives us infinite choices.
For instance, if 𝑁 = 13, originally we can only choose
𝑎 + 𝑏𝑖 = {3 + 2𝑖, 3 − 2𝑖, 2 + 3𝑖, 2 − 3𝑖}
When we multiply the GLS by 𝑠 = 5 =√
32+ 42, then in step 3 we have to find 𝑎 + 𝑏𝑖 such that 𝑎2+ 𝑏2 = 25 × 13 = 325, so the choices we have now are:
[15 + 10𝑖, 15 − 10𝑖, 10 + 15𝑖, 10 − 15𝑖]
which are the original ones multiplyed by 5, and
[17 + 6𝑖, 17 − 6𝑖, 6 + 17𝑖, 6 − 17𝑖]
since 172+ 62is also 325. Similarly, when we multiply the GLS by 𝑠 = 2 + 𝑖, we have to find 𝑎 + 𝑏𝑖 such that 𝑎2+ 𝑏2 = 5 × 13 = 65, so the choices we have now are:
[4 + 7𝑖, 4 − 7𝑖, 7 − 4𝑖, 7 + 4𝑖, 8 − 𝑖, 8 + 𝑖, 1 + 8𝑖, 1 − 8𝑖]
where four of them are the original ones multiplied by 2 + 𝑖.
[4 + 7𝑖, 8 − 𝑖, 1 + 8𝑖, 7 − 4𝑖] = (2 + 𝑖) [3 + 2𝑖, 3 − 2𝑖, 2 + 3𝑖, 2 − 3𝑖]
In summary, when 𝑁 is a prime, LS can help us construct many in- teresting ZAC sequences in Gaussian integer. If 𝑁 is a 4𝑘 + 1 prime, then we can further use GLS to construct more. The drawback of this method is that it only for prime number.
2.3 Generate IZAC using Ramanujan’s Sum
The method in this section has been published in [13].
Recall in Section 2.2.2, a signal is devided into several groups. We will use the concept in frequency domain. A signal is called gcd-delta if 𝑠(𝑛) = 𝛿(𝑑 − 𝑔𝑐𝑑(𝑁 , 𝑛)) for some constant 𝑑|𝑁 . We express it as 𝑠𝑁,𝑑(𝑛).
For example,
𝑠6,2(𝑛) =
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎝ 0 0 1 0 1 0
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎠
, 𝑠6,6(𝑛) =
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎝ 1 0 0 0 0 0
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎠
As we can see, gcd-delta function is actually grouping index 𝑛 by gcd(𝑛, 𝑁 ).
However, the main difference between Section 2.2.2 and our method is that we use grouping in frequency domain, and ensure ZAC property by Theorem 2.2.1. The time domain will be integer by Ramanujan’s Sum.
More precisely,
𝐹 {𝑠𝑁,𝑑} = ̂𝑠𝑁,𝑑(𝑘) = 𝑐𝑁
𝑑(𝑘) (2.58)
Proof.
̂
𝑠𝑁,𝑑(𝑘) =
𝑁−1
∑
𝑛=0
𝑠𝑁,𝑑(𝑛)𝑊𝑁𝑛𝑘 (2.59)
=
𝑁−1
∑
𝑛=0
𝛿(𝑑 − gcd(𝑁 , 𝑛))𝑊𝑁𝑛𝑘 (2.60)
= ∑
gcd(𝑁,𝑛)=𝑑
𝑊𝑁𝑛𝑘 (2.61)
Since gcd(𝑁 , 𝑛) = 𝑑, we can let 𝑛 = 𝑛′𝑑 where gcd(𝑁 , 𝑛′) = 1.
̂
𝑠𝑁,𝑑(𝑘) = ∑
gcd(𝑁,𝑛)=𝑑
𝑊𝑁𝑛𝑘 (2.62)
= ∑
gcd(𝑁,𝑛′)=1
𝑊𝑁𝑛′𝑑𝑘 (2.63)
= ∑
gcd(𝑁,𝑛′)=1
𝑊𝑁𝑛′𝑘 𝑑 = 𝑐𝑁
𝑑(𝑘) (2.64)
To construct ZAC sequence, the steps are described as follows
• Step 1. Given a signal length 𝑁 , calculate all its factors 𝑑.
• Step 2. For every 𝑑 choose a binary number 𝑏𝑑 = 0 or 1 and a phase shift 𝑊𝑁𝑝𝑑, where 𝑝𝑑 is any integer between 0 and 𝑁 − 1.
• Step 3. Let
𝑔(𝑛) = ∑
𝑑|𝑁
(−1)𝑏𝑑𝑊𝑁𝑝𝑑𝑛𝑠𝑁,𝑑(𝑛)
• Step 4. Then ̂𝑔(𝑘) = 𝐹 {𝑔(𝑛)} is an integer-valued ZAC squence.
Before we prove this, we provide another example to explain the ideas.
Let 𝑁 = 6, so 𝑑 = 1, 2, 3, 6. We can arbitrarily choose 𝑏1 = 0, 𝑏2 = 1, 𝑏3 =
1, 𝑏6 = 0 and 𝑝1 = 2, 𝑝2 = 1, 𝑝3 = 2, 𝑝6 = 0. Since
𝑠6,1(𝑛) =
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎝ 0 1 0 0 0 1
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎠
, 𝑠6,2(𝑛) =
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎝ 0 0 1 0 1 0
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎠
, 𝑠6,3(𝑛) =
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎝ 0 0 0 1 0 0
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎠
, 𝑠6,6(𝑛) =
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎝ 1 0 0 0 0 0
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎠ therefore in step 3,
𝑔(𝑛) =
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎝ 1
−𝑊62
−𝑊62
−1
−𝑊64
−𝑊64
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎠ And the Fourier transform of 𝑔(𝑛) is
̂
𝑔(𝑘) =
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎝ 2
−1
−1 2
−1 5
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎠
The 𝑔(𝑘) is an integer-valued ZAC as seen in the introduction. From̂ the example above we can notice that 𝑔(𝑛) is CA, so by theorem Theo- rem 2.2.1 𝐺(𝑘) is ZAC. We now formally prove this.
Theorem 2.3.1. 𝑔(𝑛) in step 3 is CA.
Proof. Let 𝑔𝑐𝑑(𝑁 , 𝑛) = 𝑔𝑛,
𝑔(𝑛) = ∑
𝑑|𝑁
(−1)𝑏𝑑𝑊𝑁𝑝𝑑𝑛𝑠𝑁,𝑑(𝑛)
= ∑
𝑑|𝑁
(−1)𝑏𝑑𝑊𝑁𝑝𝑑𝑛𝛿(𝑑 − 𝑔𝑐𝑑(𝑁 , 𝑛))
= ∑
𝑑|𝑁
(−1)𝑏𝑑𝑊𝑁𝑝𝑑𝑛𝛿(𝑑 − 𝑔𝑛)
= (−1)𝑏𝑔𝑛𝑊𝑁𝑝𝑔𝑛𝑛
so 𝑔(𝑛) is on unit circle for all 𝑛. In other words,
𝑔∗(𝑛)𝑔(𝑛) = 1 ∀ 𝑛
which complete the proof.
The last part is to verify ̂𝑔(𝑘) is integer-valued.
Theorem 2.3.2. ̂𝑔(𝑘) in the step 4 is integer-valued.
Proof. Since Fourier transform is a linear transformation,
̂
𝑔(𝑘) = 𝐹 {𝑔(𝑛)}
= ∑
𝑑|𝑁
(−1)𝑏𝑑𝐹 {𝑊𝑁𝑝𝑑𝑛𝑠𝑁,𝑑(𝑛)}
= ∑
𝑑|𝑁
(−1)𝑏𝑑𝑠𝑁,𝑑̂ (𝑘 − 𝑝𝑑)
= ∑
𝑑|𝑁
(−1)𝑏𝑑𝑐𝑁
𝑑(𝑘 − 𝑝𝑑)
Since 𝑐𝑁
𝑑 is Ramanujan’s sum which is integer, and the circular shift of an integer sequence is still integer sequence, thus ̂𝑔(𝑘) is in fact a linear combination of integer sequence with coefficients ±1. This proves that
̂𝑔(𝑘) is integer.
This method can be easily extended to Gaussian integer. In fact,
Gaussian integer gives more degree of freedom. The concept is similar to the method in the previous section. Suppose we can find some inte- gers 𝑎, 𝑏, 𝑐, 𝑒 such that 𝑎2+ 𝑏2= 𝑐2+ 𝑒2, or more simply using Pythagorean triple 𝑎2 + 𝑏2 = 𝑐2, then the (−1)𝑏𝑑 can be substituted by 𝑎 + 𝑏𝑖 or 𝑐 + 𝑒𝑖.
For example, let
𝑔 = (3 + 4𝑖)𝑠6,6+ 5𝑠6,1+ (4 − 3𝑖)𝑠6,2+ (3 − 4𝑖)𝑠6,3 (2.65)
=
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎝
3 + 4𝑖 5 4 − 3𝑖 3 − 4𝑖 4 − 3𝑖
5
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎠
(2.66)
It is obvious that 𝑔 is CA. The DFT of 𝑔 is
̂
𝑔 =
⎛⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎜⎜
⎝
24 − 6𝑖 1 + 11𝑖
−3 + 3𝑖
−2 + 2𝑖
−3 + 3𝑖 1 + 11𝑖
⎞⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎟⎟
⎠
(2.67)
As we can see, ̂𝑔 is an Gaussian integer sequence with ZAC property.
2.4 Discussion
In summary, integer or Gaussian integer ZAC sequences can be gen- erated by two kinds of method. The first kind is called time domain method. The non-linear equations are solved directly by adding more
constraints. The second kind is called frequency domain method. By DFT and Theorem 2.2.1, the ZAC problem is transformed into a con- stant amplitude (CA) problem, which is easier to handle. In particular, using famous number theoretic sum like Gauss Sum and Ramanujan’s Sum guarantees the integer property, so that abundant solutions can be found.
IZAC sequence construction is an important task in modern commu- nication, and we have used Ramanujan’s sum to solve it. Next, we will use another property of Ramanujan’s sum, periodicity, in a different topic.
Chapter 3
Second Application:Period Estimation
3.1 Motivation
The 1D period detection and estimation have become very popular re- cently, including different algorithms[19, 20, 21, 22, 23, 24, 25, 26] and theoretical study[27]. One might think period detection can be easily solved by frequency analysis, but in fact it is a hard problem. Especially when the period is integer. Consider a periodic signal whose period is 23,
𝑥 = [1, 2, 3, ..., 22, 23, 1, 2, 3, ..., 22, 23, 1, 2, 3, ...] (3.1)
Since we do not know the period (otherwise we do not need period es- timation), the signal length 𝑁 might not be a multiple of 23. Let assume we take the first 100 points, and analyze 𝑥(𝑛), 𝑛 = 0, 1, 2, ..., 99, with 100 point DFT. The amplitude of spectrum is given in Figure 3.1. As we can see, the spectrum has many peaks, and the first few is at 𝑘 = 0, 4, 9, 13,
Figure 3.1: The spectrum of 𝑥, where 𝑥 is defined in Equation (3.1).
because
100/23 ≈ 4.3478 ≈ 4 (3.2)
100 × 2/23 ≈ 8.6957 ≈ 9 (3.3) 100 × 3/23 ≈ 13.043 ≈ 13 (3.4)
It is hard to inference the true period 23 from the numbers 4, 9, 13, ....
We called this critical length problem. If the signal length 𝑁 is selected perfectly like 92, i.e., 𝑁 is a multiple of 23, then the spectrum peaks will be at 𝑘 = 0, 4, 8, 12, .... We will solve this in Chapter 4.
Another problem is called mixed period problem. Consider two pe- riodic signal 𝑥1 and 𝑥2 with period 7 and 5 respectively. In particular, let
𝑥1 = [1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, ...] (3.5) 𝑥2 = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2...] (3.6)
Theoretically, 𝑥 = 𝑥1+ 𝑥2 is also a periodic signal with period 7 × 5 = 35.
But in practice, it is more desirable to determine and separate each pe- riod. It can not be easily done by traditional method like autocorrelation.
In [23], the author used Ramanujan’s sum to solve this problem. In the following we will briefly review his method, and extend to 2D case.
3.2 1D Period Estimation
3.2.1 1D period filterbank
Recall that in Section 2.3 we defined gcd-delta function 𝑠𝑁,𝑑(𝑛). It is a binary function with only 0 and 1. From another point of view, the binary function can be considered as ideal filter. For example, ideal low pass filter can be performed by multiplying
𝐻(𝑘) = [1, 1, 1, ..., 1, 0, 0, ..., 0, 0, 1, 1, ..., 1] (3.7)
in frequency domain. But unlike low pass filter, the 𝑁 -point DFT of gcd- delta 𝑠𝑁,𝑑 function is 𝑐𝑁
𝑑 which is integer and periodic. The similarity and difference between ideal filter and gcd-delta function can be summa- rized as Table 3.1.
Property Ideal filter gcd-delta
Freq Domain Binary function Yes Yes
Consecutive 1 Yes No
Time Domain Value Sinc function(real) Integer
Periodic No Yes
Table 3.1: Similarity and difference between ideal filter and gcd-delta function
Traditional filterbanks divide input signal into several sub-band sig- nals. Each sub-band signal contains certain frequencies. In practice, lowpass filter and highpass filter are often used for denoising or com- pression. Similarly, we can use gcd-delta function 𝑠𝑁,𝑑 as period filter- banks, i.e., the input signal is divided into several sub-band signals and
each sub-band contains certain period. For a toy example, let
𝑥 =
⎡⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎢
⎣ 1
−4 4
−1 4 2
⎤⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎥
⎦ , ̂𝑥 =
⎡⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎢
⎣
6
−3 + 3√ 3𝑖
−3 + 3√ 3𝑖 12
−3 − 3√ 3𝑖
−3 − 3√ 3𝑖
⎤⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎥
⎦
(3.8)
We now divide ̂𝑥 into 4 channels by multiplying 𝑠6,6, 𝑠6,3, 𝑠6,2, 𝑠6,1.
̂
𝑥1 =
⎡⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎢
⎣ 6 0 0 0 0 0
⎤⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎥
⎦
, ̂𝑥2 =
⎡⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎢
⎣ 0 0 0 12
0 0
⎤⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎥
⎦
, ̂𝑥3 =
⎡⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎢
⎣
0 0
−3 + 3√ 3𝑖 0
−3 − 3√ 3𝑖 0
⎤⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎥
⎦
, ̂𝑥6=
⎡⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎢
⎣
0
−3 + 3√ 3𝑖 0 0 0
−3 − 3√ 3𝑖
⎤⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎥
⎦ Then by Inverse Fourier transform, the 4 sub-band signals are
𝑥1=
⎡⎢
⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎣ 1 1 1 1 1 1
⎤⎥
⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎦
, 𝑥2 =
⎡⎢
⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎣ 2
−2 2
−2 2
−2
⎤⎥
⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎦
, 𝑥3 =
⎡⎢
⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎣
−1
−1 2
−1
−1 2
⎤⎥
⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎦
, 𝑥6 =
⎡⎢
⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎣
−1
−2
−1 1 2 1
⎤⎥
⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎦ It is clear that
• 𝑥1+ 𝑥2+ 𝑥3+ 𝑥6 = 𝑥
• 𝑥𝑖 and 𝑥𝑗 are orthogonal to each other for all 𝑖 ≠ 𝑗.
• 𝑥𝑖 is periodic with period 𝑖
Once we have separated the signal, further process can be implemented easily. For period estimation, the signal power is calculated for each period. By choosing peaks or ignoring the noise under certain threshold, the period candidates can be found. The estimated period is the least common multiplier (lcm) of these candidates. If multiple periods are desired (the mix period problem), then those candidates can be output directly.
In the next section, [28] provided a different view and a more efficient algorithm to achieve the same goal.
3.2.2 1D Impulse Train and Möbius Inversion
Some useful notation and theorem are given as follows. An impulse train Π𝑁,𝑑 is
Π𝑁,𝑑 =
𝑁 𝑑−1
∑
𝑚=0
𝛿(𝑛 − 𝑚𝑑) (3.9)
with 𝑑|𝑁 . Alternatively, we can write
Π𝑁,𝑑(𝑛) =
⎧{
⎨{
⎩
1 𝑛 = 𝑚𝑑 0 otherwise
(3.10)
An important property is that the DFT of an impulse train is another impulse train with some gain.
̂Π𝑁,𝑑(𝑘) =
𝑁−1
∑
𝑛=0
𝑁 𝑑−1
∑
𝑚=0
𝛿(𝑛 − 𝑚𝑑)𝑊𝑁𝑘𝑛 (3.11)
=
𝑁 𝑑−1
∑
𝑚=0 𝑁−1
∑
𝑛=0
𝛿(𝑛 − 𝑚𝑑)𝑊𝑁𝑘𝑛 (3.12)
=
𝑁 𝑑−1
∑
𝑚=0
𝑊𝑁𝑘𝑚𝑑 (3.13)
=
𝑁𝑑−1
∑
𝑚=0
𝑊𝑁𝑘𝑚
𝑑 (3.14)
=
⎧{
⎨{
⎩
𝑁𝑑 𝑘 =𝑚𝑁𝑑 0 otherwise
(3.15)
= 𝑁 𝑑 Π𝑁,𝑁
𝑑 (3.16)
For example,
Π6,2=
⎡
⎢⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎣ 1 0 1 0 1 0
⎤
⎥⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎦
, Π̂6,2=
⎡
⎢⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎣ 3 0 0 3 0 0
⎤
⎥⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎦
= 3Π6,3 (3.17)
Recall that gcd-delta function 𝑠𝑁,𝑑 = 𝛿(𝑑−gcd(𝑁 , 𝑛)). The relation between gcd-delta and impulse train is
Π𝑁,𝑑 = ∑
𝑑|𝑑′|𝑁
𝑠𝑁,𝑑′ (3.18)
Proof. Let gcd(𝑛, 𝑁 ) = ̄𝑑. If 𝑛 = 𝑚𝑑 then obviously 𝑑| ̄𝑑. Thus,
∑
𝑑|𝑑′|𝑁
𝑠𝑁,𝑑′= ∑
𝑑|𝑑′|𝑁
𝛿(𝑑′− ̄𝑑) = 1 (3.19)
On the other hand, if 𝑛 ≠ 𝑚𝑑, we can see 𝑑 ∤ ̄𝑑. Thus,
∑
𝑑|𝑑′|𝑁
𝑠𝑁,𝑑′= ∑
𝑑|𝑑′|𝑁
𝛿(𝑑′− ̄𝑑) = 0 (3.20)
For example,
Π6,2 =
⎡⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎢
⎣ 1 0 1 0 1 0
⎤⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎥
⎦
=
⎡⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎢
⎣ 0 0 1 0 1 0
⎤⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎥
⎦ +
⎡⎢
⎢⎢
⎢⎢
⎢⎢
⎢
⎢
⎣ 1 0 0 0 0 0
⎤⎥
⎥⎥
⎥⎥
⎥⎥
⎥
⎥
⎦
= 𝑠6,2+ 𝑠6,6 (3.21)
Finally, we introduce Möbius function in number theory
𝜇(𝑛) =
⎧{ {
⎨{ {⎩
1 if 𝑛 is a square-free with an even number of prime factors.
−1 if 𝑛 is a square-free with an odd number of prime factors.
0 if 𝑛 has a squared prime factor.
(3.22)
For example, 𝜇(1) = 1, 𝜇(3) = −1, 𝜇(15) = 1, 𝜇(4) = 𝜇(12) = 0. The most important property of Möbius function is
∑
𝑑|𝑁
𝜇(𝑑) =
⎧{
⎨{
⎩
1 𝑁 = 1 0 𝑁 > 1
(3.23)
Now the main contribution in [28] is to rewrite Equation (3.18).
𝑠𝑁,𝑑 = ∑
𝑑|𝑑′|𝑁
𝜇(𝑑′
𝑑 )Π𝑁,𝑑′ (3.24)
Take DFT for both sides.
̂
𝑠𝑁,𝑑= ∑
𝑑|𝑑′|𝑁
𝜇(𝑑′
𝑑) ̂Π𝑁,𝑑′ (3.25)
⇒ 𝑐𝑁
𝑑 = ∑
𝑑|𝑑′|𝑁
𝜇(𝑑′ 𝑑)𝑁
𝑑 Π𝑁,𝑁
𝑑 (3.26)