fig8 gives an overview over the environment in which the claimed invention is used . fig8 shows a pacemaker pm with an atrial input connector 10 and a ventricular input connector 12 . the pacemaker pm is connected to a pacing and sensing electrode lead 20 having two atrial electrodes 22 and 24 and two ventricular electrodes 26 and 28 . the atrial electrodes 22 and 24 are connected to the atrial connector 10 via leads 32 and 34 . likewise , the ventricular electrodes 26 and 28 are connected to the ventricular connector 12 via leads 36 and 38 . the ventricular electrodes 26 and 28 are placed in the apex of the right ventricle rv of a human heart . the atrial electrodes 22 and 24 are placed in the right atrium ra of the human heart . the electrode lead 20 is fed to the right atrium ra and the right ventricle rv via the vena cava superior vcs . the arrangement shown in fig8 is generally known . with respect to the claimed invention it should be noted , that the atrial electrodes 22 and 24 serve for sensing an atrial intracardiac electrogram . as already pointed out , this atrial intracardiac electrogram not only represents the near - field atrial signal ( near - field atrial myocardal potentials ) but is additionally influenced by potentials originating from the ventricle which in the atrium are sensed as far - field electrical activities . it is an object of the invention to eliminate the far - field electrical activity sensed in the atrium as far as possible . for this purpose the pacemaker pm comprises an adapted filter compensator as described below . the present invention applies theoretical principles for reducing signal interference to a particular case involving implanted medical devices . in doing this , it applies the general techniques of adaptive filtering , including the least - mean - squares adaptive filtering technique , to reduce iegm interchamber or far - field crosstalk . by applying these techniques with adjunct operations , effectiveness of the implanted device is increased and implementation is simplified . some of the affected adjunct operations include automatic control of the filter adaptation process , pre - processing of the interference reference signal , and accommodating the interference features that may precede the onset of adaptation . it is to be understood that the techniques of the present invention are applicable to any inter - chamber or far - field interferences encountered in an implanted medical device . however , for purposes of teaching the invention , the description provided will be limited to a single example of interest , that is , the reduction of interference of an atrial iegm signal , as sensed by an implanted atrial lead , by far - field crosstalk produced by a ventricular depolarization / repolarization . this latter signal is also available on an implanted ventricular lead as a near - field signal . in accomplishing the objectives of the invention , the inventors do not blank the atrial channel . instead , waveform crosstalk artifacts are subtractively removed by an automated process that allows continuous observation of the atrial waveforms . one way of accomplishing this goal is presented in fig1 , which shows a configuration of an adaptive filter using the least - mean - squares ( lms ) algorithm . this particular algorithm is known and is employed to reduce the effects of interference on a received signal , in cases where it is feasible to approximately model the potentially interfering signal . the block diagram of fig1 shows that the adaptive filter comprises several parts . the first of these is a first input signal port that receives an input signal that includes the “ desired ” signal , which is the first location ( atrial ) sensed signal potentially affected by ( ventricular ) far field signals . the first input port is connected to an l / 2 - stage delay block , in order to assure realizable ( causal ) filter coefficients . the n / 2 - stage delay block in the input - signal channel introduces a short processing delay , equivalent to that number of signal samples , and will be in the neighborhood of 30 milliseconds , depending on system parameters . this is required to assure that signals from the desired input signal port do not precede signals from the fir filter output , as seen at the subtraction ( difference ) block , thus meeting the causality requirements of the coefficient update algorithm disclosed in further detail further below . there also is provided second input port , referred to as an interference - reference input port , which receives a second location sensed signal , e . g . a ( near field ) ventricular signal as an input signal for an adaptive filter , referred to as the interference reference signal . this second input port is connected to an adaptive filter which generates an estimate of the interference affecting the desired signal and the potentially interfering signal . the adaptive filter is a finite - impulse - response ( fir ) filter that operates based upon adjustable coefficients . also providing input to the adaptive filter is a module for adjusting the filter coefficients of the finite - impulse - response ( fir ) filter . in the particular case being illustrated , the module for adjusting the filter coefficients is a lms algorithm module . an output of the l / 2 - stage delay block and an output of the l - stage fir filter each serve as inputs to a subtraction module , where a difference of the inputs is generated . this difference serves as both a filtered output signal from the adaptive filter and as an error signal to be fed back to the adjusting means as an input thereto . the adaptive filter of fig1 may be summarized as a filter where the adjusting algorithm adjusts the filter to minimize the error signal , thereby reducing the second location interference contained in the first location input signal . in the method taught herein , the algorithm is a least - mean - squares algorithm that uses a “ steepest - descent ” search strategy an a multi - dimensional error surface . efficient computational methods for this strategy are known and are described in texts such as “ statistical digital signal processing and modeling ” by monson hayes , published by john wiley & amp ; sons ( new york , 1996 ) and “ adaptive filter theory ”, third edition , by simon haykin , published by prentice - hall , inc . ( upper saddle river , ni , 1996 ). an application of present invention is now provided as fig2 a through 2 d . fig2 a is an example of an atrial iegm signal that has been seriously corrupted by additive crosstalk from the adjacent ventricular chamber . fig2 b shows an estimate of the ventricular signal causing the crosstalk of fig2 a . it has been derived , as described in more detail below , from the actual near - field ventricular iegm signal , which is not shown . fig2 a and the actual near - field ventricular iegm signal are taken from patient file z141448 , distal hra - bi and distal rva - bi leads , ann arbor electrogram libraries , ann arbor , mich . there are several aspects of this example situation which bear notation . first , the ventricular interference signal is of relatively short duration , as opposed to being more random and / or continuous . it may be uniquely established by sensing the waveform in a near - field ventricular lead , which would usually be present in the implanted medical device to support other basic functions , if for no other reason . because of this , the ventricular signal itself or a marker signal derived from the ventricular signal may be used as a trigger signal for a gate to activate the lms filter adaptation process only if ventricular event ( ors complex ) occurs . activation of the lms filter adaptation process is not needed to operate when the related interference signal is not present . once activated , the adaptation process operates for a predetermined interval , which is selected to be slightly longer than the expected duration of the crosstalk interference detected in the atrial channel by the atrial lead . when adaptation is not enabled , the fir filter coefficients are set to zero , and the algorithm has no effect on the desired ( in this example , atrial ) signal . second , the onset of far - field crosstalk interference may slightly precede the near - field sensing of the ventricular event , as is noted by a comparison of fig2 a and 2 b at common times , that is , by drawing a vertical line down through the respective figures when they are aligned as to time . this slight precedence in the far - field , that is , atrial , sensing of the event may be due to a variety of factors , including variations in implant lead placement , cardiac tissue geometry , and the actual pathway of the ventricular event wavefront . this precedence effect may be effectively minimized by using an adaptive fir filter structure of sufficient length to include the expected preactivation interference . when this is done , the means for adjusting the filter coefficients will automatically position the set of lms - based fir coefficients within the structure , achieving the desired interference reduction . third , the effectiveness of an lms adaptive filter will depend strongly upon how realistic the noise reference signal is , compared to the actual interference . in other words , there is a need for the noise reference to be highly correlated to the actual interference , but less strongly correlated with the desired signal , for the lms algorithm to perform effectively . when that happens , the fir filter adaptation can achieve an accurate subtraction of the interfering waveform . in the particular circumstance of attempting to reduce iegm ventricle - to - atrium inter - chamber crosstalk in an application of the invention to an implanted medical electrotherapy device , this means that an obvious choice for the noise reference signal to be input to the l - stage fir filter is the ventricular iegm signal itself . as already noted , this signal is generally readily available from an implanted ventricular lead , providing a localized “ near - field ” view of the passage of the ventricular event wavefronts , whether they are depolarizations or repolarizations . however , when observed as interference in the far - field setting of an atrial lead , the signal will be incidentally filtered by the geometry and behaviour of intervening quasi - parallel conductive pathways . the crosstalk interference will therefore be prolonged in duration and have relatively diffused waveform transitions . this is clearly shown in fig2 a and 2 b by comparison of the respective signals . accordingly , it is advantageous to pre - process the near - field ventricular waveform before it is used , to improve the correlation of the noise reference signal to the expected far - field interference . one way to achieve this is by using a fixed - coefficient fir filter of suitable design . in conducting simulations of this technique , the inventors have noted that a simple moving - average filter can significantly improve the interference reduction . advanced implementations may employ other pre - processing methods , using adaptive ( but slowly - varying ) coefficients as appropriate . for these reasons , the waveform shown in fig2 b is not the actual near - field ventricular signal , but is instead a first estimate of the far - field interference derived from the actual near - field ventricular signal . turning now to fig2 c , the benefit of using the invention in the waveforms of fig2 a and the derived waveform of fig2 b is illustrated as a post - processed atrial signal , that is , as the output signal of the filter block of fig1 . this post - processed atrial signal was generated using a matlab / simulink system simulation described in more detail below . finally , fig2 d shows the enabling signal used in the matlab / simulink simulation for lms filter adaptation . this signal is triggered from the near - field ventricular iegm signal , which , as previously noted , is not shown . while the preceding example shows the efficacy of the inventive technique , it does not fully portray the advantages of the invention over the known blanking techniques . particularly , the preceding example does not show how the inventive technique permits the detection of an atrial event that is concurrent with a ventricular event that is causing interference in the atrial signal . however , the advantage of the present invention may be seen by reference to fig3 a through 3 d . because of similarities in the content of fig3 a through 3 d to fig2 a through 2 d , it is not necessary to describe the contents in as much detail . however , it is noted that a brief , artificial atrial - channel event has been incorporated into fig3 a . this atrial - channel event is incorporated during the duration of the expected crosstalk interference . if the known blanking technique was being employed in this instance , the activation of the blanking protocol in the atrial signal channel would prevent this brief event from being observed . however , when the same type of far - field ventricular estimate of fig3 b is prepared and applied using the adaptive filter , using an enabling signal according to fig3 d , the same matlab / simulink technique provides a post - processed atrial signal according to fig3 c . as expected , the continuous reception of the atrial signal , even during expected crosstalk intervals , results in the previously unknown capacity to detect the brief , artificial atrial - channel event . fig4 shows another example of far - field interference reduction using these principles [ ann arbor electrogram libraries , ann arbor mich . : patient file a191078 , distal hra - bi and distal rva - bi leads ]. three cardiac cycles of atrial iegm data are included ; in the second of these , an artificial atrial test signal has been positioned within the filter adaptation interval . the post - processed signal , as would be seen at the “ basic output ” port of fig1 , shows that reduction of crosstalk by means of the adaptive filter does not remove or conceal a co - existing atrial event . that is , during the time that filter adaptation ( hence , noise reduction ) is active , the output includes this atrial test signal , which however now appears in first derivative form . if the desired input waveform must be accurately represented during active intervals of the noise reduction process , a morphology restoration ( mr ) block may be added to the overall system , as shown in fig1 . in that case , the “ enhanced output signal ” port would be used . the mr block functions as a gated integrator ; its output simply tracks the basic output signal while filter adaptation is off , but sums the basic output signal values to its output whenever filter adaptation is on . in this manner , the first - derivative transformation of the ( active ) noise reduction algorithm may be avoided . of particular benefit is the use of step size normalization within the filter coefficient update algorithm . for the lms algorithm , this feature guarantees stable behavior for a known range of parameter values ( 0 & lt ; μ & lt ; 2 ), independent of the input data statistics . without normalization , data - dependent instabilities can occur , as shown in fig5 . in the case of an lms adaptive filter , normalization is provided by the summation term in the denominator of the update algorithm , as shown in fig1 . without normalization , the denominator is simply unity . implementing this normalized least - mean - square ( nlms ) sum - of - squares algorithm requires a minimum of one additional multiply , divide , and addition ( per coefficient ) over the standard lms algorithm for shift - input data . the computational workload associated with this may , if necessary for an implant application , be reduced by several alternative methods , including but not limited to the following three : a first alternative uses a normalization based on k [ max ( x )] 2 , where k & lt ; l is an integer constant , chosen to provide an upper bound to the sum - of - squares method . this avoids squaring each data value . characterization of iegm data types allows proper selection of parameter k ; the system may include algorithm divergence sensing . a second alternative uses a modified update algorithm , such as the computationally efficient form proposed by nagumo & amp ; noda , for which : this uses only the sign of the data in fir filter memory , with normalization based on the sum of the data absolute values . as a result , multiplication workload is greatly reduced . a third alternative uses the douglas update algorithm , whereby the only filter coefficient updated at time k is that associated with the largest data sample currently in filter memory : w i , k + 1 = { w i , k + μ ⁢ e k x i , k , if ⁢ ⁢  x i , k  = max 1 ≤ i ≤ l ⁢  x j , k  w i , k , otherwise . in the above examples for deriving the figures associated with the examples described above . fig7 shows a code listing , written as a matlab function m - file , for generating a generalized lms filter , as used in association with the above examples to derive the figures associated therewith . accordingly , from the foregoing description , it may be inferred that the invention relates to the technique of using an lms adaptive filter to effectively reduce inter - chamber iegm far - field interference within an implanted medical device , particularly when simpler methods of iegm interpretation yield ambiguous or incomplete results . further , the invention relates to a technique where the lms filter adaptation is activated only when interfering signal events occur . this allows the computational burden on the implanted medical device to be reduced . yet further , the invention relates to a technique that includes pre - processing the interfering signal , as observed , for example , in a near - field cardiac lead , especially a ventricular lead , to cause it to resemble the interference signal as it will be expected to be observed in the far - field cardiac lead , that is , for example , in an atrial lead . this pre - processing occurs prior to the ventricular lead signal being applied to the lms adaptive filter as an input signal . and still further , the invention relates to the inclusion of a finite - impulse - response ( fir ) filter of sufficient length into the filter to effectively adapt to the situation where the interference signal from the triggering waveform will be detected in the far - field lead prior to being detected in the near - field lead , this enables the adaptation process to manage preactivation events . finally , the invention relates to an implanted medical device having the inventive technique incorporated within it . the methods of this invention may be implemented by computer software , running on a microprocessor appropriate for digital signal processing tasks . alternatively , they may be implemented by means of a dedicated vlsi structure , incorporating gates , registers , and the like , to perform the required functions . it is expected that the latter approach would provide the most efficient operation for use in medical implant devices .
an implantable medical device comprises at least two sensing channels for receiving sensed first and second location electrical signals originating from two different locations of a heart . a control unit is connected to the sensing channels and is adapted to process sensed electrical signals originating from first and second locations of the heart . the control unit incorporates an adaptive filter compensator adapted to generate an estimate signal for compensating a far - field contribution of the second location signal to the first location signal , thereby generating an output signal representing a near field signal originating from the first location . a gate is connected to the second location sensing channel and is adapted to enable the adaptive filter compensator only if a predetermined signal is sensed via the second location sensing channel .