Content uploaded by H.-P. Bernhard

Author content

All content in this area was uploaded by H.-P. Bernhard on Jul 19, 2018

Content may be subject to copyright.

Error Characterization of Duty Cycle Estimation for

Sampled Non-Band-Limited Pulse Signals With

Finite Observation Period

Hans-Peter Bernhard, Bernhard Etzlinger and Andreas Springer

Johannes Kepler University Linz

Institute for Communications Engineering and RF-Systems

Altenbergerstr. 69, 4040 Linz, Austria, Email: h.p.bernhard@ieee.org

Abstract—In many applications the pulse duration of a peri-

odic pulse signal is the parameter of interest. Thereby, the non-

band-limited pulse signal is sampled during a ﬁnite observation

period yielding to aliasing and windowing effects, respectively.

In this work, the pulse duration estimation based on the mean

value of the samples is considered, and an exact expression of the

mean squared estimation error (averaged over all possible time

shifts) is derived. The resulting mean squared error expression

depends on the observation period, the pulse period and the pulse

duration. Analyzing the effect of these parameters shows that the

mean squared error can be reduced (i) if the observation period

is a multiple of the pulse period, (ii) if the pulse period is not

a multiple of the sampling period, and (iii) if the total number

of samples is a prime number. All results were validated with

simulation results.

Index Terms—sampling process, band width, signal reconstruc-

tion, sampling error, wireless sensor networks (WSN), synchro-

nization, localization, ultrasonic.

I. INTRODUCTION

Following the established sampling theory, band-limited

signals can be perfectly reconstructed from a set of samples

that are collected with a sampling frequency larger than the

double occupied bandwidth [1], [2]. However, this is only true

if the signal is sampled during its inﬁnitely long duration.

In practical applications neither an inﬁnite observation time

can be achieved, nor the underlying signals are band-limited

(e.g., discrete valued and continuous-time signals are not band-

limited).

Consider time-duration measurements in periodic signals.

For example, in ultrasonic reﬂection measurements for ranging

[3], [4], pulses are emitted periodically, and a device counts

the number of clock cycles between the emission of the pulse

and the reception of the reﬂection. This setting corresponds to

the sampling of a rectangular pulse signal, that is high between

emission and reception, and low until the next emission. The

pulse duration, i.e., the time that the pulse is on high, is used to

determine the range. Another example is round-trip time (RTT)

based clock synchronization for which clocks are modeled

with discrete events. The corresponding RTT measurements

are samples of a pulse function. In that scenario, the pulse

duration is related to the propagation delay and the clock offset

between two communication nodes [5], [6].

The two examples mentioned use a pulse shaped signal to

determine key system parameters. Thereby, both conditions of

the sampling theorem are violated, the bandwidth of the signal

is inﬁnite and the observation period is limited. Although the

signals are considered as noise free, sampling and aliasing

distorts the signal reconstruction. In this work the question

is raised how accurately signal parameters can be estimated

from non band-limited signals with a ﬁnite number of samples.

Previous contributions have already derived upper bounds

on the squared error [7]. Here, for the function space of

sampled pulse signals, an exact formulation of the averaged

squared error on the estimation of the pulse duration is derived.

Moreover, the error analysis gives rise to the following design

suggestions in technical systems:

•Predicting the estimation accuracy for a given number of

samples in a given observation period;

•Selecting the number of pulse signal periods (i.e., the

total observation period) to achieve a desired estimation

accuracy.

•Selecting the number of samples to achieve the minimum

estimation error for a given sampling period and obser-

vation period.

II. PRELIMINARIES

Sampling is the obvious starting point in all discrete signal

processing applications that have a relation to real world

processes. In the following, signals x(t)are considered that

are integrable in the sense of Lebesgue, i.e.,

L1(R) = x(t)Z∞

−∞

|x(t)|dt < ∞.(1)

Sampling x(t)with a period Tyields the sampled signal

xs(n)∈nx(nT )n∈Z∧T=1

2B∧B < ∞o.(2)

To reconstruct x(t), the samples xs(n)are interpolated, i.e.,

xi(t) =

∞

X

n=−∞

xs(n)sin(2πB(t−nT ))

π(t−nT ),(3)

is the interpolated signal. As commonly known [1], [2]

xi(t)≡x(t),(4)

if and only if x(t)is band-limited by B= [−B, B [.

A. Signals of interest

In this work, the rectangular pulse function

x(t) =

∞

X

l=−∞

rect t−l P −φ

D(5)

with t, P, φ ∈R,0< D < P and l∈Zare considered. The

signal period Pis considered to be a ﬁxed parameter, and the

time shift φand the pulse duration Dare considered to be

uniformly distributed variables on the mentioned support. The

considered signal is a low-pass signal, and since it is periodic

in P, it is wide-sense cyclo stationary and ergodic.

Note that x(t)in (5) is discrete valued and hence not band-

limited. The condition (4) can not be achieved due to aliasing

induced by the sampling process.

B. Bounds on the Aliasing Error of Aribtrary Functions

The aliasing error is the difference between the original sig-

nal x(t)and the interpolated signal xi(t), i.e., |x(t)−xi(t)|. In

[7] a upper bound is derived for sampling of one dimensional

low-pass and band-pass signals. The analysis was extended to

multidimensional signals in [8] yielding similar results. For

one-dimensional signals, the main ﬁnding is that the aliasing

error is bounded by the out-of-band signal contribution (cf.

[9], [10]) with

|x(t)−xi(t)| ≤ 2Z

R\B

|X(f)|df , (6)

where X(f)is the spectral representation of x(t), and where

the band Bdepends on the sampling period in (2).

While the formulation in (6) provides an upper bound on

the aliasing error of arbitrary signals, this work focuses on

pulse-shaped signals as in (5). Hence, although Pand φare

unknown, the general shape (e.g., its discrete amplitude) is

known and can be interpreted as prior knowledge.

The aim of this work is to derive an exact formulation

of the reconstruction error similar to (6). Thereby, ﬁrst the

frequency domain representation of the periodic inﬁnite time-

continuous time signal (5) is derived, and then the frequency

representation of the sampled version of this signal. Finally,

a rectangular windowing function is included to account for a

ﬁnite observation period.

C. Time and Frequency Domain Pulse Signal Representation

The signal of (5) is an even function with a time shift φ

and can be represented by the Fourier coefﬁcients for k≥1

and for k= 0, respectively,

ak=2

kπ sin πkD

P,and a0=D

P.(7)

Hence, (5) can be rewritten as

x(t) = a0+

∞

X

k=1

akcos 2πk

P(t−φ)=

=D

P+

∞

X

k=1

2

kπ sin πkD

Pcos 2πk

P(t−φ)(8)

and the corresponding frequency domain representation is

given by

X(f) = D

Pδ(2πf )+

∞

X

k=−∞

2

kπ sinπkD

Pδ2πf −k2π

Pej2πkφ

P.(9)

D. Frequency Domain Representation of Sampled Pulse Sig-

nals

In this section the sampling of the non-time-limited signal

x(t)in (8) is considered. In contrast to [11], the considered

periodic pulse functions are unbounded in frequency domain.

Nevertheless, it is required that the pulse period Phas to be at

least twice the sampling period P≥2T. Due to sampling, all

out-of-band components of X(f)are folded into Baccording

to the Poisson sum formula [10], [12], [13]

Xs(f) = 1

T

∞

X

m=−∞

Xf−m1

T,(10)

where Xs(f)is the spectral representation of xs(n). Note that

Xs(f)is periodic in fwith a periodicity of 1/T . Hence, in

the following Xs(f)will only be considered for f∈ B with

B= [−B, B [and B= 1/2T.

X(f)from (9) can be plugged into (10) yielding

Xs(f) = 1

T

∞

X

m=−∞

D

Pδ2πf −m2π

T+

1

T

∞

X

m=−∞

∞

X

k=−∞

2

kπ sinπkD

Pδ2πf −m2π

T−k2π

Pej2πkφ

P,

(11)

for f∈ B. The ﬁrst delta-dirac function is non-equal to zero in

Bonly if f= 0 and m= 0. The second delta-dirac function

is non-equal to zero if

f=m1

T+k1

P,for f∈ B .(12)

For each k, there exists exactly one mthat fulﬁlls (12).

Deﬁning the round modulo function [14] with

:R×(R\ {0})→R,(r, p)7→ rp:= r−r

p+ 0.5p ,

(13)

where b·c denotes the rounding to the next lower integer,

allows to rewrite (12) as a function of konly, with

fk=m1

T+k1

P1

T=k1

P1

T.(14)

Finally, (11) can be rewritten to

Xs(f) = D

P T δ(2πf)

+

∞

X

k=−∞\0

2

kπT sin πkD

Pδ(2π(f−fk)) ej2πfkφ.(15)

The sampled time-domain signal for arbitrary φis ﬁnally

obtained analogue to (8) with

xs(n) = D

P T +

∞

X

k=1

2

kπT sin πkD

Pcos (2πfk(nT −φ)) .

(16)

The sampled signal representation of xs(n)in (16) includes

all aliasing components due to sampling. It will be the starting

point for considering a limited observation period in the

following section.

E. Finite Observation Period

To include a ﬁnite observation period N T in the frequency

domain representation of Xs(f)in (15), we consider a

non-causal rectangular window yielding

Xs(f) =

bN−1

2c

X

n=−bN

2c

xs(n)e−j2πf nT ,(17)

with xs(n)from (16) for arbitrary φ. Because of its linearity,

we can transform each akweighted term of the Fourier series

of (16) separately

Xs(f) =

∞

X

k=0

akXfk

s(f).(18)

The ﬁnite discrete Fourier transform of each cosine function

of (16) can be written by

Xfk

s(f) =

bN−1

2c

X

n=−bN

2c

cos(2πfk(nT −φ)) e−j2πf nT

=e−j(2πfkφ)sin(πN T (f−fk))

2 sin(πT (f−fk)) ,(19)

where the simpliﬁcation from the ﬁrst to the second line ap-

plies the generalized formula of the geometric series. Finally,

the frequency domain representation for f∈ B of the sampled

pulse signal with ﬁnite observation period NT is

Xs(f) = D

P T

sin(πN T (f))

sin(πT (f))

+

∞

X

k=−∞\0

e−j(2πfkφ)sin πkD

Psin(πN T (f−fk))

kπT sin(π T (f−fk)) .

(20)

III. ESTIMATION ERRO R OF T HE PU LS E DUR ATION

The pulse duration Ddetermines the mean value of the

periodic time-continous signal x(t)in (5), and appears in

X(f= 0) = D/P in (9). A natural choice of estimating

Dis using the mean value1of the sampled signal. Hence,

the estimation error can be characterized by the inﬂuence of

aliasing and windowing on Xs(0). l’Hospital’s rule yields

Xs(0) = D

P T N

+

∞

X

k=−∞\0

e−j(2πfkφ)sin πkD

Psin(πN T fk)

T kπ sin(πT fk).(21)

1Based on the binary nature of the observed process this estimator is

equivalent to an implementation of a nonlinear edge detector .

The estimator of the pulse duration can be written by

b

D(D, φ;N , P ) = P T

NXs(0).(22)

A. Mean Square Estimation Error

Considering (22) and (21), the estimation error eDas a

function of the random variables D,φand the ﬁxed parameters

N,P, is given by

eD(D, φ;N , P ) = D−b

D(D, φ;N , P )(23)

=P

N

∞

X

k=−∞\0

e−j(2πfkφ)sin πkD

Psin(πN T fk)

kπ sin(πT fk)

=

∞

X

k=−∞\0

cke−j(2πfkφ),(24)

with

ck=P

Nsin πkD

Psin(πN T fk)

kπ sin(πT fk).(25)

Note that (24) has the structure of a discrete Fourier transform

with the coefﬁcients ck. Note that ckonly depends on T fk.

Using the round modulo deﬁnition (13),

T fk=kT

P−kT

P+ 0.5=kT

P−v(k)

with v(k) = kT

P+ 0.5∈Z. The coefﬁcients ckin (25) can

be simpliﬁed to

ck=P

Nsin πkD

P(−1)(N−1)v(k)sin(πN k T

P)

kπ sin(πk T

P).(26)

To characterize the error independent of φ, the mean square

error with respect to φis evaluated. Due to the ergodic and

wide-sense cyclo-stationary signal in (5), the expectation can

be evaluated with Φ = mP and Φ→ ∞ to

e2

D(N) = E{|eD(D, φ;N , P )|2}

= lim

Φ→∞

1

Φ

Φ

2

Z

−Φ

2

|eD(D, φ;N , P )|2dφ

= lim

Φ→∞

1

Φ

Φ/2

Z

−Φ/2

∞

X

k=−∞\0

cke−j(2πfkφ)

2

dφ

=

∞

X

k=−∞\0

|ck|2(27)

=

∞

X

k=−∞\0

P2

N2sin2πkD

Psin2(πN k T

P)

(kπ)2sin2(π k T

P),(28)

where the simpliﬁcation from the third to the fourth line is

possible since the integration limits tend to inﬁnity. The mean

squared error on the estimation of the pulse duration D, i.e.,

e2

D(N)is exactly characterized by (28). It is averaged over all

possible time shifts φ, and it depends on the pulse period P,

the number of samples N, and the sampling period T. In the

following, special cases on the relation of the parameters P,

Nand Tare discussed.

0 1 5 10 15 20

10−1

100

101

NT

P

e2

D(N).e2

Fig. 1. Mean square error of duty cycle estimation depending on the

observation length NT . The value T= 25/501 = 0.0499 ... was selected

to guarantee that mP 6=NT and nT 6=P. The error is decaying slowly

to 0.1 of the quantization error at an observation interval of about 20 signal

periods. The (∗) indicate the simulation results.

IV. DISCUSSION ON THE PARAMETER RELATION

By observing (28), one ﬁnds in the squared sine in the

enumerator the relation N T /P , and in the squared sine in

the denominator T /P . If NT =mP with m∈N+, i.e., the

observation period is a multiple of the pulse period, some

coefﬁcients in (28) will be zero. If the pulse period is a

multiple of the sampling period, i.e., P=nT with n∈N+,

the enumerator and the denominator of some coefﬁcients will

tend to zero. In the following, four different cases on the

relation of NT to mP and of nT to Pare discussed.

The discussion on the parameter selection plays a key role in

applications, e.g. the number of repeated pulses for ultrasonic

distance measures and the sample frequency used to measure

the time to incoming reﬂections. Both parameters are easy to

determine and we can achieve higher estimation performance

by optimized parameter relations.

In the following analysis, the pulse period is normalized to

one second, i.e. P= 1 s, and the mean squared estimation

error is normalized to the quantization error induced by T,

i.e. e2

D(N)/e2with e2=T2/12 [15]. The normalized error

is compared with simulation results using 4000 realizations.

A. Parameter: mP 6=NT and nT 6=P

For the given parameter setting, Fig. 1 depicts the normal-

ized error following the derived analytical expression (28),

indicated by the solid line, and simulation results, indicated

by the (∗) markers. Both results show the same behavior.

Local minima can be observed whenever the NT is close to

a multiple of the pulse period P. In contrast, local maxima

can be observed in between. An evident conclusion is to use

NT =mP as observation length to have the lowest estimation

error. This case will be considered in the following section.

B. Parameter: mP =NT and nT 6=P

Considering NT =mP , the coefﬁcients ckin (28) can be

rewritten to

|ck|2=T2

m2sin2πkmD

NT sin2(πkm)

k2π2sin2(πk m

N)(29)

where the numerator is equal to zero. It is obvious, that also

the denominator is zero for some k∈Z, i.e., if

k=vN

m,(30)

0 1 5 10 15 20

10−2

100

NT

P

e2

D(N).e2

Fig. 2. Plot of the mean square error of duty cycle estimation over NT with

T= 5/107 = 0.04672 .... The values for mP =NT and nT 6=Pare

indicated by (o). The error is decaying to 0.01 of the quantization error at an

observation interval of about 5 signal periods due to the prime number N.

The (∗) indicate the simulation results.

with v∈N+. For those k∈Z, the coefﬁcients ckwill not be

equal to zero. Note that if Nis a prime number, vmust be

a multiple of mand only a minimum number of coefﬁcients

ckexists for which numerator and denominator tend to zero.

Hence, for Nis a prime number, the minimum mean squared

estimation error e2

D(N)is expected.

Applying de l’Hoptials rule to the non-zero ckcoefﬁcients,

i.e. for kT →mP , yields

lim

kT →mP |ck|2=P2

N2sin2πkD

PN2

k2π2(31)

which results for k=i mN in

e2

D(N)N=mP

T

=

∞

X

i=1

2T2

(i mπ)2sin2πi mD

T.(32)

In Fig. 2, the analytical estimation error (solid line) and the

simulated estimation error (∗) for mP 6=N T , and the special

cases for mP =NT (o) are depicted. Interestingly, the

minimum value of the mean square error, i.e., for mP =NT ,

is constant also for multiples of fN,f∈N+. It can be

concluded that (30) holds also for fmultiples of Nand leads

to the same set of ck. Therefore, increasing the observation

period does not improve the estimation accuracy, because there

is no dependence on Nin (32).

C. Parameter: mP =NT and nT =P

In some practical scenarios (e.g., the ultrasonic range mea-

surement in [3]), the pulse period is equal to a multiple of the

sampling period, and the observation period is a multiple of

the pulse period. Reformulating mP =NT to N=mP /T ,

i.e. Nis a multiple of the pulse period due to T=P/n, and

using (30) yields k=vP/T ∈N+. As (31) holds also for

nT →Pit can be simpliﬁed to cknot depending on Nand

used in (27) to

e2

D(N) =

∞

X

v=1

2T2

π2v2sin2πvD

T.(33)

In Fig. 3, the (o) marker indicate the analytical results for

mP =NT and nT =P. The solid line and the (∗) marks

in between indicate the analytical results and the simulation

results, respectively, for mP 6=NT and nT =P. It can

be observed, that for nT =P, setting mP =NT yields

0 1 5 10 15 20

100.5

101

NT

P

e2

D(N).e2

Fig. 3. Plot of the mean square error of duty cycle estimation over NT with

T= 0.01. The values for mP =NT (o), mP 6=N T (-) and nT =Pare

plotted. The error is not decaying beyond 2 times the standard quantization

error. The (∗) indicate the simulation results.

the minimum estimation error. However, this error is constant

regardless how many pulse periods are observed, and it is 200

times larger than the error obtained by setting nT 6=P.

D. Parameter: mP 6=NT and nT =P

In Fig. 3 it could be observed that this parameter setting

yields the highest mean squared error of all compared settings.

It remains to ﬁnd an analytical expression of the error. For

the special setting of mP 6=NT and nT =P, the sum

in (28) consists of two types of factors: those that can be

directly computed, i.e., k6=vP /T ; and those that require the

application of de l’Hospital’s rule. The latter is for k=vP/T .

Finally, the analytical formulation of the mean squared error

is

e2

D(N) =

∞

X

v=1

2T2

π2v2sin2πvD

T+

∞

X

k=−∞\0∧k6=vP

T

P2

N2sin2πkD

Psin2(πN k T

P)

(kπ)2sin2(π k T

P).(34)

The comparison of the analytical and the numerical results in

Fig. 3 indicate the correctness of (34).

V. CONCLUSION

For sampled periodic pulse signals with ﬁnite observation

period, an exact formulation of the mean squared error for

estimating the pulse duration was derived. The resulting error

formulation depends on the observation time, the pulse period

and the pulse duration. As certain relations of these parameters

prevent a direct evaluation of the mean squared error, exact

expressions for these speciﬁc settings were presented using de

l’Hospital’s rule. The error formulations were validated with

simulation results. A discussion on the parameter relations

revealed that a minimum mean squared error is achieved if

a full number of pulse periods is covered by the observation

time, and if the number of used samples is equal to a

prime number. For such system settings, an increase of the

observation time can not improve the estimation accuracy.

Moreover, it could be seen that technical systems, where the

pulse period is a multiple sampling period have signiﬁcant

inferior performance. Both results are counterintuitive and may

have an important impact to design systems.

ACKNOWLEDGMENT

The research from DEWI project (www.dewi-project.eu)

leading to these results has received funding from the

ARTEMIS Joint Undertaking under grant agreement

no621353 and the Austrian Research Promotion Agency

(FFG) under grant no. 842547.

REFERENCES

[1] E. T. Whittaker, “On the functions which are represented by the

expansions of the interpolation-theory,” Proceedings of the Royal Society

of Edinburgh, vol. 35, pp. 181–194, 1 1915.

[2] C. Shannon, “Communication in the presence of noise (reprint of classic

paper),” Proceedings of the IEEE, vol. 86, no. 2, pp. 447–457, Feb 1998.

[3] M. Scherhauﬂ, R. Pfeil, M. Pichler, and A. Berger, “A novel ultrasonic

indoor localization system with simultaneous estimation of position and

velocity,” in Wireless Sensors and Sensor Networks (WiSNet), 2012 IEEE

Topical Conference on, Jan 2012, pp. 21–24.

[4] L. Smith, B. Bomar, and B. Whitehead, “Measuring the level of liquid in

a partially-ﬁlled pipe via the ultrasonic pulse-echo method using acoustic

modeling,” in Systems Engineering (ICSEng), 2011 21st International

Conference on, Aug 2011, pp. 292–296.

[5] B. Etzlinger, N. Palaoro, and A. Springer, “Synchronization and delay

estimation with sub-tick resolution,” in Proc. Asilomar Conf. Sig., Syst.,

Comput., Paciﬁc Grove, CA, Nov. 2015.

[6] H.-P. Bernhard, A. Berger, and A. Springer, “Analysis of delta-sigma-

synchronization in wireless sensor nodes,” in Industrial Informatics

(INDIN), 2015 IEEE 13th International Conference on, July 2015, pp.

914–918.

[7] L. J. Brown, Jr., “On the error in reconstructing a non-bandlimited

function by means of the bandpass sampling theorem,” Journal of

Mathematical Analysis and Applications, vol. 18, pp. pp. 75–84, 1967.

[8] J. R. Higgins, Numerical Functional Analysis and Optimization, vol. 12,

no. 3-4, pp. 327–337, 1991.

[9] P. L. Butzer and R. L. Stens, “Sampling theory for not necessarily

band-limited functions: A historical overview,” SIAM Review, vol. 34,

no. 1, pp. pp. 40–53, 1992. [Online]. Available: http://www.jstor.org/

stable/2132784

[10] J. Brown, J.L., “Estimation of energy aliasing error for nonbandlimited

signals,” Multidimensional Systems and Signal Processing, vol. 15, no. 1,

pp. 51–56, 2004.

[11] E. Matusiak and Y. Eldar, “Sub-nyquist sampling of short pulses,” Signal

Processing, IEEE Transactions on, vol. 60, no. 3, pp. 1134–1148, March

2012.

[12] H. G. Feichtinger and K. Gr¨

ochenig, “Error analysis in regular and

irregular sampling theory,” Appl. Anal, vol. 50, pp. 167–189, 1992.

[13] A. Y. Olenko and T. K. Pog`

any, “Time shifted aliasing error upper

bounds for truncated sampling cardinal series,” Journal of Mathematical

Analysis and Applications, vol. 324, no. 1, pp. 262 – 280, 2006.

[14] “IEEE standard for ﬂoating-point arithmetic - redline,” IEEE Std 754-

2008 (Revision of IEEE Std 754-1985) - Redline, pp. 1–82, Aug 2008.

[15] A. Oppenheim and R. Schafer, Discrete-Time Signal Processing. Pear-

son Education, 2011.