bayesian phase tracking for multiple pulse signals

10
Bayesian phase tracking for multiple pulse signals Paul D. Teal Victoria University of Wellington, Wellington 6140, New Zealand article info Article history: Received 4 December 2008 Received in revised form 30 October 2009 Accepted 8 January 2010 Available online 18 January 2010 Keywords: Bayesian Phase lock Heart rate Posterior bound abstract The problem of estimating the frequencies and phases of two superimposed pulse-like, repetitive signals is considered. A method of solving this problem based on Bayesian (i.e., sequential Monte-Carlo or particle) filtering is presented. The particular problem motivating the technique is estimation of the rate of maternal and foetal heartbeats, although the technique is applicable to other domains. Aspects of the problem leading to the solution are discussed, and the performance of the proposed technique is presented on both simulated signals and real heart signals. The resulting frequency estimator has very similar functionality to a phase-locked loop, and so the performance measure used is the time to lose phase lock. The estimator is also analysed in terms of the posterior Crame ´ r–Rao bound on the phase estimation accuracy. & 2010 Elsevier B.V. All rights reserved. 1. Introduction Many methods have been proposed in the literature for blind separation of multiple signal sources. In the most general case, both the mixing process and the signals are unknown, even though some of the signal statistics may be known. Where some properties of the mixing process and signals are known, this information can be used in deriving specialised algorithms for particular situations. For example, in [1] the signal (speech) and the channel are both modelled as autoregressive (AR) processes. This enables the formulation of a state-space description, the parameters of which are estimated using a particle filter. The approach does not appear to offer any significant performance benefit for speech, and has not been followed to any great extent in the literature, although [2] presents a marginalised (Rao-Blackwellised) version of the filter. The fact that speech can be effectively modelled as an AR process may actually be less informative for a separation algorithm than the fact that it is non-normal, non-white, and non-stationary, the properties used in the more conventional blind source separation (BSS) approaches. The approach has been used with some advantage in other contexts, such as astrophysical signals [3]. This paper has a similar basis to the papers cited above, but in this case the signals are two or more superimposed repetitive waveforms. These could be any signals, but a particular motivation for this paper is heart beat signalsa maternal and a foetal heart signal. The signal models in this case are much more simple than the AR speech models mentioned above. Furthermore, we have a much more modest signal processing target than recovery of the original signals: we only wish to recover the foetal heart rate (FHR), and in particular the beat to beat variability. The foetal heart signal (FHS) may be the foetal electrocardio- gram (FECG), but could also be a foetal phonocardiogram signal, as the method proposed here can be adapted to either situation. In effect the function we wish to perform is phase tracking. Particle filters have been shown to be effective for this function, and to have advantages over phase-locked loops in terms of acquisition time and mean time between tracking loss [4–6]. This paper builds on this work in two ways: tracking signals that are non-sinusoidal, and tracking multiple signals. Contents lists available at ScienceDirect journal homepage: www.elsevier.com/locate/sigpro Signal Processing ARTICLE IN PRESS 0165-1684/$ - see front matter & 2010 Elsevier B.V. All rights reserved. doi:10.1016/j.sigpro.2010.01.009 E-mail address: [email protected] Signal Processing 90 (2010) 2050–2059

Upload: independent

Post on 14-May-2023

0 views

Category:

Documents


0 download

TRANSCRIPT

ARTICLE IN PRESS

Contents lists available at ScienceDirect

Signal Processing

Signal Processing 90 (2010) 2050–2059

0165-16

doi:10.1

E-m

journal homepage: www.elsevier.com/locate/sigpro

Bayesian phase tracking for multiple pulse signals

Paul D. Teal

Victoria University of Wellington, Wellington 6140, New Zealand

a r t i c l e i n f o

Article history:

Received 4 December 2008

Received in revised form

30 October 2009

Accepted 8 January 2010Available online 18 January 2010

Keywords:

Bayesian

Phase lock

Heart rate

Posterior bound

84/$ - see front matter & 2010 Elsevier B.V. A

016/j.sigpro.2010.01.009

ail address: [email protected]

a b s t r a c t

The problem of estimating the frequencies and phases of two superimposed pulse-like,

repetitive signals is considered. A method of solving this problem based on Bayesian

(i.e., sequential Monte-Carlo or particle) filtering is presented. The particular

problem motivating the technique is estimation of the rate of maternal and foetal

heartbeats, although the technique is applicable to other domains. Aspects of the

problem leading to the solution are discussed, and the performance of the proposed

technique is presented on both simulated signals and real heart signals. The

resulting frequency estimator has very similar functionality to a phase-locked loop,

and so the performance measure used is the time to lose phase lock. The estimator is

also analysed in terms of the posterior Cramer–Rao bound on the phase estimation

accuracy.

& 2010 Elsevier B.V. All rights reserved.

1. Introduction

Many methods have been proposed in the literature forblind separation of multiple signal sources. In the mostgeneral case, both the mixing process and the signals areunknown, even though some of the signal statistics may beknown. Where some properties of the mixing process andsignals are known, this information can be used in derivingspecialised algorithms for particular situations.

For example, in [1] the signal (speech) and the channelare both modelled as autoregressive (AR) processes. Thisenables the formulation of a state-space description, theparameters of which are estimated using a particle filter.The approach does not appear to offer any significantperformance benefit for speech, and has not been followedto any great extent in the literature, although [2] presents amarginalised (Rao-Blackwellised) version of the filter. Thefact that speech can be effectively modelled as an ARprocess may actually be less informative for a separationalgorithm than the fact that it is non-normal, non-white,and non-stationary, the properties used in the more

ll rights reserved.

conventional blind source separation (BSS) approaches.The approach has been used with some advantage in othercontexts, such as astrophysical signals [3].

This paper has a similar basis to the papers cited above,but in this case the signals are two or more superimposedrepetitive waveforms. These could be any signals, but aparticular motivation for this paper is heart beat signals—amaternal and a foetal heart signal. The signal models in thiscase are much more simple than the AR speech modelsmentioned above. Furthermore, we have a much moremodest signal processing target than recovery of theoriginal signals: we only wish to recover the foetal heartrate (FHR), and in particular the beat to beat variability. Thefoetal heart signal (FHS) may be the foetal electrocardio-gram (FECG), but could also be a foetal phonocardiogramsignal, as the method proposed here can be adapted toeither situation.

In effect the function we wish to perform is phasetracking. Particle filters have been shown to be effective forthis function, and to have advantages over phase-lockedloops in terms of acquisition time and mean time betweentracking loss [4–6]. This paper builds on this work in twoways: tracking signals that are non-sinusoidal, and trackingmultiple signals.

ARTICLE IN PRESS

P.D. Teal / Signal Processing 90 (2010) 2050–2059 2051

The FHR and rate variability is particularly useful duringbirth for identifying both the effects of the contractions onfoetal heart rate and the trend of these effects. Variationeach time the foetus moves is normal, so for instance, aheart rate which is too constant may indicate that oxygendeprivation has caused the foetus to lose the ability toregulate its heart rate. Very high rates or very low rates canalso indicate problems. Much more detail on the inter-pretation of FHR can be found in [7]. Heart rate variabilitymay also be an indicator of some aspects of foetaldevelopment [8].

Monitoring the foetal heart rate electronically hastypically been performed in two stages. The FHS isfirst extracted from the maternal/foetal signal mixture,and then the FHR is determined from the FHS. By contrast,the approach described in this paper estimates the FHRdirectly from the signal mixture. Another significantchallenge, and difference in the approach presented in thispaper, is that the FHR is determined from a single channel,rather than the multiple channels more commonly used. Abrief and necessarily incomplete survey of published workon the two stages above is contained in the next twoparagraphs.

For extracting the FHS, Ref. [9] presents a survey oftechniques available in 1990, based primarily on singularvalue decomposition. An approach based on projection ofthe phase-space representation of the signal ontoan attractor is presented in [10]. Most of the paperssince then have been based on BSS techniques such asindependent component analysis e.g. [11,12]. Someother papers have used features extracted using waveletdecomposition [13]. Recognising that the mixing processesmay be non-linear, other researchers have used aseparate maternal heart sensor, and used various meansto suppress the maternal heart beat from the mixturesignal [14,15]. A more recent survey of methods ispresented in [16]. The papers [17,18] differ from mostother FHR papers in that the input signal is the foetalphonocardiogram rather than the ECG. Ref. [17] useswavelet based noise cancellation followed by a statemachine to track the FHR.

There have been many algorithms proposed for findingheart rate from electrocardiogram (ECG) or acoustic signals.The most primitive algorithms involve determining thetime between successive R wave peaks. For such methodsto operate, the permissible noise level is very low. Themethod proposed in [19] uses calculation of the instanta-neous frequency followed by some adaptive windowing,and is more robust. This is extended to the FHR situation in[20].

Papers close to the current work in terms of the problemdomain are [20,21], in that the FHR is extracted in a singlestage from a single channel. However, the instantaneousfrequency approach used there is quite different.

The approach here is applicable to many situationsbeyond the tracking of FHR, and provides a more powerfulframework for solving problems such as those described in[22,23], including analysis of rotating machine (particularlyif it is faulty) and neural tremor. Bayesian techniques havebeen applied in [24] to the tracking of multiple sinusoidssuperposed into a single observation signal. This is of

course a very similar situation to the present study, exceptthat phase information is available there at all times. Oursimulations (not detailed here) show that the performancewhen tracking the phases of sinusoids is very much greaterthan when tracking the pulse-like signals of interest in thispaper.

In Section 2 two different but related models ofthe system of oscillators are introduced, the first a‘‘canonical’’ model, and the second more specialised forheart rate estimation. In Section 3 the Bayesian estimationtechnique is presented, along with some discussion of howthe features of the model influence the way the estimator isdesigned. Section 4 contains the results of simulationsusing the estimation technique for each of the two models.The technique is demonstrated on a real data set in Section5, and Section 6 concludes the paper. The derivation of theCramer–Rao bound and some graphs illustrating it areshown in the Appendix.

2. System models

2.1. Pulse system model

The system state model consists of a phase, a log-amplitude and a frequency for each of the M signals present:xt ¼ ðf1; . . . ;fM ;B1; . . . ;BM ;o1; . . . ;oMÞ

T . The variation inthe frequency and amplitude are modelled as Brownianmotion:

om;t ¼om;t�1þZo;m; ð1Þ

Bm;t ¼ Bm;t�1þZB;m; ð2Þ

f0m;t ¼fm;t�1þom;t�1DtþZf;m; ð3Þ

fm;t ¼mod ðf0m;t ;2pÞ: ð4Þ

Each of the terms Z ., m is assumed to be whiteindependent normal noise, having zero mean, andEfZ2

o;mg ¼ s2o;m, EfZ2

B;mg ¼ s2B;m, EfZ2

f;mg ¼ s2f;m. The interval

between samples Dt is chosen to be unity throughout theremainder of this paper. The relation in timing betweensuccessive heart beats can be much more complex thansuggested by this model [25], and up to 20% variation iscommon. However, this simple model is adequate to allowestimation of the timing.

The variance of the Brownian motion model increaseswith time, which will not be the case for any real signaltracked. This was found not to be a cause of any problemsfor actual implementation of the filter, althoughfor theoretical analysis, the model is modified slightlyto the auto-regressive model shown in (9). The amplitudeis actually a nuisance parameter—but necessary forcoping with variation in the amplitude of the inputsignals.

To verify the procedure, we first use a very simpleobservation model: each time the phase fm exceeds 2p, apulse is generated:

yt ¼XM

m ¼ 1

eBm;twðf0m;t 42pÞþZy; ð5Þ

ARTICLE IN PRESS

Fig. 1. Scatter diagram showing the phase and frequency information of a

collection of particles. The true phase and frequency are shown by the circles,

and the weighted means of the particles are shown by the asterisks. The

particle cloud nearer the bottom of the figure is smaller because it represents

a signal for which a pulse has more recently occurred.

P.D. Teal / Signal Processing 90 (2010) 2050–20592052

where w is the indicator function and EfZ2yg ¼ s2

y . As well asproviding a first approximation to the R wave of heartbeatsignals, this model may also find application in the analysisof faulty rotating machinery, where a pulse of some kind isproduced at a particular point in the rotation cycle. Weassume that the bandwidth of the pulses is low enough orequivalently, that the sampling rate is sufficiently high,that no pulse is ever missed.

This model represents what is perhaps the ‘‘worst case’’in that it is the most difficult periodic function for which itmight be possible to track the phase. It is difficult becauseno information on the phase is available from theobservations in the time interval between pulses. Themodel is a very simple approximation to a heart beat signal,so it clarifies some of the decisions involved in designing arobust estimation technique.

2.2. System model II

A somewhat more realistic model for heartbeat mix-tures was obtained by using synthetic ECG signals. Thestate transition update is unchanged from the previousmodel, but the observation equation is modified to moreclosely resemble typical ECG signals. The model is asimplified version of that presented in [26], which uses adynamical model with separate Gaussian pulses for each ofthe P, Q, R, S and T components. The approach used was togenerate a large amount of data for a single heartbeat usingthe model of [26], and then to create a histogram for theoutput level of a single heartbeat—one histogram for eachphase value f of a fine grid on ½0;2pÞ. Each histogramwas then approximated by a normal distributionz�N ðmðfÞ;s2ðfÞÞ. The mean mðfÞ of these normal dis-tributions as a function of f resembles a heart signal, andwas approximated by a model similar to that used togenerate the original data. A gradient descent algorithmbased on a squared loss metric was used to find theposition tk, width bk and amplitude ak of each of the fivepulses mentioned above, plus one DC offset. A similarapproach was used for the square root sðfÞ of the variance,but in this case only two pulses plus an offset wererequired.

In effect then, the model is the same as that in Section2.1 except that (5) is replaced by

yt ¼XM

m ¼ 1

eBm;t a0þX5

k ¼ 1

ake�ðf0

m;t�tkÞ2=ð2b2

!

þZy a6þX8

k ¼ 7

ake�ðf0

m;t�tkÞ2=ð2b2

!; ð6Þ

where the terms a0; . . . ; a5 represent the signal mean, anda6; . . . ; a8 represent the signal (root) variance.

3. Estimator design

In this paper we use a particle filter to estimate the stateof this system. Any reader unfamiliar with this technique isreferred to e.g. [27]. In this section we particularly considerthe issues involved in the design of the filter for the modelswe have presented.

As stated above, in the pulse model, there is no

observational information between pulses which might beused to differentiate between any hypotheses which do nothypothesise a pulse. It is therefore difficult to formulate animportance distribution for hypothesising new particles ofthe form pðxtjxt�1;ytÞ, although this is known to be optimal[28]. Instead we must fall back on the simpler, but lessoptimal pðxtjxt�1Þ.

It is easy to see that with this model, optimal estimatesof the heart rates will be provided by a smoothingrather than a filtering approach: once a pulse arrives, it ispossible to find an optimal evolution in frequency andphase that explains the timing of the pulse, whereas beforethe pulse arrives there is little option but to allow theparticles to ‘‘wander,’’ and the estimation variance toincrease. Suppose for example that there is approximatelyone pulse for every 10 observations. The error in any phaseestimate may be as large as 72p=10 before there is anypossibility of noticing the error, and so the ‘‘radius’’ of theparticle cloud in the direction of the phase estimate mustbe at least as large as this if the filter is not to lose lock. Thisthought lies behind the music beat tracking examplereferred to in [29]. Fig. 1 presents a scatter diagramshowing the phase and frequency information of acollection of particles. This plot is typical in that theparticles representing the heart signal that has mostrecently output an R wave peak are fairly tightlyclustered, whereas those representing the signal that isclose to approaching its next R wave peak are much morewidely spread. Re-sampling of the particles, which istriggered by very large variance in the weights of theparticles usually occurs when the R wave arrives.

Because of the lack of information between pulses, weexpect that the number of particles required for the filter towork well will be quite large. Various methods ofimproving the performance have been considered. Detailedpresentation of the results is contained in Section 4, but

ARTICLE IN PRESS

P.D. Teal / Signal Processing 90 (2010) 2050–2059 2053

some avenues of investigation are mentioned here ratherthan in the results section because they were investigatedand eliminated.

The model of (1)–(5) is an instance of Model 4 of [30]:having linear state equation, normal noise, and onlythe observation equation containing nonlinear compo-nents. We might expect therefore that a marginalisedform of the particle filter would have improved perfor-mance. The phase and amplitude are the non-linearcomponents xn, and the frequency (on which theobservation does not directly depend) is the linearcomponent xl. Using the notation of [30], the system modelcan be written as

xntþ1 ¼ xn

t þAnxltþwn

t ;

xltþ1 ¼ Alxl

tþwlt ;

yt ¼ htðxnt Þþet ; ð7Þ

with wnt �N ð0;QnÞ, wl

t �N ð0;QlÞ, and et �N ð0;RÞ. A per-formance comparison of the standard and marginalisedfilters is presented in Section 4.1.

An important consideration in the design of anysequential Monte-Carlo system is the fact that the weightsassigned to each of the particles can only increase withtime, and eventually all but one of the particles hasnegligible weight. This is especially significant for theproblem under consideration here, where there are longperiods of time during which no information is available. Asimple measure of this degeneracy effect is the effectivesample size, which can be approximated by the inverse ofthe sum of the squared weights [31]. The usual approach tothis problem is to resample the particles, either on everytime step, or when the effective sample size falls belowsome threshold. This restores equal weighing to theparticles, and effectively eliminates particles of smallweights, producing a larger concentration of particleshaving large weights.

The auxiliary particle filter [32] has been found to offersome performance improvement in many applications, byusing the new observation at each stage to propagate thoseparticles which have a higher likelihood of surviving anysubsequent resampling. In this application, however, im-plementation of the auxiliary filter did not result in anyimprovement. This is because of the lack of usefulinformation between pulses on which to base the selectionprocess in the auxiliary filter. The benefit gained for thesmall number of observations which do include a pulse didnot compensate for the additional processing involved.

The most fundamental difficulty in Bayesian tracking inthis application is the same as that encountered in the moreclassical multiple target tracking: as the number of oscilla-tors1 increases, the proportion of the state space that is filledwith regions of reasonably high likelihood becomes progres-sively smaller. If a particle hypothesises an improbable statefor one of two oscillators, but a highly probable state for theother, the overall probability of the particle will be low, and it

1 Rather than calling each of the sub-systems targets, we will call

them oscillators.

will be rejected whenever resampling occurs. This difficulty isovercome in [33] by adapting the technique proposed in [34]of partitioning of the state space.

As in [33], we assume that the prior density, likelihoodfunctions, and importance sampling functions are allseparable into independent partitions, with each partitioncontaining the state information relating to one oscillator.If then, there are two particles which hypothesise the statesof oscillators A and B as fA1;B1g and fA2;B2g, then thedensity of the state information contained in these particleswill be unchanged if we swap the oscillator information toproduce the particles fA1;B2g and fA2;B1g, but in the processof doing so, we may have produced a particle that hasmuch higher likelihood than either of the original particles.

This information interchange is not performed directly,but is effectively achieved by resampling the stateinformation separately for each of the oscillators, whilethe state information for the remaining oscillators is fixedat the best available estimate of the maximum likelihood.

The objection to the auxiliary filter, mentioned above, isalso applicable to the partitioned state-space filter. Thepartitioning is done around the maximum likelihoodestimate of the state space, and in the absence of a pulse,the likelihood function can be very broad, and so thelocation of its maximum may be rather uninformative.However, the fact that the partitioned state-space filterdeals effectively with the multiple oscillator issues when

pulses are present was found to be worth the computationalcost of its implementation.

A problem common to phase-locked loops and otherperiodic signal trackers is for the system to lock onto amultiple or sub-multiple of the true fundamental. Weconsidered reducing the probability of this occurring byintroducing (just prior to any resampling operation) a verysmall proportion of particles at multiples and sub-multi-ples of the frequencies hypothesised by some of theparticles. This of course increases the probability that afalse lock may be created, although it is normally of shortduration before the correct frequency is again located. Inpractice the possibility of multiple or sub-multiple lockingwas not found to be a significant source of error, and theimplementation of this feature was removed withoutperformance degradation.

The partitioned and marginalised version of the algo-rithm is outlined in Algorithm 1. It is implied in this listingthat any operations involving hypothesised state variables,or outputs depending on those hypotheses are replicatedacross all the N particles. This considerably simplifies thenotation. The version of the algorithm without margin-alisation is very similar, except that the last few lines aresimpler. The stratified algorithm as presented in [35] isused for resampling.

Algorithm 1. Partitioned and Marginalised Particle Filter-ing Algorithm

Initialise P0j�1 ¼ so;0I

Initialise N particles x0j�1 having fm � Uð0;2pÞ,Bm �N ðmB;0;s2

B;0Þ,

om �N ðmo;0 ;s2o;0Þ

Initialise weights wðiÞ ¼ 1=N

for t40 do

ARTICLE IN PRESS

P.D. Teal / Signal Processing 90 (2010) 2050–20592054

Obtain the index j of the most likely particle : ðCalculate

w0t ¼ pðyt jxntjt�1Þ using yt ¼ ht ðxn

tjt�1Þ; e t ¼ yt�y t ;

ptpexpð�etReTt =2Þ; w0t ¼wtp and then j¼ argminiw

ðiÞt Þ

For each oscillator; find the likelihood with the remaining

oscillators having maximum likelihood : i:e:;

for m¼ 1; . . . ;M do

w000

t ¼ 1=N

x0nðiÞm0 ;tjt�1 ¼ xnðiÞm;tjt�1jfor m0am

x0nðiÞm;tjt�1 ¼ xnðjÞm0 ;tjt�1jfor m0 ¼ m

Calculate w00

t ¼ pðyt jx0ntjt�1Þ

Normalise ~w00

t ¼w00

t =PN

i ¼ 1 w00

t

Resample N particles for oscillator m with replacement :

Prðxnm;tjt�1 ¼ x0nm;tjt�1Þ ¼

~w00

t

w000

t ¼w000

t~w00

t

666666666666666666664Evaluate the importance weights qt ¼ pðyt jxn

tjt�1Þ

wtþ1 ¼wtqt=w000

t

Normalise ~wt ¼wt=PN

i ¼ 1 wt

if 1=PN

i ¼ 1 w2t oN=2 then

Resample N particles with replacement Prðxtjt ¼ x0tjt�1Þ ¼~w00

t

and reinitialise weights:

$

f nt ¼ xn

tjt

Nt ¼ AnPtjtðAnÞTþQ n

Sample xn;ðpÞtþ1jt �N ðf n

t þAtxltjt ;NtÞ

zt ¼ xntþ1jt�f n

t

Lt ¼ AlPtjtðAnÞT N�1

t

Ptþ1jt ¼ AlPtjtðAlÞTþQl�LtNtLT

t

xltþ1jt ¼ Alxl

tjtþLt ðzt�Anxltjt Þ

6666666666666666666666666666666666666666666666666666666666666666666666664

Fig. 2. An example cumulative distribution function for the time to lose

lock, compared to a gamma density having shape parameter k¼ 0:72.

Fig. 3. Dependence of time to lose lock on the number of particles used.

The mean and 10% and 90% percentiles are shown for 500 trials. The solid

lines show the performance for the partitioned particle filter, and the

dashed lines for the partitioned and marginalised filter.

4. Results

4.1. Results for a pulse model

The ultimate goal of heart beat tracking is to estimatethe repetition rate, and the beat-to-beat variability inparticular. The error in estimating the rate was found to bevery low provided the particle filter does not lose phase-lock. Hence the performance measure of the estimator ischosen to be the mean time to lose lock (MTLL) assuggested in [5].

Unless specified otherwise, the simulated model had thefollowing parameter values: M¼ 2, sy ¼ 0:05, so ¼ 0:005,sf ¼ 0:001, sB ¼ 0:01. The sample rate was fs ¼ 40 Hz, andthe number of particles N¼ 1000.

Phase lock was declared lost when the error in the meanphase exceeded 1.5 rad in 80% of the previous 30 estimates.This appears at first to be a rather ‘‘lax’’ criterion for loss ofphase lock, but the system was surprisingly robust—able torecover from quite large errors without losing lock.

When the results for a large number of identicalscenarios are combined, the time to lose lock appears tobe approximately exponentially distributed: there are alarge number of trials for which the performance is poor,with the filter not obtaining lock or losing it very quickly,with a smaller number of trials for which the lock isretained for very long periods. The gamma distribution,having an extra shape parameter k, allows a better fit thanthe exponential, and the parameter for most of theexperiments is about k� 0:7. An example cumulative

distribution function, together with actual values, is shownin Fig. 2. The Pareto distribution was also tried but notfound to fit the data well.

The time to lose lock is clearly dependent on thenumber of particles used, and this is shown in Fig. 3. It isclear from this figure that there is no significant differencein the performance of the marginalised filter, although themarginalised filter is slightly more computationallyefficient.

The dependence on the signal to noise ratio (SNR) isshown in Fig. 4. In this figure, the noise variance used forcomparing particles with the observations for SNRexceeding 20 dB was maintained at the same level as for20 dB. Failure to do this resulted in the performanceactually decreasing for increasing SNR because ofinadequate particle diversity.

It was found that the SNR of the weakest signal is thedetermining factor in the time to lose lock, since we declare

ARTICLE IN PRESS

Fig. 6. An example set of histograms for different values of the phase of a

single real ECG signal, with the darkest shading indicating largest

probability of occurrence.

Fig. 5. Dependence of time to lose lock on the number of particles used

when using a synthetic heartbeat model. The mean and 10% and 90%

percentiles are shown for 500 trials.

Fig. 4. Dependence of time to lose lock on the observation signal to noise

ratio.

P.D. Teal / Signal Processing 90 (2010) 2050–2059 2055

lock to be lost when the phase estimation error for any ofthe oscillators is excessive (this is confirmed in the resultsfor the Cramer–Rao bound shown in Fig. 9). This meansthat the approach will not be effective in the foetal heart-rate estimation problem if the noise level is much largerthan the foetal heart signal. It should be noted however,that this performance limit discussed in Appendix A willapply to any method used to estimate foetal heart rate froma single sensor.

The particles are initialised with uniformly distributedphases, and normally distributed log-amplitudes andfrequencies. A proportion of the simulations never acquiredstable lock, and it is these that account for the large numberof very low lock times shown in Fig. 2. The relative phasef1;0�f2;0 of the two oscillators at this crucial lock-acquisition stage could feasibly have been a determiningfactor of the performance. However, a set of simulationsconducted to investigate the issue found no significanteffect.

An investigation was also performed into the behaviourof the estimator when the two signals were close infrequency. This was also found to not cause significantdegradation in performance.

4.2. Results for a heart model

When using the model presented in Section 2.2, someinformation is available in the observations even betweenthe main R waves of each signal. Not surprisingly theperformance is somewhat improved, as shown by compar-ing Fig. 5 with Fig. 3, although the increase is not largesince the signal is still quite pulse-like.

5. Real ECG data

The algorithm was also applied to real ECG signals,though at this stage of the research we have not attemptedto separate real foetal and maternal heartbeat signals. Themethod does, however, work very well on two heartbeat

signals of different amplitudes and rates that have beensynthetically mixed.

At the heart of sequential Bayesian estimation is therelation

pðxtjy1:tÞppðytjxtÞpðxt jy1:t�1Þ ð8Þ

and so it is important to be able to assign a probabilitydensity pðytjxtÞ to the state xt hypothesised by each particle,and each observation yt . The components of the state xt onwhich the observation yt depends are the log-amplitudesBm;t and the phases fm;t . Rather than using a pulse-plus-noise model such as (5), we can approximate theprobability density using a histogram compiled from alarge amount of single channel ECG data. This was done bygenerating a histogram of amplitude for each of 90 equallyspaced intervals of f of the range ½0;2pÞ. The amplitudeswere normalised in every case by the maximum value ofthe nearest R wave. The results are shown Fig. 6. Thehistogram for each interval of f is represented by a vertical

ARTICLE IN PRESS

Fig. 7. A cumulative distribution function for the time to lose lock, based on real ECG signals. The axis scale is the same as for Fig. 2.

P.D. Teal / Signal Processing 90 (2010) 2050–20592056

strip of the figure, with high frequency of occurrence (andhence approximated probability), represented by thedarkest shading.

We assume that the two heart beat signals are indepen-dent, so the probability density of their sum can be foundfrom convolution of the marginal densities, e.g. [36]. Giventhe hypothesised phases and amplitudes of each of two heartbeats, it is then possible to calculate an approximation ofpðytjf1;t ;f2;t ;B1;t ;B2;tÞ as required for the particle filter.

This histogram was generated off-line before runningthe particle filter. It may be possible to initialise the systemusing generic heartbeat histograms, and then refine thesehistograms to a particular scenario while the filter isrunning to improve the performance of the system as moresignals are acquired. However, in the current implementa-tion this was not attempted.

Several heartbeat signals were acquired from [37], eachhaving quite widely varying rates. The two signals weresimply added to each other and presented to the algorithmso the performance of the proposed particle filter could beevaluated. In this case we only used one pair of heartsignals, although different segments of each signalwere combined with different time-lags (phases) to gen-erate each data set. A cumulative distribution function ofthe result is shown in Fig. 7. Since the data used here arereal heartbeat data, the process parameters so, sB and sfare not precisely known, even if the model is appropriate.However, the mean time to lose lock of 172 s is consistentwith the results produced on the simulated data.

6. Conclusions

We have presented an application of Bayesian filteringto the problem of estimating the phase and frequency of

two or more superimposed repetitive waveforms. Themethod suffers from the same data association difficultiesencountered when using Bayesian techniques for multi-target tracking problems. However, the approach ofpartitioning the state space for each of the oscillators hasbeen found to be effective in coping with this problem. Themethod has been proven to be effective on models ofrepetitive pulses including heartbeat-like signals, as well ason real data containing superimposed ECG signals.

Future work will extend this work to a situation wherethere are multiple sensors (observations) of the signalmixture. This will allow a direct comparison with other BSSmethods, such as those based on non-normality or non-stationarity of the signals.

Acknowledgement

The author would like to thank Petr Tichavsky for veryhelpful correspondence on [39].

Appendix A. Cramer–Rao bound

We would like to be able to discover the accuracy withwhich the phase and frequency of the superimposed signalscan be estimated, using any estimator. This appendixpresents the Cramer–Rao bound for this problem. We havenot yet been able to produce from this analysis a bound onthe mean time to lose phase lock, and this is the subject offurther research, using the approach presented in [38].

We make some slight modifications to the model tomake it tractable to analytic methods of calculation of theposterior bound for estimation of the model parameters.The first is to ensure a limiting distribution for the

ARTICLE IN PRESS

Fig. 8. Dependence on the phase process noise sf of the Cramer–Rao

bound for estimation of fm .

Fig. 9. Dependence on the signal (log) amplitude mean m01 of the Cramer–

Rao bound for estimation of fm. The plot of m2 is very similar.

P.D. Teal / Signal Processing 90 (2010) 2050–2059 2057

log-amplitudes B. A normal distribution with mean m0m andvariance s02B;m can be achieved by altering the random walkof (2) to

Bm;t ¼ rmBm;t�1þmmþZB;m ð9Þ

where rm ¼

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi1�s2

B;m=s02B;mq

and mm ¼ m0mð1�rmÞ. The secondalteration is to introduce a random initial phase gm which iscommon for the entire process for all t, but is randomamong different realisations of the process. This is toenable the expectation required in the calculation of theFisher information matrix to be independent of the phaseat any instant.

A third alteration is that the output is a single narrowbut continuous pulse when mod ðfm;t ;2pÞ is near zero,rather than the discontinuous pulse of the earlier model.Thus (3)–(5) are replaced by

fm;t ¼fm;t�1þom;t�1þZf;m; ð10Þ

yt ¼XM

m ¼ 1

eBm;t cos2nððfm;tþgmÞ=2ÞþZy: ð11Þ

For large integer values of n and for jfjop, cos2nðf=2Þ veryclosely resembles a Gaussian pulse, expð�f2=ð2s2

pÞÞ, withsp � 1:357=

ffiffiffinp

but has the advantage of being inherentlyperiodic, and also allowing analytic integration.

For deriving the bound, we assume that the maximumlikelihood estimator is used, which is at least asymptoti-cally unbiased, allowing the use of the theorems of [39]. Fortime-invariant state equations, the posterior Fisher infor-mation matrix for the state vector xt is then given by J1which obeys the recursion

J1 ¼D22t �D21

t ðJ1þD11t Þ�1D12

t : ð12Þ

The matrices D21t ¼ ½D

12t �

T and D11t are very simple to

derive from the linear state equations above. D22t is not so

simple, and so is given below for a system having M¼ 2oscillators:

D22t ¼Q�1þ

1

s2y

P; ð13Þ

where

Q ¼ diagðs2f;1;s

2f;2;s

2B;1;s

2B;2;s

2o;1;s

2o;2Þ ð14Þ

and P is the zero matrix except for the following elements:

P11 ¼ e2s02

B;1 e2m1 n2I1ðnÞ; ð15Þ

P22 ¼ e2s02

B;2 e2m2 n2I1ðnÞ; ð16Þ

P33 ¼ e2s02

B;1 e2m1 I2ðnÞ; ð17Þ

P44 ¼ e2s02

B;2 e2m2 I2ðnÞ; ð18Þ

P34 ¼ P43 ¼ eðs02

B;1þs0

2

B;2Þ=2em1þm2 I3ðnÞ; ð19Þ

where

I1ðnÞ ¼1

2p

Z p

�pcos4n�2ððfþgÞ=2Þ sin2

ððfþgÞ=2Þdg

� 0:1018n�3=2; ð20Þ

I2ðnÞ ¼1

2p

Z p

�pcos4nððfþgÞ=2Þdg� 0:3959n�1=2; ð21Þ

I3ðnÞ ¼1

2p

Z p

�pcos2nððf1þg1Þ=2Þdg1

1

2p

Z p

�pcos2nððf2þg2Þ=2Þdg2

� 0:3134=n: ð22Þ

The integrals I1, I2 and I3 can be solved analytically, but theapproximations above are adequate for our purposes. Weuse the symbol s2

yto represent the variance of the error in

estimation of parameter y.Except for extreme values of the parameters, the

posterior bound for frequency estimation is found to beindependent of other parameters, and is given simply by

s2o � s

2o;m: ð23Þ

It is not surprising that the variance of the estimation erroris no smaller than the variance of the quantity itself: it isperhaps slightly surprising that the bound on estimationaccuracy is no larger than the variance.

ARTICLE IN PRESS

Fig. 12. Dependence on the pulse width sp of the Cramer–Rao bound for

estimation of fm.

Fig. 10. Dependence on the signal (log) amplitude variance s02B of the

Cramer–Rao bound for estimation of fm .

Fig. 11. Dependence on the observation noise level sy of the Cramer–Rao

bound for estimation of fm.

P.D. Teal / Signal Processing 90 (2010) 2050–20592058

The bound for estimation of the phases is morecomplicated, and is shown in Figs. 8–12. For each of thesefigures, the curve marked by circles represents the boundon the variance of estimation of f1, and the curve markedby asterisks represents the bound on the variance ofestimation of f2.

Unless they are the abscissa of one of these plots, theparameters for the graphs are M¼ 2, sf ¼ 0:001,so ¼ 0:005, s0B ¼ 0:1, sy ¼ 0:05, sp ¼ 0:05, m01 ¼ 2 and m02 ¼ 3.

References

[1] C. Andrieu, S.J. Godsill, A particle filter for model based audio sourceseparation, in: International Workshop on Independent ComponentAnalysis and Blind Signal Separation, Helsinki, Finland, June 2000, pp.381–386.

[2] M.J. Daly, J.P. Reilly, J.H. Manton, A Bayesian approach to blind sourcerecovery, in: Thirty-Eighth Asilomar Conference on Signals, Systemsand Computers, vol. 1, November 2004, pp. 989–993.

[3] M. Costagli, E.E. Kuruo �glu, A. Ahmed, Astrophysical source separationusing particle filters, in: Independent Component Analysis and BlindSignal Separation, Springer, Granada, Spain, September 2004, pp.930–937.

[4] P.O. Amblard, J.M. Brossier, E. Moisan, Phase tracking: what do wegain from optimality? Particle filtering versus phase-locked loops,Signal Processing 83 (2003) 151–167.

[5] E. Fischler, B. Bobrovsky, Mean time to lose lock of phase tracking byparticle filtering, Signal Processing 86 (11) (2006) 3481–3485.

[6] E.E. Tsakonas, N.D. Sidiropoulos, A. Swami, Optimal particle filters fortracking a time-varying harmonic or chirp signal, IEEE Transactionson Signal Processing 56 (10) (October 2008) 4598–4610.

[7] U. Elkayam, N. Gleicher (Eds.), Cardiac Problems in Pregnancy:Diagnosis and Management of Maternal and Fetal Heart Disease,third ed., Wiley, 1998.

[8] J.C. Echeverrıa, M.S. Woolfson, J.A. Crowe, B.R. Hayes-Gill, J.F. Pieri, C.J.Spencer, D.K. James, Does fractality in heart rate variability indicatethe development of fetal neural processes?, Physics Letters A 331(2004) 225–230

[9] D. Callaerts, B. De Moor, J. Vandewalle, W. Sansen, G. Vantrappen, J.Janssens, Comparison of SVD methods to extract the foetal electro-cardiogram from cutaneous electrode signals, Medical and BiologicalEngineering and Computing 28 (3) (May 1990) 217–224.

[10] M. Richter, T. Schreiber, D.T. Kaplan, Fetal ECG extraction withnonlinear state-space projections, IEEE Transactions on BiomedicalEngineering 45 (1) (January 1998) 133–137.

[11] V. Vigneron, A. Paraschiv-Ionescu, A. Azancot, O. Sibony, C. Jutten,Fetal electrocardiogram extraction based on non-stationary ICA andwavelet denoising, in: International Symposium on Signal Processingand its Applications, vol. 2, Paris, France, July 2003, pp. 69–72.

[12] S.D. Parmar, H.K. Patel, J.S. Sahambi, Separation performance of ICAalgorithms on FECG and MECG signals contaminated by noise, in:Asian Applied Computing Conference, Kathmandu, Nepal, October2004, pp. 184–190.

[13] A. Khamene, S. Negahdaripour, A new method for the extraction offetal ECG from the composite abdominal signal, IEEE Transactions onBiomedical Engineering 47 (4) (April 2000) 507–516.

[14] K. Assaleh, H. Al-Nashash, A novel technique for the extraction offetal ECG using polynomial networks, IEEE Transactions on Biome-dical Engineering 52 (6) (June 2005) 1148–1152.

[15] K. Assaleh, Extraction of fetal electrocardiogram using adaptiveneuro-fuzzy inference systems, IEEE Transactions on BiomedicalEngineering 54 (1) (January 2007) 59–68.

[16] J. Li, J.A. Crowe, B.R. Hayes-Gill, M.S. Woolfson, Comparison ofalgorithms to extract the fetal electrocardiogram from the maternalabdomen, in: European Medical and Biological EngineeringConference, Vienna, Austria, December 2002.

[17] P. Varady, W. Wildt, Z. Benyo, A. Heim, An advanced method in fetalphonocardiography, Computer Methods and Programs in Biomedi-cine 71 (2003) 283–296.

[18] M. Godınez, A. Jimenez, R. Ortiz, M. Pena, On-line fetal heart ratemonitor by phonocardiography, in: 25th Annual InternationalConference of the IEEE Engineering in Medicine and BiologicalSociety, Mexico, September 2003, pp. 3141–3144.

ARTICLE IN PRESS

P.D. Teal / Signal Processing 90 (2010) 2050–2059 2059

[19] A.K. Barros, N. Ohnishi, Heart instantaneous frequency: an alter-native approach to extract heart rate variability, IEEE Transactions onBiomedical Engineering 48 (8) (August 2001) 850–855.

[20] A.K. Barros, N. Ohnishi, Fetal heart rate variability extraction byfrequency tracking, in: International Conference on IndependentComponent Analysis and Blind Signal Separation, San Diego,California, December 2001, pp. 150–154.

[21] P. Gao, E. Chang, L. Wyse, Blind separation of fetal ECG from singlemixture using SVD and ICA, in: International Conference onInformation, Communications and Signal Processing, vol. 3, Singa-pore, December 2003, pp. 1418–1422.

[22] P.J. Parker, B.D.O. Anderson, Frequency tracking of nonsinusoidalperiodic signals, Signal Processing 20 (1990) 127–152.

[23] S. Kim, J. McNames, Tracking tremor frequency in spike trains usingthe extended Kalman filter, in: Proceedings of the Engineering inMedicine and Biology, Shanghai, China, September 2005.

[24] D. Clark, A. Cemgil, P. Peeling, S. Godsill, Multi-object tracking ofsinusoidal components in audio with the Gaussian mixture prob-ability hypothesis density filter, in: IEEE Workshop on Applicationsof Signal Processing to Audio and Acoustics, New Paltz, NY, October2007, pp. 339–342.

[25] M. McGuinness, Y. Hong, D. Galletly, P. Larsen, Arnold tongues inhuman cardiorespiratory systems, Chaos 14 (1) (March 2004) 1–6.

[26] P.E. McSharry, G.D. Clifford, L. Tarassenko, L.A. Smith, A dynamicalmodel for generating synthetic electrocardiogram signals, IEEE Transac-tions on Biomedical Engineering 50 (3) (March 2003) 289–294.

[27] A. Doucet, N. de Freitas, N. Gordon (Eds.), Sequential Monte CarloMethods in Practice, Springer, New York, 2001.

[28] A. Doucet, On sequential simulation-based methods for Bayesianfiltering, Technical Report TR.310, Department of Engineering,University of Cambridge, UK, 1998.

[29] M. Klaas, M. Briers, N. de Freitas, S. Maskell, D. Lang, Fast particlesmoothing: if I had a million particles, in: Proceedings of the 23rdInternational Conference on Machine Learning, Pittsburgh, June 2006.

[30] T. Schon, F. Gustafsson, P. Nordlund, Marginalized particle filters formixed linear/nonlinear state-space models, IEEE Transactions onSignal Processing 53 (7) (July 2005) 2279–2289.

[31] J.S. Liu, R. Chen, Sequential monte carlo methods for dynamicalsystems, Journal of American Statistical Association 93 (1998)1032–1044.

[32] M.K. Pitt, N. Shepherd, Auxiliary variable based particle filters, in: A.Doucet, N. de Freitas, N. Gordon (Eds.), Sequential Monte CarloMethods in Practice, Springer, Berlin, 2001, pp. 273–293.

[33] M. Orton, W. Fitzgerald, A Bayesian approach to tracking multipletargets using sensor arrays and particle filters, IEEE Transactions onSignal Processing 50 (2) (February 2002) 216–223.

[34] J. MacCormick, M. Isard, Partitioned sampling, articulated objects,and interface quality hand tracking, in: Proceedings of the EuropeanConference on Computer Vision, Dublin, June 2000.

[35] G. Kitagawa, Monte Carlo filter and smoother for non-Gaussiannonlinear state space models, Journal of Computational andGraphical Statistics 5 (1) (1996) 1–25.

[36] A. Papoulis, Probability, Random Variables and Stochastic Processes,McGraw-Hill, New York, 1965.

[37] A.L. Goldberger, L.A.N. Amaral, L. Glass, J.M. Hausdorff, P.Ch. Ivanov,R.G. Mark, J.E. Mietus, G.B. Moody, C.-K. Peng, H.E. Stanleya,PhysioBank, PhysioToolkit, and PhysioNet: components of a newresearch resource for complex physiologic signals, Circulation 101(23) (June 2000) e215–e220 Circulation Electronic Pages: /http://circ.ahajournals.org/cgi/content/full/101/23/e215S.

[38] B.Z. Bobrovsky, Z. Schluss, A singular perturbation method forcomputation of the mean first passage time in a nonlinear filter,SIAM Journal on Applied Mathematics 42 (1) (February 1982)174–187.

[39] P. Tichavsky, C.H. Muravchik, A. Nehorai, Posterior Cramer–Raobound for discrete-time nonlinear filtering, IEEE Transactions onSignal Processing 46 (5) (May 1998) 1386–1396.