Content uploaded by Kees Schouhamer Immink

Author content

All content in this area was uploaded by Kees Schouhamer Immink on Apr 17, 2021

Content may be subject to copyright.

Spectral Shaping Codes

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

Abstract—We investigate a new approach for designing spec-

tral shaping block codes with a target spectrum, Ht(f), that

has been speciﬁed at a plurality of frequencies. We analyze

the probability density function of the spectral power density

function of uncoded n-symbol bipolar codewords. We present

estimates of the redundancy and the spectrum of spectral

shaping codes with speciﬁed target spectral densities Ht(fi)

at frequencies fi. Constructions of low-redundancy codes with

suppressed low-frequency content are presented that compare

favorably with conventional dc-balanced codes currently used in

data transmission and data storage devices with applications in

consumer electronics.

Keywords−spectral shaping block codes, spectral power

density function, dc-free codes, spectral notch codes.

I. INTRODUCTION

Spectral shaping codes, speciﬁcally codes with spectral

nulls, have been applied extensively in digital audio and

video magnetic tape as well as the optical disc recording

systems [1, 2, 3], which are main constituents of consumer

electronics products. In recent years, codes with spectral nulls

at non-zero frequencies have also been proposed for the dedi-

cated servo recording systems [4, 5, 6] in data storage systems

for digital consumer electronics products that are designed for

the ultra-mobile hard-disk drive (HDD) for tablets.

Our paper aims at the system designer who speciﬁes the tar-

get spectrum, denoted by Ht(f), where fis the frequency, at

m,m≥1,spectral points fi,Ht(fi) = di,1≤i≤m, where

di,di≥0, is the desired power spectral density. To realize

the proposed coding scheme, a major technical issue is how to

minimize the coding redundancy introduced into the encoded

sequence while satisfying the desired spectrum. We have

developed theoretical tools for computing the redundancy of

spectral shaping codes and for estimating the spectrum of the

encoded sequence. Our designed low-frequency suppression

codes outperform the prior art dc-balanced codes with lower

redundancy and better spectral shaping. The redundancy of

spectral shaping codes currently used in consumer electronics

devices can be as high as 25 % in the 8B10B code [7] or

10-15 % in the EFM and EFMPlus codes [8]. A lower code

redundancy is welcome as it has an immediate effect on the

device’s capacity, leading to a higher playing time and higher

data throughput.

We start in Section II with relevant background and deﬁni-

tions of spectra and auto-correlation functions of block coded

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),

Science, Mathematics and Technology Cluster, 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 MOE2019-T2-2-123.

signals. In Section III, we analyze the probability density dis-

tribution of the spectral density function and auto-correlation

function of n-bit bipolar sequences. In Sections IV and V,

we present constructive approaches for designing memoryless

block codes having a desired spectrum. In Section V-A, we

brieﬂy review relevant attributes of prior art spectral null

codes, and compare their spectral performance with newly

developed low-frequency rejecting codes. Estimates of the

spectrum are presented in Section VI. Section VII shows our

conclusions.

II. BACKGROU ND ,DEFINITIONS

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

bipolar symbol alphabet Q={−1,1}be a member of a

codebook S ⊆ Qn. The code’s redundancy, denoted by r,

is deﬁned by

r=n−log2|S|,(1)

where |S| denotes the cardinality of S. The encoder emits

codewords from Srandomly and independently (i.i.d.).

We deﬁne the aperiodic auto-correlation function,ρx=

(ρx,1, ρx,2, . . . , ρx,n−1), of the codeword xby

ρx,i =1

n

n−i

X

j=1

xjxj+i,1≤i≤n−1.(2)

It is immediate that ρx=ρ−x, where −x= (−x1,−x2,...,

−xn), denotes the inverse of x, and ρx=ρxr, where xr=

(xn, xn−1, . . . , x1)is the mirror version of x. The spectrum

of the codeword xis deﬁned by

Hx(f) = 1 + 2

n−1

X

i=1

ρx,i cos(i2πf ),(3)

where fdenotes the frequency. Alternatively, we may write [9]

Hx(f) = 1

n

n

X

i=1

xie−ji2πf

2

,(4)

where j = √−1. The auto-correlation function, ρ=

(ρ1, . . . , ρn−1), of the cyclo-stationary process formed by a

sequence of symbols of codewords drawn at random from Sis

the average of the auto-correlation functions of the codewords

xin S, that is [10]

ρi=1

|S| X

x∈S

ρx,i,1≤i≤n−1.(5)

If both xand its inverse, −x, are members of S, and the

words are sent with equal probabilities, then the spectrum of

the emitted symbol sequence is a continuous function [11] and

given by the average of the individual spectra, Hx(f), or

H(f) = 1 + 2

n−1

X

i=1

ρicos(i2πf ) = 1

|S| X

x∈S

Hx(f).(6)

III. PROBABILITY DENSITY FUNCTION OF THE SPECTRAL

CONTENT

As our aim is to construct a code set Swhose codewords

have speciﬁed spectral content at speciﬁed frequencies, we

must, in order to compute the size |S| and redundancy r,

estimate the number of codewords x∈ Qnwith a given power

spectral density at given frequencies.

If we see the generation of a word x∈ Qnas a random

event, then, as (6) assigns to each xa value to Hx(f)∈

THx(f), we conclude that for a speciﬁed frequency f, the

spectral density Hx(f)is a random variable with a discrete

probability density function that depends on both fand n.

Let the probability density function of Hx(f)be denoted by

P r(Hx(f) = ζ).

Clearly, the number of distinct values of Hx(f)for all x∈

Qn, denoted by |THx(f)|, is at most equal to the number of

distinct non-periodic auto-correlation functions ρx. Since the

codewords xrand −x∈ Qnhave the same auto-correlation

function as x, we expect that the number of distinct auto-

correlation functions is around 2n−2. An exact number was

formulated by Whitehead [12], who enumerated the number

of distinct non-periodic auto-correlation functions, ρx, of n-bit

bipolar sequences. For speciﬁc frequencies, f=k/n,kis an

integer, |THx(f=k/n)|is much less than 2n−2. For example,

for the null (f= 0) and the Nyquist (f= 1/2) frequency we

may easily verify that |THx(0)|=|THx(1/2)|=d(n+ 1)/2e.

In general, it is hard to write down such an expression, let

alone to ﬁnd the probability density function P r(Hx(f) =

ζ), and in most cases we must therefore rely on computer

searches.

Although, in general, we do not have exact knowledge of

the probability density function, P r(Hx(f) = ζ), we are able

to formulate simple expressions for its main parameters. In the

next subsections, we analyze the mean and variance of Hx(f)

for all fand n, and the correlation coefﬁcient between the

probability density functions Hx(f=f0)and Hx(f=f1),

where f0and f1are two distinct frequencies 0≤f0, f1≤0.5.

A. Principal parameters of the probability density function

P r(Hx(f) = ζ)

Let E[a(x)] denote the expected value of the variable a(x)

of all possible x∈ Qn. For symmetry reasons, it is immediate

that, see (2), that E[ρx,i]=0,1≤i≤n−1.Using (3) and

(6), we infer that E[Hx(f)] = 1, which is the well-known

result that the mean of the spectral content is independent of

the frequency f(white noise). Below we study the variance

of the spectral power density, which, as we show, does depend

on the frequency.

The (unnormalized) auto-correlation coefﬁcient, nρx,i, is

the sum of the n−ibipolar variables x1xi+1,x2xi+2, . . .,

xn−ixn, see (2), so that nρx,i ∈ {−n+i, −n+i+2, . . . , n−i}.

For j∈ {−n+i, −n+i+ 2, . . . , n −i}we have

P r ρx,i =j

n= 2i−nn−i

n−i+j

2.(7)

For 1≤i, j ≤n−1, we obtain from (2) and the above that

E[ρx,iρx,j ] = n−i

n2, i =j,

0, i 6=j. (8)

The variance of the spectral power density Hx(f), denoted by

σ2

f, is found using (3) and (8), namely

σ2

f=E[(Hx(f)−1)2]

= 4

n−1

X

i=1

Eh(ρx,i cos(i2πf ))2i

=4

n2

n−1

X

i=1

(n−i) cos2(i2πf )

=2

n2

n−1

X

i=1

(n−i){1 + cos(i4πf )}(9)

=n−1

n+2

n2

n−1

X

i=1

(n−i) cos(i4πf ).(10)

(11)

After substituting the trigonometric identity

n−1

X

i=1

(n−i) cos(i2πf ) = −n

2+n2

2F(f),(12)

where

F(f) = sin πnf

nsin πf 2

,(13)

we obtain

σ2

f= 1 −2

n+F(2f).(14)

In case fis a multiple of half the codeword frequency, f=

i/(2n),1≤i≤n−1, we simply ﬁnd F(f=i/(2n)) = 0,

so that

σ2

f=i/(2n)= 1 −2

n.(15)

For f= 0 and f= 1/2, we obtain

σ2

f=0 =σ2

f=1/2= 2 1−1

n.(16)

Figure 1 depicts σ2

fversus ffor n= 16 and 32. Note that for

the major range of f, we have |F(2f)|< n−2, so that, except

for fnear 0 or 1/2, we have

σ2

f≈1−2

n.

The covariance of the spectral power density at frequency

f0and f1, denoted by C(f0, f1), is deﬁned by

C(f0, f1) = E[(Hx(f0)−1)(Hx(f1)−1)].(17)

We ﬁnd, using (8) and (12), that

C(f0, f1)=4

n−1

X

i=1

E[ρ2

x,i] cos(i2πf0) cos(i2πf1)

=2

n2

n−1

X

i=1

(n−i){cos(2πi(f0−f1)) +

+ cos(2πi(f0+f1))}

=2

n2G(f0, f1),(18)

0 0.05 0.1 0.15 0.2 0.25

Frequency f

0.8

1

1.2

1.4

1.6

1.8

2

2

f

n=16

n=32

Fig. 1. Variance of the spectral power density Hx(f),σ2

f, versus

frequency, f, for a word length n= 16 and 32.

0 0.1 0.2 0.3 0.4 0.5

Frequency f

-0.2

0

0.2

0.4

0.6

0.8

1

H(f0,f1)

n=16

n=32

Fig. 2. Pearson correlation coefﬁcient, ρHx(1/4,f1), between the

spectral power densities Hx(1/4) and Hx(f1)versus f1for a word

length n= 16 and n= 32.

where

G(f0, f1) = −n+n2

2{F(f0−f1) + F(f0+f1)}.(19)

The Pearson correlation coefﬁcient [13] between the spectral

power densities at frequency f0and f1, denoted by ρHx(f0,f1),

is given by

ρHx(f0,f1)=C(f0, f1)

σf0σf1

.(20)

Figure 2 shows an illustrative example of the correlation

coefﬁcient ρHx(1/4,f1)versus f1for n= 16 and n= 32.

We infer that if the difference between the two frequencies,

f0and f1, is small, or |f0−f1|<1/n, that the correlation

coefﬁcient is close to unity. For a larger frequency difference,

we have ρHx(f0,f1)≈ −2/n,|f0−f1| 1/n.

The principal parameters of the distribution P r(Hx(f) = ζ)

have been analyzed above. A general expression for the

distribution, however, for all fand ncould not be found.

For our analysis of the redundancy of spectral shaping codes,

it is mandatory to have a simple and reliable model for

P r(Hx(f) = ζ)as it describes the number of sequences of

given spectral density.

B. Exponential distribution function

Rice [14] found that for asymptotically large nthe probabil-

ity density function, P r(Hx(f) = ζ), is independent of fand

given by the (continuous) exponential distribution function (a

χ2-distribution with two degrees of freedom [13])

P r(Hx(f) = ζ) = λe−λζ , ζ ≥0,

0, ζ < 0,(21)

where λis a positive real constant, often called the rate

parameter. Rice’s ﬁndings are based on (4), which can be

written as

Hx(f) = 1

n

n

X

i=1

xisin(i2πf )!2

+ n

X

i=1

xicos(i2πf )!2

.

(22)

For asymptotically large n, the distribution of the sum of the

(co)sine’s converges to a Gaussian distribution according to

the Central Limit Theorem [13]. The sum of the squares of

two stochastic variables with a Gaussian distribution has a

χ2-distribution. Clearly, the χ2-distribution used is an approx-

imation for asymptotically large n, so that a validation of the

accuracy is needed for smaller n.

According to the (assumed) χ2- or exponential distribution

of the spectral density (21), we obtain for the mean, µ0, and

variance, σ2

0,

µ0=1

λand σ2

0=1

λ2.(23)

Note that both mean, µ0, and variance, σ2

0, are independent

of f. We derive, however, in Section III that the mean and

variance of the spectral power density are

E[Hx(f)] = 1

and

EHx(f)−1)2=σ2

f= 1 −2

n+F(2f),

so that, clearly, see (23), the assumption on the expo-

nential distribution is false for ﬁnite nas E[Hx(f)]26=

E(Hx(f)−1)2. In the next subsection, we report on ex-

perimental evaluations of P r(Hx(f) = ζ)for ﬁnite n.

C. Experimental studies regarding the spectral content distri-

bution

A sound way to verify the (in)validity of the χ2- or

exponential distribution, P r(Hx(f) = ζ), for ﬁnite n, is the

measurement of the distribution. For various values of foand

n, we have studied myriad histograms of Hx(f=fo), where

we count the number of observations of Hx(fo)that fall into

each of the Nbin disjoint bins after randomly generating a

large number of codewords x. The ith bin ranges from ibin

to (i+ 1)bin,0≤i≤Nbin , where bin, called bin width,

is a positive real parameter conveniently chosen to cover

the Hx(fo)histogram (horizontal) axis with Nbin bins. In

our experiments, we generate Non-bit codewords, compute

Hx(fo)for each codeword, and increase the jth bin, where

j=bHx(fo)/binc. Let the number of observations in the ith

012345678

H(fo)

-9

-8

-7

-6

-5

-4

-3

-2

-1

0

histogram w

Fig. 3. Histogram of wiversus Hx(fo),n= 64,fo= 7/n, and

bin = 0.03, based on 107observations. The straight line shown is

found using linear regression analysis. The regression estimate equals

ˆ

λ= 1.0021 for the histogram shown.

bin be denoted by Ni,PNi=No, then, we normalize Ni

and deﬁne wiby

wi= ln Ni

binNo

,0≤i≤Nbin,(24)

so that an exponential curve turns into a straight line.

Figure 3 shows a plot of the histogram wiversus Hx(fo)

for bin = 0.03,n= 100 and fo= 7/n. Using standard

linear regression analysis [13], we obtain the least squares

estimate, denoted by ˆ

λ, of the rate parameter λ, using the

pairs (i+1

2bin, wi)for the Nbin bins. An example of the

straight regression line obtained is shown in Figure 3. The

regression estimate equals ˆ

λ= 1.0021. We have evaluated the

distribution at various frequencies and codeword lengths, and

found that λis sufﬁciently close to unity for our engineering

applications. In the next section, we study the focal point of

our paper, the feasibility of spectral shaping by a judicious

choice of the codebook S.

IV. SEL EC TI NG T HE C OD EW OR DS

Let the target spectrum, denoted by Ht(f), be speciﬁed at

mspectral points, Ht(fi) = di,1≤i≤m. We compute the

spectrum, Hx(f), of each possible n-bit word x∈ Qn, and

select those x’s for which each mspeciﬁed Hx(fi)’s lie within

a judiciously chosen acceptance interval [p1, p2]i,1≤i≤m.

In case Qnis too large for generating all the n-bit words, we

randomly draw words from Qn.

A. Selection criterion

Let the acceptance interval length be independent of di, then

S={x:|di−Hx(fi)|< δ, 1≤i≤m},(25)

where the (real) parameter, δ,0< δ 1, called tolerance

level, is a designer’s choice. We assume that the differences

between the spectral points, fi, are at least 1/n, so that the

dependence between the Hx(fi)’s can be neglected. Then,

0 0.5 1 1.5 2

d

2.5

3

3.5

4

4.5

5

5.5

redundancy

measured

computed

Fig. 4. Redundancy ˆr1(d), computed using (27), and redundancy,

r1(d), measured using exhaustive search for a single spectral point,

m= 1, at f= 9/n versus d1=d, for n= 32 and δ= 0.1.

following (21), where for convenience we choose λ= 1, the

number of accepted codewords, |ˆ

S|, can be estimated by

|ˆ

S| = 2nZd1+δ

x=max(0,d1−δ)

e−xdx ·· ·Zdm+δ

x=max(0,dm−δ)

e−xdx,

(26)

so that, for di> δ, the estimated redundancy, denoted by ˆr1,

see (1), equals

ˆr1=n−log2|ˆ

S| =−mlog2(eδ−e−δ)+log2(e)

m

X

i=1

di,(27)

which shows a simple linear relationship between the target

spectral content, di, and redundancy ˆr1. Figure 4 displays

for m= 1 the estimated, ˆr1, using (27), and the measured

redundancy, r1, using selection criterion (25), versus d=d1

for n= 32,f1= 9/n, and δ= 0.1. We notice a nice agree-

ment between the two curves, less than a percent difference,

which supports Rice’s exponential distribution approximation

presented in Subsection III-B.

It is unsatisfactory, see (27) and Figure 4, that with selection

criterion (25) for the target power spectral density di= 1 a

redundancy is required of around 3.7 bits (δ= 0.1), as, clearly,

di= 1 is the average power density of uncoded sequences, and

redundancy is thus a waste. Secondly, the redundancy depends

on an arbitrarily chosen value of the parameter δ. Therefore,

we propose an alternative criterion without such ﬂaws.

B. Alternative selection criterion

We present an alternative selection criterion, where the

acceptance interval depends on the desired spectral power

density, di, in such a way that both the average spectral density

in the interval [p1, p2]equals the target value di, that is,

I1(p1, p2) = Rp2

x=p1xe−xdx

Rp2

x=p1e−xdx =di,(28)

and the redundancy

I2(p1, p2) = −log2Zp2

x=p1

e−xdx (29)

is minimized. Minimizing the redundancy I2(p1, p2)is accom-

plished by choosing p1= 0 or p2=∞. Then we have either

0≤I1(0, p2)≤1or 1≤I1(p1,∞)≤1 + p1. In case di≥1,

we select the acceptance interval [ˆp1,∞], such that

I1(p1= ˆp1,∞) = e−ˆp1(1 + ˆp1)

e−ˆp1=di,

or simply

ˆp1=di−1.(30)

In case di<1, we choose the acceptance interval [0,ˆp2], such

that ˆp2satisﬁes the equation

I1(0, p2= ˆp2) = 1−e−ˆp2(1 + ˆp2)

1−e−ˆp2=di.(31)

We may ﬁnd ˆp2by numerically solving (31). In summary, we

accept a word xif its spectral contents Hx(fi),i= 1, . . . , m,

are within the interval

[p1, p2]i=[di−1,∞], di≥1,

[0,ˆp2], di<1,(32)

where ˆp2satisﬁes (31). Clearly, for di= 1, we have

[p1, p2] = [0,∞]and may accept all available words, so that

the redundancy is nil. The estimated redundancy, denoted by

ˆr2(di), for a single spectral point at the spectral level diequals,

see (29),

ˆr2(di) = −log2e−ˆp1= (di−1) log2e, di≥1,

−log2(1 −e−ˆp2), di<1.(33)

The accumulated redundancy for mspectral points at level di,

1,≤i≤m, assuming independence, denoted by ˆr2, equals

ˆr2=

m

X

i=1

ˆr2(di).(34)

Clearly, criterion (32) leans heavily on the validity of the

exponential distribution premise (21), and a further validation

by measurement is necessary. Figure 5 shows results for a

single spectral point, m= 1, the redundancy ˆr2, computed

using (33) and r2, measured, versus spectral density d=d1

with the parameters n= 32 and f1= 9/n. The diagram

shows a good agreement between the computed and measured

redundancy.

Our designed spectrum shaping codes can be easily im-

plemented on various consumer electronics devices, such as

magnetic tape and other data storage products such as ultra-

mobile HDDs [3, 4, 5, 6]. The above described code designs

and constructions are all done off-line, and once the codes are

designed, the encoder and decoder can be implemented based

on simple look-up tables. Therefore, our codes are suitable for

efﬁcient hardware implementations in practical devices.

V. SPECTRUM SHAPING

As a ﬁrst illustration of the sought for spectral shaping

effect, Figure 6 shows the power density function, H(f),

versus frequency ffor two cases. The ﬁrst plot, Curve (a)

shows the case f1= 1.5/n,d1= 1.5and Curve (b) shows

the case f1= 2.5/n,d1= 0.1. For both spectra, we have

n= 32 and m= 1. Curve (a) shows a peak d1= 1.5at

f1= 1.5/n, while Curve (b) shows a notch of depth d= 0.1

0 0.5 1 1.5 2

d

0

0.5

1

1.5

2

2.5

redundancy

computed

measured

Fig. 5. Computed redundancy, ˆr2(d), using (33), and measured

redundancy, r2(d), versus dfor n= 32 and f1= 9/n.

0 0.05 0.1 0.15

Frequency f

0

0.5

1

1.5

Spectrum H(f)

(b)

(a)

Fig. 6. Power density function, H(f), versus frequency fof two

cases: (a) f1= 1.5/n,d1= 1.5and the second case (b) f1= 2.5/n,

d1= 0.1,n= 32,m= 1.

at f1= 2.5/n. The measured redundancy equals r2= 0.72

for the ﬁrst case and r2= 2.4for the second case.

As a second illustration, Figure 7, Curve ’measured’, shows,

for n= 32,m= 3 spectral points at f1= 2/n,f2= 3/n, and

f3= 4/n. The target spectral density of the mspectral points

is ﬁxed, di= 0.1,1≤i≤3, so that the target spectrum

is shaped as the response of a band stop ﬁlter. The second

curve, Curve ’computed’, shows a computed spectrum using

the theory developed in Section VI, and we conclude that

the measured spectrum is in concordance with the computed

spectrum. The estimated redundancy ˆr2, see (34), equals 7.24,

and the measured redundancy equals r2= 7.63, which is close

to the estimated one.

The ringing artifacts seen in the above diagram are due

to the well-known Gibbs phenomenon. The ringing can be

reduced by taking a larger value of mand closer spaced

spectral points fi. Figure 8 shows for the same parameters

as above a band stop with m= 5 spectral points at f1= 2/n,

f2= 2.5/n,f3= 3/n,f4= 3.5/n, and f5= 4/n,di= 0.1,

i= 1,...,5. The choice for a smoother spectrum has a

0 0.1 0.2 0.3 0.4 0.5

Frequency f

0

0.2

0.4

0.6

0.8

1

1.2

1.4

Spectrum H(f)

measured

computed

Fig. 7. Power density function, H(f), versus frequency fof (label:

measured) selected codewords of length n= 32 with spectral points

at fi= 2/n, 3/n, 4/n,di= 0.1,i= 1,2,3, and (label: computed)

spectrum for the same parameters computed using (44) and (54).

0 0.1 0.2 0.3 0.4 0.5

Frequency f

0

0.2

0.4

0.6

0.8

1

1.2

1.4

Spectrum H(f)

(a)

(b)

Fig. 8. Power density function, H(f), versus frequency fof (a)

selected codewords of length n= 32 with m= 5 spectral points at

fi= 2/n, 2.5/n, 3/n, 3.5/n, 4/n,di= 0.1,i= 1,...,5, and (b)

spectrum for the same parameters computed using (44).

bearing on the code redundancy as the measured redundance

is r2= 9.2, which is slightly larger than in the previous case

m= 3.

A. Spectral null codes

Spectral null codes have been applied in a myriad practical

communication [15] and data storage systems [2, 3, 4, 5, 6]. In

this section, we analyze the difference in spectral performance

and redundancy of the newly developed spectral shaping codes

and prior art dc-balanced codes having a null at dc, f= 0.

1) Conventional balanced codes, null at f= 0:Conven-

tional dc-balanced block codes have codewords with equal

numbers of 1’s and -1’s, so that, clearly, nis even. Efﬁcient

methods for encoding and decoding dc-balanced codes have

been developed by Knuth [16]. The spectrum of a conventional

dc-balanced code is given by [17]

Hdc(f) = n

n−1{1−F(f)}.(35)

The redundancy of an n-bit dc-balanced code using Knuth’s

implementation equals [16]

rdc ≈log2n, n 1.(36)

0 0.05 0.1 0.15

Frequency f

0

0.2

0.4

0.6

0.8

1

1.2

1.4

Spectrum H(f)

m=4

m=2

Fig. 9. Power density function, H(f), versus frequency fof encoded

sequences for d= 0.1,m= 2,m= 4 spectral points and word

length n= 32, both computed and measured.

In the next section, we study an alternative to dc-balanced

codes, namely spectral shaping codes that suppress the spectral

power density in the low-frequency (LF) range.

B. New codes with low-frequency suppression

In order to suppress LF spectral components, we specify m

spectral power points by

Htfi=2i−1

2n=d, i = 1, . . . , m, (37)

where the target spectral content dis sufﬁciently small for

the application at hand. As an illustration of the spectral

performance of the new spectral shaping codes, we have

plotted in Figure 9, for m= 2 and m= 4 spectral points, the

measured spectrum, H(f), versus frequency ffor d= 0.1and

n= 32. The spectra are computed using (54) and measured

after a search using codeword selection criterion (32). The

estimated redundancy of the new codes with mspectral points,

all at the same spectral level d, denoted by ˆrn, equals, see (34),

rn=mˆr2(d). For m= 2 and m= 4, respectively we ﬁnd

rn= 4.83 and rn= 9.66. The measured redundancy is slightly

higher, namely 4.98 and 10.32, respectively.

C. Performance evaluation of codes with suppressed low-

frequency content

The spectral performance of dc-balanced codes is mea-

sured by the width of the spectral notch, called the cut-off

frequency [18, 19]. The cut-off frequency, denoted by fc, is

deﬁned by [19]

H(fc) = 1

2.(38)

For conventional dc-balanced codes we may numerically solve

(38) using (35). Using a Taylor series approximation of (35),

we obtain the useful approximation [20]

fc≈adc

n, n 1,(39)

0 0.05 0.1 0.15

Frequency f

0

0.2

0.4

0.6

0.8

1

1.2

1.4

Spectrum H(f)

d=0.2

d=0.1

Fig. 10. Spectra of the new LF-suppressing codes with m= 4 spectral

points at level d= 0.1or d= 0.2for a word length n= 32 and

number of spectral points m= 4.

0 0.02 0.04 0.06 0.08 0.1

Frequency f

0

0.2

0.4

0.6

0.8

1

1.2

Spectrum H(f)

dc-balenced

new

Fig. 11. Low-frequency spectra of a conventional dc-balanced code,

n= 32, and a new code, n= 32,m= 2, and d= 0.1

computed using (35) and (54). The redundancy of both schemes is

approximately equal.

where

adc =p6−3√2

π≈0.422.(40)

We have evaluated the spectral notch width fcusing deﬁnition

(38) of the newly developed codes with low-frequency sup-

pression, whose spectrum is given by (54). The notch width,

fc, depends on the number of spectral points m, the choice of

the frequencies fi, and the spectral depth d. We found that the

spectral width hardly depends on the the notch depth d. As an

example, we plotted the spectra, see Figure 10, of a spectral

notch depth at d= 0.1and at d= 0.2(both for n= 32

and m= 4). We found that the notch width is for d < 0.2

independent of the notch depth d, and approximately given by

fc≈m−1/2 + adc

n.(41)

Figure 11 compares the low-frequency spectra of conventional

dc-balanced code, n= 32, and new code n= 32,m= 2, and

d= 0.1. The spectral notch of the new code is a factor of 4.5

wider than that of the conventional dc-balanced code, where

it should be appreciated that the redundancy of both schemes

is approximately equal, rdc = 5 ≈ˆr2= 4.98.

VI. ES TI MATE D SP EC TR A

In this section, we analyze the spectrum of encoded se-

quences deﬁned by a single or multiple prescribed spectral

points fiat spectral depth di.

A. Estimate of the spectrum with multiple spectral points

The estimated auto-correlation function corresponding with

a spectrum with multiple, m, spectral points, f=fj,1≤j≤

mis [3]

ˆρi=

m

X

j=1

γj(n−i) cos(2πifj),1≤i≤n−1,(42)

where γjare mreal constants to be determined below. The

corresponding power density function, H(f), is given by, see

(6),

H(f) = 1 + 2

n−1

X

i=1

ˆρicos(i2πf)

= 1 + 2

m

X

j=1

γj

n−1

X

i=1

(n−i) cos(2πifj) cos(2πif )

= 1 +

m

X

j=1

γj

n−1

X

i=1

(n−i){cos(2πi(f−fj)) +

+ cos(2πi(f+fj))}.(43)

After applying (19), we obtain

H(f) = 1 +

m

X

j=1

γjG(fj, f ).(44)

Since H(fj) = dj, we obtain a linear system of equations in

the munknown variables, γi,i= 1, . . . , m,

m

X

j=1

γjG(fj, fi) = di−1.(45)

Deﬁne the column vectors

γ= [γ1, . . . , γm]Tand d= [d1−1, . . . , dm−1]T,(46)

and the m×mmatrix Aby its elements Ai,j =G(fi, fj),1≤

i, j, m. Then for (45) we obtain the short-hand notation

Aγ=d.(47)

The matrix Ais symmetric as G(fi, fj) = G(fj, fi)for

all indices iand j. The solution of the above linear system

is straightforwardly accomplished using numerical methods.

Some special cases are amenable to analysis.

B. Case fi=ki/n and fi= (ki−1/2)/n

Let the m,2m<n, speciﬁed spectral points be rational,

fi=ki/n, where the integer ki∈Vm⊆ {1,...,dn/2e − 1},

(that is, excluding the zero, f= 0, and Nyquist frequency,

f= 1/2) then in (19) we have F(fi)=0. Alternatively, if the

m,2m<n, spectral,points are given by fi= (2ki−1)/(2n),

ki∈Vmthen, clearly, in (19) we have F(fi1∓fi2)=0,

i16=i2. In both cases we obtain

A=a1I+a2U,(48)

where Iand Udenote the identity and all-one matrix, respec-

tively, and

a1=n2

2and a2=−n. (49)

We have

γ=A−1d,(50)

where

A−1=c1I+c2U,(51)

where

c1=1

a1

and c2=−a2

a1(a1+ma2).(52)

Let di=dfor i= 1, . . . , m, then, after substituting (49), we

obtain

γi=γ=d−1

a1+ma2

=2(d−1)

n(n−2m),1≤i≤m. (53)

After working out (44) and (53), we obtain the LF-suppressed,

‘brick-wall’ shaped, spectrum Hbw(f), shown in Figures 9

and 11:

Hbw(f) = 1 + γ

m

X

i=1

G(fi, f ).(54)

The spectrum Hbw(f)agrees nicely with the measured one,

as can be seen in Figure 9.

VII. CONCLUSIONS

We have presented a new approach for designing spectral

shaping codes. We analyzed the probability distribution of the

spectral power density and auto-correlation coefﬁcients of un-

coded bipolar sequences. Based on a simple exponential prob-

ability distribution assumption of the spectral power density,

we have given estimates of the redundancy of spectral shaping

codes. We have investigated codes with a wide frequency range

of suppressed power density. The frequency range is ﬂexible

and can be better suited by the designer. Constructions of low-

redundancy codes with suppressed low-frequency content have

been presented that compare favorably with conventional dc-

balanced codes currently used in data transmission and data

storage devices applied in consumer electronics.

REFERENCES

[1] J. Lee and K. A. S Immink, “DC-free Multimode Code Design Using

Novel Selection Criteria for Optical Recording Systems”, IEEE Trans.

on Consumer Electronics, vol. CE-55, no. 2, pp. 553-559, May 2009,

doi: 10.1109/TCE.2009.5174421.

[2] J. A. H. Kahlman and K. A. S. Immink, “Channel Code with Em-

bedded Pilot Tracking Tones for DVCR,” IEEE Transactions on Con-

sumer Electronics, vol. CE-41, no. 1, pp. 180-185, Feb. 1995, doi:

10.1109/30.370325.

[3] K. A. S. Immink, “Spectral Null Codes,” IEEE Transactions on

Magnetics, vol. MAG-26, no. 2, pp. 1130-1135, March 1990. doi:

10.1109/20.106515.

[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 Transactions on Magnetics, vol. MAG-51, no. 10, pp.

1-5, Oct. 2015, doi: 10.1109/TMAG.2015.2456851.

[5] K. Cai, K. A. S. Immink, M. Zhang, and R. Zhao, “On the design of

spectrum shaping codes for high-density data storage,” Transactions on

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

10.1109/TCE.2017.015067.

[6] 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, pp.

1-7, April 2015, doi: 10.1109/TMAG.2014.2354379.

[7] A. X. Widmer and P. A. Franaszek, “A Dc-balanced, Partitioned-Block,

8B/10B Transmission Code,” IBM J. Res. Develop., vol. 27, no. 5, pp.

440-451, Sept. 1983, doi: 10.1147/rd.275.0440.

[8] K. A. S. Immink, “A Survey of Codes for Optical Disk Recording,”

IEEE J. Select. Areas Communications, vol. 19, no. 4, pp. 756-764,

April 2001, doi: 10.1109/49.920183

[9] E. Gorog, “Redundant Alphabets with Desirable Frequency Spectrum

Properties,” IBM J. Res. Develop., vol. 12, no. 3, pp. 234-241, May

1968, doi: 10.1147/rd.123.0234.

[10] G. L. Cariolaro and G. P. Tronca, “Spectra of Block Coded Digital

Signals,” IEEE Transactions on Communications, vol. COM-22, no. 10,

pp. 1555-1563, Oct. 1974, doi: 10.1109/TCOM.1974.1092094.

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

Syst. Tech. J., vol. 51, pp. 921-932, April 1972, doi: 10.1002/j.1538-

7305.1972.tb01953.x.

[12] E. G. Whitehead, “Autocorrelation of (+1,-1) sequences,” Combinatorial

Mathematics, pp. 329-336, 2006.

[13] R. V. Hogg and A. T. Craig, Introduction to Mathematical Statistics, 5th

ed. New York: Macmillan, 1995.

[14] S. O. Rice, “Mathematical Analysis of Random Noise,” Bell Sys-

tem Technical Journal, vol. 23, no. 3, pp. 282-332, July 1944, doi:

10.1002/j.1538-7305.1944.tb00874.x.

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

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

[16] D. E. Knuth, “Efﬁcient Balanced Codes,” IEEE Transactions on

Information Theory, vol. IT-32, no. 1, pp. 51-53, Jan. 1986, doi:

10.1109/TIT.1986.1057136

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

without DC,” IEEE Transactions on Communications, vol. COM-20, no.

6, pp. 1182-1184, Dec. 1972, doi: 10.1109/TCOM.1972.1091308.

[18] K. Balasubramanian, S. Agili and A. Morales, “Investigating the new

64b/66b encoding scheme’s power spectral density,” 2011 IEEE Inter-

national Conference on Consumer Electronics (ICCE), Las Vegas, NV,

pp. 377-378, 2011, doi: 10.1109/ICCE.2011.5722636.

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

IEEE Transactions on Information Theory, vol. IT-28, no. 3, pp. 457-

472, May 1982, doi: 10.1109/TIT.1982.1056516.

[20] K. A. S. Immink, “Performance of Simple Binary DC-constrained

Codes,” Philips J. Res., vol. 40, no. 1, pp. 1-21, Jan. 1985.

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

founded Turing Machines Inc., an innovative start-

up focused on novel signal processing for DNA-

based storage, where he currently holds the position

of president. Among the accolades received are a

personal Emmy award in 2004, the 2017 IEEE

Medal of Honor, the 1999 AES Gold Medal, the

IEEE Masaru Ibuka Consumer Electronics Award,

the 2004 SMPTE Progress Medal, and the 2015 IET

Faraday Medal. He was inducted into the Consumer

Electronics Hall of Fame and the (US) National

Academy of Engineering.

Kui Cai (M’07-SM’10) 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 Techni-

cal University of Eindhoven, The Netherlands, and

National University of Singapore. Currently, she is

an Associate Professor with Singapore University of

Technology and Design (SUTD). She received 2008

IEEE Communications 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.