Content uploaded by Kees Schouhamer Immink

Author content

All content in this area was uploaded by Kees Schouhamer Immink on Apr 11, 2019

Content may be subject to copyright.

Computation of the spectrum of dc2-balanced codes

Kees A. Schouhamer Immink, Fellow, IEEE, and Kui Cai, Senior Member, IEEE

Abstract—We apply the central limit theorem for deriving ap-

proximations to the auto-correlation function and power density

function (spectrum) of second-order spectral null (dc2-balanced)

codes. We show that the auto-correlation function of dc2-balanced

codes can be accurately approximated by a cubic function. We

show that the difference between the approximated and exact

spectrum is less than 0.03 dB for codeword length n= 256.

I. INTRODUCTION

Spectral null, or dc-balanced, codes have been applied in

cable transmission [1, 2, 3], magnetic recording [4, 5] and

optical recording systems [6, 7, 8]. Spectral null codes have re-

cently been advocated in visible light communications (VLC)

systems, where light intensity of solid-state light sources,

mostly LEDs, are varied [9]. It is desirable that the intensity

variation of the light is invisible to the users, that is, annoying

ﬂicker should be mitigated [10]. This requirement implies that

the spectrum of the modulated signal should not contain low-

frequency components. Light sources are usually connected

to the AC power grid, and therefore generate interference

components at 50, 60 Hz, or the higher harmonics. Rejection

of these interfering components can easily be accomplished

by high-pass ﬁltering, but in order not to degrade the wanted

communication signal by this ﬁltering, low-frequency compo-

nents should be absent in the modulated signal. Three types

of dc-balanced codes, the Manchester code (bi-phase), a 4B6B

code, and an 8B10B code, have been adopted in VLC standard

IEEE 802.15.7-2011 [11] for ﬂicker mitigation and dimming

control [9, 12].

Higher-order spectral null codes, such as dc2-balanced

codes, offer a greater rejection of the low-frequency compo-

nents than regular dc-balanced codes [13]. Most of the prior art

literature has focused on efﬁcient constructions of higher-order

spectral null codes, see for example [14, 15, 16, 17, 18, 19, 20].

Spectral properties of higher-order spectral null codes have

been computed for relatively small values of the codeword

length nby enumerating all codewords [13]. For larger values

of n, Immink and Cai [21] have postulated expressions for

approximating the auto-correlation function and spectrum of

higher-order spectral null codes.

Kees A. Schouhamer Immink is with Turing Machines Inc, Willem-

skade 15d, 3016 DK Rotterdam, The Netherlands. E-mail: immink@turing-

machines.com.

Kui Cai is with Singapore University of Technology and Design (SUTD),

8 Somapah Rd, 487372, Singapore. E-mail: cai kui@sutd.edu.sg.

This work is supported by Singapore Ministry of Education Academic

Research Fund Tier 2 MOE2016-T2-2-054, and Singapore Agency of Science

and Technology (A*Star) PSF research grant

The main contribution of this paper is the derivation of

improved approximations to the auto-correlation function and

spectrum of dc2-balanced codes by applying the central limit

theorem. The paper is organized as follows. Section II com-

mences with prior art background on dc2-balanced codes. In

Section III, we derive an approximation to the auto-correlation

function and spectrum of dc2-balanced codes for asymptot-

ically large values of the codeword length nby counting

dc2-balanced codewords using the central limit theorem. The

approximations found are compared with the exact values for

n < 256. Further approximations for asymptotically large n

will be discussed in Section III-C. In Section IV, we appraise

the spectral performance of dc2-balanced codes. Section V

shows our conclusions.

II. BACKGROU ND O N DC2-B AL AN CE D BLO CK CODES

Let the n-bit codeword x= (x1, x2, . . . , xn)over the binary

symbol alphabet Q={0,1}, be a member of a codebook

S. The encoder emits codewords from Srandomly and in-

dependently (i.i.d.). The auto-correlation function, ρ(i), of a

sequence of codeword symbols is given by [22, 23, 24]

ρ(i) = 1

n|S|

x∈S

n−i

j=1

x′

jx′

j+i,0≤i≤n−1,(1)

where |S|denotes the cardinality of Sand x′

i= 2xi−1,

x′

i∈ {−1,1}, is the bipolar representation of xi. If both x

and its inverse ¯

xare members of S, then the power spectral

density (psd), in short spectrum, versus frequency ωof the

emitted symbol sequence is

H(ω) = 1 + 2

n−1

i=1

ρ(i) cos(iω).(2)

A regular ‘full-set’ dc-balanced block code comprises all

possible codewords that have equal numbers of 0’s and 1’s

(neven). Franklin and Pierce [2] showed that the spectrum

of a full-set dc-balanced block code has a null at the zero

frequency, that is, H(0) = 0. Dc2-balanced spectral null codes

are dc-balanced codes that satisfy a second condition, namely

H(0) = H(2)(0) = 0,(3)

where H(2)(0) denotes the second derivative of H(ω)at ω=

0. Note that the above frequency domain conditions imply, see

(2), that

n−1

i=1

ρ(i) = −1

2and

n−1

i=1

i2ρ(i)=0.(4)

A codeword, x, is dc2-balanced if it satisﬁes [13, 25]

n

i=1

xi=n

2and

n

i=1

ixi=n(n+ 1)

4.(5)

A block code comprising a full set of dc2-balanced codewords,

denoted by S2, is deﬁned by

S2=x∈ Qn:xi=n

2;ixi=n(n+ 1)

4.(6)

The set S2is empty if nmod 4 ̸= 0 [13]. Let x∈S2then

its reverse xr= (xn, . . . , x1)∈S2, since for a x∈S2

n

i=1

ixi=

n

i=1

(n+ 1 −i)xi=n(n+ 1)

4.(7)

A useful metric of the low-frequency spectral content, denoted

by χ, called Low Frequency Spectral Weight (LFSW) [18], is

the ﬁrst non-zero coefﬁcient of the Taylor expansion of (2),

that is,

H(ω)∼χω4, ω ≪1.(8)

We derive from (2) that

χ=1

12

n−1

i=1

i4ρ(i).(9)

The number of dc2-balanced codewords, denoted by Ndc2=

|S2|, can be approximated for asymptotically large n,

by [19, 26]

Ndc2∼4√3

πn22n, n mod 4 = 0, n ≫1.(10)

In the range n < 256 we have found experimentally that a

better approximation is found by applying a small correction

term, namely

Ndc2∼4√3

πn22n1−1.211

n, n mod 4 = 0, n ≫1.

(11)

We consider here the spectral properties of full-set block

codes, that is, S2denotes the set of all possible words, x, that

satisfy condition (5). Finding an expression of the spectral

properties of a full-set S2for large values of nis an open

problem as the computation requires the evaluation of (1) for

each x∈S2[15]. In the next section, our main contribution,

we address an alternative method, which is based on statistical

analysis, which gives a simple and good approximation to the

spectrum.

III. AU TO-CORRELATION FUNCTION

Let xbe a codeword in S2, and let i0and i1,i0̸=i1,

1≤i0, i1≤n, be two (different) index positions in the code-

word x. Deﬁne the average correlation, denoted by r(i0, i1),

between the symbols at positions i0and i1averaged over all

codewords x∈S2by

r(i0, i1) = 1

Ndc2

x∈S2

(2xi0−1)(2xi1−1).(12)

Note that the bipolar variables x′

i0= 2xi0−1and x′

i1=

2xi1−1∈ {−1,1}, so that x′

i0x′

i1= 1 for xi0=xi1and

x′

i0x′

i1=−1for xi0̸=xi1. Then,

r(i0, i1) = Ndc2(xi0=xi1)−Ndc2(xi0̸=xi1)

Ndc2

,(13)

where Ndc2(A)denotes the number of dc2-balanced code-

words xthat satisfy condition A. Since, by deﬁnition,

Ndc2=Ndc2(xi0=xi1) + Ndc2(xi0̸=xi1),

and as both xand its inverse ¯

xare members of S2,

Ndc2(xi0=xi1= 0) = Ndc2(xi0=xi1= 1),

we have

r(i0, i1) = 2Ndc2(xi0=xi1)

Ndc2−1

=4Ndc2(xi0=xi1= 1)

Ndc2−1.(14)

Applying (1) and (13), we ﬁnd the auto-correlation function

ρ(i) = 1

n

n−i

j=1

r(j, j +i),0≤i≤n−1.(15)

By using the central limit theorem, we compute below an

approximation to the number of dc2-balanced codewords that

have a ‘1’ at positions i0and i1,Ndc2(xi0=xi1= 1), for

asymptotically large values of n. Then, using (15), we are able

to derive an approximation to the auto-correlation function

ρ(i).

A. Counting of codewords using the central limit theorem

The number of dc2-balanced codewords, x,Ndc2(xi0=

xi1= 1), that is required for computing the auto-correlation

function using (15) and (14), can be computed using generat-

ing functions. For very large n, however, this rapidly becomes

an impractically cumbersome exercise, and an efﬁcient alter-

native method is considered a desideratum.

To that end, we exploit the central limit theorem by regard-

ing the integer variables xi∈ {0,1}as i.i.d. binary random

variables whose numerical outcomes ‘0’ or ‘1’ are equally

likely. We deﬁne the stochastic variables cand pby

c=x1+x2+···+xn(16)

and

p=x1+ 2x2+· ·· +nxn,(17)

where xi0=xi1= 1,i0, i1∈ {1, . . . , n}.

The central limit theorem [27, Chapter 8], states that

for asymptotically large nthe distribution of the stochastic

variables cand p, which are obtained by summing a large

number, n, of independent stochastic variables, approaches a

two-dimensional Gaussian probability distribution.

Deﬁne E[.], the expected value operator for all possible

codewords in S2. Let the parameters µc=E[c]and µp=E[p]

denote the average of cand p, and let σ2

c=E[(c−µc)2]

and σ2

p=E[(p−µp)2]denote the variance of cand p. The

parameter rdenotes the linear correlation coefﬁcient between

the random variables cand p. Then the probability density

function of the bi-variate Gaussian distribution, denoted by

G(c, p), is given by

G(c, p) = 1

2πϕ1

e−ϕ(c,p),(18)

where

ϕ2

1=σ2

cσ2

p(1 −r2),(19)

ϕ(c, p) = 1

2(1 −r2)f(c, p),(20)

and

f(c, p) = c−µc

σc2

+p−µp

σp2

−2r(c−µc)(p−µp)

σcσp

.

We have

E[xi] = E[x2

i] = 1

2,and E[xixj] = 1

4, i ̸=i0, i1,(21)

E[xi] = E[x2

i] = 1, i =i0, i1, E[xixj] = 1

2, i, j =i0, i1,

and E[xi0xi1]=1. We may ﬁnd after a routine computation

using (21) that

µc=En

i=1

xi=

n

i=1

E[xi] = n−2

2+ 2

and similarly

µp=En

i=1

ixi=

n

i=1

E[ixi] = n(n+ 1)

4+i0+i1

2.

The variances σ2

c,σ2

p, and the correlation coefﬁcient rcan be

found without too much difﬁculty:

σ2

c=En

i=1

(xi−µc)2=n−2

4,(22)

σ2

p=En

i=1

(ixi−µp)2

=n(n+ 1)(2n+ 1)

24 −i2

0+i2

1

4,(23)

and

r2=E[n

i=1(xi−µc).n

i=1(ixi−µp)]

σ2

cσ2

p

=3

2(n−2)

(n2+n−2(i0+i1))2

2n3+ 3n2+n−6(i2

0+i2

1).(24)

The total number of n-sequences with xi0=xi1= 1, equals

2n−2, so that for asymptotically large n, the number of n-

sequences versus cand p, denoted by N(c, p;xi0=xi1= 1),

can be approximated by

N(c, p;xi0=xi1= 1) ∼2n−2G(c, p) = 2n

8πϕ1

e−ϕ(c,p).

(25)

A dc2-balanced codeword satisﬁes, by deﬁnition, the con-

ditions, see (5), c=n/2and p=n(n+ 1)/4. Then,

Ndc2(xi0=xi1= 1) is found after substituting c=n/2

and p=n(n+ 1)/4into (25). We ﬁnd

Ndc2(xi0=xi1= 1) ∼2n

8πϕ1

e−ϕ2,(26)

where, see (19) and (20),

ϕ2=ϕc=n

2, p =n(n+ 1)

4

=1

2(1 −r2)1

σc2

+i0+i1

2σp2

−r(i0+i1)

σcσp

=4σ2

p+σ2

c(i0+i1)2−4rσcσp(i0+i1)

8ϕ1

.(27)

After combining (10), (14), and (26), we obtain

r(i0, i1) = n2

√192 ϕ1

e−ϕ2−1.(28)

In order to reduce the clerical work and offer more insight,

we deﬁne the four (real) variables

γ= 12n[(i0−n−1)i0+ (i1−n−1)i1],

δ= (i0−i1)2,

r1=−1

n4(8n3+ 13n2+ 4n+γ−12δ),

and

r2=1

8n3[12n2+ 4n+γ−6(n+ 2)δ].

With some effort we ﬁnd the expressions

ϕ2

1=n4

192(1 + r1)(29)

and

ϕ2=8

n

1 + r2

1 + r1

.(30)

We ﬁnally obtain

r(i0, i1) = n2

√192 ϕ1

e−ϕ2−1

=1

√1 + r1

e−8

n

1+r2

1+r1−1,(31)

where we can easily verify, since xand xr∈S2, see (7), that

r(i0, i1) = r(n+ 1 −i0, n + 1 −i1).(32)

The auto-correlation function, ρ(i), is found using (15). In the

next subsection, we show results of computations.

B. Results of computations

By invoking (15) and (31) we are now able to compute

an estimate of the auto-correlation function ρ(i). Figure 1

shows results of computations for n= 32, 64, and 128. As a

comparison we plotted the exact auto-correlation function of

a full set of dc2-balanced sequences, denoted by ˆρ(i), which

was computed using an enumeration technique and generating

functions [13].

The accuracy of the approximate auto-correlation function,

ρ(i), cannot easily be determined from Figure 1 for the larger

values of n. Figure 2, Curve ‘without correction’, shows

0 0.2 0.4 0.6 0.8 1

i/n

-0.08

-0.07

-0.06

-0.05

-0.04

-0.03

-0.02

-0.01

0

0.01

Auto-correlation function

n=32

n=64

n=128

exact

exact

Fig. 1. Auto-correlation functions, ρ(i)(estimate, using (15) and (31))

and ˆρ(i)(exact, full set), versus i/n for n= 32,64 and 128.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

i/n

10-8

10-7

10-6

10-5

10-4

10-3

Difference

n=128

with correction

n=256

n=128

n=256 without correction

without correction

Fig. 2. Difference, with and without correction, between estimated

and exact auto-correlation functions, |ˆρ(i)−ρ(i)|, versus i/n for

n= 128 and 256.

|ˆρ(i)−ρ(i)|, the difference between the two auto-correlation

functions versus i/n for the selected n= 128 and 256. We

notice that the difference between the two functions decreases

with increasing iand n. For n= 256 in the whole range the

difference, |ˆρ(i)−ρ(i)|, is less than 10−4.

Although the difference, |ˆρ(i)−ρ(i)|, is relatively small,

especially for larger n, see Figure 2, the ‘checks’, see (4),

ρ(i) = −1/2and i2ρ(i) = 0, which accumulate the

small error differences, are not necessarily satisﬁed. We have

observed that with increasing nthat ρ(i)+1/2is converging

to zero (as it should), while i2ρ(i)is not. As a result,

the spectra, computed using ρ(i)do not satisfy the spectral

conditions (3).

We propose to add a small correction term to ρ(i)so that

both ‘checks’, ρ(i) = −1

2and i2ρ(i) = 0, are satisﬁed.

We add to ρ(i)the correction term a+bi, where the (real)

parameters, aand b, are chosen such that i(ρ(i)+ a+bi) =

−1

2and ii2(ρ(i) + a+bi) = 0. Deﬁne

a0=ρ(i) + 1

2

and

a1=i2ρ(i),

then we ﬁnd two linear equations with two unknowns, aand

b, namely

n−1

i=1

(ρ(i) + a+bi) = a0−1

2+na +b

n−1

i=1

i=−1

2

and

n−1

i=1

i2(ρ(i) + a+bi) = a1+a

n−1

i=1

i2+b

n−1

i=1

i3= 0.

After solving the above system, where we substitute the well-

known expressions for ik,k= 1,2,3, we obtain

a=−3n(n−1)a0−2a1

n(n−1)(n−2) (33)

and

b= 2n(2n−1)a0−6a1

n2(n−1)(n−2) .(34)

For example, for n= 128, we ﬁnd that a0=−0.0156 and

a1=−22.21. So that a= 0.0003063 and b=−0.0000029.

The result of the correction can be seen in Figure 2, curves

‘with correction’, for n= 128 and 256. We notice in the range

i/n < 0.6a signiﬁcant improvement in the accuracy of the

estimate of the auto-correlation function.

C. Further approximations for asymptotically large n

With (31) we can straightforwardly compute the auto-

correlation function ρ(i)and spectrum H(ω). In this section,

we attempt to approximate ρ(i)for asymptotically large n,

which might offer more insight in the trade-offs between

redundancy and spectral properties. We apply to (31) the well-

known series approximations

1

√1 + x= 1 −x

2+3

8x2−5

16x3+···

and 1

1 + x= 1 −x+x2−x3+· ·· .

We have experimented with the various options available

for trading accuracy versus simplicity of the expression, and

propose

r(i0, i1)∼ −8

n(1 + r2)−r1

2, n ≫1.(35)

Using (15), we obtain

ρ(i)∼n−i

2n512i2+ 4ni2+ 4n2i−4n3+n2+ 4n.(36)

Then, after deleting the smallest terms, we obtain the simple

cubic function

ρ(i)∼2

n4(n−i)(i2+in −n2),(37)

which can be rewritten as

ρ(i)∼2

n4(n−i)(i−c0n)(i−c1n),(38)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

i/n

10-8

10-7

10-6

10-5

10-4

10-3

Difference

(b)

(a)

Fig. 3. Deviation between exact and estimated auto-correlation func-

tion a) |ρ′(i)−ˆρ(i)|and b) |ρa(i)−ˆρ(i)|versus i/n for n= 256,

where ρa(i)is deﬁned in (41).

where c0,1= (−1∓√5)/2. The checks (4) for the above ρ(i)

yield

a0=1

2+ρ(i) = 1

n−1

2n2

and

a1=i2ρ(i) = −1

6+1

6n2.

In order to satisfy both checks (4), we add to ρ(i)the

correction term a+bi, and deﬁne

ρ′(i) = 2

n4(n−i)(i−c0n)(i−c1n) + a+bi, (39)

where after using (33) and (34), we obtain

a=−6n2−n+ 2

2(n−2)n3∼ − 3

n2

and

b=4n3−2n2+n−2

n4(n−1)(n−2) ∼4

n3.

Note that aand bare relatively small terms in (39) for

asymptotically large n. Figure 3 shows the difference between

exact and estimated auto-correlation function |ρ′(i)−ˆρ(i)|

versus i/n for n= 256. As a ﬁnal proof of the pudding,

we compare the (exact) spectrum of full set codewords versus

the spectrum, denoted by H′(ω), which is computed using

the above approximated auto-correlation function ρ′(i). The

difference, H′(ω)/ˆ

H(ω)(dB), between the spectrum, H′(ω),

computed using ρ′(i), and the exact spectrum, ˆ

H(ω), of full set

codewords, which was computed using generating functions,

is plotted in Figure 4. We may observe that the difference

between the two spectra is very small, less than 0.05 dB for

n= 128 and less than 0.03 dB for n= 256.

The LFSW metric, χ′is, using (9),

χ′=1

12

n−1

i=1

i4ρ′(i)∼n4

720 1 + 4

n.(40)

Table I shows χ′for selected values of n, where as a

comparison we have listed the LFSW of full set dc2-balanced

codes, denoted by ˆχ. We may notice that for n= 256 the

difference between χand ˆχis less than half a percent.

10-4 10-3 10-2 10-1 100

Frequency f (log)

-0.01

0

0.01

0.02

0.03

0.04

0.05

Deviation (dB)

n=256

n=128

Fig. 4. Deviation between exact and estimated spectrum H′(ω)/ˆ

H(ω)

(dB) versus ωfor n= 128 and 256.

10-4 10-3 10-2 10-1 100

Frequency f (log)

-0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

Deviation (dB)

(b)

(a)

Fig. 5. Deviation between exact and estimated spectrum a)

H′(ω)/ˆ

H(ω)(dB) and b) Ha(ω)/ˆ

H(ω)(dB) versus ωfor n= 256.

D. Comparison with prior art

In [21], it is postulated that the auto-correlation of dc2-

balanced spectral null codes, denoted by ρa(i), can be mod-

elled by the simple parabola’s equation

ρa(i) = β(i+α)(i−n),(41)

where the (real) parameters αand βare given by

α=−3n2−2

5n

TABLE I

LFSW χ′AN D ˆχVE RSU S n.

n χ′ˆχ

32 1629.48 1576.72

64 24723.13 24250.79

128 384339.75 380367.61

256 6057889.79 6025352.62

and

β=−15

(n−1)(n−2)(4n+ 3).

It has been shown in [21] that the parabola’s equation (41)

is an accurate approximation to the exact correlation func-

tion of full-set dc2-balanced spectral null codes. Figure 3,

Curve (b), shows the difference between exact and estimated

auto-correlation function |ρa(i)−ˆρ(i)|versus i/n for n= 256.

We notice that the newly developed ρ′(i), Curve (a), is almost

an order more accurate than (41) presented in the prior art.

Figure 5, Curve (b), shows that the quotient of the exact

spectrum and the one based on prior art (41), ˆ

H(ω)/Ha(ω), is

for n= 256 less than 0.7 dB, and also here we notice that the

newly developed theory is more than an order more accurate.

IV. APPRAISAL OF SPECTRAL PERFORMANCE

A system designer is usually confronted with a restricted

redundancy budget, so that with a given redundancy the

designer searches for a balanced code that offers the best

rejection of low-frequency components. In this section, we

compare the spectral performance of regular dc-balanced codes

with that of dc2-balanced codes. We start with a summary of

properties of dc-balanced codes.

A. Codes with a ﬁrst-order spectral null

Let the codeword length of a regular full-set dc-balanced

code be denoted by n1,n1even. Each codeword has an equal

number of 0’s and 1’s, so that the number of available dc-

balanced codewords, denoted by Ndc, is simply [28]

Ndc =n1

n1/2∼1

π

2n1

2n1, n1≫1.(42)

The auto-correlation function, ρ1(i), and the spectrum, H1(ω),

of dc-balanced codes is [2]

ρ1(i) = 1

n1(n1−1)(i−n1)(43)

and

H1(ω) = n1

n1−11−sin n1ω

2

n1sin ω

22.(44)

At the very low-frequency end, we have [18]

H1(ω)∼χ1ω2, ω ≪1,(45)

where

χ1=n1(n1+ 1)

12 .(46)

B. Performance comparison

We compare the spectral content of dc-balanced versus that

of dc2-balanced codes, where we assume that both types of

codes have the same redundancy. Let Rand R1denote the

maximum information rate of a dc2-balanced code or dc-

balanced of length nand n1, respectively, then we have, using

(10),

R=1

nlog2Ndc2=1

nlog2

4√3

πn22n

= 1 −1

nlog2

πn2

4√3(47)

TABLE II

COD E LE NGT H nAND n1FOR R=R1.

R=R1n1n

0.90 28 132

0.92 38 172

0.94 54 248

0.96 90 408

0.98 210 932

10−4 10−3 10−2

−40

−35

−30

−25

−20

−15

−10

−5

0

5

Spectrum (dB)

Frequency f (log)

(a) (c)

(b)

Fig. 6. Spectra of dc-balanced and dc2-balanced codes with the same

redundancy versus frequency for a) R=R1= 0.98, b) R=R1=

0.94, and c) R=R1= 0.90, see also Table II. The points of

intersection are around −20 dB.

and, using (42),

R1= 1 −1

2n1

log2

π

2n1.(48)

Table II shows a few examples of the codeword lengths n

and n1for which dc-balanced and dc2-balanced codes have

equal redundancy, respectively, that is, R=R1. In the range

shown in Table II, the codeword length nof a dc2-balanced

code is approximately a factor of 4.5 larger than the codeword

length n1of a dc-balanced code for achieving the same rate

R=R1. Figure 6 shows three examples of spectrum pairs of

dc-balanced and dc2-balanced codes with the same redundancy

versus frequency for a) R=R1= 0.98, b) R=R1= 0.94,

and c) R=R1= 0.90, see also Table II. We may notice the

points of intersection of the spectra of dc-balanced and dc2-

balanced codes. A further perusal of the diagram reveals that

the points of intersection are at around −20 dB, which implies

that dc2-balanced codes are to be preferred when a low-

frequency spectral suppression is required better than around

−20 dB. Additional computations show that this ‘20 dB rule’

applies to all codes with a rate larger than 0.75.

V. CONCLUSIONS

By applying the central limit theorem, we have derived

an approximate expression for the auto-correlation function

and spectrum of full-set dc2-balanced codes for asymptotically

large values of the codeword length n. We have shown that

the auto-correlation function of dc2-balanced codes can be

accurately approximated by a simple cubic function. We have

compared the approximate spectrum with the exact spectrum

of full set dc2-balanced codes. We have shown that the

difference between the approximated and exact spectrum is

less than 0.03 dB for n= 256.

REF ER EN CE S

[1] K. W. Cattermole, “Principles of Digital Line Coding,” Int. Journal of

Electronics, vol. 55, pp. 3-33, July 1983.

[2] J. N. Franklin and J. R. Pierce, “Spectra and Efﬁciency of Binary Codes

without DC,” IEEE Trans. Commun., vol. COM-20, no. 6, pp. 1182-

1184, Dec. 1972.

[3] C. Cao and I. Fair, “Minimal Sets for Capacity-Approaching Variable-

Length Constrained Sequence Codes,” IEEE Trans. Commun., Accepted

Sept. 2018.

[4] Y. Ng, K. Cai, K. S. Chan, M. R. Elidrissi, M. Y. Lin, Z. Yuan, C .L.

Ong, and S. Ang, “Signal Processing for Dedicated Servo Recording

System,” IEEE Trans. Magn., vol. 51, no. 10, Oct. 2015.

[5] Z. M. Yuan, J. Shi, C. L. Ong, P. S. Alexopoulos, C. Du, A. Kong, S.

Ang, B. Santoso, S. H. Leong, K. S. Chan, Y. Ng, K. Cai, J. Tsai, H. Ng,

and H. K. Tan, “Dedicated Servo Recording System and Performance

Evaluation,” IEEE Transactions on Magnetics, vol. MAG-51, no. 4,

2015.

[6] K. Cai, K. A. S. Immink, M. Zhang, and R. Zhao, “Design of Spectrum

Shaping Codes for High-Density Data Storage,” Trans. on Consumer

Electronics, vol. CE-63, no. 4, pp. 477-482, Nov. 2017.

[7] K. A. S. Immink, “Spectral Null Codes,” IEEE Trans. Magn., vol. MAG-

26, no. 2, pp. 1130-1135, March 1990.

[8] K. Cai, A. Kong, and Z. Yuan, “Systems and methods for decoding using

run-length limited (RLL) codes,” US Patent 9,852,757, Dec. 2017.

[9] A. R. Ndjiongue, H. C. Ferreira, and T. M. N. Ngatched, Visible Light

Communications (VLC) Technology, Wiley Encyclopedia of Electrical

and Electronics Engineering, 2015.

[10] M. Oh, “A Flicker Mitigation Modulation Scheme for Visible Light

Communications”, 2013 15th International Conference on Advanced

Communications Technology (ICACT), PyeongChang, South Korea,

Jan. 2013.

[11] S. Rajagopal, R. D. Roberts, and S-K. Lim, “IEEE 802.15.7 Visible

Light Communication: Modulation Schemes and Dimming Support,”

IEEE Communications Magazine, vol. 50, no. 3, pp. 72-82, March 2012.

[12] Z. Wang, Q. Wang, W. Huang, and Z. Xu, Visible Light Communications:

Modulation and Signal Processing, Wiley-IEEE Press, Jan 2018.

[13] K. A. S. Immink and G. F. M. Beenker, “Binary Transmission Codes

with Higher Order Spectral Zeros at Zero Frequency,” IEEE Trans.

Inform. Theory, vol. IT-33, no. 3, pp. 452-454, May 1987.

[14] L. G. Tallini and B. Bose, “On Efﬁcient High-Order Spectral-Null

Codes,” IEEE Trans. Inform. Theory, vol. IT-45, no. 7, pp. 2594-2601,

Nov. 1999.

[15] Y. Xin and I. J. Fair, “Algorithms to Enumerate Codewords for DC2-

Constrained Channels,” IEEE Trans. Inform. Theory, vol. IT-47, no. 7,

pp. 3020-3025, Nov. 2001.

[16] C. N. Yang, “Efﬁcient Encoding Algorithm for Second-Order Spectral-

Null Codes Using Cyclic Bit Shift,” IEEE Transactions on Computers,

vol. 57, no. 7, pp. 876-888, July 2008.

[17] V. Skachek, T. Etzion, and R. M. Roth, “Efﬁcient Encoding Algorithm

for Third-order Spectral-Null Codes,” IEEE Trans. Inform. Theory, vol.

IT-44, no. 2, pp. 846-851, March 1998.

[18] Y. Xin and I. J. Fair, “A Performance Metric for Codes with a High-

Order Spectral Null at Zero Frequency,” IEEE Trans. Inform. Theory,

vol. IT-50, no. 2, pp. 385-394, Feb. 2004.

[19] R. M. Roth, P. H. Siegel, and A. Vardy, “Higher-Order Spectral-Null

Codes: Constructions and Bounds,” IEEE Trans. Inform. Theory, vol.

IT-40, no. 6, pp. 1826-1840, Nov. 1994.

[20] L. G. Tallini, D. Pelusi, R. Mascella, L. Pezza, S. Elmougy, and B.

Bose, “Efﬁcient Non-Recursive Design of Second-Order Spectral-Null

Codes,” IEEE Transactions on Inform. Theory,, vol. IT-62, no. 6, pp.

3084-3102, June 2016.

[21] K. A. S. Immink and K. Cai, “Estimated Spectra of Higher-Order

Spectral Null Codes,” IEEE Commun. Letters, vol. 23, no. 1, pp. 20-23,

Jan. 2019.

[22] B.S. Bosik, “The Spectral Density of a Coded Digital Signal,” Bell Syst.

Tech. J., vol. 51, pp. 921-932, April 1972.

[23] G. L. Pierobon, “Codes for Zero Spectral Density at Zero Frequency,”

IEEE Trans. Inform. Theory, vol. IT-30, no. 2, pp. 435-439, March 1984.

[24] J. Justesen, “Information Rates and Power Spectra of Digital Codes,”

IEEE Trans. Inform. Theory, vol. IT-28, no. 3, pp. 457-472, May 1982.

[25] C. M. Monti and G. L. Pierobon, “Codes with a Multiple Spectral Null

at Zero Frequency,” IEEE Trans. Inform. Theory, vol. IT-35, no. 2, pp.

463-472, March 1989.

[26] H. Prodinger, “On the Number of Partitions of {1,...,n}into Two

Sets of Equal Cardinalities and Equal Sums,” Canad. Math. Bull., vol.

25, no. 2, pp. 238-241, 1982.

[27] P. Flajolet and R. Sedgewick, Analytic Combinatorics, ISBN 978-0-521-

89806-5, Cambridge University Press, 2009.

[28] K. A. S. Immink and J. H. Weber, “Very Efﬁcient Balanced Codes,”

IEEE Journal on Selected Areas of Communications, vol. 28, no. 2, pp.

188-192, 2010.

Kees A. Schouhamer Immink (M’81-SM’86-F’90)

received his PhD degree from the Eindhoven Uni-

versity of Technology. He was from 1994 till 2014

an adjunct professor at the Institute for Experimental

Mathematics, Essen-Duisburg University, Germany.

In 1998, he founded Turing Machines Inc., an in-

novative start-up focused on novel signal processing

for DNA-based storage, where he currently holds

the position of president. Immink designed coding

techniques of digital video, audio, and data recording

products such as Compact Disc, CD-ROM, DCC,

DVD, and Blu-ray Disc. He received a Knighthood in 2000, a personal Emmy

award in 2004, the 2017 IEEE Medal of Honor, the 1999 AES Gold Medal, the

2004 SMPTE Progress Medal, the 2014 Eduard Rhein Prize for Technology,

and the 2015 IET Faraday Medal. He received the Golden Jubilee Award for

Technological Innovation by the IEEE Information Theory Society in 1998.

He was inducted into the Consumer Electronics Hall of Fame, elected into

the Royal Netherlands Academy of Sciences and the (US) National Academy

of Engineering. He received an honorary doctorate from the University of

Johannesburg in 2014. He served the profession as President of the Audio

Engineering Society inc., New York, in 2003.

Kui Cai received her B.E. degree in information

and control engineering from Shanghai Jiao Tong

University, Shanghai, China, and joint Ph.D. degree

in electrical engineering from Technical University

of Eindhoven, The Netherlands, and National Uni-

versity of Singapore. Currently, she is an Associate

Professor with Singapore University of Technology

and Design (SUTD). She received 2008 IEEE Com-

munications Society Best Paper Award in Coding

and Signal Processing for Data Storage. She is

an IEEE senior member, and served as the Vice-

Chair (Academia) of IEEE Communications Society, Data Storage Technical

Committee (DSTC) during 2015 and 2016. Her main research interests are

in the areas of coding theory, information theory, and signal processing for

various data storage systems and digital communications.