Content uploaded by Kees Schouhamer Immink

Author content

All content in this area was uploaded by Kees Schouhamer Immink on Jul 31, 2020

Content may be subject to copyright.

Block Codes for Energy-Harvesting

Sliding-Window Constrained Channels

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

Abstract—Energy-harvesting sliding-window constrained block

codes guarantee that within any prescribed window of `con-

secutive bits the constrained sequence has at least t,t≥1, 1’s.

Prior art code design methods build upon the ﬁnite-state machine

description of the (`, t)constraint, but as the number of states

equals `choose t, a code design becomes prohibitively complex

for mounting `and t. We present a new block code construction

that circumvents the enumeration of codewords using a ﬁnite-

state description of the (`, t)-constraint. The codewords of the

block code are encoded and decoded using a single look-up table.

For (`= 4, t = 2), the new block codes are maximal, that is, they

have the largest possible number of codewords for its parameters.

Keywords−energy harvesting sliding-window constrained

code, constrained code, code design, binary block code, code

construction.

I. INTRODUCTION

Not all electronic devices connected to the Internet of

Things (IoT) have back-up batteries or are connected to the

power cable. These self-contained devices must rely on the

harvesting of the signal’s energy sent by a transmitter [1, 2].

Binary data communication systems may emit 0’s and 1’s,

where it is assumed that only the 1’s carry the energy. In

order to carry sufﬁcient energy, a minimal and/or maximal

number of 1’s in transmitted sequences is required within a

prescribed time span. In the wireless infrared channel, IrDA-

VFlr, the relative number of 1’s, called duty cycle, must be

bounded between a minimum and maximum number [3]. A

binary sequence is said to obey the (`, t)-constraint if the

number of 1’s within any window of `consecutive bits of

that sequence is at least t,t < `, where tis an integer called

threshold. The (`, t)constraint is described by a ﬁnite-state

machine (FSM) source with K=`

tstates and a K×K

transition matrix D`,t [4, 5, 6].

An (`, t)constrained code translates a series of m-bit user

words into a series of n-bit codewords, n > m, that obeys

the (`, t)constraint. Prior art systematic code design methods,

such as Freiman and Wyner’s optimum block code design [7],

Franaszek’s successive state elimination procedure [8], the

state-splitting procedure [9], or the variable-length constrained

code construction [2, 10, 11], use the n-step FSM description

for enumerating codewords.

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 MOE2016-T2-2-054.

These systematic design methods, as outlined in [6], run out

of steam for larger values of `and tas the crucial K×K

n-step transition matrix Dn

`,t becomes too large to handle.

For example, for (`= 30, t = 15) the K-th order matrix,

Dn

`,t, requires around 2×1016 elements, and, evidently, a

Dn

`,t-based code design is impractical for mounting `and t.

It is a desideratum to design (`, t)-constrained codes with

larger values of `and tthan is possible with the prior art

constructions. In this paper, we present an alternative code

design that circumvents the usage of an FSM description of

the (`, t)-constraint, so avoiding the computation of the n-step

transition matrix Dn

`,t.

The main contributions of the paper are as follows.

•We present a general design method for constructing (`, t)-

constrained block codes.

•The design method does not require the n-step transition

matrix Dn

`,t, so that we may construct codes for large values

of `and t, where prior art construction methods cannot be

used.

•Examples of new codes are presented.

•We assess the rate efﬁciency of codes based on the new

construction, and show that (4,2)-constrained block codes are

maximal, that is, they have the largest possible number of

codewords for its parameters.

The paper is organized as follows. We describe deﬁnitions

and background in Section II, followed by Section III, where

we present a new method for constructing block codes. The

efﬁciency of the codes constructed by the new method is

assessed in Sections IV and V. Section VI furnishes the

conclusions of our paper.

II. DE FIN IT IONS AND BACKGRO UN D

Let xbe an `-bit word x= (x1, x2, . . . , x`)over the

binary symbol alphabet xi∈B,B={0,1}, and let the

weight w(x) = P`

i=1 xibe the number of 1’s in x. Let

(y1, y2, . . . , yn)be a binary sequence of length n,n≥`. A

sequence (y1, y2, . . . , yn)is said to be sliding-window energy

(`, t)-constrained if for all 1≤i≤n−`+ 1 the weight

of the `-bit sliding window, w(yi,...yi+`−1)≥t, where t,

1≤t≤`, is a positive integer.

The (`, t)-constrained channel can be modelled by a K-state

source [6], K=`

t, whose states are denoted by σi∈Σ,

1≤i≤K, where Σdenotes the state set. The states are

uniquely labelled with `-bit words of weight t, which are

assigned according to their lexicographical rank to the K

states, σ1, . . . , σK. The K×Ktransition matrix D`,t whose

elements di,j ∈Brepresent a possible transition from state

σito state σj. If a transition is admissible then di,j = 1 and

σ1

0011

σ2

0101

σ3

0110

σ4

1001

σ5

1010

σ6

1100

1

0

1

01

0

1

1 1

1

Fig. 1. Labelled directed graph describing the (`= 4, t = 2)

constraint. Taken from [6].

zero otherwise. Let, for example, `= 4 and t= 2, then we

have K= 6 4-bit words of weight t= 2, namely (0,0,1,1),

(0,1,0,1), (0,1,1,0), (1,0,0,1), (1,0,1,0), and (1,1,0,0). The 6×6

transition matrix is [6]

D4,2=

101000

100010

010001

100000

010000

000100

.(1)

Figure 1 shows a graphical description, called labelled directed

graph, of the (4,2) constraint. Hopping from state to state,

following the arrows and reading off the labels attached to the

arrows, produces a (4,2)-constrained sequence.

The (information) capacity of the FSM data source equals

C(`, t) = log2λ, (2)

where λequals the largest (real) root of [12]

det[D`,t −zI]=0,(3)

where Idenotes the K×Kidentity matrix and det denotes

the determinant of a matrix. If expanded out, the determinant

is a K-th degree polynomial in z. For the case `= 4 and

t= 2, we ﬁnd, using (1), that

det[D4,2−zI] = z6−z5−z4−z2+ 1 = 0.(4)

Solving the above equation numerically, we ﬁnd λ≈1.7143

and C(4,2) = log2λ≈0.778. Algebraically solving the

determinant (3) is not attractive in case Kis very large as

the storage requirement scales with K2. A slight modiﬁcation

of the power iteration method [13], on the other hand, ﬁnds

the largest eigenvalue of the sparse matrix D`,t with a storage

of order K. More numerical results of C(`, t)can be found

in [6, Table I].

In the next section, we present a simple method for design-

ing (`, t)-constrained codes, named Construction I. The new

construction is valid for all values of `and t, and it does not

require the evaluation of the n-step transition matrix Dn

`,t.

III. BLOCK CODE CONSTRUCTION

In this section, we present a new construction technique for

designing binary (`, t)-constrained block codes that comprise

a single look-up table for encoding user data into a series of

(`, t)-constrained codewords.

The stream of source data is delivered in packets of mbits

that are translated by the encoder, using a single look-up table,

into n-bit codewords, n > m, that are cascaded, serialized,

and transmitted. A concatenation of arbitrary codewords

produces an admissible (`, t)sequence. The decoder

uniquely translates the n-bit codewords, without knowledge

of past or future codewords, into the original msource

words. In our analysis and code construction, it is assumed

that the codeword length nis larger than the window `,n≥`.

Deﬁnition 1 l-constraint: A binary sequence y=

(y1, y2, . . . , yn)satisﬁes the l-constraint, where lis a

positive integer, l > t, if w(y1, y2, . . . , yl)≥t, that is the l

leading bits have a weight at least t.

Deﬁnition 2 r-constraint: A binary sequence y=

(y1, y2, . . . , yn)satisﬁes the r-constraint, where ris a

positive integer, r > t, if w(yn−r+1, yn−r+2 , . . . , yn)≥t,

that is the rtrailing bits have a weight at least t.

We are now in the position to present the code construction,

where admissible codewords are selected that can be cascaded.

Construction I: Deﬁne l=b(`+t)/2cand r=d(`+t)/2e.

Thus, l=rif `+tis even, and l=r−1if `+tis odd. Let Sbe

the set of (`, t)-constrained codewords of length n,n≥`, that

satisfy both the l- and r-constraints. The set of codewords, S,

has the property that no concatenation of codewords violates

the (`, t)channel constraint. The codewords themselves obey,

by deﬁnition, the (`, t)constraint, and at the junction of two

codewords the imposed l- and r-constraints guarantee the

(`, t)constraint. If the size of S, denoted by |S|, is at least

2m, we may deﬁne a bijective map, {0,1}m {0,1}n,

between the m-bit source words and a subset of size 2mof

the n-bit codewords, S. The map is embodied by a single

look-up table of size 2m.

We experimented with Construction I for a variety of values

of the parameters `, t, m, and n. For small K(not shown),

we found the same codes as presented in the literature [6,

Table III]. For example, for `= 4 and t= 2 we ﬁnd

2153 (4,2)-constrained 15-bit codewords that satisfy both the

l=r= 3 constraints, so that we can construct a (4,2)-

constrained block code of rate 11/15, see also Section V,

where we shall take a closer look. A survey of block codes

found after applying Construction I, is shown in Table I, where

prior art design methods could not be applied. The parameter

η= (m/n)/C(`, t)deﬁnes the rate efﬁciency of the code.

Note that the capacity C(30,15) could not be evaluated due

to its excessive memory requirements.

A natural question that may arise regards the efﬁciency of

the new codes constructed. Does, for example, the construction

TABLE I

PARA MET ER S OF BL OC K COD ES F OR A SE LE CTI ON O F `AND tVALU ES .

THE I NT EGE RS mAN D nDE NOT E THE S OU RCE W ORD A ND C ODE WO RD

LE NGT H,RESP ECT IV ELY.K=`

tIS T HE NU MB ER OF S TATES AN D

η= (m/n)/C(`, t)I S THE R ATE EFFI CI ENC Y.

` t K m n η

16 8 12,870 16 20 0.879

17 11 12,376 12 19 0.819

20 15 15,504 13 26 0.792

23 15 490,314 16 25 0.810

26 16 5,311,735 22 31 0.843

28 16 30,421,755 22 29 0.852

30 15 155,117,520 26 31 −

deliver codes whose efﬁciency is close to that of a maximal

code or close to capacity?

IV. MAXIMUM-SIZE BLOCK CODE DESIGN

Prior to the assessment of the efﬁciency of Construction I

in Section V, we discuss transition-matrix-based block code

design. Such a design starts with setting up the n-step K-

state labelled graph with state set Σthat describes the (`, t)

constraint, see Section II. Let the terminal state set Σ∗⊆Σ

denote a subset of the state set Σ, and let σi, σj∈Σ∗, and let

Si,j denote the set of admissible n-bit words that start in σi

and terminate in σj. The set of codewords that emerge from

σi∈Σ∗and terminate in one of the states σj∈Σ∗, denoted

by Fi, is deﬁned by

Fi,[

j:σj∈Σ∗

Si,j , i :σi∈Σ∗.(5)

Let

SΣ∗,\

i:σi∈Σ∗

Fi(6)

denote the intersection of the |Σ∗|sets of codewords Fi. The

set SΣ∗consists of admissible codewords that can start and

terminate in any of the states in Σ∗. A single look-up table

for encoding and decoding is possible if

|SΣ∗| ≥ 2m.(7)

If (7) is satisﬁed, the codewords in SΣ∗can be uniquely

assigned to the 2msource words. A code with the largest

possible set of codewords for its parameters is called a

maximal code; the maximal code size is denoted by ˆ

N`,t(n).

A maximal code is deﬁned by the optimal state set, denoted

by ˆ

Σ, which is deﬁned by

ˆ

Σ = arg max

Σ∗

\

i:σi∈Σ∗[

j:σj∈Σ∗

Si,j

.(8)

Equation (8) involves the generation of sets of n-bit admissible

codewords, Si,j, and computing the union and intersection of

these sets for all possible 2K−1state subsets Σ∗, which is a

colossal operation for increasing `and t.

It was shown by Freiman and Wyner [7], however, that it

is not necessary to consider all possible state subsets Σ∗.

They showed that it is sufﬁcient to consider state subsets,

called complete terminal sets. Deﬁne the partial ordering

‘≺’ on the states: that is, σi≺σj, if every n-bit word

admissible from σiis also admissible from σj, in other words,

if ∪k:σk∈ΣSi,k ⊆ ∪k:σk∈ΣSj,k. A set of states Σ0is a complete

terminal set if σi∈Σ0,σi≺σj⇒σj∈Σ0. The partial

state ordering can be conveniently visualized by a Hasse

diagram, which helps to divide the state set Σinto a number

of smaller complete terminal sets. As a result, the number of

combinations of subsets Σ∗that has to be considered in ﬁnding

the optimal state subset ˆ

Σcan often be signiﬁcantly reduced.

But, also Freiman and Wyner’s method, although its search

space is much smaller than that of the exhaustive search (8),

rapidly becomes too complex to handle for increasing `and t.

This leaves a designer empty-handed for relevant choices of `

and t.

V. AS SE SS MENT OF CONSTRUCTION I

For the efﬁciency assessment of Construction I, we exploit

generating functions [14] based on the FSM for enumerating

the number of n-bit binary constrained sequences. Note that

we only need the model for the assessment as it is not required

for the code construction per se.

We deﬁne the generating function [15]

G(z),Xgizi,(9)

where zis a dummy variable. Let the operation [zn]G(z)

denote the extraction of the coefﬁcient of znin the formal

power series G(z), that is, deﬁne

[zn]G(z),[zn]Xgizi=gn.(10)

Let the elements, hi,j (z), of the K×Kmatrix H(z)denote

the generating function of the number of distinct sequences

of length nstarting in state σiand ending in σj. Using the

transfer-matrix method [14], we obtain

H(z) = (I−zD`,t )−1.(11)

In other words,

hi,j (z)=∆j,i/∆,(12)

where ∆ = det[I−zD`,t ]and ∆j,i is the j, i-th cofactor of

[I−zD`,t ].

The number of n-bit codewords that satisfy the l=b(`+

t)/2c,r=d(`+t)/2e, and (`, t)constraints available with

Construction I, denoted by N`,t(n), can be found by evaluating

the generating function

N`,t(n)=[zn]

q

X

j=1

hq,j (z),(13)

where

q=l

t,(14)

since the Kstates are labelled with the `-bit words of weight

tin lexicographical order, see Section II.

A. Special cases

Below we discuss properties of Construction I-based codes

for special cases of `and t.

1) Case t=`−1:The (`, t =`−1) constraint is in the

data storage world [16] also known as a minimum runlength

constraint, or d-constraint, where d=tdenotes the minimum

zero runlength. Freiman and Wyner [7] presented maximal

block codes whose codewords start with at least tone’s; only

n−tbits of the codeword require (de)coding.

2) Case t= 1:Codes with a maximum runlength of

0’s, or k-constraint, where kdenotes the maximum zero

runlength, have found widespread application in data storage

devices [16]. Note that an (`=k+ 1, t = 1)-constrained

sequence can be obtained by inverting the binary symbols

of a k-constrained sequence. Freiman and Wyner [7] and

Blake [17] showed that a k-constrained block code based on

Construction I is maximal.

3) Case `= 4, t = 2:For the case `= 4 and t= 2, we

ﬁnd, using (8), that the maximizing state subset equals ˆ

Σ =

{σ1, σ2, σ3}. Codewords in Construction I start with ’011’,

’101’ or ’110’, so that after perusal of Figure 1, we conclude

that the (4,2) constrained code constructed by Construction I

is maximal.

Using (1), (11), (12), (13), and q= 3, we obtain

ˆ

N4,2(n) = N4,2(n)=[zn]

3

X

j=1

h3,j (z)=[zn]Q(z)

P(z),(15)

where

Q(z) = −z5+ 2z3−z2+ 1,(16)

P(z) = ∆ = det(I−zD4,2) = z6−z4−z2−z+ 1.(17)

After an evaluation, we have for n≥4

ˆ

N4,2(n) = N4,2(n) = [zn−4](6 + 10z+ 16z2+ 29z3+

+ 50z4+ 85z5+ 145z6+ 249z7+ 428z8+

+ 733z9+ 1256z10 + 2153z11 +· · · ).(18)

We have ˆ

N4,2(15) = 2153, so that we can construct a maximal

(4,2)-constrained code of rate 11/15 with Construction I. Note

that the same code was also found with Franaszek’s method,

see [6, Table 3]. For larger values of nwe may conveniently

apply the recursion

N4,2(n) = N4,2(n−1)+N4,2(n−2)+N4,2(n−4)−N4,2(n−6)

(19)

with initial conditions N4,2(0) = 1,N4,2(1) = 1,N4,2(2) = 1,

N4,2(3) = 4,N4,2(4) = 6, and N4,2(5) = 10. For asymptot-

ically large n, the number of sequences grows exponentially

with growth factor λ, or

N`,t(n)≈A`,t λn, n 1,(20)

where A`,t is a constant. The rate efﬁciency, η, equals

η=log2N`,t(n)

nC`,t

≈1 + log2A`,t

nC`,t

.(21)

In case we have a generating function of N`,t(n), say

N`,t(n)=[zn]Q(z)/P (z), then [15]

A`,t =−λQ(1/λ)

P0(1/λ).

For the case `= 4 and t= 2, using (3), (16), and (17), we

ﬁnd A4,2≈0.6636 and λ≈1.7143, see Section II, so that

η≈1−0.76/n.

VI. CONCLUSIONS

We have considered a new design method for construct-

ing energy-harvesting sliding-window (`, t)-constrained block

codes that generate binary sequences with at least t1’s in

a window of `consecutive bits. The block code’s design

avoids the usage of the K-state ﬁnite-state machine (FSM)

description of the (`, t)constraint, where K=`

t, so

enabling codes that are hard to design with prior art FSM-

based methods. The block code, using a single look-up table,

translates m-bit user words into n-bit codewords that can

be cascaded without violating the prescribed (`, t)-constraint.

Examples of (`, t)-constrained codes have been presented for

values of `and tthat are too laborious to handle with prior

art design methods. A rate-26/31 (`= 30, t = 15) code could

be established, which, as it requires an FSM description with

more than 1.5×108states, would be practically impossible to

construct with FSM-based methodology. We have assessed the

rate efﬁciency of the newly developed codes. We have been

able to verify that the (`= 4, t = 2)-constrained block code

designed by Construction I is a maximal block code.

REFERENCES

[1] P. Popovski, A. M. Fouladgar, and O. Simeone, “Interactive joint transfer

of energy and information,” IEEE Transactions on Communications, vol.

61, no. 5, pp. 2086-2097, May 2013.

[2] E. Rosnes, A. I. Barbero, and Ø. Ytrehus, “Coding for Inductively

Coupled Channels,” IEEE Transactions on Information Theory, vol. 58,

no. 8, pp. 5418-5436, Aug. 2012.

[3] W. Hirt, M. Hassner, and N. Heise, ’IrDA-VFlr (16 Mb/s): Modulation

Code and System Design’, IEEE Personal Communication, pp. 58-71,

Feb. 2001.

[4] T.-Y. Wu, A. Tandon, L. R. Varshney, M. Motani, “Skip-Sliding Window

Codes,” ArXiv:1711.09494, 2018.

[5] T.-Y. Wu, A. Tandon, M. Motani, and L. R. Varshney, “On the outage-

constrained rate of skip-sliding window codes,” Proc. IEEE Information

Theory Workshop (ITW’19), Visby, Sweden, Aug. 2019.

[6] K. A. S. Immink and K. Cai, “Properties and constructions of energy-

harvesting sliding-window constrained codes,” IEEE Communications

Letters, May 2020, DOI 10.1109/LCOMM.2020.2993467.

[7] C. V. Freiman and A. D. Wyner, “Optimum Block Codes for Noiseless

Input Restricted Channels,” Information and Control, vol. 7, pp. 398-

415, Sept. 1964.

[8] P. A. Franaszek, “Sequence-State Encoding for Digital Transmission,”

Bell Syst. Tech. J., vol. 47, pp. 143-157, Jan. 1968.

[9] R. L. Adler, D. Coppersmith, and M. Hassner, “Algorithms for Sliding

Block Codes. An Application of Symbolic Dynamics to Information

Theory,” IEEE Transactions on Information Theory, vol. IT-29, no. 1,

pp. 5-22, Jan. 1983.

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

Length Constrained Sequence Codes,” IEEE Transactions on Commu-

nications, vol. 67, no. 2, pp. 890-902, Feb. 2019.

[11] C. Cao and I. Fair, “Construction of Multi-State Capacity-Approaching

Variable-Length Constrained Sequence Codes With State-Independent

Decoding,” IEEE Access, vol. 7, pp. 54746-54759, 2019.

[12] C. E. Shannon, “A Mathematical Theory of Communication,” Bell Syst.

Tech. J., vol. 27, pp. 379-423, July 1948.

[13] J. D. Faires and R. Burden, Numerical Methods, International Edition

4th Edition, Cengage Learning, Inc, 2012.

[14] R. P. Stanley, Enumerative Combinatorics, Vol. 1, Cambridge Stud. Adv.

Math. 49, Cambridge University Press, Cambridge, United Kingdom,

1997.

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

89806-5, Cambridge University Press, 2009.

[16] K. A. S. Immink, “Runlength-Limited Sequences,” Proceedings of the

IEEE, vol. 78, no. 11, pp. 1745-1759, Nov. 1990.

[17] I. F. Blake, “The Enumeration of Certain Run Length Sequences,”

Information and Control, vol. 55, pp. 222-237, 1982.