You are on page 1of 4

827

TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 45, NO. 4, AUGUST 1996

L. G. Ullate, M. T. Sanchez, E. Villaneuva, M. Parilla, and J. J. Anaya,


A three-transducer system for object location in air, Sens. Actuators
A, vol. 37-38, pp. 391-396, 1993.
B. Barshan and R. Kuc, A bat-like sonar system for obstacle localization, IEEE Trans. Syst. Man, Cybern., vol. 22, pp. 636-646, 1992.
J. Borenstein and Y. Koren, Obstacle avoidance with ultrasonic sensors, IEEE J. Robotics Automat., vol. 4, pp. 213-218, 1988.
R. Cyr, A review of obstacle avoidance/search sonars suitable for
submersible applications, Mar, Technol, Soc. J , , vol. 20, pp, 47-57,
1986.
0. Bozma and R. Kuc, Building a sonar map in a specular environment
using a single mobile sensor, IEEE Trans. Pattern Anal. Machine Intell.,
vol. PAMI-13, pp. 1260-1269, 1991.
J. L. Sutton, Underwater acoustic imaging, Proc. IEEE, vol. 67, pp,

554-566, 1979.
A. Elfes, Sonar-based real-world mapping and navigation, IEEE J.
Robot. Automat., vol. RA-3, pp. 249-265, 1987.
P. H. Milne, Underwater Acoustic Positioning Systems. Houston, TX:
Gulf, 1983.
E. F. Rechner and D. E. Nelson, Dept. Archaeology, Simon Fraser Univ.,
private communication.
H. L. Van Trees, Detection, Estimation, and Modulation Theory, Part
Ill. New York: Wiley, 1971.
L. E. Freitag and P. L. Tyack, Passive acoustic localization of the
Atlantic bottlenose dolphin using whistles and echolocation clicks, J.
Acoust. SOC. Amer., vol. 93, pp. 2197-2205, 1993.
V. A. Del Grosso, New equation for the speed of sound in natural
waters (with comparisons to other equations), J. Acoust. Soc. Am., vol.
56, pp. 1084-1091, 1974.
Guide to the Expression of Uncertainty in Measurement, 1st ed.
Geneva: International Organization for Standardization, 1993.
The sonar sampling system has recently been described in: P. H.
Kraeutner and J. S. Bird, A PC based coherent sonar for experimental
underwater acoustics, IEEE Trans. Instrum. Meas., to be published.

A New Algorithm for Improving the


Accuracy of Periodic Signal Analysis
Jiangtao Xi and Joe F. Chicharo

Abstract-Digital periodic signal analysis often requires synchronized


sampling with the signal being analyzed. In certain practical situations,
however, this condition is difficult to satisfy. As a result, a number
of undesirable effects such as the spectral leakage associated with the
discrete Fourier transform (DFT), and the truncation errors in digital
wattmeters arise and degrade system performance. This paper presents a
new approach which attempts to remedy the underlying problem. The basic idea of the proposed method is to modify the actual sampled sequence
such that it becomes an ideal sample sequence which is synchronized with
the signal subjected to sampling. A simple algorithm for modifying the
sampled sequence on-line is derived based on interpolation. The proposed
approach requires quite modest additional computational burden which
makes it suitable for real-time signal processing. To illustrate the practical
applicability of the proposed algorithm, the paper considers two distinct
but common cases. First, it shows how the proposed method can be
used in the case of DFT analysis of harmonic signals, and secondly, it
considers the digital wattmeter application area in electrical power-system
measurement. Results show that the proposed algorithm is capable of
reducing both the leakage effect in DFT analysis and truncation errors
in digital wattmeters.

Manuscript received August 25, 1994; revised July 28, 1995.


The authors are with the Department of Electrical and Computer Engineering, The University of Wollongong, New South Wales 2522, Australia.
Publisher Item Identifier S 0018-9456(96)02960-9.

I. INTRODUCTION
Many applications involve digital processing of periodic signals.
For example, both voltage and current in electricall power systems
are periodic signals containing harmonic components [ 11. There are
generally three steps associated with, the digital processing of a signal.
Firstly, the signal is uniformly sampled and converted into a discrete
bl looking at the
Of data i s
sequence. Then, a
sequence for a period of time and neglecting everything that happens
before and after this period. This period of time is referred to as the
data window or observation interval. Finally, digital signal-processing
techniques such as the DFT are applied to the samples within the data
window to get the results. There are some requirements associated
with the first two steps. First of all, the sampling frequency must
be higher than the Nyquist frequency, which is twice the highest
frequency of interelst. A particular problem arises when the sampling
frequency is high enough to satisfy the Nyquist theorem but the
sampling process is not synchronized with the signal to be processed.
There are two synchronization aspects which must be considered.
Firstly, the data window should cover an integer number ( L )of signal
cycles where each cycle has a period TO.This mearis that the length
of the data window is LTo. Secondly, the length of the data window
should be an integer multiple of the sampling period (denoted as Ts).
In other words, the following condition should be satisfied in order
to ensure synchronized sampling

where N is the number of sampleis in the data block, while fs and


f o are the sampling frequency and signal fundamental component
frequency respectively. Note that the condition expressed by (1) is
important. For example, if such a condition is not satisfied, spectral
leakage occurs when using the DFT to analyze the harmonic signals
[2]-[3], and also the accuracy of digital wattmeters [4]-[8] may suffer
from the truncation error. Unfortunately, in practical situations it is
often difficult for the sampling procedure to be exactly synchronized
with the input signal. This is primarily because both the sampling
and signal frequency may vary with time due to many factors, such
as the oscillator instability.
A number of approaches, such as the use of time windows and
interpolation techniques, have been proposed to remedy the situation
when using the DFT for harmonic analysis [9]-[12]. However, these
approaches are not very suitable for real-time processing due to the
increased computational burden. In addition, they are restricted to
DFT analysis and hence not suitable for other applications where
synchronized sampling is also desired.
The objective of this paper is to propose an approach, which is
simple in terms of computational bmurden and can be used for a wide
range of applications. The essence of the proposed solution is to
modify the input samples toward an ideal signal sample sequence,
whose sampling frequency satisfies (1). One of the important aspects
of the proposed approach is that its on-line implementation only
modifies the sampled sequence when synchronization is lost. In other
words, if the samples are properly synchronized, then the algorithm
has no effect.
This paper is organized as follows: Section I1 develops the new
The performance
the proposed
is
in
Section 111. Section IV presents simulation results on the proposed
algorithm

001 8-9456/96$05.00 0 1996 IEEE

828

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 45, NO. 4, AUGUST 1996

11. THEPROPOSED
ALGORITHM
Now consider the derivation of an algorithm to modify the samples
when
is not an integer. Suppose
= W , where [ ] denotes
the operation to get the closest integer value. -1-represents the number
of samples within the data window, and we assume that it is known a
priori. Our approach is to modify the practical samples . r ( n ) toward
an ideal sampling sequence .TO ( n )whose sampling frequency satisfies
= N, in which T,odenotes the ideal sampling
the condition
a?, = 2%- and 3 = N, the ratio
(or
is
period. Given [+]
T3 0
should be close to one for a large -Y.
In this case we assume

[y]

&

T,- T,o= e

where le1

<

2)

7 so

2-1-

'1.I- 1

M-1

(9)
The actual discrete signal samples after uniform sampling are obtained as

(2)

where I I denotes the modulus. Equation (2) means that the actual
samples deviate very slightly from the ideal samples. Without loss of
generality we assume that initially z(0) = .ro(O), which means that
the first sample is identical to the desired sample. For subsequent
samples, there is a time deviation between .r( n ) and .xo(n ) as a
result of differences between actual and ideal sampling periods. The
deviation increases with 11. For example, the time deviation for the
second sample is given as (Ts - T,o)
= e . For the third sample it
will be 2 e , and for the rrth sample it will be ( rz - 1)e. Consequently
we have the relation
s o ( n ) = s.(nT,o) = .r,(nT, - n e ) .

where f o is the fundamental frequency, and A , is the amplitude of


the mth harmonic component. The ideal samples for the harmonic
signal given in (8) are

=0

m=O

17%

(10)
We define a sampling error sequence, which is the difference between
the practical sequence and the ideal sequence. Hence the sampling
error sequence before modification is given by

(3)

Expanding (3) into a series and neglecting the higher order components, we have
2 n n nl L e

Ico(rij E

z o ( n T s )- .rh(nT,) n e .

(4)

Now we need to evaluate the gradient xL(riTs).Given the periodic


nature of .ro( t ) ,the following relationships apply

+ S ) T , } = .r,{(n + -\-j(T70+ e ) }
+ .VT,o + n e + -Y,)
.r,(nT,o + rce + Y e ) = s,{r~(T,o+ e ) + .\-e}

where C,,,
,, = -4nL[Bo,n,(7~)
- 11 and &,,(n)
= e'=.
From
(11) it is clear that C,,,,,
corresponds to the sampling error for mth
harmonic component. For simplicity, we use the relative value of the
sampling error for m th harmonic component, given by

r ( n + -V)= za{(rt

= z,(nT,o
-

= .c,(nT, + N e ) .

(5)

As indicated in ( 2 ) , le1 < $,


.\- >> L W , we have A Tso <
can be evaluated as

A.

that is, le/


rs0
<
Assuming
<< 1. In this case BO,^(^)

The gradient can be approximately evaluated as

Hence

Substituting (6) into (4) gives the following formula which can be
used to modify the input samples

Now we evaluate the sampling error after the proposed algorithm has
been applied. The new samples according to (7) are given by
.Tl(/l)

=x(u)

+ XN { r ( n )- . T ( n + N ) }

Clearly for modifying one sample this algorithm (7) only requires
one addition and one multiplication which makes it quit suitable for
on-line implementation.
Hence the sampling error sequence is given by
111. ANALYSIS
OF THE PROPOSED ALGORITHM

Now we investigate the case where the proposed algorithm in (7)


is applied to the harmonic signal defined as

El(?,)

829

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 45, NO. 4, AUGUST 1996

where Dm,n =

2TnmLe

- 11 and B I m ( n ) = e J r [ l

Am[Bl,,(72)

2nml e

F(1- r ' T T ) ] .

TABLEI
COMPARISON
OF LEAKAGE
COEFFICIENTS

Similarly the relative sampling error can be

obtained as
Rl,7n(7L)
=

Dm,n

A, = [BI,,(n)

11.

(17)
49.8

BL,,(n) can be approximately evaluated as

83.33%

50.0

0.00

0.00

50.2

0.12

0.02

83.33%

50.5

0.32

0.13

59.38%

The power after cjompensation is

(18)
It can be shown from (18) that Bl,,,(n) decreases with
value of Bl,vt(n)is bounded with the range given by

B1,m(N)5

Bl,m(71)

71..

Hence the

5 Bl,m(O)

(19)

or
The second term in (28) reflects the noise power after compensation.
It is clear from (28:i that the proposed algorithm is very sensitive to the
noise, because the noise power increases by a factor of (1+$ $).
To prevent the noise from blowing up, the ratio (7b,'X) should be as
small as possible. ,4s the result, n should be limited within the range
10, N - 11.
It is also interesting to investigate the ideal case where e = 0. In
this case the samplle sequence is periodic, that is, ~ ( n=) .c(n X).
Clearly from (25) the proposed algorithm has IIO effect on the
actual sample. This result is very important, since in such cases the
actual sample sequence is the same as the ideal s:equence, and no
modification should be made.

Therefore we have

Comparing (14) and (21) we have

and

Given that

e < &,

and assuming that ni

<< -V

IV. SIMULATION
RESULTS
we have

Simulations results based on the proposed algorithm are presented


to show the performance of the method for a number of different
applications under a variety of applications.

Consequently the error after modification is much smaller than that


before the modification. In other words, the modified samples are
much closer to the ideal samples.
Let us now consider the selection of M 1 in (7). Note that the above
analysis is only for the N samples when 11 = 0 , l . . . . , N - 1. When
n increases, the value of
also increases. In this case the
is not
approximation in (13) and (18) might not be valid if
sufficiently small. Therefore it is better to limit the modification to the
first N samples. In other words, the modification algorithm should be

A. DFT Analysis of Harmonic Signals


Consider the case where the proposed algorithm i s applied into
the DFT analysis of a periodic signal. The signal consists of a single
sinusoid, given as .r(n) = cos( w
)The
. frequency of this sinusoid
fb
is 50 Hz, the sampling frequency is 1400 Hz, L is 5 , and so N = 140.
When the signal frequency changes slightly, we compare the DFT of
unprocessed data, .E(.), and the DFT of the processed data, 2 1 ( n ) ,
by considering the leakage coefficient defined as [13]
[!f

There is also another very important reason for selecting M Ias N - 1.


In the above analysis a noise-free situation is assumed. In other words,
there is no noise associated with the input signal. Such an assumption
may not always be valid in practical situations. Consider a case where
a small noise disturbance is added into the signal as
z ( 7 ~ )=

s(n)

+ ,u(n)

(26)

where s('n) is a periodic signal, and U ( . ) is an independent noise


disturbance. Assume that u(n) is a zero mean white noise with the
power of 6;. The samples after compensation are given by
n
~1 (n)= s ( n )
ts(n) - [ L ( T L ) - .E(.
N)]

+ ?[.u(n)
N

+ <v
u(n + N ) ] .

(27)

gL;-'

I X ( k ) ( - (X,,,X(
I-XInaxI

(29)

where X ( k ) is the amplitude of the kth frequency component, and


is the maximum amplitude. Since x ( n ) consists of a single
sinusoid, X,,,
corresponds to the sinusoid being analyzed. Clearly
the leakage coefficient depicted in (29) refers to the portion of
spectrum spilled from the sinusoiid frequency into other frequency
bins. The simulation results obtained are illustrated in Table I,
where V represents the leakage coefficients of unprocessed data, 1'1
represents the leakage coefficients of the processed data, and Q is
the improvement factor defined as

X,,,

It is seen that the new algorithm is capable of reducing the leakage


coefficients by 50% or more in the cases considered. In other words,
over half of the spectrum leakage can be eliminated.

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 45, NO 4, AUGUST 1996

830

I
-2

50

100

150

-2

(4

100

50

150

(b)

Fig. 1. Comparison between the processed and unprocessed data: (a) unprocessed data. (b) processed data, (c) amplitude spectrum of unprocessed data.
and (d) amplitude spectrum of processed data.

C. Digital Wattmeters
Microprocessor-based (or digital) wattmeters [4]-[SI offer improved accuracy and speed of response over electromechanical instruments for electrical power measurement. Since both voltage, C 7 ( t ) .
and current, I ( t ) ,are periodic, the average power is evaluated as

0.47

0.20

49.8

0.16

0.03

50 0

0.00

0.00

50.2

0.13

0.08

50.5

0 24

0.23

Computer simulations are performed for the input signals

r - ( t ) = lOOsin(2xft + 35) + lSsin(6xft

B. Performance in Noisy Environment


Computer simulations are also performed for the cases where a
normally distributed, zero mean white Gaussian noise with a standard
deviation of 0.01 is added to the above sinusoid for the case where
fo = 49.8 Hz. A typical simulation result is illustrated in Fig. 1.
which gives the comparison between the amplitude spectrum before
and after compensation. It is seen that there is an increase in noise
level of about 5 dB.

49.5

+ 7)

+ 10siri(l07i,ft+ 15)

(36)

+ 25) + 8sin(6.irft + 14)


+ 4sin(lOnft + 7)+ 2 s i n ( l 4 n f t + 15)

(37)

and

I (t ) = 100 sin(2.irft

where f = 30 Hz and fs = 6400 Hz, and so 1V = 128. We are


interested in the case when the signal frequency deviates slightly from
50 Hz. The comparisons between truncation errors before and after
compensation are illustrated in Table 11. As can be seen from Table 11,
the proposed algorithm can significantly reduce the truncation error
when compared to the direct computation approach.

V. CONCLUSION

This paper proposes a new algorithm for modifying the samples of


the periodic signals. The proposed algorithm is suitable for on-line
1 Ib
Po = T,
C(t)/(t)dt
(31) implementation and is characterized by low computational burden. To
illustrate the feasibility of the proposed approach the paper considered
where To(=l / f o ) is the period of the voltage or current signals. In both the DFT analysis of harmonic signals and digital wattmeter
application areas. It was shown by computer simulations that the
sampling wattmeters the voltage and current wave forms are regularly
sampled at a rate f 9 = l/Ts, which results in the discrete voltage proposed algorithm is capable of reducing the leakage associated with
, ) i ( n ) = / ( n T q ) . the D I T analysis and the truncation errors associated with sampling
and current samples given as U(.) = ~ ( T L Tand
Assuming that the average power is calculated on the basis of samples wattmeters.
from one cycle of voltage and current signals, the following equation
ACKNOWLEDGMENT
is used to calculate the average power

The authors would like to thank the anonymous reviewers for their
comments and suggestions which have served to enhance this paper.
where p ( n ) = u ( n ) i ( 7 ~and
) [ f ? / f o ] = S . If .fs/.fo = .1-,the
calculated average power, P , is equal to the actual average power in
(31). However, when . f s / . f o is not an integer, P will not equal Po;
the difference between P and POis referred to as truncation error,
defined as
(33)
Since the instantaneous power V ( t ) / ( t )is also a periodic function,
(25) can be applied to compensate p ( n )

REFERENCES
[I] J. Arrilaga, D. A. Bradley, and P. S. Bordger, PowerSystem Harmonics.

New York: Wiley, 1985.


121 W. A. C. Perera, J. F. Chicharo, and B. S. P. Perera, On the merits and

demerits of using a fast fourier transform approach for establishing the


harmonic spectrum in power system, in Proc. A UPEC 93,Wollongong,
Australia, Sept. 29-Oct. 1, 1993, pp. 108-1 15.
[ 3 ] A. A. Girgis and F. Ham, A qualitative study of pitfalls in FFT, IEEE
Trans. Aerosp. Electron. Syst., vol. AES-16, no. 4, pp. 434439, July
1980.
[4] R. S. Turgel, Digital wattmeter using a sampling method, IEEE Trans.
Instrum. Meas.. vol. IM-23, pp. 337-341, Dec. 1974.
[51 J. J. Hill and W. E. Alderson, Design of a microprocessor-based digital
wattmeter, IEEE Trans. Znd. Electron., vol. IECI-28, no. 3, pp. 180-184,
Aug. 1981.

You might also like