Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Journal of Advanced Research in Dynamical and Control Systems Vol. 9.

Sp– 16 / 2017

HAPHAZARDLY SAMPLED DATA PROCESSING ALGORITHM


USING LOMB WELCH PERIODOGRAM
Mr.Prabhu Kumar Surarapu1, Ms. Soma Pal2
1
Assistant Professor in Department of ECE, Veltech
2
Dr. RR & Dr.SR University, Chennai.
1
prabhu4surarapu@gmail.com, 2spg2716@gmail.com

ABSTRACT
In various applications, there are conditions regularly sampled data cannot be achieved. But
at irregular point basis, instrumental dropouts occur. Analysis of frequency using non
uniform data ensues in several problems like ECG, vibration analysis in car, LDA and packet
network queue lengths. The present analysis algorithms for uniform data are not appropriate
to non-uniform data. This work studies these irregular sampled data problems using spectral
analysis techniques. The suggested process that support non uniform data based on cosine
transform, slotting techniques and gauss transforms methods.
Keywords: Lomb-Welch period gram, Windowing and averaging, Heart rate data

1. INTRODUCTION
For data characterization, spectrum analysis has been extensively used. In order apply
spectrum analysis to a non - uniform sampled data analysts use interpolation to resample the
signal before [2].
The performance of such technique is found to be poor, for example, if the data is not
sampled properly, then in the presence of long gap at low frequencies produces a spurious
bulge of power whereas at higher frequency it causes attenuation. To overcome such
problems Lomb - Scargle transform [5] for spectral estimation has been suggested, which do
not require uniform sampling.
The Lomb-Scargle transform gives a direct evaluation without interpolating non-uniform
sampled signals [1][2]. Enhancement of this transform is considered which allows the
evaluation of shorter transforms, use of windows and averaging of overlapped records. As it
considers equal time duration records for averaging and for applying windows which are

JARDCS Special Issue On Intellectual Computation Systems 486


Journal of Advanced Research in Dynamical and Control Systems Vol. 9. Sp– 16 / 2017

sampled at corresponding non-uniform time instances of the data; and resulting in Lomb-
Welch Periodgram.
1.1 The Lomb Power Spectral Density Estimation Method
For the power spectral density estimation and minimization of squared differences between
projections of the signal onto the basis functions, Lomb method preferable [8].

Let x(t) be the continuous signal under study and b(t) an orthogonal basis set that defines
the transform. The coefficients c(i), which represent x(t) in the transform domain are

c(i)=

These coefficients are those which minimizes the squared error


defined as

]2 dt

When dealing with the evenly sampled signals, this formalism becomes its discrete
counterpart, which is well suited as the Discrete Time Fourier Transform (DTFT). When the
signal is accessible only at unevenly spaced samples at t instants, the solution has generally
been to reduce it to an evenly sampled signal through interpolation. This resampling
introduces some distortion in the spectrum. To avoid this problem, Lomb proposed to
estimate the Fourier spectra of an unevenly sampled signal by adjusting the model

in such a way that the mean squared error s minimized with proper a and b parameters. This
expression is a particular case for real signals from the more general

Where now x(t) and c can be complex valued .For any transform, not necessarily the Fourier
transform, the expression will be

Minimization of n varience (mean squared error) leads to minimization of

JARDCS Special Issue On Intellectual Computation Systems 487


Journal of Advanced Research in Dynamical and Control Systems Vol. 9. Sp– 16 / 2017

Which results in a value for c(i)

This result can be referred to as a generalized Lomb method to estimate transforms of


unevenly sampled data.

The signal power at index i of the transformation (P n (i)) will be

2
if the transform is the Fourier transform then k=N and P x (i)=P X (f)= (f).
The Lomb method evaluates spectrum of the data, which is actually measured only at times .
Suppose that there are data points xn= x(tn ), n=1,….N then, mean and variance of the data is
given by

introduces a delay sine and cosine in the basis (rather than exponentials), which makes it a
more efficient estimation algorithm, called the Lomb normalized periodogram. The Lomb
normalized periodogram (spectral power as a function of frequency) of a non-uniformly
spaced data sequence{x(tn)}of length is defined by

τ is defined by the relation

JARDCS Special Issue On Intellectual Computation Systems 488


Journal of Advanced Research in Dynamical and Control Systems Vol. 9. Sp– 16 / 2017

2
Where and are the mean and variance of the series{x(tn) }. (Offset) is frequency
dependent time delay that makes Px (f) completely independent of shifting all the tn’s by any
constant. It weights the data on a “Per Point “basis instead of on a “Per time Interval” basis.

In order to average Lomb periodograms, three problems need to be solved

A) The Lomb transform, as described in the literature, is variance normalized. Since each
record is individually normalized, averaging across records is not meaningful. A de-
normalized transform is needed.
B) Since the data are non-uniformly sampled, what should be length of the segment, for
averaging purpose.
C) To improve power estimation an explicit window, instead of the implicit rectangular
window with equal coefficients, needs to be applied to segments of the time series.

1.2 De-normalization and averaging

For the de-normalization factor of line spectra, one can consider the uniformly
sampled data, namely tn=nT and x (tn)=A cos(2 where K is an integer. Using this
input, we have =0, σ2 =A2 /2, (f)=0.With this, Eqn (1) becomes Px(K/NT) is N/2 since
the de-normalization factor is 2σ2 /2 . In this case, PX(f
Two choice for segment a long record for averaging [1]
i) Use records with equal number of sample points, or
ii) Use records with the same duration.
First case not preferable for averaging due to non-uniform sampling, different bandwidth
of the records and it provides inconsistent results.
The underlying bandwidths are same for the records with same duration even though each
record has a different number of points. Hence, the suggested segmentation for averaging

JARDCS Special Issue On Intellectual Computation Systems 489


Journal of Advanced Research in Dynamical and Control Systems Vol. 9. Sp– 16 / 2017

purpose is to select the segments to be of the same time duration D and take the number of
samples available in the particular data sequence.

1.3 Windowing

In Eqn. (1),a rectangular window has been used implicitly [3][4].Because of scallop loss in
rectangular window, the amplitudes of line spectra to vary depending on the relative
frequencies of the signal with respect to the center of frequency bins. For the improvement in
power estimation, windows have been used. Since we have sampled data, one can apply
conceivably the sampled window to each data record prior to evaluating Eqn. (1). One
condition need to be remembered is that window samples should match with the non-uniform
sampling of the signal. Thus, windowed signal to be analyzed is

The above equation assumes 50% overlap. T is average sampling rate, and is the record
duration discussed in section 3.4. The results are scaled such that the correct powers are
obtained for line spectra. Thus, Windowed Lomb Periodogram called Lomb –Welch
Periodogram is given by

Assumption for Simulation


For simulation of points of unevenly sampled data, we require following parameters, the
lowest independent frequency f is the inverse span of the input data max(tn)-min(tn) This
frequency is such that data can include one complete cycle. Higher independent frequency
(fhi) would be integer multiple of the 1/T. In order to observe peaks better[6], we have to
(over)-sample more finely than at interval 1/T. The typical sampling factor must be greater

JARDCS Special Issue On Intellectual Computation Systems 490


Journal of Advanced Research in Dynamical and Control Systems Vol. 9. Sp– 16 / 2017

than or equal to 4.i.e the over sampling factor, ofac>= 4. The number frequency pointsN p that
can be obtained by the algorithm are

and fc= N/(2T) is called cut off frequency.

2. ANALYSIS OF HEART RATE DATA


2.1Application to Simulated Heart Rate Signals
In this section, we will analyze some spectra of HR series. We will consider a simulation to
experimentally study the performance of the Lomb PSD estimate. We have found that real
HR signals are not adequate since we do not know the real spectra that we want to obtain[9].
We obtain different estimations from classical and Lomb estimates, for that we propose
following experiment .We generate beat series from a controlled x(t) signal following a
typical spectrum from a real subject. We have used the nine –order AR model for generating
sequences of signal, as

Where ak are the AR parameters[10] shown in table-1,P is the AR model order and v(n) is
white zero-mean noise with standard deviation of x(n) signal, σn=0.145.The value used for
the sampling Frequency is 1 Hz.
Coefficients of The AR Model Used To Generate The Modulating Signal When m(n) when
Excited by White Noise.
TABLE –1
a1 a2 a3 a4 a5 a6 a7 a8 a9
1.0701 - - - - - - 0.0119 0.1435
0.3360 0.0117 0.0758 0.4281 0.2354 0.1165

Then, we apply three methods for PSD estimation. FFT of HR Signal, AR estimation, Lomb
estimate of unevenly spaced data.

JARDCS Special Issue On Intellectual Computation Systems 491


Journal of Advanced Research in Dynamical and Control Systems Vol. 9. Sp– 16 / 2017

2.2 Results
Random distribution of data samples: By using the following procedure it is possible to
generate data with missing samples from the full data. Example also mentioned in parallel.
Let P be the array, which indicates time instants of full data samples.

D=[0 0.0167 0.0333 0.0500 0.0667 0.0833 0.1000 0.1167 0.1333 0.1500 0.1667 0.1833
0.2000]
N1=Length (D)
N1=13
1) Choose p(p as probability of available samples.
P= 0.5
2) Random permutations of numbers are generated within the range of 1 to N1 . The
generated set (R) will contain all the numbers till the length of full data distributed in
gaussian fashion.
R= randperm (length (D))
R=[11 2 7 5 9 12 13 4 8 10 1 6 3]
Randperm () is available as a function in Matlab software.
3) Q=Sort(R (1 to Floor (p*N1))) will give the positions of samples after missing some data.
= (Floor (p*N1)) which is defined in all above equations.
N= (Floor (0.5*13)),N =Floor (6.5),N =6
Floor indicates rounding of the number towards lower integer.
sort(R (1 to N ))=sort(R (1 to 6)=sort (11 2 7 5 9 12)
sort is a function in Matlab
Therefore Q= [2 5 7 9 11 12]
Z = P (Q)
Z=[0.0167 0.0667 0.1000 0.1333 0.1667 0.1833]
Original sequence:
D=[0 0.0167 0.0333 0.0500 0.0667 0.0833 0.1000 0.1167 0.1333 0.1500 0.1667 0.1833
0.2000]
The final data after missing samples will be the data at time instants indicated by Z.
Experiment 1: Simulated Heart Rate Signal of length 2048 samples is generated with the
sampling rate of 1Hz(fs) . The parameters p=0.5, D=32sec (record duration),k=1024

JARDCS Special Issue On Intellectual Computation Systems 492


Journal of Advanced Research in Dynamical and Control Systems Vol. 9. Sp– 16 / 2017

(multiplication factor) and ofac=16(over sampling factor) has been used for simulation. The
selection of ofac affects the smoothness of the spectra, high value gives smoothed spectra
than small value. Number of frequency points (Np) should be 2*N for correct spectra. Spectra
is estimated for three cases (1) Spectra of full simulated data using FFT (2) Spectra of data
with missing samples using Lomb-Welch method (3) Spectra of AR parameters. Taking the
case 3 as reference can compare results of cases 1 and 2. From Fig 2.1(b) it can observe that
the spectra of case 2 and case 3 matches where as case1 and case 3 not so. Also it can observe
the main lobe broadness is more with FFT method, where as it has been reduced in Lomb-
Welch method.
Experiment 2: Signal with four sinusoids (7Hz, 8Hz, 11Hz, 12Hz)of length 600 points is
generated by sampling at the rate of 60Hz(fs). Parameters for simulation are
p=0.5,D=0.533sec(record duration), k=64(multiplication factor) and ofac=16(over sampling
factor). The selection of ofac and (Np) has similar effects as mentioned in Experiment-1.
Spectrum using Lomb- Welch is estimated for two cases (1) Spectrum of missing data with
rectangular window (2) Spectrum of the missing data with Hamming window. The spectra of
both cases have been compared with those of the full data obtained by Lomb-Welch method.
As side lobe level of rectangular window is high, case 1 (Fig 2.2(a)) contains higher side lobe
level than the side lobe levels of case 2 (Fig 2.2(b)). Also from figures we can observe that
this method for missing data problem gives results close to those obtained by full data.

Figure 2.1 (a) Heart rate signal of a particular realization. (b) Spectra obtained from FFT, AR and Lomb-
Welch methods.
( ) AR Spectrum
(……………...) Spectrum with Lomb-Welch method
(- - - - - - - - - - ) Spectrum with FFT

JARDCS Special Issue On Intellectual Computation Systems 493


Journal of Advanced Research in Dynamical and Control Systems Vol. 9. Sp– 16 / 2017

Figure 2.2 (a) Periodograms Lomb-Welch for non-uniformly sampled signals, Window rectangular.
Window overlap: 50% (b) Lomb-Welch for non-uniformly sampled signals, Window overlap: 50%

( ) Spectra obtained with non-uniform data


(……………...) Spectra obtained with uniform data

2.3 SUMMARY:
In this chapter different approach of performing Lomb-Scargle periodogram is presented
along with new enhancements in the algorithm called Lomb-Welch periodogram. Have
yielded a periodogram for non-uniformly sampled data that is almost similar to the uniform
data.

REFERENCES

1. Denise M.Bland, Timo I.Laakso and Andrzej Tarczynski,” Analysis Of Algorithms


For Nonuniform -Time Discrete Fourier Transform” IEEE Transactions on
Information theory, Vol.23.Jan1996.pp.453-456.
2. F.A.Marasvati, A Unified Approach to Zero –Crossings and Nonuniform Sampling,
Nonuniform Publications, Chicago, 1987.
3. N. Nguyen and Q. H. Liu,”The regular Fourier matrices and nonuniform fast fourier
transforms,” New Mexico State University Tech. Rep., July 1997.
4. Fredrick Andersson and GregoryBeylkin, ”The Fast Guass Transform With Complex
Parameters “, Journal of Computational Physics Vol.203, 2005,pp.274-286.

JARDCS Special Issue On Intellectual Computation Systems 494


Journal of Advanced Research in Dynamical and Control Systems Vol. 9. Sp– 16 / 2017

5. Tran Thong, James McNames, Mateo Aboy, “Lomb-Welch Periodogram for Non-
th
uniform Sampling,”Proceedings of the 26 Annual International Conference of the
IEEE EMBS San Francisco, CA, USA. September 1-5, 2004.
6. P. Laguna, G. B. Moody, R. G. Marak, ”Power Spectral Density Of Unevenly
Sampled Data By Least-Square Analysis: Performance and application to heart rate
signals,”IEEE Trans Biomed Eng, Vol. 45,No.6, June 1998, pp.698-715.
7. Robert Bos, Stijn de Waele, and Piet M.T. Broersen,” Autoregressive Spectral
Estimation By Application of the Burg Algorithm to Irregularly Sampled Data,” IEEE
Transactions On Instrumentation And Measurement, Vol. 51,No. 6,December 2002.
8. E. Lahalle, P. Faus Perez and Fleury,”Simplified LMS Algorithm In The Case Of
Non-Uniformly Sampled Signals” ICASSP 2003.
9. M. P. Tarvainen, J. K. Hiltunen, P.O. Ranta-aho, and P.A. Karjalainen, “Tracking Of
Nonstationary EEG With Kalman Smoother Approach: An Application To Event-
Related Synchronization Of Alpha Waves,”
10. E.Lahalle, G. Fleury and J. Oksman, ”Real-Time ARMA Identification In The Case
Of Missing Observations,”IEEE International Symposium On Information Theory,
Sorrento, Italy, June 2000, pp 443.

JARDCS Special Issue On Intellectual Computation Systems 495

You might also like